diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8b72c52a8731c..55c638891605a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,218 +1,3 @@ -# Lines starting with '#' are comments. -# Each line is a file pattern followed by one or more owners. +# DO NOT OVERWRITE THIS EMPTY FILE. -# More details are here: https://help.github.com/articles/about-codeowners/ - -# The '*' pattern is global owners. - -* @dotnet/docs - -# Order is important. The last matching pattern has the most precedence. -# The folders are ordered as follows: -# . Guides -# . .NET Core sections -# . .NET Framework sections -# . .NET Standard -# . Architecture e-books - -# In each subsection, folders are order first by depth, then alphabetically. -# This should make it easy to add new rules without breaking existing ones. - -######## API landing page ########### -/api/ @dotnet/docs - -############ What's new ############### -/docs/whats-new/ @billwagner - -############ Guides ################ -# .NET Core -/docs/core/ @dotnet/docs - -# .NET Framework -/docs/framework/ @dotnet/docs - -# .NET Standard -/docs/standard/ @gewarren - -# The C# Guide: -/docs/csharp/ @BillWagner - -# The F# Guide: -/docs/fsharp/ @dotnet/docs @kathleendollard - -# The Visual Basic Guide: -/docs/visual-basic/ @KathleenDollard @BillWagner - -# The ML.NET Guide: -/docs/machine-learning/ @luisquintanilla - -# The .NET for Apache Spark Guide: -/docs/spark/ @luisquintanilla - -# The .NET Architecture Guide: -/docs/architecture/ @nishanil @IEvangelist - -# .NET Orleans -/docs/orleans/ @IEvangelist - -# Azure Guide -/docs/azure/ @alexwolfmsft @CamSoper - -# Azure SDK package list -/docs/azure/includes/ @dotnet/docs - -# IoT Guide -/docs/iot/ @CamSoper - -# Includes files -/includes/ @dotnet/docs - -############### .NET 5 ################ - -# Code analysis -/docs/fundamentals/code-analysis/ @gewarren - -############### .NET Core ######################## -# What's New -/docs/core/whats-new/ @adegeo -# Deployment -/docs/core/deploying/ @adegeo -# Diagnostics -/docs/core/diagnostics/ @tommcdon @dotnet/docs -# Extensions -/docs/core/extensions/ @IEvangelist -# Docker -/docs/core/docker/ @IEvangelist -# Install -/docs/core/install/ @adegeo -# Breaking changes -/docs/core/compatibility/ @gewarren -# Project SDKs -/docs/core/project-sdk/ @gewarren -# Config settings -/docs/core/runtime-config/ @gewarren -# Testing -/docs/core/testing/ @IEvangelist -# Tools -/docs/core/tools/ @tdykstra -# Tutorials -/docs/core/tutorials/ @tdykstra - -################### .NET Framework ################## -# App domains -/docs/framework/app-domains/ @gewarren -# Config - WinForms -/docs/framework/configure-apps/file-schema/winforms/ @adegeo -# Deployment -/docs/framework/deployment/ @adegeo -# Installation -/docs/framework/install/ @adegeo -# Migration guide -/docs/framework/migration-guide/ @gewarren -# Reflection -/docs/framework/reflection-and-codedom/ @adegeo -# Resources -/docs/framework/resources/ @adegeo -# Tools -/docs/framework/tools/ @gewarren -# UI Automation -/docs/framework/ui-automation/ @adegeo -# What's New -/docs/framework/whats-new/ @gewarren -# Winforms -/docs/framework/winforms/ @adegeo -# WPF -/docs/framework/wpf/ @adegeo -# XAML Services -/docs/framework/xaml-services/ @adegeo -# ADO.NET -/docs/framework/data/ @mcleblanc -# NCL -/docs/framework/configure-apps/file-schema/network/ @karelz -/docs/framework/network-programming/ @karelz -# WCF -/docs/framework/configure-apps/file-schema/wcf/ @HongGit -/docs/framework/wcf/ @HongGit - -################## .NET Standard ################## -# Analyzers -/docs/standard/analyzers/ @IEvangelist -# Assembly -/docs/standard/assembly/ @IEvangelist -# Asynchronous Programming Patterns -/docs/standard/asynchronous-programming-patterns/ @BillWagner -# Attributes -/docs/standard/attributes/ @gewarren -# Character encoding -/docs/standard/base-types/character-encoding/ @gewarren -/docs/standard/base-types/character-encoding-introduction/ @gewarren -# Base types -/docs/standard/base-types/ @adegeo -# Collections -/docs/standard/collections/ @IEvangelist -# System.CommandLine -/docs/standard/commandline/ @tdykstra -# Data -/docs/standard/data/ @gewarren -# Data - SQLite -/docs/standard/data/sqlite/ @bricelam -# Datetime -/docs/standard/datetime/ @adegeo -# Design guidelines -/docs/standard/design-guidelines/ @BillWagner -# Events -/docs/standard/events/ @IEvangelist -# Exceptions -/docs/standard/exceptions/ @gewarren -# GC -/docs/standard/garbage-collection/ @gewarren -# Generics -/docs/standard/generics/ @adegeo -# Globalization -/docs/standard/globalization-localization/ @dotnet/docs -# I/O -/docs/standard/io/ @adegeo -# Library guidance -/docs/standard/library-guidance/ @jamesnk @IEvangelist -# LINQ -/docs/standard/linq/ @dotnet/docs -# Memory and spans -/docs/standard/memory-and-spans/ @gewarren -# Native Interop -/docs/standard/native-interop/ @jkoritzinsky -# Parallel programming -/docs/standard/parallel-programming/ @IEvangelist -# Security -/docs/standard/security/ @IEvangelist -# Serialization -/docs/standard/serialization/ @gewarren -# Threading -/docs/standard/threading/ @BillWagner -# What's New -/docs/standard/whats-new/ @dotnet/docs - -################## E-books ################## -# Blazor: -/docs/architecture/blazor-for-web-forms-developers/ @danroth27 @IEvangelist -# gRPC: -/docs/architecture/grpc-for-wcf-developers/ @IEvangelist -# Desktop: -/docs/architecture/modernize-desktop/ @OliaG @IEvangelist - -################# Samples folder ############## - -## These have been pulled directly from the samples repo: - -/samples/snippets/csharp/ @BillWagner @IEvangelist -# Visual Basic snippets: -/samples/snippets/visualbasic/ @BillWagner -# F# Snippets: -/samples/snippets/fsharp/ @dotnet/docs - -# WPF folders: -/samples/snippets/xaml/wpf/ @adegeo -/samples/snippets/csharp/wpf/ @adegeo -/samples/snippets/visualbasic/wpf/ @adegeo -/samples/snippets/desktop-guide/wpf/ @adegeo - -/samples/snippets/winforms/ @adegeo +# This file is intentionally empty in the live branch (only), so the whole world doesn't get tagged for review on main -> live publish PRs. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 32749d10cc325..14b0cb6e339b5 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,13 +1,13 @@ blank_issues_enabled: true contact_links: - - name: docs.microsoft.com site feedback + - name: learn.microsoft.com site feedback url: https://github.com/MicrosoftDocs/feedback/issues/new/choose - about: Log general docs.microsoft.com site issues here + about: Log general learn.microsoft.com site issues here - name: .NET platform and other product feedback url: https://aka.ms/feedback/report?space=61 about: Log product issues here - name: .NET Q&A forums - url: https://docs.microsoft.com/answers/products/dotnet + url: https://learn.microsoft.com/answers/products/dotnet about: Find answers to your technical questions about .NET - name: .NET tech community forums url: https://techcommunity.microsoft.com/t5/net/ct-p/dotnet diff --git a/.github/ISSUE_TEMPLATE/doc-issue.md b/.github/ISSUE_TEMPLATE/doc-issue.md index 1f5e75e63e18e..dd2b642760f2e 100644 --- a/.github/ISSUE_TEMPLATE/doc-issue.md +++ b/.github/ISSUE_TEMPLATE/doc-issue.md @@ -12,7 +12,7 @@ assignees: '' If the issue is: - - A simple typo or similar correction, consider submitting a PR to fix it instead of logging an issue. See [the contributor guide](https://docs.microsoft.com/contribute/#quick-edits-to-existing-documents) for instructions. + - A simple typo or similar correction, consider submitting a PR to fix it instead of logging an issue. See [the contributor guide](https://learn.microsoft.com/contribute/#quick-edits-to-documentation) for instructions. - A general support question, consider asking on a support forum site. - A site design concern, create an issue at [MicrosoftDocs/feedback](https://github.com/MicrosoftDocs/feedback/issues/new/choose). - A problem completing a tutorial, compare your code with the completed sample. diff --git a/.github/ISSUE_TEMPLATE/new-feature-csharp.yml b/.github/ISSUE_TEMPLATE/new-feature-csharp.yml new file mode 100644 index 0000000000000..30ab53dba2dbe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new-feature-csharp.yml @@ -0,0 +1,87 @@ +name: "C# 12 - New feature" +description: Create the task list of a new feature in C# 12. Intended mostly for docs / product-team use. +title: "[C# 12]: New Feature - " +labels: + - ":checkered_flag: Release: .NET 8" + - Pri1 + - csharp-whats-new/tech + - dotnet-csharp/prod +assignees: + - billwagner +body: + - type: dropdown + id: version + attributes: + label: Visual Studio release + description: What Visual Studio (preview) contains this feature? + options: + - 17.6p1 + - 17.6p2 + - 17.6p3 + - Other (please put exact version in description textbox) + validations: + required: true + - type: input + id: Speclet + attributes: + label: Link to speclet + description: Insert the markdown format for a link to the speclet + value: "- [Speclet](https://github.com/dotnet/csharplang/blob/main/proposals/feature.md)" + validations: + required: true + - type: input + id: pullrequest + attributes: + label: Link to Pull request + description: Insert the markdown format for a link to the PR + value: "- [PR](https://github.com/dotnet/roslyn/pulls/nnnnn)" + validations: + required: true + - type: textarea + id: new-behavior + attributes: + label: New behavior + description: Describe the new behavior. Include code snippets if applicable. + validations: + required: true + - type: checkboxes + id: task-list + attributes: + label: Areas affected + description: Check all areas that must be updated. Some are always updated. + options: + - label: "**Add to What's new in C# 12**: Add links to updated docs in the What's new in C# 12 article." + required: true + - label: "**Update language reference**: Detail the areas in the language reference that will be updated for this feature." + required: true + - label: "**Update compiler messages**: Add new (or updated) pages for new compiler messages. Include related message." + required: true + - label: "*Include in *Everyday C#* section**: Is this new feature included in Everyday C#?" + required: false + - label: "**Tutorials**: Are new tutorials required for this feature? If so, detail below" + required: false + - type: textarea + id: language-reference + attributes: + label: Language reference tasks + description: Add a list of areas or articles in the language reference that should be updated for this feature. + placeholder: | + - Syntax directly affected + - Related language elements that should include use of this new feature + - Areas where the new feature reduces friction + - type: textarea + id: tutorials + attributes: + label: Tutorial tasks + description: Add a list of topics that should be covered in one or more tutorials related to this feature. + placeholder: | + - Syntax directly affected + - Related language elements that should include use of this new feature + - Areas where the new feature reduces friction + - type: textarea + id: fundamentals + attributes: + label: Everyday C# tasks + description: Add a list of any articles in the new Everyday C# section that should be updated. + placeholder: | + - How will this be used as part of *Everyday C#*? diff --git a/.github/dependabot.yml b/.github/dependabot.yml index eb236d75d3d0d..006d7c1969ad4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -188,6 +188,12 @@ updates: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 + - package-ecosystem: "nuget" + directory: "/docs/core/extensions/snippets/configuration/options-validation-onstart" #options-validation-onstart.csproj + schedule: + interval: "weekly" + day: "wednesday" + open-pull-requests-limit: 5 - package-ecosystem: "nuget" directory: "/docs/core/extensions/snippets/configuration/worker-scope" #worker-scope.csproj schedule: @@ -399,61 +405,67 @@ updates: day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/language-reference/compiler-messages/snippets/null-warnings" #null-warnings.csproj + directory: "/docs/csharp/advanced-topics/interop/snippets/dynamic-iron-python-walkthrough" #ironpythonsample.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/language-reference/keywords/snippets" #keywords.csproj + directory: "/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/finished" #IssuePRreport.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/language-reference/operators/snippets/shared" #operators.csproj + directory: "/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/start" #IssuePRreport.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/roslyn-sdk/snippets/source-generators/SourceGenerator" #SourceGenerator.csproj + directory: "/docs/csharp/language-reference/compiler-messages/snippets/null-warnings" #null-warnings.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.CodeFixes" #MakeConst.CodeFixes.csproj + directory: "/docs/csharp/language-reference/keywords/snippets" #keywords.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test" #MakeConst.Test.csproj + directory: "/docs/csharp/language-reference/operators/snippets/shared" #operators.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Vsix" #MakeConst.Vsix.csproj + directory: "/docs/csharp/roslyn-sdk/snippets/source-generators/SourceGenerator" #SourceGenerator.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst" #MakeConst.csproj + directory: "/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.CodeFixes" #MakeConst.CodeFixes.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/finished" #IssuePRreport.csproj + directory: "/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test" #MakeConst.Test.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/start" #IssuePRreport.csproj + directory: "/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Vsix" #MakeConst.Vsix.csproj + schedule: + interval: "weekly" + day: "wednesday" + open-pull-requests-limit: 5 + - package-ecosystem: "nuget" + directory: "/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst" #MakeConst.csproj schedule: interval: "weekly" day: "wednesday" @@ -573,25 +585,31 @@ updates: day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/orleans/host/configuration-guide/snippets/best-practices" #best-practices.csproj + directory: "/docs/orleans/host/snippets" #Client.csproj + schedule: + interval: "weekly" + day: "wednesday" + open-pull-requests-limit: 5 + - package-ecosystem: "nuget" + directory: "/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener" #orleansurlshortener.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/orleans/host/configuration-guide/snippets/configuration" #configuration.csproj + directory: "/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Client" #BroadcastChannel.Client.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/orleans/host/configuration-guide/snippets/custom-serialization" #custom.csproj + directory: "/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces" #BroadcastChannel.GrainInterfaces.csproj schedule: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - package-ecosystem: "nuget" - directory: "/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener" #orleansurlshortener.csproj + directory: "/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo" #BroadcastChannel.Silo.csproj schedule: interval: "weekly" day: "wednesday" @@ -752,12 +770,6 @@ updates: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService.Tests" #PrimeService.Tests.vbproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - package-ecosystem: "nuget" directory: "/samples/snippets/core/testing/unit-testing-vb-mstest/vb/PrimeService.Tests" #PrimeService.Tests.vbproj schedule: @@ -770,30 +782,6 @@ updates: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/FrenchPlugin" #FrenchPlugin.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/JsonPlugin" #JsonPlugin.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/OldJsonPlugin" #OldJsonPlugin.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/UVPlugin" #UVPlugin.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - package-ecosystem: "nuget" directory: "/samples/snippets/core/tutorials/testing-with-cli/csharp/test/NewTypesTests" #NewTypesTests.csproj schedule: @@ -806,18 +794,6 @@ updates: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibraryTest" #StringLibraryTest.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/csharp/getting-started/console-webapiclient" #webapiclient.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - package-ecosystem: "nuget" directory: "/samples/snippets/csharp/programming-guide/dynamic-linq-expression-trees" #dynamic-linq-expression-trees.csproj schedule: @@ -854,36 +830,6 @@ updates: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/csharp/safe-efficient-code/benchmark" #benchmark.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.Tests" #SimpleFeedReader.Tests.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader" #SimpleFeedReader.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/csharp/tutorials/nullable-reference-migration/start/SimpleFeedReader.Tests" #SimpleFeedReader.Tests.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/csharp/tutorials/nullable-reference-migration/start/SimpleFeedReader" #SimpleFeedReader.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - package-ecosystem: "nuget" directory: "/samples/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SqlClient.DataAdapterUpdate/CS" #SqlAdapter.csproj schedule: @@ -1016,12 +962,6 @@ updates: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs" #ironpythonsample.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - package-ecosystem: "nuget" directory: "/samples/snippets/csharp/xunit-test" #xunit-test.csproj schedule: @@ -1106,12 +1046,6 @@ updates: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 - - package-ecosystem: "nuget" - directory: "/samples/snippets/standard/data/sqlite/InMemorySample" #InMemorySample.csproj - schedule: - interval: "weekly" - day: "wednesday" - open-pull-requests-limit: 5 - package-ecosystem: "nuget" directory: "/samples/snippets/standard/data/sqlite/InteropSample" #InteropSample.csproj schedule: @@ -1202,6 +1136,12 @@ updates: interval: "weekly" day: "wednesday" open-pull-requests-limit: 5 + - package-ecosystem: "nuget" + directory: "/samples/snippets/visualbasic/VS_Snippets_CLR/HowToEncryptXMLElementX509/vb" #encryptxml.vbproj + schedule: + interval: "weekly" + day: "wednesday" + open-pull-requests-limit: 5 - package-ecosystem: "nuget" directory: "/samples/snippets/visualbasic/VS_Snippets_CLR/HowToSignXMLDocumentRSA/vb" #signxml.vbproj schedule: diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index 113b1d79cf554..edd52801a1ab2 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -15,7 +15,7 @@ on: default: "Manual run" env: - DOTNET_INSTALLER_CHANNEL: "7.0" + DOTNET_INSTALLER_CHANNEL: "8.0" DOTNET_DO_INSTALL: "true" # True to install preview versions, False to use the pre-installed (released) SDK EnableNuGetPackageRestore: "True" repo: "docs" @@ -32,7 +32,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # Get the latest preview SDK (or sdk not installed by the runner) - name: Setup .NET SDK diff --git a/.github/workflows/check-for-build-warnings.yml b/.github/workflows/check-for-build-warnings.yml index 9555067e07405..476c9a4774932 100644 --- a/.github/workflows/check-for-build-warnings.yml +++ b/.github/workflows/check-for-build-warnings.yml @@ -10,7 +10,12 @@ jobs: runs-on: ubuntu-latest permissions: statuses: write + issues: write + pull-requests: write steps: - - uses: dotnet/docs-actions/actions/status-checker@main + - uses: actions/checkout@v3 + - uses: dotnet/docs-tools/actions/status-checker@main with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + docs_path: "docs" + url_base_path: "dotnet" diff --git a/.github/workflows/clean-repo.yml b/.github/workflows/clean-repo.yml new file mode 100644 index 0000000000000..a14378c1984c5 --- /dev/null +++ b/.github/workflows/clean-repo.yml @@ -0,0 +1,47 @@ +name: "clean repo" + +on: + schedule: + - cron: "0 1 1 * *" # Runs at 01:00, on day 1 of the month + workflow_dispatch: + +jobs: + clean-repo: + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + + steps: + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + + # Call clean repo + - name: Clean repo + id: clean-repo-step + uses: dotnet/docs-tools/cleanrepo/CleanRepo@main + with: + docfx_directory: '.' + articles_directory: 'docs' + media_directory: 'docs' + snippets_directory: '.' # This includes the ./samples and ./docs directories, which both contain snippets. + includes_directory: 'includes' + url_base_path: '/dotnet' + delete: true + orphaned_articles: true + orphaned_images: true + catalog_images: false + orphaned_snippets: true + orphaned_includes: true + replace_redirects: true + relative_links: true + remove_hops: true + + # Create the PR for the work done by the "clean repo" tool + - name: create-pull-request + uses: peter-evans/create-pull-request@5b4a9f6a9e2af26e5f02351490b90d01eb8ec1e5 + with: + branch: create-cleanrepo-pull-request/patch + title: "Monthly chores: Automated repo cleanup" + commit-message: 'Bot 🤖 generated CleanRepo tool run' + body: "Find and delete orphaned articles, images, snippets, and include files. Remove redirection hops, update redirected links in articles, and replace site-relative links with file-relative links. Contributes to #..." diff --git a/.github/workflows/dependabot-approve-and-automerge.yml b/.github/workflows/dependabot-approve-and-automerge.yml index 78e0476c98b2c..9437ca23d9d9d 100644 --- a/.github/workflows/dependabot-approve-and-automerge.yml +++ b/.github/workflows/dependabot-approve-and-automerge.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@5ef00187930bafb52d529e0b9c3dff045dfa9851 + uses: dependabot/fetch-metadata@4de7a6c08ce727a42e0adbbdc345f761a01240ce with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Approve a PR diff --git a/.github/workflows/dependabot-bot.yml b/.github/workflows/dependabot-bot.yml index 1dced73cd9b1a..53d2fed0845ea 100644 --- a/.github/workflows/dependabot-bot.yml +++ b/.github/workflows/dependabot-bot.yml @@ -22,7 +22,7 @@ jobs: # Checkout the repo into the workspace within the VM steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # - name: Setup .NET # uses: actions/setup-dotnet@4d4a70f4a5b2a5a5329f13be4ac933f2c9206ac0 # with: @@ -44,8 +44,9 @@ jobs: dependabot-yml-path: ".github/dependabot.yml" - name: Create pull request if: github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet' - uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 + uses: peter-evans/create-pull-request@5b4a9f6a9e2af26e5f02351490b90d01eb8ec1e5 with: + branch: create-dependabotconfig-pull-request/patch title: "Update dependabot.yml - automatically." body: ".NET dependabot-bot automated PR. 🤖" commit-message: ".NET dependabot-bot automated PR." diff --git a/.github/workflows/dependencies/DotnetDocsTools.LocateProjects.1.0.10.nupkg b/.github/workflows/dependencies/DotnetDocsTools.LocateProjects.1.0.10.nupkg deleted file mode 100644 index 3cc8f81c0becd..0000000000000 Binary files a/.github/workflows/dependencies/DotnetDocsTools.LocateProjects.1.0.10.nupkg and /dev/null differ diff --git a/.github/workflows/dependencies/DotnetDocsTools.LocateProjects.2.0.0.nupkg b/.github/workflows/dependencies/DotnetDocsTools.LocateProjects.2.0.0.nupkg new file mode 100644 index 0000000000000..8da2539f261cb Binary files /dev/null and b/.github/workflows/dependencies/DotnetDocsTools.LocateProjects.2.0.0.nupkg differ diff --git a/.github/workflows/dependencies/dotnet-whatsnew.2.2.1.nupkg b/.github/workflows/dependencies/dotnet-whatsnew.2.2.1.nupkg deleted file mode 100644 index b43676f281df5..0000000000000 Binary files a/.github/workflows/dependencies/dotnet-whatsnew.2.2.1.nupkg and /dev/null differ diff --git a/.github/workflows/dependencies/run-dotnet-whatsnew.sh b/.github/workflows/dependencies/run-dotnet-whatsnew.sh deleted file mode 100755 index 496ae05fc413c..0000000000000 --- a/.github/workflows/dependencies/run-dotnet-whatsnew.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -e - -# This script runs the .NET CLI, invoking the what's new global tool -# $1 is the -# $2 is the -# $3 is the savedir - -while getopts o:r:s: option -do -case "${option}" -in -o) OWNER=${OPTARG};; -r) REPO=${OPTARG};; -s) SAVEDIR=${OPTARG};; -esac -done - -dotnet whatsnew \ - --owner $OWNER \ - --repo $REPO \ - --savedir $SAVEDIR diff --git a/.github/workflows/docs-verifier-tryfix.yml b/.github/workflows/docs-verifier-tryfix.yml index b7d6fbf03d775..9cce8d9451211 100644 --- a/.github/workflows/docs-verifier-tryfix.yml +++ b/.github/workflows/docs-verifier-tryfix.yml @@ -13,7 +13,7 @@ jobs: IS_TRY_FIX: true # differentiates /tryfix from the validation-only run. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 + - uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 id: get-pr with: script: | @@ -30,7 +30,7 @@ jobs: core.setFailed(`Request failed with error ${err}`) } - name: Checkout the repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - name: Checkout Pull Request run: | diff --git a/.github/workflows/docs-verifier.yml b/.github/workflows/docs-verifier.yml index 97d5a595e5017..1be1737bdf62c 100644 --- a/.github/workflows/docs-verifier.yml +++ b/.github/workflows/docs-verifier.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - name: Validate uses: dotnet/docs-actions/actions/docs-verifier@main diff --git a/.github/workflows/live-protection.yml b/.github/workflows/live-protection.yml index c62282bc32298..0ed4f10323c12 100644 --- a/.github/workflows/live-protection.yml +++ b/.github/workflows/live-protection.yml @@ -4,7 +4,7 @@ jobs: comment: runs-on: ubuntu-latest steps: - - uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 + - uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 env: SHOULD_COMMENT: ${{ github.base_ref == 'refs/heads/live' && !(github.event.issue.user.login == 'cxwtool' || github.head_ref == 'refs/heads/main') }} with: diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 0e34884c07ba2..429df6a130305 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -23,7 +23,7 @@ jobs: statuses: write steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - name: Use Node.js uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c with: diff --git a/.github/workflows/quest-bulk.yml b/.github/workflows/quest-bulk.yml index 52c3c7ac684ec..ceb7f0ceec33d 100644 --- a/.github/workflows/quest-bulk.yml +++ b/.github/workflows/quest-bulk.yml @@ -1,5 +1,7 @@ name: "bulk quest import" on: + schedule: + - cron: '0 10 * * *' # UTC time, that's 5:00 am EST, 2:00 am PST. workflow_dispatch: inputs: reason: @@ -11,9 +13,8 @@ jobs: bulk-import: runs-on: ubuntu-latest permissions: - contents: write issues: write - + if: ${{ github.repository_owner == 'dotnet' }} steps: - name: "Print manual bulk import run reason" if: ${{ github.event_name == 'workflow_dispatch' }} @@ -21,13 +22,15 @@ jobs: echo "Reason: ${{ github.event.inputs.reason }}" - name: bulk-sequester - if: ${{ github.event_name == 'workflow_dispatch' }} id: bulk-sequester uses: dotnet/docs-tools/actions/sequester@main env: ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }} ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }} ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }} + ImportOptions__ApiKeys__SequesterPrivateKey: ${{ secrets.SEQUESTER_PRIVATEKEY }} + ImportOptions__ApiKeys__SequesterAppID: ${{ secrets.SEQUESTER_SEQUESTER_APPID }} + with: org: ${{ github.repository_owner }} repo: ${{ github.repository }} diff --git a/.github/workflows/quest.yml b/.github/workflows/quest.yml index 3d419c585ac64..48608c4461afe 100644 --- a/.github/workflows/quest.yml +++ b/.github/workflows/quest.yml @@ -1,8 +1,5 @@ name: "quest import" on: - issues: - types: - [ labeled, closed, reopened, assigned, unassigned ] workflow_dispatch: inputs: reason: @@ -23,7 +20,6 @@ jobs: contains(github.event.issue.labels.*.name, ':pushpin: seQUESTered') runs-on: ubuntu-latest permissions: - contents: write issues: write steps: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index da142c269df94..b23df70439636 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ jobs: issues: write steps: - - uses: actions/stale@6f05e4244c9a0b2ed3401882b05d701dd0a7289b + - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 with: start-date: '2022-03-01T00:00:00Z' # ISO 8601 or RFC 2822 repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/version-sweep.yml b/.github/workflows/version-sweep.yml index 38862d8c0f1db..b843d3551b711 100644 --- a/.github/workflows/version-sweep.yml +++ b/.github/workflows/version-sweep.yml @@ -27,7 +27,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # Runs a single command using the runners shell - name: "Print manual run reason" diff --git a/.github/workflows/whats-new.yml b/.github/workflows/whats-new.yml index fcf1a6ad91d43..313842b56ba81 100644 --- a/.github/workflows/whats-new.yml +++ b/.github/workflows/whats-new.yml @@ -1,12 +1,8 @@ -# This is a basic workflow to help you get started with Actions - name: "generate what's new article" -# Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the default branch schedule: - - cron: "0 0 1 * *" # The first of every month + - cron: "0 2 1 * *" # The first of every month at 2 AM workflow_dispatch: inputs: reason: @@ -14,56 +10,34 @@ on: required: true default: "Manual run" -env: - DOTNET_VERSION: "6.0.x" # set this to the dot net version to use - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "create-what-is-new" create-what-is-new: - # The type of runner that the job will run on runs-on: ubuntu-latest permissions: contents: write pull-requests: write - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - name: Setup .NET - uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a - with: - dotnet-version: ${{ env.DOTNET_VERSION }} + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - # Runs a single command using the runners shell - name: "Print manual run reason" if: ${{ github.event_name == 'workflow_dispatch' }} run: | echo "Reason: ${{ github.event.inputs.reason }}" - # Print dotnet info - - name: Display .NET info - run: dotnet --info - - # Install dotnet-whatsnew global tool - - name: Install dotnet-whatsnew tool - run: | - dotnet tool install --global --add-source ./.github/workflows/dependencies/ dotnet-whatsnew - - # Run dotnet-whatsnew tool - - name: Generate what's new - id: dotnet-whatsnew + - uses: dotnet/docs-tools/WhatsNew.Cli@main env: GitHubKey: ${{ secrets.GITHUB_TOKEN }} OspoKey: ${{ secrets.OSPO_KEY }} - run: | - ./.github/workflows/dependencies/run-dotnet-whatsnew.sh -o dotnet -r docs -s './docs/whats-new' + with: + owner: dotnet + repo: docs + savedir: './docs/whats-new' - # Create the PR for the new article - name: create-pull-request - uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 + uses: peter-evans/create-pull-request@5b4a9f6a9e2af26e5f02351490b90d01eb8ec1e5 with: + branch: create-whatsnew-pull-request/patch title: "What's new article" commit-message: 'Bot 🤖 generated "What''s new article"' body: "Automated creation of What's new article." diff --git a/.gitignore b/.gitignore index 6682fb92379fb..0c15f255dadc7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ rebuild.cmd *.bim.layout *.bim_*.settings +*.exe +*.msi + _site/ api/ _themes/ @@ -54,3 +57,4 @@ docs/core/extensions/snippets/workers/cloud-service/Properties/PublishProfiles/c docs/csharp/language-reference/xmldoc/snippets/xmldoc/xmldoc.xml BenchmarkDotNet.Artifacts +*.pfx diff --git a/.openpublishing.redirection.csharp.json b/.openpublishing.redirection.csharp.json index 8fa004ccf831a..a832a2be0354b 100644 --- a/.openpublishing.redirection.csharp.json +++ b/.openpublishing.redirection.csharp.json @@ -16,6 +16,14 @@ "source_path_from_root": "/redirections/proposals/csharp-7.0/throw-expression.md", "redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions.md#1115-the-throw-expression-operator" }, + { + "source_path_from_root": "/redirections/proposals/csharp-7.0/out-var.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions.md#1117-declaration-expressions" + }, + { + "source_path_from_root": "/redirections/proposals/csharp-7.0/pattern-matching.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/patterns.md" + }, { "source_path_from_root": "/redirections/proposals/csharp-7.1/async-main.md", "redirect_url": "/dotnet/csharp/language-reference/language-specification/basic-concepts#71-application-startup" @@ -24,6 +32,14 @@ "source_path_from_root": "/redirections/proposals/csharp-7.1/target-typed-default.md", "redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions#11719-default-value-expressions" }, + { + "source_path_from_root": "/redirections/proposals/csharp-7.1/infer-tuple-names.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/types.md#8311-tuple-types" + }, + { + "source_path_from_root": "/redirections/proposals/csharp-7.1/generics-pattern-match.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/patterns.md" + }, { "source_path_from_root": "/redirections/proposals/csharp-7.2/private-protected.md", "redirect_url": "/dotnet/csharp/language-reference/language-specification/classes.md#1436-access-modifiers" @@ -48,10 +64,34 @@ "source_path_from_root": "/redirections/proposals/csharp-7.3/leading-digit-separator.md", "redirect_url": "/dotnet/csharp/language-reference/language-specification/lexical-structure#6453-integer-literals" }, + { + "source_path_from_root": "/redirections/proposals/csharp-7.3/blittable.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/classes#1425-type-parameter-constraints" + }, + { + "source_path_from_root": "/redirections/proposals/csharp-7.3/indexing-movable-fixed-fields.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/unsafe-code#2283-fixed-size-buffers-in-expressions" + }, + { + "source_path_from_root": "/redirections/proposals/csharp-7.3/pattern-based-fixed.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/unsafe-code#227-the-fixed-statement" + }, + { + "source_path_from_root": "/redirections/proposals/csharp-7.3/expression-variables-in-initializers.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions.md#1117-declaration-expressions" + }, + { + "source_path_from_root": "/redirections/proposals/csharp-7.3/tuple-equality.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions.md#111211-tuple-equality-operators" + }, { "source_path_from_root": "/redirections/proposals/csharp-10.0/generic-attributes.md", "redirect_url": "/dotnet/csharp/language-reference/proposals/csharp-11.0/generic-attributes" }, + { + "source_path_from_root": "/docs/csharp/async.md", + "redirect_url": "/dotnet/csharp/asynchronous-programming" + }, { "source_path_from_root": "/docs/csharp/basic-types.md", "redirect_url": "/dotnet/csharp/fundamentals/types" @@ -88,6 +128,38 @@ "source_path_from_root": "/docs/csharp/discards.md", "redirect_url": "/dotnet/csharp/fundamentals/functional/discards" }, + { + "source_path_from_root": "/docs/csharp/expression-trees.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees" + }, + { + "source_path_from_root": "/docs/csharp/expression-classes.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/expression-classes" + }, + { + "source_path_from_root": "/docs/csharp/expression-trees-building.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/expression-trees-building" + }, + { + "source_path_from_root": "/docs/csharp/expression-trees-explained.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/expression-trees-explained" + }, + { + "source_path_from_root": "/docs/csharp/expression-trees-execution.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/expression-trees-execution" + }, + { + "source_path_from_root": "/docs/csharp/expression-trees-interpreting.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/expression-trees-interpreting" + }, + { + "source_path_from_root": "/docs/csharp/expression-trees-summary.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees" + }, + { + "source_path_from_root": "/docs/csharp/expression-trees-translating.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/expression-trees-translating" + }, { "source_path_from_root": "/docs/csharp/features.md", "redirect_url": "/dotnet/csharp/programming-guide/concepts" @@ -197,7 +269,7 @@ }, { "source_path_from_root": "/docs/csharp/interop.md", - "redirect_url": "/dotnet/csharp/programming-guide/interop/index" + "redirect_url": "/dotnet/csharp/advanced-topics/interop/index" }, { "source_path_from_root": "/docs/csharp/lambda-expressions.md", @@ -775,6 +847,10 @@ "source_path_from_root": "/docs/csharp/language-reference/keywords/ushort.md", "redirect_url": "/dotnet/csharp/language-reference/builtin-types/integral-numeric-types" }, + { + "source_path_from_root": "/docs/csharp/language-reference/keywords/using-statement.md", + "redirect_url": "/dotnet/csharp/language-reference/statements/using" + }, { "source_path_from_root": "/docs/csharp/language-reference/keywords/using-static.md", "redirect_url": "/dotnet/csharp/language-reference/keywords/using-directive" @@ -1054,7 +1130,7 @@ }, { "source_path_from_root": "/docs/csharp/language-reference/proposals/csharp-7.3/index.md", - "redirect_url": "/dotnet/csharp/language-reference/proposals/csharp-7.3/blittable" + "redirect_url": "/dotnet/csharp/language-reference/proposals/csharp-7.3/ref-local-reassignment" }, { "source_path_from_root": "/docs/csharp/language-reference/proposals/csharp-8.0/index.md", @@ -1132,6 +1208,10 @@ "source_path_from_root": "/docs/csharp/programming-guide/classes-and-structs/how-to-know-the-difference-passing-a-struct-and-passing-a-class-to-a-method.md", "redirect_url": "/dotnet/csharp/language-reference/keywords/method-parameters" }, + { + "source_path_from_root": "/docs/csharp/programming-guide/classes-and-structs/how-to-use-named-and-optional-arguments-in-office-programming.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/how-to-use-named-and-optional-arguments-in-office-programming" + }, { "source_path_from_root": "/docs/csharp/programming-guide/classes-and-structs/index.md", "redirect_url": "/dotnet/csharp/fundamentals/object-oriented" @@ -1220,35 +1300,67 @@ }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/asynchronous-programming-with-async-and-await.md", - "redirect_url": "/dotnet/csharp/async/" + "redirect_url": "/dotnet/csharp/asynchronous-programming" }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/cancel-remaining-async-tasks-after-one-is-complete.md", - "redirect_url": "/dotnet/csharp/programming-guide/concepts/async" + "redirect_url": "/dotnet/csharp/asynchronous-programming" }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/control-flow-in-async-programs.md", - "redirect_url": "/dotnet/csharp/programming-guide/concepts/async/task-asynchronous-programming-model#BKMK_WhatHappensUnderstandinganAsyncMethod" + "redirect_url": "/dotnet/csharp/asynchronous-programming/task-asynchronous-programming-model#BKMK_WhatHappensUnderstandinganAsyncMethod" }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/fine-tuning-your-async-application.md", - "redirect_url": "/dotnet/csharp/programming-guide/concepts/async" + "redirect_url": "/dotnet/csharp/asynchronous-programming" }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/handling-reentrancy-in-async-apps.md", - "redirect_url": "/dotnet/csharp/programming-guide/concepts/async" + "redirect_url": "/dotnet/csharp/asynchronous-programming" }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/how-to-extend-the-async-walkthrough-by-using-task-whenall.md", - "redirect_url": "/dotnet/csharp/programming-guide/concepts/async" + "redirect_url": "/dotnet/csharp/asynchronous-programming" }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/how-to-make-multiple-web-requests-in-parallel-by-using-async-and-await.md", - "redirect_url": "/dotnet/csharp/programming-guide/concepts/async" + "redirect_url": "/dotnet/csharp/asynchronous-programming" }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/walkthrough-accessing-the-web-by-using-async-and-await.md", - "redirect_url": "/dotnet/csharp/programming-guide/concepts/async" + "redirect_url": "/dotnet/csharp/asynchronous-programming" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/async-return-types.md", + "redirect_url": "/dotnet/csharp/asynchronous-programming/async-return-types" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/cancel-async-tasks-after-a-period-of-time.md", + "redirect_url": "/dotnet/csharp/asynchronous-programming/cancel-async-tasks-after-a-period-of-time" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/index.md", + "redirect_url": "/dotnet/csharp/asynchronous-programming/async-scenarios" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/start-multiple-async-tasks-and-process-them-as-they-complete.md", + "redirect_url": "/dotnet/csharp/asynchronous-programming/start-multiple-async-tasks-and-process-them-as-they-complete" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/task-asynchronous-programming-model.md", + "redirect_url": "/dotnet/csharp/asynchronous-programming/task-asynchronous-programming-model" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/using-async-for-file-access.md", + "redirect_url": "/dotnet/csharp/asynchronous-programming/using-async-for-file-access" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/async/cancel-an-async-task-or-a-list-of-tasks.md", + "redirect_url": "/dotnet/csharp/asynchronous-programming/cancel-an-async-task-or-a-list-of-tasks" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/attributes/index.md", + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/" }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/attributes/attributeusage.md", @@ -1258,10 +1370,46 @@ "source_path_from_root": "/docs/csharp/programming-guide/concepts/attributes/common-attributes.md", "redirect_url": "/dotnet/csharp/language-reference/attributes/global" }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/attributes/creating-custom-attributes.md", + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/creating-custom-attributes" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/attributes/accessing-attributes-by-using-reflection.md", + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/accessing-attributes-by-using-reflection" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/attributes/how-to-create-a-c-cpp-union-by-using-attributes.md", + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/how-to-create-a-c-cpp-union-by-using-attributes" + }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/caller-information.md", "redirect_url": "/dotnet/csharp/language-reference/attributes/caller-information" }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/expression-trees/index.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/index" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/expression-trees/how-to-execute-expression-trees.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/expression-trees-execution" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/expression-trees/how-to-modify-expression-trees.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/expression-trees-translating" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/expression-trees/debugging-expression-trees-in-visual-studio.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/debugging-expression-trees-in-visual-studio" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/expression-trees/debugview-syntax.md", + "redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/how-to-use-expression-trees-to-build-dynamic-queries" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/expression-trees/how-to-use-expression-trees-to-build-dynamic-queries.md", + "redirect_url": "/dotnet/csharp/advanced-topics/expression-trees/debugview-syntax" + }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/linq/adding-elements-attributes-and-nodes-to-an-xml-tree.md", "redirect_url": "/dotnet/standard/linq/add-elements-attributes-nodes-xml-tree", @@ -1621,6 +1769,11 @@ "redirect_url": "/dotnet/standard/linq/project-object-graph", "redirect_document_id": true }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/linq/how-to-query-an-assembly-s-metadata-with-reflection-linq.md", + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq", + "redirect_document_id": true + }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/linq/how-to-query-linq-to-xml-using-xpath.md", "redirect_url": "/dotnet/standard/linq/query-linq-xml-xpath", @@ -1762,7 +1915,7 @@ }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/linq/linq-and-reflection.md", - "redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/how-to-query-an-assembly-s-metadata-with-reflection-linq" + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq" }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/linq/linq-to-xml-annotations.md", @@ -2104,6 +2257,27 @@ "redirect_url": "/dotnet/csharp/fundamentals/tutorials/oop", "redirect_document_id": true }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/reflection.md", + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/", + "redirect_document_id": true + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/serialization/index.md", + "redirect_url": "/dotnet/standard/serialization/" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/serialization/how-to-read-object-data-from-an-xml-file.md", + "redirect_url": "dotnet/standard/serialization/how-to-deserialize-an-object" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/serialization/how-to-write-object-data-to-an-xml-file.md", + "redirect_url": "/dotnet/standard/serialization/how-to-serialize-an-object" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/concepts/serialization/walkthrough-persisting-an-object-in-visual-studio.md", + "redirect_url": "/dotnet/standard/serialization/system-text-json/how-to" + }, { "source_path_from_root": "/docs/csharp/programming-guide/concepts/threading/how-to-use-a-thread-pool.md", "redirect_url": "/dotnet/api/system.threading.threadpool.queueuserworkitem" @@ -2180,10 +2354,60 @@ "source_path_from_root": "/docs/csharp/programming-guide/exceptions/using-exceptions.md", "redirect_url": "/dotnet/csharp/fundamentals/exceptions/using-exceptions" }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/index.md", + "redirect_url": "/dotnet/standard/io/" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/how-to-copy-delete-and-move-files-and-folders.md", + "redirect_url": "/dotnet/standard/io/how-to-copy-directories" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/how-to-create-a-file-or-folder.md", + "redirect_url": "/dotnet/standard/io/how-to-read-and-write-to-a-newly-created-data-file" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/how-to-create-a-key-in-the-registry.md", + "redirect_url": "/dotnet/api/microsoft.win32.registry" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/how-to-get-information-about-files-folders-and-drives.md", + "redirect_url": "/dotnet/standard/io/common-i-o-tasks" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/how-to-iterate-through-a-directory-tree.md", + "redirect_url": "/dotnet/standard/io/how-to-enumerate-directories-and-files" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/how-to-provide-a-progress-dialog-box-for-file-operations.md", + "redirect_url": "dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/how-to-read-from-a-text-file.md", + "redirect_url": "dotnet/standard/io/how-to-read-text-from-a-file" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/how-to-read-a-text-file-one-line-at-a-time.md", + "redirect_url": "dotnet/standard/io/how-to-read-text-from-a-file" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/file-system/how-to-write-to-a-text-file.md", + "redirect_url": "dotnet/standard/io/how-to-write-text-to-a-file" + }, { "source_path_from_root": "/docs/csharp/programming-guide/generics/benefits-of-generics.md", "redirect_url": "/dotnet/csharp/programming-guide/generics" }, + { + "source_path_from_root": "/docs/csharp/programming-guide/generics/generics-and-attributes.md", + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/generics-and-attributes", + "redirect_document_id": true + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/generics/generics-and-reflection.md", + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/generics-and-reflection", + "redirect_document_id": true + }, { "source_path_from_root": "/docs/csharp/programming-guide/generics/default-keyword-in-generics.md", "redirect_url": "/dotnet/csharp/language-reference/operators/default", @@ -2226,8 +2450,32 @@ "redirect_url": "/dotnet/csharp/fundamentals/types/interfaces" }, { - "source_path_from_root": "/docs/csharp/programming-guide/interop/interoperability.md", - "redirect_url": "/dotnet/csharp/programming-guide/interop/index" + "source_path_from_root": "/docs/csharp/programming-guide/interop/example-com-class.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/example-com-class" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/interop/how-to-access-office-onterop-objects.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/how-to-access-office-interop-objects" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/interop/how-to-use-indexed-properties-in-com-interop-rogramming.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/how-to-use-indexed-properties-in-com-interop-programming" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/interop/how-to-use-platform-invoke-to-play-a-wave-file.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/how-to-use-platform-invoke-to-play-a-wave-file" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/interop/index.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/index" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/interop/interoperability-overview.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/index" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/interop/walkthrough-office-programming.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/walkthrough-office-programming" }, { "source_path_from_root": "/docs/csharp/programming-guide/linq-query-expressions/how-to-create-a-nested-group.md", @@ -2469,6 +2717,14 @@ "source_path_from_root": "/docs/csharp/programming-guide/types/index.md", "redirect_url": "/dotnet/csharp/fundamentals/types" }, + { + "source_path_from_root": "/docs/csharp/programming-guide/types/using-type-dynamic.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/using-type-dynamic" + }, + { + "source_path_from_root": "/docs/csharp/programming-guide/types/walkthrough-creating-and-using-dynamic-objects.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interop/walkthrough-creating-and-using-dynamic-objects" + }, { "source_path_from_root": "/docs/csharp/programming-guide/unsafe-code-pointers/arithmetic-operations-on-pointers.md", "redirect_url": "/dotnet/csharp/language-reference/operators/pointer-related-operators#pointer-arithmetic-operators" @@ -2690,7 +2946,7 @@ }, { "source_path_from_root": "/docs/csharp/reference-semantics-with-value-types.md", - "redirect_url": "/dotnet/csharp/write-safe-efficient-code" + "redirect_url": "/dotnet/csharp/advanced-topics/performance" }, { "source_path_from_root": "/docs/csharp/reflection.md", @@ -2752,9 +3008,17 @@ "source_path_from_root": "/docs/csharp/tuples.md", "redirect_url": "/dotnet/csharp/language-reference/builtin-types/value-tuples" }, + { + "source_path_from_root": "/docs/csharp/tutorials/attributes.md", + "redirect_url": "/dotnet/csharp/advanced-topics/reflection-and-attributes/attribute-tutorial" + }, { "source_path_from_root": "/docs/csharp/tutorials/default-interface-members-versions.md", - "redirect_url": "/dotnet/csharp/tutorials/default-interface-methods-versions" + "redirect_url": "/dotnet/csharp/advanced-topics/interface-implementation/default-interface-methods-versions" + }, + { + "source_path_from_root": "/docs/csharp/tutorials/default-interface-methods-versions.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interface-implementation/default-interface-methods-versions" }, { "source_path_from_root": "/docs/csharp/tutorials/exploration/csharp-6.yml", @@ -2776,6 +3040,10 @@ "source_path_from_root": "/docs/csharp/tutorials/exploration/top-level-statements.md", "redirect_url": "/dotnet/csharp/whats-new/tutorials/top-level-statements" }, + { + "source_path_from_root": "/docs/csharp/tutorials/generate-consume-asynchronous-stream.md", + "redirect_url": "/dotnet/csharp/asynchronous-programming/generate-consume-asynchronous-stream" + }, { "source_path_from_root": "/docs/csharp/tutorials/index.md", "redirect_url": "/dotnet/csharp/fundamentals/tutorials/how-to-display-command-line-arguments" @@ -2824,6 +3092,10 @@ "source_path_from_root": "/docs/csharp/tutorials/intro-to-csharp/local-environment.md", "redirect_url": "/dotnet/csharp/tour-of-csharp/tutorials/local-environment" }, + { + "source_path_from_root": "/docs/csharp/tutorials/mixins-with-default-interface-methods.md", + "redirect_url": "/dotnet/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods" + }, { "source_path_from_root": "/docs/csharp/tutorials/intro-to-csharp/numbers-in-csharp-local.md", "redirect_url": "/dotnet/csharp/tour-of-csharp/tutorials/numbers-in-csharp-local" @@ -2887,7 +3159,7 @@ }, { "source_path_from_root": "/docs/csharp/whats-new/index.md", - "redirect_url": "/dotnet/csharp/whats-new/csharp-11", + "redirect_url": "/dotnet/csharp/whats-new/csharp-12", "ms.custom": "updateeachrelease" }, { @@ -2896,15 +3168,15 @@ }, { "source_path_from_root": "/docs/csharp/whats-new/tutorials/default-interface-methods-versions.md", - "redirect_url": "/dotnet/csharp/tutorials/default-interface-methods-versions" + "redirect_url": "/dotnet/csharp/advanced-topics/interface-implementation/default-interface-methods-versions" }, { "source_path_from_root": "/docs/csharp/whats-new/tutorials/generate-consume-asynchronous-stream.md", - "redirect_url": "/dotnet/csharp/tutorials/generate-consume-asynchronous-stream" + "redirect_url": "/dotnet/csharp/asynchronous-programming/generate-consume-asynchronous-stream" }, { "source_path_from_root": "/docs/csharp/whats-new/tutorials/mixins-with-default-interface-methods.md", - "redirect_url": "/dotnet/csharp/tutorials/mixins-with-default-interface-methods" + "redirect_url": "/dotnet/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods" }, { "source_path_from_root": "/docs/csharp/whats-new/tutorials/nullable-reference-types.md", @@ -2913,6 +3185,10 @@ { "source_path_from_root": "/docs/csharp/whats-new/tutorials/ranges-indexes.md", "redirect_url": "/dotnet/csharp/tutorials/ranges-indexes" + }, + { + "source_path_from_root": "/docs/csharp/write-safe-efficient-code.md", + "redirect_url": "/dotnet/csharp/advanced-topics/performance" } ] } diff --git a/.openpublishing.redirection.framework.json b/.openpublishing.redirection.framework.json index ff942f903ed8b..fbe9166021709 100644 --- a/.openpublishing.redirection.framework.json +++ b/.openpublishing.redirection.framework.json @@ -1689,6 +1689,16 @@ "source_path_from_root": "/docs/framework/wcf/feature-details/controlling-serialization-and-deserialization-with-serializationbinder.md", "redirect_url": "/dotnet/framework/wcf/feature-details/data-transfer-and-serialization" }, + { + "source_path_from_root": "/docs/framework/wcf/feature-details/diff-in-queue-in-vista-server-2003-windows-xp.md", + "redirect_url": "/previous-versions/dotnet/framework/wcf/feature-details/queuing-differences-windows-vista", + "redirect_document_id": false + }, + { + "source_path_from_root": "/docs/framework/wcf/feature-details/diff-service-certificate-validation-ie-and-wcf.md", + "redirect_url": "/previous-versions/dotnet/framework/wcf/feature-details/service-cert-validation-differences", + "redirect_document_id": false + }, { "source_path_from_root": "/docs/framework/wcf/feature-details/how-to-create-a-workflow-service-that-calls-another-workflow-service.md", "redirect_url": "/previous-versions/dotnet/netframework-4.0/ff729672(v=vs.100)" diff --git a/.openpublishing.redirection.fundamentals.json b/.openpublishing.redirection.fundamentals.json index 699bd2fac6ad9..e2f05647cb7cd 100644 --- a/.openpublishing.redirection.fundamentals.json +++ b/.openpublishing.redirection.fundamentals.json @@ -119,6 +119,10 @@ { "source_path_from_root": "/docs/fundamentals/syslib-diagnostics/syslib1004.md", "redirect_url": "/dotnet/fundamentals/syslib-diagnostics/syslib1001" + }, + { + "source_path_from_root": "/docs/fundamentals/tools-and-productivity.md", + "redirect_url": "/dotnet/toc/tools-diagnostics/index" } ] } diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index 0370d7eac7b68..809da45e8afc8 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -68,6 +68,30 @@ "source_path_from_root": "/docs/standard/about.md", "redirect_url": "/dotnet/fundamentals/" }, + { + "source_path_from_root": "/docs/toc/advanced-programming/index.yml", + "redirect_url": "/dotnet/navigate/advanced-programming/" + }, + { + "source_path_from_root": "/docs/toc/data-access/index.yml", + "redirect_url": "/dotnet/navigate/data-access/" + }, + { + "source_path_from_root": "/docs/toc/devops-testing/index.yml", + "redirect_url": "/dotnet/navigate/devops-testing/" + }, + { + "source_path_from_root": "/docs/toc/migration-guide/index.yml", + "redirect_url": "/dotnet/navigate/migration-guide/" + }, + { + "source_path_from_root": "/docs/toc/security/index.yml", + "redirect_url": "/dotnet/navigate/security/" + }, + { + "source_path_from_root": "/docs/toc/tools-diagnostics/index.yml", + "redirect_url": "/dotnet/navigate/tools-diagnostics/" + }, { "source_path_from_root": "/docs/tutorials/getting-started-with-csharp/microservices.md", "redirect_url": "/dotnet/core/docker/" diff --git a/.openpublishing.redirection.orleans.json b/.openpublishing.redirection.orleans.json index f57b61f6ac10a..4a3fb8f6a0434 100644 --- a/.openpublishing.redirection.orleans.json +++ b/.openpublishing.redirection.orleans.json @@ -7,6 +7,10 @@ { "source_path_from_root": "/docs/orleans/deployment/azure-web-apps-with-azure-cloud-services.md", "redirect_url": "/dotnet/orleans/deployment/deploy-to-azure-app-service" + }, + { + "source_path_from_root": "/docs/orleans/whats-new-in-orleans.md", + "redirect_url": "/dotnet/orleans/migration-guide" } ] } \ No newline at end of file diff --git a/.openpublishing.redirection.standard.json b/.openpublishing.redirection.standard.json index 7916d4fad0e0f..f8637cab64d7c 100644 --- a/.openpublishing.redirection.standard.json +++ b/.openpublishing.redirection.standard.json @@ -583,15 +583,15 @@ }, { "source_path_from_root": "/docs/standard/serialization/marshal-by-value.md", - "redirect_url": "/dotnet/standard/serialization/serialization-concepts" + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/serialization-concepts" }, { "source_path_from_root": "/docs/standard/serialization/persistent-storage.md", - "redirect_url": "/dotnet/standard/serialization/serialization-concepts" + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/serialization-concepts" }, { "source_path_from_root": "/docs/standard/serialization/samples-binary.md", - "redirect_url": "/dotnet/standard/serialization/binary-serialization" + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization" }, { "source_path_from_root": "/docs/standard/serialization/samples-xml.md", @@ -599,7 +599,7 @@ }, { "source_path_from_root": "/docs/standard/serialization/schemaimporterextension-technology-sample.md", - "redirect_url": "/dotnet/standard/serialization/binary-serialization" + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization" }, { "source_path_from_root": "/docs/standard/serialization/serialization-how-to-topics.md", @@ -615,11 +615,11 @@ }, { "source_path_from_root": "/docs/standard/serialization/version-tolerant-serialization-technology-sample.md", - "redirect_url": "/dotnet/standard/serialization/binary-serialization" + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization" }, { "source_path_from_root": "/docs/standard/serialization/web-services-generics-serialization-technology-sample.md", - "redirect_url": "/dotnet/standard/serialization/binary-serialization" + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization" }, { "source_path_from_root": "/docs/standard/serialization/web-services-ixmlserializable-technology-sample.md", @@ -628,7 +628,7 @@ { "source_path_from_root": "/docs/standard/serialization/write-custom-serializer-deserializer.md", "redirect_url": "/dotnet/standard/serialization/system-text-json/use-dom-utf8jsonreader-utf8jsonwriter" - }, + }, { "source_path_from_root": "/docs/standard/serialization/system-text-json-character-casing.md", "redirect_url": "/dotnet/standard/serialization/system-text-json/character-casing", @@ -719,6 +719,51 @@ "redirect_url": "/dotnet/standard/serialization/system-text-json/use-dom-utf8jsonreader-utf8jsonwriter", "redirect_document_id": true }, + { + "source_path": "docs/standard/serialization/binary-serialization.md", + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization", + "redirect_document_id": false + }, + { + "source_path": "docs/standard/serialization/binaryformatter-event-source.md", + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/binaryformatter-event-source", + "redirect_document_id": false + }, + { + "source_path": "docs/standard/serialization/serialization-concepts.md", + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/serialization-concepts", + "redirect_document_id": false + }, + { + "source_path": "docs/standard/serialization/basic-serialization.md", + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/basic-serialization", + "redirect_document_id": false + }, + { + "source_path": "docs/standard/serialization/selective-serialization.md", + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/selective-serialization", + "redirect_document_id": false + }, + { + "source_path": "docs/standard/serialization/custom-serialization.md", + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/custom-serialization", + "redirect_document_id": false + }, + { + "source_path": "docs/standard/serialization/steps-in-the-serialization-process.md", + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/steps-in-the-serialization-process", + "redirect_document_id": false + }, + { + "source_path": "docs/standard/serialization/version-tolerant-serialization.md", + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/binary/version-tolerant-serialization", + "redirect_document_id": false + }, + { + "source_path": "docs/standard/serialization/serialization-guidelines.md", + "redirect_url": "/previous-versions/dotnet/fundamentals/serialization/serialization-guidelines", + "redirect_document_id": false + }, { "source_path_from_root": "/docs/standard/threading/autoresetevent.md", "redirect_url": "/dotnet/api/system.threading.autoresetevent" diff --git a/.repoman.yml b/.repoman.yml index b407198ddcb53..1bd416a4ac027 100644 --- a/.repoman.yml +++ b/.repoman.yml @@ -221,7 +221,7 @@ pull_request: - path: "(?i).*docs\/csharp\/programming-guide\/concepts\/expression-trees.*" run: - labels-add: ["dotnet-csharp/prod", "csharp-advanced-concepts/tech"] - - path: "(?i).*docs\/csharp\/programming-guide\/concepts\/async.*" + - path: "(?i).*docs\/csharp\/asynchronous-programming\/.*" run: - labels-add: ["dotnet-csharp/prod", "csharp-async/tech"] - path: "(?i).*docs\/csharp\/programming-guide\/concepts\/linq.*" diff --git a/.whatsnew.json b/.whatsnew.json index 7c426b6a1177c..2ee2dbbc68a73 100644 --- a/.whatsnew.json +++ b/.whatsnew.json @@ -46,6 +46,47 @@ "names": [ "core/compatibility" ], "heading": ".NET breaking changes" }, + { + "names": [ "standard/linq", "standard/data" ], + "heading": "Data access in .NET" + }, + { + "names": [ "devops", + "core/testing", + "core/deploying", + "core/docker" + ], + "heading": "DevOps and testing in .NET" + }, + { + "names": [ "core/porting" ], + "heading": "Migration to .NET" + }, + { + "names": [ "standard/security" ], + "heading": ".NET security" + }, + { + "names": [ "core/tools", + "core/additional-tools", + "core/diagnostics", + "fundamentals/code-analysis", + "standard/analyzers", + "fundamentals/syslib-diagnostics", + "fundamentals/package-validation" + ], + "heading": ".NET tools and diagnostics" + }, + { + "names": [ "standard/asynchronous-programming-patterns", + "standard/parallel-programming", + "standard/threading", + "standard/collections/thread-safe", + "standard/native-interop", + "standard/garbage-collection" + ], + "heading": "Advanced .NET programming" + }, { "names": [ "core", "fundamentals", "standard" ], "heading": ".NET fundamentals" diff --git a/docfx.json b/docfx.json index 84841c52cd9b8..d1d0ceb2ebfe9 100644 --- a/docfx.json +++ b/docfx.json @@ -1,21 +1,26 @@ { "build": { - "markdownEngineName": "markdig", - "markdownEngineProperties": { - "markdigExtensions": [ - "abbreviations", - "definitionlists", - "tasklists", - "footnotes", - "diagrams" - ] + "markdownEngineName": "markdig", + "markdownEngineProperties": { + "markdigExtensions": [ + "abbreviations", + "definitionlists", + "tasklists", + "footnotes", + "diagrams" + ] }, "content": [ { - "files": ["api/**/*.md"] + "files": [ + "api/**/*.md" + ] }, { - "files": ["**/*.md", "**/*.yml"], + "files": [ + "**/*.md", + "**/*.yml" + ], "src": "docs", "dest": ".", "exclude": [ @@ -27,25 +32,31 @@ ] }, { - "files": ["**/*.md"], + "files": [ + "**/*.md" + ], "src": "_csharpstandard/standard", "dest": "csharp/language-reference/language-specification" }, { - "files": ["**/*.md"], + "files": [ + "**/*.md" + ], "src": "redirections/proposals", "dest": "csharp/language-reference/proposals" }, { "files": [ "csharp-7.0/*.md", - "csharp-7.1/*.md", "csharp-7.2/*.md", "csharp-7.3/*.md", "csharp-8.0/*.md", "csharp-9.0/*.md", "csharp-10.0/*.md", - "csharp-11.0/*.md" + "csharp-11.0/*.md", + "primary-constructors.md", + "using-alias-types.md", + "lambda-method-group-defaults.md" ], "src": "_csharplang/proposals", "dest": "csharp/language-reference/proposals", @@ -62,8 +73,9 @@ "csharp-7.0/throw-expression.md", "csharp-7.0/tuples.md", "csharp-7.0/value-task.md", - "csharp-7.1/async-main.md", - "csharp-7.1/target-typed-default.md", + "csharp-7.0/out-var.md", + "csharp-7.0/pattern-matching.md", + "csharp-7.2/leading-separator.md", "csharp-7.2/readonly-struct.md", "csharp-7.2/ref-struct-and-span.md", @@ -75,6 +87,11 @@ "csharp-7.3/enum-delegate-constraints.md", "csharp-7.3/improved-overload-candidates.md", "csharp-7.3/ref-loops.md", + "csharp-7.3/blittable.md", + "csharp-7.3/indexing-movable-fixed-fields.md", + "csharp-7.3/pattern-based-fixed.md", + "csharp-7.3/expression-variables-in-initializers.md", + "csharp-7.3/tuple-equality.md", "csharp-8.0/alternative-interpolated-verbatim.md", "csharp-8.0/async-using.md", "csharp-8.0/constraints-in-overrides.md", @@ -87,17 +104,24 @@ ] }, { - "files": ["Compiler Breaking Changes - DotNet 7.md"], + "files": [ + "Compiler Breaking Changes - DotNet 7.md" + ], "src": "_roslyn/docs/compilers/CSharp", "dest": "csharp/whats-new/breaking-changes", - "exclude": [ - ] + "exclude": [] }, { - "files": ["**/*.md"], + "files": [ + "**/*.md" + ], "src": "_vblang/spec", "dest": "visual-basic/reference/language-specification", - "exclude": ["README.md", "LICENSE.md", "**/includes/**"] + "exclude": [ + "README.md", + "LICENSE.md", + "**/includes/**" + ] } ], "resource": [ @@ -125,11 +149,9 @@ "exclude": [ "_csharplang/proposals/csharp-7.0/local-functions.md", "_csharplang/proposals/csharp-7.0/throw-expression.md", - "_csharplang/proposals/csharp-7.0/throw-expression.md", "_csharplang/proposals/csharp-7.1/target-typed-default.md", "_csharplang/proposals/csharp-7.2/readonly-struct.md", - "_csharplang/proposals/csharp-7.2/non-trailing-named-arguments.md", - "_csharplang/proposals/csharp-7.3/blittable.md" + "_csharplang/proposals/csharp-7.2/non-trailing-named-arguments.md" ] } }, @@ -137,8 +159,12 @@ "apiPlatform": "dotnet", "author": "dotnet-bot", "breadcrumb_path": "/dotnet/breadcrumb/toc.json", - "dev_langs": ["csharp"], - "featureFlags": ["enable_uhf_ppe"], + "dev_langs": [ + "csharp" + ], + "featureFlags": [ + "enable_uhf_ppe" + ], "feedback_system": "GitHub", "feedback_github_repo": "dotnet/docs", "feedback_product_url": "https://aka.ms/feedback/report?space=61", @@ -147,10 +173,14 @@ "ms.prod": "dotnet", "ms.topic": "conceptual", "recommendations": true, - "searchScope": [".NET"], + "searchScope": [ + ".NET" + ], "show_latex": true, "uhfHeaderId": "MSDocsHeader-DotNet", - "_displayLangs": ["csharp"], + "_displayLangs": [ + "csharp" + ], "_op_documentIdPathDepotMapping": { "docs/architecture/containerized-lifecycle/": { "folder_relative_path_in_docset": "docs/standard/containerized-lifecycle-architecture/" @@ -235,12 +265,11 @@ "docs/core/tutorials/**.md": "tutorial", "docs/csharp/getting-started/**/*.md": "overview", "docs/csharp/how-to/**/*.md": "how-to", - "docs/csharp/language-reference/**/*.md": "reference", + "docs/csharp/language-reference/**/*.md": "language-reference", "docs/csharp/language-reference/compiler-messages/*.md": "error-reference", "docs/csharp/linq/*.md": "how-to", "docs/csharp/misc/*.md": "error-reference", "docs/csharp/programming-guide/**": "conceptual", - "docs/csharp/programming-guide/xmldoc/**": "reference", "docs/csharp/roslyn-sdk/get-started/*.md": "tutorial", "docs/csharp/roslyn-sdk/tutorials/*.md": "tutorial", "docs/csharp/tour-of-csharp/tutorials/**": "tutorial", @@ -271,8 +300,8 @@ "docs/standard/**/*how-to*.md": "how-to", "docs/standard/base-types/*.md": "how-to", "docs/standard/data/sqlite/*.md": "reference", - "docs/visual-basic/language-reference/**/*.md": "reference", - "docs/visual-basic/reference/**/*.md": "reference", + "docs/visual-basic/language-reference/**/*.md": "language-reference", + "docs/visual-basic/reference/**/*.md": "language-reference", "docs/visual-basic/misc/bc*.md": "error-reference", "docs/visual-basic/**/troubleshooting*.md": "troubleshooting", "docs/whats-new/**/**.md": "reference", @@ -284,8 +313,12 @@ "includes/**/**.md": "include" }, "dev_langs": { - "docs/fsharp/**/**.md": ["fsharp"], - "docs/visual-basic/**/**.md": ["vb"] + "docs/fsharp/**/**.md": [ + "fsharp" + ], + "docs/visual-basic/**/**.md": [ + "vb" + ] }, "ms.devlang": { "docs/csharp/**/*.*": "csharp", @@ -293,9 +326,9 @@ "docs/visual-basic/**/**.md": "vb" }, "author": { - "docs/azure/**/*.*": "alexwolf", + "docs/azure/**/*.*": "alexwolfmsft", "docs/orleans/**/*.*": "IEvangelist", - "docs/architecture/**/**.md": "nishanil", + "docs/architecture/**/**.md": "jamesmontemagno", "docs/architecture/grpc-for-wcf-developers/**/**.md": "JamesNK", "docs/architecture/modernize-desktop/**/**.md": "OliaG", "docs/core/**/**.md": "gewarren", @@ -385,10 +418,10 @@ "_csharpstandard/**/*.md": "wiwagn", "_roslyn/docs/compilers/CSharp/*.md": "wiwagn", "_vblang/spec/*.md": "wiwagn", - "docs/architecture/**/**.md": "nanil", + "docs/architecture/**/**.md": "jamont", "docs/architecture/grpc-for-wcf-developers/**/**.md": "jamesnk", "docs/architecture/modernize-desktop/**/**.md": "oliag", - "docs/azure/**/*.*": "casoper", + "docs/azure/**/*.*": "alexwolf", "docs/orleans/**/*.*": "dapine", "docs/core/**/**.md": "dotnetcontent", "docs/core/compatibility/**/**.md": "gewarren", @@ -473,14 +506,14 @@ "ms.date": { "_csharpstandard/standard/*.md": "01/10/2021", "_csharplang/proposals/csharp-7.0/*.md": "08/13/2018", - "_csharplang/proposals/csharp-7.1/*.md": "02/16/2018", "_csharplang/proposals/csharp-7.2/*.md": "01/19/2019", "_csharplang/proposals/csharp-7.3/*.md": "11/25/2018", "_csharplang/proposals/csharp-8.0/*.md": "09/10/2019", "_csharplang/proposals/csharp-9.0/*.md": "07/29/2020", "_csharplang/proposals/csharp-10.0/*.md": "08/07/2021", "_csharplang/proposals/csharp-11.0/*.md": "09/30/2022", - "_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "09/30/2022", + "_csharplang/proposals/*.md": "04/03/2023", + "_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "11/08/2022", "_vblang/spec/*.md": "07/21/2017" }, "ms.technology": { @@ -501,20 +534,20 @@ "docs/csharp/how-to/**/**.md": "csharp-fundamentals", "docs/csharp/linq/**/**.md": "csharp-linq", "docs/csharp/fundamentals/**/**.md": "csharp-fundamentals", + "docs/csharp/asynchronous-programming/**/**.md": "csharp-async", + "docs/csharp/advanced-topics/**/**.md": "csharp-advanced-concepts", "docs/csharp/language-reference/unsafe-code.md": "csharp-advanced-concepts", "docs/csharp/programming-guide/indexers/**/**.md": "csharp-fundamentals", "docs/csharp/programming-guide/generics/**/**.md": "csharp-fundamentals", "docs/csharp/programming-guide/strings/**/**.md": "csharp-fundamentals", "docs/csharp/programming-guide/types/**/**.md": "csharp-fundamentals", "docs/csharp/programming-guide/statements-expressions-operators/**/**.md": "csharp-fundamentals", - "docs/csharp/programming-guide/interop/**/**.md": "csharp-advanced-concepts", "docs/csharp/programming-guide/exceptions/**/**.md": "csharp-fundamentals", "docs/csharp/programming-guide/namespaces/**/**.md": "csharp-fundamentals", "docs/csharp/programming-guide/arrays/**/**.md": "csharp-fundamentals", "docs/csharp/programming-guide/concepts/covariance-contravariance/**/**.md": "csharp-advanced-concepts", "docs/csharp/programming-guide/concepts/serialization/**/**.md": "csharp-fundamentals", "docs/csharp/programming-guide/concepts/expression-trees/**/**.md": "csharp-advanced-concepts", - "docs/csharp/programming-guide/concepts/async/**/**.md": "csharp-async", "docs/csharp/programming-guide/concepts/linq/**/**.md": "csharp-linq", "docs/csharp/programming-guide/concepts/attributes/**/**.md": "csharp-fundamentals", "docs/csharp/programming-guide/xmldoc/**/**.md": "csharp-fundamentals", @@ -602,6 +635,7 @@ "_csharpstandard/standard/types.md": "Types", "_csharpstandard/standard/variables.md": "Variables", "_csharpstandard/standard/conversions.md": "Conversions", + "_csharpstandard/standard/patterns.md": "Patterns and pattern matching", "_csharpstandard/standard/expressions.md": "Expressions", "_csharpstandard/standard/statements.md": "Statements", "_csharpstandard/standard/namespaces.md": "Namespaces", @@ -619,32 +653,12 @@ "_csharpstandard/standard/standard-library.md": "Standard library", "_csharpstandard/standard/documentation-comments.md": "Documentation comments", "_csharpstandard/standard/Bibliography.md": "Bibliography", - - "_csharplang/proposals/csharp-7.0/pattern-matching.md": "Pattern matching", - "_csharplang/proposals/csharp-7.0/out-var.md": "Out variable declarations", - "_csharplang/proposals/csharp-7.0/binary-literals.md": "Binary literals", - "_csharplang/proposals/csharp-7.0/digit-separators.md": "Digit separators", "_csharplang/proposals/csharp-7.0/task-types.md": "Async task types", - - "_csharplang/proposals/csharp-7.1/target-typed-default.md": "Default expressions", - "_csharplang/proposals/csharp-7.1/infer-tuple-names.md": "Infer tuple member names", - "_csharplang/proposals/csharp-7.1/generics-pattern-match.md": "Pattern matching with generics", - "_csharplang/proposals/csharp-7.2/readonly-ref.md": "Readonly references", "_csharplang/proposals/csharp-7.2/span-safety.md": "Compile time safety for ref-like types", - "_csharplang/proposals/csharp-7.2/non-trailing-named-arguments.md": "Non-trailing named arguments", - "_csharplang/proposals/csharp-7.2/private-protected.md": "Private protected", "_csharplang/proposals/csharp-7.2/conditional-ref.md": "Conditional ref", - "_csharplang/proposals/csharp-7.2/leading-separator.md": "Leading digit separator", - - "_csharplang/proposals/csharp-7.3/blittable.md": "Unmanaged generic type constraints", - "_csharplang/proposals/csharp-7.3/indexing-movable-fixed-fields.md": "Indexing fixed fields without pinning regardless of context", - "_csharplang/proposals/csharp-7.3/pattern-based-fixed.md": "Pattern-based fixed statement", "_csharplang/proposals/csharp-7.3/ref-local-reassignment.md": "Ref local reassignment", "_csharplang/proposals/csharp-7.3/stackalloc-array-initializers.md": "Stackalloc array initializers", - "_csharplang/proposals/csharp-7.3/expression-variables-in-initializers.md": "Expression variables in initializers", - "_csharplang/proposals/csharp-7.3/tuple-equality.md": "Tuple equality (==) and inequality (!=)", - "_csharplang/proposals/csharp-8.0/nullable-reference-types.md": "Null reference types - proposal", "_csharplang/proposals/csharp-8.0/patterns.md": "Recursive pattern matching", "_csharplang/proposals/csharp-8.0/default-interface-methods.md": "Default interface methods", @@ -655,7 +669,6 @@ "_csharplang/proposals/csharp-8.0/readonly-instance-members.md": "Readonly instance members", "_csharplang/proposals/csharp-8.0/static-local-functions.md": "Static local functions", "_csharplang/proposals/csharp-8.0/nested-stackalloc.md": "Nested stackalloc expressions", - "_csharplang/proposals/csharp-9.0/covariant-returns.md": "Covariant return types", "_csharplang/proposals/csharp-9.0/extending-partial-methods.md": "Extending partial methods", "_csharplang/proposals/csharp-9.0/extension-getenumerator.md": "Extension GetEnumerator support in foreach", @@ -674,7 +687,6 @@ "_csharplang/proposals/csharp-9.0/target-typed-new.md": "Target-typed new expressions", "_csharplang/proposals/csharp-9.0/top-level-statements.md": "Top-level statements", "_csharplang/proposals/csharp-9.0/unconstrained-type-parameter-annotations.md": "Unconstrained type parameter annotations", - "_csharplang/proposals/csharp-10.0/record-structs.md": "Record structs", "_csharplang/proposals/csharp-10.0/parameterless-struct-constructors.md": "Parameterless struct constructors", "_csharplang/proposals/csharp-10.0/GlobalUsingDirective.md": "Global using directive", @@ -688,7 +700,6 @@ "_csharplang/proposals/csharp-10.0/enhanced-line-directives.md": "Enhanced #line directives", "_csharplang/proposals/csharp-10.0/improved-definite-assignment.md": "Improved definite assignment analysis", "_csharplang/proposals/csharp-10.0/async-method-builders.md": "AsyncMethodBuilder override", - "_csharplang/proposals/csharp-11.0/generic-attributes.md": "Generic attributes", "_csharplang/proposals/csharp-11.0/auto-default-structs.md": "Auto-default struct", "_csharplang/proposals/csharp-11.0/checked-user-defined-operators.md": "Checked user defined operators", @@ -706,8 +717,11 @@ "_csharplang/proposals/csharp-11.0/unsigned-right-shift-operator.md": "Unsigned right shift operator", "_csharplang/proposals/csharp-11.0/utf8-string-literals.md": "UTF-8 string literals", - "_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "C# compiler breaking changes since C# 10", + "_csharplang/proposals/primary-constructors.md": "Primary constructors", + "_csharplang/proposals/using-alias-types.md": "Alias any type", + "_csharplang/proposals/lambda-method-group-defaults.md": "Optional and parameter array parameters for lambdas and method groups", + "_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "C# compiler breaking changes since C# 10", "_vblang/spec/introduction.md": "Introduction", "_vblang/spec/lexical-grammar.md": "Lexical grammar", "_vblang/spec/preprocessing-directives.md": "Preprocessing directives", @@ -737,6 +751,7 @@ "_csharpstandard/standard/types.md": "This chapter defines value types, reference types, generic types and other program entities. Concepts such as assemblies, namespaces, classes, interfaces and structs are defined.", "_csharpstandard/standard/variables.md": "This chapter covers variable categories, default values, definite assignment, and variable references.", "_csharpstandard/standard/conversions.md": "This chapter covers the possible conversions from one type to another in C#. Builtin conversions, user defined conversions, implicit and explicit conversions are defined.", + "_csharpstandard/standard/patterns.md": "This chapter covers patterns and patttern matching. A pattern is a syntactic form that can be tested against an expression. Control flow can be achieved by matching against different patterns.", "_csharpstandard/standard/expressions.md": "This chapter covers operators and expressions. Expressions form several groups, including primary expressions, unary operators, arithmetic operators, relational and type testing operators, and logical operators.", "_csharpstandard/standard/statements.md": "This chapter covers statements in C#. Each statement is defined, as are statement blocks, statement reachability, and end points.", "_csharpstandard/standard/namespaces.md": "This chapter defines namespaces, including how to declare them and how to use them.", @@ -754,32 +769,12 @@ "_csharpstandard/standard/standard-library.md": "This appendix lists requirements of the standard library. The C# language relies on these types for some of its behavior.", "_csharpstandard/standard/documentation-comments.md": "This appendix describes XML comments that are used to document your program.", "_csharpstandard/standard/Bibliography.md": "This appendix lists external standards referenced in this specification.", - - "_csharplang/proposals/csharp-7.0/pattern-matching.md": "This feature specification describes the pattern matching featues added in C# 7.0. Note that future releases built on this initial set of features.", - "_csharplang/proposals/csharp-7.0/out-var.md": "This feature specification describes syntax enhancements that enable declaring 'out' variables in the expression where they are used.", - "_csharplang/proposals/csharp-7.0/binary-literals.md": "This feature specification describes the syntax to declare binary literals for integral constants.", - "_csharplang/proposals/csharp-7.0/digit-separators.md": "This feature specification describes the syntax to allow separators between groups of digits in numeric literals.", "_csharplang/proposals/csharp-7.0/task-types.md": "This feature specification describes the syntax to support async return types that match a pattern, rather than restricting them to Task.", - - "_csharplang/proposals/csharp-7.1/target-typed-default.md": "This feature specification describes the syntax to use the default keyword where the type of the expression can be inferred by the compiler.", - "_csharplang/proposals/csharp-7.1/infer-tuple-names.md": "This feature specification describes how the compiler interprets and infers the members names in a tuple.", - "_csharplang/proposals/csharp-7.1/generics-pattern-match.md": "This feature specification describes syntax enhancements to enable pattern matching with generic types.", - "_csharplang/proposals/csharp-7.2/readonly-ref.md": "This feature specification describes how to create readonly references to variables. This includes the 'readonly' modifier on variables, and the 'in' modifier on parameters and arguments.", "_csharplang/proposals/csharp-7.2/span-safety.md": "This feature specification describes the rules that govern 'ref struct' declarations and their use.", - "_csharplang/proposals/csharp-7.2/non-trailing-named-arguments.md": "This feature specification describes syntax enhancements that enable named arguments followed by positional arguments in a method call.", - "_csharplang/proposals/csharp-7.2/private-protected.md": "This feature specification describes the 'private protected' access modifier.", "_csharplang/proposals/csharp-7.2/conditional-ref.md": "This feature specification describes the syntax enhancements for using 'ref' with '?:' expressions", - "_csharplang/proposals/csharp-7.2/leading-separator.md": "This feature specification describes syntax enhancements to support a leading digit separator in numeric literals.", - - "_csharplang/proposals/csharp-7.3/blittable.md": "This feature specification describes the 'unmanaged' generic type constraint. That forces the type argument to be an unmanaged type.", - "_csharplang/proposals/csharp-7.3/indexing-movable-fixed-fields.md": "This feature specification describes syntax enhancement to support indexing fixed fields without pinning the memory, regardless of context.", - "_csharplang/proposals/csharp-7.3/pattern-based-fixed.md": "This feature specification describes syntax enhancements to enable more types to be the target of a fixed statement.", "_csharplang/proposals/csharp-7.3/ref-local-reassignment.md": "This feature specification describes syntax enhancements that enable ref local variables to be assigned to refer to different storage after being initialized.", "_csharplang/proposals/csharp-7.3/stackalloc-array-initializers.md": "This feature specification describes the syntax that enables arrays to be declared using the 'stackalloc' keyword.", - "_csharplang/proposals/csharp-7.3/expression-variables-in-initializers.md": "This feature specification enables declarations of 'out' variables in more locations.", - "_csharplang/proposals/csharp-7.3/tuple-equality.md": "This feature specification describes the rules governing tuple equality (==) and inequality (!=).", - "_csharplang/proposals/csharp-8.0/nullable-reference-types.md": "This feature specification describes nullable reference types.", "_csharplang/proposals/csharp-8.0/patterns.md": "This feature specification describes recursive pattern matching, where patterns can nest inside other patterns.", "_csharplang/proposals/csharp-8.0/default-interface-methods.md": "This feature specification describe the syntax updates necessary to support default interface methods. This includes declaring bodies in interface declarations, and supporting modifiers on declarations.", @@ -790,7 +785,6 @@ "_csharplang/proposals/csharp-8.0/readonly-instance-members.md": "This feature specification describes the syntax for declaring and using readonly instance members.", "_csharplang/proposals/csharp-8.0/static-local-functions.md": "This feature specification describes static local functions, which are local functions that cannot access variables in the enclosing scope.", "_csharplang/proposals/csharp-8.0/nested-stackalloc.md": "This feature specification describes nested stackalloc expressions, which provides nested arrays of stackalloc storage.", - "_csharplang/proposals/csharp-9.0/covariant-returns.md": "This feature specification describes covariant return types, where overriding member declarations can return a type derived from the overridden member declaration.", "_csharplang/proposals/csharp-9.0/extending-partial-methods.md": "This feature specification describes extensions to partial methods. These extensions enable source generators to create or call partial methods.", "_csharplang/proposals/csharp-9.0/extension-getenumerator.md": "This feature specification describes the necessary pattern for an extension method to provide the GetEnumerator support in a foreach loop.", @@ -809,7 +803,6 @@ "_csharplang/proposals/csharp-9.0/target-typed-new.md": "This feature specification describes the enhancements to 'new' where the target type can be inferred from the variable declaration.", "_csharplang/proposals/csharp-9.0/top-level-statements.md": "This feature specification describes top-level statements, which are program statements that replace the typical 'Main' method enclosed in a startup class.", "_csharplang/proposals/csharp-9.0/unconstrained-type-parameter-annotations.md": "This feature specification unconstrained type parameter annotations. This enables 'T?' to be used where 'T' is not constrained to be either a value type or a reference type.", - "_csharplang/proposals/csharp-10.0/record-structs.md": "This feature specification describes record structs, which are structs where the compiler generates methods similar to those for record classes.", "_csharplang/proposals/csharp-10.0/parameterless-struct-constructors.md": "This feature specification parameterless struct constructors, which can now be declared for structs. The rules for when they are called describe behavior in arrays and other variable declarations.", "_csharplang/proposals/csharp-10.0/GlobalUsingDirective.md": "This feature specification describes global using directives, which add a using directive to every file compiled as part of an assembly.", @@ -823,7 +816,6 @@ "_csharplang/proposals/csharp-10.0/enhanced-line-directives.md": "This feature specification describes updates to the #line directive. These enhancements support scenarios like Razor where the Razor engine wants more control over the line number so that it maps to your source rather than the generated file.", "_csharplang/proposals/csharp-10.0/improved-definite-assignment.md": "This feature specification describes updates to the rules for definite assignment analysis. The result is more accurate warnings for when a variable may not be definitely assigned, or may not be null.", "_csharplang/proposals/csharp-10.0/async-method-builders.md": "This feature specification describes new rules to enable types to override the default AsyncMethodBuilder. This will be used by the runtime for performance improvements.", - "_csharplang/proposals/csharp-11.0/generic-attributes.md": "This feature specification describes generic attributes, where a generic class may derive from 'System.Attribute'.", "_csharplang/proposals/csharp-11.0/auto-default-structs.md": "This feature updates the rules for struct initialization and default values. This feature standardizes the behavior for default struct values and newly initialized structs.", "_csharplang/proposals/csharp-11.0/checked-user-defined-operators.md": "This feature enables checked and unchecked alternatives for some operators.", @@ -841,8 +833,11 @@ "_csharplang/proposals/csharp-11.0/unsigned-right-shift-operator.md": "This feature defines a logical right-shift operator, `>>>`. The logical right shift operator always shifts in 0 values in the left-most bits during a shift.", "_csharplang/proposals/csharp-11.0/utf8-string-literals.md": "This feature enables the `u8` suffix on a string literal. The `u8` suffix instructs the compiler to convert the UTF-8 string literal to a `ReadOnlySpan`.", - "_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "Learn about any breaking changes since the initial release of C# 10", + "_csharplang/proposals/primary-constructors.md": "Primary constructors put the parameters of one constructor in scope for the whole class or struct to be used for initialization or directly as object state. The trade-off is that any other constructors must call through the primary constructor.", + "_csharplang/proposals/using-alias-types.md": "Using directives can alias any type, not just named types. You can create aliases for tuple types, generics and more.", + "_csharplang/proposals/lambda-method-group-defaults.md": "Lambda expressions can now declare default parameters and params arrays parameters.", + "_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "Learn about any breaking changes since the initial release of C# 10", "_vblang/spec/introduction.md": "This chapter provides and introduction to the Visual Basic language.", "_vblang/spec/lexical-grammar.md": "This chapter defines the lexical grammar for Visual Basic.", "_vblang/spec/preprocessing-directives.md": "This chapter defines the preprocessing directives allowed in Visual Basic", @@ -859,14 +854,14 @@ }, "titleSuffix": { "_csharpstandard/standard/*.md": "C# language specification", - "_csharplang/proposals/csharp-7.0/*.md": "C# 7.0 draft specifications", - "_csharplang/proposals/csharp-7.1/*.md": "C# 7.1 draft specifications", - "_csharplang/proposals/csharp-7.2/*.md": "C# 7.2 draft specifications", - "_csharplang/proposals/csharp-7.3/*.md": "C# 7.3 draft specifications", - "_csharplang/proposals/csharp-8.0/*.md": "C# 8.0 draft specifications", - "_csharplang/proposals/csharp-9.0/*.md": "C# 9.0 draft specifications", - "_csharplang/proposals/csharp-10.0/*.md": "C# 10.0 draft specifications", - "_csharplang/proposals/csharp-11.0/*.md": "C# 11.0 draft specifications", + "_csharplang/proposals/csharp-7.0/*.md": "C# 7.0 draft feature specifications", + "_csharplang/proposals/csharp-7.2/*.md": "C# 7.2 draft feature specifications", + "_csharplang/proposals/csharp-7.3/*.md": "C# 7.3 draft feature specifications", + "_csharplang/proposals/csharp-8.0/*.md": "C# 8.0 draft feature specifications", + "_csharplang/proposals/csharp-9.0/*.md": "C# 9.0 draft feature specifications", + "_csharplang/proposals/csharp-10.0/*.md": "C# 10.0 draft feature specifications", + "_csharplang/proposals/csharp-11.0/*.md": "C# 11.0 draft feature specifications", + "_csharplang/proposals/*.md": "C# preview feature specifications", "docs/framework/**/**.md": ".NET Framework", "docs/framework/data/adonet/**/**.md": "ADO.NET", "docs/framework/wcf/**/**.md": "WCF", @@ -897,11 +892,25 @@ }, "open_to_public_contributors": { "docs/standard/design-guidelines/**.md": false + }, + "ms.custom": { + "docs/framework/**/*.md": "UpdateFrequency5", + "docs/visual-basic/**/*.md": "UpdateFrequency5" + }, + "no-loc": { + "**/**.md": [ + ".NET", + "Orleans" + ] } }, "dest": "_site", - "template": ["docs.html"], - "xref": ["_zip/missingapi.yml"], + "template": [ + "docs.html" + ], + "xref": [ + "_zip/missingapi.yml" + ], "lruSize": 0 } -} +} \ No newline at end of file diff --git a/docs/architecture/blazor-for-web-forms-developers/data.md b/docs/architecture/blazor-for-web-forms-developers/data.md index 68b76c02057db..4cf4807f32270 100644 --- a/docs/architecture/blazor-for-web-forms-developers/data.md +++ b/docs/architecture/blazor-for-web-forms-developers/data.md @@ -21,7 +21,7 @@ Data Sources were controls that you could place on a Web Forms page and configur ![Data Sources](media/data/datasources.png) -ADO.NET is the low-level approach to interacting with a database. Your apps could create a connection to the database with Commands, Recordsets, and Datasets for interacting. The results could then be bound to fields on screen without much code. The drawback of this approach was that each set of ADO.NET objects (`Connection`, `Command`, and `Recordset`) was bound to libraries provided by a database vendor. Use of these components made the code rigid and difficult to migrate to a different database. +ADO.NET is the low-level approach to interacting with a database. Your apps could create a connection to the database with Commands, Datatables, and Datasets for interacting. The results could then be bound to fields on screen without much code. The drawback of this approach was that each set of ADO.NET objects (`Connection`, `Command`, and `DataTable`) was bound to libraries provided by a database vendor. Use of these components made the code rigid and difficult to migrate to a different database. ## Entity Framework diff --git a/docs/architecture/blazor-for-web-forms-developers/index.md b/docs/architecture/blazor-for-web-forms-developers/index.md index 46b33e6008537..a89c6fb878be4 100644 --- a/docs/architecture/blazor-for-web-forms-developers/index.md +++ b/docs/architecture/blazor-for-web-forms-developers/index.md @@ -12,7 +12,7 @@ ms.date: 01/10/2022 > DOWNLOAD available at: -**EDITION v6.0** - Updated to .NET 6 +**EDITION v7.0** - Updated to .NET 7 Refer to [changelog](https://aka.ms/blazor-ebook-changelog) for the book updates and community contributions. @@ -26,7 +26,7 @@ One Microsoft Way Redmond, Washington 98052-6399 -Copyright © 2022 by Microsoft Corporation +Copyright © 2023 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. diff --git a/docs/architecture/blazor-for-web-forms-developers/introduction.md b/docs/architecture/blazor-for-web-forms-developers/introduction.md index 055a97279a69f..7b06578401d2b 100644 --- a/docs/architecture/blazor-for-web-forms-developers/introduction.md +++ b/docs/architecture/blazor-for-web-forms-developers/introduction.md @@ -29,11 +29,11 @@ Most modern web frameworks are now also open-source, which has a number of benef The .NET community has embraced both cross-platform support and open-source. .NET Core is an open-source and cross-platform implementation of .NET that runs on a plethora of platforms, including Windows, macOS, and various Linux distributions. Xamarin provides Mono, an open-source version of .NET. Mono runs on Android, iOS, and a variety of other form factors, including watches and smart TVs. In 2020, Microsoft released [.NET 5](https://devblogs.microsoft.com/dotnet/announcing-net-5-0/) that reconciled .NET Core and Mono into "a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences." -Will ASP.NET Web Forms benefit from the move to open-source and cross-platform support? The answer, unfortunately, is no, or at least not to the same extent as the rest of the platform. The .NET team [made it clear](https://devblogs.microsoft.com/dotnet/net-core-is-the-future-of-net/) that ASP.NET Web Forms won't be ported to .NET Core or .NET 6. Why is that? +Will ASP.NET Web Forms benefit from the move to open-source and cross-platform support? The answer, unfortunately, is no, or at least not to the same extent as the rest of the platform. The .NET team [made it clear](https://devblogs.microsoft.com/dotnet/net-core-is-the-future-of-net/) that ASP.NET Web Forms won't be ported to .NET Core or .NET 7. Why is that? There were efforts in the early days of .NET Core to port ASP.NET Web Forms. The number of breaking changes required were found to be too drastic. There's also an admission here that even for Microsoft, there's a limit to the number of web frameworks that it can support simultaneously. Perhaps someone in the community will take up the cause of creating an open-source and cross-platform version of ASP.NET Web Forms. The [source code for ASP.NET Web Forms](https://github.com/microsoft/referencesource) has been made available publicly in reference form. But for the time being, it seems ASP.NET Web Forms will remain Windows-only and without an open-source contribution model. If cross-platform support or open-source become important for your scenarios, then you'll need to look for something new. -Does this mean ASP.NET Web Forms is *dead* and should no longer be used? Of course not! As long as the .NET Framework ships as part of Windows, ASP.NET Web Forms will be a supported framework. For many Web Forms developers, the lack of cross-platform and open-source support is a non-issue. If you don't have a requirement for cross-platform support, open-source, or any of the other new features in .NET Core or .NET 6, then sticking with ASP.NET Web Forms on Windows is fine. ASP.NET Web Forms will continue to be a productive way to write web apps for many years to come. +Does this mean ASP.NET Web Forms is *dead* and should no longer be used? Of course not! As long as the .NET Framework ships as part of Windows, ASP.NET Web Forms will be a supported framework. For many Web Forms developers, the lack of cross-platform and open-source support is a non-issue. If you don't have a requirement for cross-platform support, open-source, or any of the other new features in .NET Core or .NET 7, then sticking with ASP.NET Web Forms on Windows is fine. ASP.NET Web Forms will continue to be a productive way to write web apps for many years to come. But there's another trend worth considering, and that's the shift to the client. diff --git a/docs/architecture/blazor-for-web-forms-developers/project-structure.md b/docs/architecture/blazor-for-web-forms-developers/project-structure.md index 46a38ed8e067b..e5df37bcdf9af 100644 --- a/docs/architecture/blazor-for-web-forms-developers/project-structure.md +++ b/docs/architecture/blazor-for-web-forms-developers/project-structure.md @@ -22,7 +22,7 @@ Blazor Server apps are .NET projects. The project file for the Blazor Server app - net6.0 + net7.0 @@ -34,16 +34,13 @@ The project file for a Blazor WebAssembly app looks slightly more involved (exac - net6.0 + net7.0 enable - - - - - + + @@ -57,7 +54,7 @@ Although they're supported, individual assembly references are less common in .N ```xml - + ``` @@ -106,7 +103,6 @@ app.UseStaticFiles(); app.UseRouting(); -app.UseAuthentication(); app.UseAuthorization(); app.MapControllers(); @@ -171,11 +167,12 @@ The *_Imports.razor* files aren't Razor component files. Instead, they define a ```razor @using System.Net.Http -@using Microsoft.AspNetCore.Authorization -@using Microsoft.AspNetCore.Components.Authorization +@using System.Net.Http.Json @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.AspNetCore.Components.WebAssembly.Http @using Microsoft.JSInterop @using BlazorApp1 @using BlazorApp1.Shared diff --git a/docs/architecture/cloud-native/application-resiliency-patterns.md b/docs/architecture/cloud-native/application-resiliency-patterns.md index 4b2ff95f7e2d7..efc32e1507960 100644 --- a/docs/architecture/cloud-native/application-resiliency-patterns.md +++ b/docs/architecture/cloud-native/application-resiliency-patterns.md @@ -11,7 +11,7 @@ ms.date: 04/06/2022 The first line of defense is application resiliency. -While you could invest considerable time writing your own resiliency framework, such products already exist. [Polly](https://old.dotnetfoundation.org/projects/polly) is a comprehensive .NET resilience and transient-fault-handling library that allows developers to express resiliency policies in a fluent and thread-safe manner. Polly targets applications built with either .NET Framework or .NET 6. The following table describes the resiliency features, called `policies`, available in the Polly Library. They can be applied individually or grouped together. +While you could invest considerable time writing your own resiliency framework, such products already exist. [Polly](https://old.dotnetfoundation.org/projects/polly) is a comprehensive .NET resilience and transient-fault-handling library that allows developers to express resiliency policies in a fluent and thread-safe manner. Polly targets applications built with either .NET Framework or .NET 7. The following table describes the resiliency features, called `policies`, available in the Polly Library. They can be applied individually or grouped together. | Policy | Experience | | :-------- | :-------- | diff --git a/docs/architecture/cloud-native/azure-security.md b/docs/architecture/cloud-native/azure-security.md index eb4b748515b80..94f25bed2a471 100644 --- a/docs/architecture/cloud-native/azure-security.md +++ b/docs/architecture/cloud-native/azure-security.md @@ -264,7 +264,7 @@ While Cosmos DB doesn't provide for supplying customer encryption keys, there ha ## Keeping secure -Azure has all the tools necessary to release a highly secure product. However, a chain is only as strong as its weakest link. If the applications deployed on top of Azure aren't developed with a proper security mindset and good security audits, then they become the weak link in the chain. There are many great static analysis tools, encryption libraries, and security practices that can be used to ensure that the software installed on Azure is as secure as Azure itself. Examples include [static analysis tools](https://www.whitesourcesoftware.com/), [encryption libraries](https://www.libressl.org/), and [security practices](https://azure.microsoft.com/resources/videos/red-vs-blue-internal-security-penetration-testing-of-microsoft-azure/). +Azure has all the tools necessary to release a highly secure product. However, a chain is only as strong as its weakest link. If the applications deployed on top of Azure aren't developed with a proper security mindset and good security audits, then they become the weak link in the chain. There are many great static analysis tools, encryption libraries, and security practices that can be used to ensure that the software installed on Azure is as secure as Azure itself. Examples include [static analysis tools](https://www.mend.io/sca/), [encryption libraries](https://www.libressl.org/), and [security practices](https://azure.microsoft.com/resources/videos/red-vs-blue-internal-security-penetration-testing-of-microsoft-azure/). >[!div class="step-by-step"] >[Previous](security.md) diff --git a/docs/architecture/cloud-native/devops.md b/docs/architecture/cloud-native/devops.md index 2cd7411ad6f66..8c5d891fdaee0 100644 --- a/docs/architecture/cloud-native/devops.md +++ b/docs/architecture/cloud-native/devops.md @@ -14,7 +14,7 @@ Take, for instance, the two major schools of developing web applications: Single Cloud-native applications aren't immune to that same dichotomy. They have clear advantages in terms of speed of development, stability, and scalability, but managing them can be quite a bit more difficult. -Years ago, it wasn't uncommon for the process of moving an application from development to production to take a month, or even more. Companies released software on a 6-month or even every year cadence. One needs to look no further than Microsoft Windows to get an idea for the cadence of releases that were acceptable before the ever-green days of Windows 10. Five years passed between Windows XP and Vista, a further 3 between Vista and Windows 7. +Years ago, it wasn't uncommon for the process of moving an application from development to production to take a month, or even more. Companies released software on a 6-month or even every year cadence. One needs to look no further than Microsoft Windows to get an idea for the cadence of releases that were acceptable before the ever-green days of Windows 10. Five years passed between Windows XP and Vista, a further three between Vista and Windows 7. It's now fairly well established that being able to release software rapidly gives fast-moving companies a huge market advantage over their more sloth-like competitors. It's for that reason that major updates to Windows 10 are now approximately every six months. @@ -198,7 +198,7 @@ variables: buildConfiguration: release pool: - name: Hosted VS2017 + name: Hosted VisualStudio demands: - msbuild - visualstudio diff --git a/docs/architecture/cloud-native/identity-server.md b/docs/architecture/cloud-native/identity-server.md index 463095c2e5a1e..6725202e50614 100644 --- a/docs/architecture/cloud-native/identity-server.md +++ b/docs/architecture/cloud-native/identity-server.md @@ -50,7 +50,7 @@ You can add it to your applications using its NuGet packages. The main package i ## Configuration -IdentityServer supports different kinds of protocols and social authentication providers that can be configured as part of each custom installation. This is typically done in the ASP.NET Core application's `Startup` class in the `ConfigureServices` method. The configuration involves specifying the supported protocols and the paths to the servers and endpoints that will be used. Figure 8-2 shows an example configuration taken from the IdentityServer4 Quickstart UI project: +IdentityServer supports different kinds of protocols and social authentication providers that can be configured as part of each custom installation. This is typically done in the ASP.NET Core application's `Program` class (or in the `Startup` class in the `ConfigureServices` method). The configuration involves specifying the supported protocols and the paths to the servers and endpoints that will be used. Figure 8-2 shows an example configuration taken from the IdentityServer4 Quickstart UI project: ```csharp public class Startup diff --git a/docs/architecture/cloud-native/index.md b/docs/architecture/cloud-native/index.md index ebda59bd6a8e2..c26188d45e4e5 100644 --- a/docs/architecture/cloud-native/index.md +++ b/docs/architecture/cloud-native/index.md @@ -9,7 +9,7 @@ ms.date: 01/10/2022 ![cover image](./media/cover.png) -**EDITION v1.0.2** +**EDITION v1.0.3** Refer [changelog](https://aka.ms/cn-ebook-changelog) for the book updates and community contributions. @@ -23,7 +23,7 @@ One Microsoft Way Redmond, Washington 98052-6399 -Copyright © 2022 by Microsoft Corporation +Copyright © 2023 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. @@ -65,7 +65,7 @@ Editors: ## Version -This guide has been written to cover **.NET 6** version along with many additional updates related to the same “wave” of technologies (that is, Azure and additional third-party technologies) coinciding in time with the .NET 6 release. +This guide has been written to cover **.NET 7** version along with many additional updates related to the same “wave” of technologies (that is, Azure and additional third-party technologies) coinciding in time with the .NET 7 release. ## Who should use this guide diff --git a/docs/architecture/cloud-native/infrastructure-as-code.md b/docs/architecture/cloud-native/infrastructure-as-code.md index 6252b538d59b1..b985be202b5da 100644 --- a/docs/architecture/cloud-native/infrastructure-as-code.md +++ b/docs/architecture/cloud-native/infrastructure-as-code.md @@ -2,6 +2,7 @@ title: Infrastructure as code description: Embracing Infrastructure as Code (IaC) with cloud-native applications ms.date: 04/06/2022 +ms.custom: devx-track-terraform, devx-track-arm-template, devx-track-azurecli --- # Infrastructure as code diff --git a/docs/architecture/cloud-native/leverage-containers-orchestrators.md b/docs/architecture/cloud-native/leverage-containers-orchestrators.md index 071d0834797a8..ebdd680139360 100644 --- a/docs/architecture/cloud-native/leverage-containers-orchestrators.md +++ b/docs/architecture/cloud-native/leverage-containers-orchestrators.md @@ -181,12 +181,12 @@ Visual Studio supports Docker development for web-based applications. When you c When this option is selected, the project is created with a `Dockerfile` in its root, which can be used to build and host the app in a Docker container. An example Dockerfile is shown in Figure 3-6. ```dockerfile -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src COPY ["eShopWeb/eShopWeb.csproj", "eShopWeb/"] RUN dotnet restore "eShopWeb/eShopWeb.csproj" diff --git a/docs/architecture/cloud-native/relational-vs-nosql-data.md b/docs/architecture/cloud-native/relational-vs-nosql-data.md index 17f8543200514..479ba7ff16e8d 100644 --- a/docs/architecture/cloud-native/relational-vs-nosql-data.md +++ b/docs/architecture/cloud-native/relational-vs-nosql-data.md @@ -264,7 +264,7 @@ The Cloud Native Computing Foundation (CNCF) features several NewSQL database pr | :-------- | :-------- | | Cockroach DB |An ACID-compliant, relational database that scales globally. Add a new node to a cluster and CockroachDB takes care of balancing the data across instances and geographies. It creates, manages, and distributes replicas to ensure reliability. It's open source and freely available. | | TiDB | An open-source database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. It is MySQL-compatible and features horizontal scalability, strong consistency, and high availability. TiDB acts like a MySQL server. You can continue to use existing MySQL client libraries, without requiring extensive code changes to your application. | -| YugabyteDB | An open source, high-performance, distributed SQL database. It supports low query latency, resilience against failures, and global data distribution. YugabyteDB is PostgressSQL-compatible and handles scale-out RDBMS and internet-scale OLTP workloads. The product also supports NoSQL and is compatible with Cassandra. | +| YugabyteDB | An open source, high-performance, distributed SQL database. It supports low query latency, resilience against failures, and global data distribution. YugabyteDB is PostgresSQL-compatible and handles scale-out RDBMS and internet-scale OLTP workloads. The product also supports NoSQL and is compatible with Cassandra. | |Vitess | Vitess is a database solution for deploying, scaling, and managing large clusters of MySQL instances. It can run in a public or private cloud architecture. Vitess combines and extends many important MySQL features and features both vertical and horizontal sharding support. Originated by YouTube, Vitess has been serving all YouTube database traffic since 2011. | The open-source projects in the previous figure are available from the Cloud Native Computing Foundation. Three of the offerings are full database products, which include .NET support. The other, Vitess, is a database clustering system that horizontally scales large clusters of MySQL instances. diff --git a/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md b/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md index a1a1398d4fc11..fffe73689a22b 100644 --- a/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md +++ b/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/index.md @@ -11,7 +11,7 @@ ms.date: 08/06/2020 Figure 3-1 shows the main pillars in the life cycle of Docker apps classified by the type of work delivered by multiple teams (app-development, DevOps infrastructure processes, and IT management and operations). Usually, in the enterprise, the profiles of "the persona" responsible for each area are different. So are their skills. -![Add new project window in Visual Studio, selecting ASP.NET Core Web Application.](media/index/microsoft-tools-contanerized-docker-app.png) +![Add new project window in Visual Studio, selecting ASP.NET Core Web Application.](media/index/microsoft-tools-containerized-docker-app.png) **Figure 3-1.** Main pillars in the life cycle for containerized Docker applications with Microsoft platform and tools diff --git a/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/media/index/microsoft-tools-contanerized-docker-app.png b/docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/media/index/microsoft-tools-containerized-docker-app.png similarity index 100% rename from docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/media/index/microsoft-tools-contanerized-docker-app.png rename to docs/architecture/containerized-lifecycle/Microsoft-platform-tools-containerized-apps/media/index/microsoft-tools-containerized-docker-app.png diff --git a/docs/architecture/containerized-lifecycle/media/what-is-docker/comparison-vms-docker-conatiners.png b/docs/architecture/containerized-lifecycle/media/what-is-docker/comparison-vms-docker-containers.png similarity index 100% rename from docs/architecture/containerized-lifecycle/media/what-is-docker/comparison-vms-docker-conatiners.png rename to docs/architecture/containerized-lifecycle/media/what-is-docker/comparison-vms-docker-containers.png diff --git a/docs/architecture/containerized-lifecycle/what-is-docker.md b/docs/architecture/containerized-lifecycle/what-is-docker.md index 2217aed2aa24c..d7f36c66e1c09 100644 --- a/docs/architecture/containerized-lifecycle/what-is-docker.md +++ b/docs/architecture/containerized-lifecycle/what-is-docker.md @@ -31,7 +31,7 @@ The images for these containers are created and work just the same way. The diff Figure 1-3 shows a comparison between VMs and Docker containers. -![Diagram showing a comparison of VM and container environments.](./media/what-is-docker/comparison-vms-docker-conatiners.png) +![Diagram showing a comparison of VM and container environments.](./media/what-is-docker/comparison-vms-docker-containers.png) **Figure 1-3**. Comparison of traditional virtual machines to Docker containers diff --git a/docs/architecture/dapr-for-net-developers/actors.md b/docs/architecture/dapr-for-net-developers/actors.md index 5ade04e84733a..0236a585a0b1b 100644 --- a/docs/architecture/dapr-for-net-developers/actors.md +++ b/docs/architecture/dapr-for-net-developers/actors.md @@ -284,7 +284,7 @@ app.MapActorsHandlers(); The actors endpoints are necessary because the Dapr sidecar calls the application to host and interact with actor instances. > [!IMPORTANT] -> Make sure your `Startup` class does not contain an `app.UseHttpsRedirection` call to redirect clients to the HTTPS endpoint. This will not work with actors. By design, a Dapr sidecar sends requests over unencrypted HTTP by default. The HTTPS middleware will block these requests when enabled. +> Make sure your `Program` (or `Startup`) class does not contain an `app.UseHttpsRedirection` call to redirect clients to the HTTPS endpoint. This will not work with actors. By design, a Dapr sidecar sends requests over unencrypted HTTP by default. The HTTPS middleware will block these requests when enabled. The `Program` file is also the place to register the specific actor types. The following example registers the `ScoreActor` using the `AddActors` extension method: @@ -584,7 +584,7 @@ if (violation > 0) The code above uses two external dependencies. The `_speedingViolationCalculator` encapsulates the business logic for determining whether or not a vehicle has driven too fast. The `_daprClient` allows the actor to publish messages using the Dapr pub/sub building block. -Both dependencies are registered in the `Startup` class and injected into the actor using constructor dependency injection: +Both dependencies are registered in the _Program.cs_ class and injected into the actor using constructor dependency injection: ```csharp private readonly DaprClient _daprClient; diff --git a/docs/architecture/dapr-for-net-developers/getting-started.md b/docs/architecture/dapr-for-net-developers/getting-started.md index 0a0eae4443730..37a5509f0b6c9 100644 --- a/docs/architecture/dapr-for-net-developers/getting-started.md +++ b/docs/architecture/dapr-for-net-developers/getting-started.md @@ -24,7 +24,7 @@ You'll start by installing Dapr on your development computer. Once complete, you 1. [Initialize Dapr](https://docs.dapr.io/getting-started/install-dapr-selfhost/). This step sets up your development environment by installing the latest Dapr binaries and container images. -1. Install the [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0). +1. Install the [.NET 7 SDK](https://dotnet.microsoft.com/download/dotnet/7.0). Now that Dapr is installed, it's time to build your first Dapr application! @@ -192,7 +192,7 @@ In the first example, you created a simple .NET console application that ran sid In the next example, you'll create a multi-container application. You'll also use the [Dapr service invocation](service-invocation.md) building block to communicate between services. The solution will consist of a web application that retrieves weather forecasts from a web API. They will each run in a Docker container. You'll use Docker Compose to run the container locally and enable debugging capabilities. -Make sure you've configured your local environment for Dapr and installed the [.NET 6 Development Tools](https://dotnet.microsoft.com/download/dotnet/6.0) (instructions are available at the beginning of this chapter). +Make sure you've configured your local environment for Dapr and installed the [.NET 7 Development Tools](https://dotnet.microsoft.com/download/dotnet/7.0) (instructions are available at the beginning of this chapter). Additionally, you'll need to complete this sample using [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) with the **ASP.NET and web development** workload installed. @@ -354,12 +354,12 @@ In the final part of this example, you'll add container support and run the solu The *Dockerfile* contains the following commands: ```dockerfile - FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base + FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 - FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build + FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src COPY ["MyFrontEnd/MyFrontEnd.csproj", "MyFrontEnd/"] RUN dotnet restore "MyFrontEnd/MyFrontEnd.csproj" @@ -378,10 +378,10 @@ In the final part of this example, you'll add container support and run the solu The preceding *Dockerfile* sequentially performs the following steps when invoked: - 1. Pulls the `mcr.microsoft.com/dotnet/aspnet:6.0` image and names it `base`. + 1. Pulls the `mcr.microsoft.com/dotnet/aspnet:7.0` image and names it `base`. 2. Sets the working directory to */app*. 3. Exposes port `80` and `443`. - 4. Pulls the `mcr.microsoft.com/dotnet/sdk:6.0` image and names it `build`. + 4. Pulls the `mcr.microsoft.com/dotnet/sdk:7.0` image and names it `build`. 5. Sets the working directory to */src*. 6. Copies the _MyFrontEnd/MyFrontEnd.csproj_ to a new directory named *MyFrontEnd/*. 7. Calls [`dotnet restore`](../../core/tools/dotnet-restore.md) on the project. @@ -402,11 +402,11 @@ In the final part of this example, you'll add container support and run the solu In the root of the _MyBackEnd_ project directory, a new *Dockerfile* was created. The *Dockerfile* contains the following commands: ```dockerfile - FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base + FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base WORKDIR /app EXPOSE 80 - FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build + FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src COPY ["MyBackEnd/MyBackEnd.csproj", "MyBackEnd/"] RUN dotnet restore "MyBackEnd/MyBackEnd.csproj" diff --git a/docs/architecture/dapr-for-net-developers/index.md b/docs/architecture/dapr-for-net-developers/index.md index 2369a84cb07ef..cd3171d9af07b 100644 --- a/docs/architecture/dapr-for-net-developers/index.md +++ b/docs/architecture/dapr-for-net-developers/index.md @@ -9,7 +9,7 @@ ms.date: 01/10/2022 ![cover image](./media/cover.png) -**EDITION v1.1** +**EDITION v1.2** PUBLISHED BY @@ -21,7 +21,7 @@ One Microsoft Way Redmond, Washington 98052-6399 -Copyright © 2022 by Microsoft Corporation +Copyright © 2023 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. @@ -62,10 +62,12 @@ Editors: > **David Pine**, Senior Content Developer, .NET team, Microsoft > > **Maira Wenzel**, Senior Program Manager, .NET team, Microsoft +> +> **Steve "ardalis" Smith**, Senior Architect and Trainer, NimblePros ## Version -This guide has been written to cover the **Dapr 1.5** version. .NET samples are based on **.NET 6**. +This guide has been written to cover the **Dapr 1.9** version. .NET samples are based on **.NET 7**. ## Who should use this guide diff --git a/docs/architecture/dapr-for-net-developers/reference-application.md b/docs/architecture/dapr-for-net-developers/reference-application.md index 4fae000146c1f..bfd7f5b8daea5 100644 --- a/docs/architecture/dapr-for-net-developers/reference-application.md +++ b/docs/architecture/dapr-for-net-developers/reference-application.md @@ -119,7 +119,7 @@ public class RedisBasketRepository : IBasketRepository This code uses the third party `StackExchange.Redis` NuGet package. The following steps are required to load the shopping basket for a given customer: -1. Inject a Redis `ConnectionMultiplexer` into the constructor. The `ConnectionMultiplexer` is registered with the dependency injection framework in the `Startup.cs` file: +1. Inject a Redis `ConnectionMultiplexer` into the constructor. The `ConnectionMultiplexer` is registered with the dependency injection framework in the _Program.cs_ file: ```csharp services.AddSingleton(sp => @@ -162,7 +162,7 @@ public class DaprBasketRepository : IBasketRepository The updated code uses the Dapr .NET SDK to read and write data using the state management building block. The new steps to load the basket for a customer are dramatically simplified: -1. Inject a `DaprClient` into the constructor. The `DaprClient` is registered with the dependency injection framework in the `Startup.cs` file. +1. Inject a `DaprClient` into the constructor. The `DaprClient` is registered with the dependency injection framework in the _Program.cs_`_ file. 1. Use the `DaprClient.GetStateAsync` method to load the customer's shopping basket items from the configured state store and return the result. The updated implementation still uses Redis as the underlying data store. But, note how Dapr abstracts the `StackExchange.Redis` references and complexity from the application. The application no longer requires a direct dependency on Redis. A Dapr configuration file is all that's needed: diff --git a/docs/architecture/dapr-for-net-developers/sample-application.md b/docs/architecture/dapr-for-net-developers/sample-application.md index ea9354ac59464..83a113d882266 100644 --- a/docs/architecture/dapr-for-net-developers/sample-application.md +++ b/docs/architecture/dapr-for-net-developers/sample-application.md @@ -9,12 +9,12 @@ ms.date: 11/17/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -In the first chapters, you've learned about basic Dapr concepts. You saw how Dapr can help you and your team construct distributed applications while reducing architectural and operational complexity. This chapter introduces the sample application that you'll use to explore the Dapr building blocks. The application targets .NET 6 and uses the latest C# 10 language features. +In the first chapters, you've learned about basic Dapr concepts. You saw how Dapr can help you and your team construct distributed applications while reducing architectural and operational complexity. This chapter introduces the sample application that you'll use to explore the Dapr building blocks. The application targets .NET 7 and uses the latest C# 11 language features. > [!NOTE] > Download the sample application code from the [Dapr Traffic Control GitHub repo](https://github.com/EdwinVW/dapr-traffic-control). This repository contains a detailed description on how you can run the sample application on your machine. -The Traffic Control sample application simulates a highway traffic control system. Its purpose is to detect speeding vehicles and send the offending driver a fine notice. These systems actually exist in real life and here's how they work. A set of cameras (one above each lane) is placed at the beginning and end of highway stretch (say 10 kilometers) without on- or off-ramps. As a vehicle passes underneath a camera, it takes a photograph of the vehicle. Using Optical Character Recognition (OCR) software, it extracts the license number of the vehicle from the photo. Using the entry- and exit-timestamp of each vehicle, the system calculates the average speed of that vehicle. If the average speed is above the maximum speed limit for highway stretch, the system retrieves the driver information and automatically sends a fine notice. +The Traffic Control sample application simulates a highway traffic control system. Its purpose is to detect speeding vehicles and send the offending driver a fine notice. These systems actually exist in real life and here's how they work. A set of cameras (one above each lane) is placed at the beginning and end of a highway stretch (say 10 kilometers) without on- or off-ramps. As a vehicle passes underneath a camera, it takes a photograph of the vehicle. Using Optical Character Recognition (OCR) software, it extracts the license number of the vehicle from the photo. Using the entry- and exit-timestamp of each vehicle, the system calculates the average speed of that vehicle. If the average speed is above the maximum speed limit for that highway stretch, the system retrieves the driver information and automatically sends a fine notice. Although the simulation is simple, responsibilities within the system are separated into several microservices. Figure 4.1 shows an overview of the services that are part of the application: diff --git a/docs/architecture/devops-for-aspnet-developers/actions-codeql.md b/docs/architecture/devops-for-aspnet-developers/actions-codeql.md index 90c9e1c74897c..d562311d441fa 100644 --- a/docs/architecture/devops-for-aspnet-developers/actions-codeql.md +++ b/docs/architecture/devops-for-aspnet-developers/actions-codeql.md @@ -127,7 +127,7 @@ Notice the following things: The CodeQL scan isn't reporting any security issues. That's expected with this basic sample. CodeQL can also scan for *quality* issues. The current workflow is using the default `security-extended` suite. You can add quality scanning in by adding a configuration file to customize the scanning suites. In this step, you'll configure CodeQL to use the `security-and-quality` suites. > [!INFORMATION] -> For other CodeQL configuration options, see [Configuring CodeQL code scanning in your CI system](https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-codeql-code-scanning-in-your-ci-system). +> For other CodeQL configuration options, see [Configuring CodeQL code scanning in your CI system](https://docs.github.com/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system). 1. Navigate to the *.github* folder in the **Code** tab and select **Add File**: diff --git a/docs/architecture/devops-for-aspnet-developers/actions-vs-pipelines.md b/docs/architecture/devops-for-aspnet-developers/actions-vs-pipelines.md index b9c59cb0529e3..5625cb4ecd364 100644 --- a/docs/architecture/devops-for-aspnet-developers/actions-vs-pipelines.md +++ b/docs/architecture/devops-for-aspnet-developers/actions-vs-pipelines.md @@ -88,7 +88,7 @@ GitHub Actions are evolving rapidly and provide features such as triggers for al ### Feature comparison -The following table is current as of November 2021. +The following table is current as of January 2023 and is not an exhaustive list of features. |Feature|Description|GitHub Actions|Azure Pipelines| |-------|-----------|--------------|---------------| @@ -102,7 +102,7 @@ The following table is current as of November 2021. |Deployment Groups|A logical set of target machines for deployments|No|Yes| |Deployment Jobs|Job that targets a deployment group|No|Yes| |Environments|A collection of resources to target or a logical environment|Yes|Yes| -|Gates|Automatic collection and evaluation of signals to control continuation|No|Yes| +|Gates/Checks|Automatic collection and evaluation of signals to control continuation|Yes|Yes| |Jobs|Sequence of steps that are executed on an agent|Yes|Yes| |Service Containers|Manage the lifecycle of a containerized service instance available during a job|Yes|Yes| |Service Connections|Abstract credentials to external systems|No|Yes| @@ -115,25 +115,7 @@ The following table is current as of November 2021. |Variable Groups|Store values for use across multiple pipelines|No|Yes| > [!IMPORTANT] -> GitHub Actions is rapidly evolving. Since the first version of the above table, GitHub Actions has release Composite Actions and Reusable Workflows, both of which significantly improve reusability of GitHub Actions. Passwordless deployment via OpenID Connect (OIDC) support for Azure, AWS and Hashi have also been released to beta. Be sure to check documentation carefully before deciding which platform is right for you. - -## Recommendation table for common scenarios - -The following table shows some common scenarios and platform recommendations for each. As always, there will be exceptions. Consider your exact scenario carefully. - -|Requirement|Platform| -|-----------|--------| -|I need to create reusable templates to standardize how jobs are executed across multiple teams|Both| -|I need to have automated gates control pipeline progress|Azure Pipelines| -|I need to define multiple stages|Azure Pipelines| -|I need multiple jobs to target the same environment|Both| -|I need to model multiple, complex environments|Both| -|I need to use the same environments across multiple projects/repos|Azure Pipelines| -|I have repos that aren't in GitHub|Azure Pipelines| -|I need to create custom tasks that aren't open-source|Both| -|I need a simple workflow for building and deploying open-source repositories to a small set of environments|GitHub Actions| -|I need to model workflows for scenarios other than CI/CD. For example, custom alerts on pull requests|GitHub Actions| -|I need to create custom tasks that are open-source|Both| +> GitHub Actions is rapidly evolving. Be sure to check documentation carefully before deciding which platform is right for you. >[!div class="step-by-step"] >[Previous](actions-index.md) diff --git a/docs/architecture/grpc-for-wcf-developers/call-credentials.md b/docs/architecture/grpc-for-wcf-developers/call-credentials.md index c3ae835886747..ef382d030a834 100644 --- a/docs/architecture/grpc-for-wcf-developers/call-credentials.md +++ b/docs/architecture/grpc-for-wcf-developers/call-credentials.md @@ -20,11 +20,11 @@ For more information on how to get started with this authentication method, see The [JSON Web Token](https://jwt.io) (JWT) standard provides a way to encode information about a user and their claims in an encoded string. It also provides a way to sign that token, so that the consumer can verify the integrity of the token by using public key cryptography. You can use various services, such as IdentityServer4, to authenticate users and generate OpenID Connect (OIDC) tokens to use with gRPC and HTTP APIs. -ASP.NET Core 6.0 can handle JWTs by using the JWT Bearer package. The configuration is exactly the same for a gRPC application as it is for an ASP.NET Core MVC application. Here, we'll focus on JWT Bearer tokens, because they're easier to develop with than WS-Federation. +ASP.NET Core 7.0 can handle JWTs by using the JWT Bearer package. The configuration is exactly the same for a gRPC application as it is for an ASP.NET Core MVC application. Here, we'll focus on JWT Bearer tokens, because they're easier to develop with than WS-Federation. ## Add authentication and authorization to the server -The JWT Bearer package isn't included in ASP.NET Core 6.0 by default. Install the [Microsoft.AspNetCore.Authentication.JwtBearer](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.JwtBearer) NuGet package in your app. +The JWT Bearer package isn't included in ASP.NET Core 7.0 by default. Install the [Microsoft.AspNetCore.Authentication.JwtBearer](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.JwtBearer) NuGet package in your app. Add the Authentication service in the _Program.cs_ class, and configure the JWT Bearer handler: diff --git a/docs/architecture/grpc-for-wcf-developers/create-project.md b/docs/architecture/grpc-for-wcf-developers/create-project.md index 0d13c92f0ee69..adaaefc6b188a 100644 --- a/docs/architecture/grpc-for-wcf-developers/create-project.md +++ b/docs/architecture/grpc-for-wcf-developers/create-project.md @@ -13,7 +13,7 @@ The .NET SDK comes with a powerful CLI tool, `dotnet`, which enables you to crea ## Create the project by using Visual Studio > [!IMPORTANT] -> To develop any ASP.NET Core 6.0 app, you need Visual Studio 2022, with the **ASP.NET and web development** workload installed. +> To develop any ASP.NET Core 7.0 app, you need Visual Studio 2022, with the **ASP.NET and web development** workload installed. Create an empty solution called **TraderSys** from the *Blank Solution* template. Add a solution folder called `src`. Then, right-click on the folder and choose **Add** > **New Project**. Enter `grpc` in the template search box, and you should see a project template called `gRPC Service`. @@ -27,7 +27,7 @@ Select **Next** to continue to the **Create a new gRPC service** dialog box. ![Screenshot of Create a new gRPC service dialog box](media/create-project/create-new-grpc-service-v2.png) -At present, you have limited options for the service creation. Docker will be introduced later, so for now, leave that option unselected. Just select **Create**. Your first ASP.NET Core 6.0 gRPC project is generated and added to the solution. If you don't want to know about working with the `dotnet CLI`, skip to the [Clean up the example code](#clean-up-the-example-code) section. +At present, you have limited options for the service creation. Docker will be introduced later, so for now, leave that option unselected. Just select **Create**. Your first ASP.NET Core 7.0 gRPC project is generated and added to the solution. If you don't want to know about working with the `dotnet CLI`, skip to the [Clean up the example code](#clean-up-the-example-code) section. ## Create the project by using the .NET CLI @@ -40,7 +40,7 @@ dotnet new sln -o TraderSys cd TraderSys ``` -ASP.NET Core 6.0 comes with a CLI template for gRPC services. Create the new project by using this template, putting it into an `src` subdirectory as is conventional for ASP.NET Core projects. The project is named after the directory (`TraderSys.Portfolios.csproj`), unless you specify a different name with the `-n` flag. +ASP.NET Core 7.0 comes with a CLI template for gRPC services. Create the new project by using this template, putting it into an `src` subdirectory as is conventional for ASP.NET Core projects. The project is named after the directory (`TraderSys.Portfolios.csproj`), unless you specify a different name with the `-n` flag. ```dotnetcli dotnet new grpc -o src/TraderSys.Portfolios diff --git a/docs/architecture/grpc-for-wcf-developers/docker.md b/docs/architecture/grpc-for-wcf-developers/docker.md index 16a651d2796ff..d8a9ed9053b90 100644 --- a/docs/architecture/grpc-for-wcf-developers/docker.md +++ b/docs/architecture/grpc-for-wcf-developers/docker.md @@ -12,7 +12,7 @@ This section covers the creation of Docker images for ASP.NET Core gRPC applicat ## Microsoft base images for ASP.NET Core applications -Microsoft provides a range of base images for building and running .NET applications. To create an ASP.NET Core 6.0 image, you use two base images: +Microsoft provides a range of base images for building and running .NET applications. To create an ASP.NET Core 7.0 image, you use two base images: - An SDK image to build and publish the application. - A runtime image for deployment. @@ -26,9 +26,8 @@ For each image, there are four variants based on different Linux distributions, | Image tag(s) | Linux | Notes | | --------- | ----- | ----- | -| 6.0-bullseye-slim, 6.0 | Debian 11 | The default image if no OS variant is specified. | -| 6.0-alpine | Alpine 3.14 | Alpine base images are much smaller than Debian or Ubuntu ones. | -| 6.0-focal| Ubuntu 20.04 | | +| 7.0-bullseye-slim, 7.0 | Debian 11 | The default image if no OS variant is specified. | +| 7.0-alpine | Alpine 3.17 | Alpine base images are much smaller than Debian or Ubuntu ones. | The Alpine base image is around 100 MB, compared to 200 MB for the Debian and Ubuntu images. Some software packages or libraries might not be available in Alpine's package management. If you're not sure which image to use, you should probably choose the default Debian. @@ -37,10 +36,10 @@ The Alpine base image is around 100 MB, compared to 200 MB for the Debian and Ub ## Create a Docker image -A Docker image is defined by a *Dockerfile*. This *Dockerfile* is a text file that contains all the commands needed to build the application and install any dependencies that are required for either building or running the application. The following example shows the simplest Dockerfile for an ASP.NET Core 6.0 application: +A Docker image is defined by a *Dockerfile*. This *Dockerfile* is a text file that contains all the commands needed to build the application and install any dependencies that are required for either building or running the application. The following example shows the simplest Dockerfile for an ASP.NET Core 7.0 application: ```dockerfile -FROM mcr.microsoft.com/dotnet/sdk:6.0 as build +FROM mcr.microsoft.com/dotnet/sdk:7.0 as build WORKDIR /src @@ -54,7 +53,7 @@ COPY . . RUN dotnet publish --no-restore -c Release -o /published src/StockData/StockData.csproj -FROM mcr.microsoft.com/dotnet/aspnet:6.0 as runtime +FROM mcr.microsoft.com/dotnet/aspnet:7.0 as runtime # Uncomment the line below if running with HTTPS # ENV ASPNETCORE_URLS=https://+:443 @@ -93,7 +92,7 @@ Microsoft base images for Docker set the `ASPNETCORE_URLS` environment variable ```dockerfile # Runtime image creation -FROM mcr.microsoft.com/dotnet/aspnet:6.0 +FROM mcr.microsoft.com/dotnet/aspnet:7.0 ENV ASPNETCORE_URLS=https://+:443 ``` diff --git a/docs/architecture/grpc-for-wcf-developers/grpc-in-production.md b/docs/architecture/grpc-for-wcf-developers/grpc-in-production.md index 9d53da94f78db..3c7b29332b20c 100644 --- a/docs/architecture/grpc-for-wcf-developers/grpc-in-production.md +++ b/docs/architecture/grpc-for-wcf-developers/grpc-in-production.md @@ -8,7 +8,7 @@ ms.date: 12/14/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -You can run ASP.NET Core 6.0 applications, including gRPC services, on Windows, on Linux, and in containers using modern platforms like Docker and Kubernetes. This chapter explores the various options for running your gRPC services in production, and looks at monitoring and logging options to ensure the optimal operation of systems. +You can run ASP.NET Core 7.0 applications, including gRPC services, on Windows, on Linux, and in containers using modern platforms like Docker and Kubernetes. This chapter explores the various options for running your gRPC services in production, and looks at monitoring and logging options to ensure the optimal operation of systems. >[!div class="step-by-step"] >[Previous](encryption.md) diff --git a/docs/architecture/grpc-for-wcf-developers/index.md b/docs/architecture/grpc-for-wcf-developers/index.md index 075495444ede6..acaa0c4b857ec 100644 --- a/docs/architecture/grpc-for-wcf-developers/index.md +++ b/docs/architecture/grpc-for-wcf-developers/index.md @@ -1,6 +1,6 @@ --- title: ASP.NET Core gRPC for WCF Developers - gRPC for WCF Developers -description: Introduction to building gRPC services in ASP.NET Core 6.0 for WCF developers +description: Introduction to building gRPC services in ASP.NET Core for WCF developers ms.date: 01/10/2022 --- @@ -8,7 +8,7 @@ ms.date: 01/10/2022 ![cover image](./media/cover.png) -EDITION v6.0 - Updated to ASP.NET Core 6.0 +EDITION v7.0 - Updated to ASP.NET Core 7.0 Refer [changelog](https://aka.ms/grpc-ebook-changelog) for the book updates and community contributions. @@ -22,7 +22,7 @@ One Microsoft Way Redmond, Washington 98052-6399 -Copyright © 2022 by Microsoft Corporation +Copyright © 2023 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. @@ -48,15 +48,15 @@ Editor: ## Introduction -gRPC is a modern framework for building networked services and distributed applications. Imagine the performance of Windows Communication Foundation (WCF) NetTCP bindings, combined with the cross-platform interoperability of SOAP. gRPC builds on HTTP/2 and the Protobuf message-encoding protocol to provide high performance, low-bandwidth communication between applications and services. It supports server and client code generation across most popular programming languages and platforms, including .NET, Java, Python, Node.js, Go, and C++. With the first-class support for gRPC in ASP.NET Core 6.0, alongside the existing gRPC tools and libraries for .NET Framework 4.x, it's an excellent alternative to WCF for development teams looking to adopt .NET in their organizations. +gRPC is a modern framework for building networked services and distributed applications. Imagine the performance of Windows Communication Foundation (WCF) NetTCP bindings, combined with the cross-platform interoperability of SOAP. gRPC builds on HTTP/2 and the Protobuf message-encoding protocol to provide high performance, low-bandwidth communication between applications and services. It supports server and client code generation across most popular programming languages and platforms, including .NET, Java, Python, Node.js, Go, and C++. With the first-class support for gRPC in ASP.NET Core 7.0, alongside the existing gRPC tools and libraries for .NET Framework 4.x, it's an excellent alternative to WCF for development teams looking to adopt .NET in their organizations. ## Who should use this guide -This guide was written for developers working in .NET Framework or .NET who have previously used WCF, and who are seeking to migrate their applications to a modern RPC environment for .NET Core 3.0 and later versions. More generally, if you are upgrading, or considering upgrading, to .NET 6, and you want to use the built-in gRPC tools, this guide is also useful. +This guide was written for developers working in .NET Framework or .NET who have previously used WCF, and who are seeking to migrate their applications to a modern RPC environment for .NET Core 3.0 and later versions. More generally, if you are upgrading, or considering upgrading, to .NET 7, and you want to use the built-in gRPC tools, this guide is also useful. ## How you can use this guide -This is a short introduction to building gRPC Services in ASP.NET Core 6.0, with particular reference to WCF as an analogous platform. It explains the principles of gRPC, relating each concept to the equivalent features of WCF, and offers guidance for migrating an existing WCF application to gRPC. It's also useful for developers who have experience with WCF and are looking to learn gRPC to build new services. You can use the sample applications as a template or reference for your own projects, and you are free to copy and reuse code from the book or its samples. +This is a short introduction to building gRPC Services in ASP.NET Core 7.0, with particular reference to WCF as an analogous platform. It explains the principles of gRPC, relating each concept to the equivalent features of WCF, and offers guidance for migrating an existing WCF application to gRPC. It's also useful for developers who have experience with WCF and are looking to learn gRPC to build new services. You can use the sample applications as a template or reference for your own projects, and you are free to copy and reuse code from the book or its samples. Feel free to forward this guide to your team to help ensure a common understanding of these considerations and opportunities. Having everybody working from a common set of terms and underlying principles helps ensure consistent application of architectural patterns and practices. diff --git a/docs/architecture/grpc-for-wcf-developers/kubernetes.md b/docs/architecture/grpc-for-wcf-developers/kubernetes.md index 839ac083e350a..c7a9f0bad7896 100644 --- a/docs/architecture/grpc-for-wcf-developers/kubernetes.md +++ b/docs/architecture/grpc-for-wcf-developers/kubernetes.md @@ -79,7 +79,7 @@ In this example, both the `kubectl` CLI and the Kubernetes server are running ve ## Run services on Kubernetes -The sample application has a `kube` directory that contains three YAML files. The `namespace.yml` file declares a custom namespace: `stocks`. The `stockdata.yml` file declares the Deployment and the Service for the gRPC application, and the `stockweb.yml` file declares the Deployment and Service for an ASP.NET Core 6.0 MVC web application that consumes the gRPC service. +The sample application has a `kube` directory that contains three YAML files. The `namespace.yml` file declares a custom namespace: `stocks`. The `stockdata.yml` file declares the Deployment and the Service for the gRPC application, and the `stockweb.yml` file declares the Deployment and Service for an ASP.NET Core 7.0 MVC web application that consumes the gRPC service. To use a `YAML` file with `kubectl`, run the `apply -f` command: @@ -159,7 +159,7 @@ The `ports` property specifies which container ports should be published on the The `resources` section applies resource limits to the container running within the Pod. This is a good practice because it prevents an individual Pod from consuming all the available CPU or memory on a node. > [!NOTE] -> ASP.NET Core 6.0 has been optimized and tuned to run in resource-limited containers. The `dotnet/core/aspnet` Docker image sets an environment variable to tell the `dotnet` runtime that it's in a container. +> ASP.NET Core 7.0 has been optimized and tuned to run in resource-limited containers. The `dotnet/core/aspnet` Docker image sets an environment variable to tell the `dotnet` runtime that it's in a container. #### The StockData Service diff --git a/docs/architecture/grpc-for-wcf-developers/media/create-project/create-new-grpc-service-v2.png b/docs/architecture/grpc-for-wcf-developers/media/create-project/create-new-grpc-service-v2.png index 3fda2867a7f88..a57aed30af823 100644 Binary files a/docs/architecture/grpc-for-wcf-developers/media/create-project/create-new-grpc-service-v2.png and b/docs/architecture/grpc-for-wcf-developers/media/create-project/create-new-grpc-service-v2.png differ diff --git a/docs/architecture/grpc-for-wcf-developers/migrate-wcf-to-grpc.md b/docs/architecture/grpc-for-wcf-developers/migrate-wcf-to-grpc.md index aea94b0a48ac3..b8dd59a1e1625 100644 --- a/docs/architecture/grpc-for-wcf-developers/migrate-wcf-to-grpc.md +++ b/docs/architecture/grpc-for-wcf-developers/migrate-wcf-to-grpc.md @@ -8,9 +8,9 @@ ms.date: 12/14/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -This chapter will describe how to work with ASP.NET Core 6.0 gRPC projects and demonstrate migrating different types of Windows Communication Foundation (WCF) services to the gRPC equivalent: +This chapter will describe how to work with ASP.NET Core 7.0 gRPC projects and demonstrate migrating different types of Windows Communication Foundation (WCF) services to the gRPC equivalent: -- Create an ASP.NET Core 6.0 gRPC project. +- Create an ASP.NET Core 7.0 gRPC project. - Simple request-reply operations to gRPC unary RPC. - One-way operations to gRPC client streaming RPC. - Full-duplex services to gRPC bidirectional streaming RPC. diff --git a/docs/architecture/grpc-for-wcf-developers/protobuf-enums.md b/docs/architecture/grpc-for-wcf-developers/protobuf-enums.md index 959f7cdd086f7..220665fa52700 100644 --- a/docs/architecture/grpc-for-wcf-developers/protobuf-enums.md +++ b/docs/architecture/grpc-for-wcf-developers/protobuf-enums.md @@ -47,7 +47,6 @@ enum AccountStatus { ACCOUNT_STATUS_ACTIVE = 2; ACCOUNT_STATUS_SUSPENDED = 3; ACCOUNT_STATUS_CLOSED = 4; - ACCOUNT_STATUS_CANCELLED = 4; } ``` diff --git a/docs/architecture/grpc-for-wcf-developers/self-hosted.md b/docs/architecture/grpc-for-wcf-developers/self-hosted.md index b4ae6a6731dfa..962e89ee23ece 100644 --- a/docs/architecture/grpc-for-wcf-developers/self-hosted.md +++ b/docs/architecture/grpc-for-wcf-developers/self-hosted.md @@ -8,9 +8,9 @@ ms.date: 12/14/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -Although ASP.NET Core 6.0 applications can be hosted in IIS on Windows Server, currently it isn't possible to host a gRPC application in IIS because some of the HTTP/2 functionality isn't supported. This functionality is a goal for a future update to Windows Server. +Although ASP.NET Core 7.0 applications can be hosted in IIS on Windows Server, currently it isn't possible to host a gRPC application in IIS because some of the HTTP/2 functionality isn't supported. This functionality is a goal for a future update to Windows Server. -You can run your application as a Windows service. Or you can run it as a Linux service controlled by [systemd](https://en.wikipedia.org/wiki/Systemd), because of new features in the .NET 6 hosting extensions. +You can run your application as a Windows service. Or you can run it as a Linux service controlled by [systemd](https://en.wikipedia.org/wiki/Systemd), because of features introduced in the .NET 6 hosting extensions. ## Run your app as a Windows service diff --git a/docs/architecture/grpc-for-wcf-developers/wcf-services-to-grpc-comparison.md b/docs/architecture/grpc-for-wcf-developers/wcf-services-to-grpc-comparison.md index 6c8be2817a8b4..f4c2bcfac2ac0 100644 --- a/docs/architecture/grpc-for-wcf-developers/wcf-services-to-grpc-comparison.md +++ b/docs/architecture/grpc-for-wcf-developers/wcf-services-to-grpc-comparison.md @@ -19,7 +19,7 @@ The previous chapter gave you a good look at Protobuf and how gRPC handles messa ## gRPC example -When you create a new ASP.NET Core 6.0 gRPC project from Visual Studio 2022 or the command line, the gRPC equivalent of "Hello World" is generated for you. It consists of a `greeter.proto` file that defines the service and its messages, and a `GreeterService.cs` file with an implementation of the service. +When you create a new ASP.NET Core 7.0 gRPC project from Visual Studio 2022 or the command line, the gRPC equivalent of "Hello World" is generated for you. It consists of a `greeter.proto` file that defines the service and its messages, and a `GreeterService.cs` file with an implementation of the service. ```protobuf syntax = "proto3"; diff --git a/docs/architecture/grpc-for-wcf-developers/why-grpc.md b/docs/architecture/grpc-for-wcf-developers/why-grpc.md index e770b25b2e29d..e74b56aca4529 100644 --- a/docs/architecture/grpc-for-wcf-developers/why-grpc.md +++ b/docs/architecture/grpc-for-wcf-developers/why-grpc.md @@ -14,7 +14,7 @@ Before we dive deeply into the language and techniques of gRPC, it's worth discu Although the implementation and approach are different for gRPC, the experience of developing and consuming services with gRPC should be intuitive for WCF developers. The underlying goal is the same: make it possible to code as though the client and server are on the same platform, without needing to worry about networking. -Both platforms share the principle of declaring and then implementing an interface, even though the process for declaring that interface is different. And as you'll see in chapter 5, the different types of RPC calls that gRPC supports map well to the bindings available to WCF services. +Both platforms share the principle of declaring and then implementing an interface, even though the process for declaring that interface is different. And as you'll see in [chapter 5](migrate-wcf-to-grpc.md), the different types of RPC calls that gRPC supports map well to the bindings available to WCF services. ## Benefits of gRPC @@ -44,6 +44,18 @@ gRPC allows clients to specify a maximum time for an RPC to finish. If the speci gRPC is implicitly secure when it's using HTTP/2 over a TLS end-to-end encrypted connection. Support for client certificate authentication (see [chapter 6](security.md)) further increases security and trust between client and server. +## Comparison with CoreWCF + +A notable alternative to gRPC for replacing WCF services when migrating to .NET is [CoreWCF](https://github.com/corewcf/corewcf). Both gRPC and CoreWCF are Microsoft endorsed paths forward for WCF applications and each comes with its own benefits and drawbacks. + +CoreWCF is a community-owned .NET Foundation project supported by Microsoft that implements WCF server APIs for .NET. CoreWCF is an effort to allow existing WCF services to work with minimal changes on .NET. Your Data Contracts for WCF are unchanged with CoreWCF, and it supports many of the bindings and APIs from WCF. The main differences are around the patterns for starting WCF services, and not all configuration options are available (some configuration must now be done in code). + +Services and interfaces can often migrate with few changes. Because of this, a key benefit of CoreWCF is its very high compatibility with WCF. Where changes have been made, they are to adapt to the programming style of modern .NET, for example hosting now through ASP.NET Core, and APIs now use the `Task` based async patterns usable with `await` rather than the older BeginXXX / EndXXX pattern. + +On the other hand, gRPC is a modern remote communication solution with a number of features, as discussed previously. Benefits of using gRPC include better interoperability across languages, its relatively simple modern API, and a broad community ecosystem. + +When deciding whether to use CoreWCF or gRPC to migrate a WCF application to .NET, CoreWCF is typically a better fit if the goal is to migrate the application with minimal changes whereas gRPC may be a better fit if the goal is to modernize the application while retargeting to .NET. The remainder of this guide focuses on that modernization with gRPC. + >[!div class="step-by-step"] >[Previous](network-protocols.md) >[Next](protocol-buffers.md) diff --git a/docs/architecture/maui/communicating-between-components.md b/docs/architecture/maui/communicating-between-components.md index 3a77f8e7b9b3e..588ca5e6bac6c 100644 --- a/docs/architecture/maui/communicating-between-components.md +++ b/docs/architecture/maui/communicating-between-components.md @@ -1,115 +1,115 @@ --- title: Communicating Between Components -description: Providing loosely-coupled messaging for a .NET MAUI application +description: Providing loosely-coupled messaging for a .NET MAUI application author: michaelstonis no-loc: [MAUI] -ms.date: 07/02/2022 +ms.date: 03/02/2023 --- # Communicating between loosely coupled components [!INCLUDE [download-alert](includes/download-alert.md)] -The publish-subscribe pattern is a messaging pattern in which publishers send messages without having knowledge of any receivers, known as subscribers. Similarly, subscribers listen for specific messages, without having knowledge of any publishers. +The publish-subscribe pattern is a messaging pattern in which publishers send messages without knowing any receivers, known as subscribers. Similarly, subscribers listen for specific messages, without knowing any publishers. -Events in .NET implement the publish-subscribe pattern, and are the most simple and straightforward approach for a communication layer between components if loose coupling is not required, such as a control and the page that contains it. However, the publisher and subscriber lifetimes are coupled by object references to each other, and the subscriber type must have a reference to the publisher type. This can create memory management issues, especially when there are short lived objects that subscribe to an event of a static or long-lived object. If the event handler isn't removed, the subscriber will be kept alive by the reference to it in the publisher, and this will prevent or delay the garbage collection of the subscriber. +Events in .NET implement the publish-subscribe pattern and are the most simple approach for a communication layer between components if loose coupling is not required, such as a control and the page that contains it. However, the publisher and subscriber lifetimes are coupled by object references to each other, and the subscriber type must have a reference to the publisher type. This can create memory management issues, especially when there are short-lived objects that subscribe to an event of a static or long-lived object. If the event handler isn't removed, the subscriber will be kept alive by the reference to it in the publisher, and this will prevent or delay the garbage collection of the subscriber. -## Introduction to MessagingCenter +## Introduction to MVVM Toolkit Messenger -The .NET MAUI `MessagingCenter` class implements the publish-subscribe pattern, allowing message-based communication between components that are inconvenient to link by object and type references. This mechanism allows publishers and subscribers to communicate without having a direct reference to each other, helping to reduce dependencies between components, while also allowing components to be independently developed and tested. +The MVVM Toolkit `IMessenger` interface describes the publish-subscribe pattern, allowing message-based communication between components that are inconvenient to link by object and type references. This mechanism allows publishers and subscribers to communicate without having a direct reference to each other, helping to reduce dependencies between components, while also allowing components to be independently developed and tested. -The `MessagingCenter` class provides multicast publish-subscribe functionality. This means that there can be multiple publishers that publish a single message, and there can be multiple subscribers listening for the same message. The image below illustrates this relationship: +> [!NOTE] +> The MVVM Toolkit Messenger is part of the `CommunityToolkit.Mvvm` package. For information on how to add the package to your project, see [Introduction to the MVVM Toolkit](/dotnet/communitytoolkit/mvvm/) on the Microsoft Developer Center. -![Multicast publish-subscribe functionality.](./media/messaging-center.png) +> [!WARNING] +> .NET MAUI contains a built-in `MessagingCenter` class which is no longer recommended for use and should be transitioned to the MVVM Toolkit Messenger. -Publishers send messages using the `MessagingCenter.Send` method, while subscribers listen for messages using the `MessagingCenter.Subscribe` method. In addition, subscribers can also unsubscribe from message subscriptions, if required, with the `MessagingCenter.Unsubscribe` method. +The `IMessenger` interface allows for multicast publish-subscribe functionality. This means that there can be multiple publishers that publish a single message, and there can be multiple subscribers listening to the same message. The image below illustrates this relationship: -Internally, the `MessagingCenter` class uses weak references. This means that it will not keep objects alive, and will allow them to be garbage collected. Therefore, it should only be necessary to unsubscribe from a message when a class no longer wishes to receive the message. +![Multicast publish-subscribe functionality.](./media/messaging-center.png) -The eShopOnContainers multi-platform app uses the `MessagingCenter` class to communicate between loosely coupled components. The app defines a single message. The `AddProduct` message is published by the `CatalogViewModel` class when an item is added to the shopping basket. In return, the `CatalogView` class subscribes to the message and uses this to highlight the product adds with an animation in response. +There are two implementations of the `IMessenger` interface that come with the `CommunityToolkit.Mvvm` package. The `WeakReferenceMessenger` uses weak references which can result in easier cleanup for message subscribers. This is a good option if your subscribers do not have a clearly defined lifecycle. The `StrongReferenceMessenger` uses strong references which can result in better performance and a more clearly controlled lifetime of the subscription. If you have a workflow with a very controlled lifetime (for example, a subscription that is bound to a page's `OnAppearing` and `OnDisappearing` methods), the `StrongReferenceManager` may be a better option, if performance is a concern. Both of these implementations are available with default implementations ready to use by referencing either `WeakReferenceMessenger.Default` or `StrongReferenceMessenger.Default`. > [!NOTE] -> While the `MessagingCenter` class permits communication between loosely-coupled classes, it does not offer the only architectural solution to this issue. For example, communication between a view model and a view can also be achieved by the binding engine and through property change notifications. In addition, communication between two view models can also be achieved by passing data during navigation. +> While the `IMessenger` interface permits communication between loosely-coupled classes, it does not offer the only architectural solution to this issue. For example, communication between a view model and a view can also be achieved by the binding engine and through property change notifications. In addition, communication between two view models can also be achieved by passing data during navigation. + +The eShopOnContainers multi-platform app uses the `WeakReferenceMessenger` class to communicate between loosely coupled components. The app defines a single message named `AddProductMessage`. The `AddProductMessage` is published by the `CatalogViewModel` class when an item is added to the shopping basket. In return, the `CatalogView` class subscribes to the message and uses this to highlight the product adds with animation in response. -In the eShopOnContainers multi-platform app, `MessagingCenter` is used to update in the UI in response to an action occurring in another class. Therefore, messages are published on the UI thread, with subscribers receiving the message on the same thread. +In the eShopOnContainers multi-platform app, `WeakReferenceMessenger` is used to update the UI in response to an action occurring in another class. Therefore, messages are published from the thread that the class is executing on, with subscribers receiving the message on the same thread. > [!TIP] > Marshal to the UI or main thread when performing UI updates. If updates to user interfaces are not made on this thread, it can cause the application to crash or become unstable. If a message that's sent from a background thread is required to update the UI, process the message on the UI thread in the subscriber by invoking the `MainThread.BeginInvokeOnMainThread` method. -For more information about `MessagingCenter`, see [MessagingCenter](/dotnet/maui/fundamentals/messagingcenter) on the Microsoft Developer Center. +For more information about `Messenger`, see [Messenger](/dotnet/communitytoolkit/mvvm/messenger) on the Microsoft Developer Center. ## Defining a message -`MessagingCenter` messages are strings that are used to identify messages. The following code example shows the messages defined within the eShopOnContainers multi-platform app: +`IMessenger` messages are custom objects that provide custom payloads. The following code example shows the `AddProductMessage` message defined within the eShopOnContainers multi-platform app: ```csharp -public static class MessengerKeys +public class AddProductMessage : ValueChangedMessage { -    // Add product to basket -    public const string AddProduct = nameof(AddProduct); + public AddProductMessage(int count) : base(count) + { + } } ``` -In this example, messages are defined using constants. The advantage of this approach is that it provides compile-time type safety and refactoring support. +The base class is defined using `ValueChangedMessage` where `T` can be of any type needed to pass data. Both message publishers and subscribers can expect messages of a specific type (for example, `AddProductMessage`). This can help ensure that both parties have agreed to a messaging contract and that the data provided with that contract will be consistent. Additionally, this approach provides compile-time type safety and refactoring support. ## Publishing a message -Publishers notify subscribers of a message with one of the `MessagingCenter.Send` overloads. The following code example demonstrates publishing the `AddProduct` message: +To publish a message, we will need to use the `IMessenger.Send` method. This can be accessed most commonly through `WeakReferenceMessenger.Default.Send` or `StrongReferenceMessenger.Default.Send`. The message sent can be of any object type. The following code example demonstrates publishing the `AddProduct` message: ```csharp -MessagingCenter.Send(this, MessengerKeys.AddProduct); +WeakReferenceMessenger.Default.Send(new Messages.AddProductMessage(BadgeCount)); ``` -In this example, the Send method specifies three arguments: - -- The first argument specifies the sender class. The sender class must be specified by any subscribers who wish to receive the message. -- The second argument specifies the message. +In this example, the `Send` method specifies provides a new instance of the `AddProductMessage` object for downstream subscribers to receive. An additional second token parameter can be added to use when multiple different subscribers need to receive messages of the same type without receiving the wrong message. -If needed, a third argument can specify the payload data to be sent to the subscriber. This payload can be any `object` type. It will be important that the subscriber of the message knows the expected payload type. - -The Send method will publish the message, and its payload data, using a fire-and-forget approach. Therefore, the message is sent even if there are no subscribers registered to receive the message. In this situation, the sent message is ignored. - -> [!NOTE] -> The `MessagingCenter.Send` method can use generic parameters to control how messages are delivered. Therefore, multiple messages that share a message identity but send different payload data types can be received by different subscribers. +The `Send` method will publish the message, and its payload data, using a fire-and-forget approach. Therefore, the message is sent even if there are no subscribers registered to receive the message. In this situation, the sent message is ignored. ## Subscribing to a message -Subscribers can register to receive a message using one of the `MessagingCenter.Subscribe` overloads. The following code example demonstrates how the eShopOnContainers multi-platform app subscribes to, and processes, the `AddProduct` message: +Subscribers can register to receive a message using one of the `IMessenger.Register` overloads. The following code example demonstrates how the eShopOnContainers multi-platform app subscribes to, and processes, the `AddProductMessage` message: ```csharp -MessagingCenter.Subscribe( - this, - MessengerKeys.AddProduct, - _ => - { - MainThread.BeginInvokeOnMainThread( - async () => - { - await badge.ScaleTo(1.2); - await badge.ScaleTo(1.0); - }); - }); +WeakReferenceMessenger.Default + .Register( + this, + async (recipient, message) => + { + await recipient.Dispatcher.DispatchAsync( + async () => + { + await recipient.badge.ScaleTo(1.2); + await recipient.badge.ScaleTo(1.0); + }); + }); ``` -In the preceding example, the Subscribe method subscribes to the `AddProduct` message, and executes a callback delegate in response to receiving the message. This callback delegate, specified as a lambda expression, executes code that updates the UI. +In the preceding example, the `Register` method subscribes to the `AddProductMessage` message and executes a callback delegate in response to receiving the message. This callback delegate, specified as a lambda expression, executes code that updates the UI. -If payload data is supplied, don't attempt to modify the payload data from within a callback delegate because several threads could be accessing the received data simultaneously. In this scenario, the payload data should be immutable to avoid concurrency errors. +> [!NOTE] +> Avoid the use of `this` within your callback delegate to avoid capturing that object within the delegate. This can help improve performance. Instead, use the `recipient` parameter. -A subscriber might not need to handle every instance of a published message, and this can be controlled by the generic type arguments that are specified on the Subscribe method. In this example, the subscriber will only receive `AddProduct` messages that are sent from the `CatalogViewModel` class. +If payload data is supplied, don't attempt to modify the payload data from within a callback delegate because several threads could be accessing the received data simultaneously. In this scenario, the payload data should be immutable to avoid concurrency errors. ## Unsubscribing from a message -Subscribers can unsubscribe from messages they no longer want to receive. This is achieved with one of the `MessagingCenter`.Unsubscribe overloads, as demonstrated in the following code example: +Subscribers can unsubscribe from messages they no longer want to receive. This is achieved with one of the `IMessenger.Unregister` overloads, as demonstrated in the following code example: ```csharp -MessagingCenter.Unsubscribe( - this, MessengerKeys.AddProduct); +WeakReferenceMessenger.Default.Unregister(this); ``` -In this example, the Unsubscribe method syntax reflects the type arguments specified when subscribing to receive the AddProduct message. +> [!NOTE] +> In this example, it isn't fully necessary to call `Unregister` as the `WeakReferenceMessenger` will allow unused objects to be garbage collected. If the `StrongReferenceMessenger` were used, it would be advised to call `Unregister` for any subscriptions that are no longer in use. + +In this example, the `Unsubscribe` method syntax specifies the type argument of the message and the recipient object that is listening for messages. ## Summary -The .NET MAUI `MessagingCenter` class implements the publish-subscribe pattern, allowing message-based communication between components that are inconvenient to link by object and type references. This mechanism allows publishers and subscribers to communicate without having a reference to each other, helping to reduce dependencies between components, while also allowing components to be independently developed and tested. +The MVVM Toolkit `IMessenger` interface describes the publish-subscribe pattern, allowing message-based communication between components that are inconvenient to link by object and type references. This mechanism allows publishers and subscribers to communicate without having a reference to each other, helping to reduce dependencies between components, while also allowing components to be independently developed and tested. diff --git a/docs/architecture/maui/dependency-injection.md b/docs/architecture/maui/dependency-injection.md index 77f440e33152d..995c545cd87a1 100644 --- a/docs/architecture/maui/dependency-injection.md +++ b/docs/architecture/maui/dependency-injection.md @@ -148,7 +148,7 @@ Generally, when a type is resolved, one of three things happens: 2. If the type has been registered as a singleton, the container returns the singleton instance. If this is the first time the type is called for, the container creates it if required and maintains a reference to it. 3. If the type has been registered as transient, the container returns a new instance and doesn't maintain a reference to it. -.NET MAUI offers a number of ways to resolve registered components based on your needs. The most direct way to gain acces to the dependency injection container is from an `Element` using the `Handler.MauiContext.Services`. An example of this is shown below: +.NET MAUI offers a number of ways to resolve registered components based on your needs. The most direct way to gain access to the dependency injection container is from an `Element` using the `Handler.MauiContext.Services`. An example of this is shown below: ```csharp var settingsService = this.Handler.MauiContext.Services.GetServices(); diff --git a/docs/architecture/maui/mvvm-community-toolkit-features.md b/docs/architecture/maui/mvvm-community-toolkit-features.md new file mode 100644 index 0000000000000..ccbc3fb6105cd --- /dev/null +++ b/docs/architecture/maui/mvvm-community-toolkit-features.md @@ -0,0 +1,209 @@ +--- +title: MVVM Toolkit Features +description: Helper components to simplify app development and maintenance +author: michaelstonis +no-loc: [MAUI] +ms.date: 03/10/2023 +--- + +# MVVM Toolkit Features + +[!INCLUDE [download-alert](includes/download-alert.md)] + +## MVVM Toolkit + +The [Model-View-ViewModel (MVVM)](mvvm.md) pattern is a great structural basis for creating our applications. In this pattern, the ViewModel becomes the backbone of our application as it provides communication to our front-end user interface and backing components. To provide integration with the user interface, we will rely on the ViewModel's properties and commands. As detailed in [Updating views in response to changes in the underlying view model or model](mvvm.md#updating-views-in-response-to-changes-in-the-underlying-view-model-or-model), the `INotifyPropertyChanged` interface on our ViewModel to allows changes to our properties to notify when the value is changed. Implementing all of these features means that our ViewModel can end up becoming very verbose. For example, the following code shows a simple ViewModel with properties that raise changes: + +```csharp +public class SampleViewModel : INotifyPropertyChanged +{ + private string _name; + private int _value; + + public event PropertyChangedEventHandler PropertyChanged; + + public string Name + { + get => _name; + set => SetPropertyValue(ref _name, value); + } + + public int Value + { + get => _value; + set => SetPropertyValue(ref _value, value); + } + + protected void SetPropertyValue(ref T storageField, T newValue, [CallerMemberName] string propertyName = "") + { + if (Equals(storageField, newValue)) + return; + + storageField = newValue; + RaisePropertyChanged(propertyName); + } + + protected virtual void RaisePropertyChanged([CallerMemberName] string propertyName = "") + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } +} +``` + +While some optimizations could be made over time, we will still end up with a fairly verbose set of code for defining our ViewModel. This code can be difficult to maintain and becomes error-prone. + +The [CommunityToolkit.Mvvm NuGet Package](/dotnet/communitytoolkit/mvvm/) (aka MVVM Toolkit) can be used to help address and simplify these common MVVM patterns. The MVVM Toolkit, along with newer features to the .NET language, allows for simplified logic, easy adoption into a project, and runtime independence. The example below shows the same ViewModel using components that come with the MVVM Toolkit: + +```csharp +public partial class SampleViewModel : ObservableObject +{ + [ObservableProperty] + private string _name; + + [ObservableProperty] + private int _value; +} +``` + +> [!NOTE] +> The MVVM Toolkit is provided with the `CommunityToolkit.Mvvm` package. For information on how to add the package to your project, see [Introduction to the MVVM Toolkit](/dotnet/communitytoolkit/mvvm/) on the Microsoft Developer Center. + +In comparison to the original example, we were able to drastically reduce the overall complexity and simplify the maintainability of our ViewModel. The MVVM Toolkit comes with many pre-built common components and features, such as the `ObservableObject` shown above, that simplifies and standardizes the code that we have throughout the application. + +## `ObservableObject` + +The MVVM Toolkit provides `ObservableObject` which is intended for use as the base of our `ViewModel` objects or any object that needs to raise change notifications. It implements `INotifyPropertyChanged` and `INotifyPropertyChanging` along with helper methods for setting properties and raising changes. Below is an example of a standard ViewModel using `ObservableObject`: + +```csharp +public class SampleViewModel : ObservableObject +{ + private string _name; + private int _value; + + public string Name + { + get => _name; + set => SetProperty(ref _name, value); + } + + public int Value + { + get => _value; + set => SetProperty(ref _value, value); + } +} +``` + +`ObservableObject` handles all of the logic needed for raising change notifications by using the `SetProperty` method in your property setter. If you have a property that returns a `Task`, the `SetPropertyAndNotifyOnCompletion` method can be used to delay publishing a property change until the task has been completed. The methods `OnPropertyChanged` and `OnPropertyChanging` that can also be used for raising property changes where needed in your object. + +For more detailed information on `ObservableObject`, see [ObservableObject](/dotnet/communitytoolkit/mvvm/observableobject) in the MVVM Toolkit Developer Center. + +## `RelayCommand` and `AsyncRelayCommand` + +Interaction between .NET MAUI controls (for example, tapping a button or selecting an item from a collection) and the ViewModel is done with the `ICommand` interface. .NET MAUI comes with a default implementation of `ICommand` with the `Command` object. .NET MAUI's `Command` is fairly basic and lacks support for more advanced features, such as supporting asynchronous work and command execution status. + +The MVVM Toolkit comes with two commands, `RelayCommand` and `AsyncRelayCommand`. `RelayCommand` is intended for situations where you have synchronous code to execute and has a fairly similar implementation to the .NET MAUI `Command` object. + +> [!NOTE] +> Even though the .NET MAUI `Command` and `RelayCommand` are similar, using `RelayCommand` allows for decoupling your ViewModel from any direct .NET MAUI references. This means that your ViewModel is more portable, leading to easier reuse across projects. + +`AsyncRelayCommand` provides many additional features when working with asynchronous workflows. This is quite common in our ViewModel as we are typically communicating with repositories, APIs, databases, and other systems that utilize `async/await`. The `AsyncRelayCommand` constructor takes in an execution task defined as a `Func` or a delegate returning `Task` as part of the constructor. While the execution task is running, `AsyncRelayCommand` will monitor the state of the task and provides updates using the `IsRunning` property. The `IsRunning` property can be bound to the UI which helps manage control states such as showing loading with an `ActivityIndicator` or disabling/enabling a control. While the execution task is being executed, the `Cancel` method can be called to attempt cancellation of the execution task, if supported. + +By default, `AsyncRelayCommand` doesn't allow concurrent execution. This is very helpful in situations where a user could unintentionally tap a control multiple times to execute a long-running or costly operation. During task execution, `AsyncRelayCommand` will automatically call the `CanExecuteChanged` event. In .NET MAUI, controls that support the `Command` and `CommandParameter` properties, such as `Button`, will listen to this event and automatically enable or disable it during execution. This functionality can be overridden by using a custom `canExecute` parameter or setting the `AsyncRelayCommandOptions.AllowConcurrentExecutions` flag in the constructor. + +For more detailed information on implementing commands, see the section [Implementing commands](mvvm.md#implementing-commands) in the MVVM chapter. Detailed information for the `RelayCommand` and `AsyncRelayCommand` is available in the [Commanding](/dotnet/communitytoolkit/mvvm/relaycommand) of the MVVM Toolkit Developer Center. + +## Source Generators + +Using the MVVM Toolkit components out-of-the-box allows you to greatly simplify our ViewModel. The MVVM Toolkit allows you to simplify common code use cases even further by using [Source Generators](../../csharp/roslyn-sdk/source-generators-overview.md). The MVVM Toolkit source generators look for specific attributes in our code and can generate wrappers for properties and commands. + +> [!IMPORTANT] +> The MVVM Toolkit Source Generators generate code that is additive to our existing objects. Because of this, any object that is leveraging a source generator will need to be marked as `partial`. + +The MVVM Toolkit `ObservableProperty` attribute can be applied to fields in objects that inherit from `ObservableObject` and will wrap a private field with a property that generates changes. The following code shows an example of using the `ObservableObject` attribute on the `_name` field: + +```csharp +public partial class SampleViewModel : ObservableObject +{ + [ObservableProperty] + private string _name; +} +``` + +With the `ObservableProperty` attribute applied to the `_name` field, the source generator will run and generate another partial class with the following code: + +```csharp +partial class SampleViewModel +{ + public string Name + { + get => _name; + set + { + if (!EqualityComparer.Default.Equals(_name, value)) + { + OnNameChanging(value); + OnPropertyChanging("Name"); + _name = value; + OnNameChanged(value); + OnPropertyChanged("Name"); + } + } + } +} +``` + +The generated `SampleViewModel` has used the private `_name` field and generated a new `Name` property that implements all of the logic needed for raising change notifications. + +The MVVM Toolkit `RelayCommand` attribute can be applied to methods within an `ObservableObject` and will create a corresponding `RelayCommand` or `AsyncRelayCommand`. The following code shows examples of using the `RelayCommand` attribute: + +```csharp +public partial class SampleViewModel : ObservableObject +{ + public INavigationService NavigationService { get; set; } + + [ObservableProperty] + private string _name; + + [ObservableProperty] + bool _isValid; + + [RelayCommand] + private Task SettingsAsync() + { + return NavigationService.NavigateToAsync("Settings"); + } + + [RelayCommand] + private void Validate() + { + IsValid = !string.IsNullOrEmpty(Name); + } +} +``` + +The `RelayCommand` applied to the `Validate` method will generate a `RelayCommand` validate `ValidateCommand` because it has a `void` return and the `SettingsAsync` method will generate an `AsyncRelayCommand` named `SettingsCommand`. The source generator will generate the following code in other partial classes: + +```csharp +partial class SampleViewModel +{ + private AsyncRelayCommand? settingsCommand; + + SettingsCommand => settingsCommand ??= new AsyncRelayCommand(SettingsAsync); +} + +partial class SampleViewModel +{ + private RelayCommand? validateCommand; + + public IRelayCommand ValidateCommand => validateCommand ??= new RelayCommand(Validate); +} +``` + +All of the complexity of wrapping our ViewModel's methods with an `ICommand` implementation has been handled by the source generator. + +For more detailed information on MVVM Toolkit Source Generators, see [MVVM source generators](/dotnet/communitytoolkit/mvvm/generators/overview) in the MVVM Toolkit Developer Center. + +## Summary + +The MVVM Toolkit is a great way to standardize and simplify our ViewModel code. The MVVM toolkit offers great implementations of standard MVVM components such as `ObservableObject` and `Async/RelayCommand`. The source generators help simplify our ViewModel properties and commands by generating all of the boilerplate code needed for user interface interactions. The MVVM Toolkit offers even more features outside of what has been shown in this chapter. For more information on the MVVM Toolkit, see [Introduction to the MVVM Toolkit](/dotnet/communitytoolkit/mvvm/) in the MVVM Toolkit Developer Center. diff --git a/docs/architecture/maui/navigation.md b/docs/architecture/maui/navigation.md index 0acd05d8ac896..475f6314b5f5a 100644 --- a/docs/architecture/maui/navigation.md +++ b/docs/architecture/maui/navigation.md @@ -160,7 +160,7 @@ public Task InitializeAsync() { return NavigateToAsync(string.IsNullOrEmpty(_settingsService.AuthAccessToken) ? "//Login" - : "//Main/Catalog"; + : "//Main/Catalog"); } ``` diff --git a/docs/architecture/maui/toc.yml b/docs/architecture/maui/toc.yml index a726ebe37ace2..9d3bdbdb3889d 100644 --- a/docs/architecture/maui/toc.yml +++ b/docs/architecture/maui/toc.yml @@ -24,5 +24,7 @@ items: href: accessing-remote-data.md - name: Authentication and Authorization href: authentication-and-authorization.md + - name: MVVM Community Toolkit Features + href: mvvm-community-toolkit-features.md - name: Unit Testing href: unit-testing.md diff --git a/docs/architecture/microservices/architect-microservice-container-applications/distributed-data-management.md b/docs/architecture/microservices/architect-microservice-container-applications/distributed-data-management.md index 8bc53102e3723..16c8a9cac2fc6 100644 --- a/docs/architecture/microservices/architect-microservice-container-applications/distributed-data-management.md +++ b/docs/architecture/microservices/architect-microservice-container-applications/distributed-data-management.md @@ -21,6 +21,8 @@ A second challenge is how to implement queries that retrieve data from several m **API Gateway.** For simple data aggregation from multiple microservices that own different databases, the recommended approach is an aggregation microservice referred to as an API Gateway. However, you need to be careful about implementing this pattern, because it can be a choke point in your system, and it can violate the principle of microservice autonomy. To mitigate this possibility, you can have multiple fined-grained API Gateways each one focusing on a vertical "slice" or business area of the system. The API Gateway pattern is explained in more detail in the [API Gateway section](direct-client-to-microservice-communication-versus-the-api-gateway-pattern.md#why-consider-api-gateways-instead-of-direct-client-to-microservice-communication) later. +**GraphQL Federation** One option to consider if your microservices are already using GraphQL is [GraphQL Federation](https://www.apollographql.com/docs/federation/). Federation allows you to define "subgraphs" from other services and compose them into an aggregate "supergraph" that acts as a standalone schema. + **CQRS with query/reads tables.** Another solution for aggregating data from multiple microservices is the [Materialized View pattern](/azure/architecture/patterns/materialized-view). In this approach, you generate, in advance (prepare denormalized data before the actual queries happen), a read-only table with the data that's owned by multiple microservices. The table has a format suited to the client app's needs. Consider something like the screen for a mobile app. If you have a single database, you might pull together the data for that screen using a SQL query that performs a complex join involving multiple tables. However, when you have multiple databases, and each database is owned by a different microservice, you cannot query those databases and create a SQL join. Your complex query becomes a challenge. You can address the requirement using a CQRS approach—you create a denormalized table in a different database that's used just for queries. The table can be designed specifically for the data you need for the complex query, with a one-to-one relationship between fields needed by your application's screen and the columns in the query table. It could also serve for reporting purposes. diff --git a/docs/architecture/microservices/container-docker-introduction/docker-terminology.md b/docs/architecture/microservices/container-docker-introduction/docker-terminology.md index 80b6eea56693a..3688049d392db 100644 --- a/docs/architecture/microservices/container-docker-introduction/docker-terminology.md +++ b/docs/architecture/microservices/container-docker-introduction/docker-terminology.md @@ -31,7 +31,7 @@ docker build **Registry**: A service that provides access to repositories. The default registry for most public images is [Docker Hub](https://hub.docker.com/) (owned by Docker as an organization). A registry usually contains repositories from multiple teams. Companies often have private registries to store and manage images they've created. Azure Container Registry is another example. -**Multi-arch image**: For multi-architecture, it's a feature that simplifies the selection of the appropriate image, according to the platform where Docker is running. For example, when a Dockerfile requests a base image **FROM mcr.microsoft.com/dotnet/sdk:6.0** from the registry, it actually gets **6.0-nanoserver-20H2**, **6.0-nanoserver-1809** or **6.0-bullseye-slim**, depending on the operating system and version where Docker is running. +**Multi-arch image**: For multi-architecture (or [multi-platform](https://docs.docker.com/build/building/multi-platform/)), it's a Docker feature that simplifies the selection of the appropriate image, according to the platform where Docker is running. For example, when a Dockerfile requests a base image **FROM mcr.microsoft.com/dotnet/sdk:7.0** from the registry, it actually gets **7.0-nanoserver-ltsc2022**, **7.0-nanoserver-1809** or **7.0-bullseye-slim**, depending on the operating system and version where Docker is running. **Docker Hub**: A public registry to upload images and work with them. Docker Hub provides Docker image hosting, public or private registries, build triggers and web hooks, and integration with GitHub and Bitbucket. diff --git a/docs/architecture/microservices/docker-application-development-process/docker-app-development-workflow.md b/docs/architecture/microservices/docker-application-development-process/docker-app-development-workflow.md index 1d51b685b8649..57220a73ac48e 100644 --- a/docs/architecture/microservices/docker-application-development-process/docker-app-development-workflow.md +++ b/docs/architecture/microservices/docker-application-development-process/docker-app-development-workflow.md @@ -93,14 +93,14 @@ In a similar fashion, Visual Studio can also add a `docker-compose.yml` file for You usually build a custom image for your container on top of a base image you get from an official repository like the [Docker Hub](https://hub.docker.com/) registry. That is precisely what happens under the covers when you enable Docker support in Visual Studio. Your Dockerfile will use an existing `dotnet/core/aspnet` image. -Earlier we explained which Docker images and repos you can use, depending on the framework and OS you have chosen. For instance, if you want to use ASP.NET Core (Linux or Windows), the image to use is `mcr.microsoft.com/dotnet/aspnet:6.0`. Therefore, you just need to specify what base Docker image you will use for your container. You do that by adding `FROM mcr.microsoft.com/dotnet/aspnet:6.0` to your Dockerfile. This will be automatically performed by Visual Studio, but if you were to update the version, you update this value. +Earlier we explained which Docker images and repos you can use, depending on the framework and OS you have chosen. For instance, if you want to use ASP.NET Core (Linux or Windows), the image to use is `mcr.microsoft.com/dotnet/aspnet:7.0`. Therefore, you just need to specify what base Docker image you will use for your container. You do that by adding `FROM mcr.microsoft.com/dotnet/aspnet:7.0` to your Dockerfile. This will be automatically performed by Visual Studio, but if you were to update the version, you update this value. Using an official .NET image repository from Docker Hub with a version number ensures that the same language features are available on all machines (including development, testing, and production). The following example shows a sample Dockerfile for an ASP.NET Core container. ```dockerfile -FROM mcr.microsoft.com/dotnet/aspnet:6.0 +FROM mcr.microsoft.com/dotnet/aspnet:7.0 ARG source WORKDIR /app EXPOSE 80 @@ -108,13 +108,13 @@ COPY ${source:-obj/Docker/publish} . ENTRYPOINT ["dotnet", " MySingleContainerWebApp.dll "] ``` -In this case, the image is based on version 6.0 of the official ASP.NET Core Docker image (multi-arch for Linux and Windows). This is the setting `FROM mcr.microsoft.com/dotnet/aspnet:6.0`. (For more information about this base image, see the [ASP.NET Core Docker Image](https://hub.docker.com/_/microsoft-dotnet-aspnet/) page.) In the Dockerfile, you also need to instruct Docker to listen on the TCP port you will use at runtime (in this case, port 80, as configured with the EXPOSE setting). +In this case, the image is based on version 7.0 of the official ASP.NET Core Docker image (multi-arch for Linux and Windows). This is the setting `FROM mcr.microsoft.com/dotnet/aspnet:7.0`. (For more information about this base image, see the [ASP.NET Core Docker Image](https://hub.docker.com/_/microsoft-dotnet-aspnet/) page.) In the Dockerfile, you also need to instruct Docker to listen on the TCP port you will use at runtime (in this case, port 80, as configured with the EXPOSE setting). You can specify additional configuration settings in the Dockerfile, depending on the language and framework you're using. For instance, the ENTRYPOINT line with `["dotnet", "MySingleContainerWebApp.dll"]` tells Docker to run a .NET application. If you're using the SDK and the .NET CLI (dotnet CLI) to build and run the .NET application, this setting would be different. The bottom line is that the ENTRYPOINT line and other settings will be different depending on the language and platform you choose for your application. ### Additional resources -- **Building Docker Images for .NET 6 Applications** \ +- **Building Docker Images for ASP.NET Core Applications** \ [https://learn.microsoft.com/dotnet/core/docker/building-net-docker-images](/aspnet/core/host-and-deploy/docker/building-net-docker-images) - **Build your own image**. In the official Docker documentation.\ @@ -132,16 +132,16 @@ A single repo can contain platform variants, such as a Linux image and a Windows If you specify a tag, targeting a platform that is explicit like in the following cases: -- `mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim` \ - Targets: .NET 6 runtime-only on Linux +- `mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim` \ + Targets: .NET 7 runtime-only on Linux -- `mcr.microsoft.com/dotnet/aspnet:6.0-nanoserver-ltsc2022` \ - Targets: .NET 6 runtime-only on Windows Nano Server +- `mcr.microsoft.com/dotnet/aspnet:7.0-nanoserver-ltsc2022` \ + Targets: .NET 7 runtime-only on Windows Nano Server But, if you specify the same image name, even with the same tag, the multi-arch images (like the `aspnet` image) will use the Linux or Windows version depending on the Docker host OS you're deploying, as shown in the following example: -- `mcr.microsoft.com/dotnet/aspnet:6.0` \ - Multi-arch: .NET 6 runtime-only on Linux or Windows Nano Server depending on the Docker host OS +- `mcr.microsoft.com/dotnet/aspnet:7.0` \ + Multi-arch: .NET 7 runtime-only on Linux or Windows Nano Server depending on the Docker host OS This way, when you pull an image from a Windows host, it will pull the Windows variant, and pulling the same image name from a Linux host will pull the Linux variant. @@ -170,11 +170,11 @@ Probably the best way to understand multi-stage is going through a Dockerfile in The initial Dockerfile might look something like this: ```dockerfile - 1 FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base + 1 FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base 2 WORKDIR /app 3 EXPOSE 80 4 - 5 FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build + 5 FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build 6 WORKDIR /src 7 COPY src/Services/Catalog/Catalog.API/Catalog.API.csproj … 8 COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks … @@ -273,11 +273,11 @@ For the final optimization, it just happens that line 20 is redundant, as line 2 The resulting file is then: ```dockerfile - 1 FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base + 1 FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base 2 WORKDIR /app 3 EXPOSE 80 4 - 5 FROM mcr.microsoft.com/dotnet/sdk:6.0 AS publish + 5 FROM mcr.microsoft.com/dotnet/sdk:7.0 AS publish 6 WORKDIR /src 7 COPY . . 8 RUN dotnet restore /ignoreprojectextensions:.dcproj diff --git a/docs/architecture/microservices/docker-application-development-process/index.md b/docs/architecture/microservices/docker-application-development-process/index.md index c0ad3b8ad2889..873f5f342909d 100644 --- a/docs/architecture/microservices/docker-application-development-process/index.md +++ b/docs/architecture/microservices/docker-application-development-process/index.md @@ -15,9 +15,9 @@ ms.date: 11/19/2021 Whether you prefer a full and powerful IDE or a lightweight and agile editor, Microsoft has tools that you can use for developing Docker applications. -**Visual Studio (for Windows).** Docker-based .NET 6 application development with Visual Studio requires Visual Studio 2022 version 17.0 or later. Visual Studio 2022 comes with tools for Docker already built in. The tools for Docker let you develop, run, and validate your applications directly in the target Docker environment. You can press F5 to run and debug your application (single container or multiple containers) directly into a Docker host, or press CTRL + F5 to edit and refresh your application without having to rebuild the container. This IDE is the most powerful development choice for Docker-based apps. +**Visual Studio (for Windows).** Docker-based .NET 7 application development with Visual Studio requires Visual Studio 2022 version 17.0 or later. Visual Studio 2022 comes with tools for Docker already built in. The tools for Docker let you develop, run, and validate your applications directly in the target Docker environment. You can press F5 to run and debug your application (single container or multiple containers) directly into a Docker host, or press CTRL + F5 to edit and refresh your application without having to rebuild the container. This IDE is the most powerful development choice for Docker-based apps. -**Visual Studio for Mac.** It's an IDE, evolution of Xamarin Studio, running in macOS. For .NET 6 development, it requires version 8.4 or later. This tool should be the preferred choice for developers working in macOS machines who also want to use a powerful IDE. +**Visual Studio for Mac.** It's an IDE, evolution of Xamarin Studio, running in macOS. This tool should be the preferred choice for developers working in macOS machines who also want to use a powerful IDE. **Visual Studio Code and Docker CLI**. If you prefer a lightweight and cross-platform editor that supports any development language, you can use Visual Studio Code and the Docker CLI. This IDE is a cross-platform development approach for macOS, Linux, and Windows. Additionally, Visual Studio Code supports extensions for Docker such as IntelliSense for Dockerfiles and shortcut tasks to run Docker commands from the editor. @@ -39,7 +39,7 @@ By installing [Docker Desktop](https://hub.docker.com/search/?type=edition&offer ## .NET languages and frameworks for Docker containers -As mentioned in earlier sections of this guide, you can use .NET Framework, .NET 6, or the open-source Mono project when developing Docker containerized .NET applications. You can develop in C\#, F\#, or Visual Basic when targeting Linux or Windows Containers, depending on which .NET framework is in use. For more details about.NET languages, see the blog post [The .NET Language Strategy](https://devblogs.microsoft.com/dotnet/the-net-language-strategy/). +As mentioned in earlier sections of this guide, you can use .NET Framework, .NET 7, or the open-source Mono project when developing Docker containerized .NET applications. You can develop in C\#, F\#, or Visual Basic when targeting Linux or Windows Containers, depending on which .NET framework is in use. For more details about.NET languages, see the blog post [The .NET Language Strategy](https://devblogs.microsoft.com/dotnet/the-net-language-strategy/). >[!div class="step-by-step"] >[Previous](../architect-microservice-container-applications/scalable-available-multi-container-microservice-applications.md) diff --git a/docs/architecture/microservices/implement-resilient-applications/implement-circuit-breaker-pattern.md b/docs/architecture/microservices/implement-resilient-applications/implement-circuit-breaker-pattern.md index 3e5a7a6fc0387..ee19c97e8b8a7 100644 --- a/docs/architecture/microservices/implement-resilient-applications/implement-circuit-breaker-pattern.md +++ b/docs/architecture/microservices/implement-resilient-applications/implement-circuit-breaker-pattern.md @@ -28,14 +28,14 @@ As when implementing retries, the recommended approach for circuit breakers is t Adding a circuit breaker policy into your `IHttpClientFactory` outgoing middleware pipeline is as simple as adding a single incremental piece of code to what you already have when using `IHttpClientFactory`. -The only addition here to the code used for HTTP call retries is the code where you add the Circuit Breaker policy to the list of policies to use, as shown in the following incremental code, part of the `ConfigureServices()` method. +The only addition here to the code used for HTTP call retries is the code where you add the Circuit Breaker policy to the list of policies to use, as shown in the following incremental code. ```csharp -//ConfigureServices() - Startup.cs +// Program.cs var retryPolicy = GetRetryPolicy(); var circuitBreakerPolicy = GetCircuitBreakerPolicy(); -services.AddHttpClient() +builder.Services.AddHttpClient() .SetHandlerLifetime(TimeSpan.FromMinutes(5)) // Sample: default lifetime is 2 minutes .AddHttpMessageHandler() .AddPolicyHandler(retryPolicy) @@ -47,6 +47,7 @@ The `AddPolicyHandler()` method is what adds policies to the `HttpClient` object To have a more modular approach, the Circuit Breaker Policy is defined in a separate method called `GetCircuitBreakerPolicy()`, as shown in the following code: ```csharp +// also in Program.cs static IAsyncPolicy GetCircuitBreakerPolicy() { return HttpPolicyExtensions diff --git a/docs/architecture/microservices/implement-resilient-applications/implement-http-call-retries-exponential-backoff-polly.md b/docs/architecture/microservices/implement-resilient-applications/implement-http-call-retries-exponential-backoff-polly.md index 4aa1342a73580..12f0010a7dd4b 100644 --- a/docs/architecture/microservices/implement-resilient-applications/implement-http-call-retries-exponential-backoff-polly.md +++ b/docs/architecture/microservices/implement-resilient-applications/implement-http-call-retries-exponential-backoff-polly.md @@ -14,24 +14,24 @@ Polly is a .NET library that provides resilience and transient-fault handling ca The following steps show how you can use Http retries with Polly integrated into `IHttpClientFactory`, which is explained in the previous section. -**Reference the .NET 6 packages** +**Reference the .NET 7 packages** -`IHttpClientFactory` is available since .NET Core 2.1, however, we recommend you use the latest .NET 6 packages from NuGet in your project. You typically also need to reference the extension package `Microsoft.Extensions.Http.Polly`. +`IHttpClientFactory` is available since .NET Core 2.1, however, we recommend you use the latest .NET 7 packages from NuGet in your project. You typically also need to reference the extension package `Microsoft.Extensions.Http.Polly`. -**Configure a client with Polly's Retry policy, in Startup** +**Configure a client with Polly's Retry policy, in app startup** -As shown in previous sections, you need to define a named or typed client HttpClient configuration in your standard `Startup.ConfigureServices(...)` method, but now, you add incremental code specifying the policy for the Http retries with exponential backoff, as below: +As shown in previous sections, you need to define a named or typed client HttpClient configuration in your standard _Program.cs_ app configuration. Now you add incremental code specifying the policy for the Http retries with exponential backoff, as below: ```csharp -//ConfigureServices() - Startup.cs -services.AddHttpClient() +// Program.cs +builder.Services.AddHttpClient() .SetHandlerLifetime(TimeSpan.FromMinutes(5)) //Set lifetime to five minutes .AddPolicyHandler(GetRetryPolicy()); ``` The **AddPolicyHandler()** method is what adds policies to the `HttpClient` objects you'll use. In this case, it's adding a Polly's policy for Http Retries with exponential backoff. -To have a more modular approach, the Http Retry Policy can be defined in a separate method within the `Startup.cs` file, as shown in the following code: +To have a more modular approach, the Http Retry Policy can be defined in a separate method within the _Program.cs_ file, as shown in the following code: ```csharp static IAsyncPolicy GetRetryPolicy() diff --git a/docs/architecture/microservices/implement-resilient-applications/implement-resilient-entity-framework-core-sql-connections.md b/docs/architecture/microservices/implement-resilient-applications/implement-resilient-entity-framework-core-sql-connections.md index 8ceeaf8a807d6..34cedbd2b8935 100644 --- a/docs/architecture/microservices/implement-resilient-applications/implement-resilient-entity-framework-core-sql-connections.md +++ b/docs/architecture/microservices/implement-resilient-applications/implement-resilient-entity-framework-core-sql-connections.md @@ -12,27 +12,19 @@ For Azure SQL DB, Entity Framework (EF) Core already provides internal database For instance, the following code at the EF Core connection level enables resilient SQL connections that are retried if the connection fails. ```csharp -// Startup.cs from any ASP.NET Core Web API -public class Startup -{ - // Other code ... - public IServiceProvider ConfigureServices(IServiceCollection services) +// Program.cs from any ASP.NET Core Web API +// Other code ... +builder.Services.AddDbContext(options => { - // ... - services.AddDbContext(options => + options.UseSqlServer(builder.Configuration["ConnectionString"], + sqlServerOptionsAction: sqlOptions => { - options.UseSqlServer(Configuration["ConnectionString"], - sqlServerOptionsAction: sqlOptions => - { - sqlOptions.EnableRetryOnFailure( - maxRetryCount: 10, - maxRetryDelay: TimeSpan.FromSeconds(30), - errorNumbersToAdd: null); - }); + sqlOptions.EnableRetryOnFailure( + maxRetryCount: 10, + maxRetryDelay: TimeSpan.FromSeconds(30), + errorNumbersToAdd: null); }); - } -//... -} + }); ``` ## Execution strategies and explicit transactions using BeginTransaction and multiple DbContexts diff --git a/docs/architecture/microservices/implement-resilient-applications/monitor-app-health.md b/docs/architecture/microservices/implement-resilient-applications/monitor-app-health.md index de35643ab467e..f1b3048810721 100644 --- a/docs/architecture/microservices/implement-resilient-applications/monitor-app-health.md +++ b/docs/architecture/microservices/implement-resilient-applications/monitor-app-health.md @@ -23,27 +23,24 @@ To use this feature effectively, you need to first configure services in your mi ### Use the HealthChecks feature in your back-end ASP.NET microservices -In this section, you'll learn how to implement the HealthChecks feature in a sample ASP.NET Core 6.0 Web API application when using the [Microsoft.Extensions.Diagnostics.HealthChecks](https://www.nuget.org/packages/Microsoft.Extensions.Diagnostics.HealthChecks) package. The Implementation of this feature in a large-scale microservices like the eShopOnContainers is explained in the next section. +In this section, you'll learn how to implement the HealthChecks feature in a sample ASP.NET Core 7.0 Web API application when using the [Microsoft.Extensions.Diagnostics.HealthChecks](https://www.nuget.org/packages/Microsoft.Extensions.Diagnostics.HealthChecks) package. The Implementation of this feature in a large-scale microservices like the eShopOnContainers is explained in the next section. To begin, you need to define what constitutes a healthy status for each microservice. In the sample application, we define the microservice is healthy if its API is accessible via HTTP and its related SQL Server database is also available. -In .NET 6, with the built-in APIs, you can configure the services, add a Health Check for the microservice and its dependent SQL Server database in this way: +In .NET 7, with the built-in APIs, you can configure the services, add a Health Check for the microservice and its dependent SQL Server database in this way: ```csharp -// Startup.cs from .NET 6 Web API sample -// -public void ConfigureServices(IServiceCollection services) -{ - //... - // Registers required services for health checks - services.AddHealthChecks() - // Add a health check for a SQL Server database - .AddCheck( - "OrderingDB-check", - new SqlConnectionHealthCheck(Configuration["ConnectionString"]), - HealthStatus.Unhealthy, - new string[] { "orderingdb" }); -} +// Program.cs from .NET 7 Web API sample + +//... +// Registers required services for health checks +builder.Services.AddHealthChecks() + // Add a health check for a SQL Server database + .AddCheck( + "OrderingDB-check", + new SqlConnectionHealthCheck(builder.Configuration["ConnectionString"]), + HealthStatus.Unhealthy, + new string[] { "orderingdb" }); ``` In the previous code, the `services.AddHealthChecks()` method configures a basic HTTP check that returns a status code **200** with "Healthy". Further, the `AddCheck()` extension method configures a custom `SqlConnectionHealthCheck` that checks the related SQL Database's health. @@ -105,19 +102,9 @@ Note that in the previous code, `Select 1` is the query used to check the Health Finally, add a middleware that responds to the url path `/hc`: ```csharp -// Startup.cs from .NET 6 Web Api sample -// -public void Configure(IApplicationBuilder app, IHostingEnvironment env) -{ - //… - app.UseEndpoints(endpoints => - { - //... - endpoints.MapHealthChecks("/hc"); - //... - }); - //… -} +// Program.cs from .NET 7 Web Api sample + +app.MapHealthChecks("/hc"); ``` When the endpoint `/hc` is invoked, it runs all the health checks that are configured in the `AddHealthChecks()` method in the Startup class and shows the result. @@ -126,7 +113,7 @@ When the endpoint `/hc` is invoked, it runs all the health che Microservices in eShopOnContainers rely on multiple services to perform its task. For example, the `Catalog.API` microservice from eShopOnContainers depends on many services, such as Azure Blob Storage, SQL Server, and RabbitMQ. Therefore, it has several health checks added using the `AddCheck()` method. For every dependent service, a custom `IHealthCheck` implementation that defines its respective health status would need to be added. -The open-source project [AspNetCore.Diagnostics.HealthChecks](https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks) solves this problem by providing custom health check implementations for each of these enterprise services, that are built on top of .NET 6. Each health check is available as an individual NuGet package that can be easily added to the project. eShopOnContainers uses them extensively in all its microservices. +The open-source project [AspNetCore.Diagnostics.HealthChecks](https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks) solves this problem by providing custom health check implementations for each of these enterprise services, that are built on top of .NET 7. Each health check is available as an individual NuGet package that can be easily added to the project. eShopOnContainers uses them extensively in all its microservices. For instance, in the `Catalog.API` microservice, the following NuGet packages were added: @@ -137,7 +124,7 @@ For instance, in the `Catalog.API` microservice, the following NuGet packages we In the following code, the health check implementations are added for each dependent service and then the middleware is configured: ```csharp -// Startup.cs from Catalog.api microservice +// Extension method from Catalog.api microservice // public static IServiceCollection AddCustomHealthCheck(this IServiceCollection services, IConfiguration configuration) { @@ -237,24 +224,15 @@ Sample configuration file for health check UI: } ``` -*Startup.cs* file that adds HealthChecksUI: +_Program.cs_ file that adds HealthChecksUI: ```csharp -// Startup.cs from WebStatus(Watch Dog) service +// Program.cs from WebStatus(Watch Dog) service // -public void ConfigureServices(IServiceCollection services) -{ - //… - // Registers required services for health checks - services.AddHealthChecksUI(); -} -//… -public void Configure(IApplicationBuilder app, IHostingEnvironment env) -{ - //… - app.UseHealthChecksUI(config => config.UIPath = "/hc-ui"); - //… -} +// Registers required services for health checks +builder.Services.AddHealthChecksUI(); +// build the app, register other middleware +app.UseHealthChecksUI(config => config.UIPath = "/hc-ui"); ``` ## Health checks when using orchestrators diff --git a/docs/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.md b/docs/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.md index b8ab53cf70a98..6820b6f857021 100644 --- a/docs/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.md +++ b/docs/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.md @@ -73,11 +73,11 @@ To configure the above structure, add In the next snippet, you can see how `AddHttpClient()` can be used to register Typed Clients (Service Agents) that need to use `HttpClient`. ```csharp -// Startup.cs +// Program.cs //Add http client services at ConfigureServices(IServiceCollection services) -services.AddHttpClient(); -services.AddHttpClient(); -services.AddHttpClient(); +builder.Services.AddHttpClient(); +builder.Services.AddHttpClient(); +builder.Services.AddHttpClient(); ``` Registering the client services as shown in the previous snippet, makes the `DefaultClientFactory` create a standard `HttpClient` for each service. The typed client is registered as transient with DI container. In the preceding code, `AddHttpClient()` registers _CatalogService_, _BasketService_, _OrderingService_ as transient services so they can be injected and consumed directly without any need for additional registrations. @@ -85,9 +85,9 @@ Registering the client services as shown in the previous snippet, makes the `Def You could also add instance-specific configuration in the registration to, for example, configure the base address, and add some resiliency policies, as shown in the following: ```csharp -services.AddHttpClient(client => +builder.Services.AddHttpClient(client => { - client.BaseAddress = new Uri(Configuration["BaseUrl"]); + client.BaseAddress = new Uri(builder.Configuration["BaseUrl"]); }) .AddPolicyHandler(GetRetryPolicy()) .AddPolicyHandler(GetCircuitBreakerPolicy()); @@ -117,7 +117,7 @@ The `HttpMessageHandler` objects in the pool have a lifetime that's the length o ```csharp //Set 5 min as the lifetime for the HttpMessageHandler objects in the pool used for the Catalog Typed Client -services.AddHttpClient() +builder.Services.AddHttpClient() .SetHandlerLifetime(TimeSpan.FromMinutes(5)); ``` @@ -201,7 +201,7 @@ Up to this point, the above code snippet only shows the example of performing re [https://learn.microsoft.com/aspnet/core/fundamentals/http-requests](/aspnet/core/fundamentals/http-requests) - **HttpClientFactory source code in the `dotnet/runtime` GitHub repository** - + - **Polly (.NET resilience and transient-fault-handling library)** diff --git a/docs/architecture/microservices/index.md b/docs/architecture/microservices/index.md index 4f5fe7e5165d0..61a20d7724475 100644 --- a/docs/architecture/microservices/index.md +++ b/docs/architecture/microservices/index.md @@ -7,7 +7,7 @@ ms.date: 01/10/2022 ![Book cover](./media/cover-large.png) -**EDITION v6.0** - Updated to ASP.NET Core 6.0 +**EDITION v7.0** - Updated to ASP.NET Core 7.0 Refer [changelog](https://aka.ms/MicroservicesEbookChangelog) for the book updates and community contributions. @@ -43,7 +43,7 @@ After you have studied this guide, your next step would be to learn about produc ## Version -This guide has been revised to cover **.NET 6** version along with many additional updates related to the same "wave" of technologies (that is, Azure and additional third-party technologies) coinciding in time with the .NET 6 release. That’s why the book version has also been updated to version **6.0**. +This guide has been revised to cover **.NET 7** version along with many additional updates related to the same "wave" of technologies (that is, Azure and additional third-party technologies) coinciding in time with the .NET 7 release. That’s why the book version has also been updated to version **7.0**. ## What this guide does not cover @@ -62,7 +62,7 @@ You will also find this guide useful if you are a technical decision maker, such ### How to use this guide -The first part of this guide introduces Docker containers, discusses how to choose between .NET 6 and the .NET Framework as a development framework, and provides an overview of microservices. This content is for architects and technical decision makers who want an overview but don't need to focus on code implementation details. +The first part of this guide introduces Docker containers, discusses how to choose between .NET 7 and the .NET Framework as a development framework, and provides an overview of microservices. This content is for architects and technical decision makers who want an overview but don't need to focus on code implementation details. The second part of the guide starts with the [Development process for Docker based applications](./docker-application-development-process/index.md) section. It focuses on the development and microservice patterns for implementing applications using .NET and Docker. This section will be of most interest to developers and architects who want to focus on code and on patterns and implementation details. @@ -154,7 +154,7 @@ One Microsoft Way Redmond, Washington 98052-6399 -Copyright © 2022 by Microsoft Corporation +Copyright © 2023 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/client-side-validation.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/client-side-validation.md index 03eb75fc5a130..9879c2a001624 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/client-side-validation.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/client-side-validation.md @@ -34,7 +34,7 @@ The implementation of client-side validation depends on what kind of client appl - **Rick Anderson. Adding validation** \ [https://learn.microsoft.com/aspnet/core/tutorials/first-mvc-app/validation](/aspnet/core/tutorials/first-mvc-app/validation) -### Validation in SPA Web apps (Angular 2, TypeScript, JavaScript) +### Validation in SPA Web apps (Angular 2, TypeScript, JavaScript, Blazor WebAssembly) - **Form Validation** \ @@ -42,6 +42,8 @@ The implementation of client-side validation depends on what kind of client appl - **Validation.** Breeze documentation. \ +- **ASP.NET Core Blazor forms and input components** \ + In summary, these are the most important concepts in regards to validation: - Entities and aggregates should enforce their own consistency and be "always valid". Aggregate roots are responsible for multi-entity consistency within the same aggregate. diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/cqrs-microservice-reads.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/cqrs-microservice-reads.md index 87fa444207a8d..46261b8ced066 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/cqrs-microservice-reads.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/cqrs-microservice-reads.md @@ -167,6 +167,8 @@ public class OrderSummary public string status { get; set; } public double total { get; set; } } +// or using C# 8 record types: +public record OrderSummary(int ordernumber, DateTime date, string status, double total); ``` This is another reason why explicit returned types are better than dynamic types, in the long term. When using the `ProducesResponseType` attribute, you can also specify what is the expected outcome regarding possible HTTP errors/codes, like 200, 400, etc. @@ -190,6 +192,8 @@ The image shows some example values based on the ViewModel types and the possibl - **ASP.NET Core Web API Help Pages using Swagger** [https://learn.microsoft.com/aspnet/core/tutorials/web-api-help-pages-using-swagger?tabs=visual-studio](/aspnet/core/tutorials/web-api-help-pages-using-swagger?tabs=visual-studio) +- **Create record types** [https://learn.microsoft.com/dotnet/csharp/whats-new/tutorials/records](../../../csharp/whats-new/tutorials/records.md) + >[!div class="step-by-step"] >[Previous](eshoponcontainers-cqrs-ddd-microservice.md) >[Next](ddd-oriented-microservice.md) diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/index.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/index.md index ac0526b9ca707..079a3354dbb2c 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/index.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/index.md @@ -65,7 +65,7 @@ DDD is a large topic with a rich set of resources for learning. You can start wi ##### DDD training - **Julie Lerman and Steve Smith. Domain-Driven Design Fundamentals** \ - + >[!div class="step-by-step"] >[Previous](../multi-container-microservice-net-applications/implement-api-gateways-with-ocelot.md) diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-design.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-design.md index cbd69216f3351..f341c092d6f2e 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-design.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-design.md @@ -7,11 +7,13 @@ ms.date: 10/08/2018 [!INCLUDE [download-alert](../includes/download-alert.md)] -Data persistence components provide access to the data hosted within the boundaries of a microservice (that is, a microservice's database). They contain the actual implementation of components such as repositories and [Unit of Work](https://martinfowler.com/eaaCatalog/unitOfWork.html) classes, like custom Entity Framework (EF) objects. EF DbContext implements both, the Repository and the Unit of Work patterns. +Data persistence components provide access to the data hosted within the boundaries of a microservice (that is, a microservice's database). They contain the actual implementation of components such as repositories and [Unit of Work](https://martinfowler.com/eaaCatalog/unitOfWork.html) classes, like custom Entity Framework (EF) objects. EF DbContext implements both the Repository and the Unit of Work patterns. ## The Repository pattern -Repositories are classes or components that encapsulate the logic required to access data sources. They centralize common data access functionality, providing better maintainability and decoupling the infrastructure or technology used to access databases from the domain model layer. If you use an Object-Relational Mapper (ORM) like Entity Framework, the code that must be implemented is simplified, thanks to LINQ and strong typing. This lets you focus on the data persistence logic rather than on data access plumbing. +The Repository pattern is a Domain-Driven Design pattern intended to keep persistence concerns outside of the system's domain model. One or more persistence abstractions - interfaces - are defined in the domain model, and these abstractions have implementations in the form of persistence-specific adapters defined elsewhere in the application. + +Repository implementations are classes that encapsulate the logic required to access data sources. They centralize common data access functionality, providing better maintainability and decoupling the infrastructure or technology used to access databases from the domain model. If you use an Object-Relational Mapper (ORM) like Entity Framework, the code that must be implemented is simplified, thanks to LINQ and strong typing. This lets you focus on the data persistence logic rather than on data access plumbing. The Repository pattern is a well-documented way of working with a data source. In the book [Patterns of Enterprise Application Architecture](https://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420/), Martin Fowler describes a repository as follows: @@ -19,7 +21,7 @@ The Repository pattern is a well-documented way of working with a data source. I ### Define one repository per aggregate -For each aggregate or aggregate root, you should create one repository class. In a microservice based on Domain-Driven Design (DDD) patterns, the only channel you should use to update the database should be the repositories. This is because they have a one-to-one relationship with the aggregate root, which controls the aggregate's invariants and transactional consistency. It's okay to query the database through other channels (as you can do following a CQRS approach), because queries don't change the state of the database. However, the transactional area (that is, the updates) must always be controlled by the repositories and the aggregate roots. +For each aggregate or aggregate root, you should create one repository class. You may be able to leverage C# Generics to reduce the total number concrete classes you need to maintain (as demonstrated later in this chapter). In a microservice based on Domain-Driven Design (DDD) patterns, the only channel you should use to update the database should be the repositories. This is because they have a one-to-one relationship with the aggregate root, which controls the aggregate's invariants and transactional consistency. It's okay to query the database through other channels (as you can do following a CQRS approach), because queries don't change the state of the database. However, the transactional area (that is, the updates) must always be controlled by the repositories and the aggregate roots. Basically, a repository allows you to populate data in memory that comes from the database in the form of the domain entities. Once the entities are in memory, they can be changed and then persisted back to the database through transactions. @@ -76,7 +78,7 @@ The Repository pattern allows you to easily test your application with unit test As noted in an earlier section, it's recommended that you define and place the repository interfaces in the domain model layer so the application layer, such as your Web API microservice, doesn't depend directly on the infrastructure layer where you've implemented the actual repository classes. By doing this and using Dependency Injection in the controllers of your Web API, you can implement mock repositories that return fake data instead of data from the database. This decoupled approach allows you to create and run unit tests that focus the logic of your application without requiring connectivity to the database. -Connections to databases can fail and, more importantly, running hundreds of tests against a database is bad for two reasons. First, it can take a long time because of the large number of tests. Second, the database records might change and impact the results of your tests, so that they might not be consistent. Testing against the database isn't a unit test but an integration test. You should have many unit tests running fast, but fewer integration tests against the databases. +Connections to databases can fail and, more importantly, running hundreds of tests against a database is bad for two reasons. First, it can take a long time because of the large number of tests. Second, the database records might change and impact the results of your tests, especially if your tests are running in parallel, so that they might not be consistent. Unit tests typically can run in parallel; integration tests may not support parallel execution depending on their implementation. Testing against the database isn't a unit test but an integration test. You should have many unit tests running fast, but fewer integration tests against the databases. In terms of separation of concerns for unit tests, your logic operates on domain entities in memory. It assumes the repository class has delivered those. Once your logic modifies the domain entities, it assumes the repository class will store them correctly. The important point here is to create unit tests against your domain model and its domain logic. Aggregate roots are the main consistency boundaries in DDD. @@ -84,14 +86,20 @@ The repositories implemented in eShopOnContainers rely on EF Core's DbContext im ### The difference between the Repository pattern and the legacy Data Access class (DAL class) pattern -A data access object directly performs data access and persistence operations against storage. A repository marks the data with the operations you want to perform in the memory of a unit of work object (as in EF when using the class), but these updates aren't performed immediately to the database. +A typical DAL object directly performs data access and persistence operations against storage, often at the level of a single table and row. Simple CRUD operations implemented with a set of DAL classes frequently do not support transactions (though this is not always the case). Most DAL class approaches make minimal use of abstractions, resulting in tight coupling between application or Business Logic Layer (BLL) classes that call the DAL objects. + +When using repository, the implementation details of persistence are encapsulated away from the domain model. The use of an abstraction provides ease of extending behavior through patterns like Decorators or Proxies. For instance, cross-cutting concerns like [caching](https://ardalis.com/building-a-cachedrepository-in-aspnet-core/), logging, and error handling can all be applied using these patterns rather than hard-coded in the data access code itself. It's also trivial to support multiple repository adapters which may be used in different environments, from local development to shared staging environments to production. -A unit of work is referred to as a single transaction that involves multiple insert, update, or delete operations. In simple terms, it means that for a specific user action, such as a registration on a website, all the insert, update, and delete operations are handled in a single transaction. This is more efficient than handling multiple database transactions in a chattier way. +### Implementing Unit of Work -These multiple persistence operations are performed later in a single action when your code from the application layer commands it. The decision about applying the in-memory changes to the actual database storage is typically based on the [Unit of Work pattern](https://martinfowler.com/eaaCatalog/unitOfWork.html). In EF, the Unit of Work pattern is implemented as the . +A [unit of work](https://martinfowler.com/eaaCatalog/unitOfWork.html) refers to a single transaction that involves multiple insert, update, or delete operations. In simple terms, it means that for a specific user action, such as a registration on a website, all the insert, update, and delete operations are handled in a single transaction. This is more efficient than handling multiple database operations in a chattier way. + +These multiple persistence operations are performed later in a single action when your code from the application layer commands it. The decision about applying the in-memory changes to the actual database storage is typically based on the Unit of Work pattern. In EF, the Unit of Work pattern is implemented by a and is executed when a call is made to `SaveChanges`. In many cases, this pattern or way of applying operations against the storage can increase application performance and reduce the possibility of inconsistencies. It also reduces transaction blocking in the database tables, because all the intended operations are committed as part of one transaction. This is more efficient in comparison to executing many isolated operations against the database. Therefore, the selected ORM can optimize the execution against the database by grouping several update actions within the same transaction, as opposed to many small and separate transaction executions. +The Unit of Work pattern can be implemented with or without using the Repository pattern. + ### Repositories shouldn't be mandatory Custom repositories are useful for the reasons cited earlier, and that is the approach for the ordering microservice in eShopOnContainers. However, it isn't an essential pattern to implement in a DDD design or even in general .NET development. @@ -100,7 +108,7 @@ For instance, Jimmy Bogard, when providing direct feedback for this guide, said > This'll probably be my biggest feedback. I'm really not a fan of repositories, mainly because they hide the important details of the underlying persistence mechanism. It's why I go for MediatR for commands, too. I can use the full power of the persistence layer, and push all that domain behavior into my aggregate roots. I don't usually want to mock my repositories – I still need to have that integration test with the real thing. Going CQRS meant that we didn't really have a need for repositories any more. -Repositories might be useful, but they are not critical for your DDD design, in the way that the Aggregate pattern and rich domain model are. Therefore, use the Repository pattern or not, as you see fit. Anyway, you'll be using the repository pattern whenever you use EF Core although, in this case, the repository covers the whole microservice or bounded context. +Repositories might be useful, but they are not critical for your DDD design in the way that the Aggregate pattern and a rich domain model are. Therefore, use the Repository pattern or not, as you see fit. ## Additional resources diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-implementation-entity-framework-core.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-implementation-entity-framework-core.md index bc05cc2cfb729..571f229f3e9a7 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-implementation-entity-framework-core.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-implementation-entity-framework-core.md @@ -187,36 +187,33 @@ If you were using DbContext directly, you would have to mock it or to run unit t The `DbContext` object (exposed as an `IUnitOfWork` object) should be shared among multiple repositories within the same HTTP request scope. For example, this is true when the operation being executed must deal with multiple aggregates, or simply because you are using multiple repository instances. It is also important to mention that the `IUnitOfWork` interface is part of your domain layer, not an EF Core type. -In order to do that, the instance of the `DbContext` object has to have its service lifetime set to ServiceLifetime.Scoped. This is the default lifetime when registering a `DbContext` with `services.AddDbContext` in your IoC container from the ConfigureServices method of the `Startup.cs` file in your ASP.NET Core Web API project. The following code illustrates this. +In order to do that, the instance of the `DbContext` object has to have its service lifetime set to ServiceLifetime.Scoped. This is the default lifetime when registering a `DbContext` with `builder.Services.AddDbContext` in your IoC container from the _Program.cs_ file in your ASP.NET Core Web API project. The following code illustrates this. ```csharp -public IServiceProvider ConfigureServices(IServiceCollection services) +// Add framework services. +builder.Services.AddMvc(options => { - // Add framework services. - services.AddMvc(options => + options.Filters.Add(typeof(HttpGlobalExceptionFilter)); +}).AddControllersAsServices(); + +builder.Services.AddEntityFrameworkSqlServer() + .AddDbContext(options => { - options.Filters.Add(typeof(HttpGlobalExceptionFilter)); - }).AddControllersAsServices(); - - services.AddEntityFrameworkSqlServer() - .AddDbContext(options => - { - options.UseSqlServer(Configuration["ConnectionString"], - sqlOptions => sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo(). - Assembly.GetName().Name)); - }, - ServiceLifetime.Scoped // Note that Scoped is the default choice - // in AddDbContext. It is shown here only for - // pedagogic purposes. - ); -} + options.UseSqlServer(Configuration["ConnectionString"], + sqlOptions => sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo(). + Assembly.GetName().Name)); + }, + ServiceLifetime.Scoped // Note that Scoped is the default choice + // in AddDbContext. It is shown here only for + // pedagogic purposes. + ); ``` The DbContext instantiation mode should not be configured as ServiceLifetime.Transient or ServiceLifetime.Singleton. ## The repository instance lifetime in your IoC container -In a similar way, repository's lifetime should usually be set as scoped (InstancePerLifetimeScope in Autofac). It could also be transient (InstancePerDependency in Autofac), but your service will be more efficient in regards memory when using the scoped lifetime. +In a similar way, repository's lifetime should usually be set as scoped (InstancePerLifetimeScope in Autofac). It could also be transient (InstancePerDependency in Autofac), but your service will be more efficient in regards to memory when using the scoped lifetime. ```csharp // Registering a Repository in Autofac IoC container @@ -225,7 +222,7 @@ builder.RegisterType() .InstancePerLifetimeScope(); ``` -Using the singleton lifetime for the repository could cause you serious concurrency problems when your DbContext is set to scoped (InstancePerLifetimeScope) lifetime (the default lifetimes for a DBContext). +Using the singleton lifetime for the repository could cause you serious concurrency problems when your DbContext is set to scoped (InstancePerLifetimeScope) lifetime (the default lifetimes for a DBContext). As long as your service lifetimes for your repositories and your DbContext are both Scoped, you'll avoid these issues. ### Additional resources @@ -491,6 +488,8 @@ Learn [how the specification pattern is applied in the eShopOnWeb sample](https: - **The Specification pattern** \ + **Ardalis.Specification NuGet Package** Used by eShopOnWeb. \ + > [!div class="step-by-step"] > [Previous](infrastructure-persistence-layer-design.md) > [Next](nosql-database-persistence-infrastructure.md) diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/microservice-application-layer-implementation-web-api.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/microservice-application-layer-implementation-web-api.md index 8708b0c1a23bb..f74f9efdb4369 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/microservice-application-layer-implementation-web-api.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/microservice-application-layer-implementation-web-api.md @@ -20,7 +20,7 @@ The Solution Explorer view of the Ordering.API microservice, showing the subfold **Figure 7-23**. The application layer in the Ordering.API ASP.NET Core Web API project -ASP.NET Core includes a simple [built-in IoC container](/aspnet/core/fundamentals/dependency-injection) (represented by the IServiceProvider interface) that supports constructor injection by default, and ASP.NET makes certain services available through DI. ASP.NET Core uses the term *service* for any of the types you register that will be injected through DI. You configure the built-in container's services in the ConfigureServices method in your application's Startup class. Your dependencies are implemented in the services that a type needs and that you register in the IoC container. +ASP.NET Core includes a simple [built-in IoC container](/aspnet/core/fundamentals/dependency-injection) (represented by the IServiceProvider interface) that supports constructor injection by default, and ASP.NET makes certain services available through DI. ASP.NET Core uses the term *service* for any of the types you register that will be injected through DI. You configure the built-in container's services in your application's _Program.cs_ file. Your dependencies are implemented in the services that a type needs and that you register in the IoC container. Typically, you want to inject dependencies that implement infrastructure objects. A typical dependency to inject is a repository. But you could inject any other infrastructure dependency that you may have. For simpler implementations, you could directly inject your Unit of Work pattern object (the EF DbContext object), because the DBContext is also the implementation of your infrastructure persistence objects. @@ -87,21 +87,17 @@ Before you use the objects injected through constructors, you need to know where #### Use the built-in IoC container provided by ASP.NET Core -When you use the built-in IoC container provided by ASP.NET Core, you register the types you want to inject in the ConfigureServices method in the Startup.cs file, as in the following code: +When you use the built-in IoC container provided by ASP.NET Core, you register the types you want to inject in the _Program.cs_ file, as in the following code: ```csharp -// Registration of types into ASP.NET Core built-in container -public void ConfigureServices(IServiceCollection services) -{ - // Register out-of-the-box framework services. - services.AddDbContext(c => - c.UseSqlServer(Configuration["ConnectionString"]), - ServiceLifetime.Scoped); - - services.AddMvc(); - // Register custom application dependencies. - services.AddScoped(); -} +// Register out-of-the-box framework services. +builder.Services.AddDbContext(c => + c.UseSqlServer(Configuration["ConnectionString"]), + ServiceLifetime.Scoped); + +builder.Services.AddMvc(); +// Register custom application dependencies. +builder.Services.AddScoped(); ``` The most common pattern when registering types in an IoC container is to register a pair of types—an interface and its related implementation class. Then when you request an object from the IoC container through any constructor, you request an object of a certain type of interface. For instance, in the previous example, the last line states that when any of your constructors have a dependency on IMyCustomRepository (interface or abstraction), the IoC container will inject an instance of the MyCustomSQLServerRepository implementation class. diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/net-core-microservice-domain-model.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/net-core-microservice-domain-model.md index 83851180ca44a..ddb7ea6aff763 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/net-core-microservice-domain-model.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/net-core-microservice-domain-model.md @@ -176,6 +176,8 @@ For example, in the preceding OrderAggregate code example, there are several pri - **Udi Dahan. How to create fully encapsulated Domain Models** \ +- **Steve Smith. What is the difference between a DTO and a POCO?** \ + > [!div class="step-by-step"] > [Previous](microservice-domain-model.md) > [Next](seedwork-domain-model-base-classes-interfaces.md) diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/nosql-database-persistence-infrastructure.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/nosql-database-persistence-infrastructure.md index 6d5d8a916a620..6e50ea1f760a5 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/nosql-database-persistence-infrastructure.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/nosql-database-persistence-infrastructure.md @@ -25,8 +25,8 @@ For instance, the following JSON code is a sample implementation of an order agg ```json { - "id": "2017001", - "orderDate": "2/25/2017", + "id": "2024001", + "orderDate": "2/25/2024", "buyerId": "1234567", "address": [ { @@ -38,9 +38,9 @@ For instance, the following JSON code is a sample implementation of an order agg } ], "orderItems": [ - {"id": 20170011, "productId": "123456", "productName": ".NET T-Shirt", + {"id": 20240011, "productId": "123456", "productName": ".NET T-Shirt", "unitPrice": 25, "units": 2, "discount": 0}, - {"id": 20170012, "productId": "123457", "productName": ".NET Mug", + {"id": 20240012, "productId": "123457", "productName": ".NET Mug", "unitPrice": 15, "units": 1, "discount": 0} ] } @@ -65,7 +65,7 @@ When you use a C\# model to implement the aggregate to be used by the Azure Cosm Order orderAggregate = new Order { - Id = "2017001", + Id = "2024001", OrderDate = new DateTime(2005, 7, 1), BuyerId = "1234567", PurchaseOrderNumber = "PO18009186470" @@ -84,7 +84,7 @@ orderAggregate.UpdateAddress(address); OrderItem orderItem1 = new OrderItem { - Id = 20170011, + Id = 20240011, ProductId = "123456", ProductName = ".NET T-Shirt", UnitPrice = 25, diff --git a/docs/architecture/microservices/multi-container-microservice-net-applications/background-tasks-with-ihostedservice.md b/docs/architecture/microservices/multi-container-microservice-net-applications/background-tasks-with-ihostedservice.md index d067f99a59db7..6808dfe5930ad 100644 --- a/docs/architecture/microservices/multi-container-microservice-net-applications/background-tasks-with-ihostedservice.md +++ b/docs/architecture/microservices/multi-container-microservice-net-applications/background-tasks-with-ihostedservice.md @@ -41,19 +41,16 @@ SignalR is one example of an artifact using hosted services, but you can also us You can basically offload any of those actions to a background task that implements `IHostedService`. -The way you add one or multiple `IHostedServices` into your `WebHost` or `Host` is by registering them up through the  extension method in an ASP.NET Core `WebHost` (or in a `Host` in .NET Core 2.1 and above). Basically, you have to register the hosted services within the familiar `ConfigureServices()` method of the `Startup` class, as in the following code from a typical ASP.NET WebHost. +The way you add one or multiple `IHostedServices` into your `WebHost` or `Host` is by registering them up through the  extension method in an ASP.NET Core `WebHost` (or in a `Host` in .NET Core 2.1 and above). Basically, you have to register the hosted services within application startup in _Program.cs_. ```csharp -public IServiceProvider ConfigureServices(IServiceCollection services) -{ - //Other DI registrations; +//Other DI registrations; - // Register Hosted Services - services.AddHostedService(); -    services.AddHostedService(); -    services.AddHostedService(); - //... -} +// Register Hosted Services +builder.Services.AddHostedService(); +builder.Services.AddHostedService(); +builder.Services.AddHostedService(); +//... ``` In that code, the `GracePeriodManagerService` hosted service is real code from the Ordering business microservice in eShopOnContainers, while the other two are just two additional samples. @@ -66,7 +63,7 @@ Without using `IHostedService`, you could always start a background thread to ru When you register an `IHostedService`, .NET will call the `StartAsync()` and `StopAsync()` methods of your `IHostedService` type during application start and stop respectively. For more details, refer [IHostedService interface](/aspnet/core/fundamentals/host/hosted-services?tabs=visual-studio&view=aspnetcore-3.1&preserve-view=false#ihostedservice-interface) -As you can imagine, you can create multiple implementations of IHostedService and register them at the `ConfigureService()` method into the DI container, as shown previously. All those hosted services will be started and stopped along with the application/microservice. +As you can imagine, you can create multiple implementations of IHostedService and register each of them in _Program.cs_, as shown previously. All those hosted services will be started and stopped along with the application/microservice. As a developer, you are responsible for handling the stopping action of your services when `StopAsync()` method is triggered by the host. @@ -170,7 +167,12 @@ public class GracePeriodManagerService : BackgroundService // and publishing events into the Event Bus (RabbitMQ / ServiceBus) CheckConfirmedGracePeriodOrders(); - await Task.Delay(_settings.CheckUpdateTime, stoppingToken); + try { + await Task.Delay(_settings.CheckUpdateTime, stoppingToken); + } + catch (TaskCanceledException exception) { + _logger.LogCritical(exception, "TaskCanceledException Error", exception.Message); + } } _logger.LogDebug($"GracePeriod background task is stopping."); diff --git a/docs/architecture/microservices/multi-container-microservice-net-applications/data-driven-crud-microservice.md b/docs/architecture/microservices/multi-container-microservice-net-applications/data-driven-crud-microservice.md index 9e19da25db20f..b816d7c696b29 100644 --- a/docs/architecture/microservices/multi-container-microservice-net-applications/data-driven-crud-microservice.md +++ b/docs/architecture/microservices/multi-container-microservice-net-applications/data-driven-crud-microservice.md @@ -184,36 +184,31 @@ In ASP.NET Core, you can use Dependency Injection (DI) out of the box. You do no In the `CatalogController` class mentioned earlier, `CatalogContext` (which inherits from `DbContext`) type is injected along with the other required objects in the `CatalogController()` constructor. -An important configuration to set up in the Web API project is the DbContext class registration into the service's IoC container. You typically do so in the `Startup` class by calling the `services.AddDbContext()` method inside the `ConfigureServices()` method, as shown in the following **simplified** example: +An important configuration to set up in the Web API project is the DbContext class registration into the service's IoC container. You typically do so in the _Program.cs_ file by calling the `builder.Services.AddDbContext()` method, as shown in the following **simplified** example: ```csharp -public void ConfigureServices(IServiceCollection services) +// Additional code... + +builder.Services.AddDbContext(options => { - // Additional code... - services.AddDbContext(options => + options.UseSqlServer(builder.Configuration["ConnectionString"], + sqlServerOptionsAction: sqlOptions => { - options.UseSqlServer(Configuration["ConnectionString"], - sqlServerOptionsAction: sqlOptions => - { - sqlOptions.MigrationsAssembly( - typeof(Startup).GetTypeInfo().Assembly.GetName().Name); - - //Configuring Connection Resiliency: - sqlOptions. - EnableRetryOnFailure(maxRetryCount: 5, - maxRetryDelay: TimeSpan.FromSeconds(30), - errorNumbersToAdd: null); - - }); - - // Changing default behavior when client evaluation occurs to throw. - // Default in EFCore would be to log warning when client evaluation is done. - options.ConfigureWarnings(warnings => warnings.Throw( - RelationalEventId.QueryClientEvaluationWarning)); - }); - - //... -} + sqlOptions.MigrationsAssembly( + typeof(Program).GetTypeInfo().Assembly.GetName().Name); + + //Configuring Connection Resiliency: + sqlOptions. + EnableRetryOnFailure(maxRetryCount: 5, + maxRetryDelay: TimeSpan.FromSeconds(30), + errorNumbersToAdd: null); + }); + + // Changing default behavior when client evaluation occurs to throw. + // Default in EFCore would be to log warning when client evaluation is done. + options.ConfigureWarnings(warnings => warnings.Throw( + RelationalEventId.QueryClientEvaluationWarning)); +}); ``` ### Additional resources @@ -261,7 +256,7 @@ catalog-api: The docker-compose.yml files at the solution level are not only more flexible than configuration files at the project or microservice level, but also more secure if you override the environment variables declared at the docker-compose files with values set from your deployment tools, like from Azure DevOps Services Docker deployment tasks. -Finally, you can get that value from your code by using Configuration\["ConnectionString"\], as shown in the ConfigureServices method in an earlier code example. +Finally, you can get that value from your code by using `builder.Configuration\["ConnectionString"\]`, as shown in an earlier code example. However, for production environments, you might want to explore additional ways on how to store secrets like the connection strings. An excellent way to manage application secrets is using [Azure Key Vault](https://azure.microsoft.com/services/key-vault/). @@ -302,6 +297,8 @@ This versioning mechanism is simple and depends on the server routing the reques ### Additional resources +- **ASP.NET API Versioning** \ + - **Scott Hanselman. ASP.NET Core RESTful Web API versioning made easy** \ @@ -361,47 +358,31 @@ The Swashbuckle generated Swagger UI API documentation includes all published ac Currently, Swashbuckle consists of five internal NuGet packages under the high-level metapackage [Swashbuckle.AspNetCore](https://www.nuget.org/packages/Swashbuckle.AspNetCore) for ASP.NET Core applications. -After you have installed these NuGet packages in your Web API project, you need to configure Swagger in the Startup class, as in the following **simplified** code: +After you have installed these NuGet packages in your Web API project, you need to configure Swagger in the _Program.cs_ class, as in the following **simplified** code: ```csharp -public class Startup -{ - public IConfigurationRoot Configuration { get; } - // Other startup code... - public void ConfigureServices(IServiceCollection services) - { - // Other ConfigureServices() code... +// Add framework services. - // Add framework services. - services.AddSwaggerGen(options => - { - options.DescribeAllEnumsAsStrings(); - options.SwaggerDoc("v1", new OpenApiInfo - { - Title = "eShopOnContainers - Catalog HTTP API", - Version = "v1", - Description = "The Catalog Microservice HTTP API. This is a Data-Driven/CRUD microservice sample" - }); - }); +builder.Services.AddSwaggerGen(options => +{ + options.DescribeAllEnumsAsStrings(); + options.SwaggerDoc("v1", new OpenApiInfo + { + Title = "eShopOnContainers - Catalog HTTP API", + Version = "v1", + Description = "The Catalog Microservice HTTP API. This is a Data-Driven/CRUD microservice sample" + }); +}); - // Other ConfigureServices() code... - } +// Other startup code... - public void Configure(IApplicationBuilder app, - IHostingEnvironment env, - ILoggerFactory loggerFactory) +app.UseSwagger() + .UseSwaggerUI(c => { - // Other Configure() code... - // ... - app.UseSwagger() - .UseSwaggerUI(c => - { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); - }); - } -} -``` + c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + }); + ``` Once this is done, you can start your application and browse the following Swagger JSON and UI endpoints using URLs like these: diff --git a/docs/architecture/microservices/multi-container-microservice-net-applications/implement-api-gateways-with-ocelot.md b/docs/architecture/microservices/multi-container-microservice-net-applications/implement-api-gateways-with-ocelot.md index 20288135d5d1c..699a8852980a0 100644 --- a/docs/architecture/microservices/multi-container-microservice-net-applications/implement-api-gateways-with-ocelot.md +++ b/docs/architecture/microservices/multi-container-microservice-net-applications/implement-api-gateways-with-ocelot.md @@ -85,7 +85,7 @@ The HTTP request will end up running that kind of C# code accessing the microser Regarding the microservice URL, when the containers are deployed in your local development PC (local Docker host), each microservice's container always has an internal port (usually port 80) specified in its dockerfile, as in the following dockerfile: ```dockerfile -FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base +FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base WORKDIR /app EXPOSE 80 ``` @@ -138,7 +138,7 @@ However, direct-access communication to the microservice, in this case through t Ocelot is basically a set of middleware that you can apply in a specific order. -Ocelot is designed to work with ASP.NET Core only. The latest version of the package targets `.NETCoreApp 3.1` and hence it is not suitable for .NET Framework applications. +Ocelot is designed to work with ASP.NET Core only. The latest version of the package is 18.0 which targets .NET 6 and hence is not suitable for .NET Framework applications. You install Ocelot and its dependencies in your ASP.NET Core project with [Ocelot's NuGet package](https://www.nuget.org/packages/Ocelot/), from Visual Studio. diff --git a/docs/architecture/microservices/multi-container-microservice-net-applications/integration-event-based-microservice-communications.md b/docs/architecture/microservices/multi-container-microservice-net-applications/integration-event-based-microservice-communications.md index 24c0af8354335..2a28e68032393 100644 --- a/docs/architecture/microservices/multi-container-microservice-net-applications/integration-event-based-microservice-communications.md +++ b/docs/architecture/microservices/multi-container-microservice-net-applications/integration-event-based-microservice-communications.md @@ -53,7 +53,7 @@ public class ProductPriceChangedIntegrationEvent : IntegrationEvent } ``` -The integration events can be defined at the application level of each microservice, so they are decoupled from other microservices, in a way comparable to how ViewModels are defined in the server and client. What is not recommended is sharing a common integration events library across multiple microservices; doing that would be coupling those microservices with a single event definition data library. You do not want to do that for the same reasons that you do not want to share a common domain model across multiple microservices: microservices must be completely autonomous. For more information, see this blog post on [the amount of data to put in events](https://particular.net/blog/putting-your-events-on-a-diet). +The integration events can be defined at the application level of each microservice, so they are decoupled from other microservices, in a way comparable to how ViewModels are defined in the server and client. What is not recommended is sharing a common integration events library across multiple microservices; doing that would be coupling those microservices with a single event definition data library. You do not want to do that for the same reasons that you do not want to share a common domain model across multiple microservices: microservices must be completely autonomous. For more information, see this blog post on [the amount of data to put in events](https://particular.net/blog/putting-your-events-on-a-diet). Be careful not to take this too far, as this other blog post describes [the problem data deficient messages can produce](https://ardalis.com/data-deficient-messages/). Your design of your events should aim to be "just right" for the needs of their consumers. There are only a few kinds of libraries you should share across microservices. One is libraries that are final application blocks, like the [Event Bus client API](https://github.com/dotnet-architecture/eShopOnContainers/tree/main/src/BuildingBlocks/EventBus), as in eShopOnContainers. Another is libraries that constitute tools that could also be shared as NuGet components, like JSON serializers. diff --git a/docs/architecture/microservices/multi-container-microservice-net-applications/multi-container-applications-docker-compose.md b/docs/architecture/microservices/multi-container-microservice-net-applications/multi-container-applications-docker-compose.md index dbc705f4bae68..f536cac3fb7e4 100644 --- a/docs/architecture/microservices/multi-container-microservice-net-applications/multi-container-applications-docker-compose.md +++ b/docs/architecture/microservices/multi-container-microservice-net-applications/multi-container-applications-docker-compose.md @@ -434,7 +434,7 @@ The values set in the run-time environment always override the values defined in If you are exploring Docker and .NET on sources on the Internet, you will find Dockerfiles that demonstrate the simplicity of building a Docker image by copying your source into a container. These examples suggest that by using a simple configuration, you can have a Docker image with the environment packaged with your application. The following example shows a simple Dockerfile in this vein. ```dockerfile -FROM mcr.microsoft.com/dotnet/sdk:6.0 +FROM mcr.microsoft.com/dotnet/sdk:7.0 WORKDIR /app ENV ASPNETCORE_URLS http://+:80 EXPOSE 80 diff --git a/docs/architecture/microservices/multi-container-microservice-net-applications/subscribe-events.md b/docs/architecture/microservices/multi-container-microservice-net-applications/subscribe-events.md index 05a2014ceed8a..4754735e32dc7 100644 --- a/docs/architecture/microservices/multi-container-microservice-net-applications/subscribe-events.md +++ b/docs/architecture/microservices/multi-container-microservice-net-applications/subscribe-events.md @@ -368,6 +368,9 @@ If the "redelivered" flag is set, the receiver must take that into account, beca - **Eric Brewer. CAP Twelve Years Later: How the "Rules" Have Changed** \ +- **CAP, PACELC, and Microservices** \ + + - **Azure Service Bus. Brokered Messaging: Duplicate Detection**\ diff --git a/docs/architecture/microservices/net-core-net-framework-containers/container-framework-choice-factors.md b/docs/architecture/microservices/net-core-net-framework-containers/container-framework-choice-factors.md index ce9c48ffe83ed..9eeccc6ae2ab3 100644 --- a/docs/architecture/microservices/net-core-net-framework-containers/container-framework-choice-factors.md +++ b/docs/architecture/microservices/net-core-net-framework-containers/container-framework-choice-factors.md @@ -7,23 +7,23 @@ ms.date: 11/19/2021 [!INCLUDE [download-alert](../includes/download-alert.md)] -The following decision table summarizes whether to use .NET Framework or .NET 6. Remember that for Linux containers, you need Linux-based Docker hosts (VMs or servers), and that for Windows Containers, you need Windows Server-based Docker hosts (VMs or servers). +The following decision table summarizes whether to use .NET Framework or .NET 7. Remember that for Linux containers, you need Linux-based Docker hosts (VMs or servers), and that for Windows Containers, you need Windows Server-based Docker hosts (VMs or servers). > [!IMPORTANT] > Your development machines will run one Docker host, either Linux or Windows. Related microservices that you want to run and test together in one solution will all need to run on the same container platform. | Architecture / App Type | Linux containers | Windows Containers | |-------------------------|------------------|--------------------| -| Microservices on containers | .NET 6 | .NET 6 | -| Monolithic app | .NET 6 | .NET Framework
.NET 6 | -| Best-in-class performance and scalability | .NET 6 | .NET 6 | +| Microservices on containers | .NET 7 | .NET 7 | +| Monolithic app | .NET 7 | .NET Framework
.NET 7 | +| Best-in-class performance and scalability | .NET 7 | .NET 7 | | Windows Server legacy app ("brown-field") migration to containers | -- | .NET Framework | -| New container-based development ("green-field") | .NET 6 | .NET 6 | -| ASP.NET Core | .NET 6 | .NET 6 (recommended)
.NET Framework | +| New container-based development ("green-field") | .NET 7 | .NET 7 | +| ASP.NET Core | .NET 7 | .NET 7 (recommended)
.NET Framework | | ASP.NET 4 (MVC 5, Web API 2, and Web Forms) | -- | .NET Framework | | SignalR services | .NET Core 2.1 or higher version | .NET Framework
.NET Core 2.1 or higher version | -| WCF, WF, and other legacy frameworks | WCF in .NET Core (client library only) or [CoreWCF](https://www.nuget.org/profiles/corewcf) | .NET Framework
WCF in .NET 6 (client library only) or [CoreWCF](https://www.nuget.org/profiles/corewcf) | -| Consumption of Azure services | .NET 6
(eventually most Azure services will provide client SDKs for .NET 6) | .NET Framework
.NET 6
(eventually most Azure services will provide client SDKs for .NET 6) | +| WCF, WF, and other legacy frameworks | WCF in .NET Core (client library only) or [CoreWCF](https://www.nuget.org/profiles/corewcf) | .NET Framework
WCF in .NET 7 (client library only) or [CoreWCF](https://www.nuget.org/profiles/corewcf) | +| Consumption of Azure services | .NET 7
(eventually most Azure services will provide client SDKs for .NET 7) | .NET Framework
.NET 7
(eventually most Azure services will provide client SDKs for .NET 7) | >[!div class="step-by-step"] >[Previous](net-framework-container-scenarios.md) diff --git a/docs/architecture/microservices/net-core-net-framework-containers/general-guidance.md b/docs/architecture/microservices/net-core-net-framework-containers/general-guidance.md index eb800bc219f8f..446c8ff7270f6 100644 --- a/docs/architecture/microservices/net-core-net-framework-containers/general-guidance.md +++ b/docs/architecture/microservices/net-core-net-framework-containers/general-guidance.md @@ -7,9 +7,9 @@ ms.date: 11/19/2021 [!INCLUDE [download-alert](../includes/download-alert.md)] -This section provides a summary of when to choose .NET 6 or .NET Framework. We provide more details about these choices in the sections that follow. +This section provides a summary of when to choose .NET 7 or .NET Framework. We provide more details about these choices in the sections that follow. -Use .NET 6, with Linux or Windows Containers, for your containerized Docker server application when: +Use .NET 7, with Linux or Windows Containers, for your containerized Docker server application when: - You have cross-platform needs. For example, you want to use both Linux and Windows Containers. @@ -17,17 +17,17 @@ Use .NET 6, with Linux or Windows Containers, for your containerized Docker serv - You need to start containers fast and want a small footprint per container to achieve better density or more containers per hardware unit in order to lower your costs. -In short, when you create new containerized .NET applications, you should consider .NET 6 as the default choice. It has many benefits and fits best with the containers philosophy and style of working. +In short, when you create new containerized .NET applications, you should consider .NET 7 as the default choice. It has many benefits and fits best with the containers philosophy and style of working. -An extra benefit of using .NET 6 is that you can run side-by-side .NET versions for applications within the same machine. This benefit is more important for servers or VMs that do not use containers, because containers isolate the versions of .NET that the app needs. (As long as they are compatible with the underlying OS.) +An extra benefit of using .NET 7 is that you can run side-by-side .NET versions for applications within the same machine. This benefit is more important for servers or VMs that do not use containers, because containers isolate the versions of .NET that the app needs. (As long as they are compatible with the underlying OS.) Use .NET Framework for your containerized Docker server application when: - Your application currently uses .NET Framework and has strong dependencies on Windows. -- You need to use Windows APIs that are not supported by .NET 6. +- You need to use Windows APIs that are not supported by .NET 7. -- You need to use third-party .NET libraries or NuGet packages that are not available for .NET 6. +- You need to use third-party .NET libraries or NuGet packages that are not available for .NET 7. Using .NET Framework on Docker can improve your deployment experiences by minimizing deployment issues. This ["lift and shift" scenario](https://aka.ms/liftandshiftwithcontainersebook) is important for containerizing legacy applications that were originally developed with the traditional .NET Framework, like ASP.NET WebForms, MVC web apps, or WCF (Windows Communication Foundation) services. diff --git a/docs/architecture/microservices/net-core-net-framework-containers/index.md b/docs/architecture/microservices/net-core-net-framework-containers/index.md index 465912fd3ad7e..d8e98c1e76d77 100644 --- a/docs/architecture/microservices/net-core-net-framework-containers/index.md +++ b/docs/architecture/microservices/net-core-net-framework-containers/index.md @@ -1,13 +1,13 @@ --- -title: Choosing Between .NET 6 and .NET Framework for Docker Containers -description: .NET Microservices Architecture for Containerized .NET Applications | Choosing Between .NET 6 and .NET Framework for Docker Containers +title: Choosing Between .NET and .NET Framework for Docker Containers +description: .NET Microservices Architecture for Containerized .NET Applications | Choosing Between .NET and .NET Framework for Docker Containers ms.date: 11/19/2021 --- -# Choosing Between .NET 6 and .NET Framework for Docker Containers +# Choosing Between .NET and .NET Framework for Docker Containers [!INCLUDE [download-alert](../includes/download-alert.md)] -There are two supported frameworks for building server-side containerized Docker applications with .NET: [.NET Framework and .NET 6](https://dotnet.microsoft.com/download). They share many .NET platform components, and you can share code across the two. However, there are fundamental differences between them, and which framework you use will depend on what you want to accomplish. This section provides guidance on when to choose each framework. +There are two supported frameworks for building server-side containerized Docker applications with .NET: [.NET Framework and .NET 7](https://dotnet.microsoft.com/download). They share many .NET platform components, and you can share code across the two. However, there are fundamental differences between them, and which framework you use will depend on what you want to accomplish. This section provides guidance on when to choose each framework. >[!div class="step-by-step"] >[Previous](../container-docker-introduction/docker-containers-images-registries.md) diff --git a/docs/architecture/microservices/net-core-net-framework-containers/net-container-os-targets.md b/docs/architecture/microservices/net-core-net-framework-containers/net-container-os-targets.md index ea022e2c38510..1dee31c039111 100644 --- a/docs/architecture/microservices/net-core-net-framework-containers/net-container-os-targets.md +++ b/docs/architecture/microservices/net-core-net-framework-containers/net-container-os-targets.md @@ -8,9 +8,9 @@ ms.date: 01/13/2021 [!INCLUDE [download-alert](../includes/download-alert.md)] -Given the diversity of operating systems supported by Docker and the differences between .NET Framework and .NET 6, you should target a specific OS and specific versions depending on the framework you are using. +Given the diversity of operating systems supported by Docker and the differences between .NET Framework and .NET 7, you should target a specific OS and specific versions depending on the framework you are using. -For Windows, you can use Windows Server Core or Windows Nano Server. These Windows versions provide different characteristics (IIS in Windows Server Core versus a self-hosted web server like Kestrel in Nano Server) that might be needed by .NET Framework or .NET 6, respectively. +For Windows, you can use Windows Server Core or Windows Nano Server. These Windows versions provide different characteristics (IIS in Windows Server Core versus a self-hosted web server like Kestrel in Nano Server) that might be needed by .NET Framework or .NET 7, respectively. For Linux, multiple distros are available and supported in official .NET Docker images (like Debian). @@ -20,7 +20,7 @@ In Figure 3-1, you can see the possible OS version depending on the .NET framewo **Figure 3-1.** Operating systems to target depending on versions of the .NET framework -When deploying legacy .NET Framework applications you have to target Windows Server Core, compatible with legacy apps and IIS, but it has a larger image. When deploying .NET 6 applications, you can target Windows Nano Server, which is cloud optimized, uses Kestrel and is smaller and starts faster. You can also target Linux, supporting Debian, Alpine, and others. +When deploying legacy .NET Framework applications you have to target Windows Server Core, compatible with legacy apps and IIS, but it has a larger image. When deploying .NET 7 applications, you can target Windows Nano Server, which is cloud optimized, uses Kestrel and is smaller and starts faster. You can also target Linux, supporting Debian, Alpine, and others. You can also create your own Docker image in cases where you want to use a different Linux distro or where you want an image with versions not provided by Microsoft. For example, you might create an image with ASP.NET Core running on the traditional .NET Framework and Windows Server Core, which is a not-so-common scenario for Docker. @@ -28,10 +28,10 @@ When you add the image name to your Dockerfile file, you can select the operatin | Image | Comments | |-------|----------| -| mcr.microsoft.com/dotnet/runtime:6.0 | .NET 6 multi-architecture: Supports Linux and Windows Nano Server depending on the Docker host. | -| mcr.microsoft.com/dotnet/aspnet:6.0 | ASP.NET Core 6.0 multi-architecture: Supports Linux and Windows Nano Server depending on the Docker host.
The aspnetcore image has a few optimizations for ASP.NET Core. | -| mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim | .NET 6 runtime-only on Linux Debian distro | -| mcr.microsoft.com/dotnet/aspnet:6.0-nanoserver-1809 | .NET 6 runtime-only on Windows Nano Server (Windows Server version 1809) | +| mcr.microsoft.com/dotnet/runtime:7.0 | .NET 7 multi-architecture: Supports Linux and Windows Nano Server depending on the Docker host. | +| mcr.microsoft.com/dotnet/aspnet:7.0 | ASP.NET Core 7.0 multi-architecture: Supports Linux and Windows Nano Server depending on the Docker host.
The aspnetcore image has a few optimizations for ASP.NET Core. | +| mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim | .NET 7 runtime-only on Linux Debian distro | +| mcr.microsoft.com/dotnet/aspnet:7.0-nanoserver-1809 | .NET 7 runtime-only on Windows Nano Server (Windows Server version 1809) | > [!div class="step-by-step"] > [Previous](container-framework-choice-factors.md) diff --git a/docs/architecture/microservices/net-core-net-framework-containers/net-core-container-scenarios.md b/docs/architecture/microservices/net-core-net-framework-containers/net-core-container-scenarios.md index 73da929003328..627422bfd1d9c 100644 --- a/docs/architecture/microservices/net-core-net-framework-containers/net-core-container-scenarios.md +++ b/docs/architecture/microservices/net-core-net-framework-containers/net-core-container-scenarios.md @@ -1,5 +1,5 @@ --- -title: When to choose .NET 6 for Docker containers +title: When to choose .NET 7 for Docker containers description: .NET Microservices Architecture for Containerized .NET Applications | When to choose .NET for Docker containers ms.date: 11/19/2021 --- @@ -7,39 +7,39 @@ ms.date: 11/19/2021 [!INCLUDE [download-alert](../includes/download-alert.md)] -The modularity and lightweight nature of .NET 6 makes it perfect for containers. When you deploy and start a container, its image is far smaller with .NET 6 than with .NET Framework. In contrast, to use .NET Framework for a container, you must base your image on the Windows Server Core image, which is a lot heavier than the Windows Nano Server or Linux images that you use for .NET 6. +The modularity and lightweight nature of .NET 7 makes it perfect for containers. When you deploy and start a container, its image is far smaller with .NET 7 than with .NET Framework. In contrast, to use .NET Framework for a container, you must base your image on the Windows Server Core image, which is a lot heavier than the Windows Nano Server or Linux images that you use for .NET 7. -Additionally, .NET 6 is cross-platform, so you can deploy server apps with Linux or Windows container images. However, if you are using the traditional .NET Framework, you can only deploy images based on Windows Server Core. +Additionally, .NET 7 is cross-platform, so you can deploy server apps with Linux or Windows container images. However, if you are using the traditional .NET Framework, you can only deploy images based on Windows Server Core. -The following is a more detailed explanation of why to choose .NET 6. +The following is a more detailed explanation of why to choose .NET 7. ## Developing and deploying cross platform -Clearly, if your goal is to have an application (web app or service) that can run on multiple platforms supported by Docker (Linux and Windows), the right choice is .NET 6, because .NET Framework only supports Windows. +Clearly, if your goal is to have an application (web app or service) that can run on multiple platforms supported by Docker (Linux and Windows), the right choice is .NET 7, because .NET Framework only supports Windows. -.NET 6 also supports macOS as a development platform. However, when you deploy containers to a Docker host, that host must (currently) be based on Linux or Windows. For example, in a development environment, you could use a Linux VM running on a Mac. +.NET 7 also supports macOS as a development platform. However, when you deploy containers to a Docker host, that host must (currently) be based on Linux or Windows. For example, in a development environment, you could use a Linux VM running on a Mac. [Visual Studio](https://www.visualstudio.com/vs/) provides an integrated development environment (IDE) for Windows and supports Docker development. [Visual Studio for Mac](https://www.visualstudio.com/vs/visual-studio-mac/) is an IDE, evolution of Xamarin Studio, that runs on macOS and supports Docker-based application development. This tool should be the preferred choice for developers working in Mac machines who also want to use a powerful IDE. -You can also use [Visual Studio Code](https://code.visualstudio.com/) on macOS, Linux, and Windows. Visual Studio Code fully supports .NET 6, including IntelliSense and debugging. Because VS Code is a lightweight editor, you can use it to develop containerized apps on the machine in conjunction with the Docker CLI and the [.NET CLI](../../../core/tools/index.md). You can also target .NET 6 with most third-party editors like Sublime, Emacs, vi, and the open-source OmniSharp project, which also provides IntelliSense support. +You can also use [Visual Studio Code](https://code.visualstudio.com/) on macOS, Linux, and Windows. Visual Studio Code fully supports .NET 7, including IntelliSense and debugging. Because VS Code is a lightweight editor, you can use it to develop containerized apps on the machine in conjunction with the Docker CLI and the [.NET CLI](../../../core/tools/index.md). You can also target .NET 7 with most third-party editors like Sublime, Emacs, vi, and the open-source OmniSharp project, which also provides IntelliSense support. In addition to the IDEs and editors, you can use the [.NET CLI](../../../core/tools/index.md) for all supported platforms. ## Using containers for new ("green-field") projects -Containers are commonly used in conjunction with a microservices architecture, although they can also be used to containerize web apps or services that follow any architectural pattern. You can use .NET Framework on Windows Containers, but the modularity and lightweight nature of .NET 6 makes it perfect for containers and microservices architectures. When you create and deploy a container, its image is far smaller with .NET 6 than with .NET Framework. +Containers are commonly used in conjunction with a microservices architecture, although they can also be used to containerize web apps or services that follow any architectural pattern. You can use .NET Framework on Windows Containers, but the modularity and lightweight nature of .NET 7 makes it perfect for containers and microservices architectures. When you create and deploy a container, its image is far smaller with .NET 7 than with .NET Framework. ## Create and deploy microservices on containers You could use the traditional .NET Framework for building microservices-based applications (without containers) by using plain processes. That way, because the .NET Framework is already installed and shared across processes, processes are light and fast to start. However, if you are using containers, the image for the traditional .NET Framework is also based on Windows Server Core and that makes it too heavy for a microservices-on-containers approach. However, teams have been looking for opportunities to improve the experience for .NET Framework users as well. Recently, size of the [Windows Server Core container images have been reduced to >40% smaller](https://devblogs.microsoft.com/dotnet/we-made-windows-server-core-container-images-40-smaller). -On the other hand, .NET 6 is the best candidate if you're embracing a microservices-oriented system that is based on containers because .NET 6 is lightweight. In addition, its related container images, for either Linux or Windows Nano Server, are lean and small, making containers light and fast to start. +On the other hand, .NET 7 is the best candidate if you're embracing a microservices-oriented system that is based on containers because .NET 7 is lightweight. In addition, its related container images, for either Linux or Windows Nano Server, are lean and small, making containers light and fast to start. -A microservice is meant to be as small as possible: to be light when spinning up, to have a small footprint, to have a small Bounded Context (check DDD, [Domain-Driven Design](https://en.wikipedia.org/wiki/Domain-driven_design)), to represent a small area of concerns, and to be able to start and stop fast. For those requirements, you will want to use small and fast-to-instantiate container images like the .NET 6 container image. +A microservice is meant to be as small as possible: to be light when spinning up, to have a small footprint, to have a small Bounded Context (check DDD, [Domain-Driven Design](https://en.wikipedia.org/wiki/Domain-driven_design)), to represent a small area of concerns, and to be able to start and stop fast. For those requirements, you will want to use small and fast-to-instantiate container images like the .NET 7 container image. -A microservices architecture also allows you to mix technologies across a service boundary. This approach enables a gradual migration to .NET 6 for new microservices that work in conjunction with other microservices or with services developed with Node.js, Python, Java, GoLang, or other technologies. +A microservices architecture also allows you to mix technologies across a service boundary. This approach enables a gradual migration to .NET 7 for new microservices that work in conjunction with other microservices or with services developed with Node.js, Python, Java, GoLang, or other technologies. ## Deploying high density in scalable systems diff --git a/docs/architecture/microservices/net-core-net-framework-containers/net-framework-container-scenarios.md b/docs/architecture/microservices/net-core-net-framework-containers/net-framework-container-scenarios.md index 8d70a81195d18..66db084cbc25b 100644 --- a/docs/architecture/microservices/net-core-net-framework-containers/net-framework-container-scenarios.md +++ b/docs/architecture/microservices/net-core-net-framework-containers/net-framework-container-scenarios.md @@ -7,41 +7,41 @@ ms.date: 11/19/2021 [!INCLUDE [download-alert](../includes/download-alert.md)] -While .NET 6 offers significant benefits for new applications and application patterns, .NET Framework will continue to be a good choice for many existing scenarios. +While .NET 7 offers significant benefits for new applications and application patterns, .NET Framework will continue to be a good choice for many existing scenarios. ## Migrating existing applications directly to a Windows Server container You might want to use Docker containers just to simplify deployment, even if you are not creating microservices. For example, perhaps you want to improve your DevOps workflow with Docker—containers can give you better isolated test environments and can also eliminate deployment issues caused by missing dependencies when you move to a production environment. In cases like these, even if you are deploying a monolithic application, it makes sense to use Docker and Windows Containers for your current .NET Framework applications. -In most cases for this scenario, you will not need to migrate your existing applications to .NET 6; you can use Docker containers that include the traditional .NET Framework. However, a recommended approach is to use .NET 6 as you extend an existing application, such as writing a new service in ASP.NET Core. +In most cases for this scenario, you will not need to migrate your existing applications to .NET 7; you can use Docker containers that include the traditional .NET Framework. However, a recommended approach is to use .NET 7 as you extend an existing application, such as writing a new service in ASP.NET Core. -## Using third-party .NET libraries or NuGet packages not available for .NET 6 +## Using third-party .NET libraries or NuGet packages not available for .NET 7 -Third-party libraries are quickly embracing [.NET Standard](../../../standard/net-standard.md), which enables code sharing across all .NET flavors, including .NET 6. With .NET Standard 2.0 and later, the API surface compatibility across different frameworks has become significantly larger. Even more, .NET Core 2.x and newer applications can also directly reference existing .NET Framework libraries (see [.NET Framework 4.6.1 supporting .NET Standard 2.0](https://github.com/dotnet/standard/blob/v2.1.0/docs/planning/netstandard-2.0/README.md#net-framework-461-supporting-net-standard-20)). +Third-party libraries are quickly embracing [.NET Standard](../../../standard/net-standard.md), which enables code sharing across all .NET flavors, including .NET 7. With .NET Standard 2.0 and later, the API surface compatibility across different frameworks has become significantly larger. Even more, .NET Core 2.x and newer applications can also directly reference existing .NET Framework libraries (see [.NET Framework 4.6.1 supporting .NET Standard 2.0](https://github.com/dotnet/standard/blob/v2.1.0/docs/planning/netstandard-2.0/README.md#net-framework-461-supporting-net-standard-20)). In addition, the [Windows Compatibility Pack](../../../core/porting/windows-compat-pack.md) extends the API surface available for .NET Standard 2.0 on Windows. This pack allows recompiling most existing code to .NET Standard 2.x with little or no modification, to run on Windows. However, even with that exceptional progression since .NET Standard 2.0 and .NET Core 2.1 or later, there might be cases where certain NuGet packages need Windows to run and might not support .NET Core or later. If those packages are critical for your application, then you will need to use .NET Framework on Windows Containers. -## Using .NET technologies not available for .NET 6 +## Using .NET technologies not available for .NET 7 -Some .NET Framework technologies aren't available in .NET 6. Some of them might become available in later releases, but others don't fit the new application patterns targeted by .NET Core and might never be available. +Some .NET Framework technologies aren't available in .NET 7. Some of them might become available in later releases, but others don't fit the new application patterns targeted by .NET Core and might never be available. -The following list shows most of the technologies that aren't available in .NET 6: +The following list shows most of the technologies that aren't available in .NET 7: - ASP.NET Web Forms. This technology is only available on .NET Framework. Currently there are no plans to bring ASP.NET Web Forms to .NET or later. -- Workflow-related services. Windows Workflow Foundation (WF), Workflow Services (WCF + WF in a single service), and WCF Data Services (formerly known as ADO.NET Data Services) are only available on .NET Framework. There are currently no plans to bring them to .NET 6. +- Workflow-related services. Windows Workflow Foundation (WF), Workflow Services (WCF + WF in a single service), and WCF Data Services (formerly known as ADO.NET Data Services) are only available on .NET Framework. There are currently no plans to bring them to .NET 7. In addition to the technologies listed in the official [.NET roadmap](https://github.com/dotnet/core/blob/main/roadmap.md), other features might be ported to the new [unified .NET platform](https://devblogs.microsoft.com/dotnet/introducing-net-5/). You might consider participating in the discussions on GitHub so that your voice can be heard. And if you think something is missing, file a new issue in the [dotnet/runtime](https://github.com/dotnet/runtime/issues/new) GitHub repository. -## Using a platform or API that doesn't support .NET 6 +## Using a platform or API that doesn't support .NET 7 -Some Microsoft and third-party platforms don't support .NET 6. For example, some Azure services provide an SDK that isn't yet available for consumption on .NET 6 yet. Most Azure SDK should eventually be ported to .NET 6/.NET Standard, but some might not for several reasons. You can see the available Azure SDKs in the [Azure SDK Latest Releases](https://azure.github.io/azure-sdk/releases/latest/index.html) page. +Some Microsoft and third-party platforms don't support .NET 7. For example, some Azure services provide an SDK that isn't yet available for consumption on .NET 7 yet. Most Azure SDK should eventually be ported to .NET 7/.NET Standard, but some might not for several reasons. You can see the available Azure SDKs in the [Azure SDK Latest Releases](https://azure.github.io/azure-sdk/releases/latest/index.html) page. -In the meantime, if any platform or service in Azure still doesn't support .NET 6 with its client API, you can use the equivalent REST API from the Azure service or the client SDK on .NET Framework. +In the meantime, if any platform or service in Azure still doesn't support .NET 7 with its client API, you can use the equivalent REST API from the Azure service or the client SDK on .NET Framework. -## Porting existing ASP.NET application to .NET 6 +## Porting existing ASP.NET application to .NET 7 .NET Core is a revolutionary step forward from .NET Framework. It offers a host of advantages over .NET Framework across the board from productivity to performance, and from cross-platform support to developer satisfaction. If you are using .NET Framework and planning to migrate your application to .NET Core or .NET 5+, see [Porting Existing ASP.NET Apps to .NET Core](../../porting-existing-aspnet-apps/index.md). diff --git a/docs/architecture/microservices/net-core-net-framework-containers/official-net-docker-images.md b/docs/architecture/microservices/net-core-net-framework-containers/official-net-docker-images.md index 5a8d9e58f09fa..ff75356809a95 100644 --- a/docs/architecture/microservices/net-core-net-framework-containers/official-net-docker-images.md +++ b/docs/architecture/microservices/net-core-net-framework-containers/official-net-docker-images.md @@ -8,13 +8,9 @@ ms.date: 11/19/2021 [!INCLUDE [download-alert](../includes/download-alert.md)] -The Official .NET Docker images are Docker images created and optimized by Microsoft. They are publicly available in the Microsoft repositories on [Docker Hub](https://hub.docker.com/u/microsoft/). Each repository can contain multiple images, depending on .NET versions, and depending on the OS and versions (Linux Debian, Linux Alpine, Windows Nano Server, Windows Server Core, etc.). +The Official .NET Docker images are Docker images created and optimized by Microsoft. They are publicly available on [Microsoft Artifact Registry](https://mcr.microsoft.com/). You can search over the catalog to find all .NET image repositories, for example [.NET SDK](https://mcr.microsoft.com/product/dotnet/sdk/about) repository. -Since .NET Core 2.1, all the .NET Core or later images, including for ASP.NET Core are available at Docker Hub at the .NET image repository: . - -Since May 2018, Microsoft images are being [syndicated in the Microsoft Container Registry](https://azure.microsoft.com/blog/microsoft-syndicates-container-catalog/). The official catalog is still only available in Docker Hub, and there you'll find the updated address to pull the image. - -Most image repositories provide extensive tagging to help you select not just a specific framework version, but also to choose an OS (Linux distribution or Windows version). +Each repository can contain multiple images, depending on .NET versions, and depending on the OS and versions (Linux Debian, Linux Alpine, Windows Nano Server, Windows Server Core, and so on). Image repositories provide extensive tagging to help you select not just a specific framework version, but also to choose an OS (Linux distribution or Windows version). ## .NET and Docker image optimizations for development versus production @@ -28,24 +24,24 @@ Why multiple images? When developing, building, and running containerized applic ### During development and build -During development, what is important is how fast you can iterate changes, and the ability to debug the changes. The size of the image isn't as important as the ability to make changes to your code and see the changes quickly. Some tools and "build-agent containers", use the development .NET image (*mcr.microsoft.com/dotnet/sdk:6.0*) during development and build process. When building inside a Docker container, the important aspects are the elements that are needed to compile your app. This includes the compiler and any other .NET dependencies. +During development, what is important is how fast you can iterate changes, and the ability to debug the changes. The size of the image isn't as important as the ability to make changes to your code and see the changes quickly. Some tools and "build-agent containers", use the development .NET image (*mcr.microsoft.com/dotnet/sdk:7.0*) during development and build process. When building inside a Docker container, the important aspects are the elements that are needed to compile your app. This includes the compiler and any other .NET dependencies. Why is this type of build image important? You don't deploy this image to production. Instead, it's an image that you use to build the content you place into a production image. This image would be used in your continuous integration (CI) environment or build environment when using Docker multi-stage builds. ### In production -What is important in production is how fast you can deploy and start your containers based on a production .NET image. Therefore, the runtime-only image based on *mcr.microsoft.com/dotnet/aspnet:6.0* is small so that it can travel quickly across the network from your Docker registry to your Docker hosts. The contents are ready to run, enabling the fastest time from starting the container to processing results. In the Docker model, there is no need for compilation from C\# code, as there is when you run dotnet build or dotnet publish when using the build container. +What is important in production is how fast you can deploy and start your containers based on a production .NET image. Therefore, the runtime-only image based on *mcr.microsoft.com/dotnet/aspnet:7.0* is small so that it can travel quickly across the network from your Docker registry to your Docker hosts. The contents are ready to run, enabling the fastest time from starting the container to processing results. In the Docker model, there is no need for compilation from C\# code, as there is when you run dotnet build or dotnet publish when using the build container. In this optimized image, you put only the binaries and other content needed to run the application. For example, the content created by `dotnet publish` contains only the compiled .NET binaries, images, .js, and .css files. Over time, you will see images that contain pre-jitted (the compilation from IL to native that occurs at run time) packages. Although there are multiple versions of the .NET and ASP.NET Core images, they all share one or more layers, including the base layer. Therefore, the amount of disk space needed to store an image is small; it consists only of the delta between your custom image and its base image. The result is that it is quick to pull the image from your registry. -When you explore the .NET image repositories at Docker Hub, you will find multiple image versions classified or marked with tags. These tags help to decide which one to use, depending on the version you need, like those in the following table: +When you explore the .NET image repositories at Microsoft Artifact Registry, you will find multiple image versions classified or marked with tags. These tags help to decide which one to use, depending on the version you need, like those in the following table: | Image | Comments | |-------|----------| -| mcr.microsoft.com/dotnet/aspnet:**6.0** | ASP.NET Core, with runtime only and ASP.NET Core optimizations, on Linux and Windows (multi-arch) | -| mcr.microsoft.com/dotnet/sdk:**6.0** | .NET 6, with SDKs included, on Linux and Windows (multi-arch) | +| mcr.microsoft.com/dotnet/aspnet:**7.0** | ASP.NET Core, with runtime only and ASP.NET Core optimizations, on Linux and Windows (multi-arch) | +| mcr.microsoft.com/dotnet/sdk:**7.0** | .NET 7, with SDKs included, on Linux and Windows (multi-arch) | You can find all the available docker images in [dotnet-docker](https://github.com/dotnet/dotnet-docker) and also refer to the latest preview releases by using nightly build `mcr.microsoft.com/dotnet/nightly/*` diff --git a/docs/architecture/microservices/secure-net-microservices-web-applications/authorization-net-microservices-web-applications.md b/docs/architecture/microservices/secure-net-microservices-web-applications/authorization-net-microservices-web-applications.md index b18e263c44533..d31c6d5694676 100644 --- a/docs/architecture/microservices/secure-net-microservices-web-applications/authorization-net-microservices-web-applications.md +++ b/docs/architecture/microservices/secure-net-microservices-web-applications/authorization-net-microservices-web-applications.md @@ -108,6 +108,24 @@ In addition to registering custom policy requirements with `AddPolicy` calls, yo An example of a custom authorization requirement and handler for checking a user's age (based on a `DateOfBirth` claim) is available in the ASP.NET Core [authorization documentation](https://docs.asp.net/en/latest/security/authorization/policies.html). +## Authorization and minimal apis + +ASP.NET supports minimal APIs as an alternative to controller-based APIs. Authorization policies are the recommended way to configure authorization for minimal APIs, as this example demonstrates: + +```csharp +// Program.cs +builder.Services.AddAuthorizationBuilder() + .AddPolicy("admin_greetings", policy => + policy + .RequireRole("admin") + .RequireScope("greetings_api")); + +// build the app + +app.MapGet("/hello", () => "Hello world!") + .RequireAuthorization("admin_greetings"); +``` + ## Additional resources - **ASP.NET Core Authentication** \ @@ -122,6 +140,8 @@ An example of a custom authorization requirement and handler for checking a user - **Custom Policy-Based Authorization** \ [https://learn.microsoft.com/aspnet/core/security/authorization/policies](/aspnet/core/security/authorization/policies) +- **Authentication and authorization in minimal APIs** \ [https://learn.microsoft.com/aspnet/core/fundamentals/minimal-apis/security](/aspnet/core/fundamentals/minimal-apis/security) + >[!div class="step-by-step"] >[Previous](index.md) >[Next](developer-app-secrets-storage.md) diff --git a/docs/architecture/microservices/secure-net-microservices-web-applications/index.md b/docs/architecture/microservices/secure-net-microservices-web-applications/index.md index 9b0bd10d28f21..c2e0ab353cf8b 100644 --- a/docs/architecture/microservices/secure-net-microservices-web-applications/index.md +++ b/docs/architecture/microservices/secure-net-microservices-web-applications/index.md @@ -35,41 +35,36 @@ The primary mechanism in ASP.NET Core for identifying an application's users is > [!TIP] > ASP.NET Core 2.1 and later provides [ASP.NET Core Identity](/aspnet/core/security/authentication/identity) as a [Razor Class Library](/aspnet/core/razor-pages/ui-class), so you won't see much of the necessary code in your project, as was the case for previous versions. For details on how to customize the Identity code to suit your needs, see [Scaffold Identity in ASP.NET Core projects](/aspnet/core/security/authentication/scaffold-identity). -The following code is taken from the ASP.NET Core Web Application MVC 3.1 project template with individual user account authentication selected. It shows how to configure ASP.NET Core Identity using Entity Framework Core in the `Startup.ConfigureServices` method. +The following code is taken from the ASP.NET Core Web Application MVC 3.1 project template with individual user account authentication selected. It shows how to configure ASP.NET Core Identity using Entity Framework Core in the _Program.cs_ file. ```csharp -public void ConfigureServices(IServiceCollection services) -{ - //... - services.AddDbContext(options => - options.UseSqlServer( - Configuration.GetConnectionString("DefaultConnection"))); +//... +builder.Services.AddDbContext(options => + options.UseSqlServer( + builder.Configuration.GetConnectionString("DefaultConnection"))); - services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true) +builder.Services.AddDefaultIdentity(options => + options.SignIn.RequireConfirmedAccount = true) .AddEntityFrameworkStores(); - services.AddRazorPages(); - //... -} +builder.Services.AddRazorPages(); +//... ``` -Once ASP.NET Core Identity is configured, you enable it by adding the `app.UseAuthentication()` and `endpoints.MapRazorPages()` as shown in the following code in the service's `Startup.Configure` method: +Once ASP.NET Core Identity is configured, you enable it by adding the `app.UseAuthentication()` and `endpoints.MapRazorPages()` as shown in the following code in the service's _Program.cs_ file: ```csharp -public void Configure(IApplicationBuilder app, IWebHostEnvironment env) -{ - //... - app.UseRouting(); +//... +app.UseRouting(); - app.UseAuthentication(); - app.UseAuthorization(); +app.UseAuthentication(); +app.UseAuthorization(); - app.UseEndpoints(endpoints => - { - endpoints.MapRazorPages(); - }); - //... -} +app.UseEndpoints(endpoints => +{ + endpoints.MapRazorPages(); +}); +//... ``` > [!IMPORTANT] @@ -91,26 +86,23 @@ For authentication scenarios that make use of a local user data store and that p ASP.NET Core also supports using [external authentication providers](/aspnet/core/security/authentication/social/) to let users sign in via [OAuth 2.0](https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2) flows. This means that users can sign in using existing authentication processes from providers like Microsoft, Google, Facebook, or Twitter and associate those identities with an ASP.NET Core identity in your application. -To use external authentication, besides including the authentication middleware as mentioned before, using the `app.UseAuthentication()` method, you also have to register the external provider in `Startup` as shown in the following example: +To use external authentication, besides including the authentication middleware as mentioned before, using the `app.UseAuthentication()` method, you also have to register the external provider in _Program.cs_ as shown in the following example: ```csharp -public void ConfigureServices(IServiceCollection services) -{ - //... - services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true) - .AddEntityFrameworkStores(); +//... +services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true) + .AddEntityFrameworkStores(); - services.AddAuthentication() - .AddMicrosoftAccount(microsoftOptions => - { - microsoftOptions.ClientId = Configuration["Authentication:Microsoft:ClientId"]; - microsoftOptions.ClientSecret = Configuration["Authentication:Microsoft:ClientSecret"]; - }) - .AddGoogle(googleOptions => { ... }) - .AddTwitter(twitterOptions => { ... }) - .AddFacebook(facebookOptions => { ... }); - //... -} +services.AddAuthentication() + .AddMicrosoftAccount(microsoftOptions => + { + microsoftOptions.ClientId = builder.Configuration["Authentication:Microsoft:ClientId"]; + microsoftOptions.ClientSecret = builder.Configuration["Authentication:Microsoft:ClientSecret"]; + }) + .AddGoogle(googleOptions => { ... }) + .AddTwitter(twitterOptions => { ... }) + .AddFacebook(facebookOptions => { ... }); +//... ``` Popular external authentication providers and their associated NuGet packages are shown in the following table: @@ -150,57 +142,53 @@ For example, in an ASP.NET Core Web API that exposes RESTful endpoints that migh ### Authenticate with an OpenID Connect or OAuth 2.0 Identity provider -If user information is stored in Azure Active Directory or another identity solution that supports OpenID Connect or OAuth 2.0, you can use the **Microsoft.AspNetCore.Authentication.OpenIdConnect** package to authenticate using the OpenID Connect workflow. For example, to authenticate to the Identity.Api microservice in eShopOnContainers, an ASP.NET Core web application can use middleware from that package as shown in the following simplified example in `Startup.cs`: +If user information is stored in Azure Active Directory or another identity solution that supports OpenID Connect or OAuth 2.0, you can use the **Microsoft.AspNetCore.Authentication.OpenIdConnect** package to authenticate using the OpenID Connect workflow. For example, to authenticate to the Identity.Api microservice in eShopOnContainers, an ASP.NET Core web application can use middleware from that package as shown in the following simplified example in _Program.cs_: ```csharp -// Startup.cs +// Program.cs -public void Configure(IApplicationBuilder app, IHostingEnvironment env) -{ - //… - app.UseAuthentication(); - //… - app.UseEndpoints(endpoints => - { - //... - }); -} +var identityUrl = builder.Configuration.GetValue("IdentityUrl"); +var callBackUrl = builder.Configuration.GetValue("CallBackUrl"); +var sessionCookieLifetime = builder.Configuration.GetValue("SessionCookieLifetimeMinutes", 60); -public void ConfigureServices(IServiceCollection services) -{ - var identityUrl = Configuration.GetValue("IdentityUrl"); - var callBackUrl = Configuration.GetValue("CallBackUrl"); - var sessionCookieLifetime = Configuration.GetValue("SessionCookieLifetimeMinutes", 60); +// Add Authentication services - // Add Authentication services +services.AddAuthentication(options => +{ + options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; + options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; +}) +.AddCookie(setup => setup.ExpireTimeSpan = TimeSpan.FromMinutes(sessionCookieLifetime)) +.AddOpenIdConnect(options => +{ + options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; + options.Authority = identityUrl.ToString(); + options.SignedOutRedirectUri = callBackUrl.ToString(); + options.ClientId = useLoadTest ? "mvctest" : "mvc"; + options.ClientSecret = "secret"; + options.ResponseType = useLoadTest ? "code id_token token" : "code id_token"; + options.SaveTokens = true; + options.GetClaimsFromUserInfoEndpoint = true; + options.RequireHttpsMetadata = false; + options.Scope.Add("openid"); + options.Scope.Add("profile"); + options.Scope.Add("orders"); + options.Scope.Add("basket"); + options.Scope.Add("marketing"); + options.Scope.Add("locations"); + options.Scope.Add("webshoppingagg"); + options.Scope.Add("orders.signalrhub"); +}); + +// Build the app +//… +app.UseAuthentication(); +//… +app.UseEndpoints(endpoints => +{ + //... +}); - services.AddAuthentication(options => - { - options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; - options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; - }) - .AddCookie(setup => setup.ExpireTimeSpan = TimeSpan.FromMinutes(sessionCookieLifetime)) - .AddOpenIdConnect(options => - { - options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; - options.Authority = identityUrl.ToString(); - options.SignedOutRedirectUri = callBackUrl.ToString(); - options.ClientId = useLoadTest ? "mvctest" : "mvc"; - options.ClientSecret = "secret"; - options.ResponseType = useLoadTest ? "code id_token token" : "code id_token"; - options.SaveTokens = true; - options.GetClaimsFromUserInfoEndpoint = true; - options.RequireHttpsMetadata = false; - options.Scope.Add("openid"); - options.Scope.Add("profile"); - options.Scope.Add("orders"); - options.Scope.Add("basket"); - options.Scope.Add("marketing"); - options.Scope.Add("locations"); - options.Scope.Add("webshoppingagg"); - options.Scope.Add("orders.signalrhub"); - }); -} ``` When you use this workflow, the ASP.NET Core Identity middleware is not needed, because all user information storage and authentication is handled by the Identity service. @@ -211,9 +199,9 @@ If you prefer to issue security tokens for local ASP.NET Core Identity users rat [IdentityServer4](https://github.com/IdentityServer/IdentityServer4) and [OpenIddict](https://github.com/openiddict/openiddict-core) are OpenID Connect providers that integrate easily with ASP.NET Core Identity to let you issue security tokens from an ASP.NET Core service. The [IdentityServer4 documentation](https://identityserver4.readthedocs.io/en/latest/) has in-depth instructions for using the library. However, the basic steps to using IdentityServer4 to issue tokens are as follows. -1. You call app.UseIdentityServer in the Startup.Configure method to add IdentityServer4 to the application's HTTP request processing pipeline. This lets the library serve requests to OpenID Connect and OAuth2 endpoints like /connect/token. +1. You configure IdentityServer4 in _Program.cs_ by making a call to builder.Services.AddIdentityServer. -2. You configure IdentityServer4 in Startup.ConfigureServices by making a call to services.AddIdentityServer. +2. You call app.UseIdentityServer in _Program.cs_ to add IdentityServer4 to the application's HTTP request processing pipeline. This lets the library serve requests to OpenID Connect and OAuth2 endpoints like /connect/token. 3. You configure identity server by setting the following data: @@ -234,16 +222,14 @@ When you specify clients and resources for IdentityServer4 to use, you can pass A sample configuration for IdentityServer4 to use in-memory resources and clients provided by a custom IClientStore type might look like the following example: ```csharp -public IServiceProvider ConfigureServices(IServiceCollection services) -{ - //... - services.AddSingleton(); - services.AddIdentityServer() - .AddSigningCredential("CN=sts") - .AddInMemoryApiResources(MyApiResourceProvider.GetAllResources()) - .AddAspNetIdentity(); - //... -} +// Program.cs + +builder.Services.AddSingleton(); +builder.Services.AddIdentityServer() + .AddSigningCredential("CN=sts") + .AddInMemoryApiResources(MyApiResourceProvider.GetAllResources()) + .AddAspNetIdentity(); +//... ``` ### Consume security tokens @@ -253,38 +239,32 @@ Authenticating against an OpenID Connect endpoint or issuing your own security t For that scenario, authentication middleware that handles JWT tokens is available in the **Microsoft.AspNetCore.Authentication.JwtBearer** package. JWT stands for "[JSON Web Token](https://tools.ietf.org/html/rfc7519)" and is a common security token format (defined by RFC 7519) for communicating security claims. A simplified example of how to use middleware to consume such tokens might look like this code fragment, taken from the Ordering.Api microservice of eShopOnContainers. ```csharp -// Startup.cs +// Program.cs -public void Configure(IApplicationBuilder app, IHostingEnvironment env) -{ - //… - // Configure the pipeline to use authentication - app.UseAuthentication(); - //… - app.UseEndpoints(endpoints => - { - //... - }); -} +var identityUrl = builder.Configuration.GetValue("IdentityUrl"); -public void ConfigureServices(IServiceCollection services) +// Add Authentication services + +builder.Services.AddAuthentication(options => { - var identityUrl = Configuration.GetValue("IdentityUrl"); + options.DefaultAuthenticateScheme = AspNetCore.Authentication.JwtBearer.JwtBearerDefaults.AuthenticationScheme; + options.DefaultChallengeScheme = AspNetCore.Authentication.JwtBearer.JwtBearerDefaults.AuthenticationScheme; - // Add Authentication services +}).AddJwtBearer(options => +{ + options.Authority = identityUrl; + options.RequireHttpsMetadata = false; + options.Audience = "orders"; +}); - services.AddAuthentication(options => - { - options.DefaultAuthenticateScheme = AspNetCore.Authentication.JwtBearer.JwtBearerDefaults.AuthenticationScheme; - options.DefaultChallengeScheme = AspNetCore.Authentication.JwtBearer.JwtBearerDefaults.AuthenticationScheme; +// Build the app - }).AddJwtBearer(options => - { - options.Authority = identityUrl; - options.RequireHttpsMetadata = false; - options.Audience = "orders"; - }); -} +app.UseAuthentication(); +//… +app.UseEndpoints(endpoints => +{ + //... +}); ``` The parameters in this usage are: diff --git a/docs/architecture/microservices/toc.yml b/docs/architecture/microservices/toc.yml index 3f5e2f733af23..bf4922aa3094c 100644 --- a/docs/architecture/microservices/toc.yml +++ b/docs/architecture/microservices/toc.yml @@ -11,7 +11,7 @@ items: href: container-docker-introduction/docker-terminology.md - name: Docker containers, images, and registries href: container-docker-introduction/docker-containers-images-registries.md - - name: Choosing Between .NET 6 and .NET Framework for Docker Containers + - name: Choosing Between .NET and .NET Framework for Docker Containers href: net-core-net-framework-containers/index.md items: - name: General guidance diff --git a/docs/architecture/modern-web-apps-azure/choose-between-traditional-web-and-single-page-apps.md b/docs/architecture/modern-web-apps-azure/choose-between-traditional-web-and-single-page-apps.md index d108c37e53294..4b4f906ea617b 100644 --- a/docs/architecture/modern-web-apps-azure/choose-between-traditional-web-and-single-page-apps.md +++ b/docs/architecture/modern-web-apps-azure/choose-between-traditional-web-and-single-page-apps.md @@ -22,6 +22,8 @@ Use traditional web applications when: - Your application needs to function in browsers without JavaScript support. +- Your application is public-facing and benefits from search engine discovery and referrals. + Use a SPA when: - Your application must expose a rich user interface with many features. @@ -113,6 +115,14 @@ The following decision table summarizes some of the basic factors to consider wh | Minimal Client-Side Application Behavior | **Well-Suited** | **Overkill** | **Viable** | | Rich, Complex User Interface Requirements | **Limited** | **Well-Suited** | **Well-Suited** | +## Other considerations + +Traditional Web Apps tend to be simpler and have better Search Engine Optimization (SEO) criteria than SPA apps. Search engine bots can easily consume content from traditional apps, while support for indexing SPAs may be lacking or limited. If your app benefits from public discovery by search engines, this is often an important consideration. + +In addition, unless you've built a management tool for your SPA's content, it may require developers to make changes. Traditional Web Apps are often easier for non-developers to make changes to, since much of the content is simply HTML and may not require a build process to preview or even deploy. If non-developers in your organization are likely to need to maintain the content of the app, a traditional web app may be a better choice. + +SPAs shine when the app has complex interactive forms or other user interaction features. For complex apps that require authentication to use, and thus aren't accessible by public search engine spiders, SPAs are a great option in many cases. + >[!div class="step-by-step"] >[Previous](modern-web-applications-characteristics.md) >[Next](architectural-principles.md) diff --git a/docs/architecture/modern-web-apps-azure/common-web-application-architectures.md b/docs/architecture/modern-web-apps-azure/common-web-application-architectures.md index a4b17063175c2..b07c5de2c1721 100644 --- a/docs/architecture/modern-web-apps-azure/common-web-application-architectures.md +++ b/docs/architecture/modern-web-apps-azure/common-web-application-architectures.md @@ -93,7 +93,7 @@ The simplest approach to scaling a web application in Azure is to configure scal ## Clean architecture -Applications that follow the Dependency Inversion Principle as well as the Domain-Driven Design (DDD) principles tend to arrive at a similar architecture. This architecture has gone by many names over the years. One of the first names was Hexagonal Architecture, followed by Ports-and-Adapters. More recently, it's been cited as the [Onion Architecture](https://jeffreypalermo.com/blog/the-onion-architecture-part-1/) or [Clean Architecture](https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html). The latter name, Clean Architecture, is used as the name for this architecture in this e-book. +Applications that follow the Dependency Inversion Principle as well as the Domain-Driven Design (DDD) principles tend to arrive at a similar architecture. This architecture has gone by many names over the years. One of the first names was Hexagonal Architecture, followed by Ports-and-Adapters. More recently, it's been cited as the [Onion Architecture](https://jeffreypalermo.com/blog/the-onion-architecture-part-1/) or [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html). The latter name, Clean Architecture, is used as the name for this architecture in this e-book. The eShopOnWeb reference application uses the Clean Architecture approach in organizing its code into projects. You can find a solution template you can use as a starting point for your own ASP.NET Core solutions in the [ardalis/cleanarchitecture](https://github.com/ardalis/cleanarchitecture) GitHub repository or by [installing the template from NuGet](https://www.nuget.org/packages/Ardalis.CleanArchitecture.Template/). @@ -270,7 +270,7 @@ networks: The `docker-compose.yml` file references the `Dockerfile` in the `Web` project. The `Dockerfile` is used to specify which base container will be used and how the application will be configured on it. The `Web`' `Dockerfile`: ```dockerfile -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /app COPY *.sln . @@ -280,7 +280,7 @@ RUN dotnet restore RUN dotnet publish -c Release -o out -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime +FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime WORKDIR /app COPY --from=build /app/src/Web/out ./ @@ -304,7 +304,7 @@ If you want to add Docker support to your application using Visual Studio, make ### References – Common web architectures - **The Clean Architecture** - + - **The Onion Architecture** - **The Repository Pattern** diff --git a/docs/architecture/modern-web-apps-azure/develop-asp-net-core-mvc-apps.md b/docs/architecture/modern-web-apps-azure/develop-asp-net-core-mvc-apps.md index fc8b0ee918507..6cc64dcb14ddf 100644 --- a/docs/architecture/modern-web-apps-azure/develop-asp-net-core-mvc-apps.md +++ b/docs/architecture/modern-web-apps-azure/develop-asp-net-core-mvc-apps.md @@ -33,7 +33,7 @@ A Razor Page's page model combines the responsibilities of an MVC controller and ### When to use MVC -If you're building web APIs, the MVC pattern makes more sense than trying to use Razor Pages. If your project will only expose web API endpoints, you should ideally start from the Web API project template. Otherwise, it's easy to add controllers and associated API endpoints to any ASP.NET Core app. Use the view-based MVC approach if you're migrating an existing application from ASP.NET MVC 5 or earlier to ASP.NET Core MVC and you want to do so with the least amount of effort. Once you've made the initial migration, you can evaluate whether it makes sense to adopt Razor Pages for new features or even as a wholesale migration. For more information about porting .NET 4.x apps to .NET 6, see [Porting Existing ASP.NET Apps to ASP.NET Core eBook](/dotnet/architecture/porting-existing-aspnet-apps/). +If you're building web APIs, the MVC pattern makes more sense than trying to use Razor Pages. If your project will only expose web API endpoints, you should ideally start from the Web API project template. Otherwise, it's easy to add controllers and associated API endpoints to any ASP.NET Core app. Use the view-based MVC approach if you're migrating an existing application from ASP.NET MVC 5 or earlier to ASP.NET Core MVC and you want to do so with the least amount of effort. Once you've made the initial migration, you can evaluate whether it makes sense to adopt Razor Pages for new features or even as a wholesale migration. For more information about porting .NET 4.x apps to .NET 7, see [Porting Existing ASP.NET Apps to ASP.NET Core eBook](/dotnet/architecture/porting-existing-aspnet-apps/). Whether you choose to build your web app using Razor Pages or MVC views, your app will have similar performance and will include support for dependency injection, filters, model binding, validation, and so on. @@ -187,7 +187,7 @@ Many developers understand the risks of static cling and global state, but will ASP.NET Core is built around having methods and classes declare their dependencies, requesting them as arguments. ASP.NET applications are typically set up in _Program.cs_ or in a `Startup` class. > [!NOTE] -> Configuring apps completely in _Program.cs_ is the default approach for .NET 6 and Visual Studio 2022 apps. Project templates have been updated to help you get started with this new approach. ASP.NET Core projects can still use a `Startup` class, if desired. +> Configuring apps completely in _Program.cs_ is the default approach for .NET 6 (and later) and Visual Studio 2022 apps. Project templates have been updated to help you get started with this new approach. ASP.NET Core projects can still use a `Startup` class, if desired. #### Configure services in _Program.cs_ diff --git a/docs/architecture/modern-web-apps-azure/index.md b/docs/architecture/modern-web-apps-azure/index.md index 8b9549f9f55fe..fe14747eacc33 100644 --- a/docs/architecture/modern-web-apps-azure/index.md +++ b/docs/architecture/modern-web-apps-azure/index.md @@ -10,7 +10,7 @@ ms.date: 01/10/2022 ![Book cover image of the Architect Modern Web Applications guide.](./media/index/web-application-guide-cover-image.png) -**EDITION v6.0** - Updated to ASP.NET Core 6.0 +**EDITION v7.0** - Updated to ASP.NET Core 7.0 Refer [changelog](https://aka.ms/aspnet-ebook-changelog) for the book updates and community contributions. @@ -24,7 +24,7 @@ One Microsoft Way Redmond, Washington 98052-6399 -Copyright © 2022 by Microsoft Corporation +Copyright © 2023 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. @@ -56,7 +56,7 @@ Editors: ## Introduction -.NET 6 and ASP.NET Core offer several advantages over traditional .NET development. You should use .NET 6 for your server applications if some or all of the following are important to your application's success: +.NET 7 and ASP.NET Core offer several advantages over traditional .NET development. You should use .NET 7 for your server applications if some or all of the following are important to your application's success: - Cross-platform support. @@ -68,7 +68,7 @@ Editors: - Side-by-side versioning of .NET versions by application on the same server. -Traditional .NET 4.x apps can and do support many of these requirements, but ASP.NET Core and .NET 6 have been optimized to offer improved support for the above scenarios. +Traditional .NET 4.x apps can and do support many of these requirements, but ASP.NET Core and .NET 7 have been optimized to offer improved support for the above scenarios. More and more organizations are choosing to host their web applications in the cloud using services like Microsoft Azure. You should consider hosting your application in the cloud if the following are important to your application or organization: @@ -86,7 +86,7 @@ Building web applications with ASP.NET Core, hosted in Azure, offers many compet ## Version -This guide has been revised to cover **.NET 6.0** version along with many additional updates related to the same "wave" of technologies (that is, Azure and additional third-party technologies) coinciding in time with the .NET 6.0 release. That's why the book version has also been updated to version **6.0**. +This guide has been revised to cover **.NET 7.0** version along with many additional updates related to the same "wave" of technologies (that is, Azure and additional third-party technologies) coinciding in time with the .NET 7.0 release. That's why the book version has also been updated to version **7.0**. ## Purpose @@ -117,7 +117,7 @@ Feel free to forward this guide to your team to help ensure a common understandi ## References -- **Choosing between .NET 6 and .NET Framework for server apps** +- **Choosing between .NET and .NET Framework for server apps** [https://learn.microsoft.com/dotnet/standard/choosing-core-framework-server](../../standard/choosing-core-framework-server.md) >[!div class="step-by-step"] diff --git a/docs/architecture/modern-web-apps-azure/media/image5-10.png b/docs/architecture/modern-web-apps-azure/media/image5-10.png index d83b65b16753b..1c5b188c249fd 100644 Binary files a/docs/architecture/modern-web-apps-azure/media/image5-10.png and b/docs/architecture/modern-web-apps-azure/media/image5-10.png differ diff --git a/docs/architecture/modern-web-apps-azure/media/image5-11.png b/docs/architecture/modern-web-apps-azure/media/image5-11.png index c7f9c8cc12166..717a8f5fd9be1 100644 Binary files a/docs/architecture/modern-web-apps-azure/media/image5-11.png and b/docs/architecture/modern-web-apps-azure/media/image5-11.png differ diff --git a/docs/architecture/modern-web-apps-azure/media/image7-3.png b/docs/architecture/modern-web-apps-azure/media/image7-3.png index db2c4d3d9c128..15a0a16d38c79 100644 Binary files a/docs/architecture/modern-web-apps-azure/media/image7-3.png and b/docs/architecture/modern-web-apps-azure/media/image7-3.png differ diff --git a/docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md b/docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md index 474961715e84e..fbd664e1039bf 100644 --- a/docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md +++ b/docs/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps.md @@ -54,20 +54,22 @@ Your DbContext must have a constructor that accepts `DbContextOptions` and pass ### Configuring EF Core -In your ASP.NET Core application, you'll typically configure EF Core in your `ConfigureServices` method. EF Core uses a `DbContextOptionsBuilder`, which supports several helpful extension methods to streamline its configuration. To configure CatalogContext to use a SQL Server database with a connection string defined in Configuration, you would add the following code to `ConfigureServices`: +In your ASP.NET Core application, you'll typically configure EF Core in _Program.cs_ with your application's other dependencies. EF Core uses a `DbContextOptionsBuilder`, which supports several helpful extension methods to streamline its configuration. To configure CatalogContext to use a SQL Server database with a connection string defined in Configuration, you would add the following code: ```csharp -services.AddDbContext(options => options.UseSqlServer (Configuration.GetConnectionString("DefaultConnection"))); +builder.Services.AddDbContext( + options => options.UseSqlServer( + builder.Configuration.GetConnectionString("DefaultConnection"))); ``` To use the in-memory database: ```csharp -services.AddDbContext(options => +builder.Services.AddDbContext(options => options.UseInMemoryDatabase()); ``` -Once you have installed EF Core, created a DbContext child type, and configured it in `ConfigureServices`, you are ready to use EF Core. You can request an instance of your DbContext type in any service that needs it, and start working with your persisted entities using LINQ as if they were simply in a collection. EF Core does the work of translating your LINQ expressions into SQL queries to store and retrieve your data. +Once you have installed EF Core, created a DbContext child type, and added the type to the application's services, you are ready to use EF Core. You can request an instance of your DbContext type in any service that needs it and start working with your persisted entities using LINQ as if they were simply in a collection. EF Core does the work of translating your LINQ expressions into SQL queries to store and retrieve your data. You can see the queries EF Core is executing by configuring a logger and ensuring its level is set to at least Information, as shown in Figure 8-1. @@ -148,6 +150,8 @@ _Lazy loading_ is a feature that automatically loads related data as it is refer [Avoid Lazy Loading Entities in Web Applications](https://ardalis.com/avoid-lazy-loading-entities-in-asp-net-applications) +It's a good idea to test your application while examining the actual database queries it makes. Under certain circumstances, EF Core may make many more queries or a more expensive query than is optimal for the application. One such problem is known as a [Cartesian Explosion](/ef/core/querying/single-split-queries#cartesian-explosion). The EF Core team makes available the [AsSplitQuery method](/ef/core/querying/single-split-queries#split-queries) as one of several ways to tune runtime behavior. + ### Encapsulating data EF Core supports several features that allow your model to properly encapsulate its state. A common problem in domain models is that they expose collection navigation properties as publicly accessible list types. This problem allows any collaborator to manipulate the contents of these collection types, which may bypass important business rules related to the collection, possibly leaving the object in an invalid state. The solution to this problem is to expose read-only access to related collections, and explicitly provide methods defining ways in which clients can manipulate them, as in this example: @@ -273,7 +277,7 @@ The first DbContext is the `_catalogContext` and the second DbContext is within While EF Core is a great choice for managing persistence, and for the most part encapsulates database details from application developers, it isn't the only choice. Another popular open-source alternative is [Dapper](https://github.com/StackExchange/Dapper), a so-called micro-ORM. A micro-ORM is a lightweight, less full-featured tool for mapping objects to data structures. In the case of Dapper, its design goals focus on performance, rather than fully encapsulating the underlying queries it uses to retrieve and update data. Because it doesn't abstract SQL from the developer, Dapper is "closer to the metal" and lets developers write the exact queries they want to use for a given data access operation. -EF Core has two significant features it provides which separate it from Dapper but also add to its performance overhead. The first is the translation from LINQ expressions into SQL. These translations are cached, but even so there is overhead in performing them the first time. The second is change tracking on entities (so that efficient update statements can be generated). This behavior can be turned off for specific queries by using the extension. EF Core also generates SQL queries that usually are very efficient and in any case perfectly acceptable from a performance standpoint, but if you need fine control over the precise query to be executed, you can pass in custom SQL (or execute a stored procedure) using EF Core, too. In this case, Dapper still outperforms EF Core, but only very slightly. Julie Lerman presents some performance data in her May 2016 MSDN article [Dapper, Entity Framework, and Hybrid Apps](/archive/msdn-magazine/2016/may/data-points-dapper-entity-framework-and-hybrid-apps). Additional performance benchmark data for a variety of data access methods can be found on [the Dapper site](https://github.com/StackExchange/Dapper). +EF Core has two significant features it provides which separate it from Dapper but also add to its performance overhead. The first is the translation from LINQ expressions into SQL. These translations are cached, but even so there is overhead in performing them the first time. The second is change tracking on entities (so that efficient update statements can be generated). This behavior can be turned off for specific queries by using the extension. EF Core also generates SQL queries that usually are very efficient and in any case perfectly acceptable from a performance standpoint, but if you need fine control over the precise query to be executed, you can pass in custom SQL (or execute a stored procedure) using EF Core, too. In this case, Dapper still outperforms EF Core, but only very slightly. Current performance benchmark data for a variety of data access methods can be found on [the Dapper site](https://github.com/StackExchange/Dapper). To see how the syntax for Dapper varies from EF Core, consider these two versions of the same method for retrieving a list of items: @@ -406,7 +410,7 @@ The Response Caching Middleware will automatically cache responses based on a se Rather than (or in addition to) caching full web responses, you can cache the results of individual data queries. For this functionality, you can use in memory caching on the web server, or use [a distributed cache](/aspnet/core/performance/caching/distributed). This section will demonstrate how to implement in memory caching. -You add support for memory (or distributed) caching in `ConfigureServices`: +Add support for memory (or distributed) caching with the following code: ```csharp builder.Services.AddMemoryCache(); @@ -465,7 +469,7 @@ public class CachedCatalogService : ICatalogService } ``` -To configure the application to use the cached version of the service, but still allow the service to get the instance of CatalogService it needs in its constructor, you would add the following lines in `ConfigureServices`: +To configure the application to use the cached version of the service, but still allow the service to get the instance of CatalogService it needs in its constructor, you would add the following lines in _Program.cs_: ```csharp builder.Services.AddMemoryCache(); diff --git a/docs/architecture/modernize-desktop/whats-new-dotnet.md b/docs/architecture/modernize-desktop/whats-new-dotnet.md index 088b73d5ea2fa..b44806b62f8c5 100644 --- a/docs/architecture/modernize-desktop/whats-new-dotnet.md +++ b/docs/architecture/modernize-desktop/whats-new-dotnet.md @@ -8,43 +8,43 @@ ms.date: 10/24/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -Desktop applications such as Windows Forms and WPF can be built using various .NET platforms: .NET Framework, .NET Core, .NET 5, .NET 6. In this chapter, we'll talk about the history of each platform, explain the differences, and show what new features await desktop developers in .NET 6. +Desktop applications such as Windows Forms and WPF can be built using various .NET implementations, for example, .NET Framework or .NET 7. In this chapter, we'll talk about the history of each implementation, explain the differences, and show what new features await desktop developers in newer implementations. -If you have been developing Windows Forms or WPF applications for a long time, you are definitely familiar with .NET Framework. A few years ago, a new .NET Core platform (specifically its 3.0 version) started supporting desktop applications. The next version of .NET Core was rebranded to .NET 5, and now we are releasing its successor, .NET 6. Just as there are different versions of .NET Framework, for example, 4.6, 4.7, and 4.8, there are also different versions of .NET Core: .NET Core 3, .NET 5, and .NET 6. Our recommendation is to stay on the latest version, .NET 6, especially because it is a long-term support version that Microsoft will support for three years. +If you've been developing Windows Forms or WPF applications for a long time, you're familiar with .NET Framework. Later, .NET Core (specifically its 3.0 version) started supporting desktop applications. .NET Core was rebranded to .NET when .NET 5 was released. Just as there are different versions of .NET Framework, for example, 4.6, 4.7, and 4.8, there are also different versions of .NET Core: .NET Core 3.0, .NET 5, .NET 6, .NET 7, and so on. -And now let's look into the history of each platform to understand the differences and benefits of each. +Let's look into the history of each implementation to understand the differences and benefits of each. ## The motivation behind .NET Core -Since its launch in 2002, .NET Framework has evolved through the years to support many technologies like Windows Forms, ASP.NET, Entity Framework, Windows Store, and many others. All of them are different in nature. Therefore, Microsoft was approaching this evolution by taking parts of the .NET Framework and creating a different application stack for each technology. That way, development capabilities could be customized for the needs of the specific stack, which maximized the potential of every platform. That lead to fragmentation on the versions of the .NET Framework maintained by different independent teams. All these stacks have a common structure, containing an App Model, a Framework, and a Runtime, but they differ in the implementation of each of these parts. +Since its launch in 2002, .NET Framework has evolved to support many technologies, like Windows Forms, ASP.NET, Entity Framework, Windows Store, and many others. All of them are different in nature. Therefore, Microsoft approached this evolution by taking parts of .NET Framework and creating a different application stack for each technology. That way, development capabilities could be customized for the needs of the specific stack, which maximized the potential of every platform. That lead to fragmentation on the versions of .NET Framework maintained by different independent teams. All of these stacks have a common structure, containing an app model, a framework, and a runtime, but they differ in the implementation of each of the parts. -If you're targeting only one of these platforms, you can use this model. However, in many cases you might need more than one target platform in the same solution. For example, your application may have a desktop admin part, a customer-facing web site that shares the back-end logic running on a server, and even a mobile client. In this case, you need a unified coding experience that can span all this .NET verticals. +If you're targeting only one of these platforms, you can use this model. However, in many cases you might need more than one target platform in the same solution. For example, your application may have a desktop admin part, a customer-facing web site that shares the back-end logic running on a server, and even a mobile client. In this case, you need a unified coding experience that can span all of these .NET verticals. -By the time Windows 8 was released, the concept of Portable Class Libraries (PCLs) was born. Originally, the .NET Framework was designed around the assumption that it would always be deployed as a single unit, so [factoring](https://wikipedia.org/wiki/Decomposition_(computer_science)) wasn't a concern. To face the problem of code sharing between verticals, the driving force was on how to refactor the framework. The idea of contracts is to provide a well-factored API surface area. Contracts are simply assemblies that you compile against and are designed with proper factoring in mind taking care of the dependencies between them. +By the time Windows 8 was released, the concept of Portable Class Libraries (PCLs) was born. Originally, .NET Framework was designed around the assumption that it would always be deployed as a single unit, so [factoring](https://wikipedia.org/wiki/Decomposition_(computer_science)) wasn't a concern. To face the problem of code sharing between verticals, the driving force was on how to refactor the framework. The idea of contracts is to provide a well-factored API surface area. Contracts are simply assemblies that you compile against and are designed with proper factoring in mind taking care of the dependencies between them. -This leads to reasoning about the API differences between verticals at the assembly level, as opposed to the individual API level that we had before. This aspect enabled a class library experience that can target multiple verticals, also known as portable class libraries. +This lead to reasoning about the API differences between verticals at the assembly level, as opposed to at the individual API level like previously. This aspect enabled a class library experience that can target multiple verticals, also known as portable class libraries. ![Release history of .NET Framework](./media/whats-new-dotnet-core/release-history.png) With PCL, the experience of development is unified across verticals based on the API shape. And the most pressing need to create libraries running on different verticals is also addressed. But there's a great challenge: APIs are only portable when the implementation is moved forward across all the verticals. -A better approach is to unify the implementations across verticals by providing a well-factored implementation instead of a well-factored view. It's a lot simpler to ask each team that owns a specific component to think about how their APIs work across all verticals than trying to retroactively provide a consistent API stack on top. This is where .NET Standard comes in. See details on the next section. +A better approach is to unify the implementations across verticals by providing a well-factored implementation instead of a well-factored view. It's a lot simpler to ask each team that owns a specific component to think about how their APIs work across all verticals than trying to retroactively provide a consistent API stack on top. This is where .NET Standard comes in. -Another large challenge has to do with how the .NET Framework is deployed. The .NET Framework is a machine-wide framework. Any changes made to it affect all applications taking a dependency on it. Although this deployment model has many advantages, such as reducing disk space and centralized access to services, it presents some pitfalls. +Another large challenge has to do with how .NET Framework is deployed. .NET Framework is a machine-wide framework. Any changes made to it affect all applications that take a dependency on it. Although this deployment model has many advantages, such as reducing disk space and centralized access to services, it presents some pitfalls. -To start with, it's difficult for application developers to take a dependency on a recently released framework. They either have to take a dependency on the latest OS or provide an application installer that installs the .NET Framework along with the application. If you are a web developer, you might not even have this option as the IT department establishes the server supported version. +To start with, it's difficult for application developers to take a dependency on a recently released framework. They either have to take a dependency on the latest OS or provide an application installer that installs .NET Framework along with the application. If you're a web developer, you might not even have this option as the IT department establishes the server supported version. -Even if you're willing to go through the trouble of providing an installer to chain in the .NET Framework setup, you may find that upgrading the .NET Framework can break other applications. +Even if you're willing to go through the trouble of providing an installer to chain in .NET Framework setup, you may find that upgrading .NET Framework can break other applications. -Despite the efforts to provide backward compatible versions of the framework, there are compatible changes that can break applications. For example, adding an interface to an existing type can change how this type is serialized and cause breaking problems depending on the existing code. Because the NET Framework installed base is huge, fighting against these breaking scenarios slows down the pace of innovations inside the .NET Framework. +Despite the efforts to provide backward compatible versions of the framework, there are compatible changes that can break applications. For example, adding an interface to an existing type can change how this type is serialized and cause breaking problems depending on the existing code. Because the .NET Framework installed base is huge, fighting against these breaking scenarios slows down the pace of innovations inside .NET Framework. -To solve all these issues, Microsoft has developed .NET Core to approach the evolution of the .NET Platform. +To solve all these issues, Microsoft developed .NET Core as the evolution of the .NET development platform. ## Introduction to .NET Core -The .NET Core is the evolution of Microsoft's .NET technology into a modular, cross-platform, open source, and cloud-ready platform. It runs on Windows, macOS, and Linux with plans to also run on ARM-based architectures like Android and IoT. +.NET Core, which is now referred to as just ".NET", is the evolution of Microsoft's .NET technology into a modular, cross-platform, open source, and cloud-ready platform. It runs on Windows, macOS, and Linux, and some ARM-based architectures like Android and IoT. -The purpose of .NET Core is to provide a unified platform for all types of applications, which includes Windows, cross-platform, and mobile applications. [.NET Standard](../../standard/net-standard.md) enables this by providing shared base APIs, which every application model needs, and excluding any application model-specific API. +The purpose of .NET Core is to provide a unified platform for all types of applications, which includes Windows, cross-platform, and mobile applications. [.NET Standard](../../standard/net-standard.md) enabled this by providing shared base APIs, which every application model needs, and excluding any application model-specific API. This framework gives applications many benefits in terms of efficiency and performance, simplifying the packaging and deployment in the different supported platforms. @@ -54,53 +54,45 @@ The benefits of .NET Core come from these three characteristics: - **Open source:** .NET Core platform is open source and available through GitHub, fostering transparency and community contributions. - **Supported:** Microsoft officially supports .NET Core. -Starting with .NET Core 3.0, besides the existing support for web and cloud, there's also support for desktop, IoT, and AI domains. The goal for this framework is impressive: to target every type of .NET development present and future. Microsoft plans to complete this vision with .NET 5 at the end of 2020. The "Core" name was removed to reinforce its uniqueness in the .NET world. +Starting with .NET Core 3.0, besides the existing support for web and cloud, there's also support for desktop, IoT, and AI domains. The goal for this framework is impressive: to target every type of .NET development present and future. -## .NET 5 is .NET Core vNext +## .NET 5+ is .NET Core vNext -.NET 5 is the next step forward with .NET Core. .NET 5 aims to improve .NET in a few key ways: +.NET 5 was the next step forward with .NET Core. .NET 5 improved .NET in a few key ways: -- Produce a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences. -- Expand the capabilities of .NET by taking the best of .NET Core, .NET Framework, Xamarin, and Mono. -- Build that product out of a single code-base that developers (Microsoft and the community) can work on and expand together and that improves all scenarios. +- Produced a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences. +- Expanded the capabilities of .NET by taking the best of .NET Core, .NET Framework, Xamarin, and Mono. +- Built that product out of a single code-base that developers (Microsoft and the community) can work on and expand together and that improves all scenarios. -This new release and direction are a game-changer for .NET. With .NET 5, your code and project files will look and feel the same no matter which type of app you're building. You’ll have access to the same runtime, APIs, and language capabilities with each app. This includes new [performance improvements](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/) that get committed to the runtime, practically daily. For more details, see [What's new in .NET 5](../../core/whats-new/dotnet-5.md). +.NET 5 was a game-changer for .NET. With .NET 5 and later versions, your code and project files look and feel the same no matter which type of app you're building. You have access to the same runtime, APIs, and language capabilities with each app. This includes new performance improvements that get committed to the runtime almost daily. .NET 6 and .NET 7 made further improvements in reliability, performance, new APIs, and language features. For more details, see [What's new in .NET 5](../../core/whats-new/dotnet-5.md), [What's new in .NET 6](../../core/whats-new/dotnet-6.md), and [What's new in .NET 7](../../core/whats-new/dotnet-7.md). ![All domains of .NET 5](./media/whats-new-dotnet-core/all-domains-of-dotnet5.png) -## .NET 6 is the long-term support version - -Microsoft switched to a new release cadence where each year in November, a new version of .NET is released. Every even-numbered version will be a long-term support (LTS) release, meaning that Microsoft will support it for three years. - -In .NET 6 we've made numerous improvements in reliability, performance, new APIs, and language features. It is a newer, better, and more stable version for desktop applications and it's going to stick around for a while. So we recommend updating your application to this version, and in the next chapter, you can learn how to do that. - ## .NET Framework vs. .NET -So now that you understand the relevance of .NET, you might be wondering what happens with .NET Framework. You could be asking questions like: do you have to abandon it? Is it going to disappear? What are my choices to modernize the applications I have on .NET Framework? +So now that you understand the relevance of .NET, you might be wondering what happens with .NET Framework. You could be asking questions like: Do I have to abandon it? Is it going to disappear? What are my choices to modernize the applications I have on .NET Framework? -In 2019 the last version of the **.NET Framework - 4.8** was released. It included three major improvements for desktop applications: +In 2019, .NET Framework 4.8 was released. It included three major improvements for desktop applications: -- **Modern browser and media controls**: Today, .NET desktop applications use Internet Explorer and Windows Media Player for showing HTML and playing media files. Since these legacy controls don't show the latest HTML or play the latest media files, new controls were added that take advantage of Microsoft Edge and newer media players that support the latest standards. -- **Access to UWP controls**: UWP contains new controls that take advantage of the latest Windows features and touch displays. You don't have to rewrite your applications to use these new features and controls, so you can use these new features in your existing WPF or Windows Forms code. -- **High-DPI improvements**: The resolution of displays is increasing to 4K and 8K resolutions. So, .NET Framework 4.8 adds new HDPI improvements to make sure your existing Windows Forms and WPF applications can look great on these new displays. +- **Modern browser and media controls**: New controls were added that take advantage of Microsoft Edge and newer media players that support the latest standards. +- **Access to UWP controls**: UWP introduced controls that take advantage of the latest Windows features and touch displays. With .NET Framework 4.8, you don't have to rewrite your applications to use these new features and controls, so you can use these new features in your existing WPF or Windows Forms code. +- **High-DPI improvements**: The resolution of displays increased to 4K and 8K, so, .NET Framework 4.8 added new HDPI improvements to make sure existing Windows Forms and WPF applications can look great on these new displays. Since .NET Framework is installed on millions of machines, Microsoft will continue to support it but won't add new features. -.NET 5 is the open-source, cross-platform, and fast-moving version of .NET family. Because of its side-by-side nature, it can take changes without the fear of breaking any application. This means that .NET will get new APIs and language features over time that .NET Framework won't. Also, **.NET** already has features that were impossible for .NET Framework, such as: +.NET (Core) is the open-source, cross-platform, and fast-moving version of .NET family. Because of its side-by-side nature, it can take changes without the fear of breaking any application. This means that .NET will get new APIs and language features over time that .NET Framework won't. Also, .NET already has features that were impossible for .NET Framework, such as: - **Side-by-side versions of .NET supporting Windows Forms and WPF**: This solves the problem of side effects when updating the machine's framework version. Multiple versions of .NET can be installed on the same machine and each application specifies which version of .NET it should use. Even more, now you can develop and run Windows Forms and WPF on top of .NET. - **Embed .NET directly into an application**: You can deploy .NET as part of your application package. This enables you to take advantage of the latest version, features, and APIs without having to wait for a specific version to be installed on the machine. -- **Take advantage of .NET features**: .NET Core is the fast-moving, open-source version of .NET. Its side-by-side nature enables fast introduction of new innovative APIs and Base Class Libraries (BCL) improvements without the risk of breaking compatibility. Now Windows Forms and WPF applications can take advantage of the latest .NET features, which also includes more fundamental fixes for runtime performance, high-DPI support, and so on. - -An essential part of the roadmap for Microsoft was to ease developers to move applications to .NET Core and in later to .NET 5. But if you have existing .NET Framework applications, you shouldn't feel pressured to move to .NET 5. .NET Framework will be fully supported and will always be a part of Windows. However, if you want to use the newest language features and APIs in the future, you'll need to move your applications to .NET. +- **Take advantage of .NET features**: .NET is fast-moving and open-source. Its side-by-side nature enables fast introduction of new innovative APIs and Base Class Library (BCL) improvements without the risk of breaking compatibility. Now Windows Forms and WPF applications can take advantage of the latest .NET features, which also includes fundamental fixes for things like runtime performance and high-DPI support. -For your brand-new desktop applications, we recommend starting directly on .NET 5. It's lightweight and cross platform, runs side by side, has high performance, and fits perfectly on containers and microservices architectures. +.NET Framework will be fully supported and will always be a part of Windows. However, if you want to use the newest language features and APIs in the future, you'll need to move your applications to .NET. For brand-new desktop apps, we recommend starting directly on .NET 6 or a later version. It's lightweight and cross platform, runs side by side, has high performance, and fits perfectly on containers and microservices architectures. ![You can update your .NET Framework applications using the latest .NET Framework version or port your applications to .NET Core](./media/whats-new-dotnet-core/framework-vs-core.png) ## .NET Standard vs. PCL -[.NET Standard](../../standard/net-standard.md) is a formal specification of .NET APIs that are intended to be available on all .NET implementations. The motivation behind .NET Standard is establishing greater uniformity in the .NET ecosystem. .NET Standard is a specification of .NET APIs that make up a uniform set of contracts to compile your code against. These contracts are implemented in each .NET flavor, thus enabling portability across different .NET implementations. +[.NET Standard](../../standard/net-standard.md) is a formal specification of .NET APIs that are intended to be available on all .NET implementations. The motivation behind .NET Standard was to establish greater uniformity in the .NET ecosystem. .NET Standard is a specification of .NET APIs that make up a uniform set of contracts to compile your code against. These contracts are implemented in each .NET flavor, thus enabling portability across different .NET implementations. .NET Standard enables the following key scenarios: @@ -111,24 +103,24 @@ For your brand-new desktop applications, we recommend starting directly on .NET - .NET Standard is a set of curated APIs, picked by Microsoft. PCLs aren't. - The APIs that a PCL contains are dependent on the platforms that you choose to target when you create it. This makes a PCL only sharable for the specific targets that you choose. -- .NET Standard is platform-agnostic, it can run anywhere, on Windows, macOS, Linux, and so on. -- PCLs can also run cross-platform, but they have a more limited reach. PCLs can only target a limited set of platforms. +- .NET Standard is platform-agnostic, so it can run on Windows, macOS, and Linux. +- PCLs can also run cross-platform, but they can only target a limited set of platforms. ## New Desktop features in .NET ### Support for Windows Forms and WPF -Windows Forms and WPF are part of .NET Core since version 3.0. Both presentation frameworks are for Windows only, so they aren't cross platform. You can think of WPF as a rich layer over DirectX and Windows Forms as a thinner layer over GDI+. WPF and Windows Forms do a great job of exposing and exercising much of the desktop application functionality in Windows. So Windows Forms and WPF are available for .NET Core and .NET Framework. Now you can start your new desktop applications targeting .NET Core and migrate your existing ones from .NET Framework to .NET Core. +Windows Forms and WPF are part of .NET Core since version 3.0. Both presentation frameworks are for Windows only, so they aren't cross platform. You can think of WPF as a rich layer over DirectX and Windows Forms as a thinner layer over GDI+. WPF and Windows Forms do a great job of exposing and exercising much of the desktop application functionality in Windows. So Windows Forms and WPF are available for .NET Core and .NET Framework. Target your new desktop applications to .NET 6 or later, and migrate your existing apps from .NET Framework to .NET 6 or later. -A new version of .NET Standard, version 2.1, was released at the same time as .NET Core 3.0. As expected, .NET Core 3.x versions support .NET Standard 2.1 and earlier versions. +A new version of .NET Standard, version 2.1, was released at the same time as .NET Core 3.0. To see which .NET implementations support which .NET Standard versions, see [Which .NET Standard version to target](../../standard/net-standard.md#net-standard-versions). -Also, it's important to notice that both Windows Forms and WPF implementations for .NET Core are open source. +The .NET (Core) implementations for both Windows Forms and WPF are open source. ### XAML Islands -[XAML Islands](/windows/apps/desktop/modernize/xaml-islands) is a set of components for developers to use the new Windows 10 controls (UWP XAML controls) in their current WPF, Windows Forms, and native Win32 apps (like MFC). You can have your "islands" of UWP XAML controls wherever you want inside your Win32 apps. +[XAML Islands](/windows/apps/desktop/modernize/xaml-islands) is a set of components for developers to use Windows 10 controls (UWP XAML controls) in their WPF, Windows Forms, and native Win32 apps (like MFC). You can have your "islands" of UWP XAML controls wherever you want inside your Win32 apps. -These XAML Islands are possible because Windows 10, version 1903 introduces a set of APIs that allows hosting UWP XAML content in Win32 windows using windows handlers (HWnds). Notice that only apps running on Windows 10 1903 and above can use XAML Islands. +These XAML Islands are possible because Windows 10, version 1903 introduced a set of APIs that allows hosting UWP XAML content in Win32 windows using windows handlers (HWnds). Only apps running on Windows 10 1903 and later can use XAML Islands. To make it easier to create XAML Islands for Windows Forms and WPF developers, the Windows Community Toolkit introduces a set of .NET wrappers in several NuGet packages. Those wrappers are the wrapped and hosting controls: @@ -137,29 +129,21 @@ To make it easier to create XAML Islands for Windows Forms and WPF developers, t ### Access to all Windows 10 APIs -Windows 10 has a great amount of API available for developers to work with. These APIs give access to a wide variety of functionality like Authentication, Bluetooth, Appointments, and Contacts. Now these APIs are exposed through .NET Core and give Windows developers the chance to create powerful desktops apps using the capabilities present on Windows 10. +Windows 10 has a great amount of APIs available for developers to work with. These APIs give access to a wide variety of functionality like authentication, bluetooth, appointments, and contacts. Now these APIs are exposed through .NET and give Windows developers the chance to create powerful desktops apps using the capabilities present on Windows 10. ### Side-by-side support and self-contained EXEs -The .NET Core deployment model is one of the biggest benefits that Windows desktop developers will experience with .NET Core. The ability to globally install .NET Core provides much of the same central installation and servicing benefits of .NET Framework, while not requiring in-place updates. +The .NET deployment model is one of the biggest benefits that Windows desktop developers will experience with .NET. The ability to globally install .NET provides much of the same central installation and servicing benefits of .NET Framework, while not requiring in-place updates. -When a new .NET Core version is released, you can update each app on a machine as needed without any concern of affecting other applications. New .NET Core versions are installed in their own directories and exist "side-by-side" with each other. +When a new .NET version is released, you can update each app on a machine as needed without any concern of affecting other applications. New .NET versions are installed in their own directories and exist "side-by-side" with each other. -If you need to deploy with isolation, you can deploy .NET Core with your application. .NET Core will bundle your app with the .NET Core runtime as in a single executable. - -These deployment options were requested by developers for quite a long time but were difficult to achieve using .NET Framework. The modular architecture used by .NET Core makes these flexible deployment options possible. +If you need to deploy with isolation, you can deploy .NET with your application. .NET will bundle your app with the .NET runtime as in a single executable. The modular architecture used by .NET makes these flexible deployment options possible. ### Performance -Since its start, targeting the web and cloud workloads, .NET Core has had performance plugged into its DNA. Server-side code must be performant enough to fulfill high-concurrency scenarios and .NET Core-family platforms including .NET 6 scores today as the best performance web platform in the market. - -In .NET 5 and .NET 6 we've refactored old Windows Forms code which resulted in reducing memory allocations for drawing Forms and Controls, so by simply upgrading from .NET Framework to .NET 6 your applications become much faster. You can take advantage of these performance improvements when you use .NET to build your next generation of desktop applications. - -## Benefits of open source - -Just a few words about .NET Core being open source. Building a cross-platform stack is something complex that needs the interaction of specialized teams on each of the targeted platforms. This effort needs much collaboration from inside and outside of Microsoft. By making it open source and thus open to public collaboration, you get the ultimate agile development style in place, raising the quality bar since issues are detected by a huge and active community of developers. +Since its start, targeting the web and cloud workloads, .NET has had performance plugged into its DNA. Server-side code must be performant enough to fulfill high-concurrency scenarios and .NET 6 scores today as the best performance web platform in the market. -This is a key success factor of .NET Core that will continue to speed up the roadmap previously mentioned: To be the single .NET platform that any developer will ever need to build any application. +Old Windows Forms code has been refactored for .NET, which reduced memory allocations for drawing Forms and Controls. By simply upgrading from .NET Framework to .NET 6 or later, your applications become much faster. You can take advantage of these performance improvements when you use .NET to build your next generation of desktop applications. >[!div class="step-by-step"] >[Previous](why-modern-applications.md) diff --git a/docs/architecture/modernize-with-azure-containers/index.md b/docs/architecture/modernize-with-azure-containers/index.md index 1495a52dfd216..314a152ee0b2c 100644 --- a/docs/architecture/modernize-with-azure-containers/index.md +++ b/docs/architecture/modernize-with-azure-containers/index.md @@ -7,7 +7,7 @@ ms.date: 01/10/2022 ![Cover image of the Modernize .NET applications guide.](./media/index/web-application-guide-cover-image.png) -**EDITION v6.0** +**EDITION v7.0** Refer [changelog](https://aka.ms/modernize-ebook-changelog) for the book updates and community contributions. @@ -17,7 +17,7 @@ Divisions of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 -Copyright © 2022 by Microsoft Corporation +Copyright © 2023 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced in any form or by any means without the written permission of the publisher. @@ -192,7 +192,7 @@ The last chapter of this guide introduces multiple walkthroughs that focus on sp ## Sample apps for modernizing legacy apps: eShopModernizing -The [eShopModernizing](https://github.com/dotnet-architecture/eShopModernizing) repo on GitHub offers two sample applications that simulate legacy monolithic web applications. One web app is developed by using ASP.NET MVC; the second web app is developed by using ASP.NET Web Forms and the third app is an N-Tier app with a WinForms client desktop app consuming a WCF service backend. All these apps are based on the traditional .NET Framework. These sample apps don't use .NET Core/.NET 6 or ASP.NET Core as they are supposed to be existing/legacy .NET Framework applications to be modernized. +The [eShopModernizing](https://github.com/dotnet-architecture/eShopModernizing) repo on GitHub offers two sample applications that simulate legacy monolithic web applications. One web app is developed by using ASP.NET MVC; the second web app is developed by using ASP.NET Web Forms and the third app is an N-Tier app with a WinForms client desktop app consuming a WCF service backend. All these apps are based on the traditional .NET Framework. These sample apps don't use .NET Core/.NET 7 or ASP.NET Core as they are supposed to be existing/legacy .NET Framework applications to be modernized. These sample apps have a second version, with modernized code, and which are fairly straightforward. The most important difference between the app versions is that the second versions use Windows Containers as the deployment choice. There also are a few additions to the second versions, like Azure Storage Blobs for managing images, Azure Active Directory for managing security, and Azure Application Insights for monitoring and auditing the applications. diff --git a/docs/architecture/modernize-with-azure-containers/migrate-your-relational-databases-to-azure.md b/docs/architecture/modernize-with-azure-containers/migrate-your-relational-databases-to-azure.md index 1b614588d48c3..c853e644f25bd 100644 --- a/docs/architecture/modernize-with-azure-containers/migrate-your-relational-databases-to-azure.md +++ b/docs/architecture/modernize-with-azure-containers/migrate-your-relational-databases-to-azure.md @@ -89,7 +89,7 @@ There might be a few cases where you still need to migrate to SQL Server as a re ## Use Azure Database Migration Service to migrate your relational databases to Azure -You can use Azure Database Migration Service to migrate relational databases like SQL Server, Oracle, and MySQL to Azure, whether your target database is Azure SQL Database, Azure SQL Database Managed Instance, or SQL Server on an Azure VM. +You can use Azure Database Migration Service to migrate relational databases like SQL Server, and MySQL to Azure, whether your target database is Azure SQL Database, Azure SQL Database Managed Instance, or SQL Server on an Azure VM. The automated workflow, with assessment reporting, guides you through the changes you need to make before you migrate the database. When you are ready, the service migrates the source database to Azure. diff --git a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/build-resilient-services-ready-for-the-cloud-embrace-transient-failures-in-the-cloud.md b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/build-resilient-services-ready-for-the-cloud-embrace-transient-failures-in-the-cloud.md index 83c1960120698..bc77ec1758f4b 100644 --- a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/build-resilient-services-ready-for-the-cloud-embrace-transient-failures-in-the-cloud.md +++ b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/build-resilient-services-ready-for-the-cloud-embrace-transient-failures-in-the-cloud.md @@ -31,7 +31,7 @@ You can use these techniques both in HTTP resources and in database resources. I When implementing resilient communications that access the database, depending on the version of .NET you are using, it can be straightforward (for example, [with Entity Framework 6 or later](/ef/ef6/fundamentals/connection-resiliency/retry-logic). It's just a matter of configuring the database connection). Or, you might need to use additional libraries like the [Transient Fault Handling Application Block](/previous-versions/msp-n-p/hh680934(v=pandp.50)) (for earlier versions of .NET), or even implement your own library. -When implementing HTTP retries and circuit breakers, the recommendation for .NET is to use the [Polly](https://github.com/App-vNext/Polly) library, which targets .NET Standard 1.1 (coverage: .NET Core 1.0, Mono, Xamarin, UWP, WP8.1+) and .NET Standard 2.0+ (coverage: .NET Core 2.0+, .NET Core 3.0, and later Mono, Xamarin and UWP targets). The nuget package also includes direct targets for .NET Framework 4.6.1 and 4.7.2. +When implementing HTTP retries and circuit breakers, the recommendation for .NET is to use the [Polly](https://github.com/App-vNext/Polly) library, which targets .NET Standard 1.1 (coverage: .NET Core 1.0, Mono, Xamarin, UWP, WP8.1+) and .NET Standard 2.0+ (coverage: .NET Core 2.0+, .NET Core 3.0 and later, Mono, Xamarin and UWP targets). The nuget package also includes direct targets for .NET Framework 4.6.1 and 4.7.2. To learn how to implement strategies for handling partial failures in the cloud, see the following references. diff --git a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/deploy-existing-net-apps-as-windows-containers.md b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/deploy-existing-net-apps-as-windows-containers.md index 19ff427991ef7..48d5a9e86e01f 100644 --- a/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/deploy-existing-net-apps-as-windows-containers.md +++ b/docs/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/deploy-existing-net-apps-as-windows-containers.md @@ -96,12 +96,12 @@ For .NET (cross-platform for Linux and Windows), the tags would look like the fo > | **Tag** | **System and version** > |---|---| -> | **mcr.microsoft.com/dotnet/runtime:5.0** | .NET runtime-only on Linux | -> | **mcr.microsoft.com/dotnet/runtime:5.0-nanoserver-20H2** | .NET runtime-only on Windows Nano Server | +> | **mcr.microsoft.com/dotnet/runtime:7.0** | .NET runtime-only on Linux | +> | **mcr.microsoft.com/dotnet/runtime:7.0-nanoserver-ltsc2022** | .NET runtime-only on Windows Nano Server | ### Multi-arch images -Since 2017, Docker has had a feature called [multi-arch](https://github.com/moby/moby/issues/15866) images. .NET Docker images can use multi-arch tags. Your Dockerfile files no longer need to define the operating system that you are targeting. The multi-arch feature allows a single tag to be used across multiple machine configurations. For instance, with multi-arch, you can use one common tag: **mcr.microsoft.com/dotnet/runtime:5.0**. If you pull that tag from a Linux container environment, you get the Debian-based image. If you pull that tag from a Windows container environment, you get the Nano Server-based image. +Since 2017, Docker has had a feature called [multi-arch](https://github.com/moby/moby/issues/15866) images. .NET Docker images can use multi-arch tags. Your Dockerfile files no longer need to define the operating system that you are targeting. The multi-arch feature allows a single tag to be used across multiple machine configurations. For instance, with multi-arch, you can use one common tag: **mcr.microsoft.com/dotnet/runtime:7.0**. If you pull that tag from a Linux container environment, you get the Debian-based image. If you pull that tag from a Windows container environment, you get the Nano Server-based image. For .NET Framework images, because the traditional .NET Framework supports only Windows, you cannot use the multi-arch feature. diff --git a/docs/architecture/porting-existing-aspnet-apps/app-startup-differences.md b/docs/architecture/porting-existing-aspnet-apps/app-startup-differences.md index f97f764edbcc0..3a3250c084833 100644 --- a/docs/architecture/porting-existing-aspnet-apps/app-startup-differences.md +++ b/docs/architecture/porting-existing-aspnet-apps/app-startup-differences.md @@ -23,7 +23,7 @@ If you need to run code when your ASP.NET MVC app starts up, it will typically u ## ASP.NET Core Startup -As noted previously, ASP.NET Core apps are standalone programs. As such, they typically include a *Program.cs* file containing the entry point for the app. A typical example of this file is shown in Figure 2-1. Notice that in .NET 6, this file is streamlined by the use of implicit using statements and top-level statements, eliminating the need for a lot of "boiler plate" code. +As noted previously, ASP.NET Core apps are standalone programs. As such, they typically include a *Program.cs* file containing the entry point for the app. A typical example of this file is shown in Figure 2-1. Notice that in .NET 7, this file is streamlined by the use of implicit using statements and top-level statements, eliminating the need for a lot of "boiler plate" code. ```csharp var builder = WebApplication.CreateBuilder(args); @@ -58,7 +58,7 @@ app.Run(); The code shown in Figure 2-1 uses a builder to configure the host and its services. Then, it creates the request pipeline for the app, which controls how every request to the app is handled. -Previous versions of .NET would use a separate *Startup.cs* file, referenced by *Program.cs*. This approach is still supported in .NET 6, but is no longer the default approach. +Previous versions of .NET would use a separate *Startup.cs* file, referenced by *Program.cs*. This approach is still supported in .NET 7, but is no longer the default approach. In addition to code related to configuring the app's services and request pipeline, apps may have other code that must run when the app begins. Such code is typically placed in *Program.cs* or registered as an `IHostedService`, which will be started by the [generic host](/aspnet/core/fundamentals/host/generic-host) when the app starts. diff --git a/docs/architecture/porting-existing-aspnet-apps/choose-net-core-version.md b/docs/architecture/porting-existing-aspnet-apps/choose-net-core-version.md index 9e5bf2b3b652e..9af6ea65818b1 100644 --- a/docs/architecture/porting-existing-aspnet-apps/choose-net-core-version.md +++ b/docs/architecture/porting-existing-aspnet-apps/choose-net-core-version.md @@ -11,9 +11,13 @@ ms.date: 12/08/2022 The largest consideration for most organizations when choosing which version of .NET to target is the support lifecycle. Long Term Support (LTS) releases ship less frequently but have a longer support window than Standard Term Support (STS) releases. Currently, LTS releases are scheduled to ship every other year. Customers can choose which releases to target, and can install different releases of .NET side by side on the same machine. LTS releases will receive only critical and compatible fixes throughout their lifecycle. STS releases will receive these same fixes and will also be updated with compatible innovations and features. LTS releases are supported for three years after their initial release. STS releases are supported for six months after a subsequent STS or LTS release. -Most customers looking to migrate a large .NET Framework app to .NET (Core) today are probably looking for a stable destination, given that they haven't already made the move to an earlier version of .NET Core. In this case, the best .NET version to target for the migration is .NET 6, which is the most recent LTS version. While support for .NET Core 3.1 ends in December 2022, support for .NET 6 will continue until November 2024. +.NET 7 is the latest STS release; .NET 6 is the latest LTS release. -This book assumes .NET Framework apps will be upgraded to .NET 6. +Customers looking to migrate a large .NET Framework app to .NET (Core) today may be looking for a stable destination, given that they haven't already made the move to an earlier version of .NET Core. In this case, the best .NET version to target for the migration is .NET 6, which is the most recent LTS version. While support for .NET Core 3.1 ends in December 2022, support for .NET 6 will continue until November 2024. + +Other customers may want to ensure they're upgrading to the latest supported version, so that post-migration they're not already behind a version. These customers will want to target .NET 7 for the migration. + +In either case, there is very little difference in the migration process. This book assumes .NET Framework apps will be upgraded to .NET 7. ## References diff --git a/docs/architecture/porting-existing-aspnet-apps/dependency-injection-differences.md b/docs/architecture/porting-existing-aspnet-apps/dependency-injection-differences.md index 2b12fd8d152b9..572fd98b79d0d 100644 --- a/docs/architecture/porting-existing-aspnet-apps/dependency-injection-differences.md +++ b/docs/architecture/porting-existing-aspnet-apps/dependency-injection-differences.md @@ -25,7 +25,7 @@ Either way, you should consider using the built-in support for DI that ships wit ## Dependency injection in ASP.NET Core -ASP.NET Core assumes apps will use DI. It's not just built into the framework, but is required in order to bring support for framework features into your ASP.NET Core apps. In app startup, a call is made to `ConfigureServices` which is responsible for registering all of the types that the DI container (service collection/service provider) can create and inject in the app. Built-in ASP.NET Core features like Entity Framework Core, Identity, and even MVC are brought into the app by configuring them as services in the `ConfigureServices` method. +ASP.NET Core assumes apps will use DI. It's not just built into the framework, but is required in order to bring support for framework features into your ASP.NET Core apps. In app startup, calls are made to configure services using the `builder.Services` property of the web host builder. This property works with the application's DI container (service collection/service provider) and is used to create and inject service dependencies within the app. Built-in ASP.NET Core features like Entity Framework Core, Identity, and even MVC are brought into the app by configuring them as services during application startup. In addition to using the default implementation, apps can still use custom containers. The [documentation covers how to replace the default service container](../../core/extensions/dependency-injection-guidelines.md#default-service-container-replacement). diff --git a/docs/architecture/porting-existing-aspnet-apps/deployment-scenarios.md b/docs/architecture/porting-existing-aspnet-apps/deployment-scenarios.md index 0bea3a5ca3fce..a633cd65c6e13 100644 --- a/docs/architecture/porting-existing-aspnet-apps/deployment-scenarios.md +++ b/docs/architecture/porting-existing-aspnet-apps/deployment-scenarios.md @@ -57,6 +57,8 @@ As an example, the same ASP.NET Core app used in Figure 5-1 can be deployed to a If your app requires single sign-on between different sites or apps within IIS, refer to the documentation on [how to share authentication cookies among ASP.NET apps](/aspnet/core/host-and-deploy/iis/) for detailed instructions on supporting this scenario. +Another alternative to IIS Rewrite rules is the use of a reverse proxy like [YARP](https://microsoft.github.io/reverse-proxy/), which can facilitate [incremental ASP.NET to ASP.NET Core Migration](https://devblogs.microsoft.com/dotnet/incremental-asp-net-to-asp-net-core-migration/). + ## Summary A common approach to porting large apps from .NET Framework to ASP.NET Core is to choose individual portions of the app to migrate one by one. As each piece of the app is ported, the entire app remains running and usable, with some parts of it running in its original configuration and other parts running on some version of .NET Core. By following this approach, a large app migration can be performed incrementally. This approach results in limiting risk by providing more rapid feedback and reducing total surface area involved in testing. It also allows for more rapid realization of benefits of .NET Core, such as performance increases. Although ASP.NET Core apps are no longer required to be hosted on IIS, IIS remains a very flexible and powerful web server that can be configured to support a variety of hosting scenarios involving both .NET Framework and ASP.NET Core apps on the same IIS instance or even hosted on different servers. @@ -69,6 +71,7 @@ A common approach to porting large apps from .NET Framework to ASP.NET Core is t - [ASP.NET Core Module](/aspnet/core/host-and-deploy/aspnet-core-module?preserve-view=true&view=aspnetcore-2.1) - [Share authentication cookies among ASP.NET apps](/aspnet/core/security/cookie-sharing) - [Samples used in this section](https://github.com/ardalis/MigrateDotNetWithIIS) +- [Incremental ASP.NET to ASP.NET Core Migration](https://devblogs.microsoft.com/dotnet/incremental-asp-net-to-asp-net-core-migration/) >[!div class="step-by-step"] >[Previous](more-migration-scenarios.md) diff --git a/docs/architecture/porting-existing-aspnet-apps/example-migration-eshop.md b/docs/architecture/porting-existing-aspnet-apps/example-migration-eshop.md index 89a159e87fe2e..86e8780437fd8 100644 --- a/docs/architecture/porting-existing-aspnet-apps/example-migration-eshop.md +++ b/docs/architecture/porting-existing-aspnet-apps/example-migration-eshop.md @@ -369,7 +369,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) } ``` -This takes care of the only filter used by the eShop app, and in this case it was done by using built-in middleware. If you have global filters that must be configured in your app, this is done when MVC is added in the `ConfigureServices` method, which is shown later in this chapter. +This takes care of the only filter used by the eShop app, and in this case it was done by using built-in middleware. If you have global filters that must be configured in your app, this is done when MVC is added in _Program.cs_ when you configure services, which is shown later in this chapter. The last piece of MVC-related logic that needs to be migrated are the app's default routes. The call to `RouteConfig.RegisterRoutes(RouteTable.Routes)` passes the MVC route table to the `RegisterRoutes` helper method, where the following code is executed when the app starts up: @@ -424,15 +424,12 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) } ``` -Now it's time to configure MVC services, followed by the rest of the app's support for dependency injection (DI). So far, the *eShopPorted* project's `ConfigureServices` method has remained empty. Now it's time to start populating it. +Now it's time to configure MVC services, followed by the rest of the app's support for dependency injection (DI). So far, the *eShopPorted* project's _Program.cs_ file hasn't added any service configuration. Now it's time to start adding necessary services. First, to get ASP.NET Core MVC to work properly, it needs to be added: ```csharp -public void ConfigureServices(IServiceCollection services) -{ - services.AddMvc(); -} +builder.Services.AddMvc(); ``` The preceding code is the minimal configuration required to get MVC features working. There are many additional features that can be configured from this call (some of which are detailed later in this chapter), but for now this will suffice to build the app. Running it now routes the default request properly, but since we've not yet configured DI, an error occurs while activating `CatalogController`, because no implementation of type `ICatalogService` has been provided yet. We'll return to configure MVC further in a moment. For now, let's migrate the app's dependency injection. @@ -460,29 +457,15 @@ protected IContainer RegisterContainer() This code configures an [Autofac](https://autofac.org/) container, reads a config setting to determine whether real or mock data should be used, and passes this setting into an Autofac module (found in the app's */Modules* directory). Fortunately, Autofac supports .NET Core, so the module can be migrated directly. Copy the folder into the new project and updates the class's namespace and it should compile. -ASP.NET Core has built-in support for dependency injection, but you can wire up a third-party container such as Autofac easily if necessary. In this case, since the app is already configured to use Autofac, the simplest solution is to maintain its usage. To do so, the `ConfigureServices` method signature must be modified to return an `IServiceProvider`, and the Autofac container instance must be configured and returned from the method. - -**Note:** In .NET Core 3.0 and later, the process for integrating a third-party DI container has changed. - -Part of configuring Autofac requires a call to `builder.Populate(services)`. This extension is found in the `Autofac.Extensions.DependencyInjection` NuGet package, which must be installed before the code will compile. - -After modifying `ConfigureServices` to configure an Autofac container, the new method is as shown here: +ASP.NET Core has built-in support for dependency injection, but you can wire up a third-party container such as Autofac easily if necessary. In this case, since the app is already configured to use Autofac, the simplest solution is to maintain its usage. In _Program.cs_, simply configure the builder to use the `AutofacServiceProviderFactory` as shown: ```csharp -public IServiceProvider ConfigureServices(IServiceCollection services) -{ - services.AddMvc(); - - // Create Autofac container builder - var builder = new ContainerBuilder(); - builder.Populate(services); - bool useMockData = true; // TODO: read from config - builder.RegisterModule(new ApplicationModule(useMockData)); - - ILifetimeScope container = builder.Build(); - - return new AutofacServiceProvider(container); -} +// using Autofac.Extensions.DependencyInjection +builder.Host.UseServiceProviderFactory(new AutofacServiceProviderFactory()); +// note: the factory calls builder.Populate so we don't need to here +bool useMockData = true; // TODO: read from config +builder.Host.ConfigureContainer(builder => + builder.RegisterModule(new ApplicationModule(useMockData))); ``` For now, the setting for `useMockData` is set to `true`. This setting will be read from configuration in a moment. At this point, the app compiles and should load successfully when run, as shown in Figure 4-12. @@ -493,23 +476,14 @@ For now, the setting for `useMockData` is set to `true`. This setting will be re #### Migrate app settings -ASP.NET Core uses a new [configuration system](/aspnet/core/fundamentals/configuration/?preserve-view=true&view=aspnetcore-2.2), which by default uses an *appsettings.json* file. By using `CreateDefaultBuilder` in *Program.cs*, the default configuration is already set up in the app. To access configuration, classes just need to request it in their constructor. The `Startup` class is no exception. To start accessing configuration in `Startup` and the rest of the app, request an instance of `IConfiguration` from its constructor: - -```csharp -public Startup(IConfiguration configuration) -{ - Configuration = configuration; -} - -public IConfiguration Configuration { get; } -``` +ASP.NET Core uses a new [configuration system](/aspnet/core/fundamentals/configuration/?preserve-view=true&view=aspnetcore-2.2), which by default uses an *appsettings.json* file. By using `CreateDefaultBuilder` in *Program.cs*, the default configuration is already set up in the app. To access configuration, classes just need to request it in their constructor. In _Program.cs_, configuration is accessible from `builder.Configuration`. The original app referenced its settings using `ConfigurationManager.AppSettings`. A quick search for all references of this term yields the set of settings the new app needs. There are only two: - `UseMockData` - `UseCustomizationData` -If your app has more complex configuration, especially if it's using custom configuration sections, you'll probably want to create and bind objects to different parts of your app's configuration. These types can then be accessed using the [options pattern](../../core/extensions/options.md). However, as noted in the referenced doc, this pattern shouldn't be used in `ConfigureServices`. Instead the ported app will reference the `UseMockData` configuration value directly. +If your app has more complex configuration, especially if it's using custom configuration sections, you'll probably want to create and bind objects to different parts of your app's configuration. These types can then be accessed using the [options pattern](../../core/extensions/options.md). However, as noted in the referenced doc, this pattern shouldn't be used in _Program.cs_ (or `Startup.ConfigureServices`). Instead the ported app will reference the `UseMockData` configuration value directly. First, modify the ported app's `appsettings.json` file and add the two settings in the root: @@ -526,10 +500,10 @@ First, modify the ported app's `appsettings.json` file and add the two settings } ``` -Now, modify `ConfigureServices` to access the `UseMockData` setting from the `Configuration` property (where previously we set the value to `true`): +Now, modify _Program.cs_ to access the `UseMockData` setting from the `builder.Configuration` property (where previously we set the value to `true`): ```csharp - bool useMockData = Configuration.GetValue("UseMockData"); +bool useMockData = builder.Configuration.GetValue("UseMockData"); ``` At this point, the setting is pulled from configuration. The other setting, `UseCustomizationData`, is used by the `CatalogDBInitializer` class. When you first ported this class, you commented out the access to `ConfigurationManager.AppSettings["UseCustomizationData"]`. Now it's time to modify it to use ASP.NET Core configuration. Modify the constructor of `CatalogDBInitializer` as follows: @@ -588,7 +562,7 @@ public CatalogDBContext(string connectionString) : base(connectionString) } ``` -Finally, `ConfigureServices` must read the connection string from `Config` and pass it into the `ApplicationModule` when it instantiates it: +Finally, _Program.cs_ must read the connection string from `Configuration` and pass it into the `ApplicationModule` when it instantiates it: ```csharp bool useMockData = Configuration.GetValue("UseMockData"); @@ -699,30 +673,18 @@ builder.Property(ci => ci.Id) .IsRequired(); ``` -With these modifications, the ASP.NET Core app builds, but it doesn't yet work with EF Core, which must still be configured for dependency injection. With EF Core, the simplest way to configure it is in `ConfigureServices`: +With these modifications, the ASP.NET Core app builds, but it doesn't yet work with EF Core, which must still be configured for dependency injection. With EF Core, the simplest way to configure it is in _Program.cs_: ```csharp -public IServiceProvider ConfigureServices(IServiceCollection services) +builder.Services.AddMvc(); +bool useMockData = builder.Configuration.GetValue("UseMockData"); +if (!useMockData) { - services.AddMvc(); - bool useMockData = Configuration.GetValue("UseMockData"); - if (!useMockData) - { - string connectionString = Configuration.GetConnectionString("DefaultConnection"); - - services.AddDbContext(options => - options.UseSqlServer(connectionString) - ); - } - - // Create Autofac container builder - var builder = new ContainerBuilder(); - builder.Populate(services); - builder.RegisterModule(new ApplicationModule(useMockData)); - - ILifetimeScope container = builder.Build(); + string connectionString = builder.Configuration.GetConnectionString("DefaultConnection"); - return new AutofacServiceProvider(container); + builder.Services.AddDbContext(options => + options.UseSqlServer(connectionString) + ); } ``` @@ -795,29 +757,26 @@ With this change, running the app reveals the images work as before. ## Additional MVC customizations -The *eShopLegacyMVC* app is fairly simple, so there isn't much to configure in terms of default MVC behavior. However, if you do need to configure additional MVC components, such as CORS, filters, and route constraints, you generally provide this information in `Startup.ConfigureServices`, where `UseMvc` is called. For example, the following code listing configures [CORS](/aspnet/core/security/cors?preserve-view=true&view=aspnetcore-2.2) and sets up a global action filter: +The *eShopLegacyMVC* app is fairly simple, so there isn't much to configure in terms of default MVC behavior. However, if you do need to configure additional MVC components, such as CORS, filters, and route constraints, you generally provide this information in _Program.cs_, where `UseMvc` is called. For example, the following code listing configures [CORS](/aspnet/core/security/cors?preserve-view=true&view=aspnetcore-2.2) and sets up a global action filter: ```csharp -public void ConfigureServices(IServiceCollection services) +builder.Services.AddCors(options => { - services.AddCors(options => - { - options.AddPolicy(MyAllowSpecificOrigins, - builder => - builder.WithOrigins("http://example.com", "http://www.contoso.com") - .AllowAnyHeader() - .AllowAnyMethod()); - }); + options.AddPolicy(MyAllowSpecificOrigins, + builder => + builder.WithOrigins("http://example.com", "http://www.contoso.com") + .AllowAnyHeader() + .AllowAnyMethod()); +}); - services.AddMvc(options => - { - options.Filters.Add(new SampleGlobalActionFilter()); - }).SetCompatibilityVersion(CompatibilityVersion.Version_2_2); -} +builder.Services.AddMvc(options => +{ + options.Filters.Add(new SampleGlobalActionFilter()); +}).SetCompatibilityVersion(CompatibilityVersion.Version_2_2); ``` > [!Note] -> To finish configuring CORS, you must also call `app.UseCors()` in `Configure`. +> To finish configuring CORS, you must also call `app.UseCors()` after building the application. Other advanced scenarios, like adding [custom model binders](/aspnet/core/mvc/advanced/custom-model-binding?preserve-view=true&view=aspnetcore-2.2), formatters, and more are covered in the detailed ASP.NET Core docs. Generally these can be applied on an individual controller or action basis, or globally using the same options approach shown in the previous code listing. diff --git a/docs/architecture/porting-existing-aspnet-apps/identify-migration-sequence.md b/docs/architecture/porting-existing-aspnet-apps/identify-migration-sequence.md index 845518e44720f..a3e6c5efda53a 100644 --- a/docs/architecture/porting-existing-aspnet-apps/identify-migration-sequence.md +++ b/docs/architecture/porting-existing-aspnet-apps/identify-migration-sequence.md @@ -35,7 +35,7 @@ Once installed, you configure it from the **Analyze** > **Portability Analyzer S The analyzer produces a detailed report for each assembly. The report: -* Describes how compatible each project is with a given target framework, such as .NET 6 or .NET Standard 2.0. +* Describes how compatible each project is with a given target framework, such as .NET 7 or .NET Standard 2.0. * Helps teams assess the effort required to port a particular project to a particular target framework. The details of this analysis are covered in the next section. @@ -62,7 +62,7 @@ Watch an overview of how to employ this approach in this [dotNetConf presentatio - Migrate apps to use new *.csproj* file format - Update internal NuGet dependencies to .NET Standard - Migrate apps to ASP.NET Core (targeting .NET Framework) -- Update all apps to target .NET 6 +- Update all apps to target .NET 7 When automating a large suite of apps, it helps significantly if they follow consistent coding guidelines and project organization. Automation efforts rely on this consistency to be effective. In addition to parsing and migrating project files, common code patterns can be migrated automatically. Some code pattern examples include differences in how controller actions are declared or how they return results. diff --git a/docs/architecture/porting-existing-aspnet-apps/identity-differences.md b/docs/architecture/porting-existing-aspnet-apps/identity-differences.md index 6e7e0ea634d35..23c21ccd6fdc2 100644 --- a/docs/architecture/porting-existing-aspnet-apps/identity-differences.md +++ b/docs/architecture/porting-existing-aspnet-apps/identity-differences.md @@ -9,7 +9,7 @@ ms.date: 12/10/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -In ASP.NET MVC, identity features are typically configured in *IdentityConfig.cs* in the *App_Start* folder. Review how this is configured in the existing app, and compare it to the [configuration required for ASP.NET Core Identity](/aspnet/core/security/authentication/identity-configuration) in *Startup.cs*. +In ASP.NET MVC, identity features are typically configured in *IdentityConfig.cs* in the *App_Start* folder. Review how this is configured in the existing app, and compare it to the [configuration required for ASP.NET Core Identity](/aspnet/core/security/authentication/identity-configuration) in _Program.cs_. ASP.NET Identity is an API that supports user interface login functionality and manages users, passwords, profile data, roles, claims, tokens, email confirmations, and more. It supports external login providers like Facebook, Google, Microsoft, and Twitter. diff --git a/docs/architecture/porting-existing-aspnet-apps/incremental-migration-strategies.md b/docs/architecture/porting-existing-aspnet-apps/incremental-migration-strategies.md index 2ddd57c71d9ea..1e947ab37fce6 100644 --- a/docs/architecture/porting-existing-aspnet-apps/incremental-migration-strategies.md +++ b/docs/architecture/porting-existing-aspnet-apps/incremental-migration-strategies.md @@ -13,7 +13,7 @@ The biggest challenge with migrating any large app is determining how to break t ## Migrating slice by slice -One successful approach to migrating is to identify vertical slices of functionality and migrate them to the target platform one by one. The first step is to create a new ASP.NET Core 6 app. Next, identify the individual page or API endpoint that will be migrated first. Build out just the necessary functionality to support this one route in the new ASP.NET Core app. Then use HTTP rewriting and/or a reverse proxy to start sending requests for these pages or endpoints to the new app rather than the ASP.NET app. This approach is well-suited to API projects, but can also work for many MVC apps. +One successful approach to migrating is to identify vertical slices of functionality and migrate them to the target platform one by one. The first step is to create a new ASP.NET Core 7 app. Next, identify the individual page or API endpoint that will be migrated first. Build out just the necessary functionality to support this one route in the new ASP.NET Core app. Then use HTTP rewriting and/or a reverse proxy to start sending requests for these pages or endpoints to the new app rather than the ASP.NET app. This approach is well-suited to API projects, but can also work for many MVC apps. When migrating slice by slice, the entire stack of the individual API endpoint or requested route is recreated in the new project or solution. The very first such slice typically requires the most effort, since it will typically need several projects to be created and decisions to be made about data access and solution organization. Once the first slice's functionality mirrors the existing app's, it can be deployed and the existing app can redirect to it or simply be removed. This approach is then repeated until the entire app has been ported to the new structure. @@ -21,21 +21,22 @@ Some specific guidance on how to follow this strategy using IIS is covered in [C ## Migrating layer by layer -Consider the challenge of migrating a large ASP.NET 4.5 app. One approach is to migrate the entire app directly from .NET Framework 4.5 to .NET 6. However, this approach needs to account for every breaking change between the two frameworks and versions, which are substantial. Performing this work on one project at a time provides a set of stepping stones so that the entire solution doesn't need to be moved at once. +Consider the challenge of migrating a large ASP.NET 4.5 app. One approach is to migrate the entire app directly from .NET Framework 4.5 to .NET 7. However, this approach needs to account for every breaking change between the two frameworks and versions, which are substantial. Performing this work on one project at a time provides a set of stepping stones so that the entire solution doesn't need to be moved at once. One piece of the .NET ecosystem that helps with interoperability between different .NET frameworks is [.NET Standard](https://dotnet.microsoft.com/platform/dotnet-standard). .NET Standard allows libraries to build against an agreed upon set of common APIs, ensuring they can be used in any .NET app. .NET Standard 2.0 is notable because it covers most base class library functionality used by most .NET Framework and .NET Core apps. Unfortunately, the earliest version of .NET with support for .NET Standard 2.0 is .NET Framework 4.6.1, and there are a number of updates in .NET Framework 4.8 that make it a compelling choice for initial upgrades. One approach to incrementally upgrade a .NET Framework 4.5 system layer-by-layer is to first update its class library dependencies to .NET Framework 4.8. Then, modify these libraries to be .NET Standard class libraries. Use multi-targeting and conditional compilation, if necessary. This step can be helpful in scenarios where app dependencies require .NET Framework and cannot easily be ported directly to use .NET Standard and .NET Core. Since .NET Framework libraries can be consumed by ASP.NET Core 2.1 apps, the next step is to migrate some or all of the web functionality of the app to ASP.NET Core 2.1 (as described in the [previous chapter](choose-net-core-version.md)). This is a "bottom up" approach, starting with low level class library dependencies and working up to the web app entry point. -Once the app is running on ASP.NET Core 2.1, migrating it to .NET 6 in isolation is relatively straightforward. The most likely challenge during this step is updating incompatible dependencies to support .NET Core and possibly higher versions of .NET Standard. For apps that don't have problematic dependencies on .NET Framework-only libraries, there's little reason to upgrade to ASP.NET Core 2.1 or even .NET 6. Porting directly to ASP.NET Core 6 makes more sense and requires less effort. +Once the app is running on ASP.NET Core 2.1, migrating it to .NET 7 in isolation is relatively straightforward. The most likely challenge during this step is updating incompatible dependencies to support .NET Core and possibly higher versions of .NET Standard. For apps that don't have problematic dependencies on .NET Framework-only libraries, there's little reason to upgrade to ASP.NET Core 2.1. Porting directly to ASP.NET Core 7 makes more sense and requires less effort. -Now that .NET 6 is available and will be supported through November 2024, most teams will choose to upgrade to .NET 6 to complete their app's migration. +.NET 7 is the latest version of .NET and will be supported until six months after the next STS or LTS release (scheduled for November 2023) - so most likely support will last at least until May 2024. Many teams looking to migrate today will choose to upgrade to .NET 7. -Instead of a "bottom up" approach, another alternative is to start with the web app (or even the entire solution) and use an automated tool to assist with the upgrade. The [.NET Upgrade Assistant tool](https://aka.ms/dotnet-upgrade-assistant) can be used to help upgrade .NET Framework apps to .NET Core / .NET 6. It automates many of the common tasks related to upgrading apps, such as modifying project file format, setting appropriate target frameworks, updating NuGet dependencies, and more. +Instead of a "bottom up" approach, another alternative is to start with the web app (or even the entire solution) and use an automated tool to assist with the upgrade. The [.NET Upgrade Assistant tool](https://aka.ms/dotnet-upgrade-assistant) can be used to help upgrade .NET Framework apps to .NET Core / .NET 7. It automates many of the common tasks related to upgrading apps, such as modifying project file format, setting appropriate target frameworks, updating NuGet dependencies, and more. ## References - [What is .NET Standard?](https://dotnet.microsoft.com/platform/dotnet-standard) +- [Migrate from ASP.NET Core 6.0 to 7.0](/aspnet/core/migration/60-70) - [Announcing .NET 6 - The Fastest .NET Yet](https://devblogs.microsoft.com/dotnet/announcing-net-6/) - [Introducing .NET 5](https://devblogs.microsoft.com/dotnet/introducing-net-5/) - [Migrate from ASP.NET Core 3.1 to 6.0 LTS](/aspnet/core/migration/31-to-60) diff --git a/docs/architecture/porting-existing-aspnet-apps/index.md b/docs/architecture/porting-existing-aspnet-apps/index.md index 2fbb4c297a8fc..17b8f5f6ed5da 100644 --- a/docs/architecture/porting-existing-aspnet-apps/index.md +++ b/docs/architecture/porting-existing-aspnet-apps/index.md @@ -1,11 +1,11 @@ --- -title: Porting Existing ASP.NET Apps to .NET 6 -description: A free guide to converting ASP.NET MVC and Web API apps to ASP.NET Core 6. +title: Porting Existing ASP.NET Apps to .NET 7 +description: A free guide to converting ASP.NET MVC and Web API apps to ASP.NET Core 7. author: ardalis ms.date: 01/20/2022 --- -# Porting Existing ASP.NET Apps to .NET 6 +# Porting Existing ASP.NET Apps to .NET 7 ![cover image](./media/index/porting-existing-aspnet-apps.png) @@ -19,7 +19,7 @@ One Microsoft Way Redmond, Washington 98052-6399 -Copyright © 2022 by Microsoft Corporation +Copyright © 2023 by Microsoft Corporation All rights reserved. No part of this book's contents may be reproduced or transmitted in any form or by any means without the written permission of the publisher. @@ -51,15 +51,15 @@ Participants and Reviewers: ## Version -This guide covers **.NET 6* and updates related to the same technology "wave" (that is, Azure and other third-party technologies) coinciding in time with the .NET 6 release. This book covers migration of apps that are currently running on .NET Framework 4.x. Migrating from .NET Framework 4.x to .NET 6 is similar to migrating to .NET 6, which is discussed as a potential intermediate step later in the book. For more information, see [choosing the right .NET Core version](choose-net-core-version.md). +This guide covers **.NET 7** and updates related to the same technology "wave" (that is, Azure and other third-party technologies) coinciding in time with the .NET 7 release. This book covers migration of apps that are currently running on .NET Framework 4.x. ## Who should use this guide -This guide's audience is developers, development leads, and architects who are interested in migrating their existing apps written for ASP.NET MVC and Web API (.NET Framework 4.x) to .NET Core. ASP.NET Web Forms developers will benefit from this guide but should also read the [Blazor for ASP.NET Web Forms Developers](../blazor-for-web-forms-developers/index.md) e-book. +This guide's audience is developers, development leads, and architects who are interested in migrating their existing apps written for ASP.NET MVC and Web API (.NET Framework 4.x) to the latest .NET version. ASP.NET Web Forms developers will benefit from this guide but should also read the [Blazor for ASP.NET Web Forms Developers](../blazor-for-web-forms-developers/index.md) e-book. -A secondary audience is technical decision-makers planning when to move their apps to .NET Core. +A secondary audience is technical decision-makers planning when to move their apps to .NET 7. -The target audience for this book is .NET developers with large, existing apps that run on ASP.NET MVC and Web API. Apps built on ASP.NET Web Forms are outside of the focus of this book, though much of the information comparing .NET Framework and .NET Core may still be relevant. +The target audience for this book is .NET developers with large, existing apps that run on ASP.NET MVC and Web API. Apps built on ASP.NET Web Forms are outside of the focus of this book, though much of the information comparing .NET Framework and .NET Core/latest may still be relevant. ## How you can use this guide diff --git a/docs/architecture/porting-existing-aspnet-apps/introduction.md b/docs/architecture/porting-existing-aspnet-apps/introduction.md index 6f50b59c0515f..96dbb1226a201 100644 --- a/docs/architecture/porting-existing-aspnet-apps/introduction.md +++ b/docs/architecture/porting-existing-aspnet-apps/introduction.md @@ -1,37 +1,37 @@ --- -title: Introduction to porting apps to .NET 6 -description: This chapter covers a list of considerations for teams considering migrating existing ASP.NET apps to .NET 6. +title: Introduction to porting apps to .NET 7 +description: This chapter covers a list of considerations for teams considering migrating existing ASP.NET apps to .NET 7. author: ardalis ms.date: 02/02/2022 --- -# Introduction to porting apps to .NET 6 +# Introduction to porting apps to .NET 7 [!INCLUDE [download-alert](includes/download-alert.md)] -.NET Core and its latest version, .NET 6, represent a revolutionary step forward from .NET Framework. It offers a host of advantages over .NET Framework across the board from productivity to performance, from cross-platform support to developer satisfaction. ASP.NET Core was even voted the most-loved web framework in the [2020 Stack Overflow developer survey](https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-web-frameworks). Clearly there are strong reasons to consider migrating. +.NET Core and its latest version, .NET 7, represent a revolutionary step forward from .NET Framework. It offers a host of advantages over .NET Framework across the board from productivity to performance, from cross-platform support to developer satisfaction. ASP.NET Core was even voted the most-loved web framework (tied with Svelte) in the [2021 Stack Overflow developer survey](https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted). Clearly there are strong reasons to consider migrating. -Even before .NET 6 shipped, Microsoft was clear: [.NET Core is the Future of .NET](https://devblogs.microsoft.com/dotnet/net-core-is-the-future-of-net/). To quote this article: +Even before .NET 7 shipped, Microsoft was clear: [.NET Core is the Future of .NET](https://devblogs.microsoft.com/dotnet/net-core-is-the-future-of-net/). To quote this article: > New apps should be built on .NET Core. .NET Core is where future investments in .NET will happen. Existing apps are safe to remain on .NET Framework which will be supported. Existing apps that want to take advantage of the new features in .NET should consider moving to .NET Core. As we plan into the future, we will be bringing in even more capabilities to the platform. -Today, .NET 6 is what new apps should target, and if you're migrating an existing app from .NET Framework, .NET 6 is your ideal target framework. +Today, .NET 7 is what new apps should target, and if you're migrating an existing app from .NET Framework, .NET 7 is your ideal target framework. -However, upgrading your app to ASP.NET Core will require some effort. That effort should be balanced against business value and goals. .NET Framework apps have a long life ahead of them, with support built into Windows for the foreseeable future. What are some of the questions you should consider before deciding migration to .NET 6 is appropriate? What are the expected advantages? What are the tradeoffs? How much effort is involved? These obvious questions are just the beginning, but make for a great starting point as teams consider how to support their customers' needs with apps today and tomorrow. +However, upgrading your app to ASP.NET Core will require some effort. That effort should be balanced against business value and goals. .NET Framework apps have a long life ahead of them, with support built into Windows for the foreseeable future. What are some of the questions you should consider before deciding migration to .NET 7 is appropriate? What are the expected advantages? What are the tradeoffs? How much effort is involved? These obvious questions are just the beginning, but make for a great starting point as teams consider how to support their customers' needs with apps today and tomorrow. -- Is migration to .NET 6 appropriate? +- Is migration to .NET 7 appropriate? - When does it make sense to remain on .NET Framework? - Should apps target ASP.NET Core 2.1 as a stepping stone? - How should teams choose the right .NET version to target? - What strategies are recommended for incremental migration of large apps? -- What deployment strategies should be considered when porting to .NET 6? +- What deployment strategies should be considered when porting to .NET 7? - Where can we find additional resources? This introductory chapter addresses all of these questions and more before moving on to more specific and technical considerations in future chapters. ## References -- [2020 Stack Overflow developer survey most loved web frameworks](https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-web-frameworks) +- [2021 Stack Overflow developer survey most loved web frameworks](https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted) - [.NET Core is the Future of .NET](https://devblogs.microsoft.com/dotnet/net-core-is-the-future-of-net/) >[!div class="step-by-step"] diff --git a/docs/architecture/porting-existing-aspnet-apps/migrate-aspnet-core-2-1.md b/docs/architecture/porting-existing-aspnet-apps/migrate-aspnet-core-2-1.md index 24d3c0e3776f1..d6ed2d1a5a99e 100644 --- a/docs/architecture/porting-existing-aspnet-apps/migrate-aspnet-core-2-1.md +++ b/docs/architecture/porting-existing-aspnet-apps/migrate-aspnet-core-2-1.md @@ -9,7 +9,7 @@ ms.date: 12/10/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -ASP.NET Core 2.1 is an interesting release because it's the most recently supported ASP.NET Core release that supported both .NET Core and .NET Framework runtimes. As such, it may offer an easier upgrade path for some apps when compared to upgrading all parts of the app to .NET Core/.NET 6 at once. Although support for .NET Core 2.1 ended in August 2021, it may make sense as an interim step for some apps. Also, support for ASP.NET Core 2.1 running on .NET Framework will continue for as long as [its underlying .NET Framework is supported](/lifecycle/products/microsoft-net-framework). A complete [list of currently supported ASP.NET Core 2.1 packages](https://dotnet.microsoft.com/platform/support/policy/aspnetcore-2.1) is available for reference. +ASP.NET Core 2.1 is an interesting release because it's the most recently supported ASP.NET Core release that supported both .NET Core and .NET Framework runtimes. As such, it may offer an easier upgrade path for some apps when compared to upgrading all parts of the app to .NET Core/.NET 7 at once. Although support for .NET Core 2.1 ended in August 2021, it may make sense as an interim step for some apps. Also, support for ASP.NET Core 2.1 running on .NET Framework will continue for as long as [its underlying .NET Framework is supported](/lifecycle/products/microsoft-net-framework). A complete [list of currently supported ASP.NET Core 2.1 packages](https://dotnet.microsoft.com/platform/support/policy/aspnetcore-2.1) is available for reference. ## Should apps run on .NET Framework with ASP.NET Core 2.1 diff --git a/docs/architecture/porting-existing-aspnet-apps/migration-considerations.md b/docs/architecture/porting-existing-aspnet-apps/migration-considerations.md index db48151c18e46..c0ebf4830d687 100644 --- a/docs/architecture/porting-existing-aspnet-apps/migration-considerations.md +++ b/docs/architecture/porting-existing-aspnet-apps/migration-considerations.md @@ -13,7 +13,7 @@ The most fundamental question teams must answer when it comes to porting their a ## Is migration to .NET Core appropriate? -Let's start with some of the reasons why you might want to move to .NET Core/.NET 6. There are quite a few, so don't consider this list exhaustive. +Let's start with some of the reasons why you might want to move to .NET Core/.NET 7. There are quite a few, so don't consider this list exhaustive. ### Cross-platform support @@ -37,7 +37,7 @@ ASP.NET Core is modular, using NuGet packages as a first-class part of the frame ### Modern -Staying on a modern, actively developed technology stack has a host of advantages. New features and C# language features will only be added to .NET Core. The .NET Framework has had its last release with version 4.8, and versions of C# beyond 8 won't target .NET Framework. While ASP.NET MVC will remain supported by Microsoft for many years, the best and brightest .NET software developers are likely looking to use the more modern .NET Core framework, with all of the advantages it offers (only some of which are summarized above). Finding developers with the skills to maintain an ASP.NET MVC app will start to become a challenge at some point, as will finding online training and troubleshooting assistance. There probably aren't that many new blog posts being written about ASP.NET MVC 5, while there are plenty being written for .NET 6, for example. +Staying on a modern, actively developed technology stack has a host of advantages. New features and C# language features will only be added to .NET Core. The .NET Framework has had its last release with version 4.8, and versions of C# beyond 8 won't target .NET Framework. While ASP.NET MVC will remain supported by Microsoft for many years, the best and brightest .NET software developers are likely looking to use the more modern .NET Core framework, with all of the advantages it offers (only some of which are summarized above). Finding developers with the skills to maintain an ASP.NET MVC app will start to become a challenge at some point, as will finding online training and troubleshooting assistance. There probably aren't that many new blog posts being written about ASP.NET MVC 5, while there are plenty being written for .NET 7, for example. There are many compelling reasons to consider migrating to .NET Core, which presumably is why you're reading this book! But let's consider some disadvantages and reasons why it may make more sense to remain on the .NET Framework. diff --git a/docs/architecture/porting-existing-aspnet-apps/more-migration-scenarios.md b/docs/architecture/porting-existing-aspnet-apps/more-migration-scenarios.md index 806b5c29ba41b..7e41dfddbfec6 100644 --- a/docs/architecture/porting-existing-aspnet-apps/more-migration-scenarios.md +++ b/docs/architecture/porting-existing-aspnet-apps/more-migration-scenarios.md @@ -1,6 +1,6 @@ --- title: More migration scenarios -description: This section describes additional migration scenarios and techniques for upgrading .NET Framework apps to .NET Core / .NET 6. +description: This section describes additional migration scenarios and techniques for upgrading .NET Framework apps to .NET Core / .NET 7. author: ardalis ms.date: 12/10/2021 --- @@ -42,7 +42,7 @@ protected IContainer RegisterContainer() } ``` -When upgrading these apps to use ASP.NET Core, this duplicate effort and the confusion that sometimes accompanies it is eliminated. ASP.NET Core MVC is a unified framework with one set of rules for routing, filters, and more. Dependency injection is built into .NET Core itself. All of this can be configured in `Startup.cs`, as is shown in the `eShopPorted` app in the sample. +When upgrading these apps to use ASP.NET Core, this duplicate effort and the confusion that sometimes accompanies it is eliminated. ASP.NET Core MVC is a unified framework with one set of rules for routing, filters, and more. Dependency injection is built into .NET Core itself. All of this can be configured in _Program.cs_, as is shown in the `eShopPorted` app in the sample. ## Migrate HttpResponseMessage to ASP.NET Core @@ -153,16 +153,13 @@ public static class WebApiConfig } ``` -When migrating [custom model providers to ASP.NET Core](/aspnet/core/mvc/advanced/custom-model-binding#custom-model-binder-sample), the Web API pattern is closer to the ASP.NET Core approach than the ASP.NET MVC 5. The main differences between ASP.NET Core's `IModelBinder` interface and Web API's is that the ASP.NET Core method is async (`BindModelAsync`) and it only requires a single `BindingModelContext` parameter instead of two parameters like Web API's version required. In ASP.NET Core, you can use a `[ModelBinder]` attribute on individual action method parameters or their associated types. You can also create a `ModelBinderProvider` that will be used globally within the app where appropriate. To configure such a provider, you would add code to `Startup` in `ConfigureServices`: +When migrating [custom model providers to ASP.NET Core](/aspnet/core/mvc/advanced/custom-model-binding#custom-model-binder-sample), the Web API pattern is closer to the ASP.NET Core approach than the ASP.NET MVC 5. The main differences between ASP.NET Core's `IModelBinder` interface and Web API's is that the ASP.NET Core method is async (`BindModelAsync`) and it only requires a single `BindingModelContext` parameter instead of two parameters like Web API's version required. In ASP.NET Core, you can use a `[ModelBinder]` attribute on individual action method parameters or their associated types. You can also create a `ModelBinderProvider` that will be used globally within the app where appropriate. To configure such a provider, you would add code to _Program.cs_: ```csharp -public void ConfigureServices(IServiceCollection services) +builder.Services.AddControllers(options => { - services.AddControllers(options => - { - options.ModelBinderProviders.Insert(0, new CustomModelBinderProvider()); - }); -} + options.ModelBinderProviders.Insert(0, new CustomModelBinderProvider()); +}); ``` ## Media formatters @@ -178,17 +175,14 @@ public static void ConfigureApis(HttpConfiguration config) } ``` -In ASP.NET Core, the process is similar. ASP.NET Core supports both input formatters (used by model binding) and output formatters (used to format responses). Adding a custom formatter to output responses in a specific way involves inheriting from an appropriate base class and adding the formatter to MVC in `Startup`: +In ASP.NET Core, the process is similar. ASP.NET Core supports both input formatters (used by model binding) and output formatters (used to format responses). Adding a custom formatter to output responses in a specific way involves inheriting from an appropriate base class and adding the formatter to MVC in _Program.cs_: ```csharp -public void ConfigureServices(IServiceCollection services) +builder.Services.AddControllers(options => { - services.AddControllers(options => - { - options.InputFormatters.Insert(0, new CustomInputFormatter()); - options.OutputFormatters.Insert(0, new CustomOutputFormatter()); - }); -} + options.InputFormatters.Insert(0, new CustomInputFormatter()); + options.OutputFormatters.Insert(0, new CustomOutputFormatter()); +}); ``` You'll find a complete list of base classes in the namespace. @@ -244,15 +238,12 @@ The `:int` after the `id` route parameter constrains the value to match the `int The set of route constraints, their syntax, and usage is very similar between all three approaches. Custom route constraints are fairly rare in customer applications. If your app uses a custom route constraint and needs to port to ASP.NET Core, the docs include examples showing [how to create custom route constraints in ASP.NET Core](/aspnet/core/fundamentals/routing#custom-route-constraints). Essentially all that's required is to implement `IRouteConstraint` and its `Match` method, and then add the custom constraint when configuring routing for the app: ```csharp -public void ConfigureServices(IServiceCollection services) -{ - services.AddControllers(); +builder.Services.AddControllers(); - services.AddRouting(options => - { - options.ConstraintMap.Add("customName", typeof(MyCustomConstraint)); - }); -} +builder.Services.AddRouting(options => +{ + options.ConstraintMap.Add("customName", typeof(MyCustomConstraint)); +}); ``` This is very similar to how custom constraints are used in ASP.NET Web API, which uses `IHttpRouteConstraint` and configures it using a resolver and a call to `HttpConfiguration.MapHttpAttributeRoutes`: diff --git a/docs/architecture/porting-existing-aspnet-apps/routing-differences.md b/docs/architecture/porting-existing-aspnet-apps/routing-differences.md index 1859398c3c2d1..e1ab9bc5f4ec1 100644 --- a/docs/architecture/porting-existing-aspnet-apps/routing-differences.md +++ b/docs/architecture/porting-existing-aspnet-apps/routing-differences.md @@ -122,9 +122,9 @@ public class ProductsController : ApiController Given the above controller, an HTTP GET request to `localhost:123/products/` matches the `GetAll` action. An HTTP GET request to `localhost:123/products?name=ardalis` matches the `FindProductsByName` action. -## Routing in .NET 6 +## Routing in .NET 7 -In ASP.NET Core, routing is handled by routing middleware, which matches the URLs of incoming requests to actions or other endpoints. Controller actions are either conventionally routed or attribute-routed. Conventional routing is similar to the route table approach used in ASP.NET MVC and Web API. Whether you're using conventional, attribute, or both, you need to configure your app to use the routing middleware. To use the middleware, add the following code to your `Startup.Configure` method: +In ASP.NET Core, routing is handled by routing middleware, which matches the URLs of incoming requests to actions or other endpoints. Controller actions are either conventionally routed or attribute-routed. Conventional routing is similar to the route table approach used in ASP.NET MVC and Web API. Whether you're using conventional, attribute, or both, you need to configure your app to use the routing middleware. To use the middleware, add the following code to your _Program.cs_ file: ```csharp app.UseRouting(); diff --git a/docs/architecture/porting-existing-aspnet-apps/signalr-differences.md b/docs/architecture/porting-existing-aspnet-apps/signalr-differences.md index e27856856d763..25e2aedb21904 100644 --- a/docs/architecture/porting-existing-aspnet-apps/signalr-differences.md +++ b/docs/architecture/porting-existing-aspnet-apps/signalr-differences.md @@ -16,7 +16,7 @@ ASP.NET Core SignalR is incompatible with clients or servers using ASP.NET Signa - ASP.NET SignalR automatically attempts to reconnect dropped connections; this behavior is opt-in for ASP.NET Core SignalR clients - Both frameworks support JSON; ASP.NET Core SignalR also supports a binary protocol based on MessagePack, and custom protocols can be created. - The Forever Frame transport, supported by ASP.NET SignalR, isn't supported in ASP.NET Core SignalR. -- ASP.NET Core SignalR must be configured by adding `services.AddSignalR()` and `app.UseEndpoints` in `Startup.ConfigureServices` and `Startup.Configure`, respectively. +- ASP.NET Core SignalR must be configured by adding `services.AddSignalR()` and `app.UseEndpoints` in _Program.cs_. - ASP.NET Core SignalR requires sticky sessions; ASP.NET SignalR doesn't. - ASP.NET Core simplifies the connection model; connections are only made to a single hub. - ASP.NET Core SignalR supports streaming data from the hub to the client. diff --git a/docs/architecture/porting-existing-aspnet-apps/strategies-migrating-in-production.md b/docs/architecture/porting-existing-aspnet-apps/strategies-migrating-in-production.md index 7b1c0a02d6b25..4960ae8ea90d8 100644 --- a/docs/architecture/porting-existing-aspnet-apps/strategies-migrating-in-production.md +++ b/docs/architecture/porting-existing-aspnet-apps/strategies-migrating-in-production.md @@ -9,7 +9,7 @@ ms.date: 12/10/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -Many teams have .NET Framework apps they plan to migrate to .NET Core/.NET 6, but the app is so large that the migration requires a significant amount of time to complete. The original app needs to live on while the migration is done piece by piece. There needs to be a way for the old and new versions of the app to work together side-by-side, or for the old version to be migrated in-place, at least some of the way, without breaking it. Teams can employ many different strategies to support these goals. +Many teams have .NET Framework apps they plan to migrate to .NET Core/.NET 7, but the app is so large that the migration requires a significant amount of time to complete. The original app needs to live on while the migration is done piece by piece. There needs to be a way for the old and new versions of the app to work together side-by-side, or for the old version to be migrated in-place, at least some of the way, without breaking it. Teams can employ many different strategies to support these goals. ## Refactor the .NET Framework solution @@ -41,7 +41,7 @@ Once the facade is in place, you can route part of it to a new ASP.NET Core app. **Figure 3-5.** The Strangler pattern over time. -Eventually, the entire facade layer corresponds to the new, modern implementation. At this point, both the legacy system and the face layer can be retired. +Eventually, the entire facade layer corresponds to the new, modern implementation. At this point, both the legacy system and the face layer can be retired. Microsoft has guidance on how to achieve [incremental ASP.NET to ASP.NET Core migration using the YARP reverse proxy](https://devblogs.microsoft.com/dotnet/incremental-asp-net-to-asp-net-core-migration/). ## Multi-targeting approaches @@ -63,6 +63,7 @@ Frequently, large ASP.NET MVC and Web API apps won't be ported to ASP.NET Core a - [eShopOnContainers Reference Microservices Application](https://github.com/dotnet-architecture/eShopOnContainers) - [Host ASP.NET Core on Windows with IIS](/aspnet/core/host-and-deploy/iis/) - [Strangler pattern](/azure/architecture/patterns/strangler) +- [Incremental ASP.NET to ASP.NET Core Migration](https://devblogs.microsoft.com/dotnet/incremental-asp-net-to-asp-net-core-migration/) >[!div class="step-by-step"] >[Previous](understand-update-dependencies.md) diff --git a/docs/architecture/porting-existing-aspnet-apps/summary.md b/docs/architecture/porting-existing-aspnet-apps/summary.md index 8352b4bd52c4b..59cc1b5b0abe3 100644 --- a/docs/architecture/porting-existing-aspnet-apps/summary.md +++ b/docs/architecture/porting-existing-aspnet-apps/summary.md @@ -1,11 +1,11 @@ --- -title: Summary - Port existing ASP.NET Apps to .NET 6 +title: Summary - Port existing ASP.NET Apps to .NET 7 description: A summary and set of key takeaways for porting ASP.NET MVC and Web API 2 apps to ASP.NET Core. author: ardalis ms.date: 12/10/2021 --- -# Summary: Port existing ASP.NET Apps to .NET 6 +# Summary: Port existing ASP.NET Apps to .NET 7 [!INCLUDE [download-alert](includes/download-alert.md)] diff --git a/docs/architecture/porting-existing-aspnet-apps/understand-update-dependencies.md b/docs/architecture/porting-existing-aspnet-apps/understand-update-dependencies.md index 4206d1e1410f3..200583c019e95 100644 --- a/docs/architecture/porting-existing-aspnet-apps/understand-update-dependencies.md +++ b/docs/architecture/porting-existing-aspnet-apps/understand-update-dependencies.md @@ -9,7 +9,7 @@ ms.date: 12/10/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -After identifying the sequence in which the app's individual projects must be migrated, the next step is to understand each project's dependencies and update them if necessary. For platform dependencies, the best way to start is to run the [.NET Portability Analyzer](../../standard/analyzers/portability-analyzer.md) on the assembly in question, and then look at the detailed results that are generated. You configure the tool to specify one or more target platforms, such as .NET 6 or .NET Standard 2.0. Results are provided with details for each platform targeted. Figure 3-4 shows an example of the tool's output. +After identifying the sequence in which the app's individual projects must be migrated, the next step is to understand each project's dependencies and update them if necessary. For platform dependencies, the best way to start is to run the [.NET Portability Analyzer](../../standard/analyzers/portability-analyzer.md) on the assembly in question, and then look at the detailed results that are generated. You configure the tool to specify one or more target platforms, such as .NET 7 or .NET Standard 2.0. Results are provided with details for each platform targeted. Figure 3-4 shows an example of the tool's output. ![.NET Portability Analyzer report details](./media/Figure3-4.png) diff --git a/docs/architecture/porting-existing-aspnet-apps/webapi-differences.md b/docs/architecture/porting-existing-aspnet-apps/webapi-differences.md index bd2457f409541..b69d434c467dd 100644 --- a/docs/architecture/porting-existing-aspnet-apps/webapi-differences.md +++ b/docs/architecture/porting-existing-aspnet-apps/webapi-differences.md @@ -9,11 +9,11 @@ ms.date: 12/10/2021 [!INCLUDE [download-alert](includes/download-alert.md)] -ASP.NET Core offers iterative improvements to ASP.NET Web API 2, but should feel familiar to developers who have used Web API 2. ASP.NET Web API 2 was developed and shipped alongside ASP.NET MVC. This meant the two approaches had similar-but-different approaches to things like attribute routing and dependency injection. In ASP.NET Core, there's no longer any distinction between MVC and Web APIs. There's only ASP.NET MVC, which includes support for view-based scenarios, API endpoints, and Razor Pages (and other variations like health checks and SignalR). +ASP.NET Core offers iterative improvements to ASP.NET Web API 2, but should feel familiar to developers who have used Web API 2. ASP.NET Web API 2 was developed and shipped alongside ASP.NET MVC. This meant the two approaches had similar-but-different approaches to things like attribute routing and dependency injection. In ASP.NET Core, there's no longer any distinction between MVC and Web APIs. There's only [ASP.NET Core](/aspnet/core/introduction-to-aspnet-core), which includes support for view-based scenarios, API endpoints, Razor Pages, health checks, SignalR, and more. In addition to being consistent and unified within ASP.NET Core, APIs built in .NET Core are much easier to test than those built on ASP.NET Web API 2. We'll cover [testing differences](testing-differences.md) in more detail in a moment. The built-in support for hosting ASP.NET Core apps, in a test host that can create an `HttpClient` that makes in-memory requests to the app, is a huge benefit when it comes to automated testing. -When migrating from ASP.NET Web API 2 to ASP.NET Core, the transition is straightforward. If you have large, bloated controllers, one approach you may consider to break them up is the use of the [Ardalis.ApiEndpoints](https://www.nuget.org/packages/Ardalis.ApiEndpoints/) NuGet packages. This package breaks up each endpoint into its own specific class, with associated request and response types as appropriate. This approach yields many of [the same benefits as Razor Pages offer over view-based code organization](comparing-razor-pages-aspnet-mvc.md). +See [Incremental ASP.NET to ASP.NET Core migration](/aspnet/core/migration/inc/overview) for an incremental approach to migrating to ASP.NET Core. ## References diff --git a/docs/architecture/serverless/azure-functions.md b/docs/architecture/serverless/azure-functions.md index 6346e2631d5b8..56f771474c096 100644 --- a/docs/architecture/serverless/azure-functions.md +++ b/docs/architecture/serverless/azure-functions.md @@ -15,7 +15,7 @@ Azure Functions provide a serverless compute experience. A function is invoked b ![Azure functions logo](./media/azure-functions-logo.png) -The current runtime version 4.0 supports cross-platform .NET 6.0 applications. Additional languages besides C# such as JavaScript, F#, and Java are supported. Functions created in the portal provide a rich scripting syntax. Functions created as standalone projects can be deployed with full platform support and capabilities. +The current runtime version 4.0 supports cross-platform .NET 7.0 applications. Additional languages besides C# such as JavaScript, F#, and Java are supported. Functions created in the portal provide a rich scripting syntax. Functions created as standalone projects can be deployed with full platform support and capabilities. For more information, see [Azure Functions documentation](/azure/azure-functions). @@ -25,13 +25,13 @@ The following languages are all supported in general availability (GA). |Language |Supported runtimes for 4.x| |--------------|------------------| -|**C#** |.NET 6.0 | -|**JavaScript**|Node 14 & 16 | -|**F#** |.NET 6.0 | -|**Java** |Java 8 & 11 | -|**Python** |Python 3.7, 3.8 & 3.9| -|**TypeScript**|Node 14 & 16 (via JavaScript)| -|**PowerShell**|PowerShell Core 7| +|**C#** |.NET 6.0, 7.0, .NET Framework 4.8 | +|**JavaScript**|Node 14, 16, 18 | +|**F#** |.NET 6.0, 7.0 | +|**Java** |Java 8, 11, 17 | +|**Python** |Python 3.7, 3.8, 3.9, 3.10 | +|**TypeScript**|Node 14, 16, 18 (via JavaScript)| +|**PowerShell**|PowerShell Core 7.2 | For more information on other runtime versions, see [Supported languages](/azure/azure-functions/supported-languages). diff --git a/docs/architecture/serverless/index.md b/docs/architecture/serverless/index.md index 1b27e50b50565..a578d3456a7ee 100644 --- a/docs/architecture/serverless/index.md +++ b/docs/architecture/serverless/index.md @@ -26,7 +26,7 @@ One Microsoft Way Redmond, Washington 98052-6399 -Copyright © 2018-2022 by Microsoft Corporation +Copyright © 2018-2023 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. @@ -56,7 +56,7 @@ Editors: Participants and reviewers: -> **[Steve Smith](https://twitter.com/ardalis)**, Owner, Ardalis Services. +> **[Steve Smith](https://twitter.com/ardalis)**, Architect/Trainer, NimblePros. ## Introduction diff --git a/docs/azure/azure-tools.md b/docs/azure/azure-tools.md index 172096ed55646..8b1bcc6abf1ff 100644 --- a/docs/azure/azure-tools.md +++ b/docs/azure/azure-tools.md @@ -1,16 +1,17 @@ --- title: Additional Azure Tools description: This article describes additional tools and utilities for working with Azure and how you can install them. -ms.date: 1/1/2021 ms.topic: conceptual -ms.custom: devx-track-dotnet -author: DavidCBerry13 +ms.custom: devx-track-dotnet, engagement-fy23, devx-track-azurepowershell +ms.date: 1/26/2023 +author: alexwolfmsft +ms.author: alexwolf recommendations: false --- # Additional Tools for Azure Developers -In addition to configuring your IDE and installing the Azure CLI, multiple other tools and utilities are available to help you be more productive with Azure. +In addition to configuring your IDE and installing the Azure CLI, multiple other tools and utilities are available to help you be more productive with Azure. ## Azure PowerShell @@ -19,6 +20,15 @@ Azure PowerShell is a PowerShell module of cmdlets for managing Azure resource d > [!div class="nextstepaction"] > [Install Azure PowerShell](/powershell/azure/install-az-ps) +## Azure Developer CLI (preview) + +Azure Developer CLI (`azd`) is an open-source tool that accelerates the process of building cloud apps on Azure. The CLI provides best practice, developer-friendly commands that map to key stages in your workflow, whether you're working in the terminal, your editor or integrated development environment (IDE), or DevOps. + +You can use `azd` with extensible templates that include everything you need to get an application up and running in Azure. These templates include application code, and reusable infrastructure as code assets. + +> [!div class="nextstepaction"] +> [Install Azure Developer CLI](/azure/developer/azure-developer-cli/install-azd) + ## Azure Storage Explorer Azure Storage Explorer is a free, GUI tool for managing storage resources and data in Azure. You can upload, download and manage blobs and files, as well as manage data in Azure queues, tables and CosmosDB. If you plan on working with any storage resources in Azure, installation of Azure Storage Explorer is recommended. Versions are available for Windows, macOS and Linux. diff --git a/docs/azure/configure-visual-studio.md b/docs/azure/configure-visual-studio.md index ba044b85ba0bb..2fbfbae2b66c9 100644 --- a/docs/azure/configure-visual-studio.md +++ b/docs/azure/configure-visual-studio.md @@ -1,10 +1,11 @@ --- title: Configure Visual Studio for Azure Development with .NET description: This article helps you configure Visual Studio for Azure development including getting the right workloads installed and connecting Visual Studio to your Azure account. -ms.date: 11/30/2020 ms.topic: conceptual -ms.custom: devx-track-dotnet -author: DavidCBerry13 +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 1/26/2023 +author: alexwolfmsft +ms.author: alexwolf recommendations: false --- # Configure Visual Studio for Azure development with .NET diff --git a/docs/azure/configure-vs-code.md b/docs/azure/configure-vs-code.md index bda582b38c322..33511bfeaa81e 100644 --- a/docs/azure/configure-vs-code.md +++ b/docs/azure/configure-vs-code.md @@ -1,10 +1,11 @@ --- title: Configure Visual Studio Code for Azure development with .NET description: This article helps you configure Visual Studio Code for Azure development including getting the right plugins installed and configured in VS Code -ms.date: 11/30/2020 ms.topic: conceptual -ms.custom: devx-track-dotnet, vscode-azure-extension-update-completed -author: DavidCBerry13 +ms.custom: devx-track-dotnet, vscode-azure-extension-update-completed, engagement-fy23 +ms.date: 1/26/2023 +author: alexwolfmsft +ms.author: alexwolf recommendations: false --- diff --git a/docs/azure/create-azure-account.md b/docs/azure/create-azure-account.md index 1b40bb2b033ee..15f2fc3d95ab6 100644 --- a/docs/azure/create-azure-account.md +++ b/docs/azure/create-azure-account.md @@ -1,10 +1,11 @@ --- title: Create an Azure account description: To use Azure, you need an Azure account. This article covers the three most common ways to sign up for an Azure account. -ms.date: 11/30/2020 ms.topic: conceptual -ms.custom: devx-track-dotnet -author: DavidCBerry13 +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 3/23/2023 +author: alexwolfmsft +ms.author: alexwolf recommendations: false --- @@ -20,7 +21,11 @@ If you have a Visual Studio subscription, your subscription includes credits for You can create an [Azure account for free](https://azure.microsoft.com/free/dotnet/) and receive 12 months of popular services for free and a $200 credit to explore Azure for 30 days. -## Option 3: Use a corporate account +## Option 3: Sign up for a pay-as-you-go account + +You can also create a [pay-as-you-go Azure account](https://azure.microsoft.com/pricing/purchase-options/pay-as-you-go/). This option includes monthly amounts of select services for free, and charges you for what you use beyond the free limits. There is no upfront commitment and you can cancel anytime. + +## Option 4: Use a corporate account If you are using Azure at work, talk to your company's cloud administrator to get your Azure credentials and then sign in to your account with the [Azure Portal](https://portal.azure.com). diff --git a/docs/azure/dotnet-dev-env-checklist.md b/docs/azure/dotnet-dev-env-checklist.md index c81ace9d65fcb..e3548f381c6bf 100644 --- a/docs/azure/dotnet-dev-env-checklist.md +++ b/docs/azure/dotnet-dev-env-checklist.md @@ -1,10 +1,9 @@ --- title: .NET Development on Azure Configuration Checklist description: Provides a quick summary of all the tools you should have installed to do .net development with Azure -ms.date: 1/1/2021 ms.topic: conceptual -ms.custom: devx-track-dotnet -author: DavidCBerry13 +ms.custom: devx-track-dotnet, engagement-fy23, devx-track-azurecli +ms.date: 3/23/2023 --- # .NET on Azure development environment checklist @@ -38,9 +37,10 @@ In addition to using the Azure portal, you will want to install the Azure CLI to These additional tools are designed to make you more productive when working with Azure. -* [Install Azure PowerShell](/powershell/azure/install-az-ps) if you plan on using PowerShell scripts to create and manage Azure resources +* [Install Azure PowerShell](/powershell/azure/install-az-ps) if you plan on using PowerShell scripts to create and manage Azure resources. +* [Install Azure Developer CLI](/azure/developer/azure-developer-cli/overview) if you plan on using the Developer CLI to streamline development workflows. * [Install Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/) to upload, download, and manage data in Azure storage resources including blobs, queues, tables, and CosmosDB. -* [Install Azure Data Studio](/sql/azure-data-studio/download-azure-data-studio) if you are working with Azure SQL +* [Install Azure Data Studio](/sql/azure-data-studio/download-azure-data-studio) if you are working with Azure SQL. ## Bookmark the following sites diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index 056b14e26b1d1..c9ca52a0b3664 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -3,49 +3,44 @@ | Anomaly Detector | NuGet [3.0.0-preview.6](https://www.nuget.org/packages/Azure.AI.AnomalyDetector/3.0.0-preview.6) | | GitHub [3.0.0-preview.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.AnomalyDetector_3.0.0-preview.6/sdk/anomalydetector/Azure.AI.AnomalyDetector/) | | App Configuration | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Data.AppConfiguration/1.2.0)
NuGet [1.3.0-beta.1](https://www.nuget.org/packages/Azure.Data.AppConfiguration/1.3.0-beta.1) | [docs](/dotnet/api/overview/azure/Data.AppConfiguration-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.AppConfiguration_1.2.0/sdk/appconfiguration/Azure.Data.AppConfiguration/)
GitHub [1.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.AppConfiguration_1.3.0-beta.1/sdk/appconfiguration/Azure.Data.AppConfiguration/) | | Attestation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Security.Attestation/1.0.0) | [docs](/dotnet/api/overview/azure/Security.Attestation-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.Attestation_1.0.0/sdk/attestation/Azure.Security.Attestation/) | -| Azure client library integration for ASP.NET Core | NuGet [1.6.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.6.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.6.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.6.0/sdk/extensions/Microsoft.Extensions.Azure/) | | Azure Object Anchors Conversion | NuGet [0.3.0-beta.6](https://www.nuget.org/packages/Azure.MixedReality.ObjectAnchors.Conversion/0.3.0-beta.6) | | GitHub [0.3.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.MixedReality.ObjectAnchors.Conversion_0.3.0-beta.6/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/) | | Azure Remote Rendering | NuGet [1.1.0](https://www.nuget.org/packages/Azure.MixedReality.RemoteRendering/1.1.0) | [docs](/dotnet/api/overview/azure/MixedReality.RemoteRendering-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.MixedReality.RemoteRendering_1.1.0/sdk/remoterendering/Azure.MixedReality.RemoteRendering/) | -| Blob Storage Key Store for .NET Data Protection | NuGet [1.2.3](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.2.3) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.2.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.2.3/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) | -| Blobs | NuGet [12.14.1](https://www.nuget.org/packages/Azure.Storage.Blobs/12.14.1) | [docs](/dotnet/api/overview/azure/Storage.Blobs-readme) | GitHub [12.14.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs_12.14.1/sdk/storage/Azure.Storage.Blobs/) | -| Blobs Batch | NuGet [12.11.0](https://www.nuget.org/packages/Azure.Storage.Blobs.Batch/12.11.0) | [docs](/dotnet/api/overview/azure/Storage.Blobs.Batch-readme) | GitHub [12.11.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.Batch_12.11.0/sdk/storage/Azure.Storage.Blobs.Batch/) | -| Blobs ChangeFeed | NuGet [12.0.0-preview.29](https://www.nuget.org/packages/Azure.Storage.Blobs.ChangeFeed/12.0.0-preview.29) | | GitHub [12.0.0-preview.29](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.ChangeFeed_12.0.0-preview.29/sdk/storage/Azure.Storage.Blobs.ChangeFeed/) | | Brokered Authentication | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Identity.BrokeredAuthentication/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity.BrokeredAuthentication_1.0.0-beta.3/sdk/identity/Azure.Identity.BrokeredAuthentication/) | | Cognitive Search | NuGet [11.4.0](https://www.nuget.org/packages/Azure.Search.Documents/11.4.0)
NuGet [11.5.0-beta.2](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.2) | [docs](/dotnet/api/overview/azure/Search.Documents-readme) | GitHub [11.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Search.Documents_11.4.0/sdk/search/Azure.Search.Documents/)
GitHub [11.5.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Search.Documents_11.5.0-beta.2/sdk/search/Azure.Search.Documents/) | -| Common | NuGet [12.13.0](https://www.nuget.org/packages/Azure.Storage.Common/12.13.0) | [docs](/dotnet/api/overview/azure/Storage.Common-readme) | GitHub [12.13.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Common_12.13.0/sdk/storage/Azure.Storage.Common/) | | Communication Call Automation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.0.0-beta.1/sdk/communication/Azure.Communication.CallAutomation/) | | Communication Chat | NuGet [1.1.1](https://www.nuget.org/packages/Azure.Communication.Chat/1.1.1) | [docs](/dotnet/api/overview/azure/Communication.Chat-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Chat_1.1.1/sdk/communication/Azure.Communication.Chat/) | -| Communication Common | NuGet [1.2.1](https://www.nuget.org/packages/Azure.Communication.Common/1.2.1) | [docs](/dotnet/api/overview/azure/Communication.Common-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_1.2.1/sdk/communication/Azure.Communication.Common/) | +| Communication Common | NuGet [1.2.1](https://www.nuget.org/packages/Azure.Communication.Common/1.2.1)
NuGet [2.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Common/2.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.Common-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_1.2.1/sdk/communication/Azure.Communication.Common/)
GitHub [2.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_2.0.0-beta.1/sdk/communication/Azure.Communication.Common/) | +| Communication Email | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Communication.Email/1.0.0) | [docs](/dotnet/api/overview/azure/Communication.Email-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Email_1.0.0/sdk/communication/Azure.Communication.Email/) | | Communication Identity | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Communication.Identity/1.2.0) | [docs](/dotnet/api/overview/azure/Communication.Identity-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Identity_1.2.0/sdk/communication/Azure.Communication.Identity/) | | Communication Network Traversal | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Communication.NetworkTraversal/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.Communication.NetworkTraversal/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.NetworkTraversal-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.NetworkTraversal_1.0.0/sdk/communication/Azure.Communication.NetworkTraversal/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.NetworkTraversal_1.1.0-beta.1/sdk/communication/Azure.Communication.NetworkTraversal/) | -| Communication Phone Numbers | NuGet [1.0.1](https://www.nuget.org/packages/Azure.Communication.PhoneNumbers/1.0.1)
NuGet [1.1.0-beta.3](https://www.nuget.org/packages/Azure.Communication.PhoneNumbers/1.1.0-beta.3) | [docs](/dotnet/api/overview/azure/Communication.PhoneNumbers-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.PhoneNumbers_1.0.1/sdk/communication/Azure.Communication.PhoneNumbers/)
GitHub [1.1.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.PhoneNumbers_1.1.0-beta.3/sdk/communication/Azure.Communication.PhoneNumbers/) | +| Communication Phone Numbers | NuGet [1.1.0](https://www.nuget.org/packages/Azure.Communication.PhoneNumbers/1.1.0) | [docs](/dotnet/api/overview/azure/Communication.PhoneNumbers-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.PhoneNumbers_1.1.0/sdk/communication/Azure.Communication.PhoneNumbers/) | | Communication Rooms | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Rooms/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Rooms_1.0.0-beta.1/sdk/communication/Azure.Communication.Rooms/) | | Communication SMS | NuGet [1.0.1](https://www.nuget.org/packages/Azure.Communication.Sms/1.0.1) | [docs](/dotnet/api/overview/azure/Communication.Sms-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Sms_1.0.1/sdk/communication/Azure.Communication.Sms/) | | Confidential Ledger | NuGet [1.1.0](https://www.nuget.org/packages/Azure.Security.ConfidentialLedger/1.1.0) | [docs](/dotnet/api/overview/azure/Security.ConfidentialLedger-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.ConfidentialLedger_1.1.0/sdk/confidentialledger/Azure.Security.ConfidentialLedger/) | -| Container Registry | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Containers.ContainerRegistry/1.0.0)
NuGet [1.1.0-beta.5](https://www.nuget.org/packages/Azure.Containers.ContainerRegistry/1.1.0-beta.5) | [docs](/dotnet/api/overview/azure/Containers.ContainerRegistry-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Containers.ContainerRegistry_1.0.0/sdk/containerregistry/Azure.Containers.ContainerRegistry/)
GitHub [1.1.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Containers.ContainerRegistry_1.1.0-beta.5/sdk/containerregistry/Azure.Containers.ContainerRegistry/) | -| Conversation Analysis | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Language.Conversations-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.0.0/sdk/cognitivelanguage/Azure.AI.Language.Conversations/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.1.0-beta.2/sdk/cognitivelanguage/Azure.AI.Language.Conversations/) | -| Core - Client - AMQP | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Core.Amqp/1.2.0) | [docs](/dotnet/api/overview/azure/Core.Amqp-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core.Amqp_1.2.0/sdk/core/Azure.Core.Amqp/) | -| Core - Client - Core | NuGet [1.27.0](https://www.nuget.org/packages/Azure.Core/1.27.0) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.27.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.27.0/sdk/core/Azure.Core/) | +| Container Registry | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Containers.ContainerRegistry/1.0.0)
NuGet [1.1.0-beta.9](https://www.nuget.org/packages/Azure.Containers.ContainerRegistry/1.1.0-beta.9) | [docs](/dotnet/api/overview/azure/Containers.ContainerRegistry-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Containers.ContainerRegistry_1.0.0/sdk/containerregistry/Azure.Containers.ContainerRegistry/)
GitHub [1.1.0-beta.9](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Containers.ContainerRegistry_1.1.0-beta.9/sdk/containerregistry/Azure.Containers.ContainerRegistry/) | +| Conversational Language Understanding | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Language.Conversations-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.0.0/sdk/cognitivelanguage/Azure.AI.Language.Conversations/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.1.0-beta.2/sdk/cognitivelanguage/Azure.AI.Language.Conversations/) | +| Core - Client - AMQP | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Core.Amqp/1.3.0) | [docs](/dotnet/api/overview/azure/Core.Amqp-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core.Amqp_1.3.0/sdk/core/Azure.Core.Amqp/) | +| Core - Client - Core | NuGet [1.31.0](https://www.nuget.org/packages/Azure.Core/1.31.0) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.31.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.31.0/sdk/core/Azure.Core/) | | Cosmos DB | NuGet [4.0.0-preview3](https://www.nuget.org/packages/Azure.Cosmos/4.0.0-preview3) | [docs](/dotnet/api/azure.cosmos) | GitHub [4.0.0-preview3](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/releases/4.0.0-preview3) | -| Data Lake Storage (Gen 2) | NuGet [12.12.1](https://www.nuget.org/packages/Azure.Storage.Files.DataLake/12.12.1) | [docs](/dotnet/api/overview/azure/Storage.Files.DataLake-readme) | GitHub [12.12.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Files.DataLake_12.12.1/sdk/storage/Azure.Storage.Files.DataLake/) | | Data Movement | NuGet [12.0.0-beta.1](https://www.nuget.org/packages/Azure.Storage.DataMovement/12.0.0-beta.1) | | GitHub [12.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement_12.0.0-beta.1/sdk/storage/Azure.Storage.DataMovement/) | -| Dev Center | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Developer.DevCenter/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.DevCenter_1.0.0-beta.1/sdk/devcenter/Azure.Developer.DevCenter/) | +| Dev Center | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Developer.DevCenter/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.DevCenter_1.0.0-beta.2/sdk/devcenter/Azure.Developer.DevCenter/) | +| Device Update | NuGet [1.0.0](https://www.nuget.org/packages/Azure.IoT.DeviceUpdate/1.0.0) | [docs](/dotnet/api/overview/azure/IoT.DeviceUpdate-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.DeviceUpdate_1.0.0/sdk/deviceupdate/Azure.IoT.DeviceUpdate/) | | Digital Twins - Core | NuGet [1.4.0](https://www.nuget.org/packages/Azure.DigitalTwins.Core/1.4.0) | [docs](/dotnet/api/overview/azure/DigitalTwins.Core-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.DigitalTwins.Core_1.4.0/sdk/digitaltwins/Azure.DigitalTwins.Core/) | | Document Translation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Translation.Document/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Translation.Document-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Translation.Document_1.0.0/sdk/translation/Azure.AI.Translation.Document/) | -| Event Grid | NuGet [4.12.0](https://www.nuget.org/packages/Azure.Messaging.EventGrid/4.12.0) | [docs](/dotnet/api/overview/azure/Messaging.EventGrid-readme) | GitHub [4.12.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventGrid_4.12.0/sdk/eventgrid/Azure.Messaging.EventGrid/) | -| Event Hubs | NuGet [5.7.5](https://www.nuget.org/packages/Azure.Messaging.EventHubs/5.7.5) | [docs](/dotnet/api/overview/azure/Messaging.EventHubs-readme) | GitHub [5.7.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventHubs_5.7.5/sdk/eventhub/Azure.Messaging.EventHubs/) | -| Event Hubs - Event Processor | NuGet [5.7.5](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor/5.7.5) | [docs](/dotnet/api/overview/azure/Messaging.EventHubs.Processor-readme) | GitHub [5.7.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventHubs.Processor_5.7.5/sdk/eventhub/Azure.Messaging.EventHubs.Processor/) | -| FarmBeats | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Verticals.AgriFood.Farming/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Verticals.AgriFood.Farming_1.0.0-beta.1/sdk/farmbeats/Azure.Verticals.AgriFood.Farming/) | -| File Shares | NuGet [12.12.1](https://www.nuget.org/packages/Azure.Storage.Files.Shares/12.12.1) | [docs](/dotnet/api/overview/azure/Storage.Files.Shares-readme) | GitHub [12.12.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Files.Shares_12.12.1/sdk/storage/Azure.Storage.Files.Shares/) | +| Event Grid | NuGet [4.14.1](https://www.nuget.org/packages/Azure.Messaging.EventGrid/4.14.1) | [docs](/dotnet/api/overview/azure/Messaging.EventGrid-readme) | GitHub [4.14.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventGrid_4.14.1/sdk/eventgrid/Azure.Messaging.EventGrid/) | +| Event Hubs | NuGet [5.9.0](https://www.nuget.org/packages/Azure.Messaging.EventHubs/5.9.0) | [docs](/dotnet/api/overview/azure/Messaging.EventHubs-readme) | GitHub [5.9.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventHubs_5.9.0/sdk/eventhub/Azure.Messaging.EventHubs/) | +| Event Hubs - Event Processor | NuGet [5.9.0](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor/5.9.0) | [docs](/dotnet/api/overview/azure/Messaging.EventHubs.Processor-readme) | GitHub [5.9.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventHubs.Processor_5.9.0/sdk/eventhub/Azure.Messaging.EventHubs.Processor/) | +| FarmBeats | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Verticals.AgriFood.Farming/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Verticals.AgriFood.Farming_1.0.0-beta.2/sdk/agrifood/Azure.Verticals.AgriFood.Farming/) | | Form Recognizer | NuGet [4.0.0](https://www.nuget.org/packages/Azure.AI.FormRecognizer/4.0.0) | [docs](/dotnet/api/overview/azure/AI.FormRecognizer-readme) | GitHub [4.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.FormRecognizer_4.0.0/sdk/formrecognizer/Azure.AI.FormRecognizer/) | -| Identity | NuGet [1.8.1](https://www.nuget.org/packages/Azure.Identity/1.8.1)
NuGet [1.9.0-beta.1](https://www.nuget.org/packages/Azure.Identity/1.9.0-beta.1) | [docs](/dotnet/api/overview/azure/Identity-readme) | GitHub [1.8.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity_1.8.1/sdk/identity/Azure.Identity/)
GitHub [1.9.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity_1.9.0-beta.1/sdk/identity/Azure.Identity/) | -| IoT Device Update | NuGet [1.0.0](https://www.nuget.org/packages/Azure.IoT.DeviceUpdate/1.0.0) | [docs](/dotnet/api/overview/azure/IoT.DeviceUpdate-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.DeviceUpdate_1.0.0/sdk/deviceupdate/Azure.IoT.DeviceUpdate/) | -| Key Encryptor for .NET Data Protection | NuGet [1.1.0](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Keys/1.1.0) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Keys-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Keys_1.1.0/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/) | -| Key Vault - Administration | NuGet [4.2.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/4.2.0)
NuGet [4.3.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/4.3.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Administration-readme) | GitHub [4.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Administration_4.2.0/sdk/keyvault/Azure.Security.KeyVault.Administration/)
GitHub [4.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Administration_4.3.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Administration/) | -| Key Vault - Certificates | NuGet [4.4.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.4.0)
NuGet [4.5.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.5.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Certificates-readme) | GitHub [4.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Certificates_4.4.0/sdk/keyvault/Azure.Security.KeyVault.Certificates/)
GitHub [4.5.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Certificates_4.5.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Certificates/) | -| Key Vault - Keys | NuGet [4.4.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.4.0)
NuGet [4.5.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.5.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Keys-readme) | GitHub [4.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.4.0/sdk/keyvault/Azure.Security.KeyVault.Keys/)
GitHub [4.5.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.5.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Keys/) | -| Key Vault - Secrets | NuGet [4.4.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/4.4.0)
NuGet [4.5.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/4.5.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Secrets-readme) | GitHub [4.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Secrets_4.4.0/sdk/keyvault/Azure.Security.KeyVault.Secrets/)
GitHub [4.5.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Secrets_4.5.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Secrets/) | -| Load Testing | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.0.0-beta.1/sdk/loadtestservice/Azure.Developer.LoadTesting/) | +| Health Insights Cancer Profiling | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Health.Insights.CancerProfiling/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Health.Insights.CancerProfiling_1.0.0-beta.1/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/) | +| Health Insights Clinical Matching | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Health.Insights.ClinicalMatching/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Health.Insights.ClinicalMatching_1.0.0-beta.1/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/) | +| Identity | NuGet [1.8.2](https://www.nuget.org/packages/Azure.Identity/1.8.2)
NuGet [1.9.0-beta.2](https://www.nuget.org/packages/Azure.Identity/1.9.0-beta.2) | [docs](/dotnet/api/overview/azure/Identity-readme) | GitHub [1.8.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity_1.8.2/sdk/identity/Azure.Identity/)
GitHub [1.9.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity_1.9.0-beta.2/sdk/identity/Azure.Identity/) | +| Image Analysis | NuGet [0.10.0-beta.1](https://www.nuget.org/packages/Azure.AI.Vision.ImageAnalysis/0.10.0-beta.1) | | GitHub [0.10.0-beta.1](https://msasg.visualstudio.com/Skyman/_git/Carbon) | +| Key Vault - Administration | NuGet [4.3.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/4.3.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Administration-readme) | GitHub [4.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Administration_4.3.0/sdk/keyvault/Azure.Security.KeyVault.Administration/) | +| Key Vault - Certificates | NuGet [4.5.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.5.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Certificates-readme) | GitHub [4.5.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Certificates_4.5.1/sdk/keyvault/Azure.Security.KeyVault.Certificates/) | +| Key Vault - Keys | NuGet [4.5.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.5.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Keys-readme) | GitHub [4.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.5.0/sdk/keyvault/Azure.Security.KeyVault.Keys/) | +| Key Vault - Secrets | NuGet [4.5.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/4.5.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Secrets-readme) | GitHub [4.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Secrets_4.5.0/sdk/keyvault/Azure.Security.KeyVault.Secrets/) | +| Load Testing | NuGet [1.0.1](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.0.1) | [docs](/dotnet/api/overview/azure/Developer.LoadTesting-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.0.1/sdk/loadtestservice/Azure.Developer.LoadTesting/) | | Maps Common | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Maps.Common/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Common_1.0.0-beta.3/sdk/maps/Azure.Maps.Common/) | | Maps Geolocation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.Geolocation/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Geolocation_1.0.0-beta.1/sdk/maps/Azure.Maps.Geolocation/) | | Maps Render | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.Rendering/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Rendering_1.0.0-beta.1/sdk/maps/Azure.Maps.Rendering/) | @@ -54,248 +49,221 @@ | Media Analytics Edge | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Media.Analytics.Edge/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Media.Analytics.Edge_1.0.0-beta.1/sdk/mediaservices/Azure.Media.Analytics.Edge) | | Metrics Advisor | NuGet [1.1.0](https://www.nuget.org/packages/Azure.AI.MetricsAdvisor/1.1.0) | [docs](/dotnet/api/overview/azure/AI.MetricsAdvisor-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.MetricsAdvisor_1.1.0/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/) | | Mixed Reality Authentication | NuGet [1.2.0](https://www.nuget.org/packages/Azure.MixedReality.Authentication/1.2.0) | [docs](/dotnet/api/overview/azure/MixedReality.Authentication-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.MixedReality.Authentication_1.2.0/sdk/mixedreality/Azure.MixedReality.Authentication/) | -| Monitor Ingestion | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Monitor.Ingestion/1.0.0-beta.4) | | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Ingestion_1.0.0-beta.4/sdk/monitor/Azure.Monitor.Ingestion/) | +| Monitor Ingestion | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Monitor.Ingestion/1.0.0) | [docs](/dotnet/api/overview/azure/Monitor.Ingestion-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Ingestion_1.0.0/sdk/monitor/Azure.Monitor.Ingestion/) | | Monitor Query | NuGet [1.1.0](https://www.nuget.org/packages/Azure.Monitor.Query/1.1.0) | [docs](/dotnet/api/overview/azure/Monitor.Query-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query_1.1.0/sdk/monitor/Azure.Monitor.Query/) | -| OpenTelemetry Exporter | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/1.0.0-beta.6) | | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.Exporter_1.0.0-beta.6/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/) | +| OpenAI Inference | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.AI.OpenAI/1.0.0-beta.5) | | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_1.0.0-beta.5/sdk/openai/Azure.AI.OpenAI/) | +| OpenTelemetry AspNetCore | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.AspNetCore_1.0.0-beta.3/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/) | +| OpenTelemetry Exporter | NuGet [1.0.0-beta.10](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/1.0.0-beta.10) | | GitHub [1.0.0-beta.10](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.Exporter_1.0.0-beta.10/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/) | | Personalizer | NuGet [2.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Personalizer/2.0.0-beta.2) | | GitHub [2.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Personalizer_2.0.0-beta.2/sdk/personalizer/Azure.AI.Personalizer/) | | Purview Account | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.Purview.Account/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Account_1.0.0-beta.1/sdk/purview/Azure.Analytics.Purview.Account/) | | Purview Administration | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.Purview.Administration/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Administration_1.0.0-beta.1/sdk/purview/Azure.Analytics.Purview.Administration/) | | Purview Catalog | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Analytics.Purview.Catalog/1.0.0-beta.4) | | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Catalog_1.0.0-beta.4/sdk/purview/Azure.Analytics.Purview.Catalog/) | | Purview Scanning | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Analytics.Purview.Scanning/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Scanning_1.0.0-beta.2/sdk/purview/Azure.Analytics.Purview.Scanning/) | +| Purview Workflow | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.Purview.Workflows/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Workflows_1.0.0-beta.1/sdk/purview/Azure.Analytics.Purview.Workflows/) | | Question Answering | NuGet [1.1.0](https://www.nuget.org/packages/Azure.AI.Language.QuestionAnswering/1.1.0) | [docs](/dotnet/api/overview/azure/AI.Language.QuestionAnswering-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.QuestionAnswering_1.1.0/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/) | -| Queues | NuGet [12.12.0](https://www.nuget.org/packages/Azure.Storage.Queues/12.12.0) | [docs](/dotnet/api/overview/azure/Storage.Queues-readme) | GitHub [12.12.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Queues_12.12.0/sdk/storage/Azure.Storage.Queues/) | | Schema Registry | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Data.SchemaRegistry/1.3.0)
NuGet [1.4.0-beta.1](https://www.nuget.org/packages/Azure.Data.SchemaRegistry/1.4.0-beta.1) | [docs](/dotnet/api/overview/azure/Data.SchemaRegistry-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.SchemaRegistry_1.3.0/sdk/schemaregistry/Azure.Data.SchemaRegistry/)
GitHub [1.4.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.SchemaRegistry_1.4.0-beta.1/sdk/schemaregistry/Azure.Data.SchemaRegistry/) | | Schema Registry - Avro | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro_1.0.0/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/) | -| Secrets Configuration Provider for .NET | NuGet [1.2.2](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.Configuration.Secrets/1.2.2) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.Configuration.Secrets-readme) | GitHub [1.2.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.Configuration.Secrets_1.2.2/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/) | -| Service Bus | NuGet [7.12.0](https://www.nuget.org/packages/Azure.Messaging.ServiceBus/7.12.0) | [docs](/dotnet/api/overview/azure/Messaging.ServiceBus-readme) | GitHub [7.12.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.ServiceBus_7.12.0/sdk/servicebus/Azure.Messaging.ServiceBus/) | +| Service Bus | NuGet [7.13.1](https://www.nuget.org/packages/Azure.Messaging.ServiceBus/7.13.1) | [docs](/dotnet/api/overview/azure/Messaging.ServiceBus-readme) | GitHub [7.13.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.ServiceBus_7.13.1/sdk/servicebus/Azure.Messaging.ServiceBus/) | +| Storage - Blobs | NuGet [12.16.0](https://www.nuget.org/packages/Azure.Storage.Blobs/12.16.0) | [docs](/dotnet/api/overview/azure/Storage.Blobs-readme) | GitHub [12.16.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs_12.16.0/sdk/storage/Azure.Storage.Blobs/) | +| Storage - Blobs Batch | NuGet [12.13.0](https://www.nuget.org/packages/Azure.Storage.Blobs.Batch/12.13.0) | [docs](/dotnet/api/overview/azure/Storage.Blobs.Batch-readme) | GitHub [12.13.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.Batch_12.13.0/sdk/storage/Azure.Storage.Blobs.Batch/) | +| Storage - Blobs ChangeFeed | NuGet [12.0.0-preview.34](https://www.nuget.org/packages/Azure.Storage.Blobs.ChangeFeed/12.0.0-preview.34) | | GitHub [12.0.0-preview.34](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.ChangeFeed_12.0.0-preview.34/sdk/storage/Azure.Storage.Blobs.ChangeFeed/) | +| Storage - Files Data Lake | NuGet [12.14.0](https://www.nuget.org/packages/Azure.Storage.Files.DataLake/12.14.0) | [docs](/dotnet/api/overview/azure/Storage.Files.DataLake-readme) | GitHub [12.14.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Files.DataLake_12.14.0/sdk/storage/Azure.Storage.Files.DataLake/) | +| Storage - Files Share | NuGet [12.14.0](https://www.nuget.org/packages/Azure.Storage.Files.Shares/12.14.0) | [docs](/dotnet/api/overview/azure/Storage.Files.Shares-readme) | GitHub [12.14.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Files.Shares_12.14.0/sdk/storage/Azure.Storage.Files.Shares/) | +| Storage - Queues | NuGet [12.14.0](https://www.nuget.org/packages/Azure.Storage.Queues/12.14.0) | [docs](/dotnet/api/overview/azure/Storage.Queues-readme) | GitHub [12.14.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Queues_12.14.0/sdk/storage/Azure.Storage.Queues/) | | Synapse - AccessControl | NuGet [1.0.0-preview.5](https://www.nuget.org/packages/Azure.Analytics.Synapse.AccessControl/1.0.0-preview.5) | | GitHub [1.0.0-preview.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.AccessControl_1.0.0-preview.5/sdk/synapse/Azure.Analytics.Synapse.AccessControl/) | | Synapse - Artifacts | NuGet [1.0.0-preview.17](https://www.nuget.org/packages/Azure.Analytics.Synapse.Artifacts/1.0.0-preview.17) | | GitHub [1.0.0-preview.17](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Artifacts_1.0.0-preview.17/sdk/synapse/Azure.Analytics.Synapse.Artifacts/) | | Synapse - Managed Private Endpoints | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.Analytics.Synapse.ManagedPrivateEndpoints/1.0.0-beta.5) | | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.ManagedPrivateEndpoints_1.0.0-beta.5/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/) | | Synapse - Monitoring | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Analytics.Synapse.Monitoring/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Monitoring_1.0.0-beta.3/sdk/synapse/Azure.Analytics.Synapse.Monitoring/) | | Synapse - Spark | NuGet [1.0.0-preview.8](https://www.nuget.org/packages/Azure.Analytics.Synapse.Spark/1.0.0-preview.8) | | GitHub [1.0.0-preview.8](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Spark_1.0.0-preview.8/sdk/synapse/Azure.Analytics.Synapse.Spark/) | -| Tables | NuGet [12.7.1](https://www.nuget.org/packages/Azure.Data.Tables/12.7.1) | [docs](/dotnet/api/overview/azure/Data.Tables-readme) | GitHub [12.7.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.Tables_12.7.1/sdk/tables/Azure.Data.Tables/) | -| Text Analytics | NuGet [5.2.0](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.2.0)
NuGet [5.3.0-beta.1](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.3.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.TextAnalytics-readme) | GitHub [5.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.2.0/sdk/textanalytics/Azure.AI.TextAnalytics/)
GitHub [5.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.3.0-beta.1/sdk/textanalytics/Azure.AI.TextAnalytics/) | +| Tables | NuGet [12.8.0](https://www.nuget.org/packages/Azure.Data.Tables/12.8.0) | [docs](/dotnet/api/overview/azure/Data.Tables-readme) | GitHub [12.8.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.Tables_12.8.0/sdk/tables/Azure.Data.Tables/) | +| Text Analytics | NuGet [5.2.0](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.2.0)
NuGet [5.3.0-beta.3](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.3.0-beta.3) | [docs](/dotnet/api/overview/azure/AI.TextAnalytics-readme) | GitHub [5.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.2.0/sdk/textanalytics/Azure.AI.TextAnalytics/)
GitHub [5.3.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.3.0-beta.3/sdk/textanalytics/Azure.AI.TextAnalytics/) | | Video Analyzer Edge | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.Media.VideoAnalyzer.Edge/1.0.0-beta.6) | | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Media.VideoAnalyzer.Edge_1.0.0-beta.6/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/) | +| Vision Core | NuGet [0.10.0-beta.1](https://www.nuget.org/packages/Azure.AI.Vision.Core/0.10.0-beta.1) | | GitHub [0.10.0-beta.1](https://msasg.visualstudio.com/Skyman/_git/Carbon) | | Web PubSub | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub/1.3.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub_1.3.0/sdk/webpubsub/Azure.Messaging.WebPubSub/) | -| Web PubSub Client | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0-beta.1/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) | +| Web PubSub Client | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0-beta.2/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) | +| Azure client library integration for ASP.NET Core | NuGet [1.6.3](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.6.3) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.6.3](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.6.3/sdk/extensions/Microsoft.Extensions.Azure/) | +| Blob Storage Key Store for .NET Data Protection | NuGet [1.3.2](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.3.2) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.3.2/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) | | CloudNative CloudEvents with Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents_1.0.0/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/) | | Core - Client - Spatial | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.1.0/sdk/core/Microsoft.Azure.Core.Spatial/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.2.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial/) | | Core - Client - Spatial Newtonsoft Json | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial.NewtonsoftJson/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial.NewtonsoftJson/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial.NewtonsoftJson-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial.NewtonsoftJson_1.0.0/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial.NewtonsoftJson_1.1.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/) | -| Functions extension for Azure Tables | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Tables/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Tables-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.Tables_1.0.0/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/) | +| Functions extension for Azure Tables | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Tables/1.1.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Tables-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.Tables_1.1.0/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/) | +| Key Encryptor for .NET Data Protection | NuGet [1.2.2](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Keys/1.2.2) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Keys-readme) | GitHub [1.2.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Keys_1.2.2/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/) | +| Secrets Configuration Provider for .NET | NuGet [1.2.2](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.Configuration.Secrets/1.2.2) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.Configuration.Secrets-readme) | GitHub [1.2.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.Configuration.Secrets_1.2.2/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/) | +| Storage - Common | NuGet [12.15.0](https://www.nuget.org/packages/Azure.Storage.Common/12.15.0) | [docs](/dotnet/api/overview/azure/Storage.Common-readme) | GitHub [12.15.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Common_12.15.0/sdk/storage/Azure.Storage.Common/) | | WebJobs Extensions - Event Grid | NuGet [3.2.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventGrid/3.2.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventGrid-readme) | GitHub [3.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventGrid_3.2.1/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/) | -| WebJobs Extensions - Event Hubs | NuGet [5.1.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventHubs/5.1.2) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventHubs-readme) | GitHub [5.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventHubs_5.1.2/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/) | -| WebJobs Extensions - Service Bus | NuGet [5.8.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ServiceBus/5.8.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.ServiceBus-readme) | GitHub [5.8.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.ServiceBus_5.8.1/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/) | -| WebJobs Extensions - SignalR Service | NuGet [1.9.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SignalRService/1.9.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.SignalRService-readme) | GitHub [1.9.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/SignalRServiceExtension) | -| WebJobs Extensions - Storage | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage/5.0.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage-readme) | GitHub [5.0.1](https://github.com/Azure/azure-webjobs-sdk/tree/master/src/Microsoft.Azure.WebJobs.Extensions.Storage) | -| WebJobs Extensions - Web PubSub | NuGet [1.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.WebPubSub/1.3.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.WebPubSub-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.WebPubSub_1.3.0/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSub/) | -| Resource Management - Advisor | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Advisor/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Advisor_1.0.0-beta.1/sdk/advisor/Azure.ResourceManager.Advisor/) | -| Resource Management - Agrifood | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.AgFoodPlatform/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AgFoodPlatform_1.0.0-beta.1/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/) | -| Resource Management - Alerts Management | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.AlertsManagement/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AlertsManagement-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AlertsManagement_1.0.0/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/) | -| Resource Management - Analysis | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Analysis/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Analysis-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Analysis_1.0.0/sdk/analysisservices/Azure.ResourceManager.Analysis/) | -| Resource Management - API Management | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ApiManagement/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ApiManagement-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApiManagement_1.0.0/sdk/apimanagement/Azure.ResourceManager.ApiManagement/) | -| Resource Management - App Compliance Automation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.AppComplianceAutomation/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppComplianceAutomation_1.0.0-beta.1/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/) | +| WebJobs Extensions - Event Hubs | NuGet [5.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventHubs/5.3.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventHubs-readme) | GitHub [5.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventHubs_5.3.0/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/) | +| WebJobs Extensions - Service Bus | NuGet [5.9.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ServiceBus/5.9.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.ServiceBus-readme) | GitHub [5.9.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.ServiceBus_5.9.0/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/) | +| WebJobs Extensions - SignalR Service | NuGet [1.10.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SignalRService/1.10.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.SignalRService-readme) | GitHub [1.10.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/SignalRServiceExtension) | +| WebJobs Extensions - Storage | NuGet [5.1.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage/5.1.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage-readme) | GitHub [5.1.1](https://github.com/Azure/azure-webjobs-sdk/tree/master/src/Microsoft.Azure.WebJobs.Extensions.Storage) | +| WebJobs Extensions - Web PubSub | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.WebPubSub/1.4.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.WebPubSub-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.WebPubSub_1.4.0/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSub/) | +| Resource Management - Advisor | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Advisor/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Advisor_1.0.0-beta.2/sdk/advisor/Azure.ResourceManager.Advisor/) | +| Resource Management - Agrifood | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.AgFoodPlatform/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AgFoodPlatform_1.0.0-beta.2/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/) | +| Resource Management - Alerts Management | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.AlertsManagement/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.AlertsManagement-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AlertsManagement_1.0.1/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/) | +| Resource Management - Analysis | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Analysis/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Analysis-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Analysis_1.0.1/sdk/analysisservices/Azure.ResourceManager.Analysis/) | +| Resource Management - API Management | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ApiManagement/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ApiManagement-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApiManagement_1.0.1/sdk/apimanagement/Azure.ResourceManager.ApiManagement/) | +| Resource Management - App Compliance Automation | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.AppComplianceAutomation/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppComplianceAutomation_1.0.0-beta.2/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/) | | Resource Management - App Configuration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.AppConfiguration/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AppConfiguration-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppConfiguration_1.0.0/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/) | -| Resource Management - App Platform | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.AppPlatform/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AppPlatform-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppPlatform_1.0.0/sdk/appplatform/Azure.ResourceManager.AppPlatform/) | -| Resource Management - App Service | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.AppService/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AppService-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppService_1.0.0/sdk/websites/Azure.ResourceManager.AppService/) | -| Resource Management - Application Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.0.0-beta.1/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/) | -| Resource Management - Arc ScVmm | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ArcScVmm/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ArcScVmm_1.0.0-beta.1/sdk/arc-scvmm/Azure.ResourceManager.ArcScVmm/) | -| Resource Management - Attestation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Attestation/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Attestation_1.0.0-beta.1/sdk/attestation/Azure.ResourceManager.Attestation/) | -| Resource Management - Authorization | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Authorization/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Authorization-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Authorization_1.0.0/sdk/authorization/Azure.ResourceManager.Authorization/) | -| Resource Management - Automanage | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Automanage/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Automanage_1.0.0-beta.1/sdk/automanage/Azure.ResourceManager.Automanage/) | -| Resource Management - Automation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Automation/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Automation-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Automation_1.0.0/sdk/automation/Azure.ResourceManager.Automation/) | -| Resource Management - Avs | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Avs/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Avs-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Avs_1.1.0/sdk/avs/Azure.ResourceManager.Avs/) | -| Resource Management - Azure Stack HCI | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Hci/1.0.0)
NuGet [2.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci/2.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Hci-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci_1.0.0/sdk/azurestackhci/Azure.ResourceManager.Hci/)
GitHub [2.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci_2.0.0-beta.1/sdk/azurestackhci/Azure.ResourceManager.Hci/) | -| Resource Management - Backup | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServicesBackup/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServicesBackup_1.0.0-beta.1/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/) | -| Resource Management - Batch | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Batch/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Batch-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Batch_1.1.0/sdk/batch/Azure.ResourceManager.Batch/) | -| Resource Management - Billing | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Billing/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Billing-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Billing_1.0.0/sdk/billing/Azure.ResourceManager.Billing/) | +| Resource Management - App Platform | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.AppPlatform/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.AppPlatform-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppPlatform_1.0.2/sdk/appplatform/Azure.ResourceManager.AppPlatform/) | +| Resource Management - App Service | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.AppService/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.AppService-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppService_1.0.1/sdk/websites/Azure.ResourceManager.AppService/) | +| Resource Management - Application Insights | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.0.0-beta.2/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/) | +| Resource Management - Arc ScVmm | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ArcScVmm/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ArcScVmm_1.0.0-beta.2/sdk/arc-scvmm/Azure.ResourceManager.ArcScVmm/) | +| Resource Management - Attestation | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Attestation/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Attestation_1.0.0-beta.2/sdk/attestation/Azure.ResourceManager.Attestation/) | +| Resource Management - Authorization | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Authorization/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Authorization-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Authorization_1.0.1/sdk/authorization/Azure.ResourceManager.Authorization/) | +| Resource Management - Automanage | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Automanage/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Automanage-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Automanage_1.0.0/sdk/automanage/Azure.ResourceManager.Automanage/) | +| Resource Management - Automation | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Automation/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Automation-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Automation_1.0.1/sdk/automation/Azure.ResourceManager.Automation/) | +| Resource Management - Azure Stack HCI | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci/1.0.1)
NuGet [2.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci/2.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Hci-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci_1.0.1/sdk/azurestackhci/Azure.ResourceManager.Hci/)
GitHub [2.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci_2.0.0-beta.1/sdk/azurestackhci/Azure.ResourceManager.Hci/) | +| Resource Management - Azure VMware Solution | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Avs/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Avs-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Avs_1.1.1/sdk/avs/Azure.ResourceManager.Avs/) | +| Resource Management - Backup | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServicesBackup/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.RecoveryServicesBackup-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServicesBackup_1.0.0/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/) | +| Resource Management - Batch | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Batch/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Batch-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Batch_1.1.1/sdk/batch/Azure.ResourceManager.Batch/) | +| Resource Management - Billing | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Billing/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Billing-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Billing_1.0.1/sdk/billing/Azure.ResourceManager.Billing/) | | Resource Management - Billing Benefits | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.BillingBenefits/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.BillingBenefits_1.0.0-beta.1/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/) | -| Resource Management - Blueprint | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Blueprint/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Blueprint_1.0.0-beta.1/sdk/blueprint/Azure.ResourceManager.Blueprint/) | -| Resource Management - Bot Service | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.BotService/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.BotService_1.0.0-beta.1/sdk/botservice/Azure.ResourceManager.BotService/) | -| Resource Management - Change Analysis | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ChangeAnalysis/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ChangeAnalysis-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ChangeAnalysis_1.0.0/sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis/) | -| Resource Management - Chaos | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Chaos/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Chaos_1.0.0-beta.2/sdk/chaos/Azure.ResourceManager.Chaos/) | -| Resource Management - Cognitive Search | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Search/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Search-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Search_1.0.0/sdk/search/Azure.ResourceManager.Search/) | -| Resource Management - Cognitive Services | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.CognitiveServices/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.CognitiveServices-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CognitiveServices_1.1.0/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/) | -| Resource Management - Communication | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.0.0)
NuGet [1.1.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.1.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.Communication-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.0.0/sdk/communication/Azure.ResourceManager.Communication/)
GitHub [1.1.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.1.0-beta.5/sdk/communication/Azure.ResourceManager.Communication/) | -| Resource Management - Compute | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Compute/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Compute-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Compute_1.0.1/sdk/compute/Azure.ResourceManager.Compute/) | -| Resource Management - Confidential Ledger | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ConfidentialLedger/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ConfidentialLedger-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ConfidentialLedger_1.0.0/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/) | -| Resource Management - Confluent | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Confluent/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Confluent-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Confluent_1.0.0/sdk/confluent/Azure.ResourceManager.Confluent/) | -| Resource Management - Connected VMware vSphere | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.ConnectedVMwarevSphere/1.0.0-beta.5) | | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ConnectedVMwarevSphere_1.0.0-beta.5/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/) | -| Resource Management - Consumption | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Consumption/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Consumption-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Consumption_1.0.0/sdk/consumption/Azure.ResourceManager.Consumption/) | -| Resource Management - Container Apps | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.AppContainers/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.AppContainers-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppContainers_1.0.1/sdk/containerapps/Azure.ResourceManager.AppContainers/) | -| Resource Management - Container Instances | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ContainerInstance/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerInstance-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerInstance_1.0.1/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/) | -| Resource Management - Container Registry | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.ContainerRegistry/1.0.2)
NuGet [1.1.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.ContainerRegistry/1.1.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerRegistry-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerRegistry_1.0.2/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/)
GitHub [1.1.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerRegistry_1.1.0-beta.3/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/) | -| Resource Management - Container Service | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerService-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.1.0/sdk/containerservice/Azure.ResourceManager.ContainerService/) | -| Resource Management - Content Delivery Network | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.0.1/sdk/cdn/Azure.ResourceManager.Cdn/) | -| Resource Management - Core | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager/1.3.2) | [docs](/dotnet/api/overview/azure/ResourceManager-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager_1.3.2/sdk/resourcemanager/Azure.ResourceManager/) | -| Resource Management - Cosmos DB | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.2.0/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) | -| Resource Management - Customer Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.CustomerInsights/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CustomerInsights_1.0.0-beta.1/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/) | -| Resource Management - Data Box | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataBox/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataBox-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataBox_1.0.0/sdk/databox/Azure.ResourceManager.DataBox/) | -| Resource Management - Data Box Edge | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataBoxEdge/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataBoxEdge-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataBoxEdge_1.0.0/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/) | +| Resource Management - Blueprint | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Blueprint/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Blueprint_1.0.0-beta.2/sdk/blueprint/Azure.ResourceManager.Blueprint/) | +| Resource Management - Bot Service | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.BotService/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.BotService-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.BotService_1.0.1/sdk/botservice/Azure.ResourceManager.BotService/) | +| Resource Management - Change Analysis | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ChangeAnalysis/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ChangeAnalysis-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ChangeAnalysis_1.0.1/sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis/) | +| Resource Management - Chaos | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.Chaos/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Chaos_1.0.0-beta.3/sdk/chaos/Azure.ResourceManager.Chaos/) | +| Resource Management - Cognitive Search | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Search/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Search-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Search_1.1.0/sdk/search/Azure.ResourceManager.Search/) | +| Resource Management - Cognitive Services | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.CognitiveServices/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.CognitiveServices-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/) | +| Resource Management - Communication | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Communication-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.1.0/sdk/communication/Azure.ResourceManager.Communication/) | +| Resource Management - Compute | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Compute/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Compute-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Compute_1.1.0/sdk/compute/Azure.ResourceManager.Compute/) | +| Resource Management - Confidential Ledger | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ConfidentialLedger/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ConfidentialLedger-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ConfidentialLedger_1.0.1/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/) | +| Resource Management - Confluent | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Confluent/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Confluent-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Confluent_1.0.1/sdk/confluent/Azure.ResourceManager.Confluent/) | +| Resource Management - Connected VMware vSphere | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.ResourceManager.ConnectedVMwarevSphere/1.0.0-beta.6) | | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ConnectedVMwarevSphere_1.0.0-beta.6/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/) | +| Resource Management - Consumption | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Consumption/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Consumption-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Consumption_1.0.1/sdk/consumption/Azure.ResourceManager.Consumption/) | +| Resource Management - Container Apps | NuGet [1.0.3](https://www.nuget.org/packages/Azure.ResourceManager.AppContainers/1.0.3) | [docs](/dotnet/api/overview/azure/ResourceManager.AppContainers-readme) | GitHub [1.0.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppContainers_1.0.3/sdk/containerapps/Azure.ResourceManager.AppContainers/) | +| Resource Management - Container Instances | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ContainerInstance/1.0.1)
NuGet [1.1.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.ContainerInstance/1.1.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerInstance-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerInstance_1.0.1/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/)
GitHub [1.1.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerInstance_1.1.0-beta.3/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/) | +| Resource Management - Container Registry | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerRegistry/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerRegistry-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerRegistry_1.1.0/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/) | +| Resource Management - Container Service | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerService-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.1.0/sdk/containerservice/Azure.ResourceManager.ContainerService/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.2.0-beta.1/sdk/containerservice/Azure.ResourceManager.ContainerService/) | +| Resource Management - Content Delivery Network | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.1.0/sdk/cdn/Azure.ResourceManager.Cdn/) | +| Resource Management - Core | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager_1.4.0/sdk/resourcemanager/Azure.ResourceManager/) | +| Resource Management - Cosmos DB | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.2.1/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) | +| Resource Management - Customer Insights | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.CustomerInsights/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CustomerInsights_1.0.0-beta.2/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/) | +| Resource Management - Data Box | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DataBox/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataBox-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataBox_1.0.1/sdk/databox/Azure.ResourceManager.DataBox/) | +| Resource Management - Data Box Edge | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DataBoxEdge/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataBoxEdge-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataBoxEdge_1.0.1/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/) | | Resource Management - Data Factory | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DataFactory/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataFactory_1.0.0-beta.2/sdk/datafactory/Azure.ResourceManager.DataFactory/) | -| Resource Management - Data Migration | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DataMigration/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataMigration_1.0.0-beta.1/sdk/datamigration/Azure.ResourceManager.DataMigration/) | -| Resource Management - Data Protection | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataProtectionBackup/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataProtectionBackup-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataProtectionBackup_1.0.0/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/) | -| Resource Management - Data Share | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataShare/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataShare-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataShare_1.0.0/sdk/datashare/Azure.ResourceManager.DataShare/) | -| Resource Management - Datadog | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0-beta.1/sdk/datadog/Azure.ResourceManager.Datadog/) | -| Resource Management - DataLake Analytics | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeAnalytics/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataLakeAnalytics-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeAnalytics_1.0.0/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/) | -| Resource Management - DataLake Store | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeStore/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataLakeStore-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeStore_1.0.0/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/) | -| Resource Management - Deployment Manager | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DeploymentManager/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeploymentManager_1.0.0-beta.1/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/) | -| Resource Management - Desktop Virtualization | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DesktopVirtualization/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DesktopVirtualization-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DesktopVirtualization_1.0.0/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/) | -| Resource Management - Dev Center | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DevCenter/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevCenter_1.0.0-beta.1/sdk/devcenter/Azure.ResourceManager.DevCenter/) | -| Resource Management - Dev Spaces | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DevSpaces/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevSpaces_1.0.0-beta.1/sdk/devspaces/Azure.ResourceManager.DevSpaces/) | -| Resource Management - Device Provisioning Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DeviceProvisioningServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DeviceProvisioningServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeviceProvisioningServices_1.0.0/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/) | -| Resource Management - Device Update | NuGet [1.0.0-beta.7](https://www.nuget.org/packages/Azure.ResourceManager.DeviceUpdate/1.0.0-beta.7) | | GitHub [1.0.0-beta.7](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeviceUpdate_1.0.0-beta.7/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/) | -| Resource Management - DevTest Labs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DevTestLabs/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DevTestLabs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevTestLabs_1.0.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/) | -| Resource Management - Digital Twins | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DigitalTwins/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DigitalTwins-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DigitalTwins_1.1.0/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/) | -| Resource Management - DNS | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Dns-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.0.0/sdk/dns/Azure.ResourceManager.Dns/) | -| Resource Management - DNS Resolver | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DnsResolver/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DnsResolver-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DnsResolver_1.0.0/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/) | -| Resource Management - Dynatrace | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Dynatrace/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Dynatrace-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dynatrace_1.0.0/sdk/dynatrace/Azure.ResourceManager.Dynatrace/) | -| Resource Management - Edge Order | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.EdgeOrder/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.EdgeOrder-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EdgeOrder_1.0.0/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/) | -| Resource Management - Elastic | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Elastic/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Elastic_1.0.0-beta.1/sdk/elastic/Azure.ResourceManager.Elastic/) | -| Resource Management - ElasticSan | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ElasticSan/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ElasticSan_1.0.0-beta.1/sdk/elasticsan/Azure.ResourceManager.ElasticSan/) | -| Resource Management - Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.EventGrid/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.EventGrid-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventGrid_1.0.0/sdk/eventgrid/Azure.ResourceManager.EventGrid/) | -| Resource Management - Event Hubs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.EventHubs/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.EventHubs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventHubs_1.0.0/sdk/eventhub/Azure.ResourceManager.EventHubs/) | -| Resource Management - Extended Location | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ExtendedLocations/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ExtendedLocations-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ExtendedLocations_1.0.0/sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/) | -| Resource Management - Fluid Relay | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.FluidRelay/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.FluidRelay-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.FluidRelay_1.0.0/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/) | -| Resource Management - Front Door | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.FrontDoor/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.FrontDoor-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.FrontDoor_1.0.0/sdk/frontdoor/Azure.ResourceManager.FrontDoor/) | -| Resource Management - Guest Configuration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.GuestConfiguration/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.GuestConfiguration-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GuestConfiguration_1.0.0/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/) | -| Resource Management - HDInsight | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.0.0/sdk/hdinsight/Azure.ResourceManager.HDInsight/) | -| Resource Management - Health Bot | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthBot/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthBot-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthBot_1.0.0/sdk/healthbot/Azure.ResourceManager.HealthBot/) | -| Resource Management - Healthcare APIs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthcareApis/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthcareApis-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthcareApis_1.0.0/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/) | -| Resource Management - Hybrid Compute | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.HybridCompute/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridCompute_1.0.0-beta.1/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/) | -| Resource Management - Hybrid Connectivity | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.HybridConnectivity/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridConnectivity_1.0.0-beta.1/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/) | -| Resource Management - Hybrid Data | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HybridData/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HybridData-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridData_1.0.0/sdk/hybriddatamanager/Azure.ResourceManager.HybridData/) | -| Resource Management - Hybrid Kubernetes | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Kubernetes/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kubernetes_1.0.0-beta.1/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/) | -| Resource Management - IoT Central | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.IotCentral/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.IotCentral-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotCentral_1.0.0/sdk/iotcentral/Azure.ResourceManager.IotCentral/) | -| Resource Management - IoT Hub | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.IotHub/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.IotHub-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotHub_1.0.0/sdk/iothub/Azure.ResourceManager.IotHub/) | -| Resource Management - Key Vault | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.KeyVault/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KeyVault-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KeyVault_1.0.0/sdk/keyvault/Azure.ResourceManager.KeyVault/) | -| Resource Management - Kubernetes Configuration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.KubernetesConfiguration/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KubernetesConfiguration-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KubernetesConfiguration_1.0.0/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/) | -| Resource Management - Kusto | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.Kusto/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Kusto-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kusto_1.2.0/sdk/kusto/Azure.ResourceManager.Kusto/) | -| Resource Management - Lab Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.LabServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.LabServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LabServices_1.0.0/sdk/labservices/Azure.ResourceManager.LabServices/) | -| Resource Management - Load Testing | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.LoadTesting/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LoadTesting_1.0.0-beta.2/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/) | -| Resource Management - Logic | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Logic/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Logic-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Logic_1.0.0/sdk/logic/Azure.ResourceManager.Logic/) | -| Resource Management - Machine Learning | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearning/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MachineLearning-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearning_1.0.0/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/) | -| Resource Management - Machine Learning Compute | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearningCompute/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearningCompute_1.0.0-beta.1/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/) | -| Resource Management - Maintenance | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Maintenance/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Maintenance-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maintenance_1.0.0/sdk/maintenance/Azure.ResourceManager.Maintenance/) | -| Resource Management - Managed Grafana | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Grafana-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.0.0/sdk/grafana/Azure.ResourceManager.Grafana/) | -| Resource Management - Managed Network | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ManagedNetwork/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedNetwork_1.0.0-beta.1/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/) | -| Resource Management - Managed Service Identity | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServiceIdentities/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServiceIdentities/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServiceIdentities-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServiceIdentities_1.0.0/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServiceIdentities_1.1.0-beta.1/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/) | -| Resource Management - Managed Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServices_1.0.0/sdk/managedservices/Azure.ResourceManager.ManagedServices/) | -| Resource Management - Management Partner | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ManagementPartner/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagementPartner_1.0.0-beta.1/sdk/managementpartner/Azure.ResourceManager.ManagementPartner/) | -| Resource Management - Maps | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Maps/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Maps-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maps_1.0.0/sdk/maps/Azure.ResourceManager.Maps/) | -| Resource Management - Marketplace | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Marketplace/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Marketplace-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Marketplace_1.0.0/sdk/marketplace/Azure.ResourceManager.Marketplace/) | -| Resource Management - Marketplace Ordering | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.MarketplaceOrdering/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MarketplaceOrdering-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MarketplaceOrdering_1.0.0/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/) | -| Resource Management - Media | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Media/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Media-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Media_1.0.0/sdk/mediaservices/Azure.ResourceManager.Media/) | -| Resource Management - MixedReality | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.MixedReality/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MixedReality-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MixedReality_1.0.0/sdk/mixedreality/Azure.ResourceManager.MixedReality/) | -| Resource Management - Monitor | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Monitor/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Monitor-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Monitor_1.0.0/sdk/monitor/Azure.ResourceManager.Monitor/) | -| Resource Management - MySQL | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.MySql/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MySql-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MySql_1.0.0/sdk/mysql/Azure.ResourceManager.MySql/) | -| Resource Management - Net App | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.NetApp/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.NetApp-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetApp_1.0.0/sdk/netapp/Azure.ResourceManager.NetApp/) | -| Resource Management - Network | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Network/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Network-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Network_1.1.0/sdk/network/Azure.ResourceManager.Network/) | -| Resource Management - Network Function | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.NetworkFunction/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetworkFunction_1.0.0-beta.1/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/) | +| Resource Management - Data Lake Analytics | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeAnalytics/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeAnalytics/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataLakeAnalytics-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeAnalytics_1.0.0/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeAnalytics_1.1.0-beta.1/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/) | +| Resource Management - Data Lake Store | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeStore/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeStore/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataLakeStore-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeStore_1.0.0/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeStore_1.1.0-beta.1/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/) | +| Resource Management - Data Migration | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DataMigration/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataMigration_1.0.0-beta.2/sdk/datamigration/Azure.ResourceManager.DataMigration/) | +| Resource Management - Data Protection | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.DataProtectionBackup/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataProtectionBackup-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataProtectionBackup_1.1.1/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/) | +| Resource Management - Data Share | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DataShare/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataShare-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataShare_1.0.1/sdk/datashare/Azure.ResourceManager.DataShare/) | +| Resource Management - Datadog | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0-beta.2/sdk/datadog/Azure.ResourceManager.Datadog/) | +| Resource Management - Deployment Manager | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DeploymentManager/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeploymentManager_1.0.0-beta.2/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/) | +| Resource Management - Desktop Virtualization | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DesktopVirtualization/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DesktopVirtualization-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DesktopVirtualization_1.0.1/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/) | +| Resource Management - Dev Center | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DevCenter/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevCenter_1.0.0-beta.2/sdk/devcenter/Azure.ResourceManager.DevCenter/) | +| Resource Management - Dev Spaces | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DevSpaces/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevSpaces_1.0.0-beta.2/sdk/devspaces/Azure.ResourceManager.DevSpaces/) | +| Resource Management - Device Provisioning Services | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DeviceProvisioningServices/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DeviceProvisioningServices-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeviceProvisioningServices_1.1.0/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/) | +| Resource Management - Device Update | NuGet [1.0.0-beta.8](https://www.nuget.org/packages/Azure.ResourceManager.DeviceUpdate/1.0.0-beta.8) | | GitHub [1.0.0-beta.8](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeviceUpdate_1.0.0-beta.8/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/) | +| Resource Management - DevTest Labs | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DevTestLabs/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DevTestLabs-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevTestLabs_1.0.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/) | +| Resource Management - Digital Twins | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.DigitalTwins/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DigitalTwins-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DigitalTwins_1.2.0/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/) | +| Resource Management - DNS | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dns-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.0.1/sdk/dns/Azure.ResourceManager.Dns/) | +| Resource Management - DNS Resolver | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DnsResolver/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DnsResolver-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DnsResolver_1.0.1/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/) | +| Resource Management - Dynatrace | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Dynatrace/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dynatrace-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dynatrace_1.0.1/sdk/dynatrace/Azure.ResourceManager.Dynatrace/) | +| Resource Management - Edge Order | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.EdgeOrder/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.EdgeOrder-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EdgeOrder_1.0.1/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/) | +| Resource Management - Elastic | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Elastic/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Elastic_1.0.0-beta.2/sdk/elastic/Azure.ResourceManager.Elastic/) | +| Resource Management - ElasticSan | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ElasticSan/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ElasticSan_1.0.0-beta.2/sdk/elasticsan/Azure.ResourceManager.ElasticSan/) | +| Resource Management - Event Grid | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.EventGrid/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.EventGrid-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventGrid_1.0.1/sdk/eventgrid/Azure.ResourceManager.EventGrid/) | +| Resource Management - Event Hubs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.EventHubs/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.EventHubs/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.EventHubs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventHubs_1.0.0/sdk/eventhub/Azure.ResourceManager.EventHubs/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventHubs_1.1.0-beta.1/sdk/eventhub/Azure.ResourceManager.EventHubs/) | +| Resource Management - Extended Location | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ExtendedLocations/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ExtendedLocations-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ExtendedLocations_1.0.1/sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/) | +| Resource Management - Fluid Relay | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.FluidRelay/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.FluidRelay-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.FluidRelay_1.0.1/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/) | +| Resource Management - Front Door | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.FrontDoor/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.FrontDoor-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.FrontDoor_1.1.0/sdk/frontdoor/Azure.ResourceManager.FrontDoor/) | +| Resource Management - Graphservices | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.GraphServices/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GraphServices_1.0.0-beta.1/sdk/graphservices/Azure.ResourceManager.GraphServices/) | +| Resource Management - Guest Configuration | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.GuestConfiguration/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.GuestConfiguration-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GuestConfiguration_1.0.1/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/) | +| Resource Management - HDInsight | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.0.1/sdk/hdinsight/Azure.ResourceManager.HDInsight/) | +| Resource Management - Health Bot | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.HealthBot/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthBot-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthBot_1.0.1/sdk/healthbot/Azure.ResourceManager.HealthBot/) | +| Resource Management - Healthcare APIs | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.HealthcareApis/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthcareApis-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthcareApis_1.0.1/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/) | +| Resource Management - Hybrid Compute | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.HybridCompute/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridCompute_1.0.0-beta.2/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/) | +| Resource Management - Hybrid Connectivity | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.HybridConnectivity/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridConnectivity_1.0.0-beta.2/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/) | +| Resource Management - Hybrid Data | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.HybridData/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HybridData-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridData_1.0.1/sdk/hybriddatamanager/Azure.ResourceManager.HybridData/) | +| Resource Management - Hybrid Kubernetes | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Kubernetes/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kubernetes_1.0.0-beta.2/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/) | +| Resource Management - Hybridcontainerservice | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.HybridContainerService/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridContainerService_1.0.0-beta.1/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/) | +| Resource Management - IoT Central | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.IotCentral/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.IotCentral-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotCentral_1.0.1/sdk/iotcentral/Azure.ResourceManager.IotCentral/) | +| Resource Management - IoT Hub | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.IotHub/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.IotHub-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotHub_1.0.1/sdk/iothub/Azure.ResourceManager.IotHub/) | +| Resource Management - Key Vault | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.KeyVault/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KeyVault-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KeyVault_1.1.0/sdk/keyvault/Azure.ResourceManager.KeyVault/) | +| Resource Management - Kubernetes Configuration | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.KubernetesConfiguration/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KubernetesConfiguration-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KubernetesConfiguration_1.1.0/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/) | +| Resource Management - Kusto | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.Kusto/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Kusto-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kusto_1.3.0/sdk/kusto/Azure.ResourceManager.Kusto/) | +| Resource Management - Lab Services | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.LabServices/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.LabServices-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LabServices_1.0.1/sdk/labservices/Azure.ResourceManager.LabServices/) | +| Resource Management - Load Testing | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.LoadTesting/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.LoadTesting-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LoadTesting_1.0.1/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/) | +| Resource Management - Logic | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Logic/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Logic-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Logic_1.0.1/sdk/logic/Azure.ResourceManager.Logic/) | +| Resource Management - Machine Learning | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearning/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MachineLearning-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearning_1.1.0/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/) | +| Resource Management - Machine Learning Compute | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearningCompute/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearningCompute_1.0.0-beta.2/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/) | +| Resource Management - Maintenance | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.Maintenance/1.1.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Maintenance-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maintenance_1.1.2/sdk/maintenance/Azure.ResourceManager.Maintenance/) | +| Resource Management - Managed Grafana | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Grafana-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.0.1/sdk/grafana/Azure.ResourceManager.Grafana/) | +| Resource Management - Managed Network | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ManagedNetwork/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedNetwork_1.0.0-beta.2/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/) | +| Resource Management - Managed Service Identity | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServiceIdentities/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServiceIdentities-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServiceIdentities_1.1.0/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/) | +| Resource Management - Managed Services | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServices/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServices-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServices_1.0.1/sdk/managedservices/Azure.ResourceManager.ManagedServices/) | +| Resource Management - Management Partner | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ManagementPartner/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagementPartner_1.0.0-beta.2/sdk/managementpartner/Azure.ResourceManager.ManagementPartner/) | +| Resource Management - Maps | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Maps/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Maps-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maps_1.0.1/sdk/maps/Azure.ResourceManager.Maps/) | +| Resource Management - Marketplace | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Marketplace/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Marketplace-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Marketplace_1.0.1/sdk/marketplace/Azure.ResourceManager.Marketplace/) | +| Resource Management - Marketplace Ordering | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.MarketplaceOrdering/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.MarketplaceOrdering-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MarketplaceOrdering_1.0.1/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/) | +| Resource Management - Media | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.Media/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Media-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Media_1.2.0/sdk/mediaservices/Azure.ResourceManager.Media/) | +| Resource Management - Mixed Reality | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.MixedReality/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.MixedReality-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MixedReality_1.0.1/sdk/mixedreality/Azure.ResourceManager.MixedReality/) | +| Resource Management - Mobile Network | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.MobileNetwork/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MobileNetwork_1.0.0-beta.1/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/) | +| Resource Management - Monitor | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Monitor/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Monitor-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Monitor_1.1.0/sdk/monitor/Azure.ResourceManager.Monitor/) | +| Resource Management - MySQL | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.MySql/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.MySql-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MySql_1.0.1/sdk/mysql/Azure.ResourceManager.MySql/) | +| Resource Management - NetApp Files | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.NetApp/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.NetApp-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetApp_1.1.0/sdk/netapp/Azure.ResourceManager.NetApp/) | +| Resource Management - Network | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Network/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Network-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Network_1.1.1/sdk/network/Azure.ResourceManager.Network/) | +| Resource Management - Network Function | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.NetworkFunction/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetworkFunction_1.0.0-beta.2/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/) | | Resource Management - Nginx | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.0.0-beta.1/sdk/nginx/Azure.ResourceManager.Nginx/) | -| Resource Management - Notification Hubs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.NotificationHubs/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.NotificationHubs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NotificationHubs_1.0.0/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/) | -| Resource Management - Operational Insights | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.OperationalInsights/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.OperationalInsights-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.OperationalInsights_1.0.0/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/) | -| Resource Management - Orbital | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Orbital/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Orbital-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Orbital_1.0.0/sdk/orbital/Azure.ResourceManager.Orbital/) | -| Resource Management - Peering | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Peering/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Peering-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Peering_1.1.0/sdk/peering/Azure.ResourceManager.Peering/) | -| Resource Management - Policy Insights | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.PolicyInsights/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PolicyInsights-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PolicyInsights_1.0.0/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/) | -| Resource Management - PostgreSQL | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.PostgreSql/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PostgreSql-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PostgreSql_1.0.0/sdk/postgresql/Azure.ResourceManager.PostgreSql/) | -| Resource Management - Power BI Dedicated | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.PowerBIDedicated/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PowerBIDedicated_1.0.0-beta.1/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/) | -| Resource Management - Private DNS | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.PrivateDns/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PrivateDns-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PrivateDns_1.0.0/sdk/privatedns/Azure.ResourceManager.PrivateDns/) | -| Resource Management - Provider Hub | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ProviderHub/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ProviderHub_1.0.0-beta.1/sdk/providerhub/Azure.ResourceManager.ProviderHub/) | -| Resource Management - Purview | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Purview/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Purview-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Purview_1.0.0/sdk/purview/Azure.ResourceManager.Purview/) | -| Resource Management - Quantum | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Quantum/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quantum_1.0.0-beta.1/sdk/quantum/Azure.ResourceManager.Quantum/) | -| Resource Management - Quota | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Quota/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quota_1.0.0-beta.1/sdk/quota/Azure.ResourceManager.Quota/) | -| Resource Management - Recovery Services | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServices/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServices_1.0.0-beta.1/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/) | -| Resource Management - Redis | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Redis/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Redis-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Redis_1.1.0/sdk/redis/Azure.ResourceManager.Redis/) | -| Resource Management - Redis Enterprise | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.RedisEnterprise/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.RedisEnterprise-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RedisEnterprise_1.0.0/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/) | -| Resource Management - Redis Enterprise Cache | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.RedisEnterpriseCache/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RedisEnterpriseCache_1.0.0-beta.1/sdk/redisenterprise/Azure.ResourceManager.RedisEnterpriseCache/) | -| Resource Management - Relay | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Relay/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Relay-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Relay_1.1.0/sdk/relay/Azure.ResourceManager.Relay/) | -| Resource Management - Reservations | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Reservations/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Reservations-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Reservations_1.1.0/sdk/reservations/Azure.ResourceManager.Reservations/) | +| Resource Management - Notification Hubs | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.NotificationHubs/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.NotificationHubs-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NotificationHubs_1.0.1/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/) | +| Resource Management - Operational Insights | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.OperationalInsights/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.OperationalInsights-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.OperationalInsights_1.1.0/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/) | +| Resource Management - Orbital | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Orbital/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Orbital-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Orbital_1.0.1/sdk/orbital/Azure.ResourceManager.Orbital/) | +| Resource Management - Peering | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Peering/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Peering-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Peering_1.1.1/sdk/peering/Azure.ResourceManager.Peering/) | +| Resource Management - Policy Insights | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.PolicyInsights/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PolicyInsights-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PolicyInsights_1.1.0/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/) | +| Resource Management - PostgreSQL | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.PostgreSql/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PostgreSql-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PostgreSql_1.1.1/sdk/postgresql/Azure.ResourceManager.PostgreSql/) | +| Resource Management - Power BI Dedicated | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.PowerBIDedicated/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PowerBIDedicated_1.0.0-beta.2/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/) | +| Resource Management - Private DNS | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.PrivateDns/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PrivateDns-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PrivateDns_1.0.1/sdk/privatedns/Azure.ResourceManager.PrivateDns/) | +| Resource Management - Provider Hub | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ProviderHub/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ProviderHub-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ProviderHub_1.0.0/sdk/providerhub/Azure.ResourceManager.ProviderHub/) | +| Resource Management - Purview | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Purview/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Purview-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Purview_1.0.1/sdk/purview/Azure.ResourceManager.Purview/) | +| Resource Management - Quantum | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Quantum/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quantum_1.0.0-beta.2/sdk/quantum/Azure.ResourceManager.Quantum/) | +| Resource Management - Qumulo | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Qumulo/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Qumulo_1.0.0-beta.1/sdk/qumulo/Azure.ResourceManager.Qumulo/) | +| Resource Management - Quota | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Quota/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quota_1.0.0-beta.2/sdk/quota/Azure.ResourceManager.Quota/) | +| Resource Management - Recovery Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.RecoveryServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServices_1.0.0/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/) | +| Resource Management - Redis | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Redis/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Redis-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Redis_1.1.1/sdk/redis/Azure.ResourceManager.Redis/) | +| Resource Management - Redis Enterprise | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.RedisEnterprise/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.RedisEnterprise-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RedisEnterprise_1.0.1/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/) | +| Resource Management - Redis Enterprise | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.RedisEnterpriseCache/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RedisEnterpriseCache_1.0.0-beta.1/sdk/redisenterprise/Azure.ResourceManager.RedisEnterpriseCache/) | +| Resource Management - Relay | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Relay/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Relay-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Relay_1.1.1/sdk/relay/Azure.ResourceManager.Relay/) | +| Resource Management - Reservations | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.Reservations/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Reservations-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Reservations_1.3.0/sdk/reservations/Azure.ResourceManager.Reservations/) | +| Resource Management - Resource Graph | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ResourceGraph/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ResourceGraph-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceGraph_1.0.1/sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/) | | Resource Management - Resource Mover | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Migrate/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Migrate_1.0.0-beta.1/sdk/resourcemover/Azure.ResourceManager.Migrate/) | -| Resource Management - Resource Mover | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ResourceMover/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ResourceMover-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceMover_1.0.0/sdk/resourcemover/Azure.ResourceManager.ResourceMover/) | -| Resource Management - ResourceGraph | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ResourceGraph/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ResourceGraph-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceGraph_1.0.0/sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/) | -| Resource Management - Resources | NuGet [1.3.1](https://www.nuget.org/packages/Azure.ResourceManager.Resources/1.3.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Resources-readme) | GitHub [1.3.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Resources_1.3.1/sdk/resources/Azure.ResourceManager.Resources/) | -| Resource Management - Security Center | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SecurityCenter/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SecurityCenter-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityCenter_1.0.0/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/) | -| Resource Management - Security DevOps | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.SecurityDevOps/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityDevOps_1.0.0-beta.1/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/) | -| Resource Management - Security Insights | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SecurityInsights/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SecurityInsights-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityInsights_1.0.0/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/) | -| Resource Management - Service Bus | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceBus-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.0.0/sdk/servicebus/Azure.ResourceManager.ServiceBus/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.1.0-beta.1/sdk/servicebus/Azure.ResourceManager.ServiceBus/) | -| Resource Management - Service Fabric | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabric/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabric-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabric_1.0.0/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/) | -| Resource Management - Service Fabric Managed Clusters | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabricManagedClusters-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.0.0/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/) | -| Resource Management - Service Linker | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceLinker/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceLinker-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceLinker_1.0.1/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/) | -| Resource Management - SignalR | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SignalR/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SignalR-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SignalR_1.0.0/sdk/signalr/Azure.ResourceManager.SignalR/) | +| Resource Management - Resource Mover | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ResourceMover/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ResourceMover-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceMover_1.0.1/sdk/resourcemover/Azure.ResourceManager.ResourceMover/) | +| Resource Management - Resourcehealth | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ResourceHealth/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceHealth_1.0.0-beta.1/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/) | +| Resource Management - Resources | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.Resources/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Resources-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Resources_1.4.0/sdk/resources/Azure.ResourceManager.Resources/) | +| Resource Management - Security | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.SecurityCenter/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SecurityCenter-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityCenter_1.1.0/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/) | +| Resource Management - Security DevOps | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.SecurityDevOps/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityDevOps_1.0.0-beta.2/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/) | +| Resource Management - Security Insights | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.SecurityInsights/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.SecurityInsights-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityInsights_1.0.1/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/) | +| Resource Management - Service Bus | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceBus-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.0.0/sdk/servicebus/Azure.ResourceManager.ServiceBus/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.1.0-beta.2/sdk/servicebus/Azure.ResourceManager.ServiceBus/) | +| Resource Management - Service Fabric | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabric/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabric-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabric_1.0.1/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/) | +| Resource Management - Service Fabric Managed Clusters | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabricManagedClusters-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.0.1/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/) | +| Resource Management - Service Linker | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.ServiceLinker/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceLinker-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceLinker_1.0.2/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/) | +| Resource Management - Servicenetworking | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceNetworking/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceNetworking_1.0.0-beta.1/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/) | +| Resource Management - SignalR | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.SignalR/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.SignalR-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SignalR_1.0.1/sdk/signalr/Azure.ResourceManager.SignalR/) | | Resource Management - Site Recovery | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServicesSiteRecovery/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServicesSiteRecovery_1.0.0-beta.2/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/) | | Resource Management - SQL | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.Sql/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Sql-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Sql_1.2.0/sdk/sqlmanagement/Azure.ResourceManager.Sql/) | -| Resource Management - SQL Virtual Machine | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SqlVirtualMachine/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SqlVirtualMachine-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SqlVirtualMachine_1.0.0/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/) | -| Resource Management - Storage | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Storage/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Storage-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Storage_1.1.0/sdk/storage/Azure.ResourceManager.Storage/) | -| Resource Management - Storage Cache | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.StorageCache/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageCache-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageCache_1.0.0/sdk/storagecache/Azure.ResourceManager.StorageCache/) | -| Resource Management - Storage Pool | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.StoragePool/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StoragePool-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StoragePool_1.0.0/sdk/storagepool/Azure.ResourceManager.StoragePool/) | -| Resource Management - Storage Sync | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.StorageSync/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageSync-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageSync_1.1.0/sdk/storagesync/Azure.ResourceManager.StorageSync/) | -| Resource Management - Storagemover | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.StorageMover/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageMover_1.0.0-beta.1/sdk/storagemover/Azure.ResourceManager.StorageMover/) | -| Resource Management - Stream Analytics | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.StreamAnalytics/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StreamAnalytics-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StreamAnalytics_1.1.0/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/) | -| Resource Management - Subscriptions | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Subscription/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Subscription-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Subscription_1.0.0/sdk/subscription/Azure.ResourceManager.Subscription/) | -| Resource Management - Support | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Support/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Support-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Support_1.0.0/sdk/support/Azure.ResourceManager.Support/) | -| Resource Management - Synapse | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Synapse/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Synapse-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Synapse_1.1.0/sdk/synapse/Azure.ResourceManager.Synapse/) | -| Resource Management - Traffic Manager | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.TrafficManager-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.0.0/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.1.0-beta.1/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/) | -| Resource Management - Web PubSub | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.WebPubSub/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.WebPubSub-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WebPubSub_1.0.0/sdk/webpubsub/Azure.ResourceManager.WebPubSub/) | -| Resource Management - Workload Monitor | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadMonitor/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadMonitor_1.0.0-beta.1/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/) | -| Resource Management - Workloads | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Workloads/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Workloads_1.0.0-beta.1/sdk/workloads/Azure.ResourceManager.Workloads/) | +| Resource Management - SQL Virtual Machine | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.SqlVirtualMachine/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.SqlVirtualMachine-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SqlVirtualMachine_1.0.1/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/) | +| Resource Management - Storage | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Storage/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Storage-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Storage_1.1.1/sdk/storage/Azure.ResourceManager.Storage/) | +| Resource Management - Storage Cache | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.StorageCache/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageCache-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageCache_1.1.0/sdk/storagecache/Azure.ResourceManager.StorageCache/) | +| Resource Management - Storage Mover | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.StorageMover/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageMover-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageMover_1.0.1/sdk/storagemover/Azure.ResourceManager.StorageMover/) | +| Resource Management - Storage Pool | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.StoragePool/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.StoragePool-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StoragePool_1.0.1/sdk/storagepool/Azure.ResourceManager.StoragePool/) | +| Resource Management - Storage Sync | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.StorageSync/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageSync-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageSync_1.1.1/sdk/storagesync/Azure.ResourceManager.StorageSync/) | +| Resource Management - Stream Analytics | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.StreamAnalytics/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.StreamAnalytics-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StreamAnalytics_1.1.1/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/) | +| Resource Management - Subscriptions | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Subscription/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Subscription-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Subscription_1.0.1/sdk/subscription/Azure.ResourceManager.Subscription/) | +| Resource Management - Support | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Support/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Support-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Support_1.0.1/sdk/support/Azure.ResourceManager.Support/) | +| Resource Management - Synapse | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Synapse/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Synapse-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Synapse_1.1.1/sdk/synapse/Azure.ResourceManager.Synapse/) | +| Resource Management - Traffic Manager | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.TrafficManager-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.0.0/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.1.0-beta.2/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/) | +| Resource Management - Voiceservices | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.VoiceServices/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VoiceServices_1.0.0-beta.1/sdk/voiceservices/Azure.ResourceManager.VoiceServices/) | +| Resource Management - Web PubSub | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.WebPubSub/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.WebPubSub-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WebPubSub_1.0.1/sdk/webpubsub/Azure.ResourceManager.WebPubSub/) | +| Resource Management - Workload Monitor | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadMonitor/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadMonitor_1.0.0-beta.2/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/) | +| Resource Management - Workloads | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.Workloads/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Workloads_1.0.0-beta.3/sdk/workloads/Azure.ResourceManager.Workloads/) | | Azure.Communication.Administration | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Communication.Administration/1.0.0-beta.3) | | | -| Azure.Communication.Calling | NuGet [1.0.0-beta.35](https://www.nuget.org/packages/Azure.Communication.Calling/1.0.0-beta.35) | | | +| Azure.Communication.Calling | NuGet [1.0.0-beta.36](https://www.nuget.org/packages/Azure.Communication.Calling/1.0.0-beta.36) | | | | Azure.Communication.CallingServer | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Communication.CallingServer/1.0.0-beta.3) | | | -| Azure.Communication.Email | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Email/1.0.0-beta.1) | | | -| Azure.Core.Expressions.DataFactory | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Core.Expressions.DataFactory/1.0.0-beta.1) | | | -| Azure.FX | NuGet [0.0.6-alpha](https://www.nuget.org/packages/Azure.FX/0.0.6-alpha) | | | -| Azure.IoT.TimeSeriesInsights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.IoT.TimeSeriesInsights/1.0.0-beta.1) | | | -| Azure.Quantum.Jobs | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Quantum.Jobs/1.0.0-beta.3) | | | +| Azure.Core.Expressions.DataFactory | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Core.Expressions.DataFactory/1.0.0-beta.2) | | | | Azure.Storage.DataMovement.Blobs | NuGet [12.0.0-beta.1](https://www.nuget.org/packages/Azure.Storage.DataMovement.Blobs/12.0.0-beta.1) | | | -| Functions extension for Application Insights | NuGet [1.0.0-preview4](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ApplicationInsights/1.0.0-preview4) | | | -| Functions extension for Authentication Events | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/1.0.0-beta.2) | | | -| Functions extension for Azure SQL and SQL Server | NuGet [1.0.84-preview](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Sql/1.0.84-preview) | | | -| Functions extension for Storage Timers | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Timers.Storage/1.0.0-beta.1) | | | +| IoT Edge Function | NuGet [3.5.3](https://www.nuget.org/packages/Microsoft.Azure.IoT.Edge.Function/3.5.3) | | | | IoT Models Repository | NuGet [1.0.0-preview.5](https://www.nuget.org/packages/Azure.IoT.ModelsRepository/1.0.0-preview.5) | | | | Management - Purview | NuGet [1.0.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Purview/1.0.1) | | | -| Microsoft.Azure.Cosmos.Encryption.Custom | NuGet [1.0.0-preview04](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption.Custom/1.0.0-preview04) | | | -| Microsoft.Azure.Cosmos.Templates | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Templates/1.0.0) | | | | Microsoft.Azure.Devices.Authentication | NuGet [2.0.0-preview001](https://www.nuget.org/packages/Microsoft.Azure.Devices.Authentication/2.0.0-preview001) | | | -| Microsoft.Azure.Functions.Analyzers | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Analyzers/1.0.0) | | | -| Microsoft.Azure.Functions.Authentication.WebAssembly | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Authentication.WebAssembly/1.0.0)
NuGet [1.0.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Functions.Authentication.WebAssembly/1.0.1-preview) | | | -| Microsoft.Azure.Functions.Worker.ApplicationInsights | NuGet [1.0.0-preview3](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ApplicationInsights/1.0.0-preview3) | | | -| Microsoft.Azure.Functions.Worker.Core | NuGet [1.8.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Core/1.8.0)
NuGet [1.9.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Core/1.9.0-preview2) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Abstractions | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Abstractions/1.1.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.ApplicationInsights | NuGet [1.0.0-preview4](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.ApplicationInsights/1.0.0-preview4) | | | -| Microsoft.Azure.Functions.Worker.Extensions.CosmosDB | NuGet [4.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.CosmosDB/4.0.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.DurableTask | NuGet [1.0.0-rc.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.DurableTask/1.0.0-rc.1) | | | -| Microsoft.Azure.Functions.Worker.Extensions.EventGrid | NuGet [3.2.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.EventGrid/3.2.1) | | | -| Microsoft.Azure.Functions.Worker.Extensions.EventHubs | NuGet [5.1.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.EventHubs/5.1.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Http | NuGet [3.0.13](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http/3.0.13) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Kafka | NuGet [3.6.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Kafka/3.6.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.OpenApi | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/1.4.0)
NuGet [2.0.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/2.0.0-preview1) | | | -| Microsoft.Azure.Functions.Worker.Extensions.RabbitMQ | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.RabbitMQ/1.1.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.SendGrid | NuGet [3.0.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.SendGrid/3.0.2) | | | -| Microsoft.Azure.Functions.Worker.Extensions.ServiceBus | NuGet [5.7.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.ServiceBus/5.7.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.SignalRService | NuGet [1.7.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.SignalRService/1.7.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Sql | NuGet [1.0.84-preview](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Sql/1.0.84-preview) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Storage | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage/5.0.1) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs/5.0.1) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues | NuGet [5.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues/5.0.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Storage.Tables | NuGet [1.0.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage.Tables/1.0.0-preview1) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Tables | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Tables/1.0.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Timer | NuGet [4.1.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Timer/4.1.0) | | | -| Microsoft.Azure.Functions.Worker.Extensions.Warmup | NuGet [4.0.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Warmup/4.0.2) | | | -| Microsoft.Azure.Functions.Worker.Grpc | NuGet [1.6.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Grpc/1.6.0)
NuGet [1.7.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Grpc/1.7.0-preview2) | | | -| Microsoft.Azure.Functions.Worker.ItemTemplates | NuGet [4.0.2288](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates/4.0.2288) | | | -| Microsoft.Azure.Functions.Worker.ProjectTemplates | NuGet [4.0.2288](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ProjectTemplates/4.0.2288) | | | -| Microsoft.Azure.Functions.Worker.Sdk.Analyzers | NuGet [1.1.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Analyzers/1.1.1) | | | -| Microsoft.Azure.Functions.Worker.Sdk.Generators | NuGet [1.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Generators/1.0.0-preview2) | | | -| Microsoft.Azure.IoT.Edge.Function | NuGet [3.5.3](https://www.nuget.org/packages/Microsoft.Azure.IoT.Edge.Function/3.5.3) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Kusto | NuGet [1.0.5-Preview](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Kusto/1.0.5-Preview) | | | | Microsoft.Azure.IoT.Edge.Module | NuGet [3.2.0](https://www.nuget.org/packages/Microsoft.Azure.IoT.Edge.Module/3.2.0) | | | -| Microsoft.Azure.Management.ChangeAnalysis | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.ChangeAnalysis/1.0.0) | | | -| Microsoft.Azure.Management.Chaos | NuGet [0.9.15-preview.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Chaos/0.9.15-preview.1) | | | -| Microsoft.Azure.Management.DataProtection.Backup | NuGet [2.1.0](https://www.nuget.org/packages/Microsoft.Azure.Management.DataProtection.Backup/2.1.0) | | | -| Microsoft.Azure.Management.DeviceUpdate | NuGet [1.0.1-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Management.DeviceUpdate/1.0.1-beta.1) | | | -| Microsoft.Azure.Management.Elastic | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Elastic/1.0.0-beta.1) | | | -| Microsoft.Azure.Management.ExtendedLocation | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.ExtendedLocation/1.0.0) | | | -| Microsoft.Azure.Management.Kubernetes | NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Kubernetes/1.1.0-beta.1) | | | -| Microsoft.Azure.Management.KubernetesConfiguration | NuGet [2.1.0](https://www.nuget.org/packages/Microsoft.Azure.Management.KubernetesConfiguration/2.1.0) | | | | Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Authorization | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Authorization/1.0.0) | | | | Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Commerce | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Commerce/1.0.0) | | | | Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Compute | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Compute/1.0.0) | | | @@ -310,17 +278,20 @@ | Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Storage | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Storage/1.0.0) | | | | Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Subscription | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Subscription/1.0.0) | | | | Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Websites | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2020_09_01.Websites/1.0.0) | | | -| Microsoft.Azure.Management.ProviderHub | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Management.ProviderHub/1.0.0-beta.1) | | | -| Microsoft.Azure.Management.Quantum | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Microsoft.Azure.Management.Quantum/1.0.0-beta.2) | | | -| Microsoft.Azure.Management.Quota | NuGet [1.0.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Quota/1.0.0-preview) | | | -| Microsoft.Azure.Management.ServiceFabricManagedClusters | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.ServiceFabricManagedClusters/1.0.0) | | | | Microsoft.Azure.Management.StoragePool | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.StoragePool/1.0.0) | | | -| Microsoft.Azure.Management.VideoAnalyzer | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Microsoft.Azure.Management.VideoAnalyzer/1.0.0-beta.3) | | | -| Microsoft.Azure.ServiceBus.EventProcessorHost | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.ServiceBus.EventProcessorHost/5.0.1) | | | -| Microsoft.Azure.SignalR.Emulator | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Emulator/1.1.0)
NuGet [1.0.0-preview1-10809](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Emulator/1.0.0-preview1-10809) | | | +| Microsoft.Azure.WebJobs.CosmosDb.ChangeProcessor | NuGet [1.0.4](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.CosmosDb.ChangeProcessor/1.0.4) | | | | Microsoft.Azure.WebPubSub.AspNetCore | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Microsoft.Azure.WebPubSub.AspNetCore/1.0.0-beta.4) | | | | Microsoft.Azure.WebPubSub.Common | NuGet [1.2.0](https://www.nuget.org/packages/Microsoft.Azure.WebPubSub.Common/1.2.0) | | | | Purview Share | NuGet [1.0.3-beta.20](https://www.nuget.org/packages/Azure.Analytics.Purview.Share/1.0.3-beta.20) | | | +| Quantum Jobs | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Quantum.Jobs/1.0.0-beta.3) | | | +| Service Bus Event Processor Host | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.ServiceBus.EventProcessorHost/5.0.1) | | | +| Time Series Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.IoT.TimeSeriesInsights/1.0.0-beta.1) | | | +| Unknown Display Name | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Analytics.Purview.Sharing/1.0.0-beta.2) | | | +| Unknown Display Name | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Kafka.SchemaRegistry.Avro/1.0.0-beta.1) | | | +| Unknown Display Name | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Kafka.SchemaRegistry.Json/1.0.0-beta.1) | | | +| Unknown Display Name | NuGet [1.0.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.CosmosDb.ChangeProcessor/1.0.2) | | | +| Unknown Display Name | NuGet [1.0.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.CosmosDb.Mongo/1.0.2) | | | +| Active Directory Authentication Library | NuGet [1.6.2](https://www.nuget.org/packages/Microsoft.Azure.Services.AppAuthentication/1.6.2) | | | | Anomaly Detector | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.AnomalyDetector/1.0.0) | | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.AnomalyDetector_1.0.0-preview.1/sdk/cognitiveservices/AnomalyDetector) | | App Configuration Provider | NuGet [5.2.0](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.AzureAppConfiguration/5.2.0)
NuGet [5.3.0-preview](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.AzureAppConfiguration/5.3.0-preview) | | GitHub [5.2.0](https://github.com/Azure/AppConfiguration-DotnetProvider) | | App Service | NuGet [0.2.2-alpha](https://www.nuget.org/packages/Microsoft.Azure.AppService/0.2.2-alpha) | | | @@ -330,25 +301,15 @@ | Application Insights - Query | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.ApplicationInsights.Query/1.0.0) | | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/applicationinsights/Microsoft.Azure.ApplicationInsights.Query) | | Attestation | NuGet [0.10.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Attestation/0.10.0-preview) | | GitHub [0.10.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Attestation_0.10.0-preview/sdk/attestation/Microsoft.Azure.Attestation/) | | Auto Suggest | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.AutoSuggest/2.0.0) | | | +| Auto Suggest | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingAutoSuggest/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingAutoSuggest_2.1.0-preview.1/sdk/cognitiveservices/Search.BingAutoSuggest) | | AutoRest Common | NuGet [2.4.48](https://www.nuget.org/packages/Microsoft.AutoRest.Common/2.4.48) | | GitHub [2.4.48](https://github.com/Azure/autorest.common) | -| Azure Active Directory - App Authentication | NuGet [1.6.2](https://www.nuget.org/packages/Microsoft.Azure.Services.AppAuthentication/1.6.2) | | | -| Azure Monitor Exporter for OpenTelemetry | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.OpenTelemetry.Exporter.AzureMonitor/1.0.0-beta.1) | | | | Azure Stack - Azure Consistent Storage | NuGet [0.10.8-preview](https://www.nuget.org/packages/Microsoft.AzureStack.AzureConsistentStorage/0.10.8-preview) | | | +| Azure.FX | NuGet [0.0.21-alpha](https://www.nuget.org/packages/Azure.FX/0.0.21-alpha) | | | +| Azure.FX.Templates | NuGet [1.2.0](https://www.nuget.org/packages/Azure.FX.Templates/1.2.0) | | | | Batch | NuGet [15.4.0](https://www.nuget.org/packages/Microsoft.Azure.Batch/15.4.0) | | GitHub [15.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Batch_15.4.0/sdk/batch/Microsoft.Azure.Batch/) | | Batch - Apps Cryptography | NuGet [1.1.1.4](https://www.nuget.org/packages/Microsoft.Azure.Batch.Apps.Cryptography/1.1.1.4) | | | | Batch - Conventions Files | NuGet [4.0.0](https://www.nuget.org/packages/Microsoft.Azure.Batch.Conventions.Files/4.0.0) | | GitHub [4.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Batch.Conventions.Files_4.0.0/sdk/batch/Microsoft.Azure.Batch.Conventions.Files/) | | Batch - File Staging | NuGet [9.0.0](https://www.nuget.org/packages/Microsoft.Azure.Batch.FileStaging/9.0.0) | | GitHub [9.0.0](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/batch/Microsoft.Azure.Batch.FileStaging) | -| Bing Autosuggest | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingAutoSuggest/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingAutoSuggest_2.1.0-preview.1/sdk/cognitiveservices/Search.BingAutoSuggest) | -| Bing Custom Image Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomImageSearch) | -| Bing Custom Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomSearch) | -| Bing Entity Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingEntitySearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingEntitySearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingEntitySearch) | -| Bing Image Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingImageSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingImageSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingImageSearch) | -| Bing Local Search | NuGet [1.0.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingLocalSearch/1.0.0-preview.1) | | GitHub [1.0.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingLocalSearch_1.0.0-preview.1/sdk/cognitiveservices/Search.BingLocalSearch) | -| Bing News Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingNewsSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingNewsSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingNewsSearch) | -| Bing Video Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingVideoSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingVideoSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingVideoSearch) | -| Bing Visual Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingVisualSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingVisualSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingVisualSearch) | -| Bing Web Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingWebSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingWebSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingWebSearch) | -| Blobs | NuGet [11.2.3](https://www.nuget.org/packages/Microsoft.Azure.Storage.Blob/11.2.3) | | GitHub [11.2.3](https://github.com/Azure/azure-storage-net/tree/master/Blob) | | Client Runtime | NuGet [2.3.24](https://www.nuget.org/packages/Microsoft.Rest.ClientRuntime/2.3.24) | | GitHub [2.3.24](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Rest.ClientRuntime_2.3.21/sdk/mgmtcommon/ClientRuntime) | | Client Runtime - Azure | NuGet [3.3.19](https://www.nuget.org/packages/Microsoft.Rest.ClientRuntime.Azure/3.3.19) | | GitHub [3.3.19](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/mgmtcommon/ClientRuntime.Azure) | | Client Runtime - Azure Authentication | NuGet [2.4.1](https://www.nuget.org/packages/Microsoft.Rest.ClientRuntime.Azure.Authentication/2.4.1) | | GitHub [2.4.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Rest.ClientRuntime.Azure.Authentication_2.4.1/sdk/mgmtcommon/Auth/Az.Auth/Az.Authentication) | @@ -364,66 +325,62 @@ | Configuration Manager | NuGet [4.0.0](https://www.nuget.org/packages/Microsoft.Azure.ConfigurationManager/4.0.0) | | | | Container Registry | NuGet [1.0.0-preview.2](https://www.nuget.org/packages/Microsoft.Azure.ContainerRegistry/1.0.0-preview.2) | | GitHub [1.0.0-preview.2](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.ContainerRegistry_1.0.0-preview.2/sdk/containerregistry/Microsoft.Azure.ContainerRegistry/) | | Content Moderator | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.ContentModerator/2.0.0) | | | -| Cosmos DB | NuGet [3.31.2](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.2) | [docs](/dotnet/api/overview/azure/cosmosdb) | GitHub [3.31.2](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/3.12.0/Microsoft.Azure.Cosmos) | -| Cosmos DB - BulkExecutor | NuGet [2.5.1-preview](https://www.nuget.org/packages/Microsoft.Azure.CosmosDB.BulkExecutor/2.5.1-preview) | | GitHub [2.5.1-preview](https://github.com/Azure/azure-cosmosdb-bulkexecutor-dotnet-getting-started) | -| Cosmos DB - Direct | NuGet [3.30.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Direct/3.30.1) | | GitHub [3.30.1](https://github.com/Azure/azure-cosmos-dotnet-v3) | -| Cosmos DB - Encryption | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.0.0) | | GitHub [2.0.0](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/releases/encryption/1.0.0-preview4/Microsoft.Azure.Cosmos.Encryption) | +| Cosmos DB | NuGet [3.32.3](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.3) | [docs](/dotnet/api/overview/azure/cosmosdb) | GitHub [3.32.3](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/3.12.0/Microsoft.Azure.Cosmos) | +| Cosmos DB | NuGet [2.19.0](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB/2.19.0) | | GitHub [2.19.0](https://github.com/Azure/azure-cosmos-dotnet-v2) | +| Custom Image Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomImageSearch) | | Custom Image Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.CustomImageSearch/2.0.0) | | | +| Custom Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomSearch) | | Custom Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.CustomSearch/2.0.0) | | | | Custom Vision Prediction | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction/2.0.0) | | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction_2.0.0/sdk/cognitiveservices/Vision.CustomVision.Prediction) | | Custom Vision Training | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training/2.0.0)
NuGet [2.1.0-preview](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training/2.1.0-preview) | | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training_2.0.0/sdk/cognitiveservices/Vision.CustomVision.Training) | | Data Lake Analytics | NuGet [1.4.211011](https://www.nuget.org/packages/Microsoft.Azure.DataLake.USQL.SDK/1.4.211011) | | | -| Data Lake Storage | NuGet [1.2.5-alpha](https://www.nuget.org/packages/Microsoft.Azure.DataLake.Store/1.2.5-alpha) | [docs](/dotnet/api/overview/azure/data-lake-store) | GitHub [1.2.5-alpha](https://github.com/Azure/azure-data-lake-store-net/tree/1.2.3-alpha) | | Data Movement | NuGet [2.0.4](https://www.nuget.org/packages/Microsoft.Azure.Storage.DataMovement/2.0.4) | | GitHub [2.0.4](https://github.com/Azure/azure-storage-net-data-movement/tree/v1.3.0) | | DCAP | NuGet [1.11.2](https://www.nuget.org/packages/Microsoft.Azure.DCAP/1.11.2) | | GitHub [1.11.2](https://github.com/microsoft/Azure-DCAP-Client/tree/1.6) | -| Devices Client | NuGet [1.41.2](https://www.nuget.org/packages/Microsoft.Azure.Devices.Client/1.41.2)
NuGet [2.0.0-preview002](https://www.nuget.org/packages/Microsoft.Azure.Devices.Client/2.0.0-preview002) | | | -| Document DB | NuGet [2.18.0](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB/2.18.0) | | GitHub [2.18.0](https://github.com/Azure/azure-cosmos-dotnet-v2) | -| Document DB - Change Feed Processor | NuGet [2.4.0](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB.ChangeFeedProcessor/2.4.0) | | GitHub [2.4.0](https://github.com/Azure/azure-documentdb-changefeedprocessor-dotnet/tree/master) | -| Document DB - Core | NuGet [2.18.0](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB.Core/2.18.0) | | GitHub [2.18.0](https://github.com/Azure/azure-cosmos-dotnet-v2) | +| Digital Twins Client | NuGet [1.0.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.DigitalTwin.Client/1.0.0-preview-001) | | | +| Digital Twins Service | NuGet [1.0.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.DigitalTwin.Service/1.0.0-preview-001) | | | +| Document DB - Core | NuGet [2.19.0](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB.Core/2.19.0) | | GitHub [2.19.0](https://github.com/Azure/azure-cosmos-dotnet-v2) | +| Entity Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingEntitySearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingEntitySearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingEntitySearch) | | Entity Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.EntitySearch/2.0.0) | | | | Event Grid | NuGet [3.2.1](https://www.nuget.org/packages/Microsoft.Azure.EventGrid/3.2.1) | [docs](/dotnet/api/overview/azure/eventgrid) | GitHub [3.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.EventGrid_3.2.1/sdk/eventgrid/Microsoft.Azure.EventGrid/) | | Event Hubs | NuGet [4.3.2](https://www.nuget.org/packages/Microsoft.Azure.EventHubs/4.3.2) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.EventHubs-readme) | GitHub [4.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.EventHubs_4.3.2/sdk/eventhub/Microsoft.Azure.EventHubs/) | | Event Hubs - Event Processor | NuGet [4.3.2](https://www.nuget.org/packages/Microsoft.Azure.EventHubs.Processor/4.3.2) | | GitHub [4.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.EventHubs.Processor_4.3.2/sdk/eventhub/Microsoft.Azure.EventHubs.Processor/) | | Event Hubs - Service Fabric Processor | NuGet [0.5.4](https://www.nuget.org/packages/Microsoft.Azure.EventHubs.ServiceFabricProcessor/0.5.4) | | GitHub [0.5.4](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.EventHubs.ServiceFabricProcessor_0.5.4/sdk/eventhub/Microsoft.Azure.EventHubs.ServiceFabricProcessor/) | -| Extensions - Caching Cosmos | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Cosmos/1.4.0) | | GitHub [1.4.0](https://github.com/Azure/Microsoft.Extensions.Caching.Cosmos/tree/v1.0.0-preview4) | | Face | NuGet [2.8.0-preview.3](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.Face/2.8.0-preview.3) | | GitHub [2.8.0-preview.3](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Vision.Face_2.6.0-preview.1/sdk/cognitiveservices/Vision.Face) | -| File Shares | NuGet [11.2.3](https://www.nuget.org/packages/Microsoft.Azure.Storage.File/11.2.3) | | GitHub [11.2.3](https://github.com/Azure/azure-storage-net/tree/master/File) | | Form Recognizer | NuGet [0.8.0-preview](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.FormRecognizer/0.8.0-preview) | | GitHub [0.8.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/cognitiveservices/FormRecognizer) | | Functions - Extensions | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Extensions/1.1.0) | | GitHub [1.1.0](https://github.com/Azure/azure-functions-dotnet-extensions) | | Functions extension for Azure Mobile Apps | NuGet [3.0.0-beta8](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.MobileApps/3.0.0-beta8) | | GitHub [3.0.0-beta8](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.0-beta8/src/WebJobs.Extensions.MobileApps) | -| Functions extension for Blob Storage | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/5.0.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs-readme) | | -| Functions extension for Cosmos DB | NuGet [4.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.CosmosDB/4.0.0) | | GitHub [4.0.0](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/cosmos-v3.0.7/src/WebJobs.Extensions.CosmosDB) | +| Functions extension for Blob Storage | NuGet [5.1.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/5.1.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs-readme) | | +| Functions extension for Cosmos DB | NuGet [4.2.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.CosmosDB/4.2.0) | | GitHub [4.2.0](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/cosmos-v3.0.7/src/WebJobs.Extensions.CosmosDB) | | Functions extension for DocumentDB | NuGet [1.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DocumentDB/1.3.0) | | GitHub [1.3.0](https://github.com/Azure/azure-webjobs-sdk-extensions) | -| Functions extension for Durable Task Framework | NuGet [2.9.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask/2.9.0) | [docs](/dotnet/api/overview/azure/functions) | GitHub [2.9.0](https://github.com/Azure/azure-functions-durable-extension/tree/v2.2.2/src/WebJobs.Extensions.DurableTask) | +| Functions extension for Durable Task Framework | NuGet [2.9.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask/2.9.3) | [docs](/dotnet/api/overview/azure/functions) | GitHub [2.9.3](https://github.com/Azure/azure-functions-durable-extension/tree/v2.2.2/src/WebJobs.Extensions.DurableTask) | | Functions extension for HTTP | NuGet [3.2.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Http/3.2.0) | | GitHub [3.2.0](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.2/src/WebJobs.Extensions.Http) | | Functions extension for IoT Edge | NuGet [1.0.7](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EdgeHub/1.0.7) | | GitHub [1.0.7](https://github.com/Azure/iotedge/tree/1.0.7/edge-hub) | | Functions extension for Kafka | NuGet [3.8.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Kafka/3.8.0) | | GitHub [3.8.0](https://github.com/Azure/azure-functions-kafka-extension/tree/3.0.0/src/Microsoft.Azure.WebJobs.Extensions.Kafka) | | Functions extension for Notification Hubs | NuGet [1.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.NotificationHubs/1.3.0) | | GitHub [1.3.0](https://github.com/Azure/azure-webjobs-sdk-extensions) | | Functions extension for RabbitMQ | NuGet [2.0.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.RabbitMQ/2.0.3) | | GitHub [2.0.3](https://github.com/Azure/azure-functions-rabbitmq-extension/tree/v0.2.2029-beta) | | Functions extension for script abstractions | NuGet [1.0.0-preview](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Script.Abstractions/1.0.0-preview) | | | -| Functions extension for SendGrid | NuGet [3.0.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SendGrid/3.0.2) | | GitHub [3.0.2](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.0/src/WebJobs.Extensions.SendGrid) | -| Functions extension for Sources | NuGet [3.0.33](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Sources/3.0.33) | | GitHub [3.0.33](https://github.com/Azure/azure-webjobs-sdk) | -| Functions extension for Storage Queues | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/5.0.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage.Queues-readme) | | +| Functions extension for SendGrid | NuGet [3.0.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SendGrid/3.0.3) | | GitHub [3.0.3](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.0/src/WebJobs.Extensions.SendGrid) | +| Functions extension for Sources | NuGet [3.0.37](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Sources/3.0.37) | | GitHub [3.0.37](https://github.com/Azure/azure-webjobs-sdk) | +| Functions extension for Storage Queues | NuGet [5.1.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/5.1.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage.Queues-readme) | | | Functions extension for Twilio | NuGet [3.0.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Twilio/3.0.2) | | GitHub [3.0.2](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.0/src/WebJobs.Extensions.Twilio) | | Functions extension metadata generator | NuGet [4.0.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator/4.0.1) | | GitHub [4.0.1](https://github.com/Azure/azure-functions-host) | -| Functions item template pack for Microsoft Template Engine | NuGet [4.0.2288](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ItemTemplates/4.0.2288) | | GitHub [4.0.2288](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | -| Functions OpenAPI app settings deserialization library | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Configuration.AppSettings/1.4.0)
NuGet [2.0.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Configuration.AppSettings/2.0.0-preview1) | | | -| Functions OpenAPI document and Swagger UI renderer library | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/1.4.0)
NuGet [2.0.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/2.0.0-preview1) | | | -| Functions project template pack for Microsoft Template Engine | NuGet [4.0.2288](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ProjectTemplates/4.0.2288) | | GitHub [4.0.2288](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | -| Functions runtime assemblies for App Insights logging | NuGet [3.0.33](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging.ApplicationInsights/3.0.33) | | GitHub [3.0.33](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18/src/Microsoft.Azure.WebJobs.Logging.ApplicationInsights) | -| Functions runtime assemblies for logging | NuGet [4.0.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging/4.0.2) | | GitHub [4.0.2](https://github.com/Azure/azure-webjobs-sdk/tree/dev/src/Microsoft.Azure.WebJobs.Logging) | -| Functions runtime assemblies for Microsoft.Azure.WebJobs.Host | NuGet [3.0.33](https://www.nuget.org/packages/Microsoft.Azure.WebJobs/3.0.33) | | GitHub [3.0.33](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18/src/Microsoft.Azure.WebJobs) | -| Functions timers and file triggers | NuGet [4.0.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions/4.0.1)
NuGet [5.0.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions/5.0.0-beta.1) | | GitHub [4.0.1](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/dev/src/WebJobs.Extensions) | +| Functions item template pack for Microsoft Template Engine | NuGet [4.0.2408](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ItemTemplates/4.0.2408) | | GitHub [4.0.2408](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | +| Functions OpenAPI app settings deserialization library | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Configuration.AppSettings/1.4.0)
NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Configuration.AppSettings/2.0.0-preview2) | | | +| Functions OpenAPI document and Swagger UI renderer library | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/1.4.0)
NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/2.0.0-preview2) | | | +| Functions project template pack for Microsoft Template Engine | NuGet [4.0.2408](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ProjectTemplates/4.0.2408) | | GitHub [4.0.2408](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | +| Functions runtime assemblies for App Insights logging | NuGet [3.0.35](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging.ApplicationInsights/3.0.35) | | GitHub [3.0.35](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18/src/Microsoft.Azure.WebJobs.Logging.ApplicationInsights) | +| Functions runtime assemblies for logging | NuGet [4.0.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging/4.0.3) | | GitHub [4.0.3](https://github.com/Azure/azure-webjobs-sdk/tree/dev/src/Microsoft.Azure.WebJobs.Logging) | +| Functions runtime assemblies for Microsoft.Azure.WebJobs.Host | NuGet [3.0.37](https://www.nuget.org/packages/Microsoft.Azure.WebJobs/3.0.37) | | GitHub [3.0.37](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18/src/Microsoft.Azure.WebJobs) | +| Functions timers and file triggers | NuGet [5.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions/5.0.0) | | GitHub [5.0.0](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/dev/src/WebJobs.Extensions) | | Gallery | NuGet [2.6.2-preview](https://www.nuget.org/packages/Microsoft.Azure.Gallery/2.6.2-preview) | | | | Graph RBAC | NuGet [3.8.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Graph.RBAC/3.8.0-preview) | | GitHub [3.8.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/graphrbac) | | Hadoop Client | NuGet [1.5.13](https://www.nuget.org/packages/Microsoft.Hadoop.Client/1.5.13) | | | | HDInsight - Job | NuGet [3.0.0-preview.3](https://www.nuget.org/packages/Microsoft.Azure.HDInsight.Job/3.0.0-preview.3) | | GitHub [3.0.0-preview.3](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.HDInsight.Job_3.0.0-preview.3/sdk/hdinsight/Microsoft.Azure.HDInsight.Job/) | -| Hyak Common | NuGet [1.2.2](https://www.nuget.org/packages/Hyak.Common/1.2.2) | | | -| Hyak Common - Tracing Etw | NuGet [1.0.2](https://www.nuget.org/packages/Hyak.Common.Tracing.Etw/1.0.2) | | | -| Hyak Common - Tracing Log4Net | NuGet [1.0.2](https://www.nuget.org/packages/Hyak.Common.Tracing.Log4Net/1.0.2) | | | +| Image Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingImageSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingImageSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingImageSearch) | | Image Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.ImageSearch/2.0.0) | | | | Information Protection | NuGet [1.7.147](https://www.nuget.org/packages/Microsoft.InformationProtection.File/1.7.147) | | | | Insights | NuGet [0.16.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Insights/0.16.0-preview) | | | +| IoT Plug and Play - Devices Client | NuGet [1.41.2](https://www.nuget.org/packages/Microsoft.Azure.Devices.Client/1.41.2)
NuGet [2.0.0-preview004](https://www.nuget.org/packages/Microsoft.Azure.Devices.Client/2.0.0-preview004) | | | | Jobs | NuGet [0.3.2-beta](https://www.nuget.org/packages/Microsoft.Azure.Jobs/0.3.2-beta) | | GitHub [0.3.2-beta](https://github.com/Azure/azure-webjobs-sdk) | | Jobs - Core | NuGet [0.3.2-beta](https://www.nuget.org/packages/Microsoft.Azure.Jobs.Core/0.3.2-beta) | | GitHub [0.3.2-beta](https://github.com/Azure/azure-webjobs-sdk) | | Jobs - Service Bus | NuGet [0.3.2-beta](https://www.nuget.org/packages/Microsoft.Azure.Jobs.ServiceBus/0.3.2-beta) | | GitHub [0.3.2-beta](https://github.com/Azure/azure-webjobs-sdk) | @@ -436,39 +393,39 @@ | Kinect Developer Kit | NuGet [1.4.1](https://www.nuget.org/packages/Microsoft.Azure.Kinect.Sensor/1.4.1) | | GitHub [1.4.1](https://github.com/Microsoft/Azure-Kinect-Sensor-SDK) | | Kusto Data | NuGet [9.3.1](https://www.nuget.org/packages/Microsoft.Azure.Kusto.Data/9.3.1) | [docs](/azure/data-explorer/kusto/api/netfx/about-kusto-data) | GitHub [9.3.1](https://github.com/Azure/azure-kusto-dotnet) | | Kusto Ingest | NuGet [9.3.1](https://www.nuget.org/packages/Microsoft.Azure.Kusto.Ingest/9.3.1) | [docs](/azure/data-explorer/kusto/api/netfx/about-kusto-ingest) | GitHub [9.3.1](https://github.com/Azure/azure-kusto-dotnet) | +| Local Search | NuGet [1.0.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingLocalSearch/1.0.0-preview.1) | | GitHub [1.0.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingLocalSearch_1.0.0-preview.1/sdk/cognitiveservices/Search.BingLocalSearch) | | Local Search | NuGet [0.9.0-preview](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.LocalSearch/0.9.0-preview) | | | +| Log Analytics - Query | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.OperationalInsights/1.1.0) | | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/operationalinsights/Microsoft.Azure.OperationalInsights) | | LUIS Authoring | NuGet [3.1.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring/3.1.0)
NuGet [3.2.0-preview.5](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring/3.2.0-preview.5) | | GitHub [3.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring_3.2.0-preview.3/sdk/cognitiveservices/Language.LUIS.Authoring) | | LUIS Runtime | NuGet [3.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime/3.1.0-preview.1) | | GitHub [3.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime_3.1.0-preview.1/sdk/cognitiveservices/Language.LUIS.Runtime) | | Media Live Video Analytics Edge | NuGet [1.0.4-preview.1](https://www.nuget.org/packages/Microsoft.Azure.Media.LiveVideoAnalytics.Edge/1.0.4-preview.1) | | GitHub [1.0.4-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Media.LiveVideoAnalytics.Edge_1.0.4-preview.1/sdk/mediaservices/Microsoft.Azure.Media.LiveVideoAnalytics.Edge) | -| Microsoft.Azure.Amqp | NuGet [2.6.1](https://www.nuget.org/packages/Microsoft.Azure.Amqp/2.6.1) | | | -| Microsoft.Azure.Devices | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Devices/1.38.1)
NuGet [2.0.0-preview002](https://www.nuget.org/packages/Microsoft.Azure.Devices/2.0.0-preview002) | | | +| Microsoft.Azure.Amqp | NuGet [2.6.2](https://www.nuget.org/packages/Microsoft.Azure.Amqp/2.6.2) | | | +| Microsoft.Azure.Devices | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Devices/1.38.1)
NuGet [2.0.0-preview004](https://www.nuget.org/packages/Microsoft.Azure.Devices/2.0.0-preview004) | | | | Microsoft.Azure.Devices.Client.PCL | NuGet [1.0.16](https://www.nuget.org/packages/Microsoft.Azure.Devices.Client.PCL/1.0.16) | | | -| Microsoft.Azure.Devices.DigitalTwin.Client | NuGet [1.0.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.DigitalTwin.Client/1.0.0-preview-001) | | | -| Microsoft.Azure.Devices.DigitalTwin.Service | NuGet [1.0.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.DigitalTwin.Service/1.0.0-preview-001) | | | | Microsoft.Azure.Devices.ProtocolGateway.Core | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.ProtocolGateway.Core/2.0.1) | | | | Microsoft.Azure.Devices.ProtocolGateway.IotHubClient | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.ProtocolGateway.IotHubClient/2.0.1) | | | | Microsoft.Azure.Devices.ProtocolGateway.Providers.CloudStorage | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.ProtocolGateway.Providers.CloudStorage/2.0.1) | | | -| Microsoft.Azure.Devices.Provisioning.Client | NuGet [1.19.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Client/1.19.1)
NuGet [2.0.0-preview002](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Client/2.0.0-preview002) | | | +| Microsoft.Azure.Devices.Provisioning.Client | NuGet [1.19.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Client/1.19.1)
NuGet [2.0.0-preview004](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Client/2.0.0-preview004) | | | | Microsoft.Azure.Devices.Provisioning.Security.Tpm | NuGet [1.14.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Security.Tpm/1.14.1)
NuGet [1.15.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Security.Tpm/1.15.0-preview-001) | | | -| Microsoft.Azure.Devices.Provisioning.Service | NuGet [1.18.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Service/1.18.1)
NuGet [2.0.0-preview002](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Service/2.0.0-preview002) | | | +| Microsoft.Azure.Devices.Provisioning.Service | NuGet [1.18.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Service/1.18.1)
NuGet [2.0.0-preview004](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Service/2.0.0-preview004) | | | | Microsoft.Azure.Devices.Provisioning.Transport.Amqp | NuGet [1.16.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Transport.Amqp/1.16.1)
NuGet [1.17.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Transport.Amqp/1.17.0-preview-001) | | | | Microsoft.Azure.Devices.Provisioning.Transport.Http | NuGet [1.15.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Transport.Http/1.15.1)
NuGet [1.16.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Transport.Http/1.16.0-preview-001) | | | | Microsoft.Azure.Devices.Provisioning.Transport.Mqtt | NuGet [1.17.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Transport.Mqtt/1.17.1)
NuGet [1.18.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.Provisioning.Transport.Mqtt/1.18.0-preview-001) | | | | Microsoft.Azure.Devices.Shared | NuGet [1.30.1](https://www.nuget.org/packages/Microsoft.Azure.Devices.Shared/1.30.1)
NuGet [1.31.0-preview-001](https://www.nuget.org/packages/Microsoft.Azure.Devices.Shared/1.31.0-preview-001) | | | -| Microsoft.Azure.Functions.Worker | NuGet [1.10.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker/1.10.0)
NuGet [1.11.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker/1.11.0-preview2) | | | -| Microsoft.Azure.Functions.Worker.Sdk | NuGet [1.7.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/1.7.0)
NuGet [1.8.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/1.8.0-preview2) | | | +| Microsoft.Azure.Functions.Worker | NuGet [1.13.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker/1.13.0) | | | +| Microsoft.Azure.Functions.Worker.Sdk | NuGet [1.9.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/1.9.0) | | | | Microsoft.Azure.uamqp | NuGet [1.2.11](https://www.nuget.org/packages/Microsoft.Azure.uamqp/1.2.11) | | | | Microsoft.Azure.umqtt | NuGet [1.1.11](https://www.nuget.org/packages/Microsoft.Azure.umqtt/1.1.11) | | | | Mobile Apps | NuGet [2.0.3](https://www.nuget.org/packages/Microsoft.Azure.Mobile.Server/2.0.3) | | | | Mobile Server - Cross Domain | NuGet [2.0.3](https://www.nuget.org/packages/Microsoft.Azure.Mobile.Server.CrossDomain/2.0.3) | | | | Mobile Service - Resource Broker | NuGet [1.0.2.1](https://www.nuget.org/packages/Microsoft.WindowsAzure.Mobile.Service.ResourceBroker/1.0.2.1) | | | +| News Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingNewsSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingNewsSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingNewsSearch) | | News Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.NewsSearch/2.0.0) | | | | Notification Hubs | NuGet [4.1.0](https://www.nuget.org/packages/Microsoft.Azure.NotificationHubs/4.1.0) | | GitHub [4.1.0](https://github.com/Azure/azure-notificationhubs-dotnet) | -| Operational Insights | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.OperationalInsights/1.1.0) | | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/operationalinsights/Microsoft.Azure.OperationalInsights) | +| OpenTelemetry Exporter | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.OpenTelemetry.Exporter.AzureMonitor/1.0.0-beta.1) | | | | Personalizer | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Personalizer/1.0.0) | | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Personalizer_1.0.0/sdk/cognitiveservices/Personalizer) | | Power BI | NuGet [3.20.1](https://www.nuget.org/packages/Microsoft.PowerBI.Api/3.20.1) | | GitHub [3.20.1](https://github.com/Microsoft/PowerBI-CSharp) | -| QnA Maker | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker/2.0.1)
NuGet [3.0.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker/3.0.0-preview.1) | | GitHub [2.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker_2.0.1/sdk/cognitiveservices/Knowledge.QnAMaker) | -| Queues | NuGet [11.2.3](https://www.nuget.org/packages/Microsoft.Azure.Storage.Queue/11.2.3) | | GitHub [11.2.3](https://github.com/Azure/azure-storage-net/tree/master/Queue) | +| Question Answering | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker/2.0.1)
NuGet [3.0.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker/3.0.0-preview.1) | | GitHub [2.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker_2.0.1/sdk/cognitiveservices/Knowledge.QnAMaker) | | Relay | NuGet [2.0.15596](https://www.nuget.org/packages/Microsoft.Azure.Relay/2.0.15596)
NuGet [3.0.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Relay/3.0.0-preview) | [docs](/dotnet/api/overview/azure/service-bus-relay) | GitHub [2.0.15596](https://github.com/Azure/azure-relay-dotnet/tree/2.0.1) | | Search | NuGet [10.1.0](https://www.nuget.org/packages/Microsoft.Azure.Search/10.1.0) | | GitHub [10.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Search_10.1.0/sdk/search/Microsoft.Azure.Search/) | | Search - Common | NuGet [10.1.0](https://www.nuget.org/packages/Microsoft.Azure.Search.Common/10.1.0) | | GitHub [10.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Search.Common_10.1.0/sdk/search/Microsoft.Azure.Search.Common/) | @@ -476,37 +433,38 @@ | Search - Service | NuGet [10.1.0](https://www.nuget.org/packages/Microsoft.Azure.Search.Service/10.1.0) | | GitHub [10.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Search.Service_10.1.0/sdk/search/Microsoft.Azure.Search.Service/) | | Service Bus | NuGet [5.2.0](https://www.nuget.org/packages/Microsoft.Azure.ServiceBus/5.2.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.ServiceBus-readme) | GitHub [5.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.ServiceBus_5.2.0/sdk/servicebus/Microsoft.Azure.ServiceBus/) | | Service Bus | NuGet [6.2.2](https://www.nuget.org/packages/WindowsAzure.ServiceBus/6.2.2) | | | -| Service Bus - Message ID plugin | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.ServiceBus.MessageIdPlugin/2.0.0) | | | -| SignalR | NuGet [1.21.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR/1.21.0) | | GitHub [1.21.0](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR) | -| SignalR - ASP.NET | NuGet [1.21.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR.AspNet/1.21.0) | | GitHub [1.21.0](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR.AspNet) | +| SignalR | NuGet [1.21.2](https://www.nuget.org/packages/Microsoft.Azure.SignalR/1.21.2) | | GitHub [1.21.2](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR) | +| SignalR - ASP.NET | NuGet [1.21.2](https://www.nuget.org/packages/Microsoft.Azure.SignalR.AspNet/1.21.2) | | GitHub [1.21.2](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR.AspNet) | | SignalR - Benchmark | NuGet [1.0.0-preview1-10415](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Benchmark/1.0.0-preview1-10415) | | GitHub [1.0.0-preview1-10415](https://github.com/azure/azure-signalr-bench) | -| SignalR - Protocols | NuGet [1.21.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Protocols/1.21.0) | | GitHub [1.21.0](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR.Protocols) | +| SignalR - Protocols | NuGet [1.21.2](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Protocols/1.21.2) | | GitHub [1.21.2](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR.Protocols) | | SignalR - Serverless Protocols | NuGet [1.9.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Serverless.Protocols/1.9.0) | | GitHub [1.9.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/Microsoft.Azure.SignalR.Serverless.Protocols) | -| Speech | NuGet [1.24.2](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech/1.24.2) | | | -| Speech Remote Conversation | NuGet [1.24.2](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.Remoteconversation/1.24.2) | | | -| Speech Xamarin iOS | NuGet [1.24.2](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.Xamarin.iOS/1.24.2) | | | +| Speech | NuGet [1.27.0](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech/1.27.0) | | | +| Speech Remote Conversation | NuGet [1.27.0](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.Remoteconversation/1.27.0) | | | +| Speech Xamarin iOS | NuGet [1.25.0](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.Xamarin.iOS/1.25.0) | | | | Spell Check | NuGet [4.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Language.SpellCheck/4.1.0-preview.1) | | GitHub [4.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Language.SpellCheck_4.1.0-preview.1/sdk/cognitiveservices/Language.SpellCheck) | | Spring Cloud Client | NuGet [2.0.0-preview.3](https://www.nuget.org/packages/Microsoft.Azure.SpringCloud.Client/2.0.0-preview.3) | | | -| SQL Database Elastic Scale Client | NuGet [2.3.0](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.ElasticScale.Client/2.3.0) | | GitHub [2.3.0](https://github.com/Azure/elastic-db-tools/tree/v2.3.0/Src/ElasticScale.Client) | -| SQL Database Elastic Scale Service SplitMerge | NuGet [1.2.0](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.ElasticScale.Service.SplitMerge/1.2.0) | | | -| SQL Database Jobs | NuGet [0.8.3362.1](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.Jobs/0.8.3362.1) | | | -| Storage APIs for Microsoft.Azure.WebJobs.Host | NuGet [4.0.4](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Host.Storage/4.0.4)
NuGet [5.0.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Host.Storage/5.0.0-beta.1) | | GitHub [4.0.4](https://github.com/Azure/azure-webjobs-sdk/tree/storage-v4.0.1/src/Microsoft.Azure.WebJobs.Host.Storage) | -| Supporting library for Microsoft.Azure.WebJobs | NuGet [3.0.33](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Core/3.0.33) | | GitHub [3.0.33](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18) | -| Supporting library for Microsoft.Azure.WebJobs.Extensions.OpenApi | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/1.4.0)
NuGet [2.0.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/2.0.0-preview1) | | | -| Supporting library for testing Microsoft.Azure.WebJobs.Host | NuGet [3.0.30](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Host.TestCommon/3.0.30) | | GitHub [3.0.30](https://github.com/Azure/azure-webjobs-sdk) | +| Storage - Blobs | NuGet [11.2.3](https://www.nuget.org/packages/Microsoft.Azure.Storage.Blob/11.2.3) | | GitHub [11.2.3](https://github.com/Azure/azure-storage-net/tree/master/Blob) | +| Storage - Files Data Lake | NuGet [2.0.0-alpha](https://www.nuget.org/packages/Microsoft.Azure.DataLake.Store/2.0.0-alpha) | [docs](/dotnet/api/overview/azure/data-lake-store) | GitHub [2.0.0-alpha](https://github.com/Azure/azure-data-lake-store-net/tree/1.2.3-alpha) | +| Storage - Files Share | NuGet [11.2.3](https://www.nuget.org/packages/Microsoft.Azure.Storage.File/11.2.3) | | GitHub [11.2.3](https://github.com/Azure/azure-storage-net/tree/master/File) | +| Storage - Queues | NuGet [11.2.3](https://www.nuget.org/packages/Microsoft.Azure.Storage.Queue/11.2.3) | | GitHub [11.2.3](https://github.com/Azure/azure-storage-net/tree/master/Queue) | +| Storage APIs for Microsoft.Azure.WebJobs.Host | NuGet [5.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Host.Storage/5.0.0) | | GitHub [5.0.0](https://github.com/Azure/azure-webjobs-sdk/tree/storage-v4.0.1/src/Microsoft.Azure.WebJobs.Host.Storage) | +| Supporting library for Microsoft.Azure.WebJobs | NuGet [3.0.37](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Core/3.0.37) | | GitHub [3.0.37](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18) | +| Supporting library for Microsoft.Azure.WebJobs.Extensions.OpenApi | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/1.4.0)
NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/2.0.0-preview2) | | | +| Supporting library for testing Microsoft.Azure.WebJobs.Host | NuGet [3.0.37](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Host.TestCommon/3.0.37) | | GitHub [3.0.37](https://github.com/Azure/azure-webjobs-sdk) | | Synapse Analytics | NuGet [0.1.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Synapse/0.1.0-preview) | | GitHub [0.1.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Synapse_0.1.0-preview/sdk/synapse/Microsoft.Azure.Synapse/) | | Tables | NuGet [2.0.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Table/2.0.0-preview) | | | | Tables | NuGet [2.1.2](https://www.nuget.org/packages/Microsoft.Azure.CosmosDB.Table/2.1.2) | | | -| Template | NuGet [1.0.2-preview1](https://www.nuget.org/packages/Microsoft.Azure.Template/1.0.2-preview1) | | | -| Test HttpRecorder | NuGet [1.13.3](https://www.nuget.org/packages/Microsoft.Azure.Test.HttpRecorder/1.13.3) | | GitHub [1.13.3](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/mgmtcommon/TestFramework/Microsoft.Azure.Test.HttpRecorder) | | Text Analytics | NuGet [4.1.0-preview.2](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Language.TextAnalytics/4.1.0-preview.2) | | GitHub [4.1.0-preview.2](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Language.TextAnalytics_4.1.0-preview.2/sdk/cognitiveservices/Language.TextAnalytics) | +| Video Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingVideoSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingVideoSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingVideoSearch) | | Video Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.VideoSearch/2.0.0) | | | | Vision Content Moderator | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.ContentModerator/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Vision.ContentModerator_2.1.0-preview.1/sdk/cognitiveservices/Vision.ContentModerator) | +| Visual Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingVisualSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingVisualSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingVisualSearch) | | Visual Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.VisualSearch/2.0.0) | | | | Wastorage | NuGet [4.0.0](https://www.nuget.org/packages/wastorage/4.0.0) | | | | Wastorage - Redist | NuGet [2.0.0](https://www.nuget.org/packages/wastorage.redist/2.0.0) | | | -| Web - Redis Output Cache Provider | NuGet [3.0.1](https://www.nuget.org/packages/Microsoft.Web.RedisOutputCacheProvider/3.0.1) | | GitHub [3.0.1](https://github.com/Azure/aspnet-redis-providers/tree/NuGet-Release/RedisOutputCacheProvider-3.0.1/src/OutputCacheProvider) | -| Web - Redis Session State Provider | NuGet [4.0.1](https://www.nuget.org/packages/Microsoft.Web.RedisSessionStateProvider/4.0.1) | | GitHub [4.0.1](https://github.com/Azure/aspnet-redis-providers/tree/NuGet-Release/RedisSessionStateProvider-4.0.1/src/RedisSessionStateProvider) | +| Web - Redis Output Cache Provider | NuGet [4.0.0](https://www.nuget.org/packages/Microsoft.Web.RedisOutputCacheProvider/4.0.0) | | GitHub [4.0.0](https://github.com/Azure/aspnet-redis-providers/tree/NuGet-Release/RedisOutputCacheProvider-3.0.1/src/OutputCacheProvider) | +| Web - Redis Session State Provider | NuGet [5.0.0](https://www.nuget.org/packages/Microsoft.Web.RedisSessionStateProvider/5.0.0) | | GitHub [5.0.0](https://github.com/Azure/aspnet-redis-providers/tree/NuGet-Release/RedisSessionStateProvider-4.0.1/src/RedisSessionStateProvider) | +| Web Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingWebSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingWebSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingWebSearch) | | Web Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.WebSearch/2.0.0) | | | | WebJobs - Script | NuGet [1.0.0-beta3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Script/1.0.0-beta3) | | GitHub [1.0.0-beta3](https://github.com/Azure/azure-functions-host/tree/dev/src/WebJobs.Script) | | WebJobs - Script Extensibility | NuGet [1.0.0-beta3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Script.Extensibility/1.0.0-beta3) | | GitHub [1.0.0-beta3](https://github.com/Azure/azure-functions-host) | @@ -536,6 +494,53 @@ | WindowsAzure Storage - Preview | NuGet [3.2.0-preview](https://www.nuget.org/packages/WindowsAzure.Storage-Preview/3.2.0-preview) | | GitHub [3.2.0-preview](https://github.com/Azure/azure-storage-net) | | WindowsAzure Storage - Table Preview | NuGet [3.2.0-preview](https://www.nuget.org/packages/WindowsAzure.Storage.Table-Preview/3.2.0-preview) | | GitHub [3.2.0-preview](https://github.com/Azure/azure-storage-net) | | Core - Client - Newtonsoft Json | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Core.NewtonsoftJson/1.0.0) | | | +| Cosmos DB - BulkExecutor | NuGet [2.5.1-preview](https://www.nuget.org/packages/Microsoft.Azure.CosmosDB.BulkExecutor/2.5.1-preview) | | GitHub [2.5.1-preview](https://github.com/Azure/azure-cosmosdb-bulkexecutor-dotnet-getting-started) | +| Cosmos DB - Direct | NuGet [3.30.20](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Direct/3.30.20) | | GitHub [3.30.20](https://github.com/Azure/azure-cosmos-dotnet-v3) | +| Cosmos DB - Encryption | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.0.1) | | GitHub [2.0.1](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/releases/encryption/1.0.0-preview4/Microsoft.Azure.Cosmos.Encryption) | +| Cosmos DB - Encryption | NuGet [1.0.0-preview04](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption.Custom/1.0.0-preview04) | | | +| Document DB - Change Feed Processor | NuGet [2.4.0](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB.ChangeFeedProcessor/2.4.0) | | GitHub [2.4.0](https://github.com/Azure/azure-documentdb-changefeedprocessor-dotnet/tree/master) | +| Extensions - Caching Cosmos | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Cosmos/1.4.0) | | GitHub [1.4.0](https://github.com/Azure/Microsoft.Extensions.Caching.Cosmos/tree/v1.0.0-preview4) | +| Functions extension for Application Insights | NuGet [1.0.0-preview4](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ApplicationInsights/1.0.0-preview4) | | | +| Functions extension for Authentication Events | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/1.0.0-beta.3) | | | +| Functions extension for Azure SQL and SQL Server | NuGet [3.0.143-preview](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Sql/3.0.143-preview) | | | +| Functions extension for Durable Task Framework - isolated worker | NuGet [1.0.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.DurableTask/1.0.2) | | | +| Functions extension for Storage Timers | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Timers.Storage/1.0.0) | | | +| Microsoft.Azure.Cosmos.Templates | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Templates/1.0.0) | | | +| Microsoft.Azure.Functions.Analyzers | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Analyzers/1.0.0) | | | +| Microsoft.Azure.Functions.Authentication.WebAssembly | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Authentication.WebAssembly/1.0.0)
NuGet [1.0.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Functions.Authentication.WebAssembly/1.0.1-preview) | | | +| Microsoft.Azure.Functions.Worker.ApplicationInsights | NuGet [1.0.0-preview4](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ApplicationInsights/1.0.0-preview4) | | | +| Microsoft.Azure.Functions.Worker.Core | NuGet [1.11.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Core/1.11.0) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Abstractions | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Abstractions/1.1.0)
NuGet [1.2.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Abstractions/1.2.0-preview1) | | | +| Microsoft.Azure.Functions.Worker.Extensions.ApplicationInsights | NuGet [1.0.0-preview4](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.ApplicationInsights/1.0.0-preview4) | | | +| Microsoft.Azure.Functions.Worker.Extensions.CosmosDB | NuGet [4.0.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.CosmosDB/4.0.1)
NuGet [4.1.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.CosmosDB/4.1.0-preview1) | | | +| Microsoft.Azure.Functions.Worker.Extensions.EventGrid | NuGet [3.2.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.EventGrid/3.2.1) | | | +| Microsoft.Azure.Functions.Worker.Extensions.EventHubs | NuGet [5.2.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.EventHubs/5.2.0) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Http | NuGet [3.0.13](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http/3.0.13) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Kafka | NuGet [3.8.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Kafka/3.8.0) | | | +| Microsoft.Azure.Functions.Worker.Extensions.OpenApi | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/1.4.0)
NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/2.0.0-preview2) | | | +| Microsoft.Azure.Functions.Worker.Extensions.RabbitMQ | NuGet [2.0.3](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.RabbitMQ/2.0.3) | | | +| Microsoft.Azure.Functions.Worker.Extensions.SendGrid | NuGet [3.0.3](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.SendGrid/3.0.3) | | | +| Microsoft.Azure.Functions.Worker.Extensions.ServiceBus | NuGet [5.7.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.ServiceBus/5.7.0) | | | +| Microsoft.Azure.Functions.Worker.Extensions.SignalRService | NuGet [1.7.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.SignalRService/1.7.0) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Sql | NuGet [3.0.143-preview](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Sql/3.0.143-preview) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Storage | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage/5.0.1)
NuGet [5.1.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage/5.1.0-preview1) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs/5.0.1)
NuGet [5.1.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs/5.1.0-preview1) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues | NuGet [5.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues/5.0.0) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Storage.Tables | NuGet [1.0.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Storage.Tables/1.0.0-preview1) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Tables | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Tables/1.0.0) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Timer | NuGet [4.2.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Timer/4.2.0) | | | +| Microsoft.Azure.Functions.Worker.Extensions.Warmup | NuGet [4.0.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Warmup/4.0.2) | | | +| Microsoft.Azure.Functions.Worker.Grpc | NuGet [1.9.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Grpc/1.9.0) | | | +| Microsoft.Azure.Functions.Worker.ItemTemplates | NuGet [4.0.2408](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates/4.0.2408) | | | +| Microsoft.Azure.Functions.Worker.ProjectTemplates | NuGet [4.0.2408](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ProjectTemplates/4.0.2408) | | | +| Microsoft.Azure.Functions.Worker.Sdk.Analyzers | NuGet [1.1.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Analyzers/1.1.2) | | | +| Microsoft.Azure.Functions.Worker.Sdk.Generators | NuGet [1.1.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Generators/1.1.0-preview2) | | | +| Microsoft.Azure.WebJobs.CosmosDb.Mongo | NuGet [1.0.4](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.CosmosDb.Mongo/1.0.4) | | | +| Microsoft.Azure.WebJobs.Extensions.Kusto | NuGet [1.0.5-Preview](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Kusto/1.0.5-Preview) | | | +| Service Bus - Message ID plugin | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.ServiceBus.MessageIdPlugin/2.0.0) | | | +| SQL Database Elastic Scale Client | NuGet [2.3.0](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.ElasticScale.Client/2.3.0) | | GitHub [2.3.0](https://github.com/Azure/elastic-db-tools/tree/v2.3.0/Src/ElasticScale.Client) | +| SQL Database Elastic Scale Service SplitMerge | NuGet [1.2.0](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.ElasticScale.Service.SplitMerge/1.2.0) | | | +| SQL Database Jobs | NuGet [0.8.3362.1](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.Jobs/0.8.3362.1) | | | | AzureStack Management - Azure Bridge Admin | NuGet [0.1.0-preview](https://www.nuget.org/packages/Microsoft.AzureStack.Management.AzureBridge.Admin/0.1.0-preview) | | GitHub [0.1.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/azurestack/Microsoft.AzureStack.Management.AzureBridge.Admin) | | AzureStack Management - Backup Admin | NuGet [0.3.2-preview](https://www.nuget.org/packages/Microsoft.AzureStack.Management.Backup.Admin/0.3.2-preview) | | GitHub [0.3.2-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.AzureStack.Management.Backup.Admin_0.3.2-preview/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/) | | AzureStack Management - Commerce Admin | NuGet [0.2.0-preview](https://www.nuget.org/packages/Microsoft.AzureStack.Management.Commerce.Admin/0.2.0-preview) | | GitHub [0.2.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/azurestack/Microsoft.AzureStack.Management.Commerce.Admin) | @@ -563,9 +568,8 @@ | Management - Automanage | NuGet [0.1.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Automanage/0.1.0-preview) | | | | Management - Automation | NuGet [3.8.3-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Automation/3.8.3-preview) | [docs](/dotnet/api/overview/azure/automation) | GitHub [3.8.3-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/automation/Microsoft.Azure.Management.Automation) | | Management - Azure Stack HCI | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.AzureStackHCI/1.0.0) | | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.AzureStackHCI_1.0.0/sdk/azurestackhci/Microsoft.Azure.Management.AzureStackHCI/) | -| Management - Azure VMware Solution | NuGet [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Avs/3.0.0) | | GitHub [3.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Avs_3.0.0/sdk/avs/Microsoft.Azure.Management.Avs/) | +| Management - Backup | NuGet [1.0.5-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.BackupServices/1.0.5-preview) | | | | Management - Backup | NuGet [5.0.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.RecoveryServices.Backup/5.0.0-preview) | [docs](/dotnet/api/overview/azure/recovery-services) | GitHub [5.0.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.RecoveryServices.Backup_5.0.0-preview/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/) | -| Management - Backup Services | NuGet [1.0.5-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.BackupServices/1.0.5-preview) | | | | Management - Batch | NuGet [15.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Batch/15.0.0) | [docs](/dotnet/api/overview/azure/batch) | GitHub [15.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Batch_15.0.0/sdk/batch/Microsoft.Azure.Management.Batch/) | | Management - Batch AI | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.BatchAI/2.0.0) | [docs](/dotnet/api/overview/azure/batchai) | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/batchai/Microsoft.Azure.Management.BatchAI) | | Management - Batch AI Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.BatchAI.Fluent/1.38.1) | | | @@ -590,7 +594,7 @@ | Management - Container Service | NuGet [1.2.0](https://www.nuget.org/packages/Microsoft.Azure.Management.ContainerService/1.2.0) | | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.ContainerService_1.2.0/sdk/containerservice/Microsoft.Azure.Management.ContainerService/) | | Management - Container Service Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.ContainerService.Fluent/1.38.1) | | | | Management - Content Delivery Network | NuGet [6.1.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Cdn/6.1.0) | | GitHub [6.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Cdn_6.1.0/sdk/cdn/Microsoft.Azure.Management.Cdn/) | -| Management - Content Delivery Network Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Cdn.Fluent/1.38.1) | [docs](/dotnet/api/overview/azure/cdn) | | +| Management - Content Delivery Network Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Cdn.Fluent/1.38.1) | | | | Management - Cosmos DB | NuGet [3.3.0](https://www.nuget.org/packages/Microsoft.Azure.Management.CosmosDB/3.3.0)
NuGet [3.9.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.CosmosDB/3.9.1-preview) | | GitHub [3.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.CosmosDB_3.3.0/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/)
GitHub [3.9.1-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.CosmosDB_3.9.1-preview/sdk/cosmosdb/Microsoft.Azure.Management.CosmosDB/) | | Management - Cosmos DB Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.CosmosDB.Fluent/1.38.1) | | | | Management - Customer Insights | NuGet [0.9.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.CustomerInsights/0.9.1-preview) | | GitHub [0.9.1-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/customer-insights/Microsoft.Azure.Management.CustomerInsights) | @@ -598,10 +602,10 @@ | Management - Data Box | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.Management.DataBox/2.0.1) | | GitHub [2.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.DataBox_2.0.1/sdk/databox/Microsoft.Azure.Management.DataBox/) | | Management - Data Box Edge | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Management.DataBoxEdge/1.1.0) | | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.DataBoxEdge_1.1.0/sdk/databoxedge/Microsoft.Azure.Management.DataBoxEdge/) | | Management - Data Factories | NuGet [4.13.3](https://www.nuget.org/packages/Microsoft.Azure.Management.DataFactories/4.13.3) | [docs](/dotnet/api/overview/azure/data-factory) | | -| Management - Data Factory | NuGet [9.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.DataFactory/9.0.0) | [docs](/dotnet/api/overview/azure/data-factory) | GitHub [9.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.DataFactory_9.0.0/sdk/datafactory/Microsoft.Azure.Management.DataFactory/) | +| Management - Data Factory | NuGet [9.3.0](https://www.nuget.org/packages/Microsoft.Azure.Management.DataFactory/9.3.0) | [docs](/dotnet/api/overview/azure/data-factory) | GitHub [9.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.DataFactory_9.3.0/sdk/datafactory/Microsoft.Azure.Management.DataFactory/) | | Management - Data Lake Analytics | NuGet [3.5.3-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.DataLake.Analytics/3.5.3-preview) | [docs](/dotnet/api/overview/azure/data-lake-analytics) | GitHub [3.5.3-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/datalake-analytics/Microsoft.Azure.Management.DataLake.Analytics) | -| Management - Data Lake Storage | NuGet [2.4.2-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.DataLake.Store/2.4.2-preview) | [docs](/dotnet/api/overview/azure/data-lake-store) | GitHub [2.4.2-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/datalake-store/Microsoft.Azure.Management.DataLake.Store) | | Management - Data Lake Storage Uploader | NuGet [1.0.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.DataLake.StoreUploader/1.0.1-preview) | | | +| Management - Data Lake Store | NuGet [2.4.2-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.DataLake.Store/2.4.2-preview) | [docs](/dotnet/api/overview/azure/data-lake-store) | GitHub [2.4.2-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/datalake-store/Microsoft.Azure.Management.DataLake.Store) | | Management - Data Migration | NuGet [0.11.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.DataMigration/0.11.0-preview) | | GitHub [0.11.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.DataMigration_0.11.0-preview/sdk/datamigration/Microsoft.Azure.Management.DataMigration/) | | Management - Data Share | NuGet [1.3.0](https://www.nuget.org/packages/Microsoft.Azure.Management.DataShare/1.3.0) | [docs](/dotnet/api/overview/azure/datashare) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.DataShare_1.3.0/sdk/datashare/Microsoft.Azure.Management.DataShare/) | | Management - Datadog | NuGet [0.1.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Datadog/0.1.0) | | | @@ -651,13 +655,12 @@ | Management - Marketplace | NuGet [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Marketplace/3.0.0) | | GitHub [3.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Marketplace_3.0.0/sdk/marketplace/Microsoft.Azure.Management.Marketplace/) | | Management - Marketplace Ordering | NuGet [1.0.1](https://www.nuget.org/packages/Microsoft.Azure.Management.MarketplaceOrdering/1.0.1) | | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering) | | Management - Media Services | NuGet [6.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Media/6.0.0) | | GitHub [6.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Media_6.0.0/sdk/mediaservices/Microsoft.Azure.Management.Media/) | -| Management - Migrate Resource Mover | NuGet [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Migrate.ResourceMover/3.0.0) | | | | Management - Mixed Reality | NuGet [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.MixedReality/3.0.0) | [docs](/dotnet/api/overview/azure/mixed-reality) | GitHub [3.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.MixedReality_3.0.0/sdk/mixedreality/Microsoft.Azure.Management.MixedReality/) | | Management - Monitor | NuGet [0.28.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Monitor/0.28.0-preview) | | GitHub [0.28.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Monitor_0.28.0-preview/sdk/monitor/Microsoft.Azure.Management.Monitor/) | | Management - Monitor Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Monitor.Fluent/1.38.1) | | | | Management - MySQL | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.MySQL/1.0.0) | | | -| Management - NetApp | NuGet [1.16.0](https://www.nuget.org/packages/Microsoft.Azure.Management.NetApp/1.16.0) | | GitHub [1.16.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.NetApp_1.16.0/sdk/netapp/Microsoft.Azure.Management.NetApp/) | -| Management - Network | NuGet [25.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Network/25.0.0) | | GitHub [25.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Network_25.0.0/sdk/network/Microsoft.Azure.Management.Network/) | +| Management - NetApp Files | NuGet [1.16.0](https://www.nuget.org/packages/Microsoft.Azure.Management.NetApp/1.16.0) | | GitHub [1.16.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.NetApp_1.16.0/sdk/netapp/Microsoft.Azure.Management.NetApp/) | +| Management - Network | NuGet [26.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Network/26.0.0) | | GitHub [26.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Network_26.0.0/sdk/network/Microsoft.Azure.Management.Network/) | | Management - Network Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Network.Fluent/1.38.1) | [docs](/dotnet/api/overview/azure/virtual-network) | | | Management - Notification Hubs | NuGet [2.3.4-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.NotificationHubs/2.3.4-preview) | [docs](/dotnet/api/overview/azure/notification-hubs) | GitHub [2.3.4-preview](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/notificationhubs/Microsoft.Azure.Management.NotificationHubs) | | Management - Notification Hubs Fluent | NuGet [1.9.1-beta](https://www.nuget.org/packages/Microsoft.Azure.Management.NotificationHubs.Fluent/1.9.1-beta) | | | @@ -670,9 +673,8 @@ | Management - Private DNS | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.PrivateDns/1.0.0) | | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.PrivateDns_1.0.0/sdk/privatedns/Microsoft.Azure.Management.PrivateDns/) | | Management - Private DNS Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.PrivateDns.Fluent/1.38.1) | | | | Management - Recovery Services | NuGet [4.3.3-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.RecoveryServices/4.3.3-preview) | [docs](/dotnet/api/overview/azure/recovery-services) | GitHub [4.3.3-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.RecoveryServices_4.3.3-preview/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/) | -| Management - Recovery Services - Vault Upgrade | NuGet [1.0.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.RecoveryServicesVaultUpgrade/1.0.0-preview) | | | | Management - Redis | NuGet [8.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Redis/8.0.0) | | | -| Management - Redis Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Redis.Fluent/1.38.1) | [docs](/dotnet/api/overview/azure/redis-cache) | | +| Management - Redis Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Redis.Fluent/1.38.1) | | | | Management - Relay | NuGet [2.0.2](https://www.nuget.org/packages/Microsoft.Azure.Management.Relay/2.0.2) | | GitHub [2.0.2](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/relay/Microsoft.Azure.Management.Relay) | | Management - Relay Fluent | NuGet [1.9.1-beta](https://www.nuget.org/packages/Microsoft.Azure.Management.Relay.Fluent/1.9.1-beta) | | | | Management - Remote App | NuGet [1.0.9](https://www.nuget.org/packages/Microsoft.Azure.Management.RemoteApp/1.0.9) | | | @@ -680,8 +682,8 @@ | Management - Resource Graph | NuGet [2.1.0](https://www.nuget.org/packages/Microsoft.Azure.Management.ResourceGraph/2.1.0) | | GitHub [2.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.ResourceGraph_2.1.0/sdk/resourcegraph/Microsoft.Azure.Management.ResourceGraph/) | | Management - Resource Manager | NuGet [3.17.4-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.ResourceManager/3.17.4-preview) | | | | Management - Resource Manager Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.ResourceManager.Fluent/1.38.1) | [docs](/dotnet/api/overview/azure/resource-manager) | | +| Management - Resource Mover | NuGet [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Migrate.ResourceMover/3.0.0) | | | | Management - Resources | NuGet [2.20.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Resources/2.20.1-preview) | | | -| Management - Sample Project Publish | NuGet [0.9.0-Preview](https://www.nuget.org/packages/Microsoft.Azure.Management.SampleProjectPublish/0.9.0-Preview) | | | | Management - Scheduler | NuGet [2.2.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Scheduler/2.2.0) | | GitHub [2.2.0](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/scheduler/Microsoft.Azure.Management.Scheduler) | | Management - Scheduler Fluent | NuGet [1.9.1-beta](https://www.nuget.org/packages/Microsoft.Azure.Management.Scheduler.Fluent/1.9.1-beta) | | | | Management - Security | NuGet [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.SecurityCenter/3.0.0) | | GitHub [3.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.SecurityCenter_3.0.0/sdk/securitycenter/Microsoft.Azure.Management.SecurityCenter/) | @@ -705,9 +707,10 @@ | Management - Stream Analytics | NuGet [4.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.StreamAnalytics/4.0.0) | [docs](/dotnet/api/overview/azure/stream-analytics) | GitHub [4.0.0](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics) | | Management - Subscriptions | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Subscription/2.0.0) | | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Subscription_2.0.0/sdk/subscription/Microsoft.Azure.Management.Subscription/) | | Management - Support | NuGet [1.0.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Support/1.0.1) | | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Support_1.0.1/sdk/support/Microsoft.Azure.Management.Support/) | -| Management - Synapse Analytics | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Synapse/2.0.0)
NuGet [2.6.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Synapse/2.6.0-preview) | | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Synapse_2.0.0/sdk/synapse/Microsoft.Azure.Management.Synapse/)
GitHub [2.6.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Synapse_2.6.0-preview/sdk/synapse/Microsoft.Azure.Management.Synapse/) | +| Management - Synapse | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Synapse/2.0.0)
NuGet [2.6.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Synapse/2.6.0-preview) | | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Synapse_2.0.0/sdk/synapse/Microsoft.Azure.Management.Synapse/)
GitHub [2.6.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Synapse_2.6.0-preview/sdk/synapse/Microsoft.Azure.Management.Synapse/) | | Management - Traffic Manager | NuGet [2.5.4](https://www.nuget.org/packages/Microsoft.Azure.Management.TrafficManager/2.5.4) | | GitHub [2.5.4](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager) | | Management - Traffic Manager Fluent | NuGet [1.38.1](https://www.nuget.org/packages/Microsoft.Azure.Management.TrafficManager.Fluent/1.38.1) | [docs](/dotnet/api/overview/azure/traffic-manager) | | +| Management - Vault Upgrade | NuGet [1.0.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.RecoveryServicesVaultUpgrade/1.0.0-preview) | | | | Management - WebSites | NuGet [4.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.WebSites/4.0.0) | | GitHub [4.0.0](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/websites/Microsoft.Azure.Management.WebSites) | | Profiles hybrid_2018_03_01 Management - Authorization | NuGet [0.9.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2018_03_01.Authorization/0.9.0-preview) | | | | Profiles hybrid_2018_03_01 Management - Compute | NuGet [0.9.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2018_03_01.Compute/0.9.0-preview) | | | @@ -729,12 +732,26 @@ | Profiles hybrid_2019_03_01 Management - Subscription | NuGet [0.9.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2019_03_01.Subscription/0.9.0-preview) | | | | Profiles hybrid_2019_03_01 Management - WebSites | NuGet [0.9.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Profiles.hybrid_2019_03_01.Websites/0.9.0-preview) | | | | Resource Management - Azure Stack | NuGet [0.10.8-preview](https://www.nuget.org/packages/Microsoft.AzureStack.Management/0.10.8-preview) | | | +| Resource Management - Azure VMware Solution | NuGet [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Avs/3.0.0) | | GitHub [3.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.Avs_3.0.0/sdk/avs/Microsoft.Azure.Management.Avs/) | +| Resource Management - Change Analysis | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.ChangeAnalysis/1.0.0) | | | +| Resource Management - Chaos | NuGet [0.9.15-preview.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Chaos/0.9.15-preview.1) | | | +| Resource Management - Data Protection | NuGet [2.1.0](https://www.nuget.org/packages/Microsoft.Azure.Management.DataProtection.Backup/2.1.0) | | | +| Resource Management - Device Update | NuGet [1.0.1-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Management.DeviceUpdate/1.0.1-beta.1) | | | +| Resource Management - Elastic | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Elastic/1.0.0-beta.1) | | | +| Resource Management - Extended Location | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.ExtendedLocation/1.0.0) | | | | Resource Management - Health Bot | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.Healthbot/1.0.0) | | | +| Resource Management - Hybrid Kubernetes | NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Management.Kubernetes/1.1.0-beta.1) | | | +| Resource Management - Kubernetes Configuration | NuGet [2.1.0](https://www.nuget.org/packages/Microsoft.Azure.Management.KubernetesConfiguration/2.1.0) | | | +| Resource Management - Provider Hub | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Management.ProviderHub/1.0.0-beta.1) | | | +| Resource Management - Quantum | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Microsoft.Azure.Management.Quantum/1.0.0-beta.2) | | | +| Resource Management - Quota | NuGet [1.0.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.Quota/1.0.0-preview) | | | | Resource Management - Redis Enterprise | NuGet [3.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.RedisEnterprise/3.0.0) | | | | Resource Management - Service Bus | NuGet [0.19.0-preview](https://www.nuget.org/packages/Microsoft.WindowsAzure.Management.ServiceBus/0.19.0-preview) | | | +| Resource Management - Service Fabric Managed Clusters | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.ServiceFabricManagedClusters/1.0.0) | | | +| Resource Management - Video Analyzer | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Microsoft.Azure.Management.VideoAnalyzer/1.0.0-beta.3) | | | | Resource Management - Workload Monitor | NuGet [1.0.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Management.WorkloadMonitor/1.0.0-preview) | | | | Security Insights | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Management.SecurityInsights/2.0.0) | | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Management.SecurityInsights_2.0.0/sdk/securityinsights/Microsoft.Azure.Management.SecurityInsights/) | -| SignalR Management | NuGet [1.21.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Management/1.21.0) | | GitHub [1.21.0](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR.Management) | +| SignalR Management | NuGet [1.21.2](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Management/1.21.2) | | GitHub [1.21.2](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR.Management) | | SQL Server Mangement - Key Vault Provider | NuGet [2.4.0](https://www.nuget.org/packages/Microsoft.SqlServer.Management.AlwaysEncrypted.AzureKeyVaultProvider/2.4.0) | | | | WindowsAzure Management | NuGet [4.1.3](https://www.nuget.org/packages/Microsoft.WindowsAzure.Management/4.1.3) | | | | WindowsAzure Management - Automation | NuGet [1.0.3](https://www.nuget.org/packages/Microsoft.WindowsAzure.Management.Automation/1.0.3) | | | @@ -754,3 +771,10 @@ | WindowsAzure Management - Traffic Manager | NuGet [0.16.1-preview](https://www.nuget.org/packages/Microsoft.WindowsAzure.Management.TrafficManager/0.16.1-preview) | | | | WindowsAzure Management - Virtual Networks | NuGet [0.9.9-preview](https://www.nuget.org/packages/Microsoft.WindowsAzure.Management.VirtualNetworks/0.9.9-preview) | | | | WindowsAzure Management - WebSites | NuGet [5.0.0-prerelease](https://www.nuget.org/packages/Microsoft.WindowsAzure.Management.WebSites/5.0.0-prerelease) | | | +| Hyak Common | NuGet [1.2.2](https://www.nuget.org/packages/Hyak.Common/1.2.2) | | | +| Hyak Common - Tracing Etw | NuGet [1.0.2](https://www.nuget.org/packages/Hyak.Common.Tracing.Etw/1.0.2) | | | +| Hyak Common - Tracing Log4Net | NuGet [1.0.2](https://www.nuget.org/packages/Hyak.Common.Tracing.Log4Net/1.0.2) | | | +| Management - Sample Project Publish | NuGet [0.9.0-Preview](https://www.nuget.org/packages/Microsoft.Azure.Management.SampleProjectPublish/0.9.0-Preview) | | | +| Microsoft.Azure.SignalR.Emulator | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Emulator/1.1.0)
NuGet [1.0.0-preview1-10809](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Emulator/1.0.0-preview1-10809) | | | +| Template | NuGet [1.0.2-preview1](https://www.nuget.org/packages/Microsoft.Azure.Template/1.0.2-preview1) | | | +| Test HttpRecorder | NuGet [1.13.3](https://www.nuget.org/packages/Microsoft.Azure.Test.HttpRecorder/1.13.3) | | GitHub [1.13.3](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/mgmtcommon/TestFramework/Microsoft.Azure.Test.HttpRecorder) | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index 82d17eee05f24..20c9ee3b9dd36 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -3,49 +3,44 @@ | Anomaly Detector | NuGet [3.0.0-preview.6](https://www.nuget.org/packages/Azure.AI.AnomalyDetector/3.0.0-preview.6) | | GitHub [3.0.0-preview.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.AnomalyDetector_3.0.0-preview.6/sdk/anomalydetector/Azure.AI.AnomalyDetector/) | | App Configuration | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Data.AppConfiguration/1.2.0)
NuGet [1.3.0-beta.1](https://www.nuget.org/packages/Azure.Data.AppConfiguration/1.3.0-beta.1) | [docs](/dotnet/api/overview/azure/Data.AppConfiguration-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.AppConfiguration_1.2.0/sdk/appconfiguration/Azure.Data.AppConfiguration/)
GitHub [1.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.AppConfiguration_1.3.0-beta.1/sdk/appconfiguration/Azure.Data.AppConfiguration/) | | Attestation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Security.Attestation/1.0.0) | [docs](/dotnet/api/overview/azure/Security.Attestation-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.Attestation_1.0.0/sdk/attestation/Azure.Security.Attestation/) | -| Azure client library integration for ASP.NET Core | NuGet [1.6.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.6.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.6.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.6.0/sdk/extensions/Microsoft.Extensions.Azure/) | | Azure Object Anchors Conversion | NuGet [0.3.0-beta.6](https://www.nuget.org/packages/Azure.MixedReality.ObjectAnchors.Conversion/0.3.0-beta.6) | | GitHub [0.3.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.MixedReality.ObjectAnchors.Conversion_0.3.0-beta.6/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/) | | Azure Remote Rendering | NuGet [1.1.0](https://www.nuget.org/packages/Azure.MixedReality.RemoteRendering/1.1.0) | [docs](/dotnet/api/overview/azure/MixedReality.RemoteRendering-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.MixedReality.RemoteRendering_1.1.0/sdk/remoterendering/Azure.MixedReality.RemoteRendering/) | -| Blob Storage Key Store for .NET Data Protection | NuGet [1.2.3](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.2.3) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.2.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.2.3/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) | -| Blobs | NuGet [12.14.1](https://www.nuget.org/packages/Azure.Storage.Blobs/12.14.1) | [docs](/dotnet/api/overview/azure/Storage.Blobs-readme) | GitHub [12.14.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs_12.14.1/sdk/storage/Azure.Storage.Blobs/) | -| Blobs Batch | NuGet [12.11.0](https://www.nuget.org/packages/Azure.Storage.Blobs.Batch/12.11.0) | [docs](/dotnet/api/overview/azure/Storage.Blobs.Batch-readme) | GitHub [12.11.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.Batch_12.11.0/sdk/storage/Azure.Storage.Blobs.Batch/) | -| Blobs ChangeFeed | NuGet [12.0.0-preview.29](https://www.nuget.org/packages/Azure.Storage.Blobs.ChangeFeed/12.0.0-preview.29) | | GitHub [12.0.0-preview.29](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.ChangeFeed_12.0.0-preview.29/sdk/storage/Azure.Storage.Blobs.ChangeFeed/) | | Brokered Authentication | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Identity.BrokeredAuthentication/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity.BrokeredAuthentication_1.0.0-beta.3/sdk/identity/Azure.Identity.BrokeredAuthentication/) | | Cognitive Search | NuGet [11.4.0](https://www.nuget.org/packages/Azure.Search.Documents/11.4.0)
NuGet [11.5.0-beta.2](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.2) | [docs](/dotnet/api/overview/azure/Search.Documents-readme) | GitHub [11.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Search.Documents_11.4.0/sdk/search/Azure.Search.Documents/)
GitHub [11.5.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Search.Documents_11.5.0-beta.2/sdk/search/Azure.Search.Documents/) | -| Common | NuGet [12.13.0](https://www.nuget.org/packages/Azure.Storage.Common/12.13.0) | [docs](/dotnet/api/overview/azure/Storage.Common-readme) | GitHub [12.13.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Common_12.13.0/sdk/storage/Azure.Storage.Common/) | | Communication Call Automation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.CallAutomation/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.CallAutomation_1.0.0-beta.1/sdk/communication/Azure.Communication.CallAutomation/) | | Communication Chat | NuGet [1.1.1](https://www.nuget.org/packages/Azure.Communication.Chat/1.1.1) | [docs](/dotnet/api/overview/azure/Communication.Chat-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Chat_1.1.1/sdk/communication/Azure.Communication.Chat/) | -| Communication Common | NuGet [1.2.1](https://www.nuget.org/packages/Azure.Communication.Common/1.2.1) | [docs](/dotnet/api/overview/azure/Communication.Common-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_1.2.1/sdk/communication/Azure.Communication.Common/) | +| Communication Common | NuGet [1.2.1](https://www.nuget.org/packages/Azure.Communication.Common/1.2.1)
NuGet [2.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Common/2.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.Common-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_1.2.1/sdk/communication/Azure.Communication.Common/)
GitHub [2.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Common_2.0.0-beta.1/sdk/communication/Azure.Communication.Common/) | +| Communication Email | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Communication.Email/1.0.0) | [docs](/dotnet/api/overview/azure/Communication.Email-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Email_1.0.0/sdk/communication/Azure.Communication.Email/) | | Communication Identity | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Communication.Identity/1.2.0) | [docs](/dotnet/api/overview/azure/Communication.Identity-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Identity_1.2.0/sdk/communication/Azure.Communication.Identity/) | | Communication Network Traversal | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Communication.NetworkTraversal/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.Communication.NetworkTraversal/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.NetworkTraversal-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.NetworkTraversal_1.0.0/sdk/communication/Azure.Communication.NetworkTraversal/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.NetworkTraversal_1.1.0-beta.1/sdk/communication/Azure.Communication.NetworkTraversal/) | -| Communication Phone Numbers | NuGet [1.0.1](https://www.nuget.org/packages/Azure.Communication.PhoneNumbers/1.0.1)
NuGet [1.1.0-beta.3](https://www.nuget.org/packages/Azure.Communication.PhoneNumbers/1.1.0-beta.3) | [docs](/dotnet/api/overview/azure/Communication.PhoneNumbers-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.PhoneNumbers_1.0.1/sdk/communication/Azure.Communication.PhoneNumbers/)
GitHub [1.1.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.PhoneNumbers_1.1.0-beta.3/sdk/communication/Azure.Communication.PhoneNumbers/) | +| Communication Phone Numbers | NuGet [1.1.0](https://www.nuget.org/packages/Azure.Communication.PhoneNumbers/1.1.0) | [docs](/dotnet/api/overview/azure/Communication.PhoneNumbers-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.PhoneNumbers_1.1.0/sdk/communication/Azure.Communication.PhoneNumbers/) | | Communication Rooms | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Rooms/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Rooms_1.0.0-beta.1/sdk/communication/Azure.Communication.Rooms/) | | Communication SMS | NuGet [1.0.1](https://www.nuget.org/packages/Azure.Communication.Sms/1.0.1) | [docs](/dotnet/api/overview/azure/Communication.Sms-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.Sms_1.0.1/sdk/communication/Azure.Communication.Sms/) | | Confidential Ledger | NuGet [1.1.0](https://www.nuget.org/packages/Azure.Security.ConfidentialLedger/1.1.0) | [docs](/dotnet/api/overview/azure/Security.ConfidentialLedger-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.ConfidentialLedger_1.1.0/sdk/confidentialledger/Azure.Security.ConfidentialLedger/) | -| Container Registry | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Containers.ContainerRegistry/1.0.0)
NuGet [1.1.0-beta.5](https://www.nuget.org/packages/Azure.Containers.ContainerRegistry/1.1.0-beta.5) | [docs](/dotnet/api/overview/azure/Containers.ContainerRegistry-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Containers.ContainerRegistry_1.0.0/sdk/containerregistry/Azure.Containers.ContainerRegistry/)
GitHub [1.1.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Containers.ContainerRegistry_1.1.0-beta.5/sdk/containerregistry/Azure.Containers.ContainerRegistry/) | -| Conversation Analysis | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Language.Conversations-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.0.0/sdk/cognitivelanguage/Azure.AI.Language.Conversations/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.1.0-beta.2/sdk/cognitivelanguage/Azure.AI.Language.Conversations/) | -| Core - Client - AMQP | NuGet [1.2.0](https://www.nuget.org/packages/Azure.Core.Amqp/1.2.0) | [docs](/dotnet/api/overview/azure/Core.Amqp-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core.Amqp_1.2.0/sdk/core/Azure.Core.Amqp/) | -| Core - Client - Core | NuGet [1.27.0](https://www.nuget.org/packages/Azure.Core/1.27.0) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.27.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.27.0/sdk/core/Azure.Core/) | +| Container Registry | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Containers.ContainerRegistry/1.0.0)
NuGet [1.1.0-beta.9](https://www.nuget.org/packages/Azure.Containers.ContainerRegistry/1.1.0-beta.9) | [docs](/dotnet/api/overview/azure/Containers.ContainerRegistry-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Containers.ContainerRegistry_1.0.0/sdk/containerregistry/Azure.Containers.ContainerRegistry/)
GitHub [1.1.0-beta.9](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Containers.ContainerRegistry_1.1.0-beta.9/sdk/containerregistry/Azure.Containers.ContainerRegistry/) | +| Conversational Language Understanding | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Language.Conversations-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.0.0/sdk/cognitivelanguage/Azure.AI.Language.Conversations/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.1.0-beta.2/sdk/cognitivelanguage/Azure.AI.Language.Conversations/) | +| Core - Client - AMQP | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Core.Amqp/1.3.0) | [docs](/dotnet/api/overview/azure/Core.Amqp-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core.Amqp_1.3.0/sdk/core/Azure.Core.Amqp/) | +| Core - Client - Core | NuGet [1.31.0](https://www.nuget.org/packages/Azure.Core/1.31.0) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.31.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.31.0/sdk/core/Azure.Core/) | | Cosmos DB | NuGet [4.0.0-preview3](https://www.nuget.org/packages/Azure.Cosmos/4.0.0-preview3) | [docs](/dotnet/api/azure.cosmos) | GitHub [4.0.0-preview3](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/releases/4.0.0-preview3) | -| Data Lake Storage (Gen 2) | NuGet [12.12.1](https://www.nuget.org/packages/Azure.Storage.Files.DataLake/12.12.1) | [docs](/dotnet/api/overview/azure/Storage.Files.DataLake-readme) | GitHub [12.12.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Files.DataLake_12.12.1/sdk/storage/Azure.Storage.Files.DataLake/) | | Data Movement | NuGet [12.0.0-beta.1](https://www.nuget.org/packages/Azure.Storage.DataMovement/12.0.0-beta.1) | | GitHub [12.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement_12.0.0-beta.1/sdk/storage/Azure.Storage.DataMovement/) | -| Dev Center | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Developer.DevCenter/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.DevCenter_1.0.0-beta.1/sdk/devcenter/Azure.Developer.DevCenter/) | +| Dev Center | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Developer.DevCenter/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.DevCenter_1.0.0-beta.2/sdk/devcenter/Azure.Developer.DevCenter/) | +| Device Update | NuGet [1.0.0](https://www.nuget.org/packages/Azure.IoT.DeviceUpdate/1.0.0) | [docs](/dotnet/api/overview/azure/IoT.DeviceUpdate-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.DeviceUpdate_1.0.0/sdk/deviceupdate/Azure.IoT.DeviceUpdate/) | | Digital Twins - Core | NuGet [1.4.0](https://www.nuget.org/packages/Azure.DigitalTwins.Core/1.4.0) | [docs](/dotnet/api/overview/azure/DigitalTwins.Core-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.DigitalTwins.Core_1.4.0/sdk/digitaltwins/Azure.DigitalTwins.Core/) | | Document Translation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Translation.Document/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Translation.Document-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Translation.Document_1.0.0/sdk/translation/Azure.AI.Translation.Document/) | -| Event Grid | NuGet [4.12.0](https://www.nuget.org/packages/Azure.Messaging.EventGrid/4.12.0) | [docs](/dotnet/api/overview/azure/Messaging.EventGrid-readme) | GitHub [4.12.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventGrid_4.12.0/sdk/eventgrid/Azure.Messaging.EventGrid/) | -| Event Hubs | NuGet [5.7.5](https://www.nuget.org/packages/Azure.Messaging.EventHubs/5.7.5) | [docs](/dotnet/api/overview/azure/Messaging.EventHubs-readme) | GitHub [5.7.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventHubs_5.7.5/sdk/eventhub/Azure.Messaging.EventHubs/) | -| Event Hubs - Event Processor | NuGet [5.7.5](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor/5.7.5) | [docs](/dotnet/api/overview/azure/Messaging.EventHubs.Processor-readme) | GitHub [5.7.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventHubs.Processor_5.7.5/sdk/eventhub/Azure.Messaging.EventHubs.Processor/) | -| FarmBeats | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Verticals.AgriFood.Farming/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Verticals.AgriFood.Farming_1.0.0-beta.1/sdk/farmbeats/Azure.Verticals.AgriFood.Farming/) | -| File Shares | NuGet [12.12.1](https://www.nuget.org/packages/Azure.Storage.Files.Shares/12.12.1) | [docs](/dotnet/api/overview/azure/Storage.Files.Shares-readme) | GitHub [12.12.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Files.Shares_12.12.1/sdk/storage/Azure.Storage.Files.Shares/) | +| Event Grid | NuGet [4.14.1](https://www.nuget.org/packages/Azure.Messaging.EventGrid/4.14.1) | [docs](/dotnet/api/overview/azure/Messaging.EventGrid-readme) | GitHub [4.14.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventGrid_4.14.1/sdk/eventgrid/Azure.Messaging.EventGrid/) | +| Event Hubs | NuGet [5.9.0](https://www.nuget.org/packages/Azure.Messaging.EventHubs/5.9.0) | [docs](/dotnet/api/overview/azure/Messaging.EventHubs-readme) | GitHub [5.9.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventHubs_5.9.0/sdk/eventhub/Azure.Messaging.EventHubs/) | +| Event Hubs - Event Processor | NuGet [5.9.0](https://www.nuget.org/packages/Azure.Messaging.EventHubs.Processor/5.9.0) | [docs](/dotnet/api/overview/azure/Messaging.EventHubs.Processor-readme) | GitHub [5.9.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventHubs.Processor_5.9.0/sdk/eventhub/Azure.Messaging.EventHubs.Processor/) | +| FarmBeats | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Verticals.AgriFood.Farming/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Verticals.AgriFood.Farming_1.0.0-beta.2/sdk/agrifood/Azure.Verticals.AgriFood.Farming/) | | Form Recognizer | NuGet [4.0.0](https://www.nuget.org/packages/Azure.AI.FormRecognizer/4.0.0) | [docs](/dotnet/api/overview/azure/AI.FormRecognizer-readme) | GitHub [4.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.FormRecognizer_4.0.0/sdk/formrecognizer/Azure.AI.FormRecognizer/) | -| Identity | NuGet [1.8.1](https://www.nuget.org/packages/Azure.Identity/1.8.1)
NuGet [1.9.0-beta.1](https://www.nuget.org/packages/Azure.Identity/1.9.0-beta.1) | [docs](/dotnet/api/overview/azure/Identity-readme) | GitHub [1.8.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity_1.8.1/sdk/identity/Azure.Identity/)
GitHub [1.9.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity_1.9.0-beta.1/sdk/identity/Azure.Identity/) | -| IoT Device Update | NuGet [1.0.0](https://www.nuget.org/packages/Azure.IoT.DeviceUpdate/1.0.0) | [docs](/dotnet/api/overview/azure/IoT.DeviceUpdate-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.DeviceUpdate_1.0.0/sdk/deviceupdate/Azure.IoT.DeviceUpdate/) | -| Key Encryptor for .NET Data Protection | NuGet [1.1.0](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Keys/1.1.0) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Keys-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Keys_1.1.0/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/) | -| Key Vault - Administration | NuGet [4.2.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/4.2.0)
NuGet [4.3.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/4.3.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Administration-readme) | GitHub [4.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Administration_4.2.0/sdk/keyvault/Azure.Security.KeyVault.Administration/)
GitHub [4.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Administration_4.3.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Administration/) | -| Key Vault - Certificates | NuGet [4.4.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.4.0)
NuGet [4.5.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.5.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Certificates-readme) | GitHub [4.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Certificates_4.4.0/sdk/keyvault/Azure.Security.KeyVault.Certificates/)
GitHub [4.5.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Certificates_4.5.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Certificates/) | -| Key Vault - Keys | NuGet [4.4.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.4.0)
NuGet [4.5.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.5.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Keys-readme) | GitHub [4.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.4.0/sdk/keyvault/Azure.Security.KeyVault.Keys/)
GitHub [4.5.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.5.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Keys/) | -| Key Vault - Secrets | NuGet [4.4.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/4.4.0)
NuGet [4.5.0-beta.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/4.5.0-beta.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Secrets-readme) | GitHub [4.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Secrets_4.4.0/sdk/keyvault/Azure.Security.KeyVault.Secrets/)
GitHub [4.5.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Secrets_4.5.0-beta.1/sdk/keyvault/Azure.Security.KeyVault.Secrets/) | -| Load Testing | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.0.0-beta.1/sdk/loadtestservice/Azure.Developer.LoadTesting/) | +| Health Insights Cancer Profiling | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Health.Insights.CancerProfiling/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Health.Insights.CancerProfiling_1.0.0-beta.1/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/) | +| Health Insights Clinical Matching | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Health.Insights.ClinicalMatching/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Health.Insights.ClinicalMatching_1.0.0-beta.1/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/) | +| Identity | NuGet [1.8.2](https://www.nuget.org/packages/Azure.Identity/1.8.2)
NuGet [1.9.0-beta.2](https://www.nuget.org/packages/Azure.Identity/1.9.0-beta.2) | [docs](/dotnet/api/overview/azure/Identity-readme) | GitHub [1.8.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity_1.8.2/sdk/identity/Azure.Identity/)
GitHub [1.9.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Identity_1.9.0-beta.2/sdk/identity/Azure.Identity/) | +| Image Analysis | NuGet [0.10.0-beta.1](https://www.nuget.org/packages/Azure.AI.Vision.ImageAnalysis/0.10.0-beta.1) | | GitHub [0.10.0-beta.1](https://msasg.visualstudio.com/Skyman/_git/Carbon) | +| Key Vault - Administration | NuGet [4.3.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/4.3.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Administration-readme) | GitHub [4.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Administration_4.3.0/sdk/keyvault/Azure.Security.KeyVault.Administration/) | +| Key Vault - Certificates | NuGet [4.5.1](https://www.nuget.org/packages/Azure.Security.KeyVault.Certificates/4.5.1) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Certificates-readme) | GitHub [4.5.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Certificates_4.5.1/sdk/keyvault/Azure.Security.KeyVault.Certificates/) | +| Key Vault - Keys | NuGet [4.5.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.5.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Keys-readme) | GitHub [4.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.5.0/sdk/keyvault/Azure.Security.KeyVault.Keys/) | +| Key Vault - Secrets | NuGet [4.5.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/4.5.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Secrets-readme) | GitHub [4.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Secrets_4.5.0/sdk/keyvault/Azure.Security.KeyVault.Secrets/) | +| Load Testing | NuGet [1.0.1](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.0.1) | [docs](/dotnet/api/overview/azure/Developer.LoadTesting-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.0.1/sdk/loadtestservice/Azure.Developer.LoadTesting/) | | Maps Common | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Maps.Common/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Common_1.0.0-beta.3/sdk/maps/Azure.Maps.Common/) | | Maps Geolocation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.Geolocation/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Geolocation_1.0.0-beta.1/sdk/maps/Azure.Maps.Geolocation/) | | Maps Render | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.Rendering/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Rendering_1.0.0-beta.1/sdk/maps/Azure.Maps.Rendering/) | @@ -54,187 +49,207 @@ | Media Analytics Edge | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Media.Analytics.Edge/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Media.Analytics.Edge_1.0.0-beta.1/sdk/mediaservices/Azure.Media.Analytics.Edge) | | Metrics Advisor | NuGet [1.1.0](https://www.nuget.org/packages/Azure.AI.MetricsAdvisor/1.1.0) | [docs](/dotnet/api/overview/azure/AI.MetricsAdvisor-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.MetricsAdvisor_1.1.0/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/) | | Mixed Reality Authentication | NuGet [1.2.0](https://www.nuget.org/packages/Azure.MixedReality.Authentication/1.2.0) | [docs](/dotnet/api/overview/azure/MixedReality.Authentication-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.MixedReality.Authentication_1.2.0/sdk/mixedreality/Azure.MixedReality.Authentication/) | -| Monitor Ingestion | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Monitor.Ingestion/1.0.0-beta.4) | | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Ingestion_1.0.0-beta.4/sdk/monitor/Azure.Monitor.Ingestion/) | +| Monitor Ingestion | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Monitor.Ingestion/1.0.0) | [docs](/dotnet/api/overview/azure/Monitor.Ingestion-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Ingestion_1.0.0/sdk/monitor/Azure.Monitor.Ingestion/) | | Monitor Query | NuGet [1.1.0](https://www.nuget.org/packages/Azure.Monitor.Query/1.1.0) | [docs](/dotnet/api/overview/azure/Monitor.Query-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query_1.1.0/sdk/monitor/Azure.Monitor.Query/) | -| OpenTelemetry Exporter | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/1.0.0-beta.6) | | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.Exporter_1.0.0-beta.6/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/) | +| OpenAI Inference | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.AI.OpenAI/1.0.0-beta.5) | | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_1.0.0-beta.5/sdk/openai/Azure.AI.OpenAI/) | +| OpenTelemetry AspNetCore | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.AspNetCore_1.0.0-beta.3/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/) | +| OpenTelemetry Exporter | NuGet [1.0.0-beta.10](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/1.0.0-beta.10) | | GitHub [1.0.0-beta.10](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.Exporter_1.0.0-beta.10/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/) | | Personalizer | NuGet [2.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Personalizer/2.0.0-beta.2) | | GitHub [2.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Personalizer_2.0.0-beta.2/sdk/personalizer/Azure.AI.Personalizer/) | | Purview Account | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.Purview.Account/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Account_1.0.0-beta.1/sdk/purview/Azure.Analytics.Purview.Account/) | | Purview Administration | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.Purview.Administration/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Administration_1.0.0-beta.1/sdk/purview/Azure.Analytics.Purview.Administration/) | | Purview Catalog | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Analytics.Purview.Catalog/1.0.0-beta.4) | | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Catalog_1.0.0-beta.4/sdk/purview/Azure.Analytics.Purview.Catalog/) | | Purview Scanning | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Analytics.Purview.Scanning/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Scanning_1.0.0-beta.2/sdk/purview/Azure.Analytics.Purview.Scanning/) | +| Purview Workflow | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.Purview.Workflows/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Purview.Workflows_1.0.0-beta.1/sdk/purview/Azure.Analytics.Purview.Workflows/) | | Question Answering | NuGet [1.1.0](https://www.nuget.org/packages/Azure.AI.Language.QuestionAnswering/1.1.0) | [docs](/dotnet/api/overview/azure/AI.Language.QuestionAnswering-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.QuestionAnswering_1.1.0/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/) | -| Queues | NuGet [12.12.0](https://www.nuget.org/packages/Azure.Storage.Queues/12.12.0) | [docs](/dotnet/api/overview/azure/Storage.Queues-readme) | GitHub [12.12.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Queues_12.12.0/sdk/storage/Azure.Storage.Queues/) | | Schema Registry | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Data.SchemaRegistry/1.3.0)
NuGet [1.4.0-beta.1](https://www.nuget.org/packages/Azure.Data.SchemaRegistry/1.4.0-beta.1) | [docs](/dotnet/api/overview/azure/Data.SchemaRegistry-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.SchemaRegistry_1.3.0/sdk/schemaregistry/Azure.Data.SchemaRegistry/)
GitHub [1.4.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.SchemaRegistry_1.4.0-beta.1/sdk/schemaregistry/Azure.Data.SchemaRegistry/) | | Schema Registry - Avro | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro_1.0.0/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/) | -| Secrets Configuration Provider for .NET | NuGet [1.2.2](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.Configuration.Secrets/1.2.2) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.Configuration.Secrets-readme) | GitHub [1.2.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.Configuration.Secrets_1.2.2/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/) | -| Service Bus | NuGet [7.12.0](https://www.nuget.org/packages/Azure.Messaging.ServiceBus/7.12.0) | [docs](/dotnet/api/overview/azure/Messaging.ServiceBus-readme) | GitHub [7.12.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.ServiceBus_7.12.0/sdk/servicebus/Azure.Messaging.ServiceBus/) | +| Service Bus | NuGet [7.13.1](https://www.nuget.org/packages/Azure.Messaging.ServiceBus/7.13.1) | [docs](/dotnet/api/overview/azure/Messaging.ServiceBus-readme) | GitHub [7.13.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.ServiceBus_7.13.1/sdk/servicebus/Azure.Messaging.ServiceBus/) | +| Storage - Blobs | NuGet [12.16.0](https://www.nuget.org/packages/Azure.Storage.Blobs/12.16.0) | [docs](/dotnet/api/overview/azure/Storage.Blobs-readme) | GitHub [12.16.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs_12.16.0/sdk/storage/Azure.Storage.Blobs/) | +| Storage - Blobs Batch | NuGet [12.13.0](https://www.nuget.org/packages/Azure.Storage.Blobs.Batch/12.13.0) | [docs](/dotnet/api/overview/azure/Storage.Blobs.Batch-readme) | GitHub [12.13.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.Batch_12.13.0/sdk/storage/Azure.Storage.Blobs.Batch/) | +| Storage - Blobs ChangeFeed | NuGet [12.0.0-preview.34](https://www.nuget.org/packages/Azure.Storage.Blobs.ChangeFeed/12.0.0-preview.34) | | GitHub [12.0.0-preview.34](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.ChangeFeed_12.0.0-preview.34/sdk/storage/Azure.Storage.Blobs.ChangeFeed/) | +| Storage - Files Data Lake | NuGet [12.14.0](https://www.nuget.org/packages/Azure.Storage.Files.DataLake/12.14.0) | [docs](/dotnet/api/overview/azure/Storage.Files.DataLake-readme) | GitHub [12.14.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Files.DataLake_12.14.0/sdk/storage/Azure.Storage.Files.DataLake/) | +| Storage - Files Share | NuGet [12.14.0](https://www.nuget.org/packages/Azure.Storage.Files.Shares/12.14.0) | [docs](/dotnet/api/overview/azure/Storage.Files.Shares-readme) | GitHub [12.14.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Files.Shares_12.14.0/sdk/storage/Azure.Storage.Files.Shares/) | +| Storage - Queues | NuGet [12.14.0](https://www.nuget.org/packages/Azure.Storage.Queues/12.14.0) | [docs](/dotnet/api/overview/azure/Storage.Queues-readme) | GitHub [12.14.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Queues_12.14.0/sdk/storage/Azure.Storage.Queues/) | | Synapse - AccessControl | NuGet [1.0.0-preview.5](https://www.nuget.org/packages/Azure.Analytics.Synapse.AccessControl/1.0.0-preview.5) | | GitHub [1.0.0-preview.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.AccessControl_1.0.0-preview.5/sdk/synapse/Azure.Analytics.Synapse.AccessControl/) | | Synapse - Artifacts | NuGet [1.0.0-preview.17](https://www.nuget.org/packages/Azure.Analytics.Synapse.Artifacts/1.0.0-preview.17) | | GitHub [1.0.0-preview.17](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Artifacts_1.0.0-preview.17/sdk/synapse/Azure.Analytics.Synapse.Artifacts/) | | Synapse - Managed Private Endpoints | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.Analytics.Synapse.ManagedPrivateEndpoints/1.0.0-beta.5) | | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.ManagedPrivateEndpoints_1.0.0-beta.5/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/) | | Synapse - Monitoring | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Analytics.Synapse.Monitoring/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Monitoring_1.0.0-beta.3/sdk/synapse/Azure.Analytics.Synapse.Monitoring/) | | Synapse - Spark | NuGet [1.0.0-preview.8](https://www.nuget.org/packages/Azure.Analytics.Synapse.Spark/1.0.0-preview.8) | | GitHub [1.0.0-preview.8](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Spark_1.0.0-preview.8/sdk/synapse/Azure.Analytics.Synapse.Spark/) | -| Tables | NuGet [12.7.1](https://www.nuget.org/packages/Azure.Data.Tables/12.7.1) | [docs](/dotnet/api/overview/azure/Data.Tables-readme) | GitHub [12.7.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.Tables_12.7.1/sdk/tables/Azure.Data.Tables/) | -| Text Analytics | NuGet [5.2.0](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.2.0)
NuGet [5.3.0-beta.1](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.3.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.TextAnalytics-readme) | GitHub [5.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.2.0/sdk/textanalytics/Azure.AI.TextAnalytics/)
GitHub [5.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.3.0-beta.1/sdk/textanalytics/Azure.AI.TextAnalytics/) | +| Tables | NuGet [12.8.0](https://www.nuget.org/packages/Azure.Data.Tables/12.8.0) | [docs](/dotnet/api/overview/azure/Data.Tables-readme) | GitHub [12.8.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.Tables_12.8.0/sdk/tables/Azure.Data.Tables/) | +| Text Analytics | NuGet [5.2.0](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.2.0)
NuGet [5.3.0-beta.3](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.3.0-beta.3) | [docs](/dotnet/api/overview/azure/AI.TextAnalytics-readme) | GitHub [5.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.2.0/sdk/textanalytics/Azure.AI.TextAnalytics/)
GitHub [5.3.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.3.0-beta.3/sdk/textanalytics/Azure.AI.TextAnalytics/) | | Video Analyzer Edge | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.Media.VideoAnalyzer.Edge/1.0.0-beta.6) | | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Media.VideoAnalyzer.Edge_1.0.0-beta.6/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/) | +| Vision Core | NuGet [0.10.0-beta.1](https://www.nuget.org/packages/Azure.AI.Vision.Core/0.10.0-beta.1) | | GitHub [0.10.0-beta.1](https://msasg.visualstudio.com/Skyman/_git/Carbon) | | Web PubSub | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub/1.3.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub_1.3.0/sdk/webpubsub/Azure.Messaging.WebPubSub/) | -| Web PubSub Client | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0-beta.1/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) | +| Web PubSub Client | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0-beta.2/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) | +| Azure client library integration for ASP.NET Core | NuGet [1.6.3](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.6.3) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.6.3](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.6.3/sdk/extensions/Microsoft.Extensions.Azure/) | +| Blob Storage Key Store for .NET Data Protection | NuGet [1.3.2](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.3.2) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.3.2/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) | | CloudNative CloudEvents with Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents_1.0.0/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/) | | Core - Client - Spatial | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.1.0/sdk/core/Microsoft.Azure.Core.Spatial/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.2.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial/) | | Core - Client - Spatial Newtonsoft Json | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial.NewtonsoftJson/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial.NewtonsoftJson/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial.NewtonsoftJson-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial.NewtonsoftJson_1.0.0/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial.NewtonsoftJson_1.1.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/) | -| Functions extension for Azure Tables | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Tables/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Tables-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.Tables_1.0.0/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/) | +| Functions extension for Azure Tables | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Tables/1.1.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Tables-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.Tables_1.1.0/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/) | +| Key Encryptor for .NET Data Protection | NuGet [1.2.2](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Keys/1.2.2) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Keys-readme) | GitHub [1.2.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Keys_1.2.2/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/) | +| Secrets Configuration Provider for .NET | NuGet [1.2.2](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.Configuration.Secrets/1.2.2) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.Configuration.Secrets-readme) | GitHub [1.2.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.Configuration.Secrets_1.2.2/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/) | +| Storage - Common | NuGet [12.15.0](https://www.nuget.org/packages/Azure.Storage.Common/12.15.0) | [docs](/dotnet/api/overview/azure/Storage.Common-readme) | GitHub [12.15.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Common_12.15.0/sdk/storage/Azure.Storage.Common/) | | WebJobs Extensions - Event Grid | NuGet [3.2.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventGrid/3.2.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventGrid-readme) | GitHub [3.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventGrid_3.2.1/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/) | -| WebJobs Extensions - Event Hubs | NuGet [5.1.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventHubs/5.1.2) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventHubs-readme) | GitHub [5.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventHubs_5.1.2/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/) | -| WebJobs Extensions - Service Bus | NuGet [5.8.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ServiceBus/5.8.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.ServiceBus-readme) | GitHub [5.8.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.ServiceBus_5.8.1/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/) | -| WebJobs Extensions - SignalR Service | NuGet [1.9.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SignalRService/1.9.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.SignalRService-readme) | GitHub [1.9.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/SignalRServiceExtension) | -| WebJobs Extensions - Storage | NuGet [5.0.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage/5.0.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage-readme) | GitHub [5.0.1](https://github.com/Azure/azure-webjobs-sdk/tree/master/src/Microsoft.Azure.WebJobs.Extensions.Storage) | -| WebJobs Extensions - Web PubSub | NuGet [1.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.WebPubSub/1.3.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.WebPubSub-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.WebPubSub_1.3.0/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSub/) | -| Resource Management - Advisor | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Advisor/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Advisor_1.0.0-beta.1/sdk/advisor/Azure.ResourceManager.Advisor/) | -| Resource Management - Agrifood | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.AgFoodPlatform/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AgFoodPlatform_1.0.0-beta.1/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/) | -| Resource Management - Alerts Management | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.AlertsManagement/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AlertsManagement-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AlertsManagement_1.0.0/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/) | -| Resource Management - Analysis | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Analysis/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Analysis-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Analysis_1.0.0/sdk/analysisservices/Azure.ResourceManager.Analysis/) | -| Resource Management - API Management | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ApiManagement/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ApiManagement-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApiManagement_1.0.0/sdk/apimanagement/Azure.ResourceManager.ApiManagement/) | -| Resource Management - App Compliance Automation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.AppComplianceAutomation/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppComplianceAutomation_1.0.0-beta.1/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/) | +| WebJobs Extensions - Event Hubs | NuGet [5.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventHubs/5.3.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventHubs-readme) | GitHub [5.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventHubs_5.3.0/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/) | +| WebJobs Extensions - Service Bus | NuGet [5.9.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ServiceBus/5.9.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.ServiceBus-readme) | GitHub [5.9.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.ServiceBus_5.9.0/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/) | +| WebJobs Extensions - SignalR Service | NuGet [1.10.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SignalRService/1.10.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.SignalRService-readme) | GitHub [1.10.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/SignalRServiceExtension) | +| WebJobs Extensions - Storage | NuGet [5.1.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage/5.1.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage-readme) | GitHub [5.1.1](https://github.com/Azure/azure-webjobs-sdk/tree/master/src/Microsoft.Azure.WebJobs.Extensions.Storage) | +| WebJobs Extensions - Web PubSub | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.WebPubSub/1.4.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.WebPubSub-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.WebPubSub_1.4.0/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSub/) | +| Resource Management - Advisor | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Advisor/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Advisor_1.0.0-beta.2/sdk/advisor/Azure.ResourceManager.Advisor/) | +| Resource Management - Agrifood | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.AgFoodPlatform/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AgFoodPlatform_1.0.0-beta.2/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/) | +| Resource Management - Alerts Management | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.AlertsManagement/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.AlertsManagement-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AlertsManagement_1.0.1/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/) | +| Resource Management - Analysis | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Analysis/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Analysis-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Analysis_1.0.1/sdk/analysisservices/Azure.ResourceManager.Analysis/) | +| Resource Management - API Management | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ApiManagement/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ApiManagement-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApiManagement_1.0.1/sdk/apimanagement/Azure.ResourceManager.ApiManagement/) | +| Resource Management - App Compliance Automation | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.AppComplianceAutomation/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppComplianceAutomation_1.0.0-beta.2/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/) | | Resource Management - App Configuration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.AppConfiguration/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AppConfiguration-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppConfiguration_1.0.0/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/) | -| Resource Management - App Platform | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.AppPlatform/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AppPlatform-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppPlatform_1.0.0/sdk/appplatform/Azure.ResourceManager.AppPlatform/) | -| Resource Management - App Service | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.AppService/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.AppService-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppService_1.0.0/sdk/websites/Azure.ResourceManager.AppService/) | -| Resource Management - Application Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.0.0-beta.1/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/) | -| Resource Management - Arc ScVmm | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ArcScVmm/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ArcScVmm_1.0.0-beta.1/sdk/arc-scvmm/Azure.ResourceManager.ArcScVmm/) | -| Resource Management - Attestation | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Attestation/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Attestation_1.0.0-beta.1/sdk/attestation/Azure.ResourceManager.Attestation/) | -| Resource Management - Authorization | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Authorization/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Authorization-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Authorization_1.0.0/sdk/authorization/Azure.ResourceManager.Authorization/) | -| Resource Management - Automanage | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Automanage/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Automanage_1.0.0-beta.1/sdk/automanage/Azure.ResourceManager.Automanage/) | -| Resource Management - Automation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Automation/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Automation-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Automation_1.0.0/sdk/automation/Azure.ResourceManager.Automation/) | -| Resource Management - Avs | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Avs/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Avs-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Avs_1.1.0/sdk/avs/Azure.ResourceManager.Avs/) | -| Resource Management - Azure Stack HCI | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Hci/1.0.0)
NuGet [2.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci/2.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Hci-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci_1.0.0/sdk/azurestackhci/Azure.ResourceManager.Hci/)
GitHub [2.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci_2.0.0-beta.1/sdk/azurestackhci/Azure.ResourceManager.Hci/) | -| Resource Management - Backup | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServicesBackup/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServicesBackup_1.0.0-beta.1/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/) | -| Resource Management - Batch | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Batch/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Batch-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Batch_1.1.0/sdk/batch/Azure.ResourceManager.Batch/) | -| Resource Management - Billing | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Billing/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Billing-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Billing_1.0.0/sdk/billing/Azure.ResourceManager.Billing/) | +| Resource Management - App Platform | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.AppPlatform/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.AppPlatform-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppPlatform_1.0.2/sdk/appplatform/Azure.ResourceManager.AppPlatform/) | +| Resource Management - App Service | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.AppService/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.AppService-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppService_1.0.1/sdk/websites/Azure.ResourceManager.AppService/) | +| Resource Management - Application Insights | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ApplicationInsights/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ApplicationInsights_1.0.0-beta.2/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/) | +| Resource Management - Arc ScVmm | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ArcScVmm/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ArcScVmm_1.0.0-beta.2/sdk/arc-scvmm/Azure.ResourceManager.ArcScVmm/) | +| Resource Management - Attestation | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Attestation/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Attestation_1.0.0-beta.2/sdk/attestation/Azure.ResourceManager.Attestation/) | +| Resource Management - Authorization | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Authorization/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Authorization-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Authorization_1.0.1/sdk/authorization/Azure.ResourceManager.Authorization/) | +| Resource Management - Automanage | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Automanage/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Automanage-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Automanage_1.0.0/sdk/automanage/Azure.ResourceManager.Automanage/) | +| Resource Management - Automation | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Automation/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Automation-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Automation_1.0.1/sdk/automation/Azure.ResourceManager.Automation/) | +| Resource Management - Azure Stack HCI | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci/1.0.1)
NuGet [2.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci/2.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Hci-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci_1.0.1/sdk/azurestackhci/Azure.ResourceManager.Hci/)
GitHub [2.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci_2.0.0-beta.1/sdk/azurestackhci/Azure.ResourceManager.Hci/) | +| Resource Management - Azure VMware Solution | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Avs/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Avs-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Avs_1.1.1/sdk/avs/Azure.ResourceManager.Avs/) | +| Resource Management - Backup | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServicesBackup/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.RecoveryServicesBackup-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServicesBackup_1.0.0/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/) | +| Resource Management - Batch | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Batch/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Batch-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Batch_1.1.1/sdk/batch/Azure.ResourceManager.Batch/) | +| Resource Management - Billing | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Billing/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Billing-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Billing_1.0.1/sdk/billing/Azure.ResourceManager.Billing/) | | Resource Management - Billing Benefits | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.BillingBenefits/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.BillingBenefits_1.0.0-beta.1/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/) | -| Resource Management - Blueprint | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Blueprint/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Blueprint_1.0.0-beta.1/sdk/blueprint/Azure.ResourceManager.Blueprint/) | -| Resource Management - Bot Service | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.BotService/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.BotService_1.0.0-beta.1/sdk/botservice/Azure.ResourceManager.BotService/) | -| Resource Management - Change Analysis | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ChangeAnalysis/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ChangeAnalysis-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ChangeAnalysis_1.0.0/sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis/) | -| Resource Management - Chaos | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Chaos/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Chaos_1.0.0-beta.2/sdk/chaos/Azure.ResourceManager.Chaos/) | -| Resource Management - Cognitive Search | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Search/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Search-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Search_1.0.0/sdk/search/Azure.ResourceManager.Search/) | -| Resource Management - Cognitive Services | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.CognitiveServices/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.CognitiveServices-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CognitiveServices_1.1.0/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/) | -| Resource Management - Communication | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.0.0)
NuGet [1.1.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.1.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.Communication-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.0.0/sdk/communication/Azure.ResourceManager.Communication/)
GitHub [1.1.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.1.0-beta.5/sdk/communication/Azure.ResourceManager.Communication/) | -| Resource Management - Compute | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Compute/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Compute-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Compute_1.0.1/sdk/compute/Azure.ResourceManager.Compute/) | -| Resource Management - Confidential Ledger | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ConfidentialLedger/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ConfidentialLedger-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ConfidentialLedger_1.0.0/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/) | -| Resource Management - Confluent | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Confluent/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Confluent-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Confluent_1.0.0/sdk/confluent/Azure.ResourceManager.Confluent/) | -| Resource Management - Connected VMware vSphere | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.ConnectedVMwarevSphere/1.0.0-beta.5) | | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ConnectedVMwarevSphere_1.0.0-beta.5/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/) | -| Resource Management - Consumption | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Consumption/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Consumption-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Consumption_1.0.0/sdk/consumption/Azure.ResourceManager.Consumption/) | -| Resource Management - Container Apps | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.AppContainers/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.AppContainers-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppContainers_1.0.1/sdk/containerapps/Azure.ResourceManager.AppContainers/) | -| Resource Management - Container Instances | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ContainerInstance/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerInstance-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerInstance_1.0.1/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/) | -| Resource Management - Container Registry | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.ContainerRegistry/1.0.2)
NuGet [1.1.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.ContainerRegistry/1.1.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerRegistry-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerRegistry_1.0.2/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/)
GitHub [1.1.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerRegistry_1.1.0-beta.3/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/) | -| Resource Management - Container Service | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerService-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.1.0/sdk/containerservice/Azure.ResourceManager.ContainerService/) | -| Resource Management - Content Delivery Network | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.0.1/sdk/cdn/Azure.ResourceManager.Cdn/) | -| Resource Management - Core | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager/1.3.2) | [docs](/dotnet/api/overview/azure/ResourceManager-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager_1.3.2/sdk/resourcemanager/Azure.ResourceManager/) | -| Resource Management - Cosmos DB | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.2.0/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) | -| Resource Management - Customer Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.CustomerInsights/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CustomerInsights_1.0.0-beta.1/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/) | -| Resource Management - Data Box | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataBox/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataBox-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataBox_1.0.0/sdk/databox/Azure.ResourceManager.DataBox/) | -| Resource Management - Data Box Edge | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataBoxEdge/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataBoxEdge-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataBoxEdge_1.0.0/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/) | +| Resource Management - Blueprint | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Blueprint/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Blueprint_1.0.0-beta.2/sdk/blueprint/Azure.ResourceManager.Blueprint/) | +| Resource Management - Bot Service | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.BotService/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.BotService-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.BotService_1.0.1/sdk/botservice/Azure.ResourceManager.BotService/) | +| Resource Management - Change Analysis | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ChangeAnalysis/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ChangeAnalysis-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ChangeAnalysis_1.0.1/sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis/) | +| Resource Management - Chaos | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.Chaos/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Chaos_1.0.0-beta.3/sdk/chaos/Azure.ResourceManager.Chaos/) | +| Resource Management - Cognitive Search | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Search/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Search-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Search_1.1.0/sdk/search/Azure.ResourceManager.Search/) | +| Resource Management - Cognitive Services | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.CognitiveServices/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.CognitiveServices-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/) | +| Resource Management - Communication | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Communication/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Communication-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Communication_1.1.0/sdk/communication/Azure.ResourceManager.Communication/) | +| Resource Management - Compute | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Compute/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Compute-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Compute_1.1.0/sdk/compute/Azure.ResourceManager.Compute/) | +| Resource Management - Confidential Ledger | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ConfidentialLedger/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ConfidentialLedger-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ConfidentialLedger_1.0.1/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/) | +| Resource Management - Confluent | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Confluent/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Confluent-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Confluent_1.0.1/sdk/confluent/Azure.ResourceManager.Confluent/) | +| Resource Management - Connected VMware vSphere | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.ResourceManager.ConnectedVMwarevSphere/1.0.0-beta.6) | | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ConnectedVMwarevSphere_1.0.0-beta.6/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/) | +| Resource Management - Consumption | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Consumption/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Consumption-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Consumption_1.0.1/sdk/consumption/Azure.ResourceManager.Consumption/) | +| Resource Management - Container Apps | NuGet [1.0.3](https://www.nuget.org/packages/Azure.ResourceManager.AppContainers/1.0.3) | [docs](/dotnet/api/overview/azure/ResourceManager.AppContainers-readme) | GitHub [1.0.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.AppContainers_1.0.3/sdk/containerapps/Azure.ResourceManager.AppContainers/) | +| Resource Management - Container Instances | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ContainerInstance/1.0.1)
NuGet [1.1.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.ContainerInstance/1.1.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerInstance-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerInstance_1.0.1/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/)
GitHub [1.1.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerInstance_1.1.0-beta.3/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/) | +| Resource Management - Container Registry | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerRegistry/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerRegistry-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerRegistry_1.1.0/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/) | +| Resource Management - Container Service | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerService-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.1.0/sdk/containerservice/Azure.ResourceManager.ContainerService/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.2.0-beta.1/sdk/containerservice/Azure.ResourceManager.ContainerService/) | +| Resource Management - Content Delivery Network | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.1.0/sdk/cdn/Azure.ResourceManager.Cdn/) | +| Resource Management - Core | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager_1.4.0/sdk/resourcemanager/Azure.ResourceManager/) | +| Resource Management - Cosmos DB | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.2.1/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) | +| Resource Management - Customer Insights | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.CustomerInsights/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CustomerInsights_1.0.0-beta.2/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/) | +| Resource Management - Data Box | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DataBox/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataBox-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataBox_1.0.1/sdk/databox/Azure.ResourceManager.DataBox/) | +| Resource Management - Data Box Edge | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DataBoxEdge/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataBoxEdge-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataBoxEdge_1.0.1/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/) | | Resource Management - Data Factory | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DataFactory/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataFactory_1.0.0-beta.2/sdk/datafactory/Azure.ResourceManager.DataFactory/) | -| Resource Management - Data Migration | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DataMigration/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataMigration_1.0.0-beta.1/sdk/datamigration/Azure.ResourceManager.DataMigration/) | -| Resource Management - Data Protection | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataProtectionBackup/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataProtectionBackup-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataProtectionBackup_1.0.0/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/) | -| Resource Management - Data Share | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataShare/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataShare-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataShare_1.0.0/sdk/datashare/Azure.ResourceManager.DataShare/) | -| Resource Management - Datadog | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0-beta.1/sdk/datadog/Azure.ResourceManager.Datadog/) | -| Resource Management - DataLake Analytics | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeAnalytics/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataLakeAnalytics-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeAnalytics_1.0.0/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/) | -| Resource Management - DataLake Store | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeStore/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DataLakeStore-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeStore_1.0.0/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/) | -| Resource Management - Deployment Manager | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DeploymentManager/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeploymentManager_1.0.0-beta.1/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/) | -| Resource Management - Desktop Virtualization | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DesktopVirtualization/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DesktopVirtualization-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DesktopVirtualization_1.0.0/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/) | -| Resource Management - Dev Center | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DevCenter/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevCenter_1.0.0-beta.1/sdk/devcenter/Azure.ResourceManager.DevCenter/) | -| Resource Management - Dev Spaces | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DevSpaces/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevSpaces_1.0.0-beta.1/sdk/devspaces/Azure.ResourceManager.DevSpaces/) | -| Resource Management - Device Provisioning Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DeviceProvisioningServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DeviceProvisioningServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeviceProvisioningServices_1.0.0/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/) | -| Resource Management - Device Update | NuGet [1.0.0-beta.7](https://www.nuget.org/packages/Azure.ResourceManager.DeviceUpdate/1.0.0-beta.7) | | GitHub [1.0.0-beta.7](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeviceUpdate_1.0.0-beta.7/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/) | -| Resource Management - DevTest Labs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DevTestLabs/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DevTestLabs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevTestLabs_1.0.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/) | -| Resource Management - Digital Twins | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DigitalTwins/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DigitalTwins-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DigitalTwins_1.1.0/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/) | -| Resource Management - DNS | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Dns-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.0.0/sdk/dns/Azure.ResourceManager.Dns/) | -| Resource Management - DNS Resolver | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DnsResolver/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DnsResolver-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DnsResolver_1.0.0/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/) | -| Resource Management - Dynatrace | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Dynatrace/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Dynatrace-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dynatrace_1.0.0/sdk/dynatrace/Azure.ResourceManager.Dynatrace/) | -| Resource Management - Edge Order | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.EdgeOrder/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.EdgeOrder-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EdgeOrder_1.0.0/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/) | -| Resource Management - Elastic | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Elastic/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Elastic_1.0.0-beta.1/sdk/elastic/Azure.ResourceManager.Elastic/) | -| Resource Management - ElasticSan | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ElasticSan/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ElasticSan_1.0.0-beta.1/sdk/elasticsan/Azure.ResourceManager.ElasticSan/) | -| Resource Management - Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.EventGrid/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.EventGrid-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventGrid_1.0.0/sdk/eventgrid/Azure.ResourceManager.EventGrid/) | -| Resource Management - Event Hubs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.EventHubs/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.EventHubs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventHubs_1.0.0/sdk/eventhub/Azure.ResourceManager.EventHubs/) | -| Resource Management - Extended Location | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ExtendedLocations/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ExtendedLocations-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ExtendedLocations_1.0.0/sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/) | -| Resource Management - Fluid Relay | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.FluidRelay/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.FluidRelay-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.FluidRelay_1.0.0/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/) | -| Resource Management - Front Door | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.FrontDoor/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.FrontDoor-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.FrontDoor_1.0.0/sdk/frontdoor/Azure.ResourceManager.FrontDoor/) | -| Resource Management - Guest Configuration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.GuestConfiguration/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.GuestConfiguration-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GuestConfiguration_1.0.0/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/) | -| Resource Management - HDInsight | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.0.0/sdk/hdinsight/Azure.ResourceManager.HDInsight/) | -| Resource Management - Health Bot | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthBot/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthBot-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthBot_1.0.0/sdk/healthbot/Azure.ResourceManager.HealthBot/) | -| Resource Management - Healthcare APIs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthcareApis/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthcareApis-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthcareApis_1.0.0/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/) | -| Resource Management - Hybrid Compute | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.HybridCompute/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridCompute_1.0.0-beta.1/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/) | -| Resource Management - Hybrid Connectivity | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.HybridConnectivity/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridConnectivity_1.0.0-beta.1/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/) | -| Resource Management - Hybrid Data | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HybridData/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HybridData-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridData_1.0.0/sdk/hybriddatamanager/Azure.ResourceManager.HybridData/) | -| Resource Management - Hybrid Kubernetes | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Kubernetes/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kubernetes_1.0.0-beta.1/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/) | -| Resource Management - IoT Central | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.IotCentral/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.IotCentral-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotCentral_1.0.0/sdk/iotcentral/Azure.ResourceManager.IotCentral/) | -| Resource Management - IoT Hub | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.IotHub/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.IotHub-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotHub_1.0.0/sdk/iothub/Azure.ResourceManager.IotHub/) | -| Resource Management - Key Vault | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.KeyVault/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KeyVault-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KeyVault_1.0.0/sdk/keyvault/Azure.ResourceManager.KeyVault/) | -| Resource Management - Kubernetes Configuration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.KubernetesConfiguration/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KubernetesConfiguration-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KubernetesConfiguration_1.0.0/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/) | -| Resource Management - Kusto | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.Kusto/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Kusto-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kusto_1.2.0/sdk/kusto/Azure.ResourceManager.Kusto/) | -| Resource Management - Lab Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.LabServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.LabServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LabServices_1.0.0/sdk/labservices/Azure.ResourceManager.LabServices/) | -| Resource Management - Load Testing | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.LoadTesting/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LoadTesting_1.0.0-beta.2/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/) | -| Resource Management - Logic | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Logic/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Logic-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Logic_1.0.0/sdk/logic/Azure.ResourceManager.Logic/) | -| Resource Management - Machine Learning | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearning/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MachineLearning-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearning_1.0.0/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/) | -| Resource Management - Machine Learning Compute | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearningCompute/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearningCompute_1.0.0-beta.1/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/) | -| Resource Management - Maintenance | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Maintenance/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Maintenance-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maintenance_1.0.0/sdk/maintenance/Azure.ResourceManager.Maintenance/) | -| Resource Management - Managed Grafana | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Grafana-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.0.0/sdk/grafana/Azure.ResourceManager.Grafana/) | -| Resource Management - Managed Network | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ManagedNetwork/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedNetwork_1.0.0-beta.1/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/) | -| Resource Management - Managed Service Identity | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServiceIdentities/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServiceIdentities/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServiceIdentities-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServiceIdentities_1.0.0/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServiceIdentities_1.1.0-beta.1/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/) | -| Resource Management - Managed Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServices_1.0.0/sdk/managedservices/Azure.ResourceManager.ManagedServices/) | -| Resource Management - Management Partner | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ManagementPartner/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagementPartner_1.0.0-beta.1/sdk/managementpartner/Azure.ResourceManager.ManagementPartner/) | -| Resource Management - Maps | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Maps/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Maps-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maps_1.0.0/sdk/maps/Azure.ResourceManager.Maps/) | -| Resource Management - Marketplace | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Marketplace/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Marketplace-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Marketplace_1.0.0/sdk/marketplace/Azure.ResourceManager.Marketplace/) | -| Resource Management - Marketplace Ordering | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.MarketplaceOrdering/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MarketplaceOrdering-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MarketplaceOrdering_1.0.0/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/) | -| Resource Management - Media | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Media/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Media-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Media_1.0.0/sdk/mediaservices/Azure.ResourceManager.Media/) | -| Resource Management - MixedReality | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.MixedReality/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MixedReality-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MixedReality_1.0.0/sdk/mixedreality/Azure.ResourceManager.MixedReality/) | -| Resource Management - Monitor | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Monitor/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Monitor-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Monitor_1.0.0/sdk/monitor/Azure.ResourceManager.Monitor/) | -| Resource Management - MySQL | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.MySql/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MySql-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MySql_1.0.0/sdk/mysql/Azure.ResourceManager.MySql/) | -| Resource Management - Net App | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.NetApp/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.NetApp-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetApp_1.0.0/sdk/netapp/Azure.ResourceManager.NetApp/) | -| Resource Management - Network | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Network/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Network-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Network_1.1.0/sdk/network/Azure.ResourceManager.Network/) | -| Resource Management - Network Function | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.NetworkFunction/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetworkFunction_1.0.0-beta.1/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/) | +| Resource Management - Data Lake Analytics | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeAnalytics/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeAnalytics/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataLakeAnalytics-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeAnalytics_1.0.0/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeAnalytics_1.1.0-beta.1/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/) | +| Resource Management - Data Lake Store | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeStore/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.DataLakeStore/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataLakeStore-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeStore_1.0.0/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataLakeStore_1.1.0-beta.1/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/) | +| Resource Management - Data Migration | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DataMigration/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataMigration_1.0.0-beta.2/sdk/datamigration/Azure.ResourceManager.DataMigration/) | +| Resource Management - Data Protection | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.DataProtectionBackup/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataProtectionBackup-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataProtectionBackup_1.1.1/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/) | +| Resource Management - Data Share | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DataShare/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DataShare-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DataShare_1.0.1/sdk/datashare/Azure.ResourceManager.DataShare/) | +| Resource Management - Datadog | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Datadog/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Datadog_1.0.0-beta.2/sdk/datadog/Azure.ResourceManager.Datadog/) | +| Resource Management - Deployment Manager | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DeploymentManager/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeploymentManager_1.0.0-beta.2/sdk/deploymentmanager/Azure.ResourceManager.DeploymentManager/) | +| Resource Management - Desktop Virtualization | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DesktopVirtualization/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DesktopVirtualization-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DesktopVirtualization_1.0.1/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/) | +| Resource Management - Dev Center | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DevCenter/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevCenter_1.0.0-beta.2/sdk/devcenter/Azure.ResourceManager.DevCenter/) | +| Resource Management - Dev Spaces | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.DevSpaces/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevSpaces_1.0.0-beta.2/sdk/devspaces/Azure.ResourceManager.DevSpaces/) | +| Resource Management - Device Provisioning Services | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.DeviceProvisioningServices/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DeviceProvisioningServices-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeviceProvisioningServices_1.1.0/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/) | +| Resource Management - Device Update | NuGet [1.0.0-beta.8](https://www.nuget.org/packages/Azure.ResourceManager.DeviceUpdate/1.0.0-beta.8) | | GitHub [1.0.0-beta.8](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DeviceUpdate_1.0.0-beta.8/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/) | +| Resource Management - DevTest Labs | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DevTestLabs/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DevTestLabs-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DevTestLabs_1.0.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/) | +| Resource Management - Digital Twins | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.DigitalTwins/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.DigitalTwins-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DigitalTwins_1.2.0/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/) | +| Resource Management - DNS | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Dns/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dns-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dns_1.0.1/sdk/dns/Azure.ResourceManager.Dns/) | +| Resource Management - DNS Resolver | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.DnsResolver/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.DnsResolver-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.DnsResolver_1.0.1/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/) | +| Resource Management - Dynatrace | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Dynatrace/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Dynatrace-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Dynatrace_1.0.1/sdk/dynatrace/Azure.ResourceManager.Dynatrace/) | +| Resource Management - Edge Order | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.EdgeOrder/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.EdgeOrder-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EdgeOrder_1.0.1/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/) | +| Resource Management - Elastic | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Elastic/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Elastic_1.0.0-beta.2/sdk/elastic/Azure.ResourceManager.Elastic/) | +| Resource Management - ElasticSan | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ElasticSan/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ElasticSan_1.0.0-beta.2/sdk/elasticsan/Azure.ResourceManager.ElasticSan/) | +| Resource Management - Event Grid | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.EventGrid/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.EventGrid-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventGrid_1.0.1/sdk/eventgrid/Azure.ResourceManager.EventGrid/) | +| Resource Management - Event Hubs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.EventHubs/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.EventHubs/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.EventHubs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventHubs_1.0.0/sdk/eventhub/Azure.ResourceManager.EventHubs/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.EventHubs_1.1.0-beta.1/sdk/eventhub/Azure.ResourceManager.EventHubs/) | +| Resource Management - Extended Location | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ExtendedLocations/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ExtendedLocations-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ExtendedLocations_1.0.1/sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/) | +| Resource Management - Fluid Relay | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.FluidRelay/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.FluidRelay-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.FluidRelay_1.0.1/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/) | +| Resource Management - Front Door | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.FrontDoor/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.FrontDoor-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.FrontDoor_1.1.0/sdk/frontdoor/Azure.ResourceManager.FrontDoor/) | +| Resource Management - Graphservices | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.GraphServices/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GraphServices_1.0.0-beta.1/sdk/graphservices/Azure.ResourceManager.GraphServices/) | +| Resource Management - Guest Configuration | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.GuestConfiguration/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.GuestConfiguration-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GuestConfiguration_1.0.1/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/) | +| Resource Management - HDInsight | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.0.1/sdk/hdinsight/Azure.ResourceManager.HDInsight/) | +| Resource Management - Health Bot | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.HealthBot/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthBot-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthBot_1.0.1/sdk/healthbot/Azure.ResourceManager.HealthBot/) | +| Resource Management - Healthcare APIs | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.HealthcareApis/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthcareApis-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthcareApis_1.0.1/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/) | +| Resource Management - Hybrid Compute | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.HybridCompute/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridCompute_1.0.0-beta.2/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/) | +| Resource Management - Hybrid Connectivity | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.HybridConnectivity/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridConnectivity_1.0.0-beta.2/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/) | +| Resource Management - Hybrid Data | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.HybridData/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HybridData-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridData_1.0.1/sdk/hybriddatamanager/Azure.ResourceManager.HybridData/) | +| Resource Management - Hybrid Kubernetes | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Kubernetes/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kubernetes_1.0.0-beta.2/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/) | +| Resource Management - Hybridcontainerservice | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.HybridContainerService/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HybridContainerService_1.0.0-beta.1/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/) | +| Resource Management - IoT Central | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.IotCentral/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.IotCentral-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotCentral_1.0.1/sdk/iotcentral/Azure.ResourceManager.IotCentral/) | +| Resource Management - IoT Hub | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.IotHub/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.IotHub-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.IotHub_1.0.1/sdk/iothub/Azure.ResourceManager.IotHub/) | +| Resource Management - Key Vault | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.KeyVault/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KeyVault-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KeyVault_1.1.0/sdk/keyvault/Azure.ResourceManager.KeyVault/) | +| Resource Management - Kubernetes Configuration | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.KubernetesConfiguration/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.KubernetesConfiguration-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.KubernetesConfiguration_1.1.0/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/) | +| Resource Management - Kusto | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.Kusto/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Kusto-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Kusto_1.3.0/sdk/kusto/Azure.ResourceManager.Kusto/) | +| Resource Management - Lab Services | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.LabServices/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.LabServices-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LabServices_1.0.1/sdk/labservices/Azure.ResourceManager.LabServices/) | +| Resource Management - Load Testing | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.LoadTesting/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.LoadTesting-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.LoadTesting_1.0.1/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/) | +| Resource Management - Logic | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Logic/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Logic-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Logic_1.0.1/sdk/logic/Azure.ResourceManager.Logic/) | +| Resource Management - Machine Learning | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearning/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.MachineLearning-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearning_1.1.0/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/) | +| Resource Management - Machine Learning Compute | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.MachineLearningCompute/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MachineLearningCompute_1.0.0-beta.2/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/) | +| Resource Management - Maintenance | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.Maintenance/1.1.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Maintenance-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maintenance_1.1.2/sdk/maintenance/Azure.ResourceManager.Maintenance/) | +| Resource Management - Managed Grafana | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Grafana/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Grafana-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Grafana_1.0.1/sdk/grafana/Azure.ResourceManager.Grafana/) | +| Resource Management - Managed Network | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ManagedNetwork/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedNetwork_1.0.0-beta.2/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/) | +| Resource Management - Managed Service Identity | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServiceIdentities/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServiceIdentities-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServiceIdentities_1.1.0/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/) | +| Resource Management - Managed Services | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ManagedServices/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ManagedServices-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagedServices_1.0.1/sdk/managedservices/Azure.ResourceManager.ManagedServices/) | +| Resource Management - Management Partner | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ManagementPartner/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ManagementPartner_1.0.0-beta.2/sdk/managementpartner/Azure.ResourceManager.ManagementPartner/) | +| Resource Management - Maps | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Maps/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Maps-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Maps_1.0.1/sdk/maps/Azure.ResourceManager.Maps/) | +| Resource Management - Marketplace | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Marketplace/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Marketplace-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Marketplace_1.0.1/sdk/marketplace/Azure.ResourceManager.Marketplace/) | +| Resource Management - Marketplace Ordering | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.MarketplaceOrdering/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.MarketplaceOrdering-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MarketplaceOrdering_1.0.1/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/) | +| Resource Management - Media | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.Media/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Media-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Media_1.2.0/sdk/mediaservices/Azure.ResourceManager.Media/) | +| Resource Management - Mixed Reality | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.MixedReality/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.MixedReality-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MixedReality_1.0.1/sdk/mixedreality/Azure.ResourceManager.MixedReality/) | +| Resource Management - Mobile Network | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.MobileNetwork/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MobileNetwork_1.0.0-beta.1/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/) | +| Resource Management - Monitor | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Monitor/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Monitor-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Monitor_1.1.0/sdk/monitor/Azure.ResourceManager.Monitor/) | +| Resource Management - MySQL | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.MySql/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.MySql-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.MySql_1.0.1/sdk/mysql/Azure.ResourceManager.MySql/) | +| Resource Management - NetApp Files | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.NetApp/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.NetApp-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetApp_1.1.0/sdk/netapp/Azure.ResourceManager.NetApp/) | +| Resource Management - Network | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Network/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Network-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Network_1.1.1/sdk/network/Azure.ResourceManager.Network/) | +| Resource Management - Network Function | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.NetworkFunction/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NetworkFunction_1.0.0-beta.2/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/) | | Resource Management - Nginx | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Nginx/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Nginx_1.0.0-beta.1/sdk/nginx/Azure.ResourceManager.Nginx/) | -| Resource Management - Notification Hubs | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.NotificationHubs/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.NotificationHubs-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NotificationHubs_1.0.0/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/) | -| Resource Management - Operational Insights | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.OperationalInsights/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.OperationalInsights-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.OperationalInsights_1.0.0/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/) | -| Resource Management - Orbital | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Orbital/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Orbital-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Orbital_1.0.0/sdk/orbital/Azure.ResourceManager.Orbital/) | -| Resource Management - Peering | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Peering/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Peering-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Peering_1.1.0/sdk/peering/Azure.ResourceManager.Peering/) | -| Resource Management - Policy Insights | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.PolicyInsights/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PolicyInsights-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PolicyInsights_1.0.0/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/) | -| Resource Management - PostgreSQL | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.PostgreSql/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PostgreSql-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PostgreSql_1.0.0/sdk/postgresql/Azure.ResourceManager.PostgreSql/) | -| Resource Management - Power BI Dedicated | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.PowerBIDedicated/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PowerBIDedicated_1.0.0-beta.1/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/) | -| Resource Management - Private DNS | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.PrivateDns/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PrivateDns-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PrivateDns_1.0.0/sdk/privatedns/Azure.ResourceManager.PrivateDns/) | -| Resource Management - Provider Hub | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ProviderHub/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ProviderHub_1.0.0-beta.1/sdk/providerhub/Azure.ResourceManager.ProviderHub/) | -| Resource Management - Purview | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Purview/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Purview-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Purview_1.0.0/sdk/purview/Azure.ResourceManager.Purview/) | -| Resource Management - Quantum | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Quantum/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quantum_1.0.0-beta.1/sdk/quantum/Azure.ResourceManager.Quantum/) | -| Resource Management - Quota | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Quota/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quota_1.0.0-beta.1/sdk/quota/Azure.ResourceManager.Quota/) | -| Resource Management - Recovery Services | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServices/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServices_1.0.0-beta.1/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/) | -| Resource Management - Redis | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Redis/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Redis-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Redis_1.1.0/sdk/redis/Azure.ResourceManager.Redis/) | -| Resource Management - Redis Enterprise | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.RedisEnterprise/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.RedisEnterprise-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RedisEnterprise_1.0.0/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/) | -| Resource Management - Redis Enterprise Cache | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.RedisEnterpriseCache/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RedisEnterpriseCache_1.0.0-beta.1/sdk/redisenterprise/Azure.ResourceManager.RedisEnterpriseCache/) | -| Resource Management - Relay | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Relay/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Relay-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Relay_1.1.0/sdk/relay/Azure.ResourceManager.Relay/) | -| Resource Management - Reservations | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Reservations/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Reservations-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Reservations_1.1.0/sdk/reservations/Azure.ResourceManager.Reservations/) | +| Resource Management - Notification Hubs | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.NotificationHubs/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.NotificationHubs-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.NotificationHubs_1.0.1/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/) | +| Resource Management - Operational Insights | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.OperationalInsights/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.OperationalInsights-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.OperationalInsights_1.1.0/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/) | +| Resource Management - Orbital | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Orbital/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Orbital-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Orbital_1.0.1/sdk/orbital/Azure.ResourceManager.Orbital/) | +| Resource Management - Peering | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Peering/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Peering-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Peering_1.1.1/sdk/peering/Azure.ResourceManager.Peering/) | +| Resource Management - Policy Insights | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.PolicyInsights/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PolicyInsights-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PolicyInsights_1.1.0/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/) | +| Resource Management - PostgreSQL | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.PostgreSql/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PostgreSql-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PostgreSql_1.1.1/sdk/postgresql/Azure.ResourceManager.PostgreSql/) | +| Resource Management - Power BI Dedicated | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.PowerBIDedicated/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PowerBIDedicated_1.0.0-beta.2/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/) | +| Resource Management - Private DNS | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.PrivateDns/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PrivateDns-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PrivateDns_1.0.1/sdk/privatedns/Azure.ResourceManager.PrivateDns/) | +| Resource Management - Provider Hub | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ProviderHub/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ProviderHub-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ProviderHub_1.0.0/sdk/providerhub/Azure.ResourceManager.ProviderHub/) | +| Resource Management - Purview | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Purview/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Purview-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Purview_1.0.1/sdk/purview/Azure.ResourceManager.Purview/) | +| Resource Management - Quantum | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Quantum/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quantum_1.0.0-beta.2/sdk/quantum/Azure.ResourceManager.Quantum/) | +| Resource Management - Qumulo | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Qumulo/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Qumulo_1.0.0-beta.1/sdk/qumulo/Azure.ResourceManager.Qumulo/) | +| Resource Management - Quota | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Quota/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quota_1.0.0-beta.2/sdk/quota/Azure.ResourceManager.Quota/) | +| Resource Management - Recovery Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.RecoveryServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServices_1.0.0/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/) | +| Resource Management - Redis | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Redis/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Redis-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Redis_1.1.1/sdk/redis/Azure.ResourceManager.Redis/) | +| Resource Management - Redis Enterprise | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.RedisEnterprise/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.RedisEnterprise-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RedisEnterprise_1.0.1/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/) | +| Resource Management - Redis Enterprise | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.RedisEnterpriseCache/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RedisEnterpriseCache_1.0.0-beta.1/sdk/redisenterprise/Azure.ResourceManager.RedisEnterpriseCache/) | +| Resource Management - Relay | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Relay/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Relay-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Relay_1.1.1/sdk/relay/Azure.ResourceManager.Relay/) | +| Resource Management - Reservations | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.Reservations/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Reservations-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Reservations_1.3.0/sdk/reservations/Azure.ResourceManager.Reservations/) | +| Resource Management - Resource Graph | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ResourceGraph/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ResourceGraph-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceGraph_1.0.1/sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/) | | Resource Management - Resource Mover | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Migrate/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Migrate_1.0.0-beta.1/sdk/resourcemover/Azure.ResourceManager.Migrate/) | -| Resource Management - Resource Mover | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ResourceMover/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ResourceMover-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceMover_1.0.0/sdk/resourcemover/Azure.ResourceManager.ResourceMover/) | -| Resource Management - ResourceGraph | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ResourceGraph/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ResourceGraph-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceGraph_1.0.0/sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/) | -| Resource Management - Resources | NuGet [1.3.1](https://www.nuget.org/packages/Azure.ResourceManager.Resources/1.3.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Resources-readme) | GitHub [1.3.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Resources_1.3.1/sdk/resources/Azure.ResourceManager.Resources/) | -| Resource Management - Security Center | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SecurityCenter/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SecurityCenter-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityCenter_1.0.0/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/) | -| Resource Management - Security DevOps | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.SecurityDevOps/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityDevOps_1.0.0-beta.1/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/) | -| Resource Management - Security Insights | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SecurityInsights/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SecurityInsights-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityInsights_1.0.0/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/) | -| Resource Management - Service Bus | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceBus-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.0.0/sdk/servicebus/Azure.ResourceManager.ServiceBus/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.1.0-beta.1/sdk/servicebus/Azure.ResourceManager.ServiceBus/) | -| Resource Management - Service Fabric | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabric/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabric-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabric_1.0.0/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/) | -| Resource Management - Service Fabric Managed Clusters | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabricManagedClusters-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.0.0/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/) | -| Resource Management - Service Linker | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceLinker/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceLinker-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceLinker_1.0.1/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/) | -| Resource Management - SignalR | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SignalR/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SignalR-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SignalR_1.0.0/sdk/signalr/Azure.ResourceManager.SignalR/) | +| Resource Management - Resource Mover | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ResourceMover/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ResourceMover-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceMover_1.0.1/sdk/resourcemover/Azure.ResourceManager.ResourceMover/) | +| Resource Management - Resourcehealth | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ResourceHealth/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ResourceHealth_1.0.0-beta.1/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/) | +| Resource Management - Resources | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.Resources/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Resources-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Resources_1.4.0/sdk/resources/Azure.ResourceManager.Resources/) | +| Resource Management - Security | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.SecurityCenter/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SecurityCenter-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityCenter_1.1.0/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/) | +| Resource Management - Security DevOps | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.SecurityDevOps/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityDevOps_1.0.0-beta.2/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/) | +| Resource Management - Security Insights | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.SecurityInsights/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.SecurityInsights-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SecurityInsights_1.0.1/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/) | +| Resource Management - Service Bus | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.ServiceBus/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceBus-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.0.0/sdk/servicebus/Azure.ResourceManager.ServiceBus/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceBus_1.1.0-beta.2/sdk/servicebus/Azure.ResourceManager.ServiceBus/) | +| Resource Management - Service Fabric | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabric/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabric-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabric_1.0.1/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/) | +| Resource Management - Service Fabric Managed Clusters | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceFabricManagedClusters/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceFabricManagedClusters-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceFabricManagedClusters_1.0.1/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/) | +| Resource Management - Service Linker | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.ServiceLinker/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.ServiceLinker-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceLinker_1.0.2/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/) | +| Resource Management - Servicenetworking | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.ServiceNetworking/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ServiceNetworking_1.0.0-beta.1/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/) | +| Resource Management - SignalR | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.SignalR/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.SignalR-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SignalR_1.0.1/sdk/signalr/Azure.ResourceManager.SignalR/) | | Resource Management - Site Recovery | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServicesSiteRecovery/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServicesSiteRecovery_1.0.0-beta.2/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/) | | Resource Management - SQL | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.Sql/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Sql-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Sql_1.2.0/sdk/sqlmanagement/Azure.ResourceManager.Sql/) | -| Resource Management - SQL Virtual Machine | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.SqlVirtualMachine/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.SqlVirtualMachine-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SqlVirtualMachine_1.0.0/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/) | -| Resource Management - Storage | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Storage/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Storage-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Storage_1.1.0/sdk/storage/Azure.ResourceManager.Storage/) | -| Resource Management - Storage Cache | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.StorageCache/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageCache-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageCache_1.0.0/sdk/storagecache/Azure.ResourceManager.StorageCache/) | -| Resource Management - Storage Pool | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.StoragePool/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StoragePool-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StoragePool_1.0.0/sdk/storagepool/Azure.ResourceManager.StoragePool/) | -| Resource Management - Storage Sync | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.StorageSync/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageSync-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageSync_1.1.0/sdk/storagesync/Azure.ResourceManager.StorageSync/) | -| Resource Management - Storagemover | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.StorageMover/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageMover_1.0.0-beta.1/sdk/storagemover/Azure.ResourceManager.StorageMover/) | -| Resource Management - Stream Analytics | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.StreamAnalytics/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StreamAnalytics-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StreamAnalytics_1.1.0/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/) | -| Resource Management - Subscriptions | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Subscription/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Subscription-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Subscription_1.0.0/sdk/subscription/Azure.ResourceManager.Subscription/) | -| Resource Management - Support | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Support/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Support-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Support_1.0.0/sdk/support/Azure.ResourceManager.Support/) | -| Resource Management - Synapse | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Synapse/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Synapse-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Synapse_1.1.0/sdk/synapse/Azure.ResourceManager.Synapse/) | -| Resource Management - Traffic Manager | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.TrafficManager-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.0.0/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.1.0-beta.1/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/) | -| Resource Management - Web PubSub | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.WebPubSub/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.WebPubSub-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WebPubSub_1.0.0/sdk/webpubsub/Azure.ResourceManager.WebPubSub/) | -| Resource Management - Workload Monitor | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadMonitor/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadMonitor_1.0.0-beta.1/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/) | -| Resource Management - Workloads | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Workloads/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Workloads_1.0.0-beta.1/sdk/workloads/Azure.ResourceManager.Workloads/) | +| Resource Management - SQL Virtual Machine | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.SqlVirtualMachine/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.SqlVirtualMachine-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.SqlVirtualMachine_1.0.1/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/) | +| Resource Management - Storage | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Storage/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Storage-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Storage_1.1.1/sdk/storage/Azure.ResourceManager.Storage/) | +| Resource Management - Storage Cache | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.StorageCache/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageCache-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageCache_1.1.0/sdk/storagecache/Azure.ResourceManager.StorageCache/) | +| Resource Management - Storage Mover | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.StorageMover/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageMover-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageMover_1.0.1/sdk/storagemover/Azure.ResourceManager.StorageMover/) | +| Resource Management - Storage Pool | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.StoragePool/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.StoragePool-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StoragePool_1.0.1/sdk/storagepool/Azure.ResourceManager.StoragePool/) | +| Resource Management - Storage Sync | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.StorageSync/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.StorageSync-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StorageSync_1.1.1/sdk/storagesync/Azure.ResourceManager.StorageSync/) | +| Resource Management - Stream Analytics | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.StreamAnalytics/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.StreamAnalytics-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.StreamAnalytics_1.1.1/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/) | +| Resource Management - Subscriptions | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Subscription/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Subscription-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Subscription_1.0.1/sdk/subscription/Azure.ResourceManager.Subscription/) | +| Resource Management - Support | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.Support/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Support-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Support_1.0.1/sdk/support/Azure.ResourceManager.Support/) | +| Resource Management - Synapse | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Synapse/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Synapse-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Synapse_1.1.1/sdk/synapse/Azure.ResourceManager.Synapse/) | +| Resource Management - Traffic Manager | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.0.0)
NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.TrafficManager-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.0.0/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/)
GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.1.0-beta.2/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/) | +| Resource Management - Voiceservices | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.VoiceServices/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VoiceServices_1.0.0-beta.1/sdk/voiceservices/Azure.ResourceManager.VoiceServices/) | +| Resource Management - Web PubSub | NuGet [1.0.1](https://www.nuget.org/packages/Azure.ResourceManager.WebPubSub/1.0.1) | [docs](/dotnet/api/overview/azure/ResourceManager.WebPubSub-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WebPubSub_1.0.1/sdk/webpubsub/Azure.ResourceManager.WebPubSub/) | +| Resource Management - Workload Monitor | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadMonitor/1.0.0-beta.2) | | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadMonitor_1.0.0-beta.2/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/) | +| Resource Management - Workloads | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.Workloads/1.0.0-beta.3) | | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Workloads_1.0.0-beta.3/sdk/workloads/Azure.ResourceManager.Workloads/) | diff --git a/docs/azure/install-azure-cli.md b/docs/azure/install-azure-cli.md index 2c75d31e8539e..b062625056ef1 100644 --- a/docs/azure/install-azure-cli.md +++ b/docs/azure/install-azure-cli.md @@ -1,18 +1,19 @@ --- title: Installing the Azure CLI description: Azure developers will need the Azure CLI installed, so this article describes why you need the CLI and where to download and install it from. -ms.date: 11/30/2020 ms.topic: conceptual -ms.custom: devx-track-dotnet -author: DavidCBerry13 +ms.custom: devx-track-dotnet, engagement-fy23, devx-track-azurecli +ms.date: 1/26/2023 +author: alexwolfmsft +ms.author: alexwolf recommendations: false --- # Install the Azure CLI -In addition to the Azure Portal, Azure also offers the [Azure CLI](/cli/azure/) as a command-line tool to create and manage Azure resources. The Azure CLI offers the benefits of efficiency, repeatability, and the ability to script recurring tasks. +In addition to the Azure portal, Azure also offers the [Azure CLI](/cli/azure/) as a command-line tool to create and manage Azure resources. The Azure CLI offers the benefits of efficiency, repeatability, and the ability to script recurring tasks. -In practice, most developers use both the Azure Portal and the Azure CLI. Where as the Azure Portal is useful when exploring new services and getting an overview of all of the resources in your Azure account, most developers find the Azure CLI to be faster and more efficient. The Azure CLI can often accomplish in a single command what takes multiple steps in the Azure Portal. In addition, since Azure CLI commands can be saved to a file, developers can assure that recurrent tasks are run the same way each time. +In practice, most developers use both the Azure portal and the Azure CLI. Whereas the Azure portal is useful when exploring new services and getting an overview of all of the resources in your Azure account, most developers find the Azure CLI to be faster and more efficient. The Azure CLI can often accomplish in a single command what takes multiple steps in the Azure portal. In addition, since Azure CLI commands can be saved to a file, you can ensure that recurrent tasks are run the same way each time. The Azure CLI is available for Windows, macOS, and Linux. @@ -25,12 +26,12 @@ The Azure CLI is available for Windows, macOS, and Linux. > [!div class="nextstepaction"] > [Install the Azure CLI for Linux](/cli/azure/install-azure-cli-linux) -### Azure Cloud Shell +## Azure Cloud Shell -You can also use the Azure CLI in the Azure Cloud Shell at [https://shell.azure.com](https://shell.azure.com). The Azure Cloud Shell is a fully functional, browser-based shell for managing Azure resources. The Azure Cloud Shell is useful when you need a command line environment but are working on a device where you are unable to install the Azure CLI. +You can also use the Azure CLI in the Azure Cloud Shell at [https://shell.azure.com](https://shell.azure.com). The Azure Cloud Shell is a fully functional, browser-based shell for managing Azure resources. The Azure Cloud Shell is useful when you need a command line environment but are working on a device where you're unable to install the Azure CLI. ![Screenshot of the Azure Cloud Shell running in a browser](media/azure-cloud-shell.png) -### Next steps +## Next steps -Next, you will want to [install additional Azure tools](./azure-tools.md) like Azure Storage Explorer and Azure Data Studio to make you more productive with Azure. +Next, you'll want to [install other Azure tools](./azure-tools.md) like Azure Storage Explorer and Azure Data Studio to make you more productive with Azure. diff --git a/docs/azure/intro.md b/docs/azure/intro.md index 7fd572410ffe7..467cdb0976755 100644 --- a/docs/azure/intro.md +++ b/docs/azure/intro.md @@ -1,10 +1,9 @@ --- title: Get started with Azure and .NET description: Learn the basics you need to know about Azure and .NET. -ms.date: 05/05/2021 +ms.date: 03/23/2023 ms.topic: overview -ms.custom: devx-track-dotnet -author: DavidCBerry13 +ms.custom: devx-track-dotnet, engagement-fy23 --- # Introduction to Azure and .NET diff --git a/docs/azure/key-azure-services.md b/docs/azure/key-azure-services.md index 642fc7d5e44b7..0a6ad4051f1c9 100644 --- a/docs/azure/key-azure-services.md +++ b/docs/azure/key-azure-services.md @@ -1,10 +1,9 @@ --- title: Key Azure Services for .NET developers description: Azure has over 100 services, but this article focuses on the ~8 or so services used by .NET developers most frequently -ms.date: 06/01/2021 +ms.date: 03/23/2023 ms.topic: conceptual -ms.custom: devx-track-dotnet -author: DavidCBerry13 +ms.custom: devx-track-dotnet, engagement-fy23 --- # Key Azure Services for .NET developers @@ -14,6 +13,7 @@ While Azure contains over 100 services, the following Azure services are the ser | Icon | Service | Description | |:----:|:--------|:------------| | ![App Service Icon](./media/app-services.svg) | **Azure App Service** | Azure App Service is a fully managed platform for hosting web applications and APIs in Azure. It features automatic load balancing and auto-scaling in a highly available environment. You pay only for the compute resources you use and free tiers are available. | +| ![Container Apps Icon](./media/container-apps.svg) | **Azure Container Apps** | Azure Container Apps are fully managed environments that enable you to run microservices and containerized applications on a serverless platform. Applications built on Container Apps provide scalability, resiliency, and other advantages of complex container orchestrators while leaving behind many of the complexities. | | ![Azure Functions Icon](./media/azure-functions.svg) | **Azure Functions** | Azure Functions is a serverless compute service that lets you write small, discrete segments of code that can be executed in a scalable and cost-effective manner, all without managing any servers or runtimes. Functions can be invoked by a variety of different events and easily integrate with other Azure services through the use of input and output bindings. | | ![Azure SQL Icon](./media/azure-sql.svg) | **Azure SQL** | Azure SQL is a fully managed cloud based version of SQL Server. Azure automatically performs traditional administrative tasks like patching and backups for you and features built-in high availability. | | ![Cosmos DB Icon](./media/cosmos-db.svg) | **Azure Cosmos DB** | Azure Cosmos DB is a fully managed NoSQL database with single digit response times, automatic scaling, and a MongoDB compatible API. | diff --git a/docs/azure/media/container-apps.svg b/docs/azure/media/container-apps.svg new file mode 100644 index 0000000000000..0cf1d6ac651c6 --- /dev/null +++ b/docs/azure/media/container-apps.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/azure/sdk/authentication-additional-methods.md b/docs/azure/sdk/authentication-additional-methods.md index 7144fd0b8e4fc..d1b907f9d58a8 100644 --- a/docs/azure/sdk/authentication-additional-methods.md +++ b/docs/azure/sdk/authentication-additional-methods.md @@ -1,9 +1,9 @@ --- title: Additional methods to authenticate to Azure resources from .NET apps description: This article describes additional, less common methods you can use to authenticate your .NET app to Azure resources. -ms.date: 05/05/2022 ms.topic: how-to -ms.custom: devx-track-dotnet +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 2/28/2023 --- # Additional methods to authenticate to Azure resources from .NET apps diff --git a/docs/azure/sdk/authentication-azure-hosted-apps.md b/docs/azure/sdk/authentication-azure-hosted-apps.md index 6bc5092952495..31c80f581e660 100644 --- a/docs/azure/sdk/authentication-azure-hosted-apps.md +++ b/docs/azure/sdk/authentication-azure-hosted-apps.md @@ -1,9 +1,9 @@ --- title: Authenticating Azure-hosted apps to Azure resources with the Azure SDK for .NET description: This article covers how to configure authentication for apps to Azure services when the app is hosted in an Azure service like Azure App Service, Azure Functions, or Azure Virtual Machines. -ms.date: 05/05/2022 ms.topic: how-to -ms.custom: devx-track-dotnet +ms.custom: devx-track-dotnet, engagement-fy23, devx-track-azurecli +ms.date: 2/28/2023 --- # Authenticating Azure-hosted apps to Azure resources with the Azure SDK for .NET diff --git a/docs/azure/sdk/authentication-local-development-dev-accounts.md b/docs/azure/sdk/authentication-local-development-dev-accounts.md index 5008d456d3c20..05b157d2b28d6 100644 --- a/docs/azure/sdk/authentication-local-development-dev-accounts.md +++ b/docs/azure/sdk/authentication-local-development-dev-accounts.md @@ -1,9 +1,9 @@ --- title: Authenticate .NET apps to Azure services during local development using developer accounts description: This article describes how to authenticate your application to Azure services when using the Azure SDK for .NET during local development using developer accounts. -ms.date: 05/05/2022 ms.topic: how-to -ms.custom: devx-track-dotnet +ms.custom: devx-track-dotnet, engagement-fy23, devx-track-azurecli +ms.date: 2/28/2023 --- # Authenticate .NET apps to Azure services during local development using developer accounts diff --git a/docs/azure/sdk/authentication-local-development-service-principal.md b/docs/azure/sdk/authentication-local-development-service-principal.md index 22afd3f50a4fc..01f343b8c94be 100644 --- a/docs/azure/sdk/authentication-local-development-service-principal.md +++ b/docs/azure/sdk/authentication-local-development-service-principal.md @@ -1,9 +1,9 @@ --- title: Authenticate .NET apps to Azure services during local development using service principals description: This article describes how to authenticate your application to Azure services when using the Azure SDK for NET during local development using dedicated application service principals. -ms.date: 05/05/2022 ms.topic: how-to -ms.custom: devx-track-dotnet +ms.custom: devx-track-dotnet, engagement-fy23, devx-track-azurecli +ms.date: 2/28/2023 --- # Authenticate NET apps to Azure services during local development using service principals diff --git a/docs/azure/sdk/authentication-on-premises-apps.md b/docs/azure/sdk/authentication-on-premises-apps.md index e4cee48e2e4ba..710260093e91e 100644 --- a/docs/azure/sdk/authentication-on-premises-apps.md +++ b/docs/azure/sdk/authentication-on-premises-apps.md @@ -1,9 +1,9 @@ --- title: Authenticate to Azure resources from .NET apps hosted on-premises description: This article describes how to authenticate your application to Azure services when using the Azure SDK for .NET in on-premises hosted applications. -ms.date: 05/05/2022 ms.topic: how-to -ms.custom: devx-track-dotnet +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 2/28/2023 --- # Authenticate to Azure resources from .NET apps hosted on-premises diff --git a/docs/azure/sdk/authentication.md b/docs/azure/sdk/authentication.md index e49b63c8ae8ac..88fa1213a2e18 100644 --- a/docs/azure/sdk/authentication.md +++ b/docs/azure/sdk/authentication.md @@ -1,9 +1,9 @@ --- title: How to authenticate .NET applications with Azure services description: How to acquire the necessary credential objects to authenticate a .NET application with Azure services by using the Azure .NET SDK -ms.date: 05/05/2022 ms.topic: conceptual -ms.custom: devx-track-dotnet +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 2/28/2023 --- # How to authenticate .NET apps to Azure services using the .NET Azure SDK @@ -65,9 +65,7 @@ When an application is run on a developer's workstation during local development Internally, `DefaultAzureCredential` implements a chain of credential providers for authenticating applications to Azure resources. Each credential provider is able to detect if credentials of that type are configured for the app. `DefaultAzureCredential` sequentially checks each provider in order and uses the credentials from the first provider that has credentials configured. -The order in which `DefaultAzureCredential` looks for credentials is shown in the diagram and table below. - -:::image type="content" source="./media/authentication-defaultazurecredential.png" alt-text="A diagram showing the `DefaultAzureCredential` sequence checks to see what authentication source is configured for an application." lightbox="./media/default-azure-credential-sequence-diagram.png"::: +The order and locations in which `DefaultAzureCredential` looks for credentials is found at [DefaultAzureCredential](/dotnet/api/overview/azure/identity-readme?view=azure-dotnet&preserve-view=true#defaultazurecredential). | Credential type | Description | |-------------------------------|-------------| diff --git a/docs/azure/sdk/azure-sdk-configure-proxy.md b/docs/azure/sdk/azure-sdk-configure-proxy.md index 4b32e7c6cf5c7..3b93d7354fd4a 100644 --- a/docs/azure/sdk/azure-sdk-configure-proxy.md +++ b/docs/azure/sdk/azure-sdk-configure-proxy.md @@ -1,9 +1,9 @@ --- title: Configure a proxy server when using the Azure SDK for .NET description: Use HTTP[S]_PROXY environment variables to define a proxy for the Azure SDK for .NET -ms.date: 12/10/2020 ms.topic: conceptual -ms.custom: devx-track-dotnet +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 3/23/2023 --- # Configure a proxy server when using the Azure SDK for .NET diff --git a/docs/azure/sdk/azure-sdk-for-dotnet.md b/docs/azure/sdk/azure-sdk-for-dotnet.md index eea8dcec7ba34..54e5f55c8f1e8 100644 --- a/docs/azure/sdk/azure-sdk-for-dotnet.md +++ b/docs/azure/sdk/azure-sdk-for-dotnet.md @@ -1,9 +1,9 @@ --- title: Azure SDK for .NET Overview description: Provides an overview of what the Azure SDK for .NET is and the basic steps to use the SDK in a .NET application -ms.date: 09/02/2021 -ms.custom: devx-track-dotnet -author: DavidCBerry13 +ms.topic: conceptual +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 3/23/2023 --- # Azure SDK for .NET overview diff --git a/docs/azure/sdk/dependency-injection.md b/docs/azure/sdk/dependency-injection.md index 7f1aa2a988e9c..824654783f63d 100644 --- a/docs/azure/sdk/dependency-injection.md +++ b/docs/azure/sdk/dependency-injection.md @@ -1,8 +1,9 @@ --- title: Dependency injection with the Azure SDK for .NET description: Learn how to use dependency injection with the Azure SDK for .NET client libraries. -ms.date: 05/20/2021 -author: pakrym +ms.topic: how-to +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 2/28/2023 --- # Dependency injection with the Azure SDK for .NET diff --git a/docs/azure/sdk/includes/enable-managed-identity-azure-cli.md b/docs/azure/sdk/includes/enable-managed-identity-azure-cli.md index da60e46d69071..9dbcfd974debc 100644 --- a/docs/azure/sdk/includes/enable-managed-identity-azure-cli.md +++ b/docs/azure/sdk/includes/enable-managed-identity-azure-cli.md @@ -1,3 +1,6 @@ +--- +ms.custom: devx-track-azurecli +--- #### [Azure App Service](#tab/azure-app-service) ```azurecli diff --git a/docs/azure/sdk/includes/implement-defaultazurecredential.md b/docs/azure/sdk/includes/implement-defaultazurecredential.md index 1c1a28e41b20d..9a5efca5adad3 100644 --- a/docs/azure/sdk/includes/implement-defaultazurecredential.md +++ b/docs/azure/sdk/includes/implement-defaultazurecredential.md @@ -1,8 +1,6 @@ `DefaultAzureCredential` supports multiple authentication methods and determines the authentication method being used at runtime. In this way, your app can use different authentication methods in different environments without implementing environment specific code. -The order and locations in which `DefaultAzureCredential` looks for credentials is shown in the diagram and table below. - -:::image type="content" source="../media/authentication-defaultazurecredential.png" alt-text="A diagram showing the sequence in which DefaultAzureCredential checks to see what authentication source is configured for an application." lightbox="../media/default-azure-credential-sequence-diagram.png"::: +The order and locations in which `DefaultAzureCredential` looks for credentials is found at [DefaultAzureCredential](/dotnet/api/overview/azure/identity-readme?view=azure-dotnet&preserve-view=true#defaultazurecredential). To implement `DefaultAzureCredential`, first add the [`Azure.Identity`](/dotnet/api/azure.identity) and optionally the [`Microsoft.Extensions.Azure`](/dotnet/api/microsoft.extensions.azure) packages to your application. You can do this using either the command line or the NuGet Package Manager. @@ -43,7 +41,7 @@ builder.Services.AddAzureClients(x => }); ``` -Alternatively, you can also utilize DefaultAzureCredential in your services more directly without the help of additional Azure registration methods, as seen below. +Alternatively, you can also utilize `DefaultAzureCredential` in your services more directly without the help of additional Azure registration methods, as seen below. ```c# using Azure.Identity; diff --git a/docs/azure/sdk/includes/set-environment-variables.md b/docs/azure/sdk/includes/set-environment-variables.md deleted file mode 100644 index fe57728e305ab..0000000000000 --- a/docs/azure/sdk/includes/set-environment-variables.md +++ /dev/null @@ -1,83 +0,0 @@ -The `DefaultAzureCredential` object will look for service principal credentials in a set of environment variables at runtime. There are multiple ways to configure environment variables when working with .NET depending on your tooling and environment. - -Regardless of which approach you choose, you will need to configure the following environment variables when working with a service principal. - -- `AZURE_CLIENT_ID` → The app ID value. -- `AZURE_TENANT_ID` → The tenant ID value. -- `AZURE_CLIENT_SECRET` → The password/credential generated for the app. - -### [Visual Studio](#tab/visual-studio) - -When working locally with Visual Studio, environment variables can be set in the `launchsettings.json` file in the `Properties` folder of your project. When the app starts up, these values will be pulled in automatically. Keep in mind these configurations do not travel with your application when it gets deployed, so you will still need to setup environment variables on your target hosting environment. - -```json -"profiles": { - "SampleProject": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "applicationUrl": "https://localhost:7177;http://localhost:5177", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "AZURE_CLIENT_ID": "00000000-0000-0000-0000-000000000000", - "AZURE_TENANT_ID":"11111111-1111-1111-1111-111111111111", - "AZURE_CLIENT_SECRET": "=abcdefghijklmnopqrstuvwxyz" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "AZURE_CLIENT_ID": "00000000-0000-0000-0000-000000000000", - "AZURE_TENANT_ID": "11111111-1111-1111-1111-111111111111", - "AZURE_CLIENT_SECRET": "=abcdefghijklmnopqrstuvwxyz" - } - } - } -``` - -### [VS Code](#tab/vs-code) - -When working locally with Visual Studio Code, environment variables can be set in the `launch.json` file of your project. When the app starts up, these values will be pulled in automatically. Keep in mind these configurations do not travel with your application when it gets deployed, so you will still need to setup environment variables on your target hosting environment. - -```json -"configurations": [ -{ - "env": { - "ASPNETCORE_ENVIRONMENT": "Development", - "AZURE_CLIENT_ID": "00000000-0000-0000-0000-000000000000", - "AZURE_TENANT_ID":"11111111-1111-1111-1111-111111111111", - "AZURE_CLIENT_SECRET": "=abcdefghijklmnopqrstuvwxyz" - } -} -``` - -### [Windows](#tab/windows) - -You can easily set environment variables for Windows from the command line. Windows environment variables can be used for both local development or for hosting environments. However, remember that when using this approach the values will apply to all applications running on that operating system and may cause conflicts if you are not careful. - -```bash -setx AZURE_CLIENT_ID "00000000-0000-0000-0000-000000000000" -setx AZURE_TENANT_ID "11111111-1111-1111-1111-111111111111" -setx AZURE_CLIENT_SECRET "=abcdefghijklmnopqrstuvwxyz" -``` - -Alternatively, if your app is hosted in IIS you can also set environment variables per app. This can be configured using the applicationHost.config file. - -```xml - - - - - - - - - - - - -``` - ---- diff --git a/docs/azure/sdk/logging.md b/docs/azure/sdk/logging.md index 355966f120479..d911342905a26 100644 --- a/docs/azure/sdk/logging.md +++ b/docs/azure/sdk/logging.md @@ -1,10 +1,9 @@ --- title: Logging with the Azure SDK for .NET description: Learn how to enable logging with the Azure SDK for .NET client libraries -ms.date: 11/11/2022 -ms.custom: devx-track-dotnet -ms.author: casoper -author: camsoper +ms.date: 2/28/2023 +ms.custom: devx-track-dotnet, engagement-fy23 +ms.topic: how-to --- # Logging with the Azure SDK for .NET diff --git a/docs/azure/sdk/media/authentication-defaultazurecredential.png b/docs/azure/sdk/media/authentication-defaultazurecredential.png deleted file mode 100644 index 9878b613a7024..0000000000000 Binary files a/docs/azure/sdk/media/authentication-defaultazurecredential.png and /dev/null differ diff --git a/docs/azure/sdk/media/default-azure-credential-sequence-diagram.png b/docs/azure/sdk/media/default-azure-credential-sequence-diagram.png deleted file mode 100644 index e239a91d4f6f2..0000000000000 Binary files a/docs/azure/sdk/media/default-azure-credential-sequence-diagram.png and /dev/null differ diff --git a/docs/azure/sdk/packages.md b/docs/azure/sdk/packages.md index 1874cc5d3cacf..e01f1991fc231 100644 --- a/docs/azure/sdk/packages.md +++ b/docs/azure/sdk/packages.md @@ -1,11 +1,9 @@ --- title: Package index for Azure SDK for .NET description: Listing of the package names, NuGet links, docs links, and source code links for all libraries in the Azure SDK for .NET. -ms.custom: azure-sdk-dotnet -author: camsoper -ms.author: casoper -ms.date: 11/08/2021 ms.topic: reference +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 2/28/2023 --- # Azure SDK for .NET package index diff --git a/docs/azure/sdk/pagination.md b/docs/azure/sdk/pagination.md index 4b3b58c1c8cff..6617bdebb97a8 100644 --- a/docs/azure/sdk/pagination.md +++ b/docs/azure/sdk/pagination.md @@ -1,10 +1,8 @@ --- title: Pagination with the Azure SDK for .NET description: Learn how to use pagination with the Azure SDK for .NET. -ms.date: 07/15/2021 +ms.date: 02/28/2023 ms.custom: devx-track-dotnet -ms.author: dapine -author: IEvangelist --- # Pagination with the Azure SDK for .NET diff --git a/docs/azure/sdk/resource-management.md b/docs/azure/sdk/resource-management.md index cbcac0b14a99b..ad37b696f5dd3 100644 --- a/docs/azure/sdk/resource-management.md +++ b/docs/azure/sdk/resource-management.md @@ -2,8 +2,6 @@ title: Resource management description: Learn how to use the Azure SDK for .NET to manage Azure resources. ms.date: 07/27/2022 -ms.author: xinrzhu -author: nickzhums --- # Resource management using the Azure SDK for .NET @@ -67,7 +65,7 @@ using System.Threading.Tasks; // Code omitted for brevity -var armClient = new ArmClient(new DefaultAzureCredential()); +ArmClient client = new ArmClient(new DefaultAzureCredential()); ``` For more information about the `Azure.Identity.DefaultAzureCredential` class, see [DefaultAzureCredential Class](/dotnet/api/azure.identity.defaultazurecredential). @@ -83,9 +81,9 @@ using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.ServiceBus; -var armClient = new ArmClient(new DefaultAzureCredential()); -SubscriptionResource subscription = armClient.GetDefaultSubscription(); -ResourceGroupResource resourceGroupResource = +ArmClient client = new ArmClient(new DefaultAzureCredential()); +SubscriptionResource subscription = client.GetDefaultSubscription(); +ResourceGroupResource resourceGroup = client.GetDefaultSubscription().GetResourceGroup(resourceGroupName); ``` @@ -93,12 +91,12 @@ ResourceGroupResource resourceGroupResource = | Operation | Method | |-|-| -| Get a resource with resource identifier | `armClient.GetServiceBusQueueResource(ResourceIdentifier resourceIdentifier)` | -| List| `resourceGroupResource.GetServiceBusNamespaces()` | -| Index | `resourceGroupResource.GetServiceBusNamespace(string servicebusNamespaceName)` | -| Add/Update | `resourceGroupResource.GetServiceBusNamespaces().CreateOrUpdate(Azure.WaitUntil waitUntil, string name, ServiceBusNamespaceData data)` | -| Contains | `resourceGroupResource.GetServiceBusNamespaces().Exists(string servicebusNamespaceName)` | -| Delete | `armClient.GetServiceBusQueueResource(ResourceIdentifior resourceIdentifior).Delete()` or `resourceGroupResource.GetServiceBusNamespace(string servicebusNamespaceName).Delete()`| +| Get a resource with resource identifier | `client.GetServiceBusQueueResource(ResourceIdentifier resourceIdentifier)` | +| List| `resourceGroup.GetServiceBusNamespaces()` | +| Index | `resourceGroup.GetServiceBusNamespace(string servicebusNamespaceName)` | +| Add/Update | `resourceGroup.GetServiceBusNamespaces().CreateOrUpdate(Azure.WaitUntil waitUntil, string name, ServiceBusNamespaceData data)` | +| Contains | `resourceGroup.GetServiceBusNamespaces().Exists(string servicebusNamespaceName)` | +| Delete | `client.GetServiceBusQueueResource(ResourceIdentifior resourceIdentifior).Delete()` or `resourceGroup.GetServiceBusNamespace(string servicebusNamespaceName).Delete()`| Remember, all the Azure resources, including the resource group itself, can be managed by their corresponding management SDK using code similar to the above example. To find the correct Azure management SDK package, look for packages named with the following pattern `Azure.ResourceManager.{ResourceProviderName}`. @@ -118,15 +116,15 @@ This type represents a full resource client object that contains a **Data** prop It also has access to all of the operations on that resource without needing to pass in scope parameters such as subscription ID or resource name. This makes it convenient to directly execute operations on the result of list calls, since everything is returned as a full resource client now. ```csharp -ArmClient armClient = new ArmClient(new DefaultAzureCredential()); -string rgName = "myResourceGroup"; -SubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync(); -ResourceGroupCollection rg = await subscription.GetResourceGroups().GetAsync(rgName); -await foreach (VirtualMachineResource vm in rg.GetVirtualMachinesAsync()) +ArmClient client = new ArmClient(new DefaultAzureCredential()); +string resourceGroupName = "myResourceGroup"; +SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); +ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync(resourceGroupName); +await foreach (VirtualMachineResource virtualMachine in resourceGroup.GetVirtualMachinesAsync()) { //previously we would have to take the resourceGroupName and the vmName from the vm object //and pass those into the powerOff method as well as we would need to execute that on a separate compute client - await vm.PowerOffAsync(WaitUntil.Completed); + await virtualMachine.PowerOffAsync(WaitUntil.Completed); } ``` @@ -154,27 +152,27 @@ Imagine that our company requires all virtual machines to be tagged with the own ```csharp // First we construct our armClient -var armClient = new ArmClient(new DefaultAzureCredential()); +ArmClient client = new ArmClient(new DefaultAzureCredential()); // Next we get a resource group object // ResourceGroup is a {ResourceName}Resource object from above -SubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync(); +SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); ResourceGroupResource resourceGroup = - await subscription.GetResourceGroups().GetAsync("myRgName"); + await subscription.GetResourceGroupAsync("myRgName"); // Next we get the collection for the virtual machines // vmCollection is a {ResourceName}Collection object from above -VirtualMachineCollection vmCollection = await resourceGroup.GetVirtualMachinesAsync(); +VirtualMachineCollection virtualMachineCollection = await resourceGroup.GetVirtualMachines(); // Next we loop over all vms in the collection // Each vm is a {ResourceName}Resource object from above -await foreach(VirtualMachineResource vm in vmCollection.GetAllAsync()) +await foreach(VirtualMachineResource virtualMachine in virtualMachineCollection) { // We access the {ResourceName}Data properties from vm.Data - if(!vm.Data.Tags.ContainsKey("owner")) + if(!virtualMachine.Data.Tags.ContainsKey("owner")) { // We can also access all operations from vm since it is already scoped for us - await vm.AddTagAsync("owner", GetOwner()); + await virtualMachine.AddTagAsync("owner", GetOwner()); } } ``` @@ -194,7 +192,7 @@ Console.WriteLine($"Vnet: {id.Parent.Name}"); Console.WriteLine($"Subnet: {id.Name}"); ``` -However, keep in mind that some of those properties could be null. You can usually tell by the ID string itself which type a resource ID is. But if you're unsure, check if the properties are null, or use the `Try` methods to retrieve the values, as shown in the following example. +However, keep in mind that some of those properties could be null. You can usually tell by the ID string itself which type a resource ID is. But if you're unsure, check if the properties are null. #### Example: Resource Identifier Generator @@ -208,23 +206,6 @@ ResourceIdentifier resourceId = "resourceName"); ``` -#### Example: ResourceIdentifier TryGet methods - -```csharp -string resourceId = "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/workshop2021-rg/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"; -// Assume we don't know what type of resource id we have we can cast to the base type -ResourceIdentifier id = new ResourceIdentifier(resourceId); -string property; -if (id.TryGetSubscriptionId(out property)) - Console.WriteLine($"Subscription: {property}"); -if (id.TryGetResourceGroupName(out property)) - Console.WriteLine($"ResourceGroup: {property}"); -// Parent is only null when we reach the top of the chain which is a Tenant -Console.WriteLine($"Vnet: {id.Parent.Name}"); -// Name will never be null -Console.WriteLine($"Subnet: {id.Name}"); -``` - #### Manage existing resources Performing operations on resources that already exist is a common use case when using the management client libraries. In this scenario, you usually have the identifier of the resource you want to work on as a string. Although the new object hierarchy is great for provisioning and working within the scope of a given parent, it is not the most efficient when it comes to this specific scenario. @@ -247,16 +228,14 @@ ResourceIdentifier resourceId = "resourceGroupName", "resourceName"); // We construct a new armClient to work with -var armClient = new ArmClient(new DefaultAzureCredential()); +ArmClient client = new ArmClient(new DefaultAzureCredential()); // Next we get the specific subscription this resource belongs to -SubscriptionResource subscription = - await armClient.GetSubscriptions().GetAsync( - resourceId.SubscriptionId); +SubscriptionResource subscription = await client.GetSubscriptionAsync(resourceId.SubscriptionId); // Next we get the specific resource group this resource belongs to -ResourceGroupResource resourceGroup = await subscription.GetResourceGroups().GetAsync(resourceId.ResourceGroupName); +ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync(resourceId.ResourceGroupName); // Finally we get the resource itself // Note: for this last step in this example, Azure.ResourceManager.Compute is needed -AvailabilitySetResource availabilitySet = await resourceGroup.GetAvailabilitySets().GetAsync(resourceId.Name); +AvailabilitySetResource availabilitySet = await resourceGroup.GetAvailabilitySetAsync(resourceId.Name); ``` This approach required a lot of code and three API calls are made to Azure. The same can be done with less code and without any API calls by using extension methods that we've provided on the client itself. These extension methods allow you to pass in a resource identifier and retrieve a scoped resource client. The object returned is a [{ResourceName}Resource](#resourcenameresource-class). Since it hasn't reached out to Azure to retrieve the data yet, calling the `Data` property will throw exception, you can either use `HasData` property to tell if the resource instance contains a data or call the `Get` or `GetAsync` method on the resource to retrieve the resource data. @@ -270,10 +249,10 @@ ResourceIdentifier resourceId = "resourceGroupName", "resourceName"); // We construct a new armClient to work with -var armClient = new ArmClient(new DefaultAzureCredential()); +ArmClient client = new ArmClient(new DefaultAzureCredential()); // Next we get the AvailabilitySet resource client from the armClient // The method takes in a ResourceIdentifier but we can use the implicit cast from string -AvailabilitySetResource availabilitySet = armClient.GetAvailabilitySet(resourceId); +AvailabilitySetResource availabilitySet = client.GetAvailabilitySetResource(resourceId); // At this point availabilitySet.Data will be null and trying to access it will throw exception // If we want to retrieve the objects data we can simply call get availabilitySet = await availabilitySet.GetAsync(); @@ -290,37 +269,37 @@ If you aren't sure if a resource you want to get exists, or you just want to che In previous versions of packages, you would have to catch the `RequestFailedException` and inspect the status code for 404. With this new API, we hope that this can boost the developer productivity and optimize resource access. ```csharp -ArmClient armClient = new ArmClient(new DefaultAzureCredential()); -SubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync(); -string rgName = "myRgName"; +ArmClient client = new ArmClient(new DefaultAzureCredential()); +SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); +string resourceGroupName = "myRgName"; try { - ResourceGroupResource myRG = await subscription.GetResourceGroups().GetAsync(rgName); + ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync(resourceGroupName); // At this point, we are sure that myRG is a not null Resource Group, so we can use this object to perform any operations we want. } catch (RequestFailedException ex) when (ex.Status == 404) { - Console.WriteLine($"Resource Group {rgName} does not exist."); + Console.WriteLine($"Resource Group {resourceGroupName} does not exist."); } ``` Now with these convenience methods, we can simply do the following. ```csharp -var armClient = new ArmClient(new DefaultAzureCredential()); -SubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync(); -string rgName = "myRgName"; +ArmClient client = new ArmClient(new DefaultAzureCredential()); +SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); +string resourceGroupName = "myRgName"; -bool exists = await subscription.GetResourceGroups().Exists(rgName).Value; +bool exists = await subscription.GetResourceGroups().ExistsAsync(resourceGroupName).Value; if (exists) { - Console.WriteLine($"Resource Group {rgName} exists."); + Console.WriteLine($"Resource Group {resourceGroupName} exists."); // We can get the resource group now that we know it exists. // This does introduce a small race condition where resource group could have been deleted between the check and the get. - ResourceGroupResource myRG = await subscription.GetResourceGroups().GetAsync(rgName); + ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync(resourceGroupName); } else { @@ -334,30 +313,30 @@ else ```csharp // First, initialize the ArmClient and get the default subscription -var armClient = new ArmClient(new DefaultAzureCredential()); +ArmClient client = new ArmClient(new DefaultAzureCredential()); // Now we get a ResourceGroup collection for that subscription -SubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync(); -ResourceGroupCollection rgCollection = subscription.GetResourceGroups(); +SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); +ResourceGroupCollection resourceGroupCollection = subscription.GetResourceGroups(); // With the collection, we can create a new resource group with an specific name -string rgName = "myRgName"; -Location location = Location.WestUS2; -ResourceGroupData rgData = new ResourceGroupData(location); -ResourceGroupResource resourceGroup = (await rgCollection.CreateOrUpdateAsync(rgName, rgData)).Value; +string resourceGroupName = "myRgName"; +AzureLocation location = AzureLocation.WestUS2; +ResourceGroupData resourceGroupData = new ResourceGroupData(location); +ResourceGroupResource resourceGroup = (await resourceGroupCollection.CreateOrUpdateAsync(resourceGroupName, resourceGroupData)).Value; ``` ### List all resource groups ```csharp // First, initialize the ArmClient and get the default subscription -ArmClient armClient = new ArmClient(new DefaultAzureCredential()); -SubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync(); +ArmClient client = new ArmClient(new DefaultAzureCredential()); +SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); // Now we get a ResourceGroup collection for that subscription -ResourceGroupCollection rgCollection = subscription.GetResourceGroups(); +ResourceGroupCollection resourceGroupCollection = subscription.GetResourceGroups(); // With GetAllAsync(), we can get a list of the resources in the collection -await foreach (ResourceGroupResource rg in rgCollection) +await foreach (ResourceGroupResource resourceGroup in resourceGroupCollection) { - Console.WriteLine(rg.Data.Name); + Console.WriteLine(resourceGroup.Data.Name); } ``` @@ -365,20 +344,20 @@ await foreach (ResourceGroupResource rg in rgCollection) ```csharp // Note: Resource group named 'myRgName' should exist for this example to work. -var armClient = new ArmClient(new DefaultAzureCredential()); -SubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync(); -string rgName = "myRgName"; -ResourceGroupResource resourceGroup = await subscription.GetResourceGroups().GetAsync(rgName); +ArmClient client = new ArmClient(new DefaultAzureCredential()); +SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); +string resourceGroupName = "myRgName"; +ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync(resourceGroupName); resourceGroup = await resourceGroup.AddTagAsync("key", "value"); ``` ### Delete a resource group ```csharp -var armClient = new ArmClient(new DefaultAzureCredential()); -SubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync(); -string rgName = "myRgName"; -ResourceGroupResource resourceGroup = await subscription.GetResourceGroups().GetAsync(rgName); +ArmClient client = new ArmClient(new DefaultAzureCredential()); +SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); +string resourceGroupName = "myRgName"; +ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync(resourceGroupName); await resourceGroup.DeleteAsync(); ``` diff --git a/docs/azure/sdk/snippets/logging/LoggingSampleApp.csproj b/docs/azure/sdk/snippets/logging/LoggingSampleApp.csproj index b0c12080b6740..346c7b4876c90 100644 --- a/docs/azure/sdk/snippets/logging/LoggingSampleApp.csproj +++ b/docs/azure/sdk/snippets/logging/LoggingSampleApp.csproj @@ -7,10 +7,10 @@ - - - - + + + + diff --git a/docs/azure/sdk/snippets/pagination/pagination.csproj b/docs/azure/sdk/snippets/pagination/pagination.csproj index 3bce5f25fc826..51ca8d3fec20c 100644 --- a/docs/azure/sdk/snippets/pagination/pagination.csproj +++ b/docs/azure/sdk/snippets/pagination/pagination.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/docs/azure/sdk/thread-safety.md b/docs/azure/sdk/thread-safety.md index bed57d2aadd80..199ece7b6289c 100644 --- a/docs/azure/sdk/thread-safety.md +++ b/docs/azure/sdk/thread-safety.md @@ -1,8 +1,8 @@ --- title: Thread safety with the Azure SDK for .NET description: Learn about thread safety in Azure SDK client objects and how this design impacts client lifetime management. -ms.date: 05/24/2021 -author: pakrym +ms.custom: devx-track-dotnet, engagement-fy23 +ms.date: 2/28/2023 --- # Thread safety and client lifetime management for Azure SDK objects diff --git a/docs/breadcrumb/toc.yml b/docs/breadcrumb/toc.yml index 5bb5978b0164f..a7e3db2fb1caa 100644 --- a/docs/breadcrumb/toc.yml +++ b/docs/breadcrumb/toc.yml @@ -1,631 +1,675 @@ items: -- name: Docs - tocHref: / - topicHref: / - items: - - name: .NET - tocHref: /dotnet/ - topicHref: /dotnet/index + - name: Docs + tocHref: / + topicHref: / items: - - name: .NET API browser - tocHref: /dotnet/api/ - topicHref: /dotnet/api/index - - name: .NET fundamentals - tocHref: /dotnet/fundamentals/ - topicHref: /dotnet/fundamentals/index - - name: .NET fundamentals - tocHref: /dotnet/standard/ - topicHref: /dotnet/fundamentals/index - items: - - name: Assemblies in .NET - tocHref: /dotnet/standard/assembly - topicHref: /dotnet/standard/assembly/index - - name: Asynchronous programming patterns - tocHref: /dotnet/standard/asynchronous-programming-patterns/ - topicHref: /dotnet/standard/asynchronous-programming-patterns/index - - name: Collections and data structures - tocHref: /dotnet/standard/collections/ - topicHref: /dotnet/standard/collections/index + - name: .NET + tocHref: /dotnet/ + topicHref: /dotnet/index items: - - name: Thread-safe collections - tocHref: /dotnet/standard/collections/thread-safe/ - topicHref: /dotnet/standard/collections/thread-safe/index - - name: Microsoft.Data.Sqlite - tocHref: /dotnet/standard/data/sqlite/ - topicHref: /dotnet/standard/data/sqlite/index - - name: XML documents and data - tocHref: /dotnet/standard/data/xml/ - topicHref: /dotnet/standard/data/xml/index - - name: Dates, times, and time zones - tocHref: /dotnet/standard/datetime/ - topicHref: /dotnet/standard/datetime/index - - name: Globalization and localization - tocHref: /dotnet/standard/globalization-localization/ - topicHref: /dotnet/standard/globalization-localization/index - - name: LINQ - tocHref: /dotnet/standard/linq/ - topicHref: /dotnet/standard/linq/index - - name: Security in .NET - tocHref: /dotnet/standard/security/ - topicHref: /dotnet/standard/security/index - - name: Serialization - tocHref: /dotnet/standard/serialization/ - topicHref: /dotnet/standard/serialization/index - items: - - name: JSON serialization - tocHref: /dotnet/standard/serialization/system-text-json/ - topicHref: /dotnet/standard/serialization/system-text-json/overview - - name: Managed threading - tocHref: /dotnet/standard/threading/ - topicHref: /dotnet/standard/threading/index - - name: .NET fundamentals - tocHref: /dotnet/core/ - topicHref: /dotnet/fundamentals/index - items: - - name: Breaking changes - tocHref: /dotnet/core/compatibility/ - topicHref: /dotnet/core/compatibility/breaking-changes - - name: .NET Framework - tocHref: /dotnet/framework/ - topicHref: /dotnet/framework/index - items: - - name: Additional APIs - tocHref: /dotnet/framework/additional-apis/ - topicHref: /dotnet/framework/additional-apis/index - items: - - name: Point of Service for .NET - tocHref: /dotnet/framework/additional-apis/pos-for-net/ - topicHref: /dotnet/framework/additional-apis/pos-for-net/index - - name: Application domains and assemblies - tocHref: /dotnet/framework/app-domains/ - topicHref: /dotnet/framework/app-domains/index - - name: Configure apps by using configuration files - tocHref: /dotnet/framework/configure-apps/ - topicHref: /dotnet/framework/configure-apps/index - items: - - name: Configuration file schema - tocHref: /dotnet/framework/configure-apps/file-schema/ - topicHref: /dotnet/framework/configure-apps/file-schema/index - items: - - name: Compiler and language provider settings schema - tocHref: /dotnet/framework/configure-apps/file-schema/compiler/ - topicHref: /dotnet/framework/configure-apps/file-schema/compiler/index - - name: Cryptography settings schema - tocHref: /dotnet/framework/configure-apps/file-schema/cryptography/ - topicHref: /dotnet/framework/configure-apps/file-schema/cryptography/index - - name: Network settings schema - tocHref: /dotnet/framework/configure-apps/file-schema/network/ - topicHref: /dotnet/framework/configure-apps/file-schema/network/index - - name: Runtime settings schema - tocHref: /dotnet/framework/configure-apps/file-schema/runtime/ - topicHref: /dotnet/framework/configure-apps/file-schema/runtime/index - - name: Startup settings schema - tocHref: /dotnet/framework/configure-apps/file-schema/startup/ - topicHref: /dotnet/framework/configure-apps/file-schema/startup/index - - name: Trace and debug settings schema - tocHref: /dotnet/framework/configure-apps/file-schema/trace-debug/ - topicHref: /dotnet/framework/configure-apps/file-schema/trace-debug/index - - name: WCF configuration schema - tocHref: /dotnet/framework/configure-apps/file-schema/wcf/ - topicHref: /dotnet/framework/configure-apps/file-schema/wcf/index - - name: WCF directive syntax - tocHref: /dotnet/framework/configure-apps/file-schema/wcf-directive/ - topicHref: /dotnet/framework/configure-apps/file-schema/wcf-directive/index - - name: Web settings schema - tocHref: /dotnet/framework/configure-apps/file-schema/web/ - topicHref: /dotnet/framework/configure-apps/file-schema/web/index - - name: Windows Identity Foundation configuration schema - tocHref: /dotnet/framework/configure-apps/file-schema/windows-identity-foundation/ - topicHref: /dotnet/framework/configure-apps/file-schema/windows-identity-foundation/index - - name: Windows Workflow Foundation configuration schema - tocHref: /dotnet/framework/configure-apps/file-schema/windows-workflow-foundation - topicHref: /dotnet/framework/configure-apps/file-schema/windows-workflow-foundation/index - - name: Windows Forms configuration section - tocHref: /dotnet/framework/configure-apps/file-schema/winforms/ - topicHref: /dotnet/framework/configure-apps/file-schema/winforms/index - - name: Data and modeling - tocHref: /dotnet/framework/data/ - topicHref: /dotnet/framework/data/index - items: - - name: ADO.NET - tocHref: /dotnet/framework/data/adonet/ - topicHref: /dotnet/framework/data/adonet/index - items: - - name: DataSets, DataTables, and DataViews - tocHref: /dotnet/framework/data/adonet/dataset-datatable-dataview/ - topicHref: /dotnet/framework/data/adonet/dataset-datatable-dataview/index - - name: ADO.NET Entity Framework - tocHref: /dotnet/framework/data/adonet/ef/ - topicHref: /dotnet/framework/data/adonet/ef/index + - name: API browser + tocHref: /dotnet/api/ + topicHref: /dotnet/api/index + - name: Fundamentals + tocHref: /dotnet/fundamentals/ + topicHref: /dotnet/fundamentals/index + - name: Fundamentals + tocHref: /dotnet/standard/ + topicHref: /dotnet/fundamentals/index items: - - name: Entity SQL language reference - tocHref: /dotnet/framework/data/adonet/ef/language-reference/ - topicHref: /dotnet/framework/data/adonet/ef/language-reference/index - - name: SQL Server and ADO.NET - tocHref: /dotnet/framework/data/adonet/sql/ - topicHref: /dotnet/framework/data/adonet/sql/index + - name: Assemblies in .NET + tocHref: /dotnet/standard/assembly + topicHref: /dotnet/standard/assembly/index + - name: Collections and data structures + tocHref: /dotnet/standard/collections/ + topicHref: /dotnet/standard/collections/index + items: + - name: Thread-safe collections + tocHref: /dotnet/standard/collections/thread-safe/ + topicHref: /dotnet/standard/collections/thread-safe/index + - name: Dates, times, and time zones + tocHref: /dotnet/standard/datetime/ + topicHref: /dotnet/standard/datetime/index + - name: Globalization and localization + tocHref: /dotnet/standard/globalization-localization/ + topicHref: /dotnet/standard/globalization-localization/index + - name: Serialization + tocHref: /dotnet/standard/serialization/ + topicHref: /dotnet/standard/serialization/index + items: + - name: JSON serialization + tocHref: /dotnet/standard/serialization/system-text-json/ + topicHref: /dotnet/standard/serialization/system-text-json/overview + - name: Fundamentals + tocHref: /dotnet/core/ + topicHref: /dotnet/fundamentals/index + - name: Breaking changes + tocHref: /dotnet/core/compatibility/ + topicHref: /dotnet/core/compatibility/breaking-changes + - name: .NET Framework + tocHref: /dotnet/framework/ + topicHref: /dotnet/framework/index items: - - name: LINQ to SQL - tocHref: /dotnet/framework/data/adonet/sql/linq/ - topicHref: /dotnet/framework/data/adonet/sql/linq/index - - name: Transaction processing - tocHref: /dotnet/framework/data/transactions/ - topicHref: /dotnet/framework/data/transactions/index - - name: WCF Data Services - tocHref: /dotnet/framework/data/wcf/ - topicHref: /dotnet/framework/data/wcf/index - - name: Debugging, tracing, and profiling - tocHref: /dotnet/framework/debug-trace-profile/ - topicHref: /dotnet/framework/debug-trace-profile/index - - name: Deploy the .NET Framework - tocHref: /dotnet/framework/deployment/ - topicHref: /dotnet/framework/deployment/index - - name: Deploy .NET Framework apps with Docker - tocHref: /dotnet/framework/docker/ - topicHref: /dotnet/framework/docker/index - - name: Get started - tocHref: /dotnet/framework/get-started/ - topicHref: /dotnet/framework/get-started/index - - name: Installation guide - tocHref: /dotnet/framework/install/ - topicHref: /dotnet/framework/install/index - - name: Interoperate with unmanaged code - tocHref: /dotnet/framework/interop/ - topicHref: /dotnet/framework/interop/index - - name: Managed Extensibility Framework (MEF) - tocHref: /dotnet/framework/mef/ - topicHref: /dotnet/framework/mef/index - - name: Migration guide - tocHref: /dotnet/framework/migration-guide/ - topicHref: /dotnet/framework/migration-guide/index - - name: Compile apps with .NET Native - tocHref: /dotnet/framework/net-native/ - topicHref: /dotnet/framework/net-native/index - - name: Network programming - tocHref: /dotnet/framework/network-programming/ - topicHref: /dotnet/framework/network-programming/index - - name: .NET Framework performance - tocHref: /dotnet/framework/performance/ - topicHref: /dotnet/framework/performance/index - - name: Dynamic programming - tocHref: /dotnet/framework/reflection-and-codedom/ - topicHref: /dotnet/framework/reflection-and-codedom/index - - name: Resources in desktop apps - tocHref: /dotnet/framework/resources/ - topicHref: /dotnet/framework/resources/index - - name: .NET Framework Tools - tocHref: /dotnet/framework/tools/ - topicHref: /dotnet/framework/tools/index - - name: UI automation fundamentals - tocHref: /dotnet/framework/ui-automation/ - topicHref: /dotnet/framework/ui-automation/index - - name: Unmanaged API reference - tocHref: /dotnet/framework/unmanaged-api/ - topicHref: /dotnet/framework/unmanaged-api/index - items: - - name: ALink API (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/alink/ - topicHref: /dotnet/framework/unmanaged-api/alink/index - - name: Authenticode (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/authenticode/ - topicHref: /dotnet/framework/unmanaged-api/authenticode/index - - name: Debugging (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/debugging/ - topicHref: /dotnet/framework/unmanaged-api/debugging/index - - name: Diagnostics symbol store (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/diagnostics/ - topicHref: /dotnet/framework/unmanaged-api/diagnostics/index - - name: Fusion (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/fusion/ - topicHref: /dotnet/framework/unmanaged-api/fusion/index - - name: Hosting (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/hosting/ - topicHref: /dotnet/framework/unmanaged-api/hosting/index - - name: Metadata (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/metadata/ - topicHref: /dotnet/framework/unmanaged-api/metadata/index - - name: Profiling (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/profiling/ - topicHref: /dotnet/framework/unmanaged-api/profiling/index - - name: Strong naming (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/strong-naming/ - topicHref: /dotnet/framework/unmanaged-api/strong-naming/index - - name: Tlbexp helper functions (Unmanaged API reference) - tocHref: /dotnet/framework/unmanaged-api/tlbexp/ - topicHref: /dotnet/framework/unmanaged-api/tlbexp/index - - name: Windows Communication Foundation - tocHref: /dotnet/framework/wcf/ - topicHref: /dotnet/framework/wcf/index - items: - - name: Administration and diagnostics - tocHref: /dotnet/framework/wcf/diagnostics/ - topicHref: /dotnet/framework/wcf/diagnostics/index - items: - - name: Analytic tracing with ETW - tocHref: /dotnet/framework/wcf/diagnostics/etw/ - topicHref: /dotnet/framework/wcf/diagnostics/etw/index - - name: Event logging in WCF - tocHref: /dotnet/framework/wcf/diagnostics/event-logging/ - topicHref: /dotnet/framework/wcf/diagnostics/event-logging/index - - name: Exceptions reference - tocHref: /dotnet/framework/wcf/diagnostics/exceptions-reference/ - topicHref: /dotnet/framework/wcf/diagnostics/exceptions-reference/index - - name: WCF performance counters - tocHref: /dotnet/framework/wcf/diagnostics/performance-counters/ - topicHref: /dotnet/framework/wcf/diagnostics/performance-counters/index - - name: Tracing - tocHref: /dotnet/framework/wcf/diagnostics/tracing/ - topicHref: /dotnet/framework/wcf/diagnostics/tracing/index - - name: Using Windows Management Instrumentation for diagnostics - tocHref: /dotnet/framework/wcf/diagnostics/wmi/ - topicHref: /dotnet/framework/wcf/diagnostics/wmi/index - - name: Extend WCF - tocHref: /dotnet/framework/wcf/extending/ - topicHref: /dotnet/framework/wcf/extending/index - - name: WCF feature details - tocHref: /dotnet/framework/wcf/feature-details/ - topicHref: /dotnet/framework/wcf/feature-details/index - - name: Windows Communication Foundation (WCF) samples - tocHref: /dotnet/framework/wcf/samples/ - topicHref: /dotnet/framework/wcf/samples/index - - name: What's new in the .NET Framework - tocHref: /dotnet/framework/whats-new/ - topicHref: /dotnet/framework/whats-new/index - - name: Develop Windows service applications - tocHref: /dotnet/framework/windows-services/ - topicHref: /dotnet/framework/windows-services/index - - name: Windows Workflow Foundation - tocHref: /dotnet/framework/windows-workflow-foundation/ - topicHref: /dotnet/framework/windows-workflow-foundation/index - items: - - name: Windows Workflow (WF) samples - tocHref: /dotnet/framework/windows-workflow-foundation/samples/ - topicHref: /dotnet/framework/windows-workflow-foundation/samples/index - - name: C# guide - tocHref: /dotnet/csharp/ - topicHref: /dotnet/csharp/index - items: - - name: Get started - tocHref: /dotnet/csharp/tour-of-csharp/ - topicHref: /dotnet/csharp/tour-of-csharp/index - items: - - name: Tutorials - tocHref: /dotnet/csharp/tour-of-csharp/tutorials/ - topicHref: /dotnet/csharp/tour-of-csharp/tutorials/index - - name: Fundamentals - tocHref: /dotnet/csharp/fundamentals/ - topicHref: /dotnet/csharp/fundamentals/types/index - - name: What's new - tocHref: /dotnet/csharp/whats-new/ - topicHref: /dotnet/csharp/whats-new/index - items: - - name: Tutorials - tocHref: /dotnet/csharp/whats-new/tutorials/ - topicHref: /dotnet/csharp/whats-new/tutorials/records - - name: Tutorials - tocHref: /dotnet/csharp/tutorials/ - topicHref: /dotnet/csharp/tutorials/index - - name: .NET Compiler Platform SDK - tocHref: /dotnet/csharp/roslyn-sdk/ - topicHref: /dotnet/csharp/roslyn-sdk/index - - name: Programming guide - tocHref: /dotnet/csharp/programming-guide/ - topicHref: /dotnet/csharp/programming-guide/index - items: - - name: Arrays - tocHref: /dotnet/csharp/programming-guide/arrays/ - topicHref: /dotnet/csharp/programming-guide/arrays/index - - name: Classes and structs - tocHref: /dotnet/csharp/programming-guide/classes-and-structs/ - topicHref: /dotnet/csharp/programming-guide/classes-and-structs/index - - name: Delegates - tocHref: /dotnet/csharp/programming-guide/delegates/ - topicHref: /dotnet/csharp/programming-guide/delegates/index - - name: Events - tocHref: /dotnet/csharp/programming-guide/events/ - topicHref: /dotnet/csharp/programming-guide/events/index - - name: File system and the registry - tocHref: /dotnet/csharp/programming-guide/file-system/ - topicHref: /dotnet/csharp/programming-guide/file-system/index - - name: Generics - tocHref: /dotnet/csharp/programming-guide/generics/ - topicHref: /dotnet/csharp/programming-guide/generics/index - - name: Indexers - tocHref: /dotnet/csharp/programming-guide/indexers/ - topicHref: /dotnet/csharp/programming-guide/indexers/index - - name: Interfaces - tocHref: /dotnet/csharp/programming-guide/interfaces/ - topicHref: /dotnet/csharp/programming-guide/interfaces/index - - name: Interoperability - tocHref: /dotnet/csharp/programming-guide/interop/ - topicHref: /dotnet/csharp/programming-guide/interop/index - - name: Programming concepts - tocHref: /dotnet/csharp/programming-guide/concepts/ - topicHref: /dotnet/csharp/programming-guide/concepts/index - items: - - name: Asynchronous programming - tocHref: /dotnet/csharp/programming-guide/concepts/async/ - topicHref: /dotnet/csharp/programming-guide/concepts/async/index - - name: Attributes - tocHref: /dotnet/csharp/programming-guide/concepts/attributes/ - topicHref: /dotnet/csharp/programming-guide/concepts/attributes/index - - name: Covariance and contravariance - tocHref: /dotnet/csharp/programming-guide/concepts/covariance-contravariance/ - topicHref: /dotnet/csharp/programming-guide/concepts/covariance-contravariance/index - - name: Expression trees - tocHref: /dotnet/csharp/programming-guide/concepts/expression-trees/ - topicHref: /dotnet/csharp/programming-guide/concepts/expression-trees/index - - name: LINQ - tocHref: /dotnet/csharp/programming-guide/concepts/linq/ - topicHref: /dotnet/csharp/programming-guide/concepts/linq/index - - name: Serialization - tocHref: /dotnet/csharp/programming-guide/concepts/serialization/ - topicHref: /dotnet/csharp/programming-guide/concepts/serialization/index - - name: Threading - tocHref: /dotnet/csharp/programming-guide/concepts/threading/ - topicHref: /dotnet/csharp/programming-guide/concepts/threading/index - - name: Statements, expressions, and operators - tocHref: /dotnet/csharp/programming-guide/statements-expressions-operators/ - topicHref: /dotnet/csharp/programming-guide/statements-expressions-operators/index - - name: Strings - tocHref: /dotnet/csharp/programming-guide/strings/ - topicHref: /dotnet/csharp/programming-guide/strings/index - - name: Types - tocHref: /dotnet/csharp/programming-guide/types/ - topicHref: /dotnet/csharp/programming-guide/types/index - - name: Language reference - tocHref: /dotnet/csharp/language-reference/ - topicHref: /dotnet/csharp/language-reference/index - items: - - name: Keywords - tocHref: /dotnet/csharp/language-reference/keywords/ - topicHref: /dotnet/csharp/language-reference/keywords/index - - name: Operators and expressions - tocHref: /dotnet/csharp/language-reference/operators/ - topicHref: /dotnet/csharp/language-reference/operators/index - - name: Special characters - tocHref: /dotnet/csharp/language-reference/tokens/ - topicHref: /dotnet/csharp/language-reference/tokens/index - - name: Preprocessor directives - tocHref: /dotnet/csharp/language-reference/preprocessor-directives/ - topicHref: /dotnet/csharp/language-reference/preprocessor-directives/index - - name: Compiler options - tocHref: /dotnet/csharp/language-reference/compiler-options/ - topicHref: /dotnet/csharp/language-reference/compiler-options/index - - name: Compiler messages - tocHref: /dotnet/csharp/language-reference/compiler-messages/ - topicHref: /dotnet/csharp/language-reference/compiler-messages/index - - name: Compiler messages - tocHref: /dotnet/csharp/misc - topicHref: /dotnet/csharp/language-reference/compiler-messages/index - - name: Specification - items: - - name: C# 7.0 draft specification - tocHref: /dotnet/csharp/language-reference/language-specification/ - topicHref: /dotnet/csharp/language-reference/language-specification/index - - name: C# 7.0 feature specifications - tocHref: /dotnet/csharp/language-reference/proposals/csharp-7.0/ - topicHref: /dotnet/csharp/language-reference/proposals/csharp-7.0/index - - name: C# 7.1 feature specifications - tocHref: /dotnet/csharp/language-reference/proposals/csharp-7.1/ - topicHref: /dotnet/csharp/language-reference/proposals/csharp-7.1/infer-tuple-names - - name: C# 7.2 feature specifications - tocHref: /dotnet/csharp/language-reference/proposals/csharp-7.2/ - topicHref: /dotnet/csharp/language-reference/proposals/csharp-7.2/index - - name: C# 7.3 feature specifications - tocHref: /dotnet/csharp/language-reference/proposals/csharp-7.3/ - topicHref: /dotnet/csharp/language-reference/proposals/csharp-7.3/index - - name: C# 8.0 feature specifications - tocHref: /dotnet/csharp/language-reference/proposals/csharp-8.0/ - topicHref: /dotnet/csharp/language-reference/proposals/csharp-8.0/index - - name: C# 9.0 feature specifications - tocHref: /dotnet/csharp/language-reference/proposals/csharp-9.0/ - topicHref: /dotnet/csharp/language-reference/proposals/csharp-9.0/index - - name: C# 10 feature specifications - tocHref: /dotnet/csharp/language-reference/proposals/csharp-10.0/ - topicHref: /dotnet/csharp/language-reference/proposals/csharp-10.0/index - - name: C# 11 feature specifications - tocHref: /dotnet/csharp/language-reference/proposals/csharp-11.0/ - topicHref: /dotnet/csharp/language-reference/proposals/csharp-11.0/index - - name: F# guide - tocHref: /dotnet/fsharp/ - topicHref: /dotnet/fsharp/index - - name: Visual Basic guide - tocHref: /dotnet/visual-basic/ - topicHref: /dotnet/visual-basic/index - items: - - name: Get started - tocHref: /dotnet/visual-basic/getting-started/ - topicHref: /dotnet/visual-basic/getting-started/index - - name: Develop applications - tocHref: /dotnet/visual-basic/developing-apps/ - topicHref: /dotnet/visual-basic/developing-apps/index - - name: Programming concepts - tocHref: /dotnet/visual-basic/programming-guide/concepts/ - topicHref: /dotnet/visual-basic/programming-guide/concepts/index - items: - - name: Asynchronous programming - tocHref: /dotnet/visual-basic/programming-guide/concepts/async/ - topicHref: /dotnet/visual-basic/programming-guide/concepts/async/index - - name: Attributes - tocHref: /dotnet/visual-basic/programming-guide/concepts/attributes/ - topicHref: /dotnet/visual-basic/programming-guide/concepts/attributes/index - - name: Expression trees - tocHref: /dotnet/visual-basic/programming-guide/concepts/expression-trees/ - topicHref: /dotnet/visual-basic/programming-guide/concepts/expression-trees/index - - name: LINQ - tocHref: /dotnet/visual-basic/programming-guide/concepts/linq/ - topicHref: /dotnet/visual-basic/programming-guide/concepts/linq/index - - name: Serialization - tocHref: /dotnet/visual-basic/programming-guide/concepts/serialization/ - topicHref: /dotnet/visual-basic/programming-guide/concepts/serialization/index - - name: Threading - tocHref: /dotnet/visual-basic/programming-guide/concepts/threading/ - topicHref: /dotnet/visual-basic/programming-guide/concepts/threading/index - - name: Program structure and code conventions - tocHref: /dotnet/visual-basic/programming-guide/program-structure/ - topicHref: /dotnet/visual-basic/programming-guide/program-structure/program-structure-and-code-conventions - - name: Language features - tocHref: /dotnet/visual-basic/programming-guide/language-features/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/index - items: - - name: Arrays - tocHref: /dotnet/visual-basic/programming-guide/language-features/arrays/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/arrays/index - - name: Collection initializers - tocHref: /dotnet/visual-basic/programming-guide/language-features/collection-initializers/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/collection-initializers/index - - name: Constants and enumerations - tocHref: /dotnet/visual-basic/programming-guide/language-features/constants-enums/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/constants-enums/index - - name: Control flow - tocHref: /dotnet/visual-basic/programming-guide/language-features/control-flow/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/control-flow/index - - name: Data types - tocHref: /dotnet/visual-basic/programming-guide/language-features/data-types/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/data-types/index - - name: Declared elements - tocHref: /dotnet/visual-basic/programming-guide/language-features/declared-elements/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/declared-elements/index - - name: Delegates - tocHref: /dotnet/visual-basic/programming-guide/language-features/delegates/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/delegates/index - - name: Early and late binding - tocHref: /dotnet/visual-basic/programming-guide/language-features/early-late-binding/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/early-late-binding/index - - name: Events - tocHref: /dotnet/visual-basic/programming-guide/language-features/events/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/events/index - - name: LINQ - tocHref: /dotnet/visual-basic/programming-guide/language-features/linq/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/linq/index - - name: Objects and classes - tocHref: /dotnet/visual-basic/programming-guide/language-features/objects-and-classes/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/objects-and-classes/index - - name: Operators and expressions - tocHref: /dotnet/visual-basic/programming-guide/language-features/operators-and-expressions/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/operators-and-expressions/index - - name: Procedures - tocHref: /dotnet/visual-basic/programming-guide/language-features/procedures/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/procedures/index - - name: Strings - tocHref: /dotnet/visual-basic/programming-guide/language-features/strings/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/strings/index - - name: Variables - tocHref: /dotnet/visual-basic/programming-guide/language-features/variables/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/variables/index - - name: XML - tocHref: /dotnet/visual-basic/programming-guide/language-features/xml/ - topicHref: /dotnet/visual-basic/programming-guide/language-features/xml/index - - name: COM interop - tocHref: /dotnet/visual-basic/programming-guide/com-interop/ - topicHref: /dotnet/visual-basic/programming-guide/com-interop/index - - name: Language reference - tocHref: /dotnet/visual-basic/language-reference/ - topicHref: /dotnet/visual-basic/language-reference/index - - name: Reference - tocHref: /dotnet/visual-basic/reference/ - topicHref: /dotnet/visual-basic/reference/index - - name: ML.NET guide - tocHref: /dotnet/machine-learning/ - topicHref: /dotnet/machine-learning/index - items: - - name: How-to guides - tocHref: /dotnet/machine-learning/how-to-guides/ - topicHref: /dotnet/machine-learning/how-to-guides/index - - name: Resources - tocHref: /dotnet/machine-learning/resources/ - topicHref: /dotnet/machine-learning/resources/index - - name: Tutorials - tocHref: /dotnet/machine-learning/tutorials/ - topicHref: /dotnet/machine-learning/tutorials/index - - name: .NET for Apache Spark guide - tocHref: /dotnet/spark/ - topicHref: /dotnet/spark/index - - name: Azure - tocHref: /dotnet/azure/ - topicHref: /dotnet/azure/index - items: - - name: Azure for .NET developers - tocHref: /dotnet/azure/ - topicHref: /dotnet/azure/index - - name: Orleans - tocHref: /dotnet/orleans - topicHref: /dotnet/orleans/index - items: - - name: Deployment - tocHref: /dotnet/orleans/deployment - topicHref: /dotnet/orleans/deployment/index - - name: Grains - tocHref: /dotnet/orleans/grains - topicHref: /dotnet/orleans/grains/index - - name: Event sourcing - tocHref: /dotnet/orleans/grains/event-sourcing - topicHref: /dotnet/orleans/grains/event-sourcing/index - - name: Persistence - tocHref: /dotnet/orleans/grains/persistence - topicHref: /dotnet/orleans/grains/grain-persistence/index - - name: Host configuration - tocHref: /dotnet/orleans/host/configuration-guide - topicHref: /dotnet/orleans/host/configuration-guide/index - - name: Host monitoring - tocHref: /dotnet/orleans/host/monitoring - topicHref: /dotnet/orleans/host/monitoring/index - - name: Implementation details - tocHref: /dotnet/orleans/implementation - topicHref: /dotnet/orleans/implementation/index - - name: Streams implementation - tocHref: /dotnet/orleans/implementation/streams-implementation - topicHref: /dotnet/orleans/implementation/streams-implementation/index - - name: Migration guide - tocHref: /dotnet/orleans/migration - topicHref: /dotnet/orleans/migration/index - - name: Resources - tocHref: /dotnet/orleans/resources - topicHref: /dotnet/orleans/resources/frequently-asked-questions - - name: Streaming - tocHref: /dotnet/orleans/streaming - topicHref: /dotnet/orleans/streaming/index - - name: .NET IoT Libraries - tocHref: /dotnet/iot/ - topicHref: /dotnet/iot/index - - name: What's new - tocHref: /dotnet/whats-new/ - topicHref: /dotnet/whats-new/index - - name: .NET architecture - tocHref: /dotnet/architecture/ - topicHref: /dotnet/architecture/index - items: - - name: Modern ASP.NET web applications e-book - tocHref: /dotnet/architecture/modern-web-apps-azure/ - topicHref: /dotnet/architecture/modern-web-apps-azure/index - - name: .NET microservices - Architecture e-book - tocHref: /dotnet/architecture/microservices/ - topicHref: /dotnet/architecture/microservices/index - - name: Cloud native - tocHref: /dotnet/architecture/cloud-native/ - topicHref: /dotnet/architecture/cloud-native/index - - name: Modernizing .NET apps e-book - tocHref: /dotnet/architecture/modernize-with-azure-containers/ - topicHref: /dotnet/architecture/modernize-with-azure-containers/index - - name: .NET microservices - DevOps e-book - tocHref: /dotnet/architecture/containerized-lifecycle/ - topicHref: /dotnet/architecture/containerized-lifecycle/index - - name: Serverless apps e-book - tocHref: /dotnet/architecture/serverless/ - topicHref: /dotnet/architecture/serverless/index - - name: Blazor for ASP.NET Web Forms developers e-book - tocHref: /dotnet/architecture/blazor-for-web-forms-developers/ - topicHref: /dotnet/architecture/blazor-for-web-forms-developers/index - - name: ASP.NET Core gRPC for WCF developers - tocHref: /dotnet/architecture/grpc-for-wcf-developers/ - topicHref: /dotnet/architecture/grpc-for-wcf-developers/index - - name: Modernizing desktop apps - tocHref: /dotnet/architecture/modernize-desktop/ - topicHref: /dotnet/architecture/modernize-desktop/index - - name: Framework design guidelines - tocHref: /dotnet/standard/design-guidelines/ - topicHref: /dotnet/standard/design-guidelines/index - - name: Library guidance - tocHref: /dotnet/standard/library-guidance/ - topicHref: /dotnet/standard/library-guidance/index + - name: Additional APIs + tocHref: /dotnet/framework/additional-apis/ + topicHref: /dotnet/framework/additional-apis/index + items: + - name: Point of Service for .NET + tocHref: /dotnet/framework/additional-apis/pos-for-net/ + topicHref: /dotnet/framework/additional-apis/pos-for-net/index + - name: Application domains and assemblies + tocHref: /dotnet/framework/app-domains/ + topicHref: /dotnet/framework/app-domains/index + - name: Configure apps by using configuration files + tocHref: /dotnet/framework/configure-apps/ + topicHref: /dotnet/framework/configure-apps/index + items: + - name: Configuration file schema + tocHref: /dotnet/framework/configure-apps/file-schema/ + topicHref: /dotnet/framework/configure-apps/file-schema/index + items: + - name: Compiler and language provider settings schema + tocHref: /dotnet/framework/configure-apps/file-schema/compiler/ + topicHref: /dotnet/framework/configure-apps/file-schema/compiler/index + - name: Cryptography settings schema + tocHref: /dotnet/framework/configure-apps/file-schema/cryptography/ + topicHref: /dotnet/framework/configure-apps/file-schema/cryptography/index + - name: Network settings schema + tocHref: /dotnet/framework/configure-apps/file-schema/network/ + topicHref: /dotnet/framework/configure-apps/file-schema/network/index + - name: Runtime settings schema + tocHref: /dotnet/framework/configure-apps/file-schema/runtime/ + topicHref: /dotnet/framework/configure-apps/file-schema/runtime/index + - name: Startup settings schema + tocHref: /dotnet/framework/configure-apps/file-schema/startup/ + topicHref: /dotnet/framework/configure-apps/file-schema/startup/index + - name: Trace and debug settings schema + tocHref: /dotnet/framework/configure-apps/file-schema/trace-debug/ + topicHref: /dotnet/framework/configure-apps/file-schema/trace-debug/index + - name: WCF configuration schema + tocHref: /dotnet/framework/configure-apps/file-schema/wcf/ + topicHref: /dotnet/framework/configure-apps/file-schema/wcf/index + - name: WCF directive syntax + tocHref: /dotnet/framework/configure-apps/file-schema/wcf-directive/ + topicHref: /dotnet/framework/configure-apps/file-schema/wcf-directive/index + - name: Web settings schema + tocHref: /dotnet/framework/configure-apps/file-schema/web/ + topicHref: /dotnet/framework/configure-apps/file-schema/web/index + - name: Windows Identity Foundation configuration schema + tocHref: /dotnet/framework/configure-apps/file-schema/windows-identity-foundation/ + topicHref: /dotnet/framework/configure-apps/file-schema/windows-identity-foundation/index + - name: Windows Workflow Foundation configuration schema + tocHref: /dotnet/framework/configure-apps/file-schema/windows-workflow-foundation + topicHref: /dotnet/framework/configure-apps/file-schema/windows-workflow-foundation/index + - name: Windows Forms configuration section + tocHref: /dotnet/framework/configure-apps/file-schema/winforms/ + topicHref: /dotnet/framework/configure-apps/file-schema/winforms/index + - name: Data and modeling + tocHref: /dotnet/framework/data/ + topicHref: /dotnet/framework/data/index + items: + - name: ADO.NET + tocHref: /dotnet/framework/data/adonet/ + topicHref: /dotnet/framework/data/adonet/index + items: + - name: DataSets, DataTables, and DataViews + tocHref: /dotnet/framework/data/adonet/dataset-datatable-dataview/ + topicHref: /dotnet/framework/data/adonet/dataset-datatable-dataview/index + - name: ADO.NET Entity Framework + tocHref: /dotnet/framework/data/adonet/ef/ + topicHref: /dotnet/framework/data/adonet/ef/index + items: + - name: Entity SQL language reference + tocHref: /dotnet/framework/data/adonet/ef/language-reference/ + topicHref: /dotnet/framework/data/adonet/ef/language-reference/index + - name: SQL Server and ADO.NET + tocHref: /dotnet/framework/data/adonet/sql/ + topicHref: /dotnet/framework/data/adonet/sql/index + items: + - name: LINQ to SQL + tocHref: /dotnet/framework/data/adonet/sql/linq/ + topicHref: /dotnet/framework/data/adonet/sql/linq/index + - name: Transaction processing + tocHref: /dotnet/framework/data/transactions/ + topicHref: /dotnet/framework/data/transactions/index + - name: WCF Data Services + tocHref: /dotnet/framework/data/wcf/ + topicHref: /dotnet/framework/data/wcf/index + - name: Debugging, tracing, and profiling + tocHref: /dotnet/framework/debug-trace-profile/ + topicHref: /dotnet/framework/debug-trace-profile/index + - name: Deploy the .NET Framework + tocHref: /dotnet/framework/deployment/ + topicHref: /dotnet/framework/deployment/index + - name: Deploy .NET Framework apps with Docker + tocHref: /dotnet/framework/docker/ + topicHref: /dotnet/framework/docker/index + - name: Get started + tocHref: /dotnet/framework/get-started/ + topicHref: /dotnet/framework/get-started/index + - name: Installation guide + tocHref: /dotnet/framework/install/ + topicHref: /dotnet/framework/install/index + - name: Interoperate with unmanaged code + tocHref: /dotnet/framework/interop/ + topicHref: /dotnet/framework/interop/index + - name: Managed Extensibility Framework (MEF) + tocHref: /dotnet/framework/mef/ + topicHref: /dotnet/framework/mef/index + - name: Migration guide + tocHref: /dotnet/framework/migration-guide/ + topicHref: /dotnet/framework/migration-guide/index + - name: Compile apps with .NET Native + tocHref: /dotnet/framework/net-native/ + topicHref: /dotnet/framework/net-native/index + - name: Network programming + tocHref: /dotnet/framework/network-programming/ + topicHref: /dotnet/framework/network-programming/index + - name: .NET Framework performance + tocHref: /dotnet/framework/performance/ + topicHref: /dotnet/framework/performance/index + - name: Dynamic programming + tocHref: /dotnet/framework/reflection-and-codedom/ + topicHref: /dotnet/framework/reflection-and-codedom/index + - name: Resources in desktop apps + tocHref: /dotnet/framework/resources/ + topicHref: /dotnet/framework/resources/index + - name: .NET Framework Tools + tocHref: /dotnet/framework/tools/ + topicHref: /dotnet/framework/tools/index + - name: UI automation fundamentals + tocHref: /dotnet/framework/ui-automation/ + topicHref: /dotnet/framework/ui-automation/index + - name: Unmanaged API reference + tocHref: /dotnet/framework/unmanaged-api/ + topicHref: /dotnet/framework/unmanaged-api/index + items: + - name: ALink API (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/alink/ + topicHref: /dotnet/framework/unmanaged-api/alink/index + - name: Authenticode (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/authenticode/ + topicHref: /dotnet/framework/unmanaged-api/authenticode/index + - name: Debugging (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/debugging/ + topicHref: /dotnet/framework/unmanaged-api/debugging/index + - name: Diagnostics symbol store (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/diagnostics/ + topicHref: /dotnet/framework/unmanaged-api/diagnostics/index + - name: Fusion (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/fusion/ + topicHref: /dotnet/framework/unmanaged-api/fusion/index + - name: Hosting (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/hosting/ + topicHref: /dotnet/framework/unmanaged-api/hosting/index + - name: Metadata (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/metadata/ + topicHref: /dotnet/framework/unmanaged-api/metadata/index + - name: Profiling (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/profiling/ + topicHref: /dotnet/framework/unmanaged-api/profiling/index + - name: Strong naming (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/strong-naming/ + topicHref: /dotnet/framework/unmanaged-api/strong-naming/index + - name: Tlbexp helper functions (Unmanaged API reference) + tocHref: /dotnet/framework/unmanaged-api/tlbexp/ + topicHref: /dotnet/framework/unmanaged-api/tlbexp/index + - name: Windows Communication Foundation + tocHref: /dotnet/framework/wcf/ + topicHref: /dotnet/framework/wcf/index + items: + - name: Administration and diagnostics + tocHref: /dotnet/framework/wcf/diagnostics/ + topicHref: /dotnet/framework/wcf/diagnostics/index + items: + - name: Analytic tracing with ETW + tocHref: /dotnet/framework/wcf/diagnostics/etw/ + topicHref: /dotnet/framework/wcf/diagnostics/etw/index + - name: Event logging in WCF + tocHref: /dotnet/framework/wcf/diagnostics/event-logging/ + topicHref: /dotnet/framework/wcf/diagnostics/event-logging/index + - name: Exceptions reference + tocHref: /dotnet/framework/wcf/diagnostics/exceptions-reference/ + topicHref: /dotnet/framework/wcf/diagnostics/exceptions-reference/index + - name: WCF performance counters + tocHref: /dotnet/framework/wcf/diagnostics/performance-counters/ + topicHref: /dotnet/framework/wcf/diagnostics/performance-counters/index + - name: Tracing + tocHref: /dotnet/framework/wcf/diagnostics/tracing/ + topicHref: /dotnet/framework/wcf/diagnostics/tracing/index + - name: Using Windows Management Instrumentation for diagnostics + tocHref: /dotnet/framework/wcf/diagnostics/wmi/ + topicHref: /dotnet/framework/wcf/diagnostics/wmi/index + - name: Extend WCF + tocHref: /dotnet/framework/wcf/extending/ + topicHref: /dotnet/framework/wcf/extending/index + - name: WCF feature details + tocHref: /dotnet/framework/wcf/feature-details/ + topicHref: /dotnet/framework/wcf/feature-details/index + - name: Windows Communication Foundation (WCF) samples + tocHref: /dotnet/framework/wcf/samples/ + topicHref: /dotnet/framework/wcf/samples/index + - name: What's new in the .NET Framework + tocHref: /dotnet/framework/whats-new/ + topicHref: /dotnet/framework/whats-new/index + - name: Develop Windows service applications + tocHref: /dotnet/framework/windows-services/ + topicHref: /dotnet/framework/windows-services/index + - name: Windows Workflow Foundation + tocHref: /dotnet/framework/windows-workflow-foundation/ + topicHref: /dotnet/framework/windows-workflow-foundation/index + items: + - name: Windows Workflow (WF) samples + tocHref: /dotnet/framework/windows-workflow-foundation/samples/ + topicHref: /dotnet/framework/windows-workflow-foundation/samples/index + - name: C# guide + tocHref: /dotnet/csharp/ + topicHref: /dotnet/csharp/index + items: + - name: Get started + tocHref: /dotnet/csharp/tour-of-csharp/ + topicHref: /dotnet/csharp/tour-of-csharp/index + items: + - name: Tutorials + tocHref: /dotnet/csharp/tour-of-csharp/tutorials/ + topicHref: /dotnet/csharp/tour-of-csharp/tutorials/index + - name: Fundamentals + tocHref: /dotnet/csharp/fundamentals/ + topicHref: /dotnet/csharp/fundamentals/types/index + - name: What's new + tocHref: /dotnet/csharp/whats-new/ + topicHref: /dotnet/csharp/whats-new/index + items: + - name: Tutorials + tocHref: /dotnet/csharp/whats-new/tutorials/ + topicHref: /dotnet/csharp/whats-new/tutorials/records + - name: Asynchronous programming + tocHref: /dotnet/csharp/asynchronous-programming + topicHref: /dotnet/csharp/asynchronous-programming/index + - name: Advanced concepts + tocHref: /dotnet/csharp/advanced-topics + topicHref: /dotnet/csharp/advanced-topics/reflection-and-attributes/index + + - name: Tutorials + tocHref: /dotnet/csharp/tutorials/ + topicHref: /dotnet/csharp/tutorials/index + - name: .NET Compiler Platform SDK + tocHref: /dotnet/csharp/roslyn-sdk/ + topicHref: /dotnet/csharp/roslyn-sdk/index + - name: Programming guide + tocHref: /dotnet/csharp/programming-guide/ + topicHref: /dotnet/csharp/programming-guide/index + items: + - name: Arrays + tocHref: /dotnet/csharp/programming-guide/arrays/ + topicHref: /dotnet/csharp/programming-guide/arrays/index + - name: Classes and structs + tocHref: /dotnet/csharp/programming-guide/classes-and-structs/ + topicHref: /dotnet/csharp/programming-guide/classes-and-structs/index + - name: Delegates + tocHref: /dotnet/csharp/programming-guide/delegates/ + topicHref: /dotnet/csharp/programming-guide/delegates/index + - name: Events + tocHref: /dotnet/csharp/programming-guide/events/ + topicHref: /dotnet/csharp/programming-guide/events/index + - name: Generics + tocHref: /dotnet/csharp/programming-guide/generics/ + topicHref: /dotnet/csharp/programming-guide/generics/index + - name: Indexers + tocHref: /dotnet/csharp/programming-guide/indexers/ + topicHref: /dotnet/csharp/programming-guide/indexers/index + - name: Interfaces + tocHref: /dotnet/csharp/programming-guide/interfaces/ + topicHref: /dotnet/csharp/programming-guide/interfaces/index + - name: Interoperability + tocHref: /dotnet/csharp/programming-guide/interop/ + topicHref: /dotnet/csharp/programming-guide/interop/index + - name: Programming concepts + tocHref: /dotnet/csharp/programming-guide/concepts/ + topicHref: /dotnet/csharp/programming-guide/concepts/index + items: + - name: Attributes + tocHref: /dotnet/csharp/programming-guide/concepts/attributes/ + topicHref: /dotnet/csharp/programming-guide/concepts/attributes/index + - name: Covariance and contravariance + tocHref: /dotnet/csharp/programming-guide/concepts/covariance-contravariance/ + topicHref: /dotnet/csharp/programming-guide/concepts/covariance-contravariance/index + - name: Expression trees + tocHref: /dotnet/csharp/programming-guide/concepts/expression-trees/ + topicHref: /dotnet/csharp/programming-guide/concepts/expression-trees/index + - name: LINQ + tocHref: /dotnet/csharp/programming-guide/concepts/linq/ + topicHref: /dotnet/csharp/programming-guide/concepts/linq/index + - name: Serialization + tocHref: /dotnet/csharp/programming-guide/concepts/serialization/ + topicHref: /dotnet/csharp/programming-guide/concepts/serialization/index + - name: Threading + tocHref: /dotnet/csharp/programming-guide/concepts/threading/ + topicHref: /dotnet/csharp/programming-guide/concepts/threading/index + - name: Statements, expressions, and operators + tocHref: /dotnet/csharp/programming-guide/statements-expressions-operators/ + topicHref: /dotnet/csharp/programming-guide/statements-expressions-operators/index + - name: Strings + tocHref: /dotnet/csharp/programming-guide/strings/ + topicHref: /dotnet/csharp/programming-guide/strings/index + - name: Types + tocHref: /dotnet/csharp/programming-guide/types/ + topicHref: /dotnet/csharp/programming-guide/types/index + - name: Language reference + tocHref: /dotnet/csharp/language-reference/ + topicHref: /dotnet/csharp/language-reference/index + items: + - name: Keywords + tocHref: /dotnet/csharp/language-reference/keywords/ + topicHref: /dotnet/csharp/language-reference/keywords/index + - name: Operators and expressions + tocHref: /dotnet/csharp/language-reference/operators/ + topicHref: /dotnet/csharp/language-reference/operators/index + - name: Special characters + tocHref: /dotnet/csharp/language-reference/tokens/ + topicHref: /dotnet/csharp/language-reference/tokens/index + - name: Preprocessor directives + tocHref: /dotnet/csharp/language-reference/preprocessor-directives/ + topicHref: /dotnet/csharp/language-reference/preprocessor-directives/index + - name: Compiler options + tocHref: /dotnet/csharp/language-reference/compiler-options/ + topicHref: /dotnet/csharp/language-reference/compiler-options/index + - name: Compiler messages + tocHref: /dotnet/csharp/language-reference/compiler-messages/ + topicHref: /dotnet/csharp/language-reference/compiler-messages/index + - name: Compiler messages + tocHref: /dotnet/csharp/misc + topicHref: /dotnet/csharp/language-reference/compiler-messages/index + - name: Specification + items: + - name: C# 7.0 draft specification + tocHref: /dotnet/csharp/language-reference/language-specification/ + topicHref: /dotnet/csharp/language-reference/language-specification/index + - name: C# feature specifications + tocHref: /dotnet/csharp/language-reference/proposals + topicHref: /dotnet/csharp/language-reference/proposals/csharp-11.0/index + - name: F# guide + tocHref: /dotnet/fsharp/ + topicHref: /dotnet/fsharp/index + - name: Visual Basic guide + tocHref: /dotnet/visual-basic/ + topicHref: /dotnet/visual-basic/index + items: + - name: Get started + tocHref: /dotnet/visual-basic/getting-started/ + topicHref: /dotnet/visual-basic/getting-started/index + - name: Develop applications + tocHref: /dotnet/visual-basic/developing-apps/ + topicHref: /dotnet/visual-basic/developing-apps/index + - name: Programming concepts + tocHref: /dotnet/visual-basic/programming-guide/concepts/ + topicHref: /dotnet/visual-basic/programming-guide/concepts/index + items: + - name: Asynchronous programming + tocHref: /dotnet/visual-basic/programming-guide/concepts/async/ + topicHref: /dotnet/visual-basic/programming-guide/concepts/async/index + - name: Attributes + tocHref: /dotnet/visual-basic/programming-guide/concepts/attributes/ + topicHref: /dotnet/visual-basic/programming-guide/concepts/attributes/index + - name: Expression trees + tocHref: /dotnet/visual-basic/programming-guide/concepts/expression-trees/ + topicHref: /dotnet/visual-basic/programming-guide/concepts/expression-trees/index + - name: LINQ + tocHref: /dotnet/visual-basic/programming-guide/concepts/linq/ + topicHref: /dotnet/visual-basic/programming-guide/concepts/linq/index + - name: Serialization + tocHref: /dotnet/visual-basic/programming-guide/concepts/serialization/ + topicHref: /dotnet/visual-basic/programming-guide/concepts/serialization/index + - name: Threading + tocHref: /dotnet/visual-basic/programming-guide/concepts/threading/ + topicHref: /dotnet/visual-basic/programming-guide/concepts/threading/index + - name: Program structure and code conventions + tocHref: /dotnet/visual-basic/programming-guide/program-structure/ + topicHref: /dotnet/visual-basic/programming-guide/program-structure/program-structure-and-code-conventions + - name: Language features + tocHref: /dotnet/visual-basic/programming-guide/language-features/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/index + items: + - name: Arrays + tocHref: /dotnet/visual-basic/programming-guide/language-features/arrays/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/arrays/index + - name: Collection initializers + tocHref: /dotnet/visual-basic/programming-guide/language-features/collection-initializers/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/collection-initializers/index + - name: Constants and enumerations + tocHref: /dotnet/visual-basic/programming-guide/language-features/constants-enums/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/constants-enums/index + - name: Control flow + tocHref: /dotnet/visual-basic/programming-guide/language-features/control-flow/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/control-flow/index + - name: Data types + tocHref: /dotnet/visual-basic/programming-guide/language-features/data-types/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/data-types/index + - name: Declared elements + tocHref: /dotnet/visual-basic/programming-guide/language-features/declared-elements/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/declared-elements/index + - name: Delegates + tocHref: /dotnet/visual-basic/programming-guide/language-features/delegates/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/delegates/index + - name: Early and late binding + tocHref: /dotnet/visual-basic/programming-guide/language-features/early-late-binding/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/early-late-binding/index + - name: Events + tocHref: /dotnet/visual-basic/programming-guide/language-features/events/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/events/index + - name: LINQ + tocHref: /dotnet/visual-basic/programming-guide/language-features/linq/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/linq/index + - name: Objects and classes + tocHref: /dotnet/visual-basic/programming-guide/language-features/objects-and-classes/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/objects-and-classes/index + - name: Operators and expressions + tocHref: /dotnet/visual-basic/programming-guide/language-features/operators-and-expressions/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/operators-and-expressions/index + - name: Procedures + tocHref: /dotnet/visual-basic/programming-guide/language-features/procedures/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/procedures/index + - name: Strings + tocHref: /dotnet/visual-basic/programming-guide/language-features/strings/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/strings/index + - name: Variables + tocHref: /dotnet/visual-basic/programming-guide/language-features/variables/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/variables/index + - name: XML + tocHref: /dotnet/visual-basic/programming-guide/language-features/xml/ + topicHref: /dotnet/visual-basic/programming-guide/language-features/xml/index + - name: COM interop + tocHref: /dotnet/visual-basic/programming-guide/com-interop/ + topicHref: /dotnet/visual-basic/programming-guide/com-interop/index + - name: Language reference + tocHref: /dotnet/visual-basic/language-reference/ + topicHref: /dotnet/visual-basic/language-reference/index + - name: Reference + tocHref: /dotnet/visual-basic/reference/ + topicHref: /dotnet/visual-basic/reference/index + - name: ML.NET guide + tocHref: /dotnet/machine-learning/ + topicHref: /dotnet/machine-learning/index + items: + - name: How-to guides + tocHref: /dotnet/machine-learning/how-to-guides/ + topicHref: /dotnet/machine-learning/how-to-guides/index + - name: Resources + tocHref: /dotnet/machine-learning/resources/ + topicHref: /dotnet/machine-learning/resources/index + - name: Tutorials + tocHref: /dotnet/machine-learning/tutorials/ + topicHref: /dotnet/machine-learning/tutorials/index + - name: .NET for Apache Spark guide + tocHref: /dotnet/spark/ + topicHref: /dotnet/spark/index + - name: Azure + tocHref: /dotnet/azure/ + topicHref: /dotnet/azure/index + items: + - name: Azure for .NET developers + tocHref: /dotnet/azure/ + topicHref: /dotnet/azure/index + - name: Orleans + tocHref: /dotnet/orleans + topicHref: /dotnet/orleans/index + items: + - name: Deployment + tocHref: /dotnet/orleans/deployment + topicHref: /dotnet/orleans/deployment/index + - name: Grains + tocHref: /dotnet/orleans/grains + topicHref: /dotnet/orleans/grains/index + - name: Event sourcing + tocHref: /dotnet/orleans/grains/event-sourcing + topicHref: /dotnet/orleans/grains/event-sourcing/index + - name: Persistence + tocHref: /dotnet/orleans/grains/persistence + topicHref: /dotnet/orleans/grains/grain-persistence/index + - name: Host configuration + tocHref: /dotnet/orleans/host/configuration-guide + topicHref: /dotnet/orleans/host/configuration-guide/index + - name: Host monitoring + tocHref: /dotnet/orleans/host/monitoring + topicHref: /dotnet/orleans/host/monitoring/index + - name: Implementation details + tocHref: /dotnet/orleans/implementation + topicHref: /dotnet/orleans/implementation/index + - name: Streams implementation + tocHref: /dotnet/orleans/implementation/streams-implementation + topicHref: /dotnet/orleans/implementation/streams-implementation/index + - name: Migration guide + tocHref: /dotnet/orleans/migration + topicHref: /dotnet/orleans/migration/index + - name: Resources + tocHref: /dotnet/orleans/resources + topicHref: /dotnet/orleans/resources/frequently-asked-questions + - name: Streaming + tocHref: /dotnet/orleans/streaming + topicHref: /dotnet/orleans/streaming/index + - name: .NET IoT libraries + tocHref: /dotnet/iot/ + topicHref: /dotnet/iot/index + - name: What's new + tocHref: /dotnet/whats-new/ + topicHref: /dotnet/whats-new/index + - name: .NET architecture + tocHref: /dotnet/architecture/ + topicHref: /dotnet/architecture/index + items: + - name: Modern ASP.NET web applications e-book + tocHref: /dotnet/architecture/modern-web-apps-azure/ + topicHref: /dotnet/architecture/modern-web-apps-azure/index + - name: .NET microservices - Architecture e-book + tocHref: /dotnet/architecture/microservices/ + topicHref: /dotnet/architecture/microservices/index + - name: Cloud native + tocHref: /dotnet/architecture/cloud-native/ + topicHref: /dotnet/architecture/cloud-native/index + - name: Modernizing .NET apps e-book + tocHref: /dotnet/architecture/modernize-with-azure-containers/ + topicHref: /dotnet/architecture/modernize-with-azure-containers/index + - name: .NET microservices - DevOps e-book + tocHref: /dotnet/architecture/containerized-lifecycle/ + topicHref: /dotnet/architecture/containerized-lifecycle/index + - name: Serverless apps e-book + tocHref: /dotnet/architecture/serverless/ + topicHref: /dotnet/architecture/serverless/index + - name: Blazor for ASP.NET Web Forms developers e-book + tocHref: /dotnet/architecture/blazor-for-web-forms-developers/ + topicHref: /dotnet/architecture/blazor-for-web-forms-developers/index + - name: ASP.NET Core gRPC for WCF developers + tocHref: /dotnet/architecture/grpc-for-wcf-developers/ + topicHref: /dotnet/architecture/grpc-for-wcf-developers/index + - name: Modernizing desktop apps + tocHref: /dotnet/architecture/modernize-desktop/ + topicHref: /dotnet/architecture/modernize-desktop/index + - name: Framework design guidelines + tocHref: /dotnet/standard/design-guidelines/ + topicHref: /dotnet/standard/design-guidelines/index + - name: Library guidance + tocHref: /dotnet/standard/library-guidance/ + topicHref: /dotnet/standard/library-guidance/index + - name: Advanced programming + tocHref: /dotnet/navigate/advanced-programming/ + topicHref: /dotnet/navigate/advanced-programming/index + items: + - name: Asynchronous programming patterns + tocHref: /dotnet/standard/asynchronous-programming-patterns/ + topicHref: /dotnet/standard/asynchronous-programming-patterns/index + - name: Managed threading + tocHref: /dotnet/standard/threading/ + topicHref: /dotnet/standard/threading/index + - name: Parallel programming + tocHref: /dotnet/standard/parallel-programming/ + topicHref: /dotnet/standard/parallel-programming/index + - name: Native interop + tocHref: /dotnet/standard/native-interop/ + topicHref: /dotnet/standard/native-interop/index + - name: Memory management + tocHref: /dotnet/standard/garbage-collection/ + topicHref: /dotnet/standard/managed-code + - name: Data access + tocHref: /dotnet/navigate/data-access/ + topicHref: /dotnet/navigate/data-access/index + items: + - name: LINQ + tocHref: /dotnet/standard/linq/ + topicHref: /dotnet/standard/linq/index + - name: Microsoft.Data.Sqlite + tocHref: /dotnet/standard/data/sqlite/ + topicHref: /dotnet/standard/data/sqlite/index + - name: XML documents and data + tocHref: /dotnet/standard/data/xml/ + topicHref: /dotnet/standard/data/xml/index + - name: DevOps and testing + tocHref: /dotnet/navigate/devops-testing/ + topicHref: /dotnet/navigate/devops-testing/index + items: + - name: DevOps + tocHref: /dotnet/devops/ + topicHref: /dotnet/devops/github-actions-overview + - name: Testing + tocHref: /dotnet/core/testing/ + topicHref: /dotnet/core/testing/index + - name: Deployment models + tocHref: /dotnet/core/deploying/ + topicHref: /dotnet/core/deploying/index + - name: Migration guide + tocHref: /dotnet/core/porting/ + topicHref: /dotnet/navigate/migration-guide/index + - name: Security + tocHref: /dotnet/navigate/security/ + topicHref: /dotnet/navigate/security/index + items: + - name: Security + tocHref: /dotnet/standard/security/ + topicHref: /dotnet/standard/security/index + - name: Tools and diagnostics + tocHref: /dotnet/navigate/tools-diagnostics/ + topicHref: /dotnet/navigate/tools-diagnostics/index + items: + - name: Tools + tocHref: /dotnet/core/tools/ + topicHref: /dotnet/core/tools/index + - name: SYSLIB diagnostics + tocHref: /dotnet/fundamentals/syslib-diagnostics/ + topicHref: /dotnet/fundamentals/syslib-diagnostics/obsoletions-overview + - name: Project SDKs + tocHref: /dotnet/core/project-sdk/ + topicHref: /dotnet/core/project-sdk/overview + - name: Additional tools + tocHref: /dotnet/core/additional-tools/ + topicHref: /dotnet/core/additional-tools/index + - name: Diagnostics + tocHref: /dotnet/core/diagnostics/ + topicHref: /dotnet/core/diagnostics/index + - name: Diagnostics + tocHref: /dotnet/fundamentals/diagnostics/ + topicHref: /dotnet/core/diagnostics/index + - name: Code analysis + tocHref: /dotnet/fundamentals/code-analysis/ + topicHref: /dotnet/fundamentals/code-analysis/overview + - name: Package validation + tocHref: /dotnet/fundamentals/package-validation/ + topicHref: /dotnet/fundamentals/package-validation/overview diff --git a/docs/core/additional-tools/dotnet-coverage.md b/docs/core/additional-tools/dotnet-coverage.md index 21ecd46a83426..91c1634489d4e 100644 --- a/docs/core/additional-tools/dotnet-coverage.md +++ b/docs/core/additional-tools/dotnet-coverage.md @@ -243,7 +243,10 @@ Creates a coverage file for existing code coverage collection. ```console dotnet-coverage snapshot - [-r|--reset] [-o|--output ] [-t|--timeout] + [-r|--reset] + [-o|--output ] + [-tn|--tag-name ] [-tid|--tag-identifier ] + [-t|--timeout] [-l|--log-file ] [-ll|--log-level ] [-?|-h|--help] ``` @@ -264,6 +267,14 @@ dotnet-coverage snapshot Sets the code coverage report output file. If not provided, it's generated automatically with a timestamp. +* **`-tn|--tag-name `** + + Creates a snapshot tag name in the coverage file with current coverage information. Tag-name and tag-identifier are mutually inclusive. + +* **`-tid|--tag-identifier `** + + Creates a snapshot tag identifier in the coverage file with current coverage information. Tag-name and tag-identifier are mutually inclusive. + * **`-t|--timeout`** Timeout (in milliseconds) for interprocess communication between the client and the server. @@ -385,6 +396,12 @@ A code coverage file for session `serverdemo` can be generated with current cove dotnet-coverage snapshot --output after_first_test.coverage serverdemo ``` +Also, a snapshot tag can be added to the coverage file using tag options as follows: + +```console +dotnet-coverage snapshot --tag-name after_first_test --tag-identifier after_first_test serverdemo +``` + Finally, session `serverdemo` and the server can be closed as follows: ```console diff --git a/docs/core/additional-tools/uninstall-tool.md b/docs/core/additional-tools/uninstall-tool.md index 80c78e0b7daa7..6cd9e26f4d344 100644 --- a/docs/core/additional-tools/uninstall-tool.md +++ b/docs/core/additional-tools/uninstall-tool.md @@ -72,7 +72,7 @@ For more information, see [remove command](#remove-command) later in this articl ### Step 4 - Delete the NuGet fallback folder (optional) -In some cases, you no longer need the `NuGetFallbackFolder` and may wish to delete it. For more information, see [Remove the NuGetFallbackFolder](../install/remove-runtime-sdk-versions.md#remove-the-nuget-fallback-folder). +In some cases, you no longer need the `NuGetFallbackFolder` and may wish to delete it. For more information, see [Remove the NuGetFallbackFolder](../install/remove-runtime-sdk-versions.md#remove-the-nuget-fallback-directory). ## Uninstall the tool diff --git a/docs/core/additional-tools/vscode-dotnet-runtime.md b/docs/core/additional-tools/vscode-dotnet-runtime.md index f072f24475166..f931ddc1e266d 100644 --- a/docs/core/additional-tools/vscode-dotnet-runtime.md +++ b/docs/core/additional-tools/vscode-dotnet-runtime.md @@ -23,7 +23,7 @@ For more examples, check out these open source extensions that currently leverag - [Azure Resource Manager (ARM) Tools for Visual Studio Code](https://github.com/microsoft/vscode-azurearmtools) -- [.NET Interactive Notebooks](https://github.com/dotnet/interactive/tree/main/src/dotnet-interactive-vscode) +- [.NET Interactive Notebooks](https://github.com/dotnet/interactive/tree/main/src/polyglot-notebooks-vscode) ## Getting started: end users diff --git a/docs/core/additional-tools/wcf-web-service-reference-guide.md b/docs/core/additional-tools/wcf-web-service-reference-guide.md index be0eea1dddc27..a8d53f0a19d80 100644 --- a/docs/core/additional-tools/wcf-web-service-reference-guide.md +++ b/docs/core/additional-tools/wcf-web-service-reference-guide.md @@ -27,7 +27,7 @@ The screenshots in this article are from Visual Studio 2022. Using the **ASP.NET Core Web Application** project template as an example, this article walks you through adding a WCF service reference to the project. -1. In Solution Explorer, double-click the **Connected Services** node of the project. (For a .NET Core or .NET Standard project, this option is available when you right-click on the **Dependencies** node of the project in Solution Explorer and choose **Manage Connected Services**.) +1. In Solution Explorer, double-click the **Connected Services** node of the project. (For a .NET Core or .NET Standard project, right-click on the project and select **Add** > **Connected Service**.) The **Connected Services** page appears as shown in the following image: diff --git a/docs/core/compatibility/2.1.md b/docs/core/compatibility/2.1.md index 9e166e63cd418..75ad13ede4477 100644 --- a/docs/core/compatibility/2.1.md +++ b/docs/core/compatibility/2.1.md @@ -32,3 +32,7 @@ If you're migrating to version 2.1 of .NET Core, the breaking changes listed in [!INCLUDE [DotNetCliToolReference project elements removed for bundled tools](../../../includes/core-changes/msbuild/2.1/dotnetclitoolreference.md)] *** + +## See also + +- [What's new in .NET Core 2.1](../whats-new/dotnet-core-2-1.md) diff --git a/docs/core/compatibility/3.0.md b/docs/core/compatibility/3.0.md index fc3d5a6c647f1..381c46c92e614 100644 --- a/docs/core/compatibility/3.0.md +++ b/docs/core/compatibility/3.0.md @@ -378,3 +378,7 @@ If you're migrating to version 3.0 of .NET Core, ASP.NET Core, or EF Core, the b [!INCLUDE[Default value of HttpRequestMessage.Version changed to 1.1](~/includes/core-changes/networking/3.0/httprequestmessage-version-change.md)] *** + +## See also + +- [What's new in .NET Core 3.0](../whats-new/dotnet-core-3-0.md) diff --git a/docs/core/compatibility/3.1.md b/docs/core/compatibility/3.1.md index da9001c9eb646..9a1f56490f3ad 100644 --- a/docs/core/compatibility/3.1.md +++ b/docs/core/compatibility/3.1.md @@ -39,3 +39,7 @@ If you're migrating to version 3.1 of .NET Core or ASP.NET Core, the breaking ch [!INCLUDE[CellFormatting event](~/includes/core-changes/windowsforms/3.1/cellformatting-event-not-raised.md)] *** + +## See also + +- [What's new in .NET Core 3.1](../whats-new/dotnet-core-3-1.md) diff --git a/docs/core/compatibility/5.0.md b/docs/core/compatibility/5.0.md index 6a423d8aef0bd..bbd17dcfe560a 100644 --- a/docs/core/compatibility/5.0.md +++ b/docs/core/compatibility/5.0.md @@ -190,3 +190,7 @@ If you're migrating an app to .NET 5, the breaking changes listed here might aff | - | - | - | | [OutputType set to WinExe](sdk/5.0/automatically-infer-winexe-output-type.md) | ❌ | ✔️ | | [WPF apps use Microsoft.NET.Sdk](sdk/5.0/sdk-and-target-framework-change.md) | ❌ | ✔️ | + +## See also + +- [What's new in .NET 5](../whats-new/dotnet-5.md) diff --git a/docs/core/compatibility/6.0.md b/docs/core/compatibility/6.0.md index b4ea4d1447178..a2fb4e2f03adf 100644 --- a/docs/core/compatibility/6.0.md +++ b/docs/core/compatibility/6.0.md @@ -1,5 +1,6 @@ --- title: Breaking changes in .NET 6 +titleSuffix: "" description: Navigate to the breaking changes in .NET 6. ms.date: 06/22/2022 no-loc: [Blazor, Razor, Kestrel] @@ -181,3 +182,7 @@ For information on other breaking changes for containers in .NET 6, see [.NET 6 | - | :-: | :-: | - | | [XmlDocument.XmlResolver nullability change](core-libraries/6.0/xmlresolver-nullable.md) | ❌ | ✔️ | RC 1 | | [XNodeReader.GetAttribute behavior for invalid index](core-libraries/6.0/xnodereader-getattribute.md) | ✔️ | ❌ | Preview 2 | + +## See also + +- [What's new in .NET 6](../whats-new/dotnet-6.md) diff --git a/docs/core/compatibility/7.0.md b/docs/core/compatibility/7.0.md index e208df8fae999..0e9f9db448820 100644 --- a/docs/core/compatibility/7.0.md +++ b/docs/core/compatibility/7.0.md @@ -1,5 +1,6 @@ --- title: Breaking changes in .NET 7 +titleSuffix: "" description: Navigate to the breaking changes in .NET 7. ms.date: 01/04/2022 no-loc: [Blazor, Razor, Kestrel] @@ -45,6 +46,7 @@ If you're migrating an app to .NET 7, the breaking changes listed here might aff | [C++/CLI projects in Visual Studio](core-libraries/7.0/cpluspluscli-compiler-version.md) | ✔️ | ❌ | Preview 3 | | [Changes to reflection invoke API exceptions](core-libraries/7.0/reflection-invoke-exceptions.md) | ❌ | ✔️ | Preview 4 | | [Collectible Assembly in non-collectible AssemblyLoadContext](core-libraries/7.0/collectible-assemblies.md) | ❌ | ✔️ | Preview 5 | +| [DateTime addition methods precision change](core-libraries/7.0/datetime-add-precision.md) | ✔️ | ✔️ | | [Equals method behavior change for NaN](core-libraries/7.0/equals-nan.md) | ❌ | ✔️ | Preview 5 | | [Generic type constraint on PatternContext\](core-libraries/7.0/patterncontext-generic-constraint.md) | ❌ | ❌ | Preview 3 | | [Legacy FileStream strategy removed](core-libraries/7.0/filestream-compat-switch.md) | ❌ | ✔️ | Preview 1 | @@ -122,11 +124,14 @@ If you're migrating an app to .NET 7, the breaking changes listed here might aff | - | :-: | :-: | - | | [Automatic RuntimeIdentifier for certain projects](sdk/7.0/automatic-runtimeidentifier.md) | ✔️ | ❌ | 7.0.100 | | [Automatic RuntimeIdentifier for publish only](sdk/7.0/automatic-rid-publish-only.md) | ❌ | ❌ | 7.0.200 | +| [CLI console output uses UTF-8](sdk/8.0/console-encoding.md) | ❌ | ❌ | 7.0.3xx | +| [Console encoding not UTF-8 after completion](sdk/8.0/console-encoding-fix.md) | ❌ | ✔️ | 7.0.300 | | [MSBuild serialization of custom types in .NET 7](sdk/7.0/custom-serialization.md) | ❌ | ❌ | 7.0.100 | | [Side-by-side SDK installations](sdk/7.0/side-by-side-install.md) | ❌ | ❌ | 7.0.100 | | [Version requirements for .NET 7 SDK](sdk/7.0/vs-msbuild-version.md) | ✔️ | ✔️ | 7.0.100 | | [dotnet test: switch `-a` to alias `--arch` instead of `--test-adapter-path`](https://github.com/dotnet/sdk/issues/21389) | ❌ | ❌ | Preview 1 | | [dotnet test: switch `-r` to alias `--runtime` instead of `--results-dir`](https://github.com/dotnet/sdk/issues/21952) | ❌ | ❌ | Preview 1 | +| [`--output` option no longer is valid for solution-level commands](sdk/7.0/solution-level-output-no-longer-valid.md) | ❌ | ❌ | 7.0.200 | ## Serialization @@ -150,3 +155,7 @@ If you're migrating an app to .NET 7, the breaking changes listed here might aff | Title | Binary compatible | Source compatible | Introduced | | - | :-: | :-: | - | | [XmlSecureResolver is obsolete](xml/7.0/xmlsecureresolver-obsolete.md) | ❌ | ❌ | RC 1 | + +## See also + +- [What's new in .NET 7](../whats-new/dotnet-7.md) diff --git a/docs/core/compatibility/8.0.md b/docs/core/compatibility/8.0.md new file mode 100644 index 0000000000000..27778379868f7 --- /dev/null +++ b/docs/core/compatibility/8.0.md @@ -0,0 +1,82 @@ +--- +title: Breaking changes in .NET 8 +titleSuffix: "" +description: Navigate to the breaking changes in .NET 8. +ms.date: 01/24/2023 +no-loc: [Blazor, Razor, Kestrel] +--- +# Breaking changes in .NET 8 + +If you're migrating an app to .NET 8, the breaking changes listed here might affect you. Changes are grouped by technology area, such as ASP.NET Core or Windows Forms. + +[!INCLUDE [binary-source-behavioral](includes/binary-source-behavioral.md)] + +> [!NOTE] +> +> This article is a work in progress. It's not a complete list of breaking changes in .NET 8. To query breaking changes that are still pending publication, see [Issues of .NET](https://issuesof.net/?q=%20is:open%20-label:Documented%20is:issue%20(label:%22Breaking%20Change%22%20or%20label:breaking-change)%20(repo:dotnet/docs%20or%20repo:aspnet/Announcements)%20group:repo%20(label:%22:checkered_flag:%20Release:%20.NET%208%22%20or%20label:8.0.0)%20sort:created-desc). + +## Core .NET libraries + +| Title | Type of change | Introduced | +| ----------------------------------------------------------------------------------------------------- | ------------------- | ---------- | +| [Activity operation name when null](core-libraries/8.0/activity-operation-name.md) | Behavioral change | Preview 1 | +| [AnonymousPipeServerStream.Dispose behavior](core-libraries/8.0/anonymouspipeserverstream-dispose.md) | Behavioral change | Preview 1 | +| [Backslash mapping in Unix file paths](core-libraries/8.0/file-path-backslash.md) | Behavioral change | Preview 1 | +| [FileStream writes when pipe is closed](core-libraries/8.0/filestream-disposed-pipe.md) | Behavioral change | Preview 1 | +| [GetFolderPath behavior on Unix](core-libraries/8.0/getfolderpath-unix.md) | Behavioral change | Preview 1 | +| [ITypeDescriptorContext nullable annotations](core-libraries/8.0/itypedescriptorcontext-props.md) | Source incompatible | Preview 1 | +| [Legacy Console.ReadKey removed](core-libraries/8.0/console-readkey-legacy.md) | Behavioral change | Preview 1 | + +## Cryptography + +| Title | Type of change | Introduced | +| -------------------------------------------------------------------------------------------------------- | ------------------- | ---------- | +| [AesGcm authentication tag size on macOS](cryptography/8.0/aesgcm-auth-tag-size.md) | Behavioral change | Preview 1 | +| [RSA.EncryptValue and RSA.DecryptValue obsolete](cryptography/8.0/rsa-encrypt-decrypt-value-obsolete.md) | Source incompatible | Preview 1 | + +## Extensions + +| Title | Type of change | Introduced | +| --------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------- | +| [ActivatorUtilities.CreateInstance behaves consistently](extensions/8.0/activatorutilities-createinstance-behavior.md) | Behavioral change | Preview 1 | +| [ActivatorUtilities.CreateInstance requires non-null provider](extensions/8.0/activatorutilities-createinstance-null-provider.md) | Behavioral change | Preview 1 | +| [ConfigurationBinder throws for mismatched value](extensions/8.0/configurationbinder-exceptions.md) | Behavioral change | Preview 1 | +| [HostApplicationBuilderSettings.Args respected by HostApplicationBuilder ctor](extensions/8.0/hostapplicationbuilder-ctor.md) | Behavioral change | Preview 2 | + +## Globalization + +| Title | Type of change | Introduced | +| ------------------------------------------------------------------------------- | ----------------- | ---------- | +| [TwoDigitYearMax default is 2049](globalization/8.0/twodigityearmax-default.md) | Behavioral change | Preview 1 | + +## Reflection + +| Title | Type of change | Introduced | +| ------------------------------------------------------------------------------------------------- | ----------------- | ---------- | +| [IntPtr no longer used for function pointer types](reflection/8.0/function-pointer-reflection.md) | Behavioral change | Preview 2 | + +## SDK + +| Title | Type of change | Introduced | +| ------------------------------------------------------------------------------- | ------------------------------------------------ | ---------- | +| [CLI console output uses UTF-8](sdk/8.0/console-encoding.md) | Behavioral change/Source and binary incompatible | Preview 1 | +| [Console encoding not UTF-8 after completion](sdk/8.0/console-encoding-fix.md) | Behavioral change/Binary incompatible | Preview 3 | +| ['dotnet pack' uses Release configuration](sdk/8.0/dotnet-pack-config.md) | Behavioral change/Source incompatible | Preview 1 | +| ['dotnet publish' uses Release configuration](sdk/8.0/dotnet-publish-config.md) | Behavioral change/Source incompatible | Preview 1 | + +## Windows Forms + +| Title | Type of change | Introduced | +| -------------------------------------------------------------------------------------------------------- | ------------------- | ---------- | +| [Anchor layout changes](windows-forms/8.0/anchor-layout.md) | Behavioral change | Preview 1 | +| [DefaultValueAttribute removed from some properties](windows-forms/8.0/defaultvalueattribute-removal.md) | Behavioral change | Preview 2 | +| [ExceptionCollection ctor throws ArgumentException](windows-forms/8.0/exceptioncollection.md) | Behavioral change | Preview 1 | +| [Forms scale according to AutoScaleMode](windows-forms/8.0/top-level-window-scaling.md) | Behavioral change | Preview 1 | +| [ImageList.ColorDepth default is Depth32Bit](windows-forms/8.0/imagelist-colordepth.md) | Behavioral change | Preview 1 | +| [TableLayoutStyleCollection throws ArgumentException](windows-forms/8.0/tablelayoutstylecollection.md) | Behavioral change | Preview 1 | +| [Top-level forms scale minimum and maximum size to DPI](windows-forms/8.0/forms-scale-size-to-dpi.md) | Behavioral change | Preview 1 | +| [WFDEV002 obsoletion is now an error](windows-forms/8.0/domainupdownaccessibleobject.md) | Source incompatible | Preview 1 | + +## See also + +- [What's new in .NET 8](../whats-new/dotnet-8.md) diff --git a/docs/core/compatibility/aspnet-core/6.0/byte-array-interop.md b/docs/core/compatibility/aspnet-core/6.0/byte-array-interop.md index 20db02df49f9c..4d74cbe95a631 100644 --- a/docs/core/compatibility/aspnet-core/6.0/byte-array-interop.md +++ b/docs/core/compatibility/aspnet-core/6.0/byte-array-interop.md @@ -2,7 +2,6 @@ title: "Breaking change: Blazor: Byte Array Interop" description: "Learn about the breaking change in ASP.NET Core 6.0 titled Blazor: Byte Array Interop" no-loc: [ Blazor ] -ms.author: taparik ms.date: 06/21/2021 --- # Blazor: Byte-array interop diff --git a/docs/core/compatibility/core-libraries/7.0/datetime-add-precision.md b/docs/core/compatibility/core-libraries/7.0/datetime-add-precision.md new file mode 100644 index 0000000000000..dd870ddabc73a --- /dev/null +++ b/docs/core/compatibility/core-libraries/7.0/datetime-add-precision.md @@ -0,0 +1,41 @@ +--- +title: ".NET 7 breaking change: DateTime addition methods precision change" +description: Learn about the .NET 7 breaking change in core .NET libraries where the precision of the value that's added in DateTime addition methods has increased. +ms.date: 02/01/2023 +--- +# DateTime addition methods precision change + +In .NET 6 and earlier versions, the value parameter of the `DateTime` addition methods was rounded to the nearest millisecond. In .NET 7 and later versions, the full precision of the value parameter is used. However, due to the inherent imprecision of floating-point math, the resulting precision will vary. + +## Previous behavior + +Previously, the `double` value parameter of the `Add*` methods, for example, , was rounded to the nearest millisecond. + +## New behavior + +Starting in .NET 7, the full precision of the `double` value parameter is used, improving the precision of the [affected methods](#affected-apis). + +## Version introduced + +.NET 7 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +This change was made in response to a community request to improve the precision in . + +## Recommended action + +No specific action unless you have code that depends on the precision of the `Add*` methods. In that case, review your code and retest it to avoid any surprises with the precision change. + +## Affected APIs + +- +- +- +- +- +- diff --git a/docs/core/compatibility/core-libraries/8.0/activity-operation-name.md b/docs/core/compatibility/core-libraries/8.0/activity-operation-name.md new file mode 100644 index 0000000000000..36353d7ae624c --- /dev/null +++ b/docs/core/compatibility/core-libraries/8.0/activity-operation-name.md @@ -0,0 +1,48 @@ +--- +title: ".NET 8 breaking change: Activity operation name when null" +description: Learn about the .NET 8 breaking change in core .NET libraries where the operation name of an Activity is stored as an empty string if it's specified as null when the activity is created. +ms.date: 01/26/2023 +--- +# Activity operation name when null + +Starting in .NET 8, if you create an `Activity` object using `null` for the operation name, the operation name will be stored as an empty string (`""`) instead of `null`. + +## Previous behavior + +Previously, if you created an object using a `null` operation name, the operation name inside the activity was stored as `null`. + +```csharp +new Activity(operationName: null).OperationName // Value is null. +``` + +## New behavior + +Starting in .NET 8, if you create an object using a `null` operation name, the operation name is stored as an empty string. + +```csharp +new Activity(operationName: null).OperationName // Value is "". +``` + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +A `null` operation name in an object can have an undesirable effect on backend trace collectors, which usually assume non-null operation names. +To avoid crashes, trace collectors have to special case `null` operation names inside an object. This change removes the special case requirement. + +## Recommended action + +This change is unlikely to cause breaks as using `null` when creating `Activity` objects is rare. If for any reason your code depended on the `null` value for the operation name, adjust the code to either not use `null` or expect that the operation name will be stored as an empty string when you specify `null`. + +## Affected APIs + +- constructor +- +- +- diff --git a/docs/core/compatibility/core-libraries/8.0/anonymouspipeserverstream-dispose.md b/docs/core/compatibility/core-libraries/8.0/anonymouspipeserverstream-dispose.md new file mode 100644 index 0000000000000..4741cc1c0bec6 --- /dev/null +++ b/docs/core/compatibility/core-libraries/8.0/anonymouspipeserverstream-dispose.md @@ -0,0 +1,36 @@ +--- +title: ".NET 8 breaking change: AnonymousPipeServerStream.Dispose behavior for HandleInheritability.Inheritable" +description: Learn about the .NET 8 breaking change in core .NET libraries where the behavior of AnonymousPipeServerStream.Dispose has changed for servers that are created for out-of-proc communication. +ms.date: 01/30/2023 +--- +# AnonymousPipeServerStream.Dispose behavior for HandleInheritability.Inheritable + +To avoid resource leaks, your code should call the method after passing the client handle to the child process. The behavior of `AnonymousPipeServerStream.Dispose` has been improved to lower the chance of similar leaks for users who don't call . + +## Previous behavior + +Previously, the client handle owned by the instance wasn't disposed by `AnonymousPipeServerStream.Dispose` unless the handle wasn't exposed at all. + +## New behavior + +Starting in .NET 8, the client handle owned by a server that was created for out-of-proc communication is disposed by `AnonymousPipeServerStream.Dispose` if it's not exposed by using the property. (You create a server for out-of-proc communication by passing to the constructor.) + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +This change was introduced to avoid a common resource leak. + +## Recommended action + +If a server was created for out-of-proc communication, don't reuse the client handle that's exposed as a string via the method after the server instance has been disposed. + +## Affected APIs + +- (specifically, `AnonymousPipeServerStream.Dispose()`) diff --git a/docs/core/compatibility/core-libraries/8.0/console-readkey-legacy.md b/docs/core/compatibility/core-libraries/8.0/console-readkey-legacy.md new file mode 100644 index 0000000000000..09b4fd928dbc4 --- /dev/null +++ b/docs/core/compatibility/core-libraries/8.0/console-readkey-legacy.md @@ -0,0 +1,36 @@ +--- +title: ".NET 8 breaking change: Legacy Console.ReadKey removed" +description: Learn about the .NET 8 breaking change in core .NET libraries where the legacy Console.ReadKey implementation has been removed. +ms.date: 01/27/2023 +--- +# Legacy Console.ReadKey removed + +The ability to use the legacy implementation exposed via the `System.Console.UseNet6CompatReadKey` JSON setting and the `DOTNET_SYSTEM_CONSOLE_USENET6COMPATREADKEY` environment variable has been removed. + +## Previous behavior + +Previously, you could request the .NET 6 console key parsing logic via a runtime configuration switch. + +## New behavior + +Starting in .NET 8, you can't request the .NET 6 compatibility mode for . + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The compatibility mode was introduced as a safety switch in case the implementation rewrite introduced any bugs. Only one bug was reported, and it was fixed in .NET 7, so there's no need to keep the previous implementation anymore. + +## Recommended action + +If the new implementation doesn't work as expected, open a bug at so it can be fixed. + +## Affected APIs + +- diff --git a/docs/core/compatibility/core-libraries/8.0/file-path-backslash.md b/docs/core/compatibility/core-libraries/8.0/file-path-backslash.md new file mode 100644 index 0000000000000..921c8c287783d --- /dev/null +++ b/docs/core/compatibility/core-libraries/8.0/file-path-backslash.md @@ -0,0 +1,47 @@ +--- +title: ".NET 8 breaking change: Backslash mapping in Unix file paths" +description: Learn about the .NET 8 breaking change in core .NET libraries where the CoreCLR native runtime no longer maps backslashes to forward slashes in file paths on Unix. +ms.date: 01/30/2023 +--- +# Backslash mapping in Unix file paths + +Backslash (`\`) characters are valid in directory and file names on Unix. Starting in .NET 8, the native CoreCLR runtime no longer converts `\` characters to directory separators—forward slashes (`/`)—on Unix. This change enables .NET applications to be located on paths with names that contain backslash characters. It also allows the native runtime, `dotnet` host, and the `ilasm` and `ildasm` tools to access files on paths that contain backslash characters. + +## Previous behavior + +The native CoreCLR runtime automatically converted backslash (`\`) characters in file paths to forward slashes (`/`) on Unix. + +## New behavior + +The native CoreCLR runtime doesn't convert any file path characters on Unix. + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +Without this change, .NET apps located in directories that contain backslash characters fail to start. + +## Recommended action + +- Use as a directory separator in your app instead of hardcoding it to `\` or `/`. +- Use `/` as a directory separator on Unix in file paths that you pass to the `dotnet` host, hosting APIs, and `ilasm` and `ildasm` tools. +- Use `/` as a directory separator on Unix in file paths in various `DOTNET_xxx` [environment variables](../../../tools/dotnet-environment-variables.md). + +## Affected APIs + +- Hosting APIs +- +- +- +- +- +- +- +- +- diff --git a/docs/core/compatibility/core-libraries/8.0/filestream-disposed-pipe.md b/docs/core/compatibility/core-libraries/8.0/filestream-disposed-pipe.md new file mode 100644 index 0000000000000..3d32f0f2e35b6 --- /dev/null +++ b/docs/core/compatibility/core-libraries/8.0/filestream-disposed-pipe.md @@ -0,0 +1,38 @@ +--- +title: ".NET 8 breaking change: FileStream writes when pipe is closed" +description: Learn about the .NET 8 breaking change in core .NET libraries where an exception is thrown if you write to a FileStream whose underlying pipe is closed. +ms.date: 01/27/2023 +--- +# FileStream writes when pipe is closed + + error handling on Windows has been updated to be consistent with , , , and . + +## Previous behavior + +Previously, when writing to a that represented a closed or disconnected pipe, the underlying operating system error was ignored and the write was reported as successful. However, nothing was written to the pipe. + +## New behavior + +Starting in .NET 8, when writing to a whose underlying pipe is closed or disconnected, the write fails and an is thrown. + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +This change was made to unify the handling of edge cases and avoid silent errors that are difficult to diagnose. + +## Recommended action + +Close or disconnect the pipe after everything has been written. + +## Affected APIs + +- +- +- diff --git a/docs/core/compatibility/core-libraries/8.0/getfolderpath-unix.md b/docs/core/compatibility/core-libraries/8.0/getfolderpath-unix.md new file mode 100644 index 0000000000000..c208557b970b1 --- /dev/null +++ b/docs/core/compatibility/core-libraries/8.0/getfolderpath-unix.md @@ -0,0 +1,62 @@ +--- +title: ".NET 8 breaking change: GetFolderPath behavior on Unix" +description: Learn about the .NET 8 breaking change in core .NET libraries where the behavior of Environment.GetFolderPath has changed on Unix. +ms.date: 11/18/2022 +--- +# GetFolderPath behavior on Unix + +Starting in .NET 8, the behavior of on Unix operating systems has changed. + +## Change description + +The following tables show how the returned path value changes for each Unix operating system for various special folders. + +### Linux + +| SpecialFolder value | Path (.NET 7 and earlier) | Path (.NET 8 and later) | +|---------------------|---------------------------|--------------------------------------------------------------------| +| `MyDocuments` | `$HOME` | Uses `XDG_DOCUMENTS_DIR` if available; otherwise `$HOME/Documents` | +| `Personal` | `$HOME` | Uses `XDG_DOCUMENTS_DIR` if available; otherwise `$HOME/Documents` | + +### macOS + +| SpecialFolder value | Path (.NET 7 and earlier) | Path (.NET 8 and later) | +|-|-|-| +| `MyDocuments` | `$HOME` | [NSDocumentDirectory](https://developer.apple.com/documentation/foundation/nssearchpathdirectory/nsdocumentdirectory) (`$HOME/Documents`) | +| `Personal` | `$HOME` | [NSDocumentDirectory](https://developer.apple.com/documentation/foundation/nssearchpathdirectory/nsdocumentdirectory) (`$HOME/Documents`) | +| `ApplicationData` | `$HOME/.config` | [NSApplicationSupportDirectory](https://developer.apple.com/documentation/foundation/nssearchpathdirectory/nsapplicationsupportdirectory) (Library/Application Support) | +| `LocalApplicationData` | `$HOME/.local/share` | [NSApplicationSupportDirectory](https://developer.apple.com/documentation/foundation/nssearchpathdirectory/nsapplicationsupportdirectory) (Library/Application Support) | +| `MyVideos` | `$HOME/Videos` | [NSMoviesDirectory](https://developer.apple.com/documentation/foundation/nssearchpathdirectory/nsmoviesdirectory) (`$HOME/Movies`) | + +### Android + +| SpecialFolder value | Path (.NET 7 and earlier) | Path (.NET 8 and later) | +|---------------------|---------------------------|-------------------------| +| `MyDocuments` | `$HOME` | `$HOME/Documents` | +| `Personal` | `$HOME` | `$HOME/Documents` | + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The previous behavior was incorrect and didn't meet user expectations for Linux, macOS, and Android. + +## Recommended action + +The most common break is if you're passing to on Unix to get the `$HOME` directory (`Environment.GetFolderPath(Environment.SpecialFolder.Personal)`). and are aliases for the same underlying enumeration value. If you're using in this way, change your code to pass instead (`Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)`). + +For other breaks, the recommended action is to do one of the following: + +- Migrate your application's files to the appropriate directory. +- Add a fallback check for the previous location to your code. + +## Affected APIs + +- +- diff --git a/docs/core/compatibility/core-libraries/8.0/itypedescriptorcontext-props.md b/docs/core/compatibility/core-libraries/8.0/itypedescriptorcontext-props.md new file mode 100644 index 0000000000000..9ea26f3d7cf71 --- /dev/null +++ b/docs/core/compatibility/core-libraries/8.0/itypedescriptorcontext-props.md @@ -0,0 +1,38 @@ +--- +title: ".NET 8 breaking change: ITypeDescriptorContext nullable annotations" +description: Learn about the .NET 8 breaking change in core .NET libraries where the nullable annotations on three ITypeDescriptorContext properties have changed. +ms.date: 01/31/2023 +--- +# ITypeDescriptorContext nullable annotations + + has three properties that were previously annotated as being non-nullable, but they were actually nullable in practice. The nullable annotations for these properties have been updated to indicate that they're nullable. This change can result in new build warnings related to use of nullable members. + +## Previous behavior + +Previously, the [affected properties](#affected-apis) were annotated as not being nullable. You could consume their values and assume they weren't `null` without any compile-time warnings. + +## New behavior + +Starting in .NET 8, the [affected properties](#affected-apis) are annotated as being nullable. If you consume their values without `null` checks, you'll get warnings at compile time. + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change can affect [source compatibility](../../categories.md#source-compatibility). + +## Reason for change + +The previous annotations of these properties were incorrect. This change applies the appropriate annotations for the properties and ensures callers understand that the values can be `null`. + +## Recommended action + +Update calling code to guard against `null` for these properties. + +## Affected APIs + +- +- +- diff --git a/docs/core/compatibility/cryptography/8.0/aesgcm-auth-tag-size.md b/docs/core/compatibility/cryptography/8.0/aesgcm-auth-tag-size.md new file mode 100644 index 0000000000000..0ca61fa8f960f --- /dev/null +++ b/docs/core/compatibility/cryptography/8.0/aesgcm-auth-tag-size.md @@ -0,0 +1,44 @@ +--- +title: "Breaking change: AesGcm authentication tag size on macOS" +description: Learn about the .NET 8 breaking change in cryptography where AesGcm on macOS only supports 16-byte (128-bit) authentication tags. +ms.date: 01/24/2023 +--- +# AesGcm authentication tag size on macOS + + on macOS only supports 16-byte (128-bit) authentication tags when using or in .NET 8 and later versions. + +## Previous behavior + +On macOS, and supported authentication tag sizes ranging from 12 to 16 bytes, provided OpenSSL was available. + +In addition, the property reported that it supported sizes ranging from 12 to 16 bytes, inclusive. + +## New behavior + +On macOS, and support 16-byte authentication tags only. If you use a smaller tag size on macOS, an is thrown at run time. + +The property returns a value of 16 as the supported tag size. + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The class on macOS previously relied on OpenSSL for underlying support. OpenSSL is an external dependency that needed to be installed and configured separately from .NET. now uses Apple's CryptoKit to provide an implementation of Advanced Encryption Standard with Galois/Counter Mode (AES-GCM) so that OpenSSL is no longer a dependency for using . + +The CryptoKit implementation of AES-GCM does not support authentication tag sizes other than 128-bits (16-bytes). + +## Recommended action + +Use 128-bit authentication tags with for macOS support. + +## Affected APIs + +- +- +- diff --git a/docs/core/compatibility/cryptography/8.0/rsa-encrypt-decrypt-value-obsolete.md b/docs/core/compatibility/cryptography/8.0/rsa-encrypt-decrypt-value-obsolete.md new file mode 100644 index 0000000000000..8e26027e2ae86 --- /dev/null +++ b/docs/core/compatibility/cryptography/8.0/rsa-encrypt-decrypt-value-obsolete.md @@ -0,0 +1,46 @@ +--- +title: "RSA.EncryptValue and RSA.DecryptValue are obsolete" +description: Learn about the .NET 8 breaking change in cryptography where RSA.EncryptValue and RSA.DecryptValue are marked obsolete. +ms.date: 01/24/2023 +--- +# RSA.EncryptValue and RSA.DecryptValue are obsolete + +The following methods are obsolete in .NET 8 (and later versions): + +- +- +- +- + +All references to these methods will result in a [SYSLIB0048](../../../../fundamentals/syslib-diagnostics/syslib0048.md) warning at compile time. + +## Previous behavior + +Previously, code could call the [affected methods](#affected-apis) without any compilation warnings. However, they threw a at run time. + +## New behavior + +Starting in .NET 8, calling the [affected methods](#affected-apis) produces a `SYSLIB0048` compilation warning. + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change can affect [source compatibility](../../categories.md#source-compatibility). + +## Reason for change + +The affected methods were never implemented and always threw a . Since the purpose of these methods is unclear and they shouldn't be called, they were marked as obsolete. + +## Recommended action + +To encrypt or decrypt with RSA, use or instead. + +## Affected APIs + +- +- +- +- diff --git a/docs/core/compatibility/deployment/7.0/deprecated-trimmer-default-action.md b/docs/core/compatibility/deployment/7.0/deprecated-trimmer-default-action.md index 8f44c1f836820..581bad2c32667 100644 --- a/docs/core/compatibility/deployment/7.0/deprecated-trimmer-default-action.md +++ b/docs/core/compatibility/deployment/7.0/deprecated-trimmer-default-action.md @@ -9,15 +9,11 @@ The value of the `TrimmerDefaultAction` property is now ignored by the publish p ## Previous behavior -Previously, only assemblies that were opted-in with `true` in the library project file were trimmed with the action specified by the `TrimmerDefaultAction`. The default value for that property was `link` in .NET 6. +Previously, only assemblies that were opted-in with `true` in the library project file were trimmed with the action specified by the `TrimmerDefaultAction`. In .NET 6, the default value for that property was `copy`. While apps with trim warnings were more likely to work with this default, run-time behavior could still be affected. In addition, the `copy` action caused apps to be larger than if the entire app was trimmed. ## New behavior -Starting in .NET 7, the property `TrimmerDefaultAction` is ignored and publishing behaves as if it was set to `link` all the time. - -The default value for the property was the most aggressive trimming mode, `link`. Thus, projects that had explicitly set a value in the project file usually had trim warnings and did so to reduce the aggressiveness. The most common setting was `copyused`. - -If your app had any trim warnings, you may see changes in behavior or exceptions. +Starting in .NET 7, the property `TrimmerDefaultAction` is ignored and publishing behaves as if it was set to `link` all the time. This means all assemblies are fully trimmed, whether they opt in or not. As a result, applications with trim warnings may see changes in behavior or run-time exceptions. For more information and instructions for restoring the previous behavior, see [All assemblies trimmed by default](./trim-all-assemblies.md). ## Version introduced @@ -40,3 +36,4 @@ To revert to the previous behavior, use [`global.json`](../../../tools/global-js ## See also - [Trimming options](../../../deploying/trimming/trimming-options.md) +- [All assemblies trimmed by default](./trim-all-assemblies.md) diff --git a/docs/core/compatibility/extensions/8.0/activatorutilities-createinstance-behavior.md b/docs/core/compatibility/extensions/8.0/activatorutilities-createinstance-behavior.md new file mode 100644 index 0000000000000..fb4d25d7caf03 --- /dev/null +++ b/docs/core/compatibility/extensions/8.0/activatorutilities-createinstance-behavior.md @@ -0,0 +1,61 @@ +--- +title: "Breaking change: ActivatorUtilities.CreateInstance behaves consistently" +description: Learn about the .NET 8 breaking change in .NET extensions where ActivatorUtilities.CreateInstance behaves consistently regardless of the order of constructor overloads. +ms.date: 02/28/2023 +--- +# ActivatorUtilities.CreateInstance behaves consistently + +The behavior of is now more consistent with . When isn't present in the dependency injection (DI) container, falls back to the logic. In that logic, only one constructor is allowed to match with all the provided input parameters. + +In the more general case when is present, the `CreateInstance` API prefers the longest constructor overload that has all its arguments available. The arguments can be input to the API, registered in the container, or available from default values in the constructor itself. + +Consider the following class definition showing two constructors: + +```csharp +public class A +{ + A(B b, C c, string st = "default string") { } + A() { } +} +``` + +For this class definition, and when `IServiceProviderIsService` is present, `ActivatorUtilities.CreateInstance(serviceProvider, new C())` instantiates `A` by picking the first constructor that takes `B`, `C`, and `string`. + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + + behaved unexpectedly in some cases. It made sure all required instances passed to it existed in the chosen constructor. However, the constructor selection was buggy and unreliable. + +## New behavior + + tries to find the longest constructor that matches all parameters based on the behavior of . + +- If no constructors are found or if isn't present, it falls back to logic. +- If it finds more than one constructor, it throws an . + +> [!NOTE] +> If is configured incorrectly or doesn't exist, `CreateInstance` may function incorrectly or ambiguously. + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +This change was introduced to fix a bug where the behavior changed depending on the order of constructor overload definitions. + +## Recommended action + +If your app starts behaving differently or throwing an exception after upgrading to .NET 8, carefully examine the constructor definitions for the affected instance type. Refer to the [New behavior](#new-behavior) section. + +## Affected APIs + +- +- + +## See also + +- [ActivatorUtilities.CreateInstance requires non-null provider](activatorutilities-createinstance-null-provider.md) diff --git a/docs/core/compatibility/extensions/8.0/activatorutilities-createinstance-null-provider.md b/docs/core/compatibility/extensions/8.0/activatorutilities-createinstance-null-provider.md new file mode 100644 index 0000000000000..81a896c0b901e --- /dev/null +++ b/docs/core/compatibility/extensions/8.0/activatorutilities-createinstance-null-provider.md @@ -0,0 +1,43 @@ +--- +title: "Breaking change: ActivatorUtilities.CreateInstance requires non-null provider" +description: Learn about the .NET 8 breaking change in .NET extensions where ActivatorUtilities.CreateInstance throws an ArgumentNullException if the provider is null. +ms.date: 02/28/2023 +--- +# ActivatorUtilities.CreateInstance requires non-null provider + +The two methods now throw an exception if the `provider` parameter is `null`. + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + +A `null` value was allowed for the `provider` parameter. In some cases, the specified type was still created correctly. + +## New behavior + +When `provider` is `null`, an exception is thrown. + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +We fixed various the parameter validation along with [constructor-matching issues](activatorutilities-createinstance-behavior.md) to align with the intended purpose of . The `CreateInstance()` methods have a non-nullable `provider` parameter, so it was generally expected that a `null` provider wasn't allowed. + +## Recommended action + +Pass a non-null for the `provider` argument. If the provider also implements , constructor arguments can be obtained through that. + +Alternatively, if your scenario doesn't require dependency injection, since is `null`, use instead. + +## Affected APIs + +- +- + +## See also + +- [ActivatorUtilities.CreateInstance behaves consistently](activatorutilities-createinstance-behavior.md) diff --git a/docs/core/compatibility/extensions/8.0/configurationbinder-exceptions.md b/docs/core/compatibility/extensions/8.0/configurationbinder-exceptions.md new file mode 100644 index 0000000000000..2b329666327a4 --- /dev/null +++ b/docs/core/compatibility/extensions/8.0/configurationbinder-exceptions.md @@ -0,0 +1,73 @@ +--- +title: "Breaking change: ConfigurationBinder throws for mismatched value" +description: Learn about the .NET 8 breaking change in .NET extensions where ConfigurationBinder throws an exception if ErrorOnUnknownConfiguration is true and a config value doesn't match the model value. +ms.date: 01/27/2023 +--- +# ConfigurationBinder throws for mismatched value + +Previously, was used solely to raise an exception if a value existed in the configuration but not in the model being bound to. Now, if this property is set to `true`, an exception is also thrown if the value in the configuration can't be converted to the type of value in the model. + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + +Previously, the following code silently swallowed the exceptions for the fields that contained invalid enums: + +```csharp +public enum TestSettingsEnum +{ + Option1, + Option2, +} + +public class MyModelContainingArray +{ + public TestSettingsEnum[] Enums { get; set; } +} + +public void SilentlySwallowsInvalidItems() +{ + var dictionary = new Dictionary + { + ["Section:Enums:0"] = "Option1", + ["Section:Enums:1"] = "Option3", // invalid - ignored + ["Section:Enums:2"] = "Option4", // invalid - ignored + ["Section:Enums:3"] = "Option2", + }; + + var configurationBuilder = new ConfigurationBuilder(); + configurationBuilder.AddInMemoryCollection(dictionary); + var config = configurationBuilder.Build(); + var configSection = config.GetSection("Section"); + + var model = configSection.Get(o => o.ErrorOnUnknownConfiguration = true); + + // Only Option1 and Option2 are in the bound collection at this point. +} +``` + +## New behavior + +Starting in .NET 8, if a configuration value can't be converted to the type of the value in the model, an is thrown. + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The previous behavior was confusing for some developers. They set to `true` and expected an exception to be thrown if *any* issue was encountered when the configuration was bound. + +## Recommended action + +If your app has configuration values that can't be converted to the properties in the bound model, change or remove the values. + +Alternatively, set to `false`. + +## Affected APIs + +- +- +- diff --git a/docs/core/compatibility/extensions/8.0/hostapplicationbuilder-ctor.md b/docs/core/compatibility/extensions/8.0/hostapplicationbuilder-ctor.md new file mode 100644 index 0000000000000..c6a45c2792a58 --- /dev/null +++ b/docs/core/compatibility/extensions/8.0/hostapplicationbuilder-ctor.md @@ -0,0 +1,36 @@ +--- +title: "Breaking change: HostApplicationBuilderSettings.Args respected by HostApplicationBuilder ctor" +description: Learn about the .NET 8 breaking change in .NET extensions where the HostApplicationBuilder constructor respects the HostApplicationBuilderSettings.Args value even if DisableDefaults is true. +ms.date: 03/13/2023 +--- +# HostApplicationBuilderSettings.Args respected by HostApplicationBuilder ctor + +The constructor that accepts a object now applies the property, regardless of whether is set to `true` or `false`. + +## Version introduced + +.NET 8 Preview 2 + +## Previous behavior + +Previously, the property was ignored when was set to `true`. + +## New behavior + +Starting in .NET 8, the value is added to regardless of whether is set to `true` or `false`. + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The behavior of ignoring was unexpected, even when was set to `true`. That's because if the caller didn't want the command-line arguments applied to the , they wouldn't have set them on the object. Since the caller *did* pass the command-line arguments on the settings, those arguments should be respected. + +## Recommended action + +If you don't want the command-line arguments to be added to the configuration, leave the property set to `null`. + +## Affected APIs + +- diff --git a/docs/core/compatibility/globalization/8.0/twodigityearmax-default.md b/docs/core/compatibility/globalization/8.0/twodigityearmax-default.md new file mode 100644 index 0000000000000..3d4e44eda8492 --- /dev/null +++ b/docs/core/compatibility/globalization/8.0/twodigityearmax-default.md @@ -0,0 +1,65 @@ +--- +title: "Breaking change: TwoDigitYearMax default is 2049" +description: Learn about the globalization breaking change in .NET 8 where the default value of the TwoDigitYearMax property for Gregorian calendars has changed from 2029 to 2049. +ms.date: 01/25/2023 +--- +# TwoDigitYearMax default is 2049 + +Calendar classes, such as , have a `TwoDigitYearMax` property that defines the last year of a 100-year range that can be represented by a two-digit year. This property is often used to translate a two-digit year to a four-digit year. Previously, defaulted to 2029 for and other Gregorian-like calendars, such as and . That value meant that two-digit years from 00 to 29 translated to 2000-2029. Two-digit years from 30 to 99 translated to 1930-1999. The default `TwoDigitYearMax` property value for and other Gregorian-like calendars has now changed from 2029 to 2049. The new value means that two-digit years from 00 to 49 are translated to 2000-2049. Any year from 50 to 99 will be translated to 1950-1999. + +In addition, on Windows, the default value of the `TwoDigitYearMax` property is now obtained from the corresponding Windows setting (the default value for which is now also 2049). This matches the behavior prior to .NET 5. + +Date parsing is the functionality that's most affected by this change. + +## Previous behavior + +In .NET 6 and .NET 7, if you didn't specify a value for , parsing a string like "12/10/35" with the Gregorian calendar produced the date "December 10th, 1935". + +## New behavior + +Starting in .NET 8, parsing a string like "12/10/35" with the Gregorian calendar produces the date "December 10th, 2035". + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +It's more logical to parse a two-digit year that's relatively close to the two digits of the current year to produce a four-digit year in the current century instead of the previous one. The Windows operating system also changed its default settings to the same number (2049). + +## Recommended action + +If you don't want your app to depend on the default value when parsing a string to a date, you can control how a two-digit year is translated to a four-digit year by setting the property. The following code shows how to set it for the invariant culture. + +```csharp +CultureInfo clonedInvariantCulture = (CultureInfo)(CultureInfo.InvariantCulture.Clone()); +clonedInvariantCulture.DateTimeFormat.Calendar.TwoDigitYearMax = 2039; // Use any desired cutoff value. + +DateTime dt = DateTime.Parse("12/25/45", clonedInvariantCulture); +``` + +## Affected APIs + +- +- +- +- +- +- +- +- +- +- +- +- +- (and other Gregorian-like calendar types) +- (and other Gregorian-like calendar types) +- (and other Gregorian-like calendar types) + +## See also + +- [Parse date and time strings in .NET](../../../../standard/base-types/parsing-datetime.md) diff --git a/docs/core/compatibility/includes/binary-source-behavioral.md b/docs/core/compatibility/includes/binary-source-behavioral.md new file mode 100644 index 0000000000000..984a5b50ff59c --- /dev/null +++ b/docs/core/compatibility/includes/binary-source-behavioral.md @@ -0,0 +1,7 @@ +This article categorizes each breaking change as *binary incompatible* or *source incompatible*, or as a *behavioral change*: + +- **Binary incompatible** - When run against the new runtime or component, existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation. + +- **Source incompatible** - When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully. + +- **Behavioral change** - Existing code and binaries may behave differently at run time. If the new behavior is undesirable, existing code would need to be updated and recompiled. diff --git a/docs/core/compatibility/library-change-rules.md b/docs/core/compatibility/library-change-rules.md index c8b96662e1a3f..bff475a4f4131 100644 --- a/docs/core/compatibility/library-change-rules.md +++ b/docs/core/compatibility/library-change-rules.md @@ -127,7 +127,7 @@ Changes in this category modify the public surface area of a type. Most of the c - ❌ **DISALLOWED: Adding a member to an interface** - If you [provide an implementation](../../csharp/tutorials/default-interface-methods-versions.md), adding a new member to an existing interface won't necessarily result in compile failures in downstream assemblies. However, not all languages support default interface members (DIMs). Also, in some scenarios, the runtime can't decide which default interface member to invoke. For these reasons, adding a member to an existing interface is considered a breaking change. + If you [provide an implementation](../../csharp/advanced-topics/interface-implementation/default-interface-methods-versions.md), adding a new member to an existing interface won't necessarily result in compile failures in downstream assemblies. However, not all languages support default interface members (DIMs). Also, in some scenarios, the runtime can't decide which default interface member to invoke. For these reasons, adding a member to an existing interface is considered a breaking change. - ❌ **DISALLOWED: Changing the value of a public constant or enumeration member** diff --git a/docs/core/compatibility/reflection/8.0/function-pointer-reflection.md b/docs/core/compatibility/reflection/8.0/function-pointer-reflection.md new file mode 100644 index 0000000000000..65e3d8410581e --- /dev/null +++ b/docs/core/compatibility/reflection/8.0/function-pointer-reflection.md @@ -0,0 +1,45 @@ +--- +title: "Breaking change: IntPtr no longer used for function pointer types" +description: Learn about a breaking change in .NET 8 SDK where System.Reflection uses a System.Type instance to represent a function pointer. +ms.date: 03/17/2023 +--- +# IntPtr no longer used for function pointer types + +As a new reflection feature, a function pointer type is now a instance with new capabilities such as . Previously, the instance returned was the type. + +Using in this manner is similar to how other types are exposed, such as pointers () and arrays (). + +This new functionality is currently implemented in the CoreCLR runtime and in . Support for the Mono and NativeAOT runtimes is expected later. + +A function pointer instance, which is a physical address to a function, continues to be represented as an ; only the reflection type has changed. + +## Previous behavior + +Previously, `typeof(delegate*())` returned the type for a function pointer type. Similarly, reflection also returned this type for a function pointer type, such as with . The type didn't allow any access to the parameter types, return type, or calling conventions. + +## New behavior + +`typeof` and reflection now use for a function pointer type, which provides access to the parameter types, return type, and calling conventions. + +## Version introduced + +.NET 8 Preview 2 + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +This change adds the capability to obtain function pointer metadata including parameter types, the return type, and the calling conventions. Function pointer support was added with C# 9 and .NET 6, but reflection support wasn't added at that time. + +## Recommended action + +If you want your code to support function pointers and to treat them specially, use the new API. + +## Affected APIs + +- `typeof` keyword +- +- +- diff --git a/docs/core/compatibility/sdk/7.0/side-by-side-install.md b/docs/core/compatibility/sdk/7.0/side-by-side-install.md index 914012f9c285f..fe1e7bafcffa1 100644 --- a/docs/core/compatibility/sdk/7.0/side-by-side-install.md +++ b/docs/core/compatibility/sdk/7.0/side-by-side-install.md @@ -10,7 +10,7 @@ If a preview .NET 7 SDK is installed alongside the general availability (GA) ver > The SDK resolver "Microsoft.DotNet.MSBuildSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk". Exception: "Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestCompositionException: Workload definition 'wasm-tools' in manifest 'microsoft.net.workload.mono.toolchain'. > [!NOTE] -> This behavior will be fixed in .NET SDK 7.2.00. +> This behavior was fixed in .NET SDK 7.0.101. ## Version introduced diff --git a/docs/core/compatibility/sdk/7.0/solution-level-output-no-longer-valid.md b/docs/core/compatibility/sdk/7.0/solution-level-output-no-longer-valid.md new file mode 100644 index 0000000000000..f2a17a25d863b --- /dev/null +++ b/docs/core/compatibility/sdk/7.0/solution-level-output-no-longer-valid.md @@ -0,0 +1,86 @@ +--- +title: "Solution-level `--output` option no longer valid for build-related commands" +description: Learn about a breaking change in the .NET 7.0.200 SDK where using the `--output` option is no longer valid when using a solution file +ms.date: 02/15/2023 +--- +# Solution-level `--output` option no longer valid for build-related commands + +In the 7.0.200 SDK, there was [a change](https://github.com/dotnet/sdk/pull/29065) to no longer accept the `--output`/`-o` option when using a solution file with the following commands: + +* `build` +* `clean` +* `pack` +* `publish` +* `store` +* `test` +* `vstest` + +This is because the semantics of the `OutputPath` property, which is controlled by the `--output`/`-o` option, aren't well defined for solutions. Projects built in this way will have their output placed in the same directory, which is inconsistent and has led to a number of user-reported issues. + +This change was reduced to a warning level of severity in the 7.0.201 SDK, and `pack` was removed from the list of commands that are affected. + +## Version introduced + +.NET 7.0.200 SDK, reduced to a warning only in the 7.0.201 SDK. + +## Previous behavior + +Previously, if you specified `--output`/`-o` when using a solution file, the output for all built projects would be placed in the specified directory in an undefined and inconsistent order. + +## New behavior + +The `dotnet` CLI will error if the `--output`/`-o` option is used with a solution file. Starting in the 7.0.201 SDK, a warning will be emitted instead, and in the case of `dotnet pack` no warning or error will be generated. + +## Type of breaking change + +This breaking change may require modifications to build scripts and continuous integration pipelines. As a result it affects both binary and source compatibility. + +## Reason for change + +This change was made because the semantics of the `OutputPath` property, which is controlled by the `--output`/`-o` option, aren't well defined for solutions. Projects built in this way will have their output placed in the same directory, which is inconsistent and has led to a number of user-reported issues. + +When a solution is built with the `--output` option, the `OutputPath` property is set to the same value for all projects, which means that all projects will have their output placed in the same directory. Depending on the complexity of the projects in the solution, different and inconsistent results may occur. Let's take a look at some examples of different solution shapes and how they are affected by a shared `OutputPath`. + +### Single project, single TargetFramework + +Imagine a solution that contains a single project targeting a single `TargetFramework`, `net7.0`. In this case, providing the `--output` option is equivalent to setting the `OutputPath` property in the project file. During a build (or other commands, but let's scope the discussion to build for now), all of the outputs for the project will be placed in the specified directory. + +### Single project, multiple TargetFrameworks + +Now imagine a solution that contains a single project with multiple `TargetFrameworks`, `net6.0` and `net7.0`. Because of multi-targeting, the project will be build twice, once for each `TargetFramework`. For each of these 'inner' builds the `OutputPath` will be set to the same value, and so the outputs for each of the inner builds will be placed in the same directory. This means that whichever build completes last will overwrite the outputs of the other build, and in a parallel-build system like MSBuild operates in by default, 'last' is indeterminate. + +### Library => Console => Test, single TargetFramework + +Now imagine a solution that contains a library project, a console project that references the library project, and a test project that references the console project. All of these projects target a single `TargetFramework`, `net7.0`. In this case, the library project will be built first, and then the console project will be built. The test project will be built last, and will reference the console project. For each built project, the outputs of each build will be copied into the directory specified by the `OutputPath`, and so the final directory will contain assets from all three projects. This works for testing, but for publishing may result in test assets being sent to production. + +### Library => Console => Test, multiple TargetFrameworks + +Now take the same chain of projects and add a `net6.0` `TargetFramework` build to them in addition to the `net7.0` build. The same problem as the single-project, multi-targeted build occurs - inconsistent copying of TFM-specific assets to the specified directory. + +### Multiple apps + +So far we have been looking at scenarios with a linear dependency graph - but many solutions may contain multiple related applications. This means that multiple apps may be built concurrently to the same output folder. If the apps include a dependency file with the same name, then the build may intermittently fail when multiple projects try to write to that file in the output path concurrently. + +If multiple apps depend on different versions of a file, then even if the build succeeds, which version of the file is copied to the output path may be non-deterministic. This can happen when the projects depend (possibly transitively) on different versions of a NuGet package. Within a single project, NuGet helps ensure that its dependencies (including any transitive dependencies through NuGet packages and/or project references) are unified to the same version. Because the unification is done within the context of a single project and its dependent projects, this means it is possible to resolve different versions of a package when two separate top-level projects are built. If the project that depends on the higher version copies the dependency last, then often the apps will run successfully. However, if the lower version is copied last, then the app that was compiled against the higher version will fail to load the assembly at runtime. Because the version that is copied can be non-deterministic, this can lead to sporadic, unreliable builds where it is very difficult to diagnose the issue. + +## Other examples + +For more examples of how this underlying error presents in practice, see the discussion on [dotnet/sdk#15607](https://github.com/dotnet/sdk/issues/15607). + +## Recommended action + +The general recommendation is to perform the action that you previously took _without_ the `--output`/`-o` option, and then move the output to the desired location after the command has completed. It's also possible to perform the action at a specific project and still apply the `--output`/`-o` option, as that has more well-defined semantics. + +If you want to maintain the existing behavior exactly, then you can use the `--property` flag to set a MSBuild property to the desired directory. The property to use varies based on the command: + +| Command | Property | Example | +| -- | -- | -- | +| `build` | `OutputPath` | `dotnet build --property:OutputPath=DESIRED_PATH` | +| `clean` | `OutputPath` | `dotnet clean --property:OutputPath=DESIRED_PATH` | +| `pack` | `PackageOutputPath` | `dotnet pack --property:PackageOutputPath=DESIRED_PATH` | +| `publish` | `PublishDir` | `dotnet publish --property:PublishDir=DESIRED_PATH` | +| `store` | `OutputPath` | `dotnet store --property:OutputPath=DESIRED_PATH` | +| `test` | `TestResultsDirectory` | `dotnet test --property:OutputPath=DESIRED_PATH` | + +**NOTE** +For best results, the DESIRED_PATH should be an absolute path. Relative paths will be 'anchored' (i.e. made absolute) in ways that you may not expect, and may not work the same with all commands. diff --git a/docs/core/compatibility/sdk/7.0/vs-msbuild-version.md b/docs/core/compatibility/sdk/7.0/vs-msbuild-version.md index 6dbc3c8566752..0ff7b7a8ad539 100644 --- a/docs/core/compatibility/sdk/7.0/vs-msbuild-version.md +++ b/docs/core/compatibility/sdk/7.0/vs-msbuild-version.md @@ -22,6 +22,8 @@ The following table shows the minimum version of Visual Studio and MSBuild you n 1In addition, scenarios that use a source generator could fail when using a Visual Studio or MSBuild version earlier than version 17.2. +For more information about minimum supported versions, see [Targeting and support rules](../../../porting/versioning-sdk-msbuild-vs.md#targeting-and-support-rules). + ## Reason for change Changes were made to features within the SDK that aren't compatible with previous Visual Studio versions. In addition, it enables .NET SDK partners to have a reliable minimum version of Visual Studio that they can expect to work against. @@ -33,3 +35,7 @@ Upgrade your Visual Studio version to the required version. Alternatively, you c ## Affected APIs N/A + +## See also + +- [Targeting and support rules](../../../porting/versioning-sdk-msbuild-vs.md#targeting-and-support-rules) diff --git a/docs/core/compatibility/sdk/8.0/console-encoding-fix.md b/docs/core/compatibility/sdk/8.0/console-encoding-fix.md new file mode 100644 index 0000000000000..51ca67dbe754d --- /dev/null +++ b/docs/core/compatibility/sdk/8.0/console-encoding-fix.md @@ -0,0 +1,45 @@ +--- +title: "Breaking change: SDK no longer changes console encoding after completion" +description: Learn about a breaking change where the .NET 8 SDK no longer changes the console encoding after running a command. +ms.date: 04/04/2023 +--- +# Console encoding doesn't remain UTF-8 after completion + +The bug mentioned in the [CLI console output uses UTF-8](console-encoding.md) breaking change, where the .NET SDK changed the encoding of the entire console, has been fixed. The console encoding no longer remains UTF-8 after the .NET SDK executes a command. It's possible that users came to rely on that behavior, hence this is a breaking change. + +In addition, the .NET SDK no longer changes the encoding to UTF-8 on older Windows 10 versions that don't fully support it. + +## Previous behavior + +- The SDK changed the encoding of a terminal after running a command such as `dotnet build`. +- The SDK used the UTF-8 encoding to correctly render non-English characters, even on versions of windows 10 that did not officially support UTF-8. The behavior was undefined on those versions. + +## New behavior + +- The SDK doesn't change the terminal encoding after exit for other programs. +- By default, the SDK no longer uses UTF-8 for Windows versions that don't support it. + +## Version introduced + +7.0.3xx +.NET 8 Preview 3 + +## Type of breaking change + +This change can affect [binary compatibility](../../categories.md#binary-compatibility). It's also a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +There was an existing bug where the .NET SDK affected the encoding on the console for other programs. That was a bug that was fixed, resulting in this breaking change. + +Older versions of Windows 10 (that is, versions before the November 2019 update) didn't support UTF-8, so the default behavior shouldn't be to use UTF-8 encoding. Instead, an opt-in is now available. + +## Recommended action + +If your app needs to change the code page on Windows, it can run a process to invoke the `chcp` command. Your app shouldn't rely on the .NET SDK to change the encoding. + +For older Windows 10 versions that don't officially support UTF-8 where you want the .NET SDK to continue to change the encoding to UTF-8 for non-English languages, can you set the environment variable [`DOTNET_CLI_FORCE_UTF8_ENCODING`](../../../tools/dotnet-environment-variables.md#dotnet_cli_force_utf8_encoding) to `true` or 1. + +## See also + +- [SDK no longer changes console encoding after completion](console-encoding-fix.md) diff --git a/docs/core/compatibility/sdk/8.0/console-encoding.md b/docs/core/compatibility/sdk/8.0/console-encoding.md new file mode 100644 index 0000000000000..fdbd5e9e0b608 --- /dev/null +++ b/docs/core/compatibility/sdk/8.0/console-encoding.md @@ -0,0 +1,60 @@ +--- +title: "Breaking change: CLI console output uses UTF-8" +description: Learn about a breaking change in the .NET 8 SDK where the encoding for console input and output is now UTF-8. +ms.date: 04/04/2023 +--- +# CLI console output uses UTF-8 + +If the [`DOTNET_CLI_UI_LANGUAGE`](../../../tools/dotnet-environment-variables.md#dotnet_cli_ui_language) or `VSLANG` environment variable is set, the .NET CLI console output and input encoding changes to UTF-8, so that the code page can change to UTF-8 as well. This new behavior allows characters from languages set by those environment variables to be rendered correctly. + +This change only affects Windows operating systems (the encoding was okay on other platforms). Moreover, it only applies to Windows 10 and later versions where the UI culture set by the user is non-English. + +## Previous behavior + +Characters in certain languages, including Chinese, German, Japanese, and Russian, would sometimes display as garbled characters or as `?` in the console. For example: + +```console +C:\>dotnet build +MSBuild version 17.3.0-preview[...] for .NET + ???????????????... +``` + +## New behavior + +Starting in .NET 7 (version 7.0.3xx) and .NET 8, characters render correctly. Both the encoding and the code page change. For example: + +```console +C:\>dotnet build +MSBuild version 17.3.0-preview[...] for .NET + 正在确定要还原的项目… +``` + +Versions of Windows older than Windows 10 1909 don't fully support UTF-8 and may experience issues after this change. (Starting in .NET 8 Preview 3 and .NET 7.0.300 SDK, the .NET SDK no longer changes the encoding to UTF-8 on these versions, by default. To opt back into using UTF-8 even on Windows 10 versions that don't support it, use the [`DOTNET_CLI_FORCE_UTF8_ENCODING`](../../../tools/dotnet-environment-variables.md#dotnet_cli_force_utf8_encoding) environment variable.) + +In addition, there was [an existing bug](https://github.com/dotnet/sdk/issues/30170) where the SDK can affect the encoding of other commands and programs called in the same command prompt after the SDK has finished execution. Now that the SDK more frequently changes the encoding, the impact of this bug may increase. However, the bug was fixed in .NET 8 Preview 3 and .NET 7.0.300 SDK. For more information, see [SDK no longer changes console encoding after completion](console-encoding-fix.md). + +## Version introduced + +7.0.3xx +.NET 8 Preview 1 + +## Type of breaking change + +This change can affect [source compatibility](../../categories.md#source-compatibility) and [binary compatibility](../../categories.md#binary-compatibility). It's also a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +Using the .NET CLI in non-English languages provided a poor experience. + +Developers that weren't already using the `VSLANG` and `DOTNET_CLI_UI_LANGUAGE` variables aren't impacted. The impact should be minimal, as this language setting wouldn't have worked well in the first place due to garbled characters. Also, only developers using Windows 10 or later might be impacted, most of which are likely using version 1909 or later. + +The legacy scenarios are already less likely to support the broken languages, so it's unlikely you'd want to use another language that might expose this break anyway. + +## Recommended action + +- If you're using an older version of windows 10, upgrade to version 1909 or later. +- If you want to use a legacy console or are facing build issues or others due to the encoding change, unset `VSLANG` and `DOTNET_CLI_UI_LANGUAGE` to disable this change. + +## See also + +- [SDK no longer changes console encoding when finished](console-encoding-fix.md) diff --git a/docs/core/compatibility/sdk/8.0/dotnet-pack-config.md b/docs/core/compatibility/sdk/8.0/dotnet-pack-config.md new file mode 100644 index 0000000000000..2db3609899ccc --- /dev/null +++ b/docs/core/compatibility/sdk/8.0/dotnet-pack-config.md @@ -0,0 +1,64 @@ +--- +title: "Breaking change: 'dotnet pack' uses Release configuration" +description: Learn about a breaking change in the .NET 8 SDK where 'dotnet pack' uses the 'Release' configuration by default. +ms.date: 02/02/2023 +--- +# 'dotnet pack' uses Release configuration + +The [`dotnet pack` command](../../../tools/dotnet-pack.md), which packs code into a NuGet package, now uses the `Release` configuration instead of the `Debug` configuration by default. + +## Previous behavior + +Previously, `dotnet pack` used the `Debug` configuration unless the configuration was specified explicitly or `PackRelease` was set to `true`. + +The [`PackRelease` property](../../../project-sdk/msbuild-props.md#packrelease) was added in .NET 7 as a path forward to this breaking change. Previously, you could set the `DOTNET_CLI_ENABLE_PACK_RELEASE_FOR_SOLUTIONS` environment variable to use `PackRelease` in a project that was part of a Visual Studio solution. + +## New behavior + +If you're developing with the .NET 8 SDK or a later version, `dotnet pack` uses the `Release` configuration by default for *all* projects. If you have a CI/CD script, tests, or code where you've hardcoded `Debug` into an output path, this change may break your workflow. Also, you won't be able to debug a packed app unless the `Debug` configuration was explicitly specified (for example, using `dotnet pack --configuration Debug`. + +`dotnet pack` can pack for multiple target framework monikers (TFM) at the same time. If your project targets multiple versions and you have different `PackRelease` values for different targets, you can have a conflict where some TFMs pack the `Release` configuration and others pack the `Debug` configuration. + +For projects in a solution: + +- `dotnet pack` can pack all the projects in a Visual Studio solution if given a solution file. For each project in the solution, the value of `PackRelease` is implicitly set to `true` if it's undefined. In order for `dotnet pack` to determine the correct configuration to use, all projects in the solution must agree on their value of `PackRelease`. + +- This change might cause the performance of `dotnet pack` to regress, especially for solutions that contain many projects. To address this, a new environment variable `DOTNET_CLI_LAZY_PUBLISH_AND_PACK_RELEASE_FOR_SOLUTIONS` has been introduced. + +- The `DOTNET_CLI_ENABLE_PACK_RELEASE_FOR_SOLUTIONS` environment variable is no longer recognized. + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change can affect [source compatibility](../../categories.md#source-compatibility) and is also a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +In most cases when you create a package, you want your code to be optimized and can keep the package smaller by excluding debugging information. + +The `DOTNET_CLI_ENABLE_PACK_RELEASE_FOR_SOLUTIONS` environment variable was removed since the behavior it enabled is now the default behavior and the granular control is no longer necessary. + +## Recommended action + +- To disable the new behavior entirely, you can set the `DOTNET_CLI_DISABLE_PUBLISH_AND_PACK_RELEASE` environment variable to `true` (or any other value). This variable affects both `dotnet publish` and `dotnet pack`. + +- To explicitly specify the `Debug` configuration for packing, use the `-c` or `--configuration` option with `dotnet pack`. + +- If your CI/CD pipeline is broken due to hardcoded output paths, update the paths to `Release` instead of `Debug`, disable the new behavior using the `DOTNET_CLI_DISABLE_PUBLISH_AND_PACK_RELEASE` environment variable, or specify that the `Debug` configuration should be used. + +- If you're packing a solution and it's broken because one or more projects explicitly sets a value for `PackRelease`, you should explicitly set `PackRelease` to `false` in each project: + + ```xml + + false + + ``` + +- If you're packing a solution and the performance has regressed, you can set the `DOTNET_CLI_LAZY_PUBLISH_AND_PACK_RELEASE_FOR_SOLUTIONS` environment variable to `true` (or any other value) to remove the regression. If you use this variable and any project defines `PackRelease`, all projects must define it, or you can use a *Directory.Build.Props* file. This variable affects both `dotnet publish` and `dotnet pack`. + +## See also + +- ['dotnet publish' uses Release configuration](dotnet-publish-config.md) diff --git a/docs/core/compatibility/sdk/8.0/dotnet-publish-config.md b/docs/core/compatibility/sdk/8.0/dotnet-publish-config.md new file mode 100644 index 0000000000000..efeb3ba81be1b --- /dev/null +++ b/docs/core/compatibility/sdk/8.0/dotnet-publish-config.md @@ -0,0 +1,66 @@ +--- +title: "Breaking change: 'dotnet publish' uses Release configuration" +description: Learn about a breaking change in the .NET 8 SDK where 'dotnet publish' uses the 'Release' configuration by default. +ms.date: 02/02/2023 +--- +# 'dotnet publish' uses Release configuration + +The [`dotnet publish` command](../../../tools/dotnet-publish.md) now uses the `Release` configuration instead of the `Debug` configuration by default if the target framework is .NET 8 or a later version. + +## Previous behavior + +Previously, `dotnet publish` used the `Debug` configuration unless the configuration was specified explicitly or `PublishRelease` was set to `true`. + +The [`PublishRelease` property](../../../project-sdk/msbuild-props.md#publishrelease) was added in .NET 7 as a path forward to this breaking change. Previously, you could set the `DOTNET_CLI_ENABLE_PUBLISH_RELEASE_FOR_SOLUTIONS` environment variable to use `PublishRelease` in a project that was part of a Visual Studio solution. + +## New behavior + +If you're developing with the .NET 8 SDK or a later version, `dotnet publish` uses the `Release` configuration by default for projects whose [`TargetFramework`](../../../project-sdk/msbuild-props.md#targetframework) is set to `net8.0` or a later version. If you have a CI/CD script, tests, or code where you've hardcoded `Debug` into an output path, this change may break your workflow. + +If your project targets multiple versions, the new behavior only applies if you specify a target framework of .NET 8 or later when you publish (for example, using `dotnet publish -f net8.0`). + +For projects in a solution: + +- `dotnet publish` can publish all the projects in a Visual Studio solution if given a solution file. For the solution projects that target .NET 8 or later, the value of `PublishRelease` is implicitly set to `true` if it's undefined. However, in order for `dotnet publish` to determine the correct configuration to use for the solution, all projects in the solution must agree on their value of `PublishRelease`. If an older project in the solution has `PublishRelease` set to `false`, you should explicitly set the property to `false` for any new .NET 8+ projects as well. + +- This change might cause the performance of `dotnet publish` to regress, especially for solutions that contain many projects. To address this, a new environment variable `DOTNET_CLI_LAZY_PUBLISH_AND_PACK_RELEASE_FOR_SOLUTIONS` has been introduced. + +- The `DOTNET_CLI_ENABLE_PUBLISH_RELEASE_FOR_SOLUTIONS` environment variable is no longer recognized. + +## Version introduced + +.NET 8 Preview 1 + +## Type of breaking change + +This change can affect [source compatibility](../../categories.md#source-compatibility) and is also a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +In most cases when you publish, you want your code to be optimized and can keep the app smaller by excluding debugging information. Customers have asked for `Release` to be the default configuration for `publish` for a long time. Also, Visual Studio has had this behavior for many years. + +The `DOTNET_CLI_ENABLE_PUBLISH_RELEASE_FOR_SOLUTIONS` environment variable was removed since the behavior it enabled is now the default behavior and the granular control is no longer necessary. + +## Recommended action + +- To disable the new behavior entirely, you can set the `DOTNET_CLI_DISABLE_PUBLISH_AND_PACK_RELEASE` environment variable to `true` (or any other value). This variable affects both `dotnet publish` and `dotnet pack`. + +- To explicitly specify the `Debug` configuration for publishing, use the `-c` or `--configuration` option with `dotnet publish`. + +- If your CI/CD pipeline is broken due to hardcoded output paths, update the paths to `Release` instead of `Debug`, disable the new behavior using the `DOTNET_CLI_DISABLE_PUBLISH_AND_PACK_RELEASE` environment variable, or specify that the `Debug` configuration should be used. + +- If you're publishing a solution and it's broken, you can explicitly set `PublishRelease` to `true` (or `false` to revert to the previous behavior). + + ```xml + + true + + ``` + + Alternatively, you can specify the property in a *Directory.Build.Props* file. However, if you set it `false` in this file, you'll still need to explicitly set the property to `false` in the .NET 8+ projects in the solution. Similarly, if some projects explicitly set a value that's different from the value in the *Directory.Build.Props* file, publish will fail. + +- If you're publishing a solution and the performance has regressed, you can set the `DOTNET_CLI_LAZY_PUBLISH_AND_PACK_RELEASE_FOR_SOLUTIONS` environment variable to `true` (or any other value) to remove the regression. However, if you set this variable and your solution contains a .NET 8+ project and a project that targets .NET 7 or earlier, publishing will fail until all projects define `PublishRelease`. This variable affects both `dotnet publish` and `dotnet pack`. + +## See also + +- ['dotnet pack' uses Release configuration](dotnet-pack-config.md) diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 7f24e0a5b678c..1d800bc7e3750 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -4,6 +4,78 @@ items: - name: Breaking changes by version expanded: true items: + - name: .NET 8 + items: + - name: Overview + href: 8.0.md + - name: Core .NET libraries + items: + - name: Activity operation name when null + href: core-libraries/8.0/activity-operation-name.md + - name: AnonymousPipeServerStream.Dispose behavior + href: core-libraries/8.0/anonymouspipeserverstream-dispose.md + - name: Backslash mapping in Unix file paths + href: core-libraries/8.0/file-path-backslash.md + - name: FileStream writes when pipe is closed + href: core-libraries/8.0/filestream-disposed-pipe.md + - name: GetFolderPath behavior on Unix + href: core-libraries/8.0/getfolderpath-unix.md + - name: ITypeDescriptorContext nullable annotations + href: core-libraries/8.0/itypedescriptorcontext-props.md + - name: Legacy Console.ReadKey removed + href: core-libraries/8.0/console-readkey-legacy.md + - name: Cryptography + items: + - name: AesGcm authentication tag size on macOS + href: cryptography/8.0/aesgcm-auth-tag-size.md + - name: RSA.EncryptValue and RSA.DecryptValue are obsolete + href: cryptography/8.0/rsa-encrypt-decrypt-value-obsolete.md + - name: Extensions + items: + - name: ActivatorUtilities.CreateInstance behaves consistently + href: extensions/8.0/activatorutilities-createinstance-behavior.md + - name: ActivatorUtilities.CreateInstance requires non-null provider + href: extensions/8.0/activatorutilities-createinstance-null-provider.md + - name: ConfigurationBinder throws for mismatched value + href: extensions/8.0/configurationbinder-exceptions.md + - name: HostApplicationBuilderSettings.Args respected by constructor + href: extensions/8.0/hostapplicationbuilder-ctor.md + - name: Globalization + items: + - name: TwoDigitYearMax default is 2049 + href: globalization/8.0/twodigityearmax-default.md + - name: Reflection + items: + - name: IntPtr no longer used for function pointer types + href: reflection/8.0/function-pointer-reflection.md + - name: SDK + items: + - name: CLI console output uses UTF-8 + href: sdk/8.0/console-encoding.md + - name: Console encoding not UTF-8 after completion + href: sdk/8.0/console-encoding-fix.md + - name: "'dotnet pack' uses Release configuration" + href: sdk/8.0/dotnet-pack-config.md + - name: "'dotnet publish' uses Release configuration" + href: sdk/8.0/dotnet-publish-config.md + - name: Windows Forms + items: + - name: Anchor layout changes + href: windows-forms/8.0/anchor-layout.md + - name: DefaultValueAttribute removed from some properties + href: windows-forms/8.0/defaultvalueattribute-removal.md + - name: ExceptionCollection ctor throws ArgumentException + href: windows-forms/8.0/exceptioncollection.md + - name: Forms scale according to AutoScaleMode + href: windows-forms/8.0/top-level-window-scaling.md + - name: ImageList.ColorDepth default is Depth32Bit + href: windows-forms/8.0/imagelist-colordepth.md + - name: TableLayoutStyleCollection throws ArgumentException + href: windows-forms/8.0/tablelayoutstylecollection.md + - name: Top-level forms scale size to DPI + href: windows-forms/8.0/forms-scale-size-to-dpi.md + - name: WFDEV002 obsoletion is now an error + href: windows-forms/8.0/domainupdownaccessibleobject.md - name: .NET 7 items: - name: Overview @@ -54,6 +126,8 @@ items: href: core-libraries/7.0/cpluspluscli-compiler-version.md - name: Collectible Assembly in non-collectible AssemblyLoadContext href: core-libraries/7.0/collectible-assemblies.md + - name: DateTime addition methods precision change + href: core-libraries/7.0/datetime-add-precision.md - name: Equals method behavior change for NaN href: core-libraries/7.0/equals-nan.md - name: Generic type constraint on PatternContext @@ -138,12 +212,16 @@ items: href: sdk/7.0/automatic-runtimeidentifier.md - name: Automatic RuntimeIdentifier for publish only href: sdk/7.0/automatic-rid-publish-only.md + - name: CLI console output uses UTF-8 + href: sdk/8.0/console-encoding.md - name: Version requirements for .NET 7 SDK href: sdk/7.0/vs-msbuild-version.md - name: Serialization of custom types in .NET 7 href: sdk/7.0/custom-serialization.md - name: Side-by-side SDK installations href: sdk/7.0/side-by-side-install.md + - name: --output option no longer is valid for solution-level commands + href: sdk/7.0/solution-level-output-no-longer-valid.md - name: Serialization items: - name: DataContractSerializer retains sign when deserializing -0 @@ -858,6 +936,22 @@ items: href: https://github.com/dotnet/dotnet-docker/discussions/3699 - name: Core .NET libraries items: + - name: .NET 8 + items: + - name: Activity operation name when null + href: core-libraries/8.0/activity-operation-name.md + - name: AnonymousPipeServerStream.Dispose behavior + href: core-libraries/8.0/anonymouspipeserverstream-dispose.md + - name: Backslash mapping in Unix file paths + href: core-libraries/8.0/file-path-backslash.md + - name: FileStream writes when pipe is closed + href: core-libraries/8.0/filestream-disposed-pipe.md + - name: GetFolderPath behavior on Unix + href: core-libraries/8.0/getfolderpath-unix.md + - name: ITypeDescriptorContext nullable annotations + href: core-libraries/8.0/itypedescriptorcontext-props.md + - name: Legacy Console.ReadKey removed + href: core-libraries/8.0/console-readkey-legacy.md - name: .NET 7 items: - name: API obsoletions with default diagnostic ID @@ -872,6 +966,8 @@ items: href: core-libraries/7.0/cpluspluscli-compiler-version.md - name: Collectible Assembly in non-collectible AssemblyLoadContext href: core-libraries/7.0/collectible-assemblies.md + - name: DateTime addition methods precision change + href: core-libraries/7.0/datetime-add-precision.md - name: Equals method behavior change for NaN href: core-libraries/7.0/equals-nan.md - name: Generic type constraint on PatternContext @@ -1006,6 +1102,12 @@ items: href: corefx.md - name: Cryptography items: + - name: .NET 8 + items: + - name: AesGcm authentication tag size on macOS + href: cryptography/8.0/aesgcm-auth-tag-size.md + - name: RSA.EncryptValue and RSA.DecryptValue are obsolete + href: cryptography/8.0/rsa-encrypt-decrypt-value-obsolete.md - name: .NET 7 items: - name: Dynamic X509ChainPolicy verification time @@ -1062,6 +1164,16 @@ items: href: /ef/core/what-is-new/ef-core-3.x/breaking-changes?toc=/dotnet/core/compatibility/toc.json&bc=/dotnet/breadcrumb/toc.json - name: Extensions items: + - name: .NET 8 + items: + - name: ActivatorUtilities.CreateInstance behaves consistently + href: extensions/8.0/activatorutilities-createinstance-behavior.md + - name: ActivatorUtilities.CreateInstance requires non-null provider + href: extensions/8.0/activatorutilities-createinstance-null-provider.md + - name: ConfigurationBinder throws for mismatched value + href: extensions/8.0/configurationbinder-exceptions.md + - name: HostApplicationBuilderSettings.Args respected by constructor + href: extensions/8.0/hostapplicationbuilder-ctor.md - name: .NET 7 items: - name: ContentRootPath for apps launched by Windows Shell @@ -1080,6 +1192,10 @@ items: href: extensions/6.0/service-provider-disposed.md - name: Globalization items: + - name: .NET 8 + items: + - name: TwoDigitYearMax default is 2049 + href: globalization/8.0/twodigityearmax-default.md - name: .NET 7 items: - name: Globalization APIs use ICU libraries on Windows Server @@ -1168,20 +1284,40 @@ items: href: networking/5.0/winhttphandler-removed-from-runtime.md - name: .NET Core 2.0-3.0 href: networking.md + - name: Reflection + items: + - name: .NET 8 + items: + - name: IntPtr no longer used for function pointer types + href: reflection/8.0/function-pointer-reflection.md - name: SDK and MSBuild items: + - name: .NET 8 + items: + - name: CLI console output uses UTF-8 + href: sdk/8.0/console-encoding.md + - name: Console encoding not UTF-8 after completion + href: sdk/8.0/console-encoding-fix.md + - name: "'dotnet pack' uses Release configuration" + href: sdk/8.0/dotnet-pack-config.md + - name: "'dotnet publish' uses Release configuration" + href: sdk/8.0/dotnet-publish-config.md - name: .NET 7 items: - name: Automatic RuntimeIdentifier for certain projects href: sdk/7.0/automatic-runtimeidentifier.md - name: Automatic RuntimeIdentifier for publish only href: sdk/7.0/automatic-rid-publish-only.md + - name: CLI console output uses UTF-8 + href: sdk/8.0/console-encoding.md - name: Version requirements for .NET 7 SDK href: sdk/7.0/vs-msbuild-version.md - name: Serialization of custom types in .NET 7 href: sdk/7.0/custom-serialization.md - name: Side-by-side SDK installations href: sdk/7.0/side-by-side-install.md + - name: --output option no longer is valid for solution-level commands + href: sdk/7.0/solution-level-output-no-longer-valid.md - name: .NET 6 items: - name: -p option for `dotnet run` is deprecated @@ -1296,8 +1432,28 @@ items: items: - name: .NET Standard 2.0 no longer supported href: wcf-client/6.0/net-standard-2-support.md + - name: DuplexChannelFactory captures synchronization context + href: wcf-client/6.0/duplex-synchronization-context.md - name: Windows Forms items: + - name: .NET 8 + items: + - name: Anchor layout changes + href: windows-forms/8.0/anchor-layout.md + - name: DefaultValueAttribute removed from some properties + href: windows-forms/8.0/defaultvalueattribute-removal.md + - name: ExceptionCollection ctor throws ArgumentException + href: windows-forms/8.0/exceptioncollection.md + - name: Forms scale according to AutoScaleMode + href: windows-forms/8.0/top-level-window-scaling.md + - name: ImageList.ColorDepth default is Depth32Bit + href: windows-forms/8.0/imagelist-colordepth.md + - name: TableLayoutStyleCollection throws ArgumentException + href: windows-forms/8.0/tablelayoutstylecollection.md + - name: Top-level forms scale size to DPI + href: windows-forms/8.0/forms-scale-size-to-dpi.md + - name: WFDEV002 obsoletion is now an error + href: windows-forms/8.0/domainupdownaccessibleobject.md - name: .NET 7 items: - name: APIs throw ArgumentNullException diff --git a/docs/core/compatibility/unsupported-apis.md b/docs/core/compatibility/unsupported-apis.md index eb1cd6f589d19..24f5a8984132b 100644 --- a/docs/core/compatibility/unsupported-apis.md +++ b/docs/core/compatibility/unsupported-apis.md @@ -2,7 +2,7 @@ title: Unsupported APIs on .NET Core and .NET 5+ titleSuffix: "" description: Learn which .NET APIs always throw an exception on .NET Core and .NET 5 and later versions. -ms.date: 11/23/2021 +ms.date: 01/24/2023 --- # APIs that always throw exceptions on .NET Core and .NET 5+ @@ -13,7 +13,7 @@ This article organizes the affected APIs by namespace. > [!NOTE] > > - This article is a work-in-progress. It is not a complete list of APIs that throw exceptions on .NET 5+. -> - This article does not include the explicit interface implementations for binary serialization that throw on .NET 5+. For more information, see [Binary serialization in .NET Core](../../standard/serialization/binary-serialization.md#net-core). +> - This article does not include the explicit interface implementations for binary serialization that throw on .NET 5+. For more information, see [Binary serialization in .NET Core](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization#net-core). ## System @@ -271,6 +271,10 @@ This article organizes the affected APIs by namespace. | | All | | | Linux and macOS | | | Linux and macOS | +| | All | +| | All | +| | All | +| | All | | | All | | | All | | | All | @@ -338,5 +342,5 @@ This article organizes the affected APIs by namespace. ## See also - [Breaking changes for migration from .NET Framework to .NET Core](fx-core.md) -- [Binary serialization in .NET Core](../../standard/serialization/binary-serialization.md#net-core) +- [Binary serialization in .NET Core](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization#net-core) - [.NET portability analyzer](../../standard/analyzers/portability-analyzer.md) diff --git a/docs/core/compatibility/wcf-client/6.0/duplex-synchronization-context.md b/docs/core/compatibility/wcf-client/6.0/duplex-synchronization-context.md new file mode 100644 index 0000000000000..a371b5297a1dc --- /dev/null +++ b/docs/core/compatibility/wcf-client/6.0/duplex-synchronization-context.md @@ -0,0 +1,38 @@ +--- +title: "Breaking change: DuplexChannelFactory captures synchronization context" +description: Learn about the breaking change in WCF Client 6.0 where the DuplexChannelFactory now captures the synchronization context when it's opened. +ms.date: 04/06/2023 +--- +# Duplex contract captures synchronization context + + now captures the synchronization context when it's opened, and it dispatches callbacks to the captured context. + +## Previous behavior + +In previous versions, failed to capture the current synchronization context when the channel factory was opened. + +## New behavior + +Starting in WCF Client 6.0 RC, captures the current synchronization context when opened and dispatches callbacks to the captured context. This behavior matches that of .NET Framework. + +## Version introduced + +WCF Client 6.0 RC + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +This change was made to fix a bug where callbacks were happening on the wrong thread. The new behavior matches .NET Framework functionality. + +## Recommended action + +If the new behavior is undesirable, you can revert to version 4.x behavior by applying the to your callback contract with the property set to `false`. + +## Affected APIs + +- [DuplexChannelFactory\.Open](xref:System.ServiceModel.Channels.CommunicationObject.Open) +- [DuplexChannelFactory\.BeginOpen](xref:System.ServiceModel.Channels.CommunicationObject.BeginOpen%2A) +- [DuplexChannelFactory\.EndOpen](xref:System.ServiceModel.Channels.CommunicationObject.EndOpen%2A) diff --git a/docs/core/compatibility/wcf-client/6.0/net-standard-2-support.md b/docs/core/compatibility/wcf-client/6.0/net-standard-2-support.md index b9225a9426970..3bbab85dfa84c 100644 --- a/docs/core/compatibility/wcf-client/6.0/net-standard-2-support.md +++ b/docs/core/compatibility/wcf-client/6.0/net-standard-2-support.md @@ -33,7 +33,7 @@ WCF Client releases previously targeted .NET Standard 2.0 to support both .NET ( - If your WCF project targets .NET 6 or later, no change is needed. If it targets .NET Standard 2.0, you'll need to multi-target your WCF libraries. Add a conditional assembly reference to *System.ServiceModel.dll* for .NET Framework and conditionally add package references to WCF Client packages for .NET. -- Remove references to the [System.ServiceModel.Duplex](https://www.nuget.org/packages/System.ServiceModel.Duplex) and [System.ServiceModel.Security](https://www.nuget.org/packages/System.ServiceModel.Security) packages, because they're are no longer needed. +- Remove references to the [System.ServiceModel.Duplex](https://www.nuget.org/packages/System.ServiceModel.Duplex) and [System.ServiceModel.Security](https://www.nuget.org/packages/System.ServiceModel.Security) packages, because they're no longer needed. ## Affected APIs diff --git a/docs/core/compatibility/windows-forms/8.0/anchor-layout.md b/docs/core/compatibility/windows-forms/8.0/anchor-layout.md new file mode 100644 index 0000000000000..40eac7b1ff4c9 --- /dev/null +++ b/docs/core/compatibility/windows-forms/8.0/anchor-layout.md @@ -0,0 +1,62 @@ +--- +title: "Breaking change: Anchor layout changes" +description: Learn about the breaking change in .NET 8 for Windows Forms where anchor layout computations have been changed to support high DPI devices. +ms.date: 01/19/2023 +--- +# Anchor layout changes + +Control anchor computations have been changed to support high DPI devices. For more information about the changes, see [Anchor layout changes in .NET 8](https://github.com/dotnet/winforms/blob/main/docs/design/anchor-layout-changes-in-net80.md). + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + +Certain applications using or mode and anchored controls encountered layout issues on high DPI devices. + +## New behavior + +Applications using or mode and anchored controls should have improved layout when rendered on high DPI devices. + +## Change category + +This change is a [*behavioral change*](../../categories.md#behavioral-change). + +## Reason for change + +This change is part of a broader effort to improve the Windows Forms user experience on high DPI monitors. It enables developers to use an anchored layout for applications on high DPI devices. + +## Recommended action + +If the new behavior is problematic for you, you can opt out by setting `System.Windows.Forms.AnchorLayoutV2` to `false` in your *runtimeconfig.json* file. + +*runtimeconfig.template.json* template file: + +```json +{ + "configProperties": { + "System.Windows.Forms.AnchorLayoutV2": false + } +} +``` + +*[appname].runtimeconfig.json* output file: + +```json +{ + "runtimeOptions": { + "configProperties": { + "System.Windows.Forms.AnchorLayoutV2": false + } + } +} +``` + +## Affected APIs + +N/A + +## See also + +- [Anchor layout changes in .NET 8](https://github.com/dotnet/winforms/blob/main/docs/design/anchor-layout-changes-in-net80.md) diff --git a/docs/core/compatibility/windows-forms/8.0/defaultvalueattribute-removal.md b/docs/core/compatibility/windows-forms/8.0/defaultvalueattribute-removal.md new file mode 100644 index 0000000000000..e3b693ae34200 --- /dev/null +++ b/docs/core/compatibility/windows-forms/8.0/defaultvalueattribute-removal.md @@ -0,0 +1,43 @@ +--- +title: "Breaking change: DefaultValueAttribute removed from some properties" +description: Learn about the breaking change in .NET 8 for Windows Forms where DefaultValueAttribute was removed from properties whose default values must be dynamically calculated. +ms.date: 03/13/2023 +--- +# DefaultValueAttribute removed from some properties + + has been removed from control properties that are dependent on the default font height. + +## Version introduced + +.NET 8 + +## Previous behavior + +The affected properties were decorated with , and default values were hardcoded according to an assumed application-wide font. + +## New behavior + +Starting in .NET 8, the attribute is removed from certain properties. Design-time default values are calculated at startup based on the current font metrics. + +## Change category + +This change is a [*behavioral change*](../../categories.md#behavioral-change). + +## Reason for change + +The attribute is designed to define constant default values used by the Windows Forms designer. In the past, this attribute was used to specify defaults on certain properties that depend on the current font height. A new default font was introduced in .NET Core 3.1, but the attribute values weren't updated accordingly. Moreover, there's now an API to modify application font. Thus, it makes sense to use dynamic default values instead of constant ones. + +The designer provides methods to specify dynamic default values, however, for properties decorated with , it always uses the constant default value instead. The methods for specifying dynamic defaults preserve the design-time functionality provided by the attribute. + +## Recommended action + + is intended for internal use in design-time scenarios. You shouldn't use it in other scenarios. + +## Affected APIs + +The following table lists the affected properties. + +| Property | Change version | +|-|-|-| +| | Preview 2 | +| | Preview 2 | diff --git a/docs/core/compatibility/windows-forms/8.0/domainupdownaccessibleobject.md b/docs/core/compatibility/windows-forms/8.0/domainupdownaccessibleobject.md new file mode 100644 index 0000000000000..153f26698607b --- /dev/null +++ b/docs/core/compatibility/windows-forms/8.0/domainupdownaccessibleobject.md @@ -0,0 +1,41 @@ +--- +title: "Breaking change: WFDEV002 obsoletion is now an error" +description: Learn about the breaking change in .NET 8 for Windows Forms where the compile-time diagnostic WFDEV002 has been promoted from a warning to an error. +ms.date: 01/30/2023 +--- +# WFDEV002 obsoletion is now an error + +The WFDEV002 obsoletion has been promoted from a warning to an error in .NET 8. Any reference to will result in a compilation error that can't be suppressed. In addition, now returns an object of the internal type `UpDownBase.UpDownBaseAccessibleObject`. + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + +Previously, if you referenced the type, you got compile-time warning [WFDEV002](/dotnet/desktop/winforms/wfdev-diagnostics/wfdev002). + +Also, returned an object of type . + +## New behavior + +If you reference the type, you'll get a compile-time error with the same diagnostic ID ([WFDEV002](/dotnet/desktop/winforms/wfdev-diagnostics/wfdev002)). + +In addition, since the type has been removed, now returns an object of type `UpDownBase.UpDownBaseAccessibleObject` (which is an internal type). + +## Change category + +This change can affect [*source compatibility*](../../categories.md#source-compatibility). + +## Reason for change + +The class has always been documented as "internal use only". All functionality of the class was moved to the base class. + +## Recommended action + +Update your code to use or instead of . + +## Affected APIs + +- +- diff --git a/docs/core/compatibility/windows-forms/8.0/exceptioncollection.md b/docs/core/compatibility/windows-forms/8.0/exceptioncollection.md new file mode 100644 index 0000000000000..428d22aeb7c82 --- /dev/null +++ b/docs/core/compatibility/windows-forms/8.0/exceptioncollection.md @@ -0,0 +1,36 @@ +--- +title: "Breaking change: ExceptionCollection constructor throws ArgumentException" +description: Learn about the breaking change in .NET 8 for Windows Forms where the ExceptionCollection constructor now throws an exception if the input is not of type Exception. +ms.date: 02/06/2023 +--- +# ExceptionCollection ctor throws ArgumentException + +The constructor now throws an if the elements in the input array are not of type . + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + +Previously, the constructor did not check the type passed in, which could delay failure until later in the process. No exceptions were thrown during object creation. + +## New behavior + +Starting in .NET 8, if the elements in the input array are not of type , an is thrown. + +## Change category + +This change is a [*behavioral change*](../../categories.md#behavioral-change). + +## Reason for change + +This change helps to make exception types consistent across the code base. + +## Recommended action + +For most scenarios, this change should not have a significant impact. However, consider updating your code to handle at constructor call sites. + +## Affected APIs + +- constructor diff --git a/docs/core/compatibility/windows-forms/8.0/forms-scale-size-to-dpi.md b/docs/core/compatibility/windows-forms/8.0/forms-scale-size-to-dpi.md new file mode 100644 index 0000000000000..22f03d592ad9c --- /dev/null +++ b/docs/core/compatibility/windows-forms/8.0/forms-scale-size-to-dpi.md @@ -0,0 +1,68 @@ +--- +title: "Breaking change: Top-level forms scale to DPI" +description: Learn about the breaking change in .NET 8 for Windows Forms where top-level forms scale their minimum and maximum size values according to the DPI of the monitor. +ms.date: 01/19/2023 +--- +# Top-level forms scale minimum and maximum size to DPI + +Top-level forms in Windows Forms now scale their and values according to the dots per inch (DPI) of the monitor when running in mode. + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + +In .NET 8, the and values for top-level forms remained constant regardless of the application DPI mode and the DPI of the monitor where the form is rendered. This sometimes resulted in scaling limitations of the top-level form. + +You can also opt into this behavior in .NET 7. To opt in, set the `System.Windows.Forms.ScaleTopLevelFormMinMaxSizeForDpi` runtime configuration option described in the [Recommended action](#recommended-action) section. + +## New behavior + +Starting in .NET 8, top-level forms scale their and values according to the DPI of the monitor when running in mode. The behavior of your app might change in the following ways: + +- Run-time dependencies might be impacted when the minimum and maximum size of the form change. +- New and events might be raised. +- The scaled form size now has new constraint values for the minimum and maximum sizes. + +## Change category + +This change is a [*behavioral change*](../../categories.md#behavioral-change). + +## Reason for change + +This change is part of a broader effort to improve the Windows Forms user experience on high DPI monitors. It enables developers to set minimum and maximum sizes for top-Level forms without having to take the DPI of the monitor into account. + +## Recommended action + +If the new behavior is problematic for you, you can opt out by setting `System.Windows.Forms.ScaleTopLevelFormMinMaxSizeForDpi` to `false` in your *runtimeconfig.json* file. + +*runtimeconfig.template.json* template file: + +```json +{ + "configProperties": { + "System.Windows.Forms.ScaleTopLevelFormMinMaxSizeForDpi": false + } +} +``` + +*[appname].runtimeconfig.json* output file: + +```json +{ + "runtimeOptions": { + "configProperties": { + "System.Windows.Forms.ScaleTopLevelFormMinMaxSizeForDpi": false + } + } +} +``` + +## Affected APIs + +N/A + +## See also + +- [Forms scale according to AutoScaleMode](top-level-window-scaling.md) diff --git a/docs/core/compatibility/windows-forms/8.0/imagelist-colordepth.md b/docs/core/compatibility/windows-forms/8.0/imagelist-colordepth.md new file mode 100644 index 0000000000000..7f87ea77cf434 --- /dev/null +++ b/docs/core/compatibility/windows-forms/8.0/imagelist-colordepth.md @@ -0,0 +1,36 @@ +--- +title: "Breaking change: ImageList.ColorDepth default is Depth32Bit" +description: Learn about the breaking change in .NET 8 for Windows Forms where the default value of ImageList.ColorDepth has changed from Depth8Bit to Depth32Bit. +ms.date: 01/31/2023 +--- +# ImageList.ColorDepth default is Depth32Bit + +The default value for has changed over time. Starting in .NET 8, the default value has changed from to . This change affects both new and existing applications if they're upgraded to target .NET 8. + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + +The default value for was . + +## New behavior + +If you haven't explicitly set for an image list, the color depth will automatically be reset to . This could increase your app's memory usage. + +## Change category + +This change is a [*behavioral change*](../../categories.md#behavioral-change). + +## Reason for change + +The default value was changed to improve image quality. + +## Recommended action + +If you want to continue using the previous color depth, explicitly set to . + +## Affected APIs + +- diff --git a/docs/core/compatibility/windows-forms/8.0/tablelayoutstylecollection.md b/docs/core/compatibility/windows-forms/8.0/tablelayoutstylecollection.md new file mode 100644 index 0000000000000..6525aeceff4fc --- /dev/null +++ b/docs/core/compatibility/windows-forms/8.0/tablelayoutstylecollection.md @@ -0,0 +1,38 @@ +--- +title: "Breaking change: TableLayoutStyleCollection throws ArgumentException" +description: Learn about the breaking change in .NET 8 for Windows Forms where inserting or removing an object that's not a TableLayoutStyle throws an exception. +ms.date: 02/06/2023 +--- +# TableLayoutStyleCollection throws ArgumentException + + enforces the type passed to its collection operations. The [affected APIs](#affected-apis) now throw an instead of an if the input is not of type . + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + +Previously, if the input couldn't be converted to type , an was thrown. + +## New behavior + +Starting in .NET 8, if the input can't be converted to type , an is thrown. + +## Change category + +This change is a [*behavioral change*](../../categories.md#behavioral-change). + +## Reason for change + +This change helps to make exception types consistent across the code base. + +## Recommended action + +For most scenarios, this change should not have a significant impact. However, if you previously handled , update your code to handle instead. + +## Affected APIs + +- +- +- diff --git a/docs/core/compatibility/windows-forms/8.0/top-level-window-scaling.md b/docs/core/compatibility/windows-forms/8.0/top-level-window-scaling.md new file mode 100644 index 0000000000000..0aa468730418b --- /dev/null +++ b/docs/core/compatibility/windows-forms/8.0/top-level-window-scaling.md @@ -0,0 +1,42 @@ +--- +title: "Breaking change: Forms scale according to AutoScaleMode" +description: Learn about the breaking change in .NET 8 for Windows Forms where top-level windows in PerMonitorV2-mode apps scale according to AutoScaleMode. +ms.date: 01/31/2023 +--- +# Forms scale according to AutoScaleMode + +In -mode apps, Windows Forms has been using linear sizes (also known as DPI-scaled sizes) provided by Windows for top-level windows, regardless of the . This implementation was problematic when using the scaling mode, where scaling should be non-linear. The child controls are scaled non-linearly and depend on the font that was assigned to the or child controls. + +This change enables `WM_GETDPISCALEDSIZE` message handling for top-level objects. It utilizes [WM_GETDPISCALEDSIZE](/windows/win32/hidpi/wm-getdpiscaledsize) to let Windows know that the may need non-linear sizes depending on . + +## Version introduced + +.NET 8 Preview 1 + +## Previous behavior + +Previously, in -mode apps, top-level windows were scaled by Windows and disregarded as specified in the WinForms application. This implementation led to inconsistent scaling between objects and their child controls. + +## New behavior + +In -mode apps, top-level windows (such as [Forms](xref:System.Windows.Forms.Form)) are scaled according to . This implementation ensures that top-level windows scale consistently with their child controls. + +## Change category + +This change is a [*behavioral change*](../../categories.md#behavioral-change). + +## Reason for change + +This change was made to improve the high-DPI experience for Windows Forms apps in mode. + +## Recommended action + +No action is required. + +## Affected APIs + +N/A + +## See also + +- [Top-level forms scale minimum and maximum size to DPI](forms-scale-size-to-dpi.md) diff --git a/docs/core/deploying/deploy-with-cli.md b/docs/core/deploying/deploy-with-cli.md index d9944cb216545..4d91481b17c73 100644 --- a/docs/core/deploying/deploy-with-cli.md +++ b/docs/core/deploying/deploy-with-cli.md @@ -182,7 +182,7 @@ You must use the following switches with the `dotnet publish` command to publish | | 7.0 | `dotnet publish -c Release -r --self-contained true` | > [!TIP] -> In .NET 6 and later versions, you can reduce the total size of compatible self-contained apps by [publishing trimmed](trimming/trim-self-contained.md). This enables the trimmer to remove parts of the framework and referenced assemblies that are not on any code path or potentially referenced in [runtime reflection](../../csharp/programming-guide/concepts/reflection.md). See [trimming incompatibilities](./trimming/incompatibilities.md) to determine if trimming makes sense for your application. +> In .NET 6 and later versions, you can reduce the total size of compatible self-contained apps by [publishing trimmed](trimming/trim-self-contained.md). This enables the trimmer to remove parts of the framework and referenced assemblies that are not on any code path or potentially referenced in [runtime reflection](/dotnet/csharp/advanced-topics/reflection-and-attributes/). See [trimming incompatibilities](./trimming/incompatibilities.md) to determine if trimming makes sense for your application. > [!NOTE] > You can reduce the total size of your deployment by enabling **globalization invariant mode**. This mode is useful for applications that are not globally aware and that can use the formatting conventions, casing conventions, and string comparison and sort order of the [invariant culture](xref:System.Globalization.CultureInfo.InvariantCulture). For more information about **globalization invariant mode** and how to enable it, see [.NET Core Globalization Invariant Mode](https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md). diff --git a/docs/core/deploying/native-aot/index.md b/docs/core/deploying/native-aot/index.md index dcdda08ee2f28..dc2fcdd419b20 100644 --- a/docs/core/deploying/native-aot/index.md +++ b/docs/core/deploying/native-aot/index.md @@ -3,26 +3,26 @@ title: Native AOT deployment overview description: Learn what native AOT deployments are and why you should consider using it as part of the publishing your app with .NET 7 and later. author: lakshanf ms.author: lakshanf -ms.date: 06/09/2022 +ms.date: 02/21/2023 --- -# Native AOT Deployment +# Native AOT deployment -Publishing your app as *native AOT* produces an app that is [self-contained](../index.md#publish-self-contained) and that has been ahead-of-time (AOT) compiled to native code. Native AOT apps start up very quickly and use less memory. Users of the application can run it on a machine that doesn't have the .NET runtime installed. +Publishing your app as *native AOT* produces an app that is [self-contained](../index.md#publish-self-contained) and that has been ahead-of-time (AOT) compiled to native code. Native AOT apps have faster startup time and smaller memory footprints. These apps can run on a machine without .NET runtime installed. -The benefit of native AOT is most significant for workloads with a high number of deployed instances, such as cloud infrastructure and hyper-scale services. It is currently not supported with ASP.NET Core, but only console apps. +The benefit of native AOT is most significant for workloads with a high number of deployed instances, such as cloud infrastructure and hyper-scale services. Native AOT deployment is currently in [preview for ASP.NET Core 8.0](/aspnet/core/native-aot/?view=aspnetcore-8.0&preserve-view=true). The native AOT deployment model uses an ahead of time compiler to compile IL to native code at the time of publish. Native AOT apps don't use a Just-In-Time (JIT) compiler when the application runs. Native AOT apps can run in restricted environments where a JIT is not allowed. Native AOT applications target a specific runtime environment, such as Linux x64 or Windows x64, just like publishing a [self-contained app](../index.md#publish-self-contained). There are some limitations in the .NET native AOT deployment model, with the main one being that run-time code generation is not possible. For more information, see [Limitations of Native AOT deployment](#limitations-of-native-aot-deployment). The support in the .NET 7 release is targeted towards console-type applications. > [!WARNING] -> Native AOT is supported in .NET 7 but only a limited number of libraries are fully compatible with native AOT in .NET 7. +> In .NET 7, only a limited number of libraries are fully compatible with native AOT. ## Prerequisites The following prerequisites need to be installed before publishing .NET projects with native AOT. -On Windows, install [Visual Studio 2022](https://visualstudio.microsoft.com/vs/), including Desktop development with C++ workload. +On Windows, install [Visual Studio 2022](https://visualstudio.microsoft.com/vs/), including Desktop development with C++ workload with all default components. On Linux, install compiler toolchain and developer packages for libraries that .NET runtime depends on. @@ -38,7 +38,9 @@ On Linux, install compiler toolchain and developer packages for libraries that . sudo apk add clang build-base zlib-dev ``` -## Publish Native AOT - CLI + + +## Publish native AOT - CLI 01. Add `true` to your project file. @@ -64,7 +66,7 @@ The app will be available in the publish directory and will contain all the code Check out the [native AOT samples](https://github.com/dotnet/samples/tree/main/core/nativeaot) available in the dotnet/samples repository on GitHub. The samples include [Linux](https://github.com/dotnet/samples/blob/main/core/nativeaot/HelloWorld/Dockerfile) and [Windows](https://github.com/dotnet/samples/blob/main/core/nativeaot/HelloWorld/Dockerfile.windowsservercore-x64) Dockerfiles that demonstrate how to automate installation of prerequisites and publishing .NET projects with native AOT using containers. -### Native Debug Information +### Native debug information The native AOT publishing follows platform conventions for native toolchains. The default behavior of native toolchains on Windows is to produce debug information in a separate _.pdb_ file. The default behavior of native toolchains on Linux is to include the debug information in the native binary which makes the native binary significantly larger. @@ -76,7 +78,7 @@ Set the `StripSymbols` property to `true` to produce the debug information in a ``` -## Limitations of Native AOT deployment +## Limitations of native AOT deployment Native AOT applications come with a few fundamental limitations and compatibility issues. The key limitations include: @@ -86,9 +88,9 @@ Native AOT applications come with a few fundamental limitations and compatibilit - No built-in COM (only applies to Windows) - Requires trimming, which has [limitations](../trimming/incompatibilities.md) - Implies compilation into a single file, which has known [incompatibilities](../single-file/overview.md#api-incompatibility) -- Apps include required runtime libraries (just like [self-contained apps](../index.md#publish-self-contained), increasing their size, as compared to framework-dependent apps) +- Apps include required runtime libraries (just like [self-contained apps](../index.md#publish-self-contained), increasing their size as compared to framework-dependent apps) -The publish process will analyze the entire project and its dependencies and produce warnings whenever the limitations could potentially be hit by the published application at runtime. +The publish process analyzes the entire project and its dependencies and produces warnings whenever the limitations could potentially be hit by the published application at run time. The first release of native AOT in .NET 7 has additional limitations. These include: @@ -104,9 +106,12 @@ Publishing a class library as native AOT creates a native library that exposes m ## Platform/architecture restrictions -The following table shows supported compilation targets when targeting .NET 7. +The following table shows supported compilation targets. | Platform | Supported architecture | -| ------------ | --------------------------- | -| Windows | x64, Arm64 | -| Linux | x64, Arm64 | +| -------- | ---------------------- | +| Windows | x64, Arm64 | +| Linux | x64, Arm64 | +| macOS* | x64, Arm64 | + +* Supported starting in .NET 8. diff --git a/docs/core/deploying/single-file/overview.md b/docs/core/deploying/single-file/overview.md index 33e3a65df940a..06332ea00e09d 100644 --- a/docs/core/deploying/single-file/overview.md +++ b/docs/core/deploying/single-file/overview.md @@ -7,12 +7,10 @@ ms.date: 06/21/2022 ms.custom: kr2b-contr-experiment --- -# Single-file deployment and executable +# Single-file deployment Bundling all application-dependent files into a single binary provides an application developer with the attractive option to deploy and distribute the application as a single file. Single-file deployment is available for both the [framework-dependent deployment model](../index.md#publish-framework-dependent) and [self-contained applications](../index.md#publish-self-contained). -This deployment model has been available since .NET Core 3.0 and has been enhanced in .NET 5. Previously in .NET Core 3.0, when a user runs your single file app, .NET Core host first extracts all files to a directory before running the application. .NET 5 improves this experience by directly running the code without the need to extract the files from the app. - The size of the single file in a self-contained application is large since it includes the runtime and the framework libraries. In .NET 6, you can [publish trimmed](../trimming/trim-self-contained.md) to reduce the total size of trim-compatible applications. The single file deployment option can be combined with [ReadyToRun](../ready-to-run.md) and [Trim](../trimming/trim-self-contained.md) publish options. ## Sample project file @@ -28,7 +26,6 @@ Here's a sample project file that specifies single file publishing: true true win-x64 - true @@ -39,7 +36,6 @@ These properties have the following functions: - `PublishSingleFile`. Enables single file publishing. Also enables single file warnings during `dotnet build`. - `SelfContained`. Determines whether the app is self-contained or framework-dependent. - `RuntimeIdentifier`. Specifies the [OS and CPU type](../../rid-catalog.md) you're targeting. Also sets `true` by default. -- `PublishReadyToRun`. Enables [ahead-of-time (AOT) compilation](../ready-to-run.md). Single file apps are always OS and architecture specific. You need to publish for each configuration, such as Linux x64, Linux Arm64, Windows x64, and so forth. @@ -156,13 +152,33 @@ Single file applications have all related PDB files alongside the application, n Managed C++ components aren't well suited for single file deployment. We recommend that you write applications in C# or another non-managed C++ language to be single file compatible. -### Output differences from .NET 3.x +### Native libraries + +Only managed DLLs are bundled with the app into a single executable. When the app starts, the managed DLLs are extracted and loaded in memory, avoiding the extraction to a folder. With this approach, the managed binaries are embedded in the single file bundle, but the native binaries of the core runtime itself are separate files. -In .NET Core 3.x, publishing as a single file produced one file, consisting of the app itself, dependencies, and any other files in the folder during publish. When the app starts, the single file app was extracted to a folder and run from there. +To embed those files for extraction and get one output file, set the property `IncludeNativeLibrariesForSelfExtract` to `true`. -Starting with .NET 5, only managed DLLs are bundled with the app into a single executable. When the app starts, the managed DLLs are extracted and loaded in memory, avoiding the extraction to a folder. On Windows, this approach means that the managed binaries are embedded in the single file bundle, but the native binaries of the core runtime itself are separate files. +Specifying `IncludeAllContentForSelfExtract` extracts all files, including the managed assemblies, before running the executable. This may be helpful for rare application compatibility problems. -To embed those files for extraction and get one output file, like in .NET Core 3.x, set the property `IncludeNativeLibrariesForSelfExtract` to `true`. For more information about extraction, see [Including native libraries](#include-native-libraries). +> [!IMPORTANT] +> If extraction is used, the files are extracted to disk before the app starts: +> +> - If the `DOTNET_BUNDLE_EXTRACT_BASE_DIR` environment variable is set to a path, the files are extracted to a directory under that path. +> - Otherwise, if running on Linux or macOS, the files are extracted to a directory under `$HOME/.net`. +> - If running on Windows, the files are extracted to a directory under `%TEMP%/.net`. +> +> To prevent tampering, these directories shouldn't be writable by users or services with different privileges. Don't use _/tmp_ or _/var/tmp_ on most Linux and macOS systems. + +> [!NOTE] +> In some Linux environments, such as under `systemd`, the default extraction doesn't work because `$HOME` isn't defined. In such cases, it's recommended that you set `$DOTNET_BUNDLE_EXTRACT_BASE_DIR` explicitly. +> +> For `systemd`, a good alternative is to define `DOTNET_BUNDLE_EXTRACT_BASE_DIR` in your service's unit file as `%h/.net`, which `systemd` expands correctly to `$HOME/.net` for the account running the service. +> +> ```text +> [Service] +> Environment="DOTNET_BUNDLE_EXTRACT_BASE_DIR=%h/.net" +> ``` +> ### API incompatibility @@ -191,51 +207,34 @@ We have some recommendations for fixing common scenarios: - To avoid shipping loose files entirely, consider using [embedded resources](../../extensions/create-resource-files.md). -### Attach a debugger - -On Linux, the only debugger that can attach to self-contained single file processes or debug crash dumps is [SOS with LLDB](../../diagnostics/dotnet-sos.md). - -On Windows and Mac, Visual Studio and VS Code can be used to debug crash dumps. Attaching to a running self-contained single file executable requires an extra file: _mscordbi.{dll,so}_. - -Without this file, Visual Studio might produce the error: "Unable to attach to the process. A debug component is not installed." VS Code might produce the error: "Failed to attach to process: Unknown Error: 0x80131c3c." +### Post-processing binaries before bundling -To fix these errors, _mscordbi_ needs to be copied next to the executable. _mscordbi_ is `publish`ed by default in the subdirectory with the application's runtime ID. So, for example, if you publish a self-contained single file executable using the `dotnet` CLI for Windows using the parameters `-r win-x64`, the executable would be placed in _bin/Debug/net5.0/win-x64/publish_. A copy of _mscordbi.dll_ would be present in _bin/Debug/net5.0/win-x64_. +Some workflows require post-processing of binaries before bundling. A common example is signing. The dotnet SDK provides MSBuild extension points to allow processing binaries just before single-file bundling. The available APIs are: -### Include native libraries +- A target `PrepareForBundle` that will be called before `GenerateSingleFileBundle` +- An `` containing all files that will be bundled +- A Property `AppHostFile` that will specify the apphost template. Post-processing might want to exclude the apphost from processing. -Single file deployment doesn't bundle native libraries by default. On Linux, the runtime is prelinked into the bundle and only application native libraries are deployed to the same directory as the single file app. On Windows, only the hosting code is prelinked and both the runtime and application native libraries are deployed to the same directory as the single file app. This approach is to ensure a good debugging experience, which requires native files to be excluded from the single file. +To plug into this involves creating a target that will be executed between `PrepareForBundle` and `GenerateSingleFileBundle`. -Starting with .NET 6, the runtime is prelinked into the bundle on all platforms. +Consider the following .NET project `Target` node example: -You can set a flag, `IncludeNativeLibrariesForSelfExtract`, to include native libraries in the single file bundle. These files are extracted to a directory in the client machine when the single file application is run. - -Specifying `IncludeAllContentForSelfExtract` extracts all files, including the managed assemblies, before running the executable. This approach preserves the original .NET Core single file deployment behavior. - -> [!NOTE] -> If extraction is used, the files are extracted to disk before the app starts: -> -> - If environment variable `DOTNET_BUNDLE_EXTRACT_BASE_DIR` is set to a path, the files are extracted to a directory under that path. -> - Otherwise, if running on Linux or MacOS, the files are extracted to a directory under `$HOME/.net`. -> - If running on Windows, the files are extracted to a directory under `%TEMP%/.net`. -> -> To prevent tampering, these directories should not be writable by users or services with different privileges. Don't use _/tmp_ or _/var/tmp_ on most Linux and MacOS systems. +```xml + +``` -> [!NOTE] -> In some Linux environments, such as under `systemd`, the default extraction does not work because `$HOME` is not defined. In such cases, we recommend that you set `$DOTNET_BUNDLE_EXTRACT_BASE_DIR` explicitly. -> -> For `systemd`, a good alternative seems to be defining `DOTNET_BUNDLE_EXTRACT_BASE_DIR` in your service's unit file as `%h/.net`, which `systemd` expands correctly to `$HOME/.net` for the account running the service. -> -> ```text -> [Service] -> Environment="DOTNET_BUNDLE_EXTRACT_BASE_DIR=%h/.net" -> ``` +It's possible that tooling will need to copy files in the process of signing. That could happen if the original file is a shared item not owned by the build, for example, the file comes from a NuGet cache. In such a case, it's expected that the tool will modify the path of the corresponding `FilesToBundle` item to point to the modified copy. ### Compress assemblies in single-file apps -Starting with .NET 6, single file apps can be created with compression enabled on the embedded assemblies. Set the `EnableCompressionInSingleFile` property to `true`. The single file that's produced will have all of the embedded assemblies compressed, which can significantly reduce the size of the executable. +Single-file apps can be created with compression enabled on the embedded assemblies. Set the `EnableCompressionInSingleFile` property to `true`. The single file that's produced will have all of the embedded assemblies compressed, which can significantly reduce the size of the executable. Compression comes with a performance cost. On application start, the assemblies must be decompressed into memory, which takes some time. We recommend that you measure both the size change and startup cost of enabling compression before using it. The impact can vary significantly between different applications. +### Inspect a single-file app + +Single file apps can be inspected using the [ILSpy tool](https://ilspy.net/). The tool can show all of the files bundled into the application and can inspect the contents of managed assemblies. + ## See also - [.NET Core application deployment](../index.md) diff --git a/docs/core/deploying/trimming/prepare-libraries-for-trimming.md b/docs/core/deploying/trimming/prepare-libraries-for-trimming.md index b33b9c6b4613d..dce0378b2974e 100644 --- a/docs/core/deploying/trimming/prepare-libraries-for-trimming.md +++ b/docs/core/deploying/trimming/prepare-libraries-for-trimming.md @@ -35,20 +35,27 @@ If you want to see trim warnings, but don't want to mark your library as trim-co To show all analysis warnings for your library, including warnings about dependencies, you need the trimmer to analyze the implementation of your library and the implementations of dependencies your library uses. When building and publishing a library, the implementations of the dependencies are not available, and the reference assemblies that are available do not have enough information for the trimmer to determine if they are compatible with trimming. Because of this, you'll need to create and publish a self-contained sample application which produces an executable that includes your library and the dependencies it relies on. This executable includes all the information the trimmer requires to warn you about all trim incompatibilities in your library code, as well as the code that your library references from its dependencies. -To create your sample app, first create a separate application project with `dotnet new` and modify the project file to look like the following. No changes to the source code are necessary. You'll need to add the following to your project file: +> [!NOTE] +> If your library has significantly different behavior or uses different APIs depending on the target framework of the consumer (for example, using `#if NET7_0`) which might impact trimming, you will need to create a new sample app for each of the target frameworks you want to support trimming for. + +To create your sample app, first create a separate console application project with `dotnet new console` and modify the project file to look like the following. No changes to the source code are necessary. You'll need to do the following in your project file: - Set the PublishTrimmed property to `true` with `true` in a `` tag. -- A reference to your library with `true` in an `` tag. +- Add a reference to your library project with `` inside of an `` tag. - Specify your library as a trimmer root assembly with `` in an `` tag. - This ensures that every part of the library is analyzed. It tells the trimmer that this assembly is a "root" which means the trimmer will analyze the assembly as if everything will be used, and traverses all possible code paths that originate from that assembly. This is necessary in case the library has `[AssemblyMetadata("IsTrimmable", "True")]`, which would otherwise let trimming remove the unused library without analyzing it. -- Set the TrimmerDefaultAction property to `trim` with `link` in a `` tag. +- If your app targets .Net 6, set the TrimmerDefaultAction property to `link` with `link` in a `` tag. +- If your app targets .Net 7, [the new default behavior](../../../core/compatibility/deployment/7.0/trim-all-assemblies.md) is what you want, but you can enforce the behavior by adding `full` in a `` tag. - This ensures that the trimmer only analyzes the parts of the library's dependencies that are used. It tells the trimmer that any code that is not part of a "root" can be trimmed if it is unused. Without this option, you would see warnings originating from _any_ part of a dependency that doesn't set `[AssemblyMetadata("IsTrimmable", "True")]`, including parts that are unused by your library. +##### .Net 6 .csproj + ```xml Exe + net6.0 true @@ -64,6 +71,26 @@ To create your sample app, first create a separate application project with `dot ``` +##### .Net 7 .csproj + +```xml + + + + Exe + net7.0 + true + + + + + + + + + +``` + Once your project file is updated, run `dotnet publish` with the [runtime identifier (RID)](../../rid-catalog.md) you want to target. ```dotnetcli diff --git a/docs/core/diagnostics/collect-dumps-crash.md b/docs/core/diagnostics/collect-dumps-crash.md new file mode 100644 index 0000000000000..f12d51bb0a58b --- /dev/null +++ b/docs/core/diagnostics/collect-dumps-crash.md @@ -0,0 +1,47 @@ +--- +title: Collect Dumps on Crash - .NET +description: How to collect a dump on a crash +ms.date: 12/13/2022 +--- + +# Collect dumps on crash + +Configuring your application to collect a dump on crash is done by setting specific environment variables. This is helpful when you want to get an understanding of why a crash happened. For example, capturing a dump when an exception is thrown helps you identify an issue by examining the state of the app when it crashed. + +The following table shows the environment variables you can configure for collecting dumps on a crash. + +|Environment variable|Description|Default value| +|-------|---------|---| +|`COMPlus_DbgEnableMiniDump` or `DOTNET_DbgEnableMiniDump`|If set to 1, enable core dump generation.|0| +|`COMPlus_DbgMiniDumpType` or `DOTNET_DbgMiniDumpType`|Type of dump to be collected. For more information, see [Types of mini dumps](#types-of-mini-dumps).|2 (`Heap`)| +|`COMPlus_DbgMiniDumpName` or `DOTNET_DbgMiniDumpName`|Path to a file to write the dump to. Ensure that the user under which the dotnet process is running has write permissions to the specified directory.|`/tmp/coredump.`| +|`COMPlus_CreateDumpDiagnostics` or `DOTNET_CreateDumpDiagnostics`|If set to 1, enables diagnostic logging of dump process.|0| +|`COMPlus_EnableCrashReport` or `DOTNET_EnableCrashReport`|(Requires .NET 6 or later; not supported on Windows.)
If set to 1, the runtime generates a JSON-formatted crash report that includes information about the threads and stack frames of the crashing application. The crash report name is the dump path or name with *.crashreport.json* appended. +|`COMPlus_CreateDumpVerboseDiagnostics` or `DOTNET_CreateDumpVerboseDiagnostics`|(Requires .NET 7 or later.)
If set to 1, enables verbose diagnostic logging of the dump process.|0| +|`COMPlus_CreateDumpLogToFile` or `DOTNET_CreateDumpLogToFile`|(Requires .NET 7 or later.)
The path of the file to which the diagnostic messages should be written. If unset, the diagnostic messages are written to the console of the crashing application.| + +> [!NOTE] +> .NET 7 standardizes on the prefix `DOTNET_` instead of `COMPlus_` for these environment variables. However, the `COMPlus_` prefix will continue to work. If you're using a previous version of the .NET runtime, you should still use the `COMPlus_` prefix for environment variables. + +## File path templates + +Starting in .NET 5, `DOTNET_DbgMiniDumpName` can also include formatting template specifiers that will be filled in dynamically: + +|Specifier|Value| +|---------|-----| +|%%|A single % character| +|%p|PID of dumped process| +|%e|The process executable filename| +|%h|Host name return by `gethostname()`| +|%t|Time of dump, expressed as seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)| + +## Types of mini dumps + +The following table shows all the values you can use for `DOTNET_DbgMiniDumpType`. For example, setting `DOTNET_DbgMiniDumpType` to 1 means `Mini` type dump will be collected on a crash. + +|Value|Name|Description| +|-----|----|-----------| +|1|`Mini`|A small dump containing module lists, thread lists, exception information, and all stacks.| +|2|`Heap`|A large and relatively comprehensive dump containing module lists, thread lists, all stacks, exception information, handle information, and all memory except for mapped images.| +|3|`Triage`|Same as `Mini`, but removes personal user information, such as paths and passwords.| +|4|`Full`|The largest dump containing all memory including the module images.| diff --git a/docs/core/diagnostics/debug-linux-dumps.md b/docs/core/diagnostics/debug-linux-dumps.md index 699406d11acbf..ddad89660ec0a 100644 --- a/docs/core/diagnostics/debug-linux-dumps.md +++ b/docs/core/diagnostics/debug-linux-dumps.md @@ -1,7 +1,7 @@ --- title: Debug Linux dumps description: In this article, you'll learn how to collect and analyze dumps from Linux environments. -ms.date: 08/27/2020 +ms.date: 01/11/2023 --- # Debug Linux dumps @@ -16,14 +16,14 @@ ms.date: 08/27/2020 The two recommended ways of collecting dumps on Linux are: * [`dotnet-dump`](dotnet-dump.md) CLI tool -* [Environment variables](dumps.md#collect-dumps-on-crash) that collect dumps on crashes +* [Environment variables](collect-dumps-crash.md) that collect dumps on crashes ## Analyze dumps on Linux After a dump is collected, it can be analyzed using the [`dotnet-dump`](dotnet-dump.md) tool with the `dotnet-dump analyze` command. This analysis step needs to be run on a machine that has the same architecture and Linux distro as the environment the dump was captured in. The `dotnet-dump` tool supports displaying information about .NET code, but is not useful for understanding code issues for other languages like C and C++. -Alternatively, [LLDB](https://lldb.llvm.org/) can be used to analyze dumps on Linux, which allows analysis of both managed and native code. LLDB uses the SOS extension to debug managed code. The [`dotnet-sos`](dotnet-sos.md) CLI tool can be used to install SOS, which has [many useful commands](https://github.com/dotnet/diagnostics/blob/main/documentation/sos-debugging-extension.md) for debugging managed code. In order to analyze .NET Core dumps, LLDB and SOS require the following .NET Core binaries from the environment the dump was created in: +Alternatively, [LLDB](https://lldb.llvm.org/) can be used to analyze dumps on Linux, which allows analysis of both managed and native code. LLDB uses the SOS extension to debug managed code. The [`dotnet-sos`](dotnet-sos.md) CLI tool can be used to install SOS, which has [many useful commands](sos-debugging-extension.md) for debugging managed code. In order to analyze .NET Core dumps, LLDB and SOS require the following .NET Core binaries from the environment the dump was created in: 1. libmscordaccore.so 2. libcoreclr.so @@ -37,13 +37,19 @@ Once the necessary files are available, the dump can be loaded in LLDB by specif lldb --core ``` -In the above command line, `` is the path of the dump to analyze and `` is the native program that started the .NET Core application. This is typically the `dotnet` binary unless the app is self-contained, in which case it is the name of the application without the dll extension. +In the previous command, `` is the path of the dump to analyze and `` is the native program that started the .NET Core application. This is typically the `dotnet` binary unless the app is self-contained, in which case it is the name of the application without the *.dll* extension. -Once LLDB starts, it may be necessary to use the `setsymbolserver` command to point at the correct symbol location (`setsymbolserver -ms` to use Microsoft's symbol server or `setsymbolserver -directory ` to specify a local path). Native symbols can be loaded by running `loadsymbols`. At this point, [SOS commands](https://github.com/dotnet/diagnostics/blob/main/documentation/sos-debugging-extension.md) can be used to analyze the dump. +Once LLDB starts, it may be necessary to use the `setsymbolserver` command to point at the correct symbol location (`setsymbolserver -ms` to use Microsoft's symbol server or `setsymbolserver -directory ` to specify a local path). To load native symbols, run `loadsymbols`. At this point, you can use [SOS commands](sos-debugging-extension.md) to analyze the dump. + +> [!NOTE] +> LLDB can be installed with the command `sudo apt-get install lldb` ## Analyze dumps on Windows -Dumps collected from a Linux machine can also be analyzed on a Windows machine using [Visual Studio](/visualstudio/debugger/using-dump-files), [Windbg](/windows-hardware/drivers/debugger/analyzing-a-user-mode-dump-file), or the [dotnet-dump](dotnet-dump.md) tool. +Dumps collected from a Linux machine can also be analyzed on a Windows machine using [Visual Studio](/visualstudio/debugger/using-dump-files), [Windbg](/windows-hardware/drivers/debugger/analyzing-a-user-mode-dump-file), or the [dotnet-dump](dotnet-dump.md) tool. Both Visual Studio and Windbg can analyze native and managed code, while dotnet-dump only analyzes managed code. + +> [!NOTE] +> Visual Studio version 16.8 and later allows you to [open and analyze Linux dumps](https://devblogs.microsoft.com/visualstudio/linux-managed-memory-dump-debugging/) generated on .NET Core 3.1.7 or later. - **Visual Studio** - See the [Visual Studio dump debugging guide](/visualstudio/debugger/using-dump-files). - **Windbg** - You can debug Linux dumps on windbg using the [same instructions](/windows-hardware/drivers/debugger/analyzing-a-user-mode-dump-file) you would use to debug a Windows user-mode dump. Use the x64 version of windbg for dumps collected from a Linux x64 or Arm64 environment and the diff --git a/docs/core/diagnostics/debug-memory-leak.md b/docs/core/diagnostics/debug-memory-leak.md index 4a34d8b01af6b..811ff16198307 100644 --- a/docs/core/diagnostics/debug-memory-leak.md +++ b/docs/core/diagnostics/debug-memory-leak.md @@ -10,11 +10,11 @@ recommendations: false **This article applies to:** ✔️ .NET Core 3.1 SDK and later versions -A memory leak may happen when your app references objects that it no longer needs to perform the desired task. Referencing said objects makes the garbage collector to be unable to reclaim the memory used, often resulting in performance degradation and potentially end up throwing an . +A memory leak may happen when your app references objects that it no longer needs to perform the desired task. Referencing said objects prevents the garbage collector from reclaiming the memory used, often resulting in performance degradation and potentially ending up throwing an . This tutorial demonstrates the tools to analyze a memory leak in a .NET Core app using the .NET diagnostics CLI tools. If you are on Windows, you may be able to [use Visual Studio's Memory Diagnostic tools](/visualstudio/profiling/memory-usage) to debug the memory leak. -This tutorial uses a sample app, which is designed to intentionally leak memory. The sample is provided as an exercise. You can analyze an app that is unintentionally leaking memory too. +This tutorial uses a sample app, which intentionally leaks memory, as an exercise. You can also analyze apps that unintentionally leak memory. In this tutorial, you will: @@ -33,11 +33,11 @@ The tutorial uses: - [dotnet-dump](dotnet-dump.md) to collect and analyze a dump file. - A [sample debug target](/samples/dotnet/samples/diagnostic-scenarios/) app to diagnose. -The tutorial assumes the sample and tools are installed and ready to use. +The tutorial assumes the sample apps and tools are installed and ready to use. ## Examine managed memory usage -Before you start collecting diagnostics data to help us root cause this scenario, you need to make sure you're actually seeing a memory leak (memory growth). You can use the [dotnet-counters](dotnet-counters.md) tool to confirm that. +Before you start collecting diagnostic data to help root cause this scenario, make sure you're actually seeing a memory leak (growth in memory usage). You can use the [dotnet-counters](dotnet-counters.md) tool to confirm that. Open a console window and navigate to the directory where you downloaded and unzipped the [sample debug target](/samples/dotnet/samples/diagnostic-scenarios/). Run the target: @@ -99,7 +99,7 @@ Focusing on this line: You can see that the managed heap memory is 4 MB right after startup. -Now, hit the URL `https://localhost:5001/api/diagscenario/memleak/20000`. +Now, go to the URL `https://localhost:5001/api/diagscenario/memleak/20000`. Observe that the memory usage has grown to 30 MB. @@ -111,7 +111,7 @@ By watching the memory usage, you can safely say that memory is growing or leaki ### Generate memory dump -When analyzing possible memory leaks, you need access to the app's memory heap. Then you can analyze the memory contents. Looking at relationships between objects, you create theories on why memory isn't being freed. A common diagnostics data source is a memory dump on Windows or the equivalent core dump on Linux. To generate a dump of a .NET Core application, you can use the [dotnet-dump](dotnet-dump.md) tool. +When analyzing possible memory leaks, you need access to the app's memory heap to analyze the memory contents. Looking at relationships between objects, you create theories as to why memory isn't being freed. A common diagnostic data source is a memory dump on Windows or the equivalent core dump on Linux. To generate a dump of a .NET Core application, you can use the [dotnet-dump](dotnet-dump.md) tool. Using the [sample debug target](/samples/dotnet/samples/diagnostic-scenarios/) previously started, run the following command to generate a Linux core dump: @@ -126,6 +126,9 @@ Writing minidump with heap to ./core_20190430_185145 Complete ``` +> [!NOTE] +> For a comparison over time, let the original process continue running after collecting the first dump and collect a second dump the same way. You would then have two dumps over a period of time that you can compare to see where the memory usage is growing. + ### Restart the failed process Once the dump is collected, you should have sufficient information to diagnose the failed process. If the failed process is running on a production server, now it's the ideal time for short-term remediation by restarting the process. diff --git a/docs/core/diagnostics/debug-windows-dumps.md b/docs/core/diagnostics/debug-windows-dumps.md new file mode 100644 index 0000000000000..fa337d8198c81 --- /dev/null +++ b/docs/core/diagnostics/debug-windows-dumps.md @@ -0,0 +1,13 @@ +--- +title: Debug Windows dumps +description: In this article, you'll learn how to analyze dumps from Windows environments. +ms.date: 01/11/2023 +--- + +# Debug Windows dumps + +**This article applies to: ✔️** .NET Core 3.1 and later versions + +## Analyze dumps on Windows + +Windows dumps can be analyzed on Windows with [Visual Studio](/visualstudio/debugger/using-dump-files), [Windbg](/windows-hardware/drivers/debugger/debugger-download-tools), or the [`dotnet-dump`](dotnet-dump.md) CLI tool. Visual Studio and Windbg can access both managed and native code and are the recommended tools for a Windows environment. dotnet-dump can only access managed code. diff --git a/docs/core/diagnostics/diagnosticsource-diagnosticlistener.md b/docs/core/diagnostics/diagnosticsource-diagnosticlistener.md index aba91f581b2c1..d1d3f71f795e0 100644 --- a/docs/core/diagnostics/diagnosticsource-diagnosticlistener.md +++ b/docs/core/diagnostics/diagnosticsource-diagnosticlistener.md @@ -39,7 +39,7 @@ The `DiagnosticSource` type is an abstract base class that defines the methods n The first step in instrumenting code with `DiagnosticSource` is to create a `DiagnosticListener`. For example: -:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="snippit1"::: +:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="Snippet1"::: Notice that `httpLogger` is typed as a `DiagnosticSource`. That's because this code @@ -63,7 +63,7 @@ This is instrument site specific. You need to check the instrumentation site to A typical call site will look like: -:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="snippit3"::: +:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="Snippet3"::: Every event has a `string` name (for example, `RequestStart`), and exactly one `object` as a payload. If you need to send more than one item, you can do so by creating an `object` with properties to represent all its information. C#'s [anonymous type](../../csharp/fundamentals/types/anonymous-types.md) @@ -76,7 +76,7 @@ make it efficient when the source is not enabled. Combining everything you have: -:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="snippit4"::: +:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="Snippet4"::: ------------------------------------------- @@ -94,7 +94,7 @@ happen. A typical use of the `AllListeners` static property looks like this: -:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="snippit5"::: +:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="Snippet5"::: This code creates a callback delegate and, using the `AllListeners.Subscribe` method, requests that the delegate be called for every active `DiagnosticListener` in the system. The decision of whether or not to subscribe to the listener @@ -114,7 +114,7 @@ to subscribe to. A `DiagnosticListener` implements the `IObservable>` interface, so you can call `Subscribe()` on it as well. The following code shows how to fill out the previous example: -:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="snippit6"::: +:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="Snippet6"::: In this example, after finding the 'System.Net.Http' `DiagnosticListener`, an action is created that prints out the name of the listener, event, and `payload.ToString()`. diff --git a/docs/core/diagnostics/distributed-tracing-collection-walkthroughs.md b/docs/core/diagnostics/distributed-tracing-collection-walkthroughs.md index 1c6af9021e4ed..d631b8bceeef1 100644 --- a/docs/core/diagnostics/distributed-tracing-collection-walkthroughs.md +++ b/docs/core/diagnostics/distributed-tracing-collection-walkthroughs.md @@ -21,7 +21,7 @@ available to diagnose application issues when needed. See [Cloud Native Computing Foundation](https://www.cncf.io/) that aims to standardize generating and collecting telemetry for cloud-native software. In these examples, you'll collect and display distributed trace information on the console. To learn how to configure OpenTelemetry to send information elsewhere, see the -[OpenTelemetry getting started guide](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/getting-started/README.md). +[OpenTelemetry getting started guide](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/getting-started-console/README.md). ### ASP.NET example diff --git a/docs/core/diagnostics/distributed-tracing-concepts.md b/docs/core/diagnostics/distributed-tracing-concepts.md index 3da360cdb512f..70ecc9aad3d60 100644 --- a/docs/core/diagnostics/distributed-tracing-concepts.md +++ b/docs/core/diagnostics/distributed-tracing-concepts.md @@ -96,7 +96,7 @@ as part of a distributed trace, but the information in these objects needs to be and serialized in a centralized persistent store so that the entire trace can be usefully reviewed later. There are several telemetry collection libraries that can do this task such as [Application Insights](/azure/azure-monitor/app/distributed-tracing), -[OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/getting-started/README.md), +[OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/getting-started-console/README.md), or a library provided by a third-party telemetry or APM vendor. Alternately developers can author their own custom Activity telemetry collection by using or diff --git a/docs/core/diagnostics/distributed-tracing.md b/docs/core/diagnostics/distributed-tracing.md index d8c78b2813de0..bea413c7dc64f 100644 --- a/docs/core/diagnostics/distributed-tracing.md +++ b/docs/core/diagnostics/distributed-tracing.md @@ -22,7 +22,7 @@ Typically, app developers select a telemetry service that stores this trace info then use a corresponding library to transmit the distributed tracing telemetry to their chosen service: -- [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/getting-started/README.md) +- [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/getting-started-console/README.md) is a vendor-neutral library that supports several services. For more information, see [Collect distributed traces with OpenTelemetry](distributed-tracing-collection-walkthroughs.md#collect-traces-using-opentelemetry). - [Application Insights](/azure/azure-monitor/app/distributed-tracing) is a full-featured service provided by Microsoft. For more information, see [Collect distributed traces with Application Insights](distributed-tracing-collection-walkthroughs.md#collect-traces-using-application-insights). diff --git a/docs/core/diagnostics/dotnet-counters.md b/docs/core/diagnostics/dotnet-counters.md index c2d3f1a0d0ba7..0c30614a80b5e 100644 --- a/docs/core/diagnostics/dotnet-counters.md +++ b/docs/core/diagnostics/dotnet-counters.md @@ -27,7 +27,6 @@ There are two ways to download and install `dotnet-counters`: | OS | Platform | | --- | -------- | | Windows | [x86](https://aka.ms/dotnet-counters/win-x86) \| [x64](https://aka.ms/dotnet-counters/win-x64) \| [Arm](https://aka.ms/dotnet-counters/win-arm) \| [Arm-x64](https://aka.ms/dotnet-counters/win-arm64) | - | macOS | [x64](https://aka.ms/dotnet-counters/osx-x64) | | Linux | [x64](https://aka.ms/dotnet-counters/linux-x64) \| [Arm](https://aka.ms/dotnet-counters/linux-arm) \| [Arm64](https://aka.ms/dotnet-counters/linux-arm64) \| [musl-x64](https://aka.ms/dotnet-counters/linux-musl-x64) \| [musl-Arm64](https://aka.ms/dotnet-counters/linux-musl-arm64) | > [!NOTE] diff --git a/docs/core/diagnostics/dotnet-dump.md b/docs/core/diagnostics/dotnet-dump.md index 25dee8bfc1beb..7b5d7013a1a31 100644 --- a/docs/core/diagnostics/dotnet-dump.md +++ b/docs/core/diagnostics/dotnet-dump.md @@ -30,7 +30,6 @@ There are two ways to download and install `dotnet-dump`: | OS | Platform | | --- | -------- | | Windows | [x86](https://aka.ms/dotnet-dump/win-x86) \| [x64](https://aka.ms/dotnet-dump/win-x64) \| [Arm](https://aka.ms/dotnet-dump/win-arm) \| [Arm-x64](https://aka.ms/dotnet-dump/win-arm64) | - | macOS | [x64](https://aka.ms/dotnet-dump/osx-x64) | | Linux | [x64](https://aka.ms/dotnet-dump/linux-x64) \| [Arm](https://aka.ms/dotnet-dump/linux-arm) \| [Arm64](https://aka.ms/dotnet-dump/linux-arm64) \| [musl-x64](https://aka.ms/dotnet-dump/linux-musl-x64) \| [musl-Arm64](https://aka.ms/dotnet-dump/linux-musl-arm64) | > [!NOTE] @@ -149,40 +148,85 @@ dotnet-dump analyze [-h|--help] [-c|--command] | Command | Function | |-----------------------------------------------------|-----------------------------------------------------------------------------------------------| -| `soshelp` or `help` | Displays all available commands | -| `soshelp ` or `help ` | Displays the specified command. | -| `exit` or `quit` | Exits interactive mode. | -| `clrstack ` | Provides a stack trace of managed code only. | -| `clrthreads ` | Lists the managed threads running. | -| `dumpasync ` | Displays information about async state machines on the garbage-collected heap. | -| `dumpassembly ` | Displays details about the assembly at the specified address. | -| `dumpclass ` | Displays information about the `EEClass` structure at the specified address. | -| `dumpdelegate ` | Displays information about the delegate at the specified address. | -| `dumpdomain ` | Displays information all the AppDomains and all assemblies within the specified domain. | -| `dumpheap ` | Displays info about the garbage-collected heap and collection statistics about objects. | -| `dumpil ` | Displays the Microsoft intermediate language (MSIL) that is associated with a managed method. | -| `dumplog ` | Writes the contents of an in-memory stress log to the specified file. | -| `dumpmd ` | Displays information about the `MethodDesc` structure at the specified address. | -| `dumpmodule ` | Displays information about the module at the specified address. | -| `dumpmt ` | Displays information about the `MethodTable` at the specified address. | -| `dumpobj ` | Displays info about the object at the specified address. | -| `dso ` or `dumpstackobjects ` | Displays all managed objects found within the bounds of the current stack. | -| `eeheap ` | Displays info about process memory consumed by internal runtime data structures. | -| `finalizequeue ` | Displays all objects registered for finalization. | -| `gcroot ` | Displays info about references (or roots) to the object at the specified address. | -| `gcwhere ` | Displays the location in the GC heap of the argument passed in. | -| `ip2md ` | Displays the `MethodDesc` structure at the specified address in JIT code. | -| `histclear ` | Releases any resources used by the family of `hist*` commands. | -| `histinit ` | Initializes the SOS structures from the stress log saved in the debuggee. | -| `histobj ` | Displays the garbage collection stress log relocations related to ``. | -| `histobjfind ` | Displays all the log entries that reference the object at the specified address. | -| `histroot ` | Displays information related to both promotions and relocations of the specified root. | -| `lm` or `modules` | Displays the native modules in the process. | -| `name2ee ` | Displays the `MethodTable` and `EEClass` structures for the ``. | -| `pe ` or `printexception ` | Displays any object derived from the class for the ``. | -| `setsymbolserver ` | Enables the symbol server support | -| `syncblk ` | Displays the SyncBlock holder info. | -| `threads ` or `setthread ` | Sets or displays the current thread ID for the SOS commands. | +| `analyzeoom` | Displays the info of the last OOM that occurred on an allocation request to the GC heap. +| `clrmodules` | Lists the managed modules in the process. +| `clrstack` | Provides a stack trace of managed code only. +| `clrthreads` | Lists the managed threads that are running. +| `clru` | Displays an annotated disassembly of a managed method. +| `d` or `readmemory` | Dumps memory contents. +| `dbgout` | Enables/disables (`-off`) internal SOS logging. +| `dso` | Displays all managed objects found within the bounds of the current stack. +| `dumpalc` | Displays details about a collectible AssemblyLoadContext to which the specified object is loaded. +| `dumparray` | Displays details about a managed array. +| `dumpasync` | Displays info about async state machines on the garbage-collected heap. +| `dumpassembly` | Displays details about an assembly. +| `dumpclass` | Displays information about the `EEClass` structure at the specified address. +| `dumpconcurrentdictionary` | Displays concurrent dictionary content. +| `dumpconcurrentqueue` | Displays concurrent queue content. +| `dumpdelegate` | Displays information about a delegate. +| `dumpdomain` | Displays information about the all assemblies within all the AppDomains or the specified one. +| `dumpgcdata` | Displays information about the GC data. +| `dumpgen` | Displays heap content for the specified generation. +| `dumpheap` | Displays info about the garbage-collected heap and collection statistics about objects. +| `dumpil` | Displays the Microsoft intermediate language (MSIL) that's associated with a managed method. +| `dumplog` | Writes the contents of an in-memory stress log to the specified file. +| `dumpmd` | Displays information about the `MethodDesc` structure at the specified address. +| `dumpmodule` | Displays information about the module at the specified address. +| `dumpmt` | Displays information about the method table at the specified address. +| `dumpobj` | Displays info the object at the specified address. +| `dumpruntimetypes` | Finds all System.RuntimeType objects in the GC heap and prints the type name and MethodTable they refer too. +| `dumpsig` | Dumps the signature of a method or field specified by ` `. +| `dumpsigelem` | Dumps a single element of a signature object. +| `dumpstack` | Displays a native and managed stack trace. +| `dumpstackobjects` | Displays all managed objects found within the bounds of the current stack. +| `dumpvc` | Displays info about the fields of a value class. +| `eeheap` | Displays info about process memory consumed by internal runtime data structures. +| `eestack` | Runs `dumpstack` on all threads in the process. +| `eeversion` | Displays information about the runtime and SOS versions. +| `ehinfo` | Displays the exception handling blocks in a JIT-ed method. +| `exit` or `quit` | Exits interactive mode. +| `finalizequeue` | Displays all objects registered for finalization. +| `findappdomain` | Attempts to resolve the AppDomain of a GC object. +| `gchandles` | Displays statistics about garbage collector handles in the process. +| `gcheapstat` | Displays statistics about garbage collector. +| `gcinfo` | Displays the JIT GC encoding for a method. +| `gcroot` | Displays info about references (or roots) to the object at the specified address. +| `gcwhere` | Displays the location in the GC heap of the specified address. +| `histclear` | Releases any resources used by the family of Hist commands. +| `histinit` | Initializes the SOS structures from the stress log saved in the debuggee. +| `histobj` | Examines all stress log relocation records and displays the chain of garbage collection relocations that may have led to the address passed in as an argument. +| `histobjfind` | Displays all the log entries that reference the object at the specified address. +| `histroot` | Displays information related to both promotions and relocations of the specified root. +| `histstats` | Displays stress log stats. +| `ip2md` | Displays the `MethodDesc` structure at the specified address in code that has been JIT-compiled. +| `listnearobj` | Displays the object preceding and succeeding the specified address. +| `logopen` | Enables console file logging. +| `logclose` | Disables console file logging. +| `logging` | Enables/disables internal SOS logging. +| `lm` or `modules` | Displays the native modules in the process. +| `name2ee` | Displays the `MethodTable` and `EEClass` structures for the specified type or method in the specified module. +| `objsize` | Displays the size of the specified object. +| `parallelstacks` | Displays the merged threads stack similarly to the Visual Studio 'Parallel Stacks' panel. +| `pathto` | Displays the GC path from `` to ``. +| `pe` or `printexception` | Displays and formats fields of any object derived from the class at the specified address. +| `r` or `registers` | Displays the thread's registers. +| `runtimes` | Lists the runtimes in the target or changes the default runtime. +| `setclrpath` | Sets the path to load coreclr dac/dbi files using `setclrpath `. +| `setsymbolserver` | Enables the symbol server support. +| `sos` | Executes various coreclr debugging commands. Use the syntax `sos `. For more information, see 'soshelp'. +| `soshelp` or `help` | Displays all available commands. +| `soshelp ` or `help ` | Displays the specified command. +| `syncblk` | Displays the SyncBlock holder info. +| `taskstate` | Displays a Task state in a human readable format. +| `threadpool` | Displays info about the runtime thread pool. +| `threadpoolqueue` | Displays queued thread pool work items. +| `threadstate` | Pretty prints the meaning of a threads state. +| `threads ` or `setthread ` | Sets or displays the current thread ID for the SOS commands. +| `timerinfo` | Displays information about running timers. +| `token2ee` | Displays the MethodTable structure and MethodDesc structure for the specified token and module. +| `traverseheap` | Writes out heap information to a file in a format understood by the CLR Profiler. +| `verifyheap` | Checks the GC heap for signs of corruption. +| `verifyobj` | Checks the object that is passed as an argument for signs of corruption. > [!NOTE] > Additional details can be found in [SOS Debugging Extension for .NET](sos-debugging-extension.md). diff --git a/docs/core/diagnostics/dotnet-gcdump.md b/docs/core/diagnostics/dotnet-gcdump.md index df8ea4e5a342f..b9361a0fda86b 100644 --- a/docs/core/diagnostics/dotnet-gcdump.md +++ b/docs/core/diagnostics/dotnet-gcdump.md @@ -27,7 +27,6 @@ There are two ways to download and install `dotnet-gcdump`: | OS | Platform | | --- | -------- | | Windows | [x86](https://aka.ms/dotnet-gcdump/win-x86) \| [x64](https://aka.ms/dotnet-gcdump/win-x64) \| [Arm](https://aka.ms/dotnet-gcdump/win-arm) \| [Arm-x64](https://aka.ms/dotnet-gcdump/win-arm64) | - | macOS | [x64](https://aka.ms/dotnet-gcdump/osx-x64) | | Linux | [x64](https://aka.ms/dotnet-gcdump/linux-x64) \| [Arm](https://aka.ms/dotnet-gcdump/linux-arm) \| [Arm64](https://aka.ms/dotnet-gcdump/linux-arm64) \| [musl-x64](https://aka.ms/dotnet-gcdump/linux-musl-x64) \| [musl-Arm64](https://aka.ms/dotnet-gcdump/linux-musl-arm64) | > [!NOTE] diff --git a/docs/core/diagnostics/dotnet-sos.md b/docs/core/diagnostics/dotnet-sos.md index 2dcfdca689476..b8aacd789c2c1 100644 --- a/docs/core/diagnostics/dotnet-sos.md +++ b/docs/core/diagnostics/dotnet-sos.md @@ -27,7 +27,6 @@ There are two ways to download and install `dotnet-sos`: | OS | Platform | | --- | -------- | | Windows | [x86](https://aka.ms/dotnet-sos/win-x86) \| [x64](https://aka.ms/dotnet-sos/win-x64) \| [Arm](https://aka.ms/dotnet-sos/win-arm) \| [Arm-x64](https://aka.ms/dotnet-sos/win-arm64) | - | macOS | [x64](https://aka.ms/dotnet-sos/osx-x64) | | Linux | [x64](https://aka.ms/dotnet-sos/linux-x64) \| [Arm](https://aka.ms/dotnet-sos/linux-arm) \| [Arm64](https://aka.ms/dotnet-sos/linux-arm64) \| [musl-x64](https://aka.ms/dotnet-sos/linux-musl-x64) \| [musl-Arm64](https://aka.ms/dotnet-sos/linux-musl-arm64) | ## Synopsis diff --git a/docs/core/diagnostics/dotnet-stack.md b/docs/core/diagnostics/dotnet-stack.md index 2f2e028b785c9..1e99b631ec50b 100644 --- a/docs/core/diagnostics/dotnet-stack.md +++ b/docs/core/diagnostics/dotnet-stack.md @@ -26,7 +26,6 @@ There are two ways to download and install `dotnet-stack`: | OS | Platform | | --- | -------- | | Windows | [x86](https://aka.ms/dotnet-stack/win-x86) \| [x64](https://aka.ms/dotnet-stack/win-x64) \| [Arm](https://aka.ms/dotnet-stack/win-arm) \| [Arm-x64](https://aka.ms/dotnet-stack/win-arm64) | - | macOS | [x64](https://aka.ms/dotnet-stack/osx-x64) | | Linux | [x64](https://aka.ms/dotnet-stack/linux-x64) \| [Arm](https://aka.ms/dotnet-stack/linux-arm) \| [Arm64](https://aka.ms/dotnet-stack/linux-arm64) \| [musl-x64](https://aka.ms/dotnet-stack/linux-musl-x64) \| [musl-Arm64](https://aka.ms/dotnet-stack/linux-musl-arm64) | ## Synopsis diff --git a/docs/core/diagnostics/dotnet-trace.md b/docs/core/diagnostics/dotnet-trace.md index 83d7dea373533..e04917e3afd76 100644 --- a/docs/core/diagnostics/dotnet-trace.md +++ b/docs/core/diagnostics/dotnet-trace.md @@ -27,7 +27,6 @@ There are two ways to download and install `dotnet-trace`: | OS | Platform | | --- | -------- | | Windows | [x86](https://aka.ms/dotnet-trace/win-x86) \| [x64](https://aka.ms/dotnet-trace/win-x64) \| [Arm](https://aka.ms/dotnet-trace/win-arm) \| [Arm-x64](https://aka.ms/dotnet-trace/win-arm64) | - | macOS | [x64](https://aka.ms/dotnet-trace/osx-x64) | | Linux | [x64](https://aka.ms/dotnet-trace/linux-x64) \| [Arm](https://aka.ms/dotnet-trace/linux-arm) \| [Arm64](https://aka.ms/dotnet-trace/linux-arm64) \| [musl-x64](https://aka.ms/dotnet-trace/linux-musl-x64) \| [musl-Arm64](https://aka.ms/dotnet-trace/linux-musl-arm64) | > [!NOTE] @@ -211,7 +210,7 @@ dotnet-trace collect [--buffersize ] [--clreventlevel ] [-- > - If you see an error message similar to: `[ERROR] System.ComponentModel.Win32Exception (299): A 32 bit processes cannot access modules of a 64 bit process.`, you are trying to use a version of `dotnet-trace` that has mismatched bitness against the target process. Make sure to download the correct bitness of the tool in the [install](#install) link. -> - If you experience an unhandled exception while running `dotnet-trace collect`, this results in an incomplete trace. If finding the root cause of the exception is your priority, navigate to [Collect dumps on crash](dumps.md#collect-dumps-on-crash). As a result of the unhandled exception, the trace is truncated when the runtime shuts down to prevent other undesired behavior such as a hang or data corruption. Even though the trace is incomplete, you can still open it to see what happened leading up to the failure. However, it will be missing Rundown information (this happens at the end of a trace) so stacks might be unresolved (depending on what providers were turned on). Open the trace by executing PerfView with the `/ContinueOnError` flag at the command line. The logs will also contain the location the exception was fired. +> - If you experience an unhandled exception while running `dotnet-trace collect`, this results in an incomplete trace. If finding the root cause of the exception is your priority, navigate to [Collect dumps on crash](collect-dumps-crash.md). As a result of the unhandled exception, the trace is truncated when the runtime shuts down to prevent other undesired behavior such as a hang or data corruption. Even though the trace is incomplete, you can still open it to see what happened leading up to the failure. However, it will be missing Rundown information (this happens at the end of a trace) so stacks might be unresolved (depending on what providers were turned on). Open the trace by executing PerfView with the `/ContinueOnError` flag at the command line. The logs will also contain the location the exception was fired. ## dotnet-trace convert diff --git a/docs/core/diagnostics/dumps.md b/docs/core/diagnostics/dumps.md index 579f9c8ada3c5..7129c7ac7e55c 100644 --- a/docs/core/diagnostics/dumps.md +++ b/docs/core/diagnostics/dumps.md @@ -1,16 +1,16 @@ --- title: Dumps - .NET description: An introduction to dumps in .NET. -ms.date: 10/31/2022 +ms.date: 01/11/2023 --- # Dumps -A dump is a file that contains a snapshot of the process at the time it was created and can be useful for examining the state of your application. Dumps can be used to debug your .NET application when it is difficult to attach a debugger to it such as production or CI environments. Using dumps allows you to capture the state of the problematic process and examine it without having to stop the application. +A dump is a file that contains a snapshot of the process at the time the dump was created and can be useful for examining the state of your application. Dumps can be used to debug your .NET application when it is difficult to attach a debugger to it, such as production or CI environments. Using dumps allows you to capture the state of the problematic process and examine it without having to stop the application. ## Collect dumps -Dumps can be collected in a variety of ways depending on which platform you are running your app on. +Dumps can be collected in a variety of ways depending on which platform your app is running on. > [!NOTE] > Dumps may contain sensitive information because they can contain the full memory of the running process. Handle them with any security restrictions and guidances in mind. @@ -18,62 +18,29 @@ Dumps can be collected in a variety of ways depending on which platform you are > [!TIP] > For frequently asked questions about dump collection, analysis, and other caveats, see [Dumps: FAQ](faq-dumps.yml). -### Collect dumps on crash +* You can use environment variables to configure your application to [collect a dump on a crash](collect-dumps-crash.md). -You can use environment variables to configure your application to collect a dump upon a crash. This is helpful when you want to get an understanding of why a crash happened. For example, capturing a dump when an exception is thrown helps you identify an issue by examining the state of the app when it crashed. +* You may want to collect a dump when the app hasn't crashed yet. For example, if you want to examine the state of an application that seems to be in a deadlock, configuring the environment variables to collect dumps on crash will not be helpful because the app is still running. -The following table shows the environment variables you can configure for collecting dumps on a crash. +* [dotnet-dump](dotnet-dump.md) is a simple cross-platform command line tool to collect a dump. Several other debugger tools such as [Visual Studio](/visualstudio/debugger/using-dump-files) or [windbg](/windows-hardware/drivers/debugger/-dump--create-dump-file-) also have dump collection features. -|Environment variable|Description|Default value| -|-------|---------|---| -|`COMPlus_DbgEnableMiniDump` or `DOTNET_DbgEnableMiniDump`|If set to 1, enable core dump generation.|0| -|`COMPlus_DbgMiniDumpType` or `DOTNET_DbgMiniDumpType`|Type of dump to be collected. For more information, see the table below|2 (`MiniDumpWithPrivateReadWriteMemory`)| -|`COMPlus_DbgMiniDumpName` or `DOTNET_DbgMiniDumpName`|Path to a file to write the dump to. Ensure that the user under which the dotnet process is running has write permissions to the specified directory.|`/tmp/coredump.`| -|`COMPlus_CreateDumpDiagnostics` or `DOTNET_CreateDumpDiagnostics`|If set to 1, enables diagnostic logging of dump process.|0| -|`COMPlus_EnableCrashReport` or `DOTNET_EnableCrashReport`|(Requires .NET 6 or later, not supported on Windows) If set to 1, the runtime generates a JSON-formatted crash report that includes information about the threads and stack frames of the crashing application. The crash report name is the dump path or name with *.crashreport.json* appended. -|`COMPlus_CreateDumpVerboseDiagnostics` or `DOTNET_CreateDumpVerboseDiagnostics`|(Requires .NET 7 or later) If set to 1, enables verbose diagnostic logging of the dump process.|0| -|`COMPlus_CreateDumpLogToFile` or `DOTNET_CreateDumpLogToFile`|(Requires .NET 7 or later) The path of the file to which the diagnostic messages should be written. If unset, the diagnostic messages are written to the console of the crashing application.| +* If you are running your app in production or you are running it in a distributed manner (several services, replicas), [dotnet-monitor](dotnet-monitor.md) provides support for many common scenarios and ad-hoc diagnostic investigations, including dump collection and egress. It enables dumps to be collected remotely or with triggering conditions. -> [!NOTE] -> .NET 7 standardizes on the prefix `DOTNET_` instead of `COMPlus_` for these environment variables. However, the `COMPlus_` prefix will continue to work. If you're using a previous version of the .NET runtime, you should still use the `COMPlus_` prefix for environment variables. - -Starting in .NET 5, `DOTNET_MiniDumpName` may also include formatting template specifiers that will be filled in dynamically: - -|Specifier|Value| -|---------|-----| -|%%|A single % character| -|%p|PID of dumped process| -|%e|The process executable filename| -|%h|Host name return by `gethostname()`| -|%t|Time of dump, expressed as seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)| - -The following table shows all the values you can use for `DOTNET_DbgMiniDumpType`. For example, setting `DOTNET_DbgMiniDumpType` to 1 means `MiniDumpNormal` type dump will be collected on a crash. - -|Value|Name|Description| -|-----|----|-----------| -|1|`Mini`|A small dump containing module lists, thread lists, exception information, and all stacks.| -|2|`Heap`|A large and relatively comprehensive dump containing module lists, thread lists, all stacks, exception information, handle information, and all memory except for mapped images.| -|3|`Triage`|Same as `Mini`, but removes personal user information, such as paths and passwords.| -|4|`Full`|The largest dump containing all memory including the module images.| - -### Collect dumps at a specific point in time +## Analyze dumps -You may want to collect a dump when the app hasn't crashed yet. For example, if you want to examine the state of an application that seems to be in a deadlock, configuring the environment variables to collect dumps on crash will not be helpful because the app is still running. +* Navigate to [Debug Linux dumps](debug-linux-dumps.md) for information regarding analyzing dumps collected on Linux. -To collect dump at your own request, you can use `dotnet-dump`, which is a CLI tool for collecting and analyzing dumps. For more information on how to use it to collect dumps with `dotnet-dump`, see [Dump collection and analysis utility](dotnet-dump.md). +* Navigate to [Debug Windows Dumps](debug-windows-dumps.md) for information regarding analyzing dumps collected on Windows. -## Analyze dumps +### Memory Analysis -You can analyze dumps using the [`dotnet-dump`](dotnet-dump.md) CLI tool or with [Visual Studio](/visualstudio/debugger/using-dump-files). +You can perform memory analysis on your application if your app's memory continues to grow, but you are unsure why that is the case. [debug memory leak tutorial](debug-memory-leak.md) shows how to debug a memory leak using the dotnet CLI tools with the dotnet-sos commands dumpheap and gcroot. -> [!NOTE] -> Visual Studio version 16.8 and later allows you to [open Linux dumps](https://devblogs.microsoft.com/visualstudio/linux-managed-memory-dump-debugging/) generated on .NET Core 3.1.7 or later. -> [!NOTE] -> If native debugging is necessary, the [SOS debugger extension](sos-debugging-extension.md) can be used with [LLDB on Linux and macOS](debug-linux-dumps.md#analyze-dumps-on-linux). SOS is also supported with [Windbg/cdb](/windows-hardware/drivers/debugger/debugger-download-tools) on Windows, although Visual Studio is recommended. +[Visual Studio Memory Analysis](/visualstudio/profiling/analyze-memory-usage) can be used to diagnose a memory leak on Windows. ## See also -Learn more about how you can leverage dumps to help diagnosing problems in your .NET application. +Learn more about how you can leverage dumps to help diagnose problems in your .NET application. * [Debug Linux dumps](debug-linux-dumps.md) tutorial walks you through how to debug a dump that was collected in Linux. diff --git a/docs/core/diagnostics/metrics-collection.md b/docs/core/diagnostics/metrics-collection.md index 5914441fb4d6b..5ac2b6bca6d62 100644 --- a/docs/core/diagnostics/metrics-collection.md +++ b/docs/core/diagnostics/metrics-collection.md @@ -168,7 +168,7 @@ dotnet add package OpenTelemetry.Exporter.Prometheus --version 1.2.0-beta1 > to the application. > [!NOTE] -> This tutorial is using a pre-release build of OpenTelemetry's Prometheus support available at the time of writing. The OpenTelemetry +> This tutorial uses a pre-release build of OpenTelemetry's Prometheus support available at the time of writing. The OpenTelemetry > project maintainers might make changes prior to the official release. Modify the code of `Program.cs` so that it contains the extra code to configure OpenTelemetry at the beginning of Main(): diff --git a/docs/core/diagnostics/snippets/Microsoft.Diagnostics.NETCore.Client/csharp/Microsoft.Diagnostics.NETCore.Client.Samples.csproj b/docs/core/diagnostics/snippets/Microsoft.Diagnostics.NETCore.Client/csharp/Microsoft.Diagnostics.NETCore.Client.Samples.csproj index 65e807d9d987f..74557808181b5 100644 --- a/docs/core/diagnostics/snippets/Microsoft.Diagnostics.NETCore.Client/csharp/Microsoft.Diagnostics.NETCore.Client.Samples.csproj +++ b/docs/core/diagnostics/snippets/Microsoft.Diagnostics.NETCore.Client/csharp/Microsoft.Diagnostics.NETCore.Client.Samples.csproj @@ -6,8 +6,8 @@
- - + + diff --git a/docs/core/diagnostics/snippets/diagnosticsource/csharp/Program.cs b/docs/core/diagnostics/snippets/diagnosticsource/csharp/Program.cs index b5ad47fdb6fe3..b03652aca97ac 100644 --- a/docs/core/diagnostics/snippets/diagnosticsource/csharp/Program.cs +++ b/docs/core/diagnostics/snippets/diagnosticsource/csharp/Program.cs @@ -3,29 +3,29 @@ MyListener TheListener = new MyListener(); TheListener.Listening(); HTTPClient Client = new HTTPClient(); -Client.SendWebRequest("https://docs.microsoft.com/dotnet/core/diagnostics/"); +Client.SendWebRequest("https://learn.microsoft.com/dotnet/core/diagnostics/"); -// +// class HTTPClient { - // + // private static DiagnosticSource httpLogger = new DiagnosticListener("System.Net.Http"); - // + // public byte[] SendWebRequest(string url) { - // + // if (httpLogger.IsEnabled("RequestStart")) { httpLogger.Write("RequestStart", new { Url = url }); } - // + // //Pretend this sends an HTTP request to the url and gets back a reply. byte[] reply = new byte[] { }; return reply; } } -// -// +// +// class Observer : IObserver { public Observer(Action onNext, Action onCompleted) @@ -41,7 +41,7 @@ public void OnError(Exception error) { } } class MyListener { - // + // IDisposable networkSubscription; IDisposable listenerSubscription; private readonly object allListeners = new(); @@ -54,7 +54,7 @@ public void Listening() Action onNewListener = delegate (DiagnosticListener listener) { Console.WriteLine($"New Listener discovered: {listener.Name}"); - //Suscribe to the specific DiagnosticListener of interest. + //Subscribe to the specific DiagnosticListener of interest. if (listener.Name == "System.Net.Http") { //Use lock to ensure the callback code is thread safe. @@ -75,10 +75,10 @@ public void Listening() //When a listener is created, invoke the onNext function which calls the delegate. listenerSubscription = DiagnosticListener.AllListeners.Subscribe(observer); } - // + // // Typically you leave the listenerSubscription subscription active forever. // However when you no longer want your callback to be called, you can // call listenerSubscription.Dispose() to cancel your subscription to the IObservable. } -// +// // diff --git a/docs/core/diagnostics/sos-debugging-extension.md b/docs/core/diagnostics/sos-debugging-extension.md index bc9faae087b49..760299b72c192 100644 --- a/docs/core/diagnostics/sos-debugging-extension.md +++ b/docs/core/diagnostics/sos-debugging-extension.md @@ -117,45 +117,88 @@ Windbg should load the SOS extension automatically whenever the process being de For instructions on configuring SOS for LLDB, see [dotnet-sos](dotnet-sos.md). SOS commands can be used on live processes or dumps. -By default you can reach all the SOS commands by entering: `sos [command\_name]`. However, the common commands have been aliased so that you don't need the `sos` prefix: +By default you can reach all the SOS commands by entering: `sos [command_name]`. However, the common commands have been aliased so that you don't need the `sos` prefix: | Command | Function | ------------------------------------- | --------------------------------------------------------------------------------------------- +| `analyzeoom` | Displays the info of the last OOM that occurred on an allocation request to the GC heap. | `bpmd` | Creates a breakpoint at the specified managed method in the specified module. +| `clrmodules` | Lists the managed modules in the process. | `clrstack` | Provides a stack trace of managed code only. -| `clrthreads` | List the managed threads that are running. +| `clrthreads` | Lists the managed threads that are running. | `clru` | Displays an annotated disassembly of a managed method. +| `dbgout` | Enables/disables (`-off`) internal SOS logging. | `dso` | Displays all managed objects found within the bounds of the current stack. +| `dumpalc` | Displays details about a collectible AssemblyLoadContext to which the specified object is loaded. +| `dumparray` | Displays details about a managed array. | `dumpasync` | Displays info about async state machines on the garbage-collected heap. +| `dumpassembly` | Displays details about an assembly. | `dumpclass` | Displays information about the `EEClass` structure at the specified address. -| `dumpdomain` | Displays information all the AppDomains and all assemblies within the specified domain. +| `dumpconcurrentdictionary` | Displays concurrent dictionary content. +| `dumpconcurrentqueue` | Displays concurrent queue content. +| `dumpdelegate` | Displays information about a delegate. +| `dumpdomain` | Displays information about the all assemblies within all the AppDomains or the specified one. +| `dumpgcdata` | Displays information about the GC data. +| `dumpgen` | Displays heap content for the specified generation. | `dumpheap` | Displays info about the garbage-collected heap and collection statistics about objects. -| `dumpil` | Displays the Microsoft intermediate language (MSIL) that is associated with a managed method. +| `dumpil` | Displays the Microsoft intermediate language (MSIL) that's associated with a managed method. | `dumplog` | Writes the contents of an in-memory stress log to the specified file. | `dumpmd` | Displays information about the `MethodDesc` structure at the specified address. | `dumpmodule` | Displays information about the module at the specified address. | `dumpmt` | Displays information about the method table at the specified address. | `dumpobj` | Displays info the object at the specified address. +| `dumpruntimetypes` | Finds all System.RuntimeType objects in the GC heap and prints the type name and MethodTable they refer too. +| `dumpsig` | Dumps the signature of a method or field specified by ` `. +| `dumpsigelem` | Dumps a single element of a signature object. | `dumpstack` | Displays a native and managed stack trace. +| `dumpstackobjects` | Displays all managed objects found within the bounds of the current stack. +| `dumpvc` | Displays info about the fields of a value class. | `eeheap` | Displays info about process memory consumed by internal runtime data structures. | `eestack` | Runs `dumpstack` on all threads in the process. +| `eeversion` | Displays information about the runtime and SOS versions. +| `ehinfo` | Displays the exception handling blocks in a JIT-ed method. +| `finalizequeue` | Displays all objects registered for finalization. +| `findappdomain` | Attempts to resolve the AppDomain of a GC object. +| `findroots` | Finds and displays object roots across GC collections. +| `gchandles` | Displays statistics about garbage collector handles in the process. +| `gcheapstat` | Displays statistics about garbage collector. +| `gcinfo` | Displays the JIT GC encoding for a method. | `gcroot` | Displays info about references (or roots) to the object at the specified address. +| `gcwhere` | Displays the location in the GC heap of the specified address. | `histclear` | Releases any resources used by the family of Hist commands. | `histinit` | Initializes the SOS structures from the stress log saved in the debuggee. | `histobj` | Examines all stress log relocation records and displays the chain of garbage collection relocations that may have led to the address passed in as an argument. | `histobjfind` | Displays all the log entries that reference the object at the specified address. | `histroot` | Displays information related to both promotions and relocations of the specified root. +| `histstats` | Displays stress log stats. | `ip2md` | Displays the `MethodDesc` structure at the specified address in code that has been JIT-compiled. -| `loadsymbols` | Load the .NET Core native module symbols. +| `listnearobj` | Displays the object preceding and succeeding the specified address. +| `loadsymbols` | Loads the .NET Core native module symbols. +| `logging` | Enables/disables internal SOS logging. | `name2ee` | Displays the `MethodTable` and `EEClass` structures for the specified type or method in the specified module. +| `objsize` | Displays the size of the specified object. +| `parallelstacks` | Displays the merged threads stack similarly to the Visual Studio 'Parallel Stacks' panel. +| `pathto` | Displays the GC path from `` to ``. | `pe` | Displays and formats fields of any object derived from the class at the specified address. -| `setclrpath` | Sets the path to load coreclr dac/dbi files. `setclrpath ` +| `printexception` | Displays and formats fields of any object derived from the class at the specified address. +| `runtimes` | Lists the runtimes in the target or change the default runtime. +| `stoponcatch` | Target process will break the next time a managed exception is caught during execution. +| `setclrpath` | Sets the path to load coreclr dac/dbi files. `setclrpath `. | `sethostruntime` | Sets or displays the .NET Core runtime directory to use to run managed code in SOS. | `setsymbolserver` | Enables the symbol server support. -| `setsostid` | Sets the current OS tid/thread index instead of using the one lldb provides. `setsostid ` -| `sos` | Various coreclr debugging commands. For more information, see 'soshelp'. `sos ` -| `soshelp` | Displays all available commands when no parameter is specified, or displays detailed help information about the specified command: `soshelp ` +| `setsostid` | Sets the current OS tid/thread index instead of using the one lldb provides. `setsostid `. +| `sos` | Executes various coreclr debugging commands. Use the syntax `sos `. For more information, see 'soshelp'. +| `soshelp` | Displays all available commands when no parameter is specified, or displays detailed help information about the specified command: `soshelp `. | `syncblk` | Displays the SyncBlock holder info. +| `taskstate` | Displays a Task state in a human readable format. +| `threadpool` | Displays info about the runtime thread pool. +| `threadpoolqueue` | Displays queued thread pool work items. +| `threadstate` | Pretty prints the meaning of a threads state. +| `timerinfo` | Displays information about running timers. +| `token2ee` | Displays the MethodTable structure and MethodDesc structure for the specified token and module. +| `traverseheap` | Writes out heap information to a file in a format understood by the CLR Profiler. +| `verifyheap` | Checks the GC heap for signs of corruption. +| `verifyobj` | Checks the object that is passed as an argument for signs of corruption. ## Windbg/cdb example usage @@ -180,19 +223,19 @@ By default you can reach all the SOS commands by entering: `sos [command\_name]` | Command | Description | - | - -| `sos DumpArray -start 2 -length 5 -detail 00ad28d0` | Displays the contents of an array at the address `00ad28d0`. The display starts from the second element and continues for five elements. -| `sos DumpAssembly 1ca248` | Displays the contents of an assembly at the address `1ca248`. +| `dumparray -start 2 -length 5 -detail 00ad28d0` | Displays the contents of an array at the address `00ad28d0`. The display starts from the second element and continues for five elements. +| `dumpassembly 1ca248` | Displays the contents of an assembly at the address `1ca248`. | `dumpheap` | Displays information about the garbage collector heap. | `dumplog` | Writes the contents of the in-memory stress log to a (default) file called StressLog.txt in the current directory. | `dumpmd 902f40` | Displays the `MethodDesc` structure at the address `902f40`. | `dumpmodule 1caa50` | Displays information about a module at the address `1caa50`. | `dumpobj a79d40` | Displays information about an object at the address `a79d40`. -| `sos DumpVC 0090320c 00a79d9c` | Displays the fields of a value class at the address `00a79d9c` using the method table at the address `0090320c`. +| `dumpvc 0090320c 00a79d9c` | Displays the fields of a value class at the address `00a79d9c` using the method table at the address `0090320c`. | `eeheap -gc` | Displays the process memory used by the garbage collector. -| `sos FindAppDomain 00a79d98` | Determines the application domain of an object at the address `00a79d98`. -| `sos GCInfo 5b68dbb8` | Displays all garbage collector handles in the current process. +| `findappdomain 00a79d98` | Determines the application domain of an object at the address `00a79d98`. +| `gcinfo 5b68dbb8` | Displays all garbage collector handles in the current process. | `name2ee unittest.exe MainClass.Main` | Displays the `MethodTable` and `EEClass` structures for the `Main` method in the class `MainClass` in the module `unittest.exe`. -| `sos Token2EE unittest.exe 02000003` | Displays information about the metadata token at the address `02000003` in the module `unittest.exe`. +| `token2ee unittest.exe 02000003` | Displays information about the metadata token at the address `02000003` in the module `unittest.exe`. | `clrthreads` | Displays the managed threads. ## See also diff --git a/docs/core/diagnostics/well-known-event-providers.md b/docs/core/diagnostics/well-known-event-providers.md index b449ee2e3b721..a29faf9b72606 100644 --- a/docs/core/diagnostics/well-known-event-providers.md +++ b/docs/core/diagnostics/well-known-event-providers.md @@ -17,7 +17,7 @@ This provider emits various events from the .NET runtime, including GC, loader, ### "Microsoft-DotNETCore-SampleProfiler" provider -This provider is a .NET runtime event provider that is used for CPU sampling for managed callstacks. When enabled, it captures a snapshot of each thread's managed callstack every 10 milliseconds. To enable this capture, you must specify an of `Informational` or higher. +This provider is a .NET runtime event provider that is used for CPU sampling for managed callstacks. When enabled, it captures a snapshot of each thread's managed callstack every millisecond. To enable this capture, you must specify an of `Informational` or higher. ## Framework libraries diff --git a/docs/core/docker/build-container.md b/docs/core/docker/build-container.md index d65ed2a2f5b92..f678c043868e8 100644 --- a/docs/core/docker/build-container.md +++ b/docs/core/docker/build-container.md @@ -1,7 +1,7 @@ --- title: Containerize an app with Docker tutorial description: In this tutorial, you'll learn how to containerize a .NET application with Docker. -ms.date: 11/14/2022 +ms.date: 03/17/2023 ms.topic: tutorial ms.custom: "mvc" #Customer intent: As a developer, I want to containerize my .NET app so that I can deploy it to the cloud. @@ -60,6 +60,7 @@ Your folder tree will look like the following: The `dotnet new` command creates a new folder named *App* and generates a "Hello World" console application. Change directories and navigate into the *App* folder, from your terminal session. Use the `dotnet run` command to start the app. The application will run, and print `Hello World!` below the command: ```dotnetcli +cd App dotnet run Hello World! ``` @@ -109,24 +110,24 @@ Before adding the .NET app to the Docker image, first it must be published. It i dotnet publish -c Release ``` -This command compiles your app to the *publish* folder. The path to the *publish* folder from the working folder should be `.\App\bin\Release\net6.0\publish\` +This command compiles your app to the *publish* folder. The path to the *publish* folder from the working folder should be `.\App\bin\Release\net7.0\publish\` #### [Windows](#tab/windows) From the *App* folder, get a directory listing of the publish folder to verify that the *DotNet.Docker.dll* file was created. ```powershell -dir .\bin\Release\net6.0\publish\ +dir .\bin\Release\net7.0\publish\ - Directory: C:\Users\dapine\App\bin\Release\net6.0\publish + Directory: C:\Users\dapine\App\bin\Release\net7.0\publish Mode LastWriteTime Length Name ---- ------------- ------ ---- --a--- 3/8/2022 10:43 AM 431 DotNet.Docker.deps.json --a--- 3/8/2022 10:43 AM 6144 DotNet.Docker.dll --a--- 3/8/2022 10:43 AM 149504 DotNet.Docker.exe --a--- 3/8/2022 10:43 AM 10516 DotNet.Docker.pdb --a--- 3/8/2022 10:43 AM 253 DotNet.Docker.runtimeconfig.json +-a--- 2/13/2023 1:52 PM 431 DotNet.Docker.deps.json +-a--- 2/13/2023 1:52 PM 6144 DotNet.Docker.dll +-a--- 2/13/2023 1:52 PM 153600 DotNet.Docker.exe +-a--- 2/13/2023 1:52 PM 11052 DotNet.Docker.pdb +-a--- 2/13/2023 1:52 PM 253 DotNet.Docker.runtimeconfig.json ``` #### [Linux](#tab/linux) @@ -134,7 +135,7 @@ Mode LastWriteTime Length Name Use the `ls` command to get a directory listing and verify that the *DotNet.Docker.dll* file was created. ```bash -me@DESKTOP:/docker-working/app$ ls bin/Release/net6.0/publish +me@DESKTOP:/docker-working/app$ ls bin/Release/net7.0/publish DotNet.Docker.deps.json DotNet.Docker.dll DotNet.Docker.exe DotNet.Docker.pdb DotNet.Docker.runtimeconfig.json ``` @@ -149,12 +150,12 @@ Create a file named *Dockerfile* in the directory containing the *.csproj* and o :::code language="docker" source="snippets/App/Dockerfile"::: > [!NOTE] -> The ASP.NET Core runtime image is used intentionally here, although the `mcr.microsoft.com/dotnet/runtime:6.0` image could have been used. +> The ASP.NET Core runtime image is used intentionally here, although the `mcr.microsoft.com/dotnet/runtime:7.0` image could have been used. > [!TIP] > This _Dockerfile_ uses multi-stage builds, which optimizes the final size of the image by layering the build and leaving only required artifacts. For more information, see [Docker Docs: multi-stage builds](https://docs.docker.com/build/building/multi-stage/). -The `FROM` keyword requires a fully qualified Docker container image name. The Microsoft Container Registry (MCR, mcr.microsoft.com) is a syndicate of Docker Hub — which hosts publicly accessible containers. The `dotnet` segment is the container repository, whereas the `sdk` or `aspnet` segment is the container image name. The image is tagged with `6.0`, which is used for versioning. Thus, `mcr.microsoft.com/dotnet/aspnet:6.0` is the .NET 6.0 runtime. Make sure that you pull the runtime version that matches the runtime targeted by your SDK. For example, the app created in the previous section used the .NET 6.0 SDK and the base image referred to in the *Dockerfile* is tagged with **6.0**. +The `FROM` keyword requires a fully qualified Docker container image name. The Microsoft Container Registry (MCR, mcr.microsoft.com) is a syndicate of Docker Hub — which hosts publicly accessible containers. The `dotnet` segment is the container repository, whereas the `sdk` or `aspnet` segment is the container image name. The image is tagged with `7.0`, which is used for versioning. Thus, `mcr.microsoft.com/dotnet/aspnet:7.0` is the .NET 7.0 runtime. Make sure that you pull the runtime version that matches the runtime targeted by your SDK. For example, the app created in the previous section used the .NET 7.0 SDK and the base image referred to in the *Dockerfile* is tagged with **7.0**. Save the *Dockerfile* file. The directory structure of the working folder should look like the following. Some of the deeper-level files and folders have been omitted to save space in the article: @@ -166,7 +167,7 @@ Save the *Dockerfile* file. The directory structure of the working folder should ├── Program.cs ├──📂 bin │ └──📂 Release - │ └──📂 net6.0 + │ └──📂 net7.0 │ └──📂 publish │ ├── DotNet.Docker.deps.json │ ├── DotNet.Docker.exe @@ -194,13 +195,13 @@ counter-image latest 2f15637dc1f6 10 minutes ago 208 The `counter-image` repository is the name of the image. The `latest` tag is the tag that is used to identify the image. The `2f15637dc1f6` is the image ID. The `10 minutes ago` is the time the image was created. The `208MB` is the size of the image. The final steps of the _Dockerfile_ are to create a container from the image and run the app, copy the published app to the container, and define the entry point. ```dockerfile -FROM mcr.microsoft.com/dotnet/aspnet:6.0 +FROM mcr.microsoft.com/dotnet/aspnet:7.0 WORKDIR /App -COPY --from=build-env /App/out . +COPY --from=build-env /build/out . ENTRYPOINT ["dotnet", "DotNet.Docker.dll"] ``` -The `COPY` command tells Docker to copy the specified folder on your computer to a folder in the container. In this example, the *publish* folder is copied to a folder named *App* in the container. +The `COPY` command tells Docker to copy the specified folder on your computer to a folder in the container. In this example, the *publish* folder is copied to a folder named *build* in the container. The `WORKDIR` command changes the **current directory** inside of the container to *App*. @@ -221,31 +222,31 @@ From your terminal, run `docker build -t counter-image -f Dockerfile .` and when ```console docker build -t counter-image -f Dockerfile . -[+] Building 3.1s (14/14) FINISHED - => [internal] load build definition from Dockerfile 0.5s - => => transferring dockerfile: 32B 0.0s - => [internal] load .dockerignore 0.6s - => => transferring context: 2B 0.0s - => [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0 0.8s - => [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0 1.1s - => [stage-1 1/3] FROM mcr.microsoft.com/dotnet/aspnet:6.0@sha256:f1539d71 0.0s - => [internal] load build context 0.4s - => => transferring context: 4.00kB 0.1s - => [build-env 1/5] FROM mcr.microsoft.com/dotnet/sdk:6.0@sha256:16e355af1 0.0s - => CACHED [stage-1 2/3] WORKDIR /App 0.0s - => CACHED [build-env 2/5] WORKDIR /App 0.0s - => CACHED [build-env 3/5] COPY . ./ 0.0s - => CACHED [build-env 4/5] RUN dotnet restore 0.0s - => CACHED [build-env 5/5] RUN dotnet publish -c Release -o out 0.0s - => CACHED [stage-1 3/3] COPY --from=build-env /App/out . 0.0s - => exporting to image 0.4s - => => exporting layers 0.0s - => => writing image sha256:2f15637d 0.1s - => => naming to docker.io/library/counter-image +[+] Building 0.2s (14/14) FINISHED + => [internal] load build definition from Dockerfile 0.0s + => => transferring dockerfile: 32B 0.0s + => [internal] load .dockerignore 0.0s + => => transferring context: 2B 0.0s + => [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:7.0 0.1s + => [internal] load metadata for mcr.microsoft.com/dotnet/sdk:7.0 0.1s + => [build-env 1/5] FROM mcr.microsoft.com/dotnet/sdk:7.0@sha256:80dce5844ecdc719704 0.0s + => [internal] load build context 0.0s + => => transferring context: 4.00kB 0.0s + => [stage-1 1/3] FROM mcr.microsoft.com/dotnet/aspnet:7.0@sha256:8dd65c009a093947cb 0.0s + => CACHED [stage-1 2/3] WORKDIR /App 0.0s + => CACHED [build-env 2/5] WORKDIR /App 0.0s + => CACHED [build-env 3/5] COPY . ./ 0.0s + => CACHED [build-env 4/5] RUN dotnet restore 0.0s + => CACHED [build-env 5/5] RUN dotnet publish -c Release -o out 0.0s + => CACHED [stage-1 3/3] COPY --from=build-env /App/out . 0.0s + => exporting to image 0.0s + => => exporting layers 0.0s + => => writing image sha256:2094c4692eeaeabebfa2cc68f77907e9ca8455deea948012690c6639 0.0s + => => naming to docker.io/library/counter-image 0.0s docker images -REPOSITORY TAG IMAGE ID CREATED SIZE -counter-image latest 2f15637dc1f6 10 minutes ago 208MB +REPOSITORY TAG IMAGE ID CREATED SIZE +counter-image latest 2094c4692eea About a minute ago 212MB ``` Each command in the *Dockerfile* generated a layer and created an **IMAGE ID**. The final **IMAGE ID** (yours will be different) is **2f15637dc1f6** and next you'll create a container based on this image. @@ -261,7 +262,7 @@ docker create --name core-counter counter-image The `docker create` command from above will create a container based on the **counter-image** image. The output of that command shows you the **CONTAINER ID** (yours will be different) of the created container: ```console -cf01364df4539812684c64277f5363a8fb354ef4c90785dc0845769a6c5b0f8e +d0be06126f7db6dd1cee369d911262a353c9b7fb4829a0c11b4b2eb7b2d429cf ``` To see a list of *all* containers, use the `docker ps -a` command: @@ -269,7 +270,7 @@ To see a list of *all* containers, use the `docker ps -a` command: ```console docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -cf01364df453 counter-image "dotnet DotNet.Docke…" 18 seconds ago Created core-counter +d0be06126f7d counter-image "dotnet DotNet.Docke…" 12 seconds ago Created core-counter ``` ### Manage the container @@ -445,20 +446,20 @@ During this tutorial, you created containers and images. If you want, delete the 02. Stop containers that are running by their name. ```console - docker stop counter-image + docker stop core-counter ``` 03. Delete the container ```console - docker rm counter-image + docker rm core-counter ``` Next, delete any images that you no longer want on your machine. Delete the image created by your *Dockerfile* and then delete the .NET image the *Dockerfile* was based on. You can use the **IMAGE ID** or the **REPOSITORY:TAG** formatted string. ```console docker rmi counter-image:latest -docker rmi mcr.microsoft.com/dotnet/aspnet:6.0 +docker rmi mcr.microsoft.com/dotnet/aspnet:7.0 ``` Use the `docker images` command to see a list of images installed. diff --git a/docs/core/docker/publish-as-container.md b/docs/core/docker/publish-as-container.md index d1fadd87d8db0..891b9a8b27751 100644 --- a/docs/core/docker/publish-as-container.md +++ b/docs/core/docker/publish-as-container.md @@ -1,7 +1,7 @@ --- title: Containerize an app with dotnet publish description: In this tutorial, you'll learn how to containerize a .NET application with dotnet publish. -ms.date: 01/04/2023 +ms.date: 02/08/2023 ms.topic: tutorial --- @@ -83,7 +83,7 @@ dotnet add package Microsoft.NET.Build.Containers There are various configuration options available when publishing an app as a container. For more information, see [Configure container image](#configure-container-image). -By default, the container image name is the `AssemblyName` of the project. If that name is invalid as a container image name, you can override it by specifying a `ContainerImageName` as shown in the following: +By default, the container image name is the `AssemblyName` of the project. If that name is invalid as a container image name, you can override it by specifying a `ContainerImageName` as shown in the following project file: :::code language="xml" source="snippets/Worker/DotNet.ContainerImage.csproj" highlight="8"::: @@ -119,10 +119,11 @@ Determining projects to restore... All projects are up-to-date for restore. DotNet.ContainerImage -> .\Worker\bin\Release\net7.0\linux-x64\DotNet.ContainerImage.dll DotNet.ContainerImage -> .\Worker\bin\Release\net7.0\linux-x64\publish\ - Pushed container 'dotnet-worker-image:1.0.0' to registry 'docker://' + Building image 'dotnet-worker-image' with tags 1.0.0 on top of base image mcr.microsoft.com/dotnet/aspnet:7.0 + Pushed container 'dotnet-worker-image:1.0.0' to Docker daemon ``` -This command compiles your worker app to the *publish- folder and pushes the container to your local docker registry. +This command compiles your worker app to the *publish* folder and pushes the container to your local docker registry. ## Configure container image @@ -147,26 +148,53 @@ The tag of the image is inferred to be the numeric component of your chosen `Tar If you set a value here, you should set the fully qualified name of the image to use as the base, including any tag you prefer: ```xml -mcr.microsoft.com/dotnet/runtime:6.0 + + mcr.microsoft.com/dotnet/runtime:6.0 + +``` + +### `ContainerRuntimeIdentifier` + +The container runtime identifier property controls the operating system and architecture used by your container if your [`ContainerBaseImage`](#containerbaseimage) supports more than one platform. For example, the `mcr.microsoft.com/dotnet/runtime` image currently supports `linux-x64`, `linux-arm`, `linux-arm64` and `win10-x64` images all behind the same tag, so the tooling needs a way to be told which of these versions you intend to use. By default, this will be set to the value of the `RuntimeIdentifier` that you chose when you published the container. This property rarely needs to be set explicitly - instead use the `-r` option to the `dotnet publish` command. If the image you've chosen doesn't support the `RuntimeIdentifier` you've chosen, you'll get an error that describes the RuntimeIdentifiers the image does support. + +You can always set the `ContainerBaseImage` property to a fully qualified image name, including the tag, to avoid needing to use this property at all. + +```xml + + linux-arm64 + ``` ### `ContainerRegistry` -The container registry property controls the destination registry, the place that the newly created image will be pushed to. Be default, it's pushed to the local Docker daemon (`docker://`), but you can also specify a remote registry. For example, consider the following XML example: +The container registry property controls the destination registry, the place that the newly created image will be pushed to. Be default it's pushed to the local Docker daemon, but you can also specify a remote registry. When using a remote registry that requires authentication, you authenticate using the well-known `docker login` mechanisms. See [Authenticating to container registries](https://aka.ms/dotnet/containers/auth) for more details. For a concrete example of using this property, consider the following XML example: ```xml -registry.mycorp.com:1234 + + registry.mycorp.com:1234 + ``` -> [!IMPORTANT] -> There is no authentication currently supported. This is planned for [a future release](https://github.com/dotnet/sdk-container-builds/issues/70), so make sure you're pointing to a local Docker daemon. +This tooling supports publishing to any registry that supports the [Docker Registry HTTP API V2](https://docs.docker.com/registry/spec/api/). This includes the following registries explicitly (and likely many more implicitly): + +* [Azure Container Registry](https://azure.microsoft.com/products/container-registry) +* [Amazon Elastic Container Registry](https://aws.amazon.com/ecr/) +* [Google Artifact Registry](https://cloud.google.com/artifact-registry) +* [Docker Hub](https://hub.docker.com/) +* [GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) +* [GitLab-hosted Container Registry](https://docs.gitlab.com/ee/user/packages/container_registry/) +* [Quay.io](https://quay.io/) + +For notes on working with these registries, see the [registry-specific notes](https://aka.ms/dotnet/containers/auth#notes-for-specific-registries). ### `ContainerImageName` The container image name controls the name of the image itself, e.g `dotnet/runtime` or `my-app`. By default, the `AssemblyName` of the project is used. ```xml -my-app + + my-app + ``` Image names consist of one or more slash-delimited segments, each of which can only contain lowercase alphanumeric characters, periods, underscores, and dashes, and must start with a letter or number. Any other characters will result in an error being thrown. @@ -176,13 +204,17 @@ Image names consist of one or more slash-delimited segments, each of which can o The container image tag property controls the tags that are generated for the image. Tags are often used to refer to different versions of an application, but they can also refer to different operating system distributions, or even different configurations. By default, the `Version` of the project is used as the tag value. To override the default, specify either of the following: ```xml -1.2.3-alpha2 + + 1.2.3-alpha2 + ``` To specify multiple tags, use a semicolon-delimited set of tags in the `ContainerImageTags` property, similar to setting multiple `TargetFrameworks`: ```xml -1.2.3-alpha2;latest + + 1.2.3-alpha2;latest + ``` Tags can only contain up to 127 alphanumeric characters, periods, underscores, and dashes. They must start with an alphanumeric character or an underscore. Any other form will result in an error being thrown. @@ -194,7 +226,9 @@ The container working directory node controls the working directory of the conta By default, the `/app` directory value is used as the working directory. ```xml -/bin + + /bin + ``` ### `ContainerPort` diff --git a/docs/core/docker/snippets/App/Dockerfile b/docs/core/docker/snippets/App/Dockerfile index b3ad995739d6e..a7a2115831e8c 100644 --- a/docs/core/docker/snippets/App/Dockerfile +++ b/docs/core/docker/snippets/App/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env WORKDIR /App # Copy everything @@ -9,7 +9,7 @@ RUN dotnet restore RUN dotnet publish -c Release -o out # Build runtime image -FROM mcr.microsoft.com/dotnet/aspnet:6.0 +FROM mcr.microsoft.com/dotnet/aspnet:7.0 WORKDIR /App COPY --from=build-env /App/out . ENTRYPOINT ["dotnet", "DotNet.Docker.dll"] diff --git a/docs/core/docker/snippets/App/DotNet.Docker.csproj b/docs/core/docker/snippets/App/DotNet.Docker.csproj index 74abf5c976649..f02677bf640fc 100644 --- a/docs/core/docker/snippets/App/DotNet.Docker.csproj +++ b/docs/core/docker/snippets/App/DotNet.Docker.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 enable enable diff --git a/docs/core/docker/snippets/App/Program.cs b/docs/core/docker/snippets/App/Program.cs index 19fb0fd67eed9..20f1c531a343b 100644 --- a/docs/core/docker/snippets/App/Program.cs +++ b/docs/core/docker/snippets/App/Program.cs @@ -1,6 +1,6 @@ var counter = 0; -var max = args.Length != 0 ? Convert.ToInt32(args[0]) : -1; -while (max == -1 || counter < max) +var max = args.Length is not 0 ? Convert.ToInt32(args[0]) : -1; +while (max is -1 || counter < max) { Console.WriteLine($"Counter: {++counter}"); await Task.Delay(TimeSpan.FromMilliseconds(1_000)); diff --git a/docs/core/docker/snippets/Worker/DotNet.ContainerImage.csproj b/docs/core/docker/snippets/Worker/DotNet.ContainerImage.csproj index fc5aee65b5f1b..051482a21d727 100644 --- a/docs/core/docker/snippets/Worker/DotNet.ContainerImage.csproj +++ b/docs/core/docker/snippets/Worker/DotNet.ContainerImage.csproj @@ -9,7 +9,7 @@
- - + + diff --git a/docs/core/extensions/best-practices-for-developing-world-ready-apps.md b/docs/core/extensions/best-practices-for-developing-world-ready-apps.md index fcb47499a5414..b916aff02edd0 100644 --- a/docs/core/extensions/best-practices-for-developing-world-ready-apps.md +++ b/docs/core/extensions/best-practices-for-developing-world-ready-apps.md @@ -1,7 +1,7 @@ --- description: "Learn more about: Best practices for developing world-ready applications" title: "Best Practices for Developing World-Ready Applications" -ms.date: 08/11/2021 +ms.date: 03/13/2023 helpviewer_keywords: - "global applications, best practices" - "world-ready applications, best practices" @@ -18,81 +18,76 @@ This section describes the best practices to follow when developing world-ready 1. Make your application Unicode internally. -2. Use the culture-aware classes provided by the namespace to manipulate and format data. +1. Use the culture-aware classes provided by the namespace to manipulate and format data. - For sorting, use the class and the class. - - For string comparisons, use the class. - - For date and time formatting, use the class. - - For numeric formatting, use the class. - - For Gregorian and non-Gregorian calendars, use the class or one of the specific calendar implementations. -3. Use the culture property settings provided by the class in the appropriate situations. Use the property for formatting tasks, such as date and time or numeric formatting. Use the property to retrieve resources. Note that the `CurrentCulture` and `CurrentUICulture` properties can be set per thread. +1. Use the culture property settings provided by the class in the appropriate situations. Use the property for formatting tasks, such as date and time or numeric formatting. Use the property to retrieve resources. Note that the `CurrentCulture` and `CurrentUICulture` properties can be set per thread. -4. Enable your application to read and write data to and from a variety of encodings by using the encoding classes in the namespace. Do not assume ASCII data. Assume that international characters will be supplied anywhere a user can enter text. For example, the application should accept international characters in server names, directories, file names, user names, and URLs. +1. Enable your application to read and write data to and from a variety of encodings by using the encoding classes in the namespace. Do not assume ASCII data. Assume that international characters will be supplied anywhere a user can enter text. For example, the application should accept international characters in server names, directories, file names, user names, and URLs. -5. When using the class, for security reasons, use the error detection feature offered by this class. To turn on the error detection feature, create an instance of the class using the constructor that takes a `throwOnInvalidBytes` parameter and set the value of this parameter to `true`. +1. When using the class, for security reasons, use the error detection feature offered by this class. To turn on the error detection feature, create an instance of the class using the constructor that takes a `throwOnInvalidBytes` parameter and set the value of this parameter to `true`. -6. Whenever possible, handle strings as entire strings instead of as a series of individual characters. This is especially important when sorting or searching for substrings. This will prevent problems associated with parsing combined characters. You can also work with units of text rather than single characters by using the class. +1. Whenever possible, handle strings as entire strings instead of as a series of individual characters. This is especially important when sorting or searching for substrings. This will prevent problems associated with parsing combined characters. You can also work with units of text rather than single characters by using the class. -7. Display text using the classes provided by the namespace. +1. Display text using the classes provided by the namespace. -8. For consistency across operating systems, do not allow user settings to override . Use the `CultureInfo` constructor that accepts a `useUserOverride` parameter and set it to `false`. +1. For consistency across operating systems, do not allow user settings to override . Use the `CultureInfo` constructor that accepts a `useUserOverride` parameter and set it to `false`. -9. Test your application functionality on international operating system versions, using international data. +1. Test your application functionality on international operating system versions, using international data. -10. If a security decision is based on the result of a string comparison or case change operation, use a culture-insensitive string operation. This practice ensures that the result is not affected by the value of `CultureInfo.CurrentCulture`. See the ["String Comparisons that Use the Current Culture"](../../standard/base-types/best-practices-strings.md#string-comparisons-that-use-the-current-culture) section of [Best Practices for Using Strings](../../standard/base-types/best-practices-strings.md) for an example that demonstrates how culture-sensitive string comparisons can produce inconsistent results. +1. If a security decision is based on the result of a string comparison or case change operation, use a culture-insensitive string operation. This practice ensures that the result is not affected by the value of `CultureInfo.CurrentCulture`. See the ["String Comparisons that Use the Current Culture"](../../standard/base-types/best-practices-strings.md#string-comparisons-that-use-the-current-culture) section of [Best Practices for Using Strings](../../standard/base-types/best-practices-strings.md) for an example that demonstrates how culture-sensitive string comparisons can produce inconsistent results. ## Localization best practices 1. Move all localizable resources to separate resource-only DLLs. Localizable resources include user interface elements, such as strings, error messages, dialog boxes, menus, and embedded object resources. -2. Do not hardcode strings or user interface resources. +1. Do not hardcode strings or user interface resources. -3. Do not put non-localizable resources into the resource-only DLLs. This causes confusion for translators. +1. Do not put non-localizable resources into the resource-only DLLs. This confuses translators. -4. Do not use composite strings that are built at run time from concatenated phrases. Composite strings are difficult to localize because they often assume an English grammatical order that does not apply to all languages. +1. Do not use composite strings that are built at run time from concatenated phrases. Composite strings are difficult to localize because they often assume an English grammatical order that does not apply to all languages. -5. Avoid ambiguous constructs such as "Empty Folder" where the strings can be translated differently depending on the grammatical roles of the string components. For example, "empty" can be either a verb or an adjective, which can lead to different translations in languages such as Italian or French. +1. Avoid ambiguous constructs such as "Empty Folder" where the strings can be translated differently depending on the grammatical roles of the string components. For example, "empty" can be either a verb or an adjective, which can lead to different translations in languages such as Italian or French. -6. Avoid using images and icons that contain text in your application. They are expensive to localize. +1. Avoid using images and icons that contain text in your application. They are expensive to localize. -7. Allow plenty of room for the length of strings to expand in the user interface. In some languages, phrases can require 50-75 percent more space than they need in other languages. +1. Allow plenty of room for the length of strings to expand in the user interface. In some languages, phrases can require 50-75 percent more space than they need in other languages. -8. Use the class to retrieve resources based on culture. +1. Use the class to retrieve resources based on culture. -9. Use [Visual Studio](https://visualstudio.microsoft.com/vs/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link) to create Windows Forms dialog boxes so they can be localized using the [Windows Forms Resource Editor (Winres.exe)](../../framework/tools/winres-exe-windows-forms-resource-editor.md). Do not code Windows Forms dialog boxes by hand. +1. Use [Visual Studio](https://visualstudio.microsoft.com/vs/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link) to create Windows Forms dialog boxes so they can be localized using the [Windows Forms Resource Editor (Winres.exe)](../../framework/tools/winres-exe-windows-forms-resource-editor.md). Do not code Windows Forms dialog boxes by hand. -10. Arrange for professional localization (translation). +1. Arrange for professional localization (translation). -11. For a complete description of creating and localizing resources, see [Resources in .NET apps](resources.md). +1. For a complete description of creating and localizing resources, see [Resources in .NET apps](resources.md). ## Globalization best practices for ASP.NET applications -1. Explicitly set the and properties in your application. Do not rely on defaults. +> [!TIP] +> The following best practices are for ASP.NET Framework apps. For ASP.NET Core apps, see [Globalization and localization in ASP.NET Core](/aspnet/core/fundamentals/localization). -2. Note that ASP.NET applications are managed applications and therefore can use the same classes as other managed applications for retrieving, displaying, and manipulating information based on culture. - -3. Be aware that you can specify the following three types of encodings in ASP.NET: - - - requestEncoding specifies the encoding received from the client's browser. - - - responseEncoding specifies the encoding to send to the client browser. In most situations, this encoding should be the same as that specified for requestEncoding. +1. Explicitly set the and properties in your application. Do not rely on defaults. - - fileEncoding specifies the default encoding for .aspx, .asmx, and .asax file parsing. +1. Note that ASP.NET applications are managed applications and therefore can use the same classes as other managed applications for retrieving, displaying, and manipulating information based on culture. -4. Specify the values for the requestEncoding, responseEncoding, fileEncoding, culture, and uiCulture attributes in the following three places in an ASP.NET application: +1. Be aware that you can specify the following three types of encodings in ASP.NET: - - In the globalization section of a Web.config file. This file is external to the ASP.NET application. For more information, see [\ element](/previous-versions/dotnet/netframework-4.0/hy4kkhe0(v=vs.100)). + - `requestEncoding` specifies the encoding received from the client's browser. + - `responseEncoding` specifies the encoding to send to the client browser. In most situations, this encoding should be the same as that specified for `requestEncoding`. + - fileEncoding specifies the default encoding for _.aspx_, _.asmx_, and _.asax_ file parsing. - - In a page directive. Note that, when an application is in a page, the file has already been read. Therefore, it is too late to specify fileEncoding and requestEncoding. Only uiCulture, Culture, and responseEncoding can be specified in a page directive. +1. Specify the values for the `requestEncoding`, `responseEncoding`, `fileEncoding`, `culture`, and `uiCulture` attributes in the following three places in an ASP.NET application: - - Programmatically in application code. This setting can vary per request. As with a page directive, by the time the application's code is reached it is too late to specify fileEncoding and requestEncoding. Only uiCulture, Culture, and responseEncoding can be specified in application code. + - In the globalization section of a _Web.config_ file. This file is external to the ASP.NET application. For more information, see [\ element](/previous-versions/dotnet/netframework-4.0/hy4kkhe0(v=vs.100)). + - In a page directive. Note that, when an application is in a page, the file has already been read. Therefore, it is too late to specify fileEncoding and requestEncoding. Only `uiCulture`, `culture`, and `responseEncoding` can be specified in a page directive. + - Programmatically in application code. This setting can vary per request. As with a page directive, by the time the application's code is reached, it is too late to specify `fileEncoding` and `requestEncoding`. Only `uiCulture`, `culture`, and `responseEncoding` can be specified in the application code. -5. Note that the uiCulture value can be set to the browser accept language. +1. Note that the uiCulture value can be set to the browser accept language. ## See also diff --git a/docs/core/extensions/caching.md b/docs/core/extensions/caching.md index 9a9662ab92016..5a34c8384af7f 100644 --- a/docs/core/extensions/caching.md +++ b/docs/core/extensions/caching.md @@ -1,9 +1,9 @@ --- title: Caching in .NET -description: Learn how to use various in-memory and distributed caching mechanisms in .NET. +description: Discover effective ways to implement in-memory and distributed caching in .NET. Boost app performance and scalability with .NET caching. author: IEvangelist ms.author: dapine -ms.date: 11/09/2022 +ms.date: 03/13/2023 --- # Caching in .NET @@ -217,17 +217,20 @@ In the preceding C# code: Consumers of this service are free to call `GetPhotosAsync` method, and handle photos accordingly. No `HttpClient` is required as the cache contains the photos. +The asynchronous signal is based on an encapsulated instance, within a generic-type constrained singleton. The `CacheSignal` relies on an instance of `SemaphoreSlim`: + +:::code source="snippets/caching/memory-worker/CacheSignal.cs"::: + +In the preceding C# code, the decorator pattern is used to wrap an instance of the `SemaphoreSlim`. Since the `CacheSignal` is registered as a singleton, it can be used across all service lifetimes with any generic type — in this case, the `Photo`. It is responsible for signaling the seeding of the cache. + The `CacheWorker` is a subclass of : :::code source="snippets/caching/memory-worker/CacheWorker.cs"::: -> [!IMPORTANT] -> You need to `override` and call `await _cacheSignal.WaitAsync()` in order to prevent a race condition between the starting of the `CacheWorker` and a call to `PhotoService.GetPhotosAsync`. - In the preceding C# code: -- The constructor requires an `ILogger`, `HttpClient`, `CacheSignal`, and `IMemoryCache`. -- The defines an `_updateInterval` of three hours. +- The constructor requires an `ILogger`, `HttpClient`, and `IMemoryCache`. +- The `_updateInterval` is defined for three hours. - The `ExecuteAsync` method: - Loops while the app is running. - Makes an HTTP request to `"https://jsonplaceholder.typicode.com/photos"`, and maps the response as an array of `Photo` objects. @@ -236,11 +239,7 @@ In the preceding C# code: - The call to is awaited, given the update interval. - After delaying for three hours, the cache is again updated. -The asynchronous signal is based on an encapsulated instance, within a generic-type constrained singleton. The `CacheSignal` relies on an instance of `SemaphoreSlim`: - -:::code source="snippets/caching/memory-worker/CacheSignal.cs"::: - -In the preceding C# code, the decorator pattern is used to wrap an instance of the `SemaphoreSlim`. Since the `CacheSignal` is registered as a singleton, it can be used across all service lifetimes with any generic type — in this case, the `Photo`. It is responsible for signaling the seeding of the cache. +Consumers in the same process could ask the `IMemoryCache` for the photos, but the `CacheWorker` is responsible for updating the cache. ## Distributed caching diff --git a/docs/core/extensions/channels.md b/docs/core/extensions/channels.md index 581b247211c8b..2d61e27f96928 100644 --- a/docs/core/extensions/channels.md +++ b/docs/core/extensions/channels.md @@ -1,9 +1,9 @@ --- title: Channels -description: Learn how to use System.Threading.Channels in .NET. +description: Learn the official synchronization data structures in System.Threading.Channels for producers and consumers with .NET. author: IEvangelist ms.author: dapine -ms.date: 11/09/2022 +ms.date: 03/13/2023 --- # System.Threading.Channels library diff --git a/docs/core/extensions/cloud-service.md b/docs/core/extensions/cloud-service.md index 8f71a8df0aaa8..18b4bcd2232b7 100644 --- a/docs/core/extensions/cloud-service.md +++ b/docs/core/extensions/cloud-service.md @@ -1,9 +1,9 @@ --- title: Deploy a Worker Service to Azure -description: Learn how to deploy a .NET Worker Service to Azure. +description: Deploy your .NET Worker Service to Azure with ease, learning from a step-by-step process to optimize your workflow, including Docker and Azure Container Registry. author: IEvangelist ms.author: dapine -ms.date: 09/10/2021 +ms.date: 03/13/2023 ms.topic: tutorial zone_pivot_groups: development-environment-one --- diff --git a/docs/core/extensions/configuration-providers.md b/docs/core/extensions/configuration-providers.md index 52dd5ebce04e3..b5a50dc2a3ff8 100644 --- a/docs/core/extensions/configuration-providers.md +++ b/docs/core/extensions/configuration-providers.md @@ -1,15 +1,15 @@ --- title: Configuration providers -description: Learn how the Configuration provider API is used to configure .NET applications. +description: Discover how to configure .NET apps using the configuration provider API and the available configuration providers. author: IEvangelist ms.author: dapine -ms.date: 11/09/2022 +ms.date: 03/13/2023 ms.topic: reference --- # Configuration providers in .NET -Configuration in .NET is possible with configuration providers. There are several types of providers that rely on various configuration sources. This article details all of the different configuration providers and their corresponding sources. +Configuration in .NET is possible with configuration providers. Several types of providers rely on various configuration sources. This article details all of the different configuration providers and their corresponding sources. - [File configuration provider](#file-configuration-provider) - [Environment variable configuration provider](#environment-variable-configuration-provider) diff --git a/docs/core/extensions/configuration.md b/docs/core/extensions/configuration.md index d199794c46c76..3e572eec5ef6d 100644 --- a/docs/core/extensions/configuration.md +++ b/docs/core/extensions/configuration.md @@ -1,9 +1,9 @@ --- title: Configuration -description: Learn how to use the Configuration API to configure .NET applications. +description: Learn how to use the Configuration API to configure .NET applications. Explore various inbuilt configuration providers. author: IEvangelist ms.author: dapine -ms.date: 11/09/2022 +ms.date: 03/13/2023 ms.topic: overview --- diff --git a/docs/core/extensions/console-log-formatter.md b/docs/core/extensions/console-log-formatter.md index 79c0b78c8f0e9..0809cff5fa016 100644 --- a/docs/core/extensions/console-log-formatter.md +++ b/docs/core/extensions/console-log-formatter.md @@ -1,9 +1,9 @@ --- title: Console log formatting -description: Learn how to use available console log formatting, or implement custom log formatting for your .NET applications. +description: Learn how to use and implement custom console log formatting in your .NET apps. Register and create new log formatters for better application logging. author: IEvangelist ms.author: dapine -ms.date: 11/09/2022 +ms.date: 03/13/2023 --- # Console log formatting diff --git a/docs/core/extensions/create-resource-files.md b/docs/core/extensions/create-resource-files.md index 4042d8480aeae..eab3f5f0c0cb3 100644 --- a/docs/core/extensions/create-resource-files.md +++ b/docs/core/extensions/create-resource-files.md @@ -1,7 +1,7 @@ --- title: Create resource files description: Make resource files for .NET apps. Build text files with string resources, XML or binary files programmatically, or XML files with string, image, or object data. -ms.date: 03/23/2022 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" diff --git a/docs/core/extensions/create-satellite-assemblies.md b/docs/core/extensions/create-satellite-assemblies.md index c80d92a1a6bc2..7fd90843c0cd1 100644 --- a/docs/core/extensions/create-satellite-assemblies.md +++ b/docs/core/extensions/create-satellite-assemblies.md @@ -1,7 +1,7 @@ --- title: Create satellite assemblies description: Get started with creating satellite assemblies for .NET apps. A satellite assembly can be easily updated or replaced to provide localized resources. -ms.date: 05/19/2022 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" diff --git a/docs/core/extensions/custom-configuration-provider.md b/docs/core/extensions/custom-configuration-provider.md index f3836e759e316..6ed0c0b68827a 100644 --- a/docs/core/extensions/custom-configuration-provider.md +++ b/docs/core/extensions/custom-configuration-provider.md @@ -1,9 +1,9 @@ --- title: Implement a custom configuration provider -description: Learn how to implement a custom configuration provider in .NET applications. +description: Learn how to implement a custom configuration provider in .NET apps. Explore a database configuration provider that uses Entity Framework Core. author: IEvangelist ms.author: dapine -ms.date: 12/17/2021 +ms.date: 03/13/2023 ms.topic: how-to --- diff --git a/docs/core/extensions/custom-logging-provider.md b/docs/core/extensions/custom-logging-provider.md index 92f39801e9fdb..2bac4470789f3 100644 --- a/docs/core/extensions/custom-logging-provider.md +++ b/docs/core/extensions/custom-logging-provider.md @@ -1,9 +1,9 @@ --- title: Implement a custom logging provider -description: Learn how to implement a custom logging provider in your .NET applications. +description: Discover how to implement a custom logging provider with colorized logs, writing custom C# ILogger and ILoggerProvider implementations. author: IEvangelist ms.author: dapine -ms.date: 09/15/2022 +ms.date: 03/13/2023 ms.topic: how-to --- @@ -31,7 +31,9 @@ The `ILogger` implementation category name is typically the logging source. For The preceding code: - Creates a logger instance per category name. -- Checks `_getCurrentConfig().LogLevelToColorMap.ContainsKey(logLevel)` in `IsEnabled`, so each `logLevel` has a unique logger. In this implementation, each log level requires an explicit configuration entry in order to log. +- Checks `_getCurrentConfig().LogLevelToColorMap.ContainsKey(logLevel)` in `IsEnabled`, so each `logLevel` has a unique logger. In this implementation, each log level requires an explicit configuration entry to log. + +It's a good practice to call within implementations since `Log` can be called by any consumer, and there are no guarantees that it was previously checked. The `IsEnabled` method should be very fast in most implementations. :::code language="csharp" source="snippets/configuration/console-custom-logging/ColorConsoleLogger.cs" range="15-16"::: diff --git a/docs/core/extensions/dependency-injection-guidelines.md b/docs/core/extensions/dependency-injection-guidelines.md index 92cdbf96e4f29..15bd6f2f027a3 100644 --- a/docs/core/extensions/dependency-injection-guidelines.md +++ b/docs/core/extensions/dependency-injection-guidelines.md @@ -1,9 +1,9 @@ --- title: Dependency injection guidelines -description: Learn various dependency injection guidelines and best practices for .NET application development. +description: Discover effective dependency injection guidelines and best practices for developing .NET apps. Deepen your understanding of inversion of control. author: IEvangelist ms.author: dapine -ms.date: 11/03/2022 +ms.date: 03/13/2023 ms.topic: conceptual --- @@ -189,7 +189,7 @@ In the preceding code, the `implementationFactory` is given a lambda expression :::code language="csharp" source="snippets/configuration/di-anti-patterns/Program.cs" id="AsyncDeadlockTwo"::: -For more information on asynchronous guidance, see [Asynchronous programming: Important info and advice](../../csharp/async.md#important-info-and-advice). For more information debugging deadlocks, see [Debug a deadlock in .NET](../diagnostics/debug-deadlock.md). +For more information on asynchronous guidance, see [Asynchronous programming: Important info and advice](../../csharp/asynchronous-programming/async-scenarios.md#important-info-and-advice). For more information debugging deadlocks, see [Debug a deadlock in .NET](../diagnostics/debug-deadlock.md). When you're running this anti-pattern and the deadlock occurs, you can view the two threads waiting from Visual Studio's Parallel Stacks window. For more information, see [View threads and tasks in the Parallel Stacks window](/visualstudio/debugger/using-the-parallel-stacks-window). diff --git a/docs/core/extensions/dependency-injection-usage.md b/docs/core/extensions/dependency-injection-usage.md index 35c32724bf4ad..493444babc40c 100644 --- a/docs/core/extensions/dependency-injection-usage.md +++ b/docs/core/extensions/dependency-injection-usage.md @@ -1,9 +1,9 @@ --- title: Use dependency injection -description: Learn how to use dependency injection in your .NET applications. +description: Learn how to use dependency injection in your .NET apps with this comprehensive tutorial. Follow along with this pragmatic guide to understand DI in C#. author: IEvangelist ms.author: dapine -ms.date: 01/05/2023 +ms.date: 03/13/2023 ms.topic: tutorial no-loc: [Transient, Scoped, Singleton, Example] --- diff --git a/docs/core/extensions/dependency-injection.md b/docs/core/extensions/dependency-injection.md index 5a9604124705e..c6d1aff834702 100644 --- a/docs/core/extensions/dependency-injection.md +++ b/docs/core/extensions/dependency-injection.md @@ -1,13 +1,13 @@ --- title: Dependency injection -description: Learn how .NET implements dependency injection and how to use it. +description: Learn how to use dependency injection within your .NET apps. Discover how to registration services, define service lifetimes, and express dependencies in C#. author: IEvangelist ms.author: dapine -ms.date: 11/09/2022 +ms.date: 03/13/2023 ms.topic: overview --- -# Dependency injection in .NET +# .NET dependency injection .NET supports the dependency injection (DI) software design pattern, which is a technique for achieving [Inversion of Control (IoC)](../../architecture/modern-web-apps-azure/architectural-principles.md#dependency-inversion) between classes and their dependencies. Dependency injection in .NET is a built-in part of the framework, along with configuration, logging, and the options pattern. diff --git a/docs/core/extensions/file-globbing.md b/docs/core/extensions/file-globbing.md index c076d5234f1be..577fe102fa073 100644 --- a/docs/core/extensions/file-globbing.md +++ b/docs/core/extensions/file-globbing.md @@ -3,7 +3,7 @@ title: File globbing author: IEvangelist description: Learn how to use file globbing in .NET to match various files with the same partial names, extensions, or segments. ms.author: dapine -ms.date: 11/12/2021 +ms.date: 03/13/2023 --- # File globbing in .NET diff --git a/docs/core/extensions/generic-host.md b/docs/core/extensions/generic-host.md index d081ff1ae5c53..08b231df8bff1 100644 --- a/docs/core/extensions/generic-host.md +++ b/docs/core/extensions/generic-host.md @@ -3,7 +3,7 @@ title: .NET Generic Host author: IEvangelist description: Learn about the .NET Generic Host, which is responsible for app startup and lifetime management. ms.author: dapine -ms.date: 06/08/2022 +ms.date: 03/13/2023 --- # .NET Generic Host diff --git a/docs/core/extensions/globalization-and-localization.md b/docs/core/extensions/globalization-and-localization.md index e5a19fe3a4cee..687713baf92a6 100644 --- a/docs/core/extensions/globalization-and-localization.md +++ b/docs/core/extensions/globalization-and-localization.md @@ -1,7 +1,7 @@ --- title: "Globalize and localize .NET applications" description: Learn how to develop a world-ready application. Read about globalization, localizability review, and localization in .NET. -ms.date: 08/11/2021 +ms.date: 03/13/2023 helpviewer_keywords: - "international applications [.NET]" - "globalization [.NET], encoding" diff --git a/docs/core/extensions/globalization-icu.md b/docs/core/extensions/globalization-icu.md index 010a76351e92e..0456a091d6555 100644 --- a/docs/core/extensions/globalization-icu.md +++ b/docs/core/extensions/globalization-icu.md @@ -1,7 +1,7 @@ --- description: "Learn more about: .NET globalization and ICU" title: "Globalization and ICU" -ms.date: 11/14/2022 +ms.date: 03/13/2023 helpviewer_keywords: - "globalization [.NET], about globalization" - "global applications, globalization" @@ -208,4 +208,4 @@ The following APIs are supported with limitations: - and don't support the rarely used and forms. - returns the same value as . -In addition, a list of supported locales can be found on the [dotnet/icu repo](https://github.com/dotnet/icu/blob/0f49268ddfd3331ca090f1c51d2baa2f75f6c6c0/icu-filters/optimal.json#L6-L54). +In addition, fewer locales are supported. The supported list can be found in the [dotnet/icu repo](https://github.com/dotnet/icu/blob/dotnet/main/icu-filters/icudt_wasm.json#L7-L195). diff --git a/docs/core/extensions/globalization.md b/docs/core/extensions/globalization.md index 30bcfdf07d9b6..08aa7ea3ebd29 100644 --- a/docs/core/extensions/globalization.md +++ b/docs/core/extensions/globalization.md @@ -1,7 +1,7 @@ --- description: "Learn more about: Globalization" title: "Globalization" -ms.date: 06/30/2022 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" @@ -45,9 +45,7 @@ The use of Unicode ensures that the same code units always map to the same chara Even if you are developing an app that targets a single culture or region, you should use resource files to store strings and other resources that are displayed in the user interface. You should never add them directly to your code. Using resource files has a number of advantages: - All the strings are in a single location. You don't have to search throughout your source code to identify strings to modify for a specific language or culture. - -- There is no need to duplicate strings. Developers who don't use resource files often define the same string in multiple source code files. This duplication increases the probability that one or more instances will be overlooked when a string is modified. - +- There's no need to duplicate strings. Developers who don't use resource files often define the same string in multiple source code files. This duplication increases the probability that one or more instances will be overlooked when a string is modified. - You can include non-string resources, such as images or binary data, in the resource file instead of storing them in a separate standalone file, so they can be retrieved easily. Using resource files has particular advantages if you are creating a localized app. When you deploy resources in satellite assemblies, the common language runtime automatically selects a culture-appropriate resource based on the user's current UI culture as defined by the property. As long as you provide an appropriate culture-specific resource and correctly instantiate a object or use a strongly typed resource class, the runtime handles the details of retrieving the appropriate resources. @@ -155,9 +153,7 @@ You should never persist date and time data in a format that can vary by culture You can avoid this problem in any of three ways: - Serialize the date and time in binary format rather than as a string. - - Save and parse the string representation of the date and time by using a custom format string that is the same regardless of the user's culture. - - Save the string by using the formatting conventions of the invariant culture. The following example illustrates the last approach. It uses the formatting conventions of the invariant culture returned by the static property. @@ -169,7 +165,11 @@ The following example illustrates the last approach. It uses the formatting conv A date and time value can have multiple interpretations, ranging from a general time ("The stores open on January 2, 2013, at 9:00 A.M.") to a specific moment in time ("Date of birth: January 2, 2013 6:32:00 A.M."). When a time value represents a specific moment in time and you restore it from a serialized value, you should ensure that it represents the same moment in time regardless of the user's geographical location or time zone. -The following example illustrates this problem. It saves a single local date and time value as a string in three [standard formats](../../standard/base-types/standard-date-and-time-format-strings.md) ("G" for general date long time, "s" for sortable date/time, and "o" for round-trip date/time) as well as in binary format. +The following example illustrates this problem. It saves a single local date and time value as a string in three [standard formats](../../standard/base-types/standard-date-and-time-format-strings.md): + +- "G" for general date long time. +- "s" for sortable date/time. +- "o" for round-trip date/time. [!code-csharp[Conceptual.Globalization#10](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates4.cs#10)] [!code-vb[Conceptual.Globalization#10](../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.globalization/vb/dates4.vb#10)] @@ -180,30 +180,22 @@ When the data is restored on a system in the same time zone as the system on whi '3/30/2013 6:00:00 PM' --> 3/30/2013 6:00:00 PM Unspecified '2013-03-30T18:00:00' --> 3/30/2013 6:00:00 PM Unspecified '2013-03-30T18:00:00.0000000-07:00' --> 3/30/2013 6:00:00 PM Local - -3/30/2013 6:00:00 PM Local ``` However, if you restore the data on a system in a different time zone, only the date and time value that was formatted with the "o" (round-trip) standard format string preserves time zone information and therefore represents the same instant in time. Here's the output when the date and time data is restored on a system in the Romance Standard Time zone: ```console -'3/30/2013 6:00:00 PM' --> 3/30/2013 6:00:00 PM Unspecified -'2013-03-30T18:00:00' --> 3/30/2013 6:00:00 PM Unspecified -'2013-03-30T18:00:00.0000000-07:00' --> 3/31/2013 3:00:00 AM Local - -3/30/2013 6:00:00 PM Local +'3/30/2023 6:00:00 PM' --> 3/30/2023 6:00:00 PM Unspecified +'2023-03-30T18:00:00' --> 3/30/2023 6:00:00 PM Unspecified +'2023-03-30T18:00:00.0000000-07:00' --> 3/31/2023 3:00:00 AM Local ``` To accurately reflect a date and time value that represents a single moment of time regardless of the time zone of the system on which the data is deserialized, you can do any of the following: - Save the value as a string by using the "o" (round-trip) standard format string. Then deserialize it on the target system. - - Convert it to UTC and save it as a string by using the "r" (RFC1123) standard format string. Then deserialize it on the target system and convert it to local time. - - Convert it to UTC and save it as a string by using the "u" (universal sortable) standard format string. Then deserialize it on the target system and convert it to local time. -- Convert it to UTC and save it in binary format. Then deserialize it on the target system and convert it to local time. - The following example illustrates each technique. [!code-csharp[Conceptual.Globalization#11](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates8.cs#11)] @@ -212,11 +204,9 @@ The following example illustrates each technique. When the data is serialized on a system in the Pacific Standard Time zone and deserialized on a system in the Romance Standard Time zone, the example displays the following output: ```console -'2013-03-30T18:00:00.0000000-07:00' --> 3/31/2013 3:00:00 AM Local -'Sun, 31 Mar 2013 01:00:00 GMT' --> 3/31/2013 3:00:00 AM Local -'2013-03-31 01:00:00Z' --> 3/31/2013 3:00:00 AM Local - -3/31/2013 3:00:00 AM Local +'2023-03-30T18:00:00.0000000-07:00' --> 3/31/2023 3:00:00 AM Local +'Sun, 31 Mar 2023 01:00:00 GMT' --> 3/31/2023 3:00:00 AM Local +'2023-03-31 01:00:00Z' --> 3/31/2023 3:00:00 AM Local ``` For more information, see [Convert times between time zones](../../standard/datetime/converting-between-time-zones.md). @@ -233,9 +223,7 @@ For example, the transition from Pacific Standard Time to Pacific Daylight Time To ensure that an arithmetic operation on date and time values produces accurate results, follow these steps: 1. Convert the time in the source time zone to UTC. - 2. Perform the arithmetic operation. - 3. If the result is a date and time value, convert it from UTC to the time in the source time zone. The following example is similar to the previous example, except that it follows these three steps to correctly add 48 hours to March 9, 2013 at 10:30 A.M. @@ -268,13 +256,11 @@ The handling of numbers depends on whether they are displayed in the user interf ### Display numeric values -Typically, when numbers are displayed in the user interface, you should use the formatting conventions of the user's culture, which is defined by the property and by the object returned by the `CultureInfo.CurrentCulture.NumberFormat` property. The formatting conventions of the current culture are automatically used when you format a date by using any of the following methods: - -- The parameterless `ToString` method of any numeric type +Typically, when numbers are displayed in the user interface, you should use the formatting conventions of the user's culture, which is defined by the property and by the object returned by the `CultureInfo.CurrentCulture.NumberFormat` property. The formatting conventions of the current culture are automatically used when you format a date in the following ways: -- The `ToString(String)` method of any numeric type, which includes a format string as an argument - -- The [composite formatting](../../standard/base-types/composite-formatting.md) feature, when it is used with numeric values +- Using the parameterless `ToString` method of any numeric type. +- Using the `ToString(String)` method of any numeric type, which includes a format string as an argument. +- Using [composite formatting](../../standard/base-types/composite-formatting.md) with numeric values. The following example displays the average temperature per month in Paris, France. It first sets the current culture to French (France) before displaying the data, and then sets it to English (United States). In each case, the month names and temperatures are displayed in the format that is appropriate for that culture. Note that the two cultures use different decimal separators in the temperature value. Also note that the example uses the "MMMM" custom date and time format string to display the full month name, and that it allocates the appropriate amount of space for the month name in the result string by determining the length of the longest month name in the array. @@ -291,17 +277,9 @@ You should never persist numeric data in a culture-specific format. This is a co To avoid this problem, you can use one of these techniques: - Save and parse the string representation of the number by using a custom format string that is the same regardless of the user's culture. - - Save the number as a string by using the formatting conventions of the invariant culture, which is returned by the property. -- Serialize the number in binary instead of string format. - -The following example illustrates the last approach. It serializes the array of values, and then deserializes and displays them by using the formatting conventions of the English (United States) and French (France) cultures. - -[!code-csharp[Conceptual.Globalization#7](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers3.cs#7)] -[!code-vb[Conceptual.Globalization#7](../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.globalization/vb/numbers3.vb#7)] - -Serializing currency values is a special case. Because a currency value depends on the unit of currency in which it is expressed; it makes little sense to treat it as an independent numeric value. However, if you save a currency value as a formatted string that includes a currency symbol, it cannot be deserialized on a system whose default culture uses a different currency symbol, as the following example shows. +Serializing currency values is a special case. Because a currency value depends on the unit of currency in which it's expressed, it makes little sense to treat it as an independent numeric value. However, if you save a currency value as a formatted string that includes a currency symbol, it cannot be deserialized on a system whose default culture uses a different currency symbol, as the following example shows. [!code-csharp[Conceptual.Globalization#16](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/currency1.cs#16)] [!code-vb[Conceptual.Globalization#16](../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.globalization/vb/currency1.vb#16)] diff --git a/docs/core/extensions/high-performance-logging.md b/docs/core/extensions/high-performance-logging.md index d16a2e4d2cc14..fbc769523d1cc 100644 --- a/docs/core/extensions/high-performance-logging.md +++ b/docs/core/extensions/high-performance-logging.md @@ -3,7 +3,7 @@ title: High-performance logging author: IEvangelist description: Learn how to use LoggerMessage to create cacheable delegates that require fewer object allocations for high-performance logging scenarios. ms.author: dapine -ms.date: 03/01/2022 +ms.date: 03/13/2023 --- # High-performance logging in .NET @@ -109,7 +109,7 @@ Provide a static extension method for the log message. Include any type paramete :::code language="csharp" source="snippets/logging/worker-service-options/Extensions/LoggerExtensions.cs" id="ProcessingWorkMethod"::: -The scope wraps the logging extension calls in a [using](../../csharp/language-reference/keywords/using-statement.md) block: +The scope wraps the logging extension calls in a [using](../../csharp/language-reference/statements/using.md) block: :::code language="csharp" source="snippets/logging/worker-service-options/Worker.cs" range="13-349" highlight="4"::: diff --git a/docs/core/extensions/http-ratelimiter.md b/docs/core/extensions/http-ratelimiter.md index d1adb5c2d4853..d8634be350c84 100644 --- a/docs/core/extensions/http-ratelimiter.md +++ b/docs/core/extensions/http-ratelimiter.md @@ -1,9 +1,9 @@ --- title: Rate limiting an HTTP handler in .NET -description: Learn how to create a client-side HTTP handler that limits the number of requests. +description: Learn how to create a client-side HTTP handler that limits the number of requests, with the inbuilt rate limiter API from .NET. author: IEvangelist ms.author: dapine -ms.date: 11/08/2022 +ms.date: 03/13/2023 --- # Rate limit an HTTP handler in .NET diff --git a/docs/core/extensions/httpclient-factory.md b/docs/core/extensions/httpclient-factory.md index b99eb220c8b6b..b23d1a1c596fa 100644 --- a/docs/core/extensions/httpclient-factory.md +++ b/docs/core/extensions/httpclient-factory.md @@ -3,7 +3,7 @@ title: Use the IHttpClientFactory description: Learn how to use the HttpClient and IHttpClientFactory implementations with dependency injection in your .NET workloads. author: IEvangelist ms.author: dapine -ms.date: 01/04/2023 +ms.date: 03/13/2023 --- # IHttpClientFactory with .NET diff --git a/docs/core/extensions/httpclient-http3.md b/docs/core/extensions/httpclient-http3.md index 61a3fbec55474..df574f2f65557 100644 --- a/docs/core/extensions/httpclient-http3.md +++ b/docs/core/extensions/httpclient-http3.md @@ -3,12 +3,12 @@ title: Use HTTP/3 with HttpClient description: Learn how to use the HttpClient to access HTTP/3 servers in .NET author: IEvangelist ms.author: samsp -ms.date: 7/28/2022 +ms.date: 03/13/2023 --- # Use HTTP/3 with HttpClient -[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html) is the third and recently standardized major version of HTTP. HTTP/3 uses the same semantics as HTTP/1.1 and HTTP/2: the same request methods, status codes, and message fields apply to all versions. The differences are in the underlying transport. Both HTTP/1.1 and HTTP/2 use TCP as their transport. HTTP/3 uses a new transport technology developed alongside HTTP/3 called [QUIC](https://www.rfc-editor.org/rfc/rfc9000.html). +[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html) is the third and recently standardized major version of HTTP. HTTP/3 uses the same semantics as HTTP/1.1 and HTTP/2: the same request methods, status codes, and message fields apply to all versions. The differences are in the underlying transport. Both HTTP/1.1 and HTTP/2 use TCP as their transport. HTTP/3 uses a transport technology developed alongside HTTP/3 called [QUIC](https://www.rfc-editor.org/rfc/rfc9000.html). HTTP/3 and QUIC have a number of benefits compared to HTTP/1.1 and HTTP/2: @@ -90,5 +90,6 @@ Cloudflare hosts a site for HTTP/3 which can be used to test the client against - - [HTTP/3 support in Kestrel][http3Kestrel] +- [QUIC support in .NET](../../fundamentals/networking/quic/quic-overview.md) [http3Kestrel]: /aspnet/core/fundamentals/servers/kestrel/http3 diff --git a/docs/core/extensions/localizability-review.md b/docs/core/extensions/localizability-review.md index 267bb0d3f3db4..268aa93777509 100644 --- a/docs/core/extensions/localizability-review.md +++ b/docs/core/extensions/localizability-review.md @@ -1,7 +1,7 @@ --- title: Localizability review description: Learn about localizability reviews, and when they should occur and how to use them. -ms.date: 08/11/2021 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" diff --git a/docs/core/extensions/localization.md b/docs/core/extensions/localization.md index 798df2ced4979..6f815056761ab 100644 --- a/docs/core/extensions/localization.md +++ b/docs/core/extensions/localization.md @@ -3,7 +3,7 @@ title: Localization description: Learn the concepts of localization while learning how to use the IStringLocalizer and IStringLocalizerFactory implementations in your .NET workloads. author: IEvangelist ms.author: dapine -ms.date: 11/12/2021 +ms.date: 03/13/2023 helpviewer_keywords: - "culture, localization" - "application development [.NET], localization" diff --git a/docs/core/extensions/logger-message-generator.md b/docs/core/extensions/logger-message-generator.md index f12d5f3688a3b..13e290e52a13f 100644 --- a/docs/core/extensions/logger-message-generator.md +++ b/docs/core/extensions/logger-message-generator.md @@ -3,7 +3,7 @@ title: Compile-time logging source generation description: Learn how to use the LoggerMessageAttribute and compile-time source generation for logging in .NET. author: maryamariyan ms.author: maariyan -ms.date: 03/01/2022 +ms.date: 03/13/2023 --- # Compile-time logging source generation @@ -87,13 +87,13 @@ Consider the example logging output when using the `JsonConsole` formatter. { "EventId": 23, "LogLevel": "Information", - "Category": "SampleObject", - "Message": "", + "Category": "\u003CProgram\u003EF...9CB42__SampleObject", + "Message": "Liana lives in Seattle.", "State": { - "Message": "", + "Message": "Liana lives in Seattle.", "name": "Liana", "city": "Seattle", - "{OriginalFormat}": "" + "{OriginalFormat}": "{name} lives in {city}." } } ``` diff --git a/docs/core/extensions/logging-providers.md b/docs/core/extensions/logging-providers.md index 97151fd560dfb..00225f62071d3 100644 --- a/docs/core/extensions/logging-providers.md +++ b/docs/core/extensions/logging-providers.md @@ -3,7 +3,7 @@ title: Logging providers description: Learn how the logging provider API is used in .NET applications. author: IEvangelist ms.author: dapine -ms.date: 03/28/2022 +ms.date: 03/13/2023 --- # Logging providers in .NET diff --git a/docs/core/extensions/logging.md b/docs/core/extensions/logging.md index 7456d072e242a..c1e015d914eca 100644 --- a/docs/core/extensions/logging.md +++ b/docs/core/extensions/logging.md @@ -1,12 +1,12 @@ --- -title: Logging +title: Logging in C# author: IEvangelist -description: Learn how to use the logging framework provided by the Microsoft.Extensions.Logging NuGet package. +description: Learn about app logging provided by the Microsoft.Extensions.Logging NuGet package in C#. ms.author: dapine -ms.date: 11/03/2022 +ms.date: 03/13/2023 --- -# Logging in .NET +# Logging in C# and .NET .NET supports a logging API that works with a variety of built-in and third-party logging providers. This article shows how to use the logging API with [built-in providers](logging-providers.md). The logging providers are responsible for determining where logs are written to. Most of the code examples shown in this article apply to any .NET app that uses the [Generic Host](generic-host.md). For apps that don't use the Generic Host, see [Non-host console app](#non-host-console-app). diff --git a/docs/core/extensions/media/workers/custom-actions-added.png b/docs/core/extensions/media/workers/custom-actions-added.png new file mode 100644 index 0000000000000..01b14285ac557 Binary files /dev/null and b/docs/core/extensions/media/workers/custom-actions-added.png differ diff --git a/docs/core/extensions/media/workers/custom-actions.png b/docs/core/extensions/media/workers/custom-actions.png new file mode 100644 index 0000000000000..9917f11365517 Binary files /dev/null and b/docs/core/extensions/media/workers/custom-actions.png differ diff --git a/docs/core/extensions/media/workers/f4-installer-properties.png b/docs/core/extensions/media/workers/f4-installer-properties.png new file mode 100644 index 0000000000000..4b94ee172e01e Binary files /dev/null and b/docs/core/extensions/media/workers/f4-installer-properties.png differ diff --git a/docs/core/extensions/media/workers/install-properties.png b/docs/core/extensions/media/workers/install-properties.png new file mode 100644 index 0000000000000..4e6aa8879e2a7 Binary files /dev/null and b/docs/core/extensions/media/workers/install-properties.png differ diff --git a/docs/core/extensions/media/workers/installer-complete.png b/docs/core/extensions/media/workers/installer-complete.png new file mode 100644 index 0000000000000..d0bd2a438f479 Binary files /dev/null and b/docs/core/extensions/media/workers/installer-complete.png differ diff --git a/docs/core/extensions/media/workers/installer-confirm.png b/docs/core/extensions/media/workers/installer-confirm.png new file mode 100644 index 0000000000000..5b5c2137592f2 Binary files /dev/null and b/docs/core/extensions/media/workers/installer-confirm.png differ diff --git a/docs/core/extensions/media/workers/installer-select-folder.png b/docs/core/extensions/media/workers/installer-select-folder.png new file mode 100644 index 0000000000000..02ed979998a8a Binary files /dev/null and b/docs/core/extensions/media/workers/installer-select-folder.png differ diff --git a/docs/core/extensions/media/workers/installer-welcome.png b/docs/core/extensions/media/workers/installer-welcome.png new file mode 100644 index 0000000000000..101dd24de4c5a Binary files /dev/null and b/docs/core/extensions/media/workers/installer-welcome.png differ diff --git a/docs/core/extensions/media/workers/new-setup-project.png b/docs/core/extensions/media/workers/new-setup-project.png new file mode 100644 index 0000000000000..1c43c603ab107 Binary files /dev/null and b/docs/core/extensions/media/workers/new-setup-project.png differ diff --git a/docs/core/extensions/media/workers/select-item-publish.png b/docs/core/extensions/media/workers/select-item-publish.png new file mode 100644 index 0000000000000..cf2cd05dc62c8 Binary files /dev/null and b/docs/core/extensions/media/workers/select-item-publish.png differ diff --git a/docs/core/extensions/media/workers/select-item.png b/docs/core/extensions/media/workers/select-item.png new file mode 100644 index 0000000000000..c8a5e9ba1ca70 Binary files /dev/null and b/docs/core/extensions/media/workers/select-item.png differ diff --git a/docs/core/extensions/options-library-authors.md b/docs/core/extensions/options-library-authors.md index 9f5b2c4678d3b..7bdde70d327d7 100644 --- a/docs/core/extensions/options-library-authors.md +++ b/docs/core/extensions/options-library-authors.md @@ -1,20 +1,20 @@ --- title: Options pattern guidance for .NET library authors author: IEvangelist -description: Learn how to expose the options pattern as a library author in .NET. +description: Learn how to expose the options pattern as a library author in .NET. Follow the guidance to ensure your library is correctly exposed to consumers. ms.author: dapine -ms.date: 11/09/2022 +ms.date: 03/13/2023 --- # Options pattern guidance for .NET library authors -With the help of dependency injection, registering your services and their corresponding configurations can make use of the *options pattern*. The options pattern enables consumers of your library (and your services) to require instances of [options interfaces](options.md#options-interfaces) where `TOptions` is your options class. Consuming configuration options through strongly-typed objects helps to ensure consistent value representation, and removes the burden of manually parsing string values. There are many [configuration providers](configuration-providers.md) for consumers of your library to use. With these providers, consumers can configure your library in many ways. +With the help of dependency injection, registering your services and their corresponding configurations can make use of the *options pattern*. The options pattern enables consumers of your library (and your services) to require instances of [options interfaces](options.md#options-interfaces) where `TOptions` is your options class. Consuming configuration options through strongly-typed objects helps to ensure consistent value representation, enables validation with data annotations, and removes the burden of manually parsing string values. There are many [configuration providers](configuration-providers.md) for consumers of your library to use. With these providers, consumers can configure your library in many ways. As a .NET library author, you'll learn general guidance on how to correctly expose the options pattern to consumers of your library. There are various ways to achieve the same thing, and several considerations to make. ## Naming conventions -By convention, extension methods responsible for registering services are named `Add{Service}`, where `{Service}` is a meaningful and descriptive name. `Add{Service}` extension methods are commonplace in [ASP.NET Core](/aspnet). +By convention, extension methods responsible for registering services are named `Add{Service}`, where `{Service}` is a meaningful and descriptive name. `Add{Service}` extension methods are commonplace in [ASP.NET Core](/aspnet) and .NET alike. ✔️ CONSIDER names that disambiguate your service from other offerings. @@ -74,6 +74,32 @@ As the library author, specifying default values is up to you. > (options, configuration) => > configuration.GetSection("LibraryOptions").Bind(options)); > ``` +> +> Instead, you should use the extension method. This extension method binds the configuration to the options instance, and also registers a change token source for the configuration section. This allows consumers to use the [IOptionsMonitor](options.md#ioptionsmonitor) interface. + +## Configuration section path parameter + +Consumers of your library may want to specify the configuration section path to bind your underlying `TOptions` type. In this scenario, you define a `string` parameter in your extension method. + +:::code source="snippets/configuration/options-validation-onstart/ServiceCollectionExtensions.cs" highlight="9"::: + +In the preceding code, the `AddMyLibraryService`: + +- Extends an instance of +- Defines a `string` parameter `configSectionPath` +- Calls: + - with the generic type parameter of `SupportOptions` + - with the given `configSectionPath` parameter + - to enable data annotation validation + - to enforce validation on start rather than in runtime + +In the next example, the [Microsoft.Extensions.Options.DataAnnotations](https://www.nuget.org/packages/Microsoft.Extensions.Options.DataAnnotations) NuGet package is used to enable data annotation validation. The `SupportOptions` class is defined as follows: + +:::code source="snippets/configuration/options-validation-onstart/SupportOptions.cs"::: + +Imagine that the following JSON _appsettings.json_ file is used: + +:::code source="snippets/configuration/options-validation-onstart/appsettings.json"::: ## `Action` parameter diff --git a/docs/core/extensions/options.md b/docs/core/extensions/options.md index 8f1571ee071b5..f606fb3d417cb 100644 --- a/docs/core/extensions/options.md +++ b/docs/core/extensions/options.md @@ -1,9 +1,9 @@ --- title: Options pattern author: IEvangelist -description: Learn how to use the options pattern to represent groups of related settings in .NET apps. +description: Learn the options pattern to represent groups of related settings in .NET apps. The options pattern uses classes to provide strongly-typed access to settings. ms.author: dapine -ms.date: 11/30/2022 +ms.date: 03/13/2023 --- # Options pattern in .NET @@ -118,6 +118,8 @@ In the preceding code, changes to the JSON configuration file after the app has is used by to cache `TOptions` instances. The invalidates options instances in the monitor so that the value is recomputed (). Values can be manually introduced with . The method is used when all named instances should be recreated on demand. + is used to fetch the that tracks changes to the underlying `TOptions` instance. For more information on change-token primitives, see [Change notifications](primitives.md). + ### Options interfaces benefits Using a generic wrapper type gives you the ability to decouple the lifetime of the option from the DI container. The interface provides a layer of abstraction, including generic constraints, on your options type. This provides the following benefits: diff --git a/docs/core/extensions/package-and-deploy-resources.md b/docs/core/extensions/package-and-deploy-resources.md index 6408f639f62f2..946e3cb4d87ae 100644 --- a/docs/core/extensions/package-and-deploy-resources.md +++ b/docs/core/extensions/package-and-deploy-resources.md @@ -1,7 +1,7 @@ --- title: "Package and deploy resources in .NET Apps" description: Package and deploy resources in .NET apps using a main assembly (hub) and satellite assemblies (spokes). A spoke contains localized resources but no code. -ms.date: 08/09/2021 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" diff --git a/docs/core/extensions/performing-culture-insensitive-case-changes.md b/docs/core/extensions/performing-culture-insensitive-case-changes.md index 076195fd57c3d..bdf78f1b81797 100644 --- a/docs/core/extensions/performing-culture-insensitive-case-changes.md +++ b/docs/core/extensions/performing-culture-insensitive-case-changes.md @@ -1,7 +1,7 @@ --- title: Perform culture-insensitive case changes description: "Learn how to perform culture-insensitive case changes" -ms.date: 06/06/2022 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" @@ -61,7 +61,7 @@ static object LookupKey(string key) ## Char.ToUpper and Char.ToLower -Although the `Char.ToUpper` and `Char.ToLower` methods have the same characteristics as the `String.ToUpper` and `String.ToLower` methods, the only cultures that are affected are Turkish (Turkey) and Azerbaijani (Latin, Azerbaijan). These are the only two cultures with single-character casing differences. For more details about this unique case mapping, see the "Casing" section in the class documentation. For code clarity and to ensure consistent results, it's recommended that you always use the overloads of these methods that accept a parameter. +Although the `Char.ToUpper` and `Char.ToLower` methods have the same characteristics as the `String.ToUpper` and `String.ToLower` methods, the only cultures that are affected are Turkish (Türkiye) and Azerbaijani (Latin, Azerbaijan). These are the only two cultures with single-character casing differences. For more details about this unique case mapping, see the "Casing" section in the class documentation. For code clarity and to ensure consistent results, it's recommended that you always use the overloads of these methods that accept a parameter. ## See also diff --git a/docs/core/extensions/performing-culture-insensitive-string-comparisons.md b/docs/core/extensions/performing-culture-insensitive-string-comparisons.md index ecb1aa883bdca..c54e20dcc0ca8 100644 --- a/docs/core/extensions/performing-culture-insensitive-string-comparisons.md +++ b/docs/core/extensions/performing-culture-insensitive-string-comparisons.md @@ -1,7 +1,7 @@ --- title: Perform culture-insensitive string comparisons description: "Learn how to perform culture-insensitive string comparisons" -ms.date: 08/11/2021 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" diff --git a/docs/core/extensions/performing-culture-insensitive-string-operations-in-arrays.md b/docs/core/extensions/performing-culture-insensitive-string-operations-in-arrays.md index 2d64d3b474364..353621b05f2b1 100644 --- a/docs/core/extensions/performing-culture-insensitive-string-operations-in-arrays.md +++ b/docs/core/extensions/performing-culture-insensitive-string-operations-in-arrays.md @@ -1,7 +1,7 @@ --- title: Perform culture-insensitive string operations in arrays description: Learn how to perform culture-insensitive string operations in arrays. -ms.date: 08/11/2021 +ms.date: 03/13/2023 helpviewer_keywords: - "culture-insensitive string operations, in arrays" - "arrays [.NET], culture-insensitive string operations" diff --git a/docs/core/extensions/performing-culture-insensitive-string-operations-in-collections.md b/docs/core/extensions/performing-culture-insensitive-string-operations-in-collections.md index c78e28cf776d1..66b9472280dc6 100644 --- a/docs/core/extensions/performing-culture-insensitive-string-operations-in-collections.md +++ b/docs/core/extensions/performing-culture-insensitive-string-operations-in-collections.md @@ -1,7 +1,7 @@ --- title: Perform culture-insensitive string operations in collections description: Learn how to perform culture-insensitive string operations in collections. -ms.date: 08/11/2021 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" diff --git a/docs/core/extensions/performing-culture-insensitive-string-operations.md b/docs/core/extensions/performing-culture-insensitive-string-operations.md index 1790e930f1b72..672e6611862b9 100644 --- a/docs/core/extensions/performing-culture-insensitive-string-operations.md +++ b/docs/core/extensions/performing-culture-insensitive-string-operations.md @@ -1,7 +1,7 @@ --- description: "Learn more about: Performing culture-insensitive string operations" title: "Performing Culture-Insensitive String Operations" -ms.date: 08/11/2021 +ms.date: 03/13/2023 helpviewer_keywords: - "case mappings" - "custom case mappings" diff --git a/docs/core/extensions/primitives.md b/docs/core/extensions/primitives.md index 0ba7b05f0e559..a1218ebd70418 100644 --- a/docs/core/extensions/primitives.md +++ b/docs/core/extensions/primitives.md @@ -3,7 +3,7 @@ title: "Use the Microsoft.Extensions.Primitives library" description: Learn about the various primitive types from the Microsoft.Extensions.Primitives library. author: IEvangelist ms.author: dapine -ms.date: 11/09/2022 +ms.date: 03/13/2023 --- # Primitives: The extensions library for .NET diff --git a/docs/core/extensions/queue-service.md b/docs/core/extensions/queue-service.md index e9f8d4135f9fa..7d078681395a4 100644 --- a/docs/core/extensions/queue-service.md +++ b/docs/core/extensions/queue-service.md @@ -3,7 +3,7 @@ title: Create a Queue Service description: Learn how to create a queue service subclass of BackgroundService in .NET. author: IEvangelist ms.author: dapine -ms.date: 11/12/2021 +ms.date: 03/13/2023 ms.topic: tutorial --- @@ -66,11 +66,11 @@ A `MonitorLoop` service handles enqueuing tasks for the hosted service whenever Replace the existing `Program` contents with the following C# code: -:::code source="snippets/workers/queue-service/Program.cs" highlight="6-16"::: +:::code source="snippets/workers/queue-service/Program.cs" highlight="4-14"::: -The services are registered in `IHostBuilder.ConfigureServices` (*Program.cs*). The hosted service is registered with the `AddHostedService` extension method. `MonitorLoop` is started in *Program.cs* top-level statement: +The services are registered in (*Program.cs*). The hosted service is registered with the `AddHostedService` extension method. `MonitorLoop` is started in *Program.cs* top-level statement: -:::code source="snippets/workers/queue-service/Program.cs" range="20-21"::: +:::code source="snippets/workers/queue-service/Program.cs" range="18-19"::: For more information on registering services, see [Dependency injection in .NET](dependency-injection.md). diff --git a/docs/core/extensions/resources.md b/docs/core/extensions/resources.md index 726fec334b8a7..70da39ecf5c69 100644 --- a/docs/core/extensions/resources.md +++ b/docs/core/extensions/resources.md @@ -1,7 +1,7 @@ --- title: "Resources in .NET apps" description: Understand resources in .NET apps. A resource is any non-executable data that's logically deployed with an app. -ms.date: 08/09/2021 +ms.date: 03/13/2023 helpviewer_keywords: - "deploying applications [.NET Framework], resources" - "deploying applications [.NET Core], resources" diff --git a/docs/core/extensions/retrieve-resources.md b/docs/core/extensions/retrieve-resources.md index 53da9b8342546..e69503771320d 100644 --- a/docs/core/extensions/retrieve-resources.md +++ b/docs/core/extensions/retrieve-resources.md @@ -1,7 +1,7 @@ --- title: "Retrieve resources in .NET apps" description: Retrieve resources in .NET apps. Package resources for the default (neutral) culture with the main assembly and create a satellite assembly for each culture. -ms.date: 08/09/2021 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" diff --git a/docs/core/extensions/scoped-service.md b/docs/core/extensions/scoped-service.md index 6c5c0e247f7cd..b2e144543bb30 100644 --- a/docs/core/extensions/scoped-service.md +++ b/docs/core/extensions/scoped-service.md @@ -3,7 +3,7 @@ title: Use scoped services within a BackgroundService description: Learn how to use scoped services within a BackgroundService in .NET. author: IEvangelist ms.author: dapine -ms.date: 11/12/2021 +ms.date: 03/13/2023 ms.topic: tutorial --- @@ -55,9 +55,9 @@ In the preceding code, an explicit scope is created and the `IScopedProcessingSe Replace the template *Program.cs* file contents with the following C# code: -:::code source="snippets/workers/scoped-service/Program.cs" highlight="6-7"::: +:::code source="snippets/workers/scoped-service/Program.cs" highlight="4-5"::: -The services are registered in `IHostBuilder.ConfigureServices` (*Program.cs*). The hosted service is registered with the `AddHostedService` extension method. +The services are registered in (*Program.cs*). The hosted service is registered with the `AddHostedService` extension method. For more information on registering services, see [Dependency injection in .NET](dependency-injection.md). diff --git a/docs/core/extensions/snippets/caching/distributed/distributed-apis.csproj b/docs/core/extensions/snippets/caching/distributed/distributed-apis.csproj index ec10405139ced..64431b599527a 100644 --- a/docs/core/extensions/snippets/caching/distributed/distributed-apis.csproj +++ b/docs/core/extensions/snippets/caching/distributed/distributed-apis.csproj @@ -10,7 +10,7 @@ - + diff --git a/docs/core/extensions/snippets/caching/memory-apis/memory-apis.csproj b/docs/core/extensions/snippets/caching/memory-apis/memory-apis.csproj index 95dae6c153b4a..2530836d6d64f 100644 --- a/docs/core/extensions/snippets/caching/memory-apis/memory-apis.csproj +++ b/docs/core/extensions/snippets/caching/memory-apis/memory-apis.csproj @@ -10,7 +10,7 @@ - + diff --git a/docs/core/extensions/snippets/caching/memory-worker/CacheWorker.cs b/docs/core/extensions/snippets/caching/memory-worker/CacheWorker.cs index 97bd66e7bd21f..81b2c4b2e4c58 100644 --- a/docs/core/extensions/snippets/caching/memory-worker/CacheWorker.cs +++ b/docs/core/extensions/snippets/caching/memory-worker/CacheWorker.cs @@ -11,6 +11,8 @@ public sealed class CacheWorker : BackgroundService private readonly IMemoryCache _cache; private readonly TimeSpan _updateInterval = TimeSpan.FromHours(3); + private bool _isCacheInitialized = false; + private const string Url = "https://jsonplaceholder.typicode.com/photos"; public CacheWorker( @@ -52,7 +54,11 @@ await _httpClient.GetFromJsonAsync( } finally { - _cacheSignal.Release(); + if (!_isCacheInitialized) + { + _cacheSignal.Release(); + _isCacheInitialized = true; + } } try diff --git a/docs/core/extensions/snippets/caching/memory-worker/Program.cs b/docs/core/extensions/snippets/caching/memory-worker/Program.cs index f616990a1dc0e..f3b6d39d46303 100644 --- a/docs/core/extensions/snippets/caching/memory-worker/Program.cs +++ b/docs/core/extensions/snippets/caching/memory-worker/Program.cs @@ -9,6 +9,7 @@ services.AddScoped(); services.AddSingleton(typeof(CacheSignal<>)); }) + .UseConsoleLifetime() .Build(); await host.StartAsync(); @@ -26,11 +27,10 @@ PhotoService service = scope.ServiceProvider.GetRequiredService(); - - IAsyncEnumerable photos = service.GetPhotosAsync(p => p.AlbumId == id); - await foreach (Photo photo in photos) + + await foreach (Photo photo in service.GetPhotosAsync(p => p.AlbumId == id)) { - logger.LogInformation(photo.ToString()); + logger.LogInformation("{PhotoDetails}", photo.ToString()); } logger.LogInformation(""); diff --git a/docs/core/extensions/snippets/caching/memory-worker/memory-worker.csproj b/docs/core/extensions/snippets/caching/memory-worker/memory-worker.csproj index 5b0eb48cbf22f..a06925f6f8780 100644 --- a/docs/core/extensions/snippets/caching/memory-worker/memory-worker.csproj +++ b/docs/core/extensions/snippets/caching/memory-worker/memory-worker.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/app-lifetime/app-lifetime.csproj b/docs/core/extensions/snippets/configuration/app-lifetime/app-lifetime.csproj index 6908a06be6677..b1d377b4b782a 100644 --- a/docs/core/extensions/snippets/configuration/app-lifetime/app-lifetime.csproj +++ b/docs/core/extensions/snippets/configuration/app-lifetime/app-lifetime.csproj @@ -9,7 +9,7 @@
- + diff --git a/docs/core/extensions/snippets/configuration/configuration.sln b/docs/core/extensions/snippets/configuration/configuration.sln new file mode 100644 index 0000000000000..1052086059309 --- /dev/null +++ b/docs/core/extensions/snippets/configuration/configuration.sln @@ -0,0 +1,175 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33103.184 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "options-noparams", "options-noparams\options-noparams.csproj", "{4405C5F8-8AE8-402E-9A27-2B2D4AC17CCC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "app-lifetime", "app-lifetime\app-lifetime.csproj", "{CC85E71B-ABA0-487E-AC26-DF1E97CA9818}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console", "console\console.csproj", "{E0CC8BD0-B9D0-4550-9F3D-97B1B8092D56}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-basic", "console-basic\console-basic.csproj", "{AF23C9B0-1BD2-45C3-A9C8-D6ED4D6C07BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-custom-logging", "console-custom-logging\console-custom-logging.csproj", "{43322C7A-36CD-4EBE-880F-EAAB26BEA8F1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-di", "console-di\console-di.csproj", "{0D667FE4-D288-44CC-954E-8E24F249C534}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-di-disposable", "console-di-disposable\console-di-disposable.csproj", "{1B517FD0-A269-4087-B58B-7DCC40C47866}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-di-ienumerable", "console-di-ienumerable\console-di-ienumerable.csproj", "{37083C11-8B5C-44AD-BE9C-6EE4DF4C232B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-env", "console-env\console-env.csproj", "{1CEEE236-B214-436E-9740-F90171777332}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-host", "console-host\console-host.csproj", "{8F38E687-904B-4862-BC76-720B55833715}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-indexer", "console-indexer\console-indexer.csproj", "{C27C1628-7D37-4650-A7BA-C3E7276161A9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-ini", "console-ini\console-ini.csproj", "{3447EDAF-A88D-4DA1-99A6-0D28D68AE5C0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-json", "console-json\console-json.csproj", "{B5266BA2-C346-4AA3-9F6C-3ED37554E25B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-memory", "console-memory\console-memory.csproj", "{0A1968B3-F2D2-443E-9037-8AE15A7C8024}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "worker-service", "worker-service\worker-service.csproj", "{3C0F7857-83F3-4D0C-B0EE-9B07F4B109E9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "worker-scope", "worker-scope\worker-scope.csproj", "{AD8DB169-24BC-4DD7-B25D-9C3ED5BDDA80}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "options-postconfig", "options-postconfig\options-postconfig.csproj", "{157EE285-7712-4CBC-BE10-7D4396E80D13}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "options-object", "options-object\options-object.csproj", "{51B53A59-6931-428C-A2A7-4C0AA35546FE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-raw", "console-raw\console-raw.csproj", "{845CE088-C8E2-4B35-B410-C16F970E5BE8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-xml", "console-xml\console-xml.csproj", "{84067C0B-A350-492A-85A7-725003A4D575}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "custom-provider", "custom-provider\custom-provider.csproj", "{B366FEA5-FB69-4CE2-87B9-2470FA3C69F1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dependency-injection", "dependency-injection\dependency-injection.csproj", "{E7F32B1F-46E6-4DAD-8929-F4C301202A70}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "di-anti-patterns", "di-anti-patterns\di-anti-patterns.csproj", "{BEF829E5-EED9-4B9D-8ECE-2DFC3C240946}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "options-action", "options-action\options-action.csproj", "{BBCE4882-E6C2-4017-B5F9-3AF4ED8CADF3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "options-configparam", "options-configparam\options-configparam.csproj", "{2EE94D26-59BA-4496-92DD-7D8AFAD1ED86}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "options-validation-onstart", "options-validation-onstart\options-validation-onstart.csproj", "{DA9A5838-2375-443A-A339-B5FFD941CE73}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4405C5F8-8AE8-402E-9A27-2B2D4AC17CCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4405C5F8-8AE8-402E-9A27-2B2D4AC17CCC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4405C5F8-8AE8-402E-9A27-2B2D4AC17CCC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4405C5F8-8AE8-402E-9A27-2B2D4AC17CCC}.Release|Any CPU.Build.0 = Release|Any CPU + {CC85E71B-ABA0-487E-AC26-DF1E97CA9818}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC85E71B-ABA0-487E-AC26-DF1E97CA9818}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC85E71B-ABA0-487E-AC26-DF1E97CA9818}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC85E71B-ABA0-487E-AC26-DF1E97CA9818}.Release|Any CPU.Build.0 = Release|Any CPU + {E0CC8BD0-B9D0-4550-9F3D-97B1B8092D56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0CC8BD0-B9D0-4550-9F3D-97B1B8092D56}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0CC8BD0-B9D0-4550-9F3D-97B1B8092D56}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0CC8BD0-B9D0-4550-9F3D-97B1B8092D56}.Release|Any CPU.Build.0 = Release|Any CPU + {AF23C9B0-1BD2-45C3-A9C8-D6ED4D6C07BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF23C9B0-1BD2-45C3-A9C8-D6ED4D6C07BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF23C9B0-1BD2-45C3-A9C8-D6ED4D6C07BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF23C9B0-1BD2-45C3-A9C8-D6ED4D6C07BC}.Release|Any CPU.Build.0 = Release|Any CPU + {43322C7A-36CD-4EBE-880F-EAAB26BEA8F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43322C7A-36CD-4EBE-880F-EAAB26BEA8F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43322C7A-36CD-4EBE-880F-EAAB26BEA8F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43322C7A-36CD-4EBE-880F-EAAB26BEA8F1}.Release|Any CPU.Build.0 = Release|Any CPU + {0D667FE4-D288-44CC-954E-8E24F249C534}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D667FE4-D288-44CC-954E-8E24F249C534}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D667FE4-D288-44CC-954E-8E24F249C534}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D667FE4-D288-44CC-954E-8E24F249C534}.Release|Any CPU.Build.0 = Release|Any CPU + {1B517FD0-A269-4087-B58B-7DCC40C47866}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B517FD0-A269-4087-B58B-7DCC40C47866}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B517FD0-A269-4087-B58B-7DCC40C47866}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B517FD0-A269-4087-B58B-7DCC40C47866}.Release|Any CPU.Build.0 = Release|Any CPU + {37083C11-8B5C-44AD-BE9C-6EE4DF4C232B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37083C11-8B5C-44AD-BE9C-6EE4DF4C232B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37083C11-8B5C-44AD-BE9C-6EE4DF4C232B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37083C11-8B5C-44AD-BE9C-6EE4DF4C232B}.Release|Any CPU.Build.0 = Release|Any CPU + {1CEEE236-B214-436E-9740-F90171777332}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1CEEE236-B214-436E-9740-F90171777332}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1CEEE236-B214-436E-9740-F90171777332}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1CEEE236-B214-436E-9740-F90171777332}.Release|Any CPU.Build.0 = Release|Any CPU + {8F38E687-904B-4862-BC76-720B55833715}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F38E687-904B-4862-BC76-720B55833715}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F38E687-904B-4862-BC76-720B55833715}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F38E687-904B-4862-BC76-720B55833715}.Release|Any CPU.Build.0 = Release|Any CPU + {C27C1628-7D37-4650-A7BA-C3E7276161A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C27C1628-7D37-4650-A7BA-C3E7276161A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C27C1628-7D37-4650-A7BA-C3E7276161A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C27C1628-7D37-4650-A7BA-C3E7276161A9}.Release|Any CPU.Build.0 = Release|Any CPU + {3447EDAF-A88D-4DA1-99A6-0D28D68AE5C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3447EDAF-A88D-4DA1-99A6-0D28D68AE5C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3447EDAF-A88D-4DA1-99A6-0D28D68AE5C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3447EDAF-A88D-4DA1-99A6-0D28D68AE5C0}.Release|Any CPU.Build.0 = Release|Any CPU + {B5266BA2-C346-4AA3-9F6C-3ED37554E25B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5266BA2-C346-4AA3-9F6C-3ED37554E25B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5266BA2-C346-4AA3-9F6C-3ED37554E25B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5266BA2-C346-4AA3-9F6C-3ED37554E25B}.Release|Any CPU.Build.0 = Release|Any CPU + {0A1968B3-F2D2-443E-9037-8AE15A7C8024}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A1968B3-F2D2-443E-9037-8AE15A7C8024}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A1968B3-F2D2-443E-9037-8AE15A7C8024}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A1968B3-F2D2-443E-9037-8AE15A7C8024}.Release|Any CPU.Build.0 = Release|Any CPU + {3C0F7857-83F3-4D0C-B0EE-9B07F4B109E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C0F7857-83F3-4D0C-B0EE-9B07F4B109E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C0F7857-83F3-4D0C-B0EE-9B07F4B109E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C0F7857-83F3-4D0C-B0EE-9B07F4B109E9}.Release|Any CPU.Build.0 = Release|Any CPU + {AD8DB169-24BC-4DD7-B25D-9C3ED5BDDA80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD8DB169-24BC-4DD7-B25D-9C3ED5BDDA80}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD8DB169-24BC-4DD7-B25D-9C3ED5BDDA80}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD8DB169-24BC-4DD7-B25D-9C3ED5BDDA80}.Release|Any CPU.Build.0 = Release|Any CPU + {157EE285-7712-4CBC-BE10-7D4396E80D13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {157EE285-7712-4CBC-BE10-7D4396E80D13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {157EE285-7712-4CBC-BE10-7D4396E80D13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {157EE285-7712-4CBC-BE10-7D4396E80D13}.Release|Any CPU.Build.0 = Release|Any CPU + {51B53A59-6931-428C-A2A7-4C0AA35546FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51B53A59-6931-428C-A2A7-4C0AA35546FE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51B53A59-6931-428C-A2A7-4C0AA35546FE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51B53A59-6931-428C-A2A7-4C0AA35546FE}.Release|Any CPU.Build.0 = Release|Any CPU + {845CE088-C8E2-4B35-B410-C16F970E5BE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {845CE088-C8E2-4B35-B410-C16F970E5BE8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {845CE088-C8E2-4B35-B410-C16F970E5BE8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {845CE088-C8E2-4B35-B410-C16F970E5BE8}.Release|Any CPU.Build.0 = Release|Any CPU + {84067C0B-A350-492A-85A7-725003A4D575}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84067C0B-A350-492A-85A7-725003A4D575}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84067C0B-A350-492A-85A7-725003A4D575}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84067C0B-A350-492A-85A7-725003A4D575}.Release|Any CPU.Build.0 = Release|Any CPU + {B366FEA5-FB69-4CE2-87B9-2470FA3C69F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B366FEA5-FB69-4CE2-87B9-2470FA3C69F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B366FEA5-FB69-4CE2-87B9-2470FA3C69F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B366FEA5-FB69-4CE2-87B9-2470FA3C69F1}.Release|Any CPU.Build.0 = Release|Any CPU + {E7F32B1F-46E6-4DAD-8929-F4C301202A70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7F32B1F-46E6-4DAD-8929-F4C301202A70}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7F32B1F-46E6-4DAD-8929-F4C301202A70}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7F32B1F-46E6-4DAD-8929-F4C301202A70}.Release|Any CPU.Build.0 = Release|Any CPU + {BEF829E5-EED9-4B9D-8ECE-2DFC3C240946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEF829E5-EED9-4B9D-8ECE-2DFC3C240946}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEF829E5-EED9-4B9D-8ECE-2DFC3C240946}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEF829E5-EED9-4B9D-8ECE-2DFC3C240946}.Release|Any CPU.Build.0 = Release|Any CPU + {BBCE4882-E6C2-4017-B5F9-3AF4ED8CADF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BBCE4882-E6C2-4017-B5F9-3AF4ED8CADF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BBCE4882-E6C2-4017-B5F9-3AF4ED8CADF3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BBCE4882-E6C2-4017-B5F9-3AF4ED8CADF3}.Release|Any CPU.Build.0 = Release|Any CPU + {2EE94D26-59BA-4496-92DD-7D8AFAD1ED86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2EE94D26-59BA-4496-92DD-7D8AFAD1ED86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2EE94D26-59BA-4496-92DD-7D8AFAD1ED86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2EE94D26-59BA-4496-92DD-7D8AFAD1ED86}.Release|Any CPU.Build.0 = Release|Any CPU + {DA9A5838-2375-443A-A339-B5FFD941CE73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA9A5838-2375-443A-A339-B5FFD941CE73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA9A5838-2375-443A-A339-B5FFD941CE73}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA9A5838-2375-443A-A339-B5FFD941CE73}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {790BCEF5-7E91-4001-BB0F-0470F32C47FE} + EndGlobalSection +EndGlobal diff --git a/docs/core/extensions/snippets/configuration/console-basic/console-basic.csproj b/docs/core/extensions/snippets/configuration/console-basic/console-basic.csproj index 30e9a9b52dc99..4ae04643ea3df 100644 --- a/docs/core/extensions/snippets/configuration/console-basic/console-basic.csproj +++ b/docs/core/extensions/snippets/configuration/console-basic/console-basic.csproj @@ -14,7 +14,7 @@
- + diff --git a/docs/core/extensions/snippets/configuration/console-custom-logging/Program.cs b/docs/core/extensions/snippets/configuration/console-custom-logging/Program.cs index b4993bad6aa12..741f5efd2aae6 100644 --- a/docs/core/extensions/snippets/configuration/console-custom-logging/Program.cs +++ b/docs/core/extensions/snippets/configuration/console-custom-logging/Program.cs @@ -20,6 +20,6 @@ logger.LogInformation(3, "Nothing to see here."); // Logs in ConsoleColor.DarkGreen logger.LogWarning(5, "Warning... that was odd."); // Logs in ConsoleColor.DarkCyan logger.LogError(7, "Oops, there was an error."); // Logs in ConsoleColor.DarkRed -logger.LogTrace(5!, "== 120."); // Not logged +logger.LogTrace(5, "== 120."); // Not logged await host.RunAsync(); diff --git a/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj b/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj index 2c81c7bf3c164..66663cfd23140 100644 --- a/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj +++ b/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj @@ -19,7 +19,7 @@
- + diff --git a/docs/core/extensions/snippets/configuration/console-di-disposable/console-di-disposable.csproj b/docs/core/extensions/snippets/configuration/console-di-disposable/console-di-disposable.csproj index 1be9cfd42850e..04daf42620ca3 100644 --- a/docs/core/extensions/snippets/configuration/console-di-disposable/console-di-disposable.csproj +++ b/docs/core/extensions/snippets/configuration/console-di-disposable/console-di-disposable.csproj @@ -9,7 +9,7 @@
- + diff --git a/docs/core/extensions/snippets/configuration/console-di-ienumerable/console-di-ienumerable.csproj b/docs/core/extensions/snippets/configuration/console-di-ienumerable/console-di-ienumerable.csproj index cfd787f844ebb..c6db307c75b90 100644 --- a/docs/core/extensions/snippets/configuration/console-di-ienumerable/console-di-ienumerable.csproj +++ b/docs/core/extensions/snippets/configuration/console-di-ienumerable/console-di-ienumerable.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-di/console-di.csproj b/docs/core/extensions/snippets/configuration/console-di/console-di.csproj index 3bca6d57b6a35..eeb3d1b5ecfd2 100644 --- a/docs/core/extensions/snippets/configuration/console-di/console-di.csproj +++ b/docs/core/extensions/snippets/configuration/console-di/console-di.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-env/console-env.csproj b/docs/core/extensions/snippets/configuration/console-env/console-env.csproj index 4a3321af22976..df4c2f83089e0 100644 --- a/docs/core/extensions/snippets/configuration/console-env/console-env.csproj +++ b/docs/core/extensions/snippets/configuration/console-env/console-env.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-host/console-host.csproj b/docs/core/extensions/snippets/configuration/console-host/console-host.csproj index ea303d4a6f1af..7412bfe1b3af3 100644 --- a/docs/core/extensions/snippets/configuration/console-host/console-host.csproj +++ b/docs/core/extensions/snippets/configuration/console-host/console-host.csproj @@ -20,7 +20,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj b/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj index 30e9a9b52dc99..4ae04643ea3df 100644 --- a/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj +++ b/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj @@ -14,7 +14,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-ini/console-ini.csproj b/docs/core/extensions/snippets/configuration/console-ini/console-ini.csproj index 0359d5c44d20a..9d52125d89568 100644 --- a/docs/core/extensions/snippets/configuration/console-ini/console-ini.csproj +++ b/docs/core/extensions/snippets/configuration/console-ini/console-ini.csproj @@ -20,7 +20,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-json/ValidateSettingsOptions.cs b/docs/core/extensions/snippets/configuration/console-json/ValidateSettingsOptions.cs index 74c6daf3722dc..925a26f4203cc 100644 --- a/docs/core/extensions/snippets/configuration/console-json/ValidateSettingsOptions.cs +++ b/docs/core/extensions/snippets/configuration/console-json/ValidateSettingsOptions.cs @@ -16,14 +16,14 @@ public ValidateSettingsOptions(IConfiguration config) => public ValidateOptionsResult Validate(string? name, SettingsOptions options) { StringBuilder failure = new(); - var rx = ValidationRegex(); - Match match = rx.Match(options.SiteTitle); + Regex validationRegex = ValidationRegex(); + Match match = validationRegex.Match(options.SiteTitle); if (string.IsNullOrEmpty(match.Value)) { failure.AppendLine($"{options.SiteTitle} doesn't match RegEx"); } - if (options.Scale < 0 || options.Scale > 1000) + if (options.Scale is < 0 or > 1_000) { failure.AppendLine($"{options.Scale} isn't within Range 0 - 1000"); } diff --git a/docs/core/extensions/snippets/configuration/console-json/console-json.csproj b/docs/core/extensions/snippets/configuration/console-json/console-json.csproj index 5ad5b901a1f90..a3384720440a6 100644 --- a/docs/core/extensions/snippets/configuration/console-json/console-json.csproj +++ b/docs/core/extensions/snippets/configuration/console-json/console-json.csproj @@ -20,7 +20,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-memory/console-memory.csproj b/docs/core/extensions/snippets/configuration/console-memory/console-memory.csproj index 682666ced0b5d..3a055910a1f0a 100644 --- a/docs/core/extensions/snippets/configuration/console-memory/console-memory.csproj +++ b/docs/core/extensions/snippets/configuration/console-memory/console-memory.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-raw/console-raw.csproj b/docs/core/extensions/snippets/configuration/console-raw/console-raw.csproj index fd93d1dfb8e8d..8a58f1b6508e7 100644 --- a/docs/core/extensions/snippets/configuration/console-raw/console-raw.csproj +++ b/docs/core/extensions/snippets/configuration/console-raw/console-raw.csproj @@ -14,7 +14,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj b/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj index 7416dff98081e..5e5ca29d61109 100644 --- a/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj +++ b/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj @@ -24,7 +24,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console/console.csproj b/docs/core/extensions/snippets/configuration/console/console.csproj index e54505b9355bc..d5dab9a39277d 100644 --- a/docs/core/extensions/snippets/configuration/console/console.csproj +++ b/docs/core/extensions/snippets/configuration/console/console.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/custom-provider/custom-provider.csproj b/docs/core/extensions/snippets/configuration/custom-provider/custom-provider.csproj index 8d5369fd4b5b5..e33d12aefcf7a 100644 --- a/docs/core/extensions/snippets/configuration/custom-provider/custom-provider.csproj +++ b/docs/core/extensions/snippets/configuration/custom-provider/custom-provider.csproj @@ -9,10 +9,10 @@ - - - - + + + + diff --git a/docs/core/extensions/snippets/configuration/dependency-injection/dependency-injection.csproj b/docs/core/extensions/snippets/configuration/dependency-injection/dependency-injection.csproj index c83520c5f94b6..c7661f1715d15 100644 --- a/docs/core/extensions/snippets/configuration/dependency-injection/dependency-injection.csproj +++ b/docs/core/extensions/snippets/configuration/dependency-injection/dependency-injection.csproj @@ -8,6 +8,6 @@ - + diff --git a/docs/core/extensions/snippets/configuration/di-anti-patterns/di-anti-patterns.csproj b/docs/core/extensions/snippets/configuration/di-anti-patterns/di-anti-patterns.csproj index 9d8eee770c161..5362363c6ed2e 100644 --- a/docs/core/extensions/snippets/configuration/di-anti-patterns/di-anti-patterns.csproj +++ b/docs/core/extensions/snippets/configuration/di-anti-patterns/di-anti-patterns.csproj @@ -8,6 +8,6 @@ - + diff --git a/docs/core/extensions/snippets/configuration/options-action/options-action.csproj b/docs/core/extensions/snippets/configuration/options-action/options-action.csproj index 88ce9946dc714..3d859a073a976 100644 --- a/docs/core/extensions/snippets/configuration/options-action/options-action.csproj +++ b/docs/core/extensions/snippets/configuration/options-action/options-action.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/options-configparam/options-configparam.csproj b/docs/core/extensions/snippets/configuration/options-configparam/options-configparam.csproj index 64728a06e4395..6a6a3588b3e2d 100644 --- a/docs/core/extensions/snippets/configuration/options-configparam/options-configparam.csproj +++ b/docs/core/extensions/snippets/configuration/options-configparam/options-configparam.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/options-noparams/options-noparams.csproj b/docs/core/extensions/snippets/configuration/options-noparams/options-noparams.csproj index f393b72ba1369..c4aeef0a0ac58 100644 --- a/docs/core/extensions/snippets/configuration/options-noparams/options-noparams.csproj +++ b/docs/core/extensions/snippets/configuration/options-noparams/options-noparams.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/options-object/options-object.csproj b/docs/core/extensions/snippets/configuration/options-object/options-object.csproj index 124d361d87cdb..a46ea0864cfa6 100644 --- a/docs/core/extensions/snippets/configuration/options-object/options-object.csproj +++ b/docs/core/extensions/snippets/configuration/options-object/options-object.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj b/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj index 9cae1eadae574..177fb96310088 100644 --- a/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj +++ b/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/options-validation-onstart/Program.cs b/docs/core/extensions/snippets/configuration/options-validation-onstart/Program.cs new file mode 100644 index 0000000000000..582020e1f27dd --- /dev/null +++ b/docs/core/extensions/snippets/configuration/options-validation-onstart/Program.cs @@ -0,0 +1,34 @@ +using ExampleLibrary.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Options; + +using IHost host = Host.CreateDefaultBuilder(args) + .ConfigureServices(static services => + { + services.AddMyLibraryService("Support"); + }) + .Build(); + +IOptionsMonitor options = host.Services + .GetRequiredService>(); + +WriteSupportOptions(options.CurrentValue); + +using (options.OnChange( + listener: static (SupportOptions changedSupportOptions, string? _) => + WriteSupportOptions(changedSupportOptions))) +{ + // While this is running, update the appsettings.json file in the Debug folder. + await host.RunAsync(); +} + +static void WriteSupportOptions(SupportOptions support) => + Console.WriteLine($""" + + Support options: + URL: {support.Url} + Email: {support.Email} + Phone number: {support.PhoneNumber} + + """); diff --git a/docs/core/extensions/snippets/configuration/options-validation-onstart/ServiceCollectionExtensions.cs b/docs/core/extensions/snippets/configuration/options-validation-onstart/ServiceCollectionExtensions.cs new file mode 100644 index 0000000000000..3f6e8cf3f5080 --- /dev/null +++ b/docs/core/extensions/snippets/configuration/options-validation-onstart/ServiceCollectionExtensions.cs @@ -0,0 +1,21 @@ +using Microsoft.Extensions.DependencyInjection; + +namespace ExampleLibrary.Extensions.DependencyInjection; + +public static class ServiceCollectionExtensions +{ + public static IServiceCollection AddMyLibraryService( + this IServiceCollection services, + string configSectionPath) + { + services.AddOptions() + .BindConfiguration(configSectionPath) + .ValidateDataAnnotations() + .ValidateOnStart(); + + // Register lib services here... + // services.AddScoped(); + + return services; + } +} diff --git a/docs/core/extensions/snippets/configuration/options-validation-onstart/SupportOptions.cs b/docs/core/extensions/snippets/configuration/options-validation-onstart/SupportOptions.cs new file mode 100644 index 0000000000000..8bf7c47936e9f --- /dev/null +++ b/docs/core/extensions/snippets/configuration/options-validation-onstart/SupportOptions.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +public sealed class SupportOptions +{ + [Url] + public string? Url { get; set; } + + [Required, EmailAddress] + public required string Email { get; set; } + + [Required, DataType(DataType.PhoneNumber)] + public required string PhoneNumber { get; set; } +} diff --git a/docs/core/extensions/snippets/configuration/options-validation-onstart/appsettings.json b/docs/core/extensions/snippets/configuration/options-validation-onstart/appsettings.json new file mode 100644 index 0000000000000..0a86bfe4a1f12 --- /dev/null +++ b/docs/core/extensions/snippets/configuration/options-validation-onstart/appsettings.json @@ -0,0 +1,7 @@ +{ + "Support": { + "Url": "https://support.example.com", + "Email": "help@support.example.com", + "PhoneNumber": "+1(888)-SUPPORT" + } +} diff --git a/docs/core/extensions/snippets/configuration/options-validation-onstart/options-validation-onstart.csproj b/docs/core/extensions/snippets/configuration/options-validation-onstart/options-validation-onstart.csproj new file mode 100644 index 0000000000000..3633363d0b094 --- /dev/null +++ b/docs/core/extensions/snippets/configuration/options-validation-onstart/options-validation-onstart.csproj @@ -0,0 +1,26 @@ + + + + Exe + net7.0 + enable + true + Options.ValidateOnStart + + + + + + + + + Always + + + + + + + + + diff --git a/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj b/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj index 39115e1f0c8d4..55397db5e3a99 100644 --- a/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj +++ b/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj @@ -8,6 +8,6 @@ - + diff --git a/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj b/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj index a729180fd04ca..8a9909b79aba5 100644 --- a/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj +++ b/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj @@ -9,6 +9,6 @@ - + diff --git a/docs/core/extensions/snippets/fileglobbing/example/example.csproj b/docs/core/extensions/snippets/fileglobbing/example/example.csproj index 2d3ced2d61f1a..9656f03507069 100644 --- a/docs/core/extensions/snippets/fileglobbing/example/example.csproj +++ b/docs/core/extensions/snippets/fileglobbing/example/example.csproj @@ -59,7 +59,7 @@ - + diff --git a/docs/core/extensions/snippets/http/basic/basic.csproj b/docs/core/extensions/snippets/http/basic/basic.csproj index 41076af2d35c6..8f376b6bd9acd 100644 --- a/docs/core/extensions/snippets/http/basic/basic.csproj +++ b/docs/core/extensions/snippets/http/basic/basic.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/http/configurehandler/configurehandler.csproj b/docs/core/extensions/snippets/http/configurehandler/configurehandler.csproj index ffd3f0eb98e29..778c4a1f203ae 100644 --- a/docs/core/extensions/snippets/http/configurehandler/configurehandler.csproj +++ b/docs/core/extensions/snippets/http/configurehandler/configurehandler.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/http/generated/generated.csproj b/docs/core/extensions/snippets/http/generated/generated.csproj index 828a29b6094a1..87b731b4f68cb 100644 --- a/docs/core/extensions/snippets/http/generated/generated.csproj +++ b/docs/core/extensions/snippets/http/generated/generated.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/http/named/named.csproj b/docs/core/extensions/snippets/http/named/named.csproj index ac7cdc8bf349d..5904b201e0ece 100644 --- a/docs/core/extensions/snippets/http/named/named.csproj +++ b/docs/core/extensions/snippets/http/named/named.csproj @@ -19,7 +19,7 @@ - + diff --git a/docs/core/extensions/snippets/http/typed/typed.csproj b/docs/core/extensions/snippets/http/typed/typed.csproj index 79f74900e3ffd..a9646856b2a61 100644 --- a/docs/core/extensions/snippets/http/typed/typed.csproj +++ b/docs/core/extensions/snippets/http/typed/typed.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/localization/example/example.csproj b/docs/core/extensions/snippets/localization/example/example.csproj index 4b6efbc3e7728..abd351cd40645 100644 --- a/docs/core/extensions/snippets/localization/example/example.csproj +++ b/docs/core/extensions/snippets/localization/example/example.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/logging/console-formatter-custom-with-config/console-formatter-custom-with-config.csproj b/docs/core/extensions/snippets/logging/console-formatter-custom-with-config/console-formatter-custom-with-config.csproj index d5d70fcb5d0f5..fcc3c462bba06 100644 --- a/docs/core/extensions/snippets/logging/console-formatter-custom-with-config/console-formatter-custom-with-config.csproj +++ b/docs/core/extensions/snippets/logging/console-formatter-custom-with-config/console-formatter-custom-with-config.csproj @@ -19,7 +19,7 @@ - + diff --git a/docs/core/extensions/snippets/logging/console-formatter-custom/console-formatter-custom.csproj b/docs/core/extensions/snippets/logging/console-formatter-custom/console-formatter-custom.csproj index 80f4fd2211288..294f07cac7355 100644 --- a/docs/core/extensions/snippets/logging/console-formatter-custom/console-formatter-custom.csproj +++ b/docs/core/extensions/snippets/logging/console-formatter-custom/console-formatter-custom.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/logging/console-formatter-json/console-formatter-json.csproj b/docs/core/extensions/snippets/logging/console-formatter-json/console-formatter-json.csproj index 8356b49a1ddf5..b93361e63380e 100644 --- a/docs/core/extensions/snippets/logging/console-formatter-json/console-formatter-json.csproj +++ b/docs/core/extensions/snippets/logging/console-formatter-json/console-formatter-json.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/logging/console-formatter-simple/console-formatter-simple.csproj b/docs/core/extensions/snippets/logging/console-formatter-simple/console-formatter-simple.csproj index be5b244a12f72..e3ce4e77d58a3 100644 --- a/docs/core/extensions/snippets/logging/console-formatter-simple/console-formatter-simple.csproj +++ b/docs/core/extensions/snippets/logging/console-formatter-simple/console-formatter-simple.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/logging/console-formatter-systemd/console-formatter-systemd.csproj b/docs/core/extensions/snippets/logging/console-formatter-systemd/console-formatter-systemd.csproj index a28e6f118f2e5..4635ba0994825 100644 --- a/docs/core/extensions/snippets/logging/console-formatter-systemd/console-formatter-systemd.csproj +++ b/docs/core/extensions/snippets/logging/console-formatter-systemd/console-formatter-systemd.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/logging/logging.sln b/docs/core/extensions/snippets/logging/logging.sln new file mode 100644 index 0000000000000..f2439aa2e4ae6 --- /dev/null +++ b/docs/core/extensions/snippets/logging/logging.sln @@ -0,0 +1,61 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32616.157 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-formatter-custom", "console-formatter-custom\console-formatter-custom.csproj", "{88C85579-02B5-4390-8D46-C8DE357ED069}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-formatter-custom-with-config", "console-formatter-custom-with-config\console-formatter-custom-with-config.csproj", "{84CA23D9-26F3-4092-89C4-E190CBDAA73B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-formatter-json", "console-formatter-json\console-formatter-json.csproj", "{6AB3E830-961E-432C-ABBA-9A4A413F1E0B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-formatter-simple", "console-formatter-simple\console-formatter-simple.csproj", "{083C961C-A45B-4721-A24A-7857592FF730}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "console-formatter-systemd", "console-formatter-systemd\console-formatter-systemd.csproj", "{55B4967D-4E68-4E6F-BEB4-0C61E676E683}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "worker-service-options", "worker-service-options\worker-service-options.csproj", "{2D23DB42-7FAF-452E-9AD2-36E925065270}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "logger-message-generator", "logger-message-generator\logger-message-generator.csproj", "{93C2255D-2CED-4C0A-8B2A-3191B0B85C7B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {88C85579-02B5-4390-8D46-C8DE357ED069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88C85579-02B5-4390-8D46-C8DE357ED069}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88C85579-02B5-4390-8D46-C8DE357ED069}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88C85579-02B5-4390-8D46-C8DE357ED069}.Release|Any CPU.Build.0 = Release|Any CPU + {84CA23D9-26F3-4092-89C4-E190CBDAA73B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84CA23D9-26F3-4092-89C4-E190CBDAA73B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84CA23D9-26F3-4092-89C4-E190CBDAA73B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84CA23D9-26F3-4092-89C4-E190CBDAA73B}.Release|Any CPU.Build.0 = Release|Any CPU + {6AB3E830-961E-432C-ABBA-9A4A413F1E0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6AB3E830-961E-432C-ABBA-9A4A413F1E0B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6AB3E830-961E-432C-ABBA-9A4A413F1E0B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6AB3E830-961E-432C-ABBA-9A4A413F1E0B}.Release|Any CPU.Build.0 = Release|Any CPU + {083C961C-A45B-4721-A24A-7857592FF730}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {083C961C-A45B-4721-A24A-7857592FF730}.Debug|Any CPU.Build.0 = Debug|Any CPU + {083C961C-A45B-4721-A24A-7857592FF730}.Release|Any CPU.ActiveCfg = Release|Any CPU + {083C961C-A45B-4721-A24A-7857592FF730}.Release|Any CPU.Build.0 = Release|Any CPU + {55B4967D-4E68-4E6F-BEB4-0C61E676E683}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55B4967D-4E68-4E6F-BEB4-0C61E676E683}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55B4967D-4E68-4E6F-BEB4-0C61E676E683}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55B4967D-4E68-4E6F-BEB4-0C61E676E683}.Release|Any CPU.Build.0 = Release|Any CPU + {2D23DB42-7FAF-452E-9AD2-36E925065270}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D23DB42-7FAF-452E-9AD2-36E925065270}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D23DB42-7FAF-452E-9AD2-36E925065270}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D23DB42-7FAF-452E-9AD2-36E925065270}.Release|Any CPU.Build.0 = Release|Any CPU + {93C2255D-2CED-4C0A-8B2A-3191B0B85C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93C2255D-2CED-4C0A-8B2A-3191B0B85C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93C2255D-2CED-4C0A-8B2A-3191B0B85C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93C2255D-2CED-4C0A-8B2A-3191B0B85C7B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9F9DEFD0-1FD9-461E-9409-D4A6B653139E} + EndGlobalSection +EndGlobal diff --git a/docs/core/extensions/snippets/logging/worker-service-options/worker-service-options.csproj b/docs/core/extensions/snippets/logging/worker-service-options/worker-service-options.csproj index e30d6459ec98e..c0e780c9897f1 100644 --- a/docs/core/extensions/snippets/logging/worker-service-options/worker-service-options.csproj +++ b/docs/core/extensions/snippets/logging/worker-service-options/worker-service-options.csproj @@ -10,6 +10,6 @@ - + diff --git a/docs/core/extensions/snippets/primitives/primitives.sln b/docs/core/extensions/snippets/primitives/primitives.sln new file mode 100644 index 0000000000000..00ba479b5ea24 --- /dev/null +++ b/docs/core/extensions/snippets/primitives/primitives.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33103.184 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tokens", "change\tokens.csproj", "{99084C96-1059-42D0-96CD-4B76652EB94D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tokenizers", "string\tokenizers.csproj", "{5BF0AD00-3D81-428D-9247-03E0E263EFC4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {99084C96-1059-42D0-96CD-4B76652EB94D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99084C96-1059-42D0-96CD-4B76652EB94D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99084C96-1059-42D0-96CD-4B76652EB94D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99084C96-1059-42D0-96CD-4B76652EB94D}.Release|Any CPU.Build.0 = Release|Any CPU + {5BF0AD00-3D81-428D-9247-03E0E263EFC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BF0AD00-3D81-428D-9247-03E0E263EFC4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BF0AD00-3D81-428D-9247-03E0E263EFC4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BF0AD00-3D81-428D-9247-03E0E263EFC4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B3656239-8FB9-46D4-BA8B-0B969C592ACD} + EndGlobalSection +EndGlobal diff --git a/docs/core/extensions/snippets/primitives/string/tokenizers.csproj b/docs/core/extensions/snippets/primitives/string/tokenizers.csproj index 04869bda6b2a7..5628399667f39 100644 --- a/docs/core/extensions/snippets/primitives/string/tokenizers.csproj +++ b/docs/core/extensions/snippets/primitives/string/tokenizers.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/workers/background-service/App.WorkerService.csproj b/docs/core/extensions/snippets/workers/background-service/App.WorkerService.csproj index f3260c465857a..5e5d55dda6ba6 100644 --- a/docs/core/extensions/snippets/workers/background-service/App.WorkerService.csproj +++ b/docs/core/extensions/snippets/workers/background-service/App.WorkerService.csproj @@ -9,7 +9,7 @@ - - + + diff --git a/docs/core/extensions/snippets/workers/background-service/Program.cs b/docs/core/extensions/snippets/workers/background-service/Program.cs index 0ffba7505c597..bfa3c61301005 100644 --- a/docs/core/extensions/snippets/workers/background-service/Program.cs +++ b/docs/core/extensions/snippets/workers/background-service/Program.cs @@ -1,10 +1,7 @@ using App.WorkerService; -IHost host = Host.CreateDefaultBuilder(args) - .ConfigureServices(services => - { - services.AddHostedService(); - }) - .Build(); +HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); +builder.Services.AddHostedService(); -await host.RunAsync(); +IHost host = builder.Build(); +host.Run(); diff --git a/docs/core/extensions/snippets/workers/cloud-service/App.CloudService.csproj b/docs/core/extensions/snippets/workers/cloud-service/App.CloudService.csproj index f507d27650730..3d832daf60464 100644 --- a/docs/core/extensions/snippets/workers/cloud-service/App.CloudService.csproj +++ b/docs/core/extensions/snippets/workers/cloud-service/App.CloudService.csproj @@ -7,7 +7,7 @@ Linux - - + + diff --git a/docs/core/extensions/snippets/workers/cloud-service/Program.cs b/docs/core/extensions/snippets/workers/cloud-service/Program.cs index b587a4dbc00b1..17ce520bbdbd6 100644 --- a/docs/core/extensions/snippets/workers/cloud-service/Program.cs +++ b/docs/core/extensions/snippets/workers/cloud-service/Program.cs @@ -1,10 +1,7 @@ using App.CloudService; -using IHost host = Host.CreateDefaultBuilder(args) - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }) - .Build(); +HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); +builder.Services.AddHostedService(); -await host.RunAsync(); +IHost host = builder.Build(); +host.Run(); diff --git a/docs/core/extensions/snippets/workers/queue-service/App.QueueService.csproj b/docs/core/extensions/snippets/workers/queue-service/App.QueueService.csproj index 0b4f2346300b2..6a5505f2ecf3c 100644 --- a/docs/core/extensions/snippets/workers/queue-service/App.QueueService.csproj +++ b/docs/core/extensions/snippets/workers/queue-service/App.QueueService.csproj @@ -8,6 +8,6 @@ - + diff --git a/docs/core/extensions/snippets/workers/queue-service/Program.cs b/docs/core/extensions/snippets/workers/queue-service/Program.cs index 3110394111794..6869fbaaea6bf 100644 --- a/docs/core/extensions/snippets/workers/queue-service/Program.cs +++ b/docs/core/extensions/snippets/workers/queue-service/Program.cs @@ -1,23 +1,21 @@ using App.QueueService; -using IHost host = Host.CreateDefaultBuilder(args) - .ConfigureServices((context, services) => +HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); +builder.Services.AddSingleton(); +builder.Services.AddHostedService(); +builder.Services.AddSingleton(_ => +{ + if (!int.TryParse(builder.Configuration["QueueCapacity"], out var queueCapacity)) { - services.AddSingleton(); - services.AddHostedService(); - services.AddSingleton(_ => - { - if (!int.TryParse(context.Configuration["QueueCapacity"], out var queueCapacity)) - { - queueCapacity = 100; - } + queueCapacity = 100; + } - return new DefaultBackgroundTaskQueue(queueCapacity); - }); - }) - .Build(); + return new DefaultBackgroundTaskQueue(queueCapacity); +}); + +IHost host = builder.Build(); MonitorLoop monitorLoop = host.Services.GetRequiredService()!; monitorLoop.StartMonitorLoop(); -await host.RunAsync(); +host.Run(); diff --git a/docs/core/extensions/snippets/workers/scoped-service/App.ScopedService.csproj b/docs/core/extensions/snippets/workers/scoped-service/App.ScopedService.csproj index 3aa1bbfbbde36..f98473d5925e5 100644 --- a/docs/core/extensions/snippets/workers/scoped-service/App.ScopedService.csproj +++ b/docs/core/extensions/snippets/workers/scoped-service/App.ScopedService.csproj @@ -8,6 +8,6 @@ - + diff --git a/docs/core/extensions/snippets/workers/scoped-service/Program.cs b/docs/core/extensions/snippets/workers/scoped-service/Program.cs index 2cc3549bde7b3..73065168d6109 100644 --- a/docs/core/extensions/snippets/workers/scoped-service/Program.cs +++ b/docs/core/extensions/snippets/workers/scoped-service/Program.cs @@ -1,11 +1,8 @@ using App.ScopedService; -using IHost host = Host.CreateDefaultBuilder(args) - .ConfigureServices(services => - { - services.AddHostedService(); - services.AddScoped(); - }) - .Build(); +HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); +builder.Services.AddHostedService(); +builder.Services.AddScoped(); -await host.RunAsync(); +IHost host = builder.Build(); +host.Run(); diff --git a/docs/core/extensions/snippets/workers/signal-completion-service/App.SignalCompletionService/App.SignalCompletionService.csproj b/docs/core/extensions/snippets/workers/signal-completion-service/App.SignalCompletionService/App.SignalCompletionService.csproj index a536590aee5f9..edbeb8e3a6373 100644 --- a/docs/core/extensions/snippets/workers/signal-completion-service/App.SignalCompletionService/App.SignalCompletionService.csproj +++ b/docs/core/extensions/snippets/workers/signal-completion-service/App.SignalCompletionService/App.SignalCompletionService.csproj @@ -7,6 +7,6 @@ - + diff --git a/docs/core/extensions/snippets/workers/signal-completion-service/App.SignalCompletionService/Program.cs b/docs/core/extensions/snippets/workers/signal-completion-service/App.SignalCompletionService/Program.cs index e90dbd1eec40b..475d50cd75fc2 100644 --- a/docs/core/extensions/snippets/workers/signal-completion-service/App.SignalCompletionService/Program.cs +++ b/docs/core/extensions/snippets/workers/signal-completion-service/App.SignalCompletionService/Program.cs @@ -1,8 +1,7 @@ using App.SignalCompletionService; -using IHost host = Host.CreateDefaultBuilder(args) - .ConfigureServices( - services => services.AddHostedService()) - .Build(); +HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); +builder.Services.AddHostedService(); -await host.RunAsync(); +IHost host = builder.Build(); +host.Run(); diff --git a/docs/core/extensions/snippets/workers/timer-service/App.TimerHostedService.csproj b/docs/core/extensions/snippets/workers/timer-service/App.TimerHostedService.csproj index a847c628f9c58..a8a997bdce333 100644 --- a/docs/core/extensions/snippets/workers/timer-service/App.TimerHostedService.csproj +++ b/docs/core/extensions/snippets/workers/timer-service/App.TimerHostedService.csproj @@ -8,6 +8,6 @@ - + diff --git a/docs/core/extensions/snippets/workers/timer-service/Program.cs b/docs/core/extensions/snippets/workers/timer-service/Program.cs index 2aea855f12fd4..09e70dc6d8923 100644 --- a/docs/core/extensions/snippets/workers/timer-service/Program.cs +++ b/docs/core/extensions/snippets/workers/timer-service/Program.cs @@ -1,10 +1,7 @@ using App.TimerHostedService; -using IHost host = Host.CreateDefaultBuilder(args) - .ConfigureServices(services => - { - services.AddHostedService(); - }) - .Build(); +HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); +builder.Services.AddHostedService(); -await host.RunAsync(); +IHost host = builder.Build(); +host.Run(); diff --git a/docs/core/extensions/snippets/workers/windows-service-installer/App.WindowsService.Installer/App.WindowsService.Installer.vdproj b/docs/core/extensions/snippets/workers/windows-service-installer/App.WindowsService.Installer/App.WindowsService.Installer.vdproj new file mode 100644 index 0000000000000..9e851db93f7ee --- /dev/null +++ b/docs/core/extensions/snippets/workers/windows-service-installer/App.WindowsService.Installer/App.WindowsService.Installer.vdproj @@ -0,0 +1,756 @@ +"DeployProject" +{ +"VSVersion" = "3:800" +"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" +"IsWebType" = "8:FALSE" +"ProjectName" = "8:App.WindowsService.Installer" +"LanguageId" = "3:1033" +"CodePage" = "3:1252" +"UILanguageId" = "3:1033" +"SccProjectName" = "8:" +"SccLocalPath" = "8:" +"SccAuxPath" = "8:" +"SccProvider" = "8:" + "Hierarchy" + { + "Entry" + { + "MsmKey" = "8:_A7730A47EAAB4F7F81E968F30D8EBB3A" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:_UNDEFINED" + } + } + "Configurations" + { + "Debug" + { + "DisplayName" = "8:Debug" + "IsDebugOnly" = "11:TRUE" + "IsReleaseOnly" = "11:FALSE" + "OutputFilename" = "8:Debug\\App.WindowsService.Installer.msi" + "PackageFilesAs" = "3:2" + "PackageFileSize" = "3:-2147483648" + "CabType" = "3:1" + "Compression" = "3:2" + "SignOutput" = "11:FALSE" + "CertificateFile" = "8:" + "PrivateKeyFile" = "8:" + "TimeStampServer" = "8:" + "InstallerBootstrapper" = "3:2" + "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" + { + "Enabled" = "11:TRUE" + "PromptEnabled" = "11:TRUE" + "PrerequisitesLocation" = "2:1" + "Url" = "8:" + "ComponentsUrl" = "8:" + "Items" + { + "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.NetCore.CoreRuntime.7.0.x64" + { + "Name" = "8:.NET Runtime 7.0.2 (x64)" + "ProductCode" = "8:Microsoft.NetCore.CoreRuntime.7.0.x64" + } + } + } + } + "Release" + { + "DisplayName" = "8:Release" + "IsDebugOnly" = "11:FALSE" + "IsReleaseOnly" = "11:TRUE" + "OutputFilename" = "8:Release\\App.WindowsService.Installer.msi" + "PackageFilesAs" = "3:2" + "PackageFileSize" = "3:-2147483648" + "CabType" = "3:1" + "Compression" = "3:2" + "SignOutput" = "11:FALSE" + "CertificateFile" = "8:" + "PrivateKeyFile" = "8:" + "TimeStampServer" = "8:" + "InstallerBootstrapper" = "3:2" + "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" + { + "Enabled" = "11:TRUE" + "PromptEnabled" = "11:TRUE" + "PrerequisitesLocation" = "2:1" + "Url" = "8:" + "ComponentsUrl" = "8:" + "Items" + { + "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.NetCore.CoreRuntime.7.0.x64" + { + "Name" = "8:.NET Runtime 7.0.2 (x64)" + "ProductCode" = "8:Microsoft.NetCore.CoreRuntime.7.0.x64" + } + } + } + } + } + "Deployable" + { + "CustomAction" + { + "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_5F1DA6B181A44BBFAACC898CF10F1D27" + { + "Name" = "8:Publish Items from App.WindowsService (Active)" + "Condition" = "8:" + "Object" = "8:_A7730A47EAAB4F7F81E968F30D8EBB3A" + "FileType" = "3:2" + "InstallAction" = "3:1" + "Arguments" = "8:/Install" + "EntryPoint" = "8:" + "Sequence" = "3:1" + "Identifier" = "8:_E2504A23_55EC_4CB7_84DD_2B530A2751D0" + "InstallerClass" = "11:FALSE" + "CustomActionData" = "8:" + "Run64Bit" = "11:TRUE" + } + "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_9EBE3C84CB5B4C658A410ABC1464B8C0" + { + "Name" = "8:Publish Items from App.WindowsService (Active)" + "Condition" = "8:" + "Object" = "8:_A7730A47EAAB4F7F81E968F30D8EBB3A" + "FileType" = "3:2" + "InstallAction" = "3:4" + "Arguments" = "8:/Uninstall" + "EntryPoint" = "8:" + "Sequence" = "3:1" + "Identifier" = "8:_59E3CFE4_0AD2_4B86_8696_570FA6927F84" + "InstallerClass" = "11:FALSE" + "CustomActionData" = "8:" + "Run64Bit" = "11:TRUE" + } + } + "DefaultFeature" + { + "Name" = "8:DefaultFeature" + "Title" = "8:" + "Description" = "8:" + } + "ExternalPersistence" + { + "LaunchCondition" + { + "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_DD14B44BA87F401B80B6A5B086C67934" + { + "Name" = "8:.NET Core" + "Message" = "8:[VSDNETCOREMSG]" + "AllowLaterVersions" = "11:FALSE" + "InstallUrl" = "8:https://dotnet.microsoft.com/download/dotnet-core/[NetCoreVerMajorDotMinor]" + "IsNETCore" = "11:TRUE" + "Architecture" = "2:0" + "Runtime" = "2:0" + } + } + } + "File" + { + } + "FileType" + { + } + "Folder" + { + "{1525181F-901A-416C-8A58-119130FE478E}:_51B81562BA1C4DC9BAFA8B85FB99FE49" + { + "Name" = "8:#1916" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:DesktopFolder" + "Folders" + { + } + } + "{3C67513D-01DD-4637-8A68-80971EB9504F}:_6A06B8D5AD394233B314F92E5CEC0E55" + { + "DefaultLocation" = "8:[ProgramFiles64Folder][Manufacturer]\\[ProductName]" + "Name" = "8:#1925" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:TARGETDIR" + "Folders" + { + } + } + "{1525181F-901A-416C-8A58-119130FE478E}:_A55AB06105E246428F4A16405FF4A680" + { + "Name" = "8:#1919" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:ProgramMenuFolder" + "Folders" + { + } + } + } + "LaunchCondition" + { + } + "Locator" + { + } + "MsiBootstrapper" + { + "LangId" = "3:1033" + "RequiresElevation" = "11:FALSE" + } + "Product" + { + "Name" = "8:Microsoft Visual Studio" + "ProductName" = "8:.NET Jokes Service" + "ProductCode" = "8:{51AF8011-FE0C-4A25-8294-70274297A94A}" + "PackageCode" = "8:{8F9A8BD0-6012-4232-8848-1A1A769F6210}" + "UpgradeCode" = "8:{73CE04AC-216A-48B5-87FF-9F2DA4DD240F}" + "AspNetVersion" = "8:4.0.30319.0" + "RestartWWWService" = "11:FALSE" + "RemovePreviousVersions" = "11:TRUE" + "DetectNewerInstalledVersion" = "11:TRUE" + "InstallAllUsers" = "11:TRUE" + "ProductVersion" = "8:1.0.0" + "Manufacturer" = "8:Microsoft" + "ARPHELPTELEPHONE" = "8:" + "ARPHELPLINK" = "8:" + "Title" = "8:.NET Jokes Service Installer" + "Subject" = "8:" + "ARPCONTACT" = "8:Microsoft" + "Keywords" = "8:" + "ARPCOMMENTS" = "8:" + "ARPURLINFOABOUT" = "8:" + "ARPPRODUCTICON" = "8:" + "ARPIconIndex" = "3:0" + "SearchPath" = "8:" + "UseSystemSearchPath" = "11:TRUE" + "TargetPlatform" = "3:1" + "PreBuildEvent" = "8:" + "PostBuildEvent" = "8:" + "RunPostBuildEvent" = "3:0" + } + "Registry" + { + "HKLM" + { + "Keys" + { + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_37FE0F4D412B4496A7D2954033D459C1" + { + "Name" = "8:Software" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_FE229BE08F334FC5BE4BF6385B2F38DF" + { + "Name" = "8:[Manufacturer]" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + } + "Values" + { + } + } + } + "Values" + { + } + } + } + } + "HKCU" + { + "Keys" + { + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_28216245372F4B7FA7E4832A28BF15FE" + { + "Name" = "8:Software" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_EA48B6D3A1504AB08AA0FD4A8C9DAACA" + { + "Name" = "8:[Manufacturer]" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + } + "Values" + { + } + } + } + "Values" + { + } + } + } + } + "HKCR" + { + "Keys" + { + } + } + "HKU" + { + "Keys" + { + } + } + "HKPU" + { + "Keys" + { + } + } + } + "Sequences" + { + } + "Shortcut" + { + } + "UserInterface" + { + "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_027FBCB7D69344E69EBBB183478B1012" + { + "UseDynamicProperties" = "11:FALSE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdUserInterface.wim" + } + "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_1C8FF69E15C04C01880E2ACE83FC0960" + { + "UseDynamicProperties" = "11:FALSE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdBasicDialogs.wim" + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_4D4940449CCA40039721D1F443784033" + { + "Name" = "8:#1900" + "Sequence" = "3:1" + "Attributes" = "3:1" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_6340955AB6474AD8A60ED9A2F8687D15" + { + "Sequence" = "3:200" + "DisplayName" = "8:Installation Folder" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdFolderDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "InstallAllUsersVisible" + { + "Name" = "8:InstallAllUsersVisible" + "DisplayName" = "8:#1059" + "Description" = "8:#1159" + "Type" = "3:5" + "ContextData" = "8:1;True=1;False=0" + "Attributes" = "3:0" + "Setting" = "3:0" + "Value" = "3:1" + "DefaultValue" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_7CCF0A595D1F4C218618FF215FFF0F81" + { + "Sequence" = "3:300" + "DisplayName" = "8:Confirm Installation" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdConfirmDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_9A74617A3FC04A0CB3273798E37009B0" + { + "Sequence" = "3:100" + "DisplayName" = "8:Welcome" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdWelcomeDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "CopyrightWarning" + { + "Name" = "8:CopyrightWarning" + "DisplayName" = "8:#1002" + "Description" = "8:#1102" + "Type" = "3:3" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1202" + "DefaultValue" = "8:#1202" + "UsePlugInResources" = "11:TRUE" + } + "Welcome" + { + "Name" = "8:Welcome" + "DisplayName" = "8:#1003" + "Description" = "8:#1103" + "Type" = "3:3" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1203" + "DefaultValue" = "8:#1203" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_55BA805873C84519BDC354B0874DD7A1" + { + "Name" = "8:#1902" + "Sequence" = "3:2" + "Attributes" = "3:3" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_32B70D36C5DD430C95E4C3AF44B141CD" + { + "Sequence" = "3:100" + "DisplayName" = "8:Finished" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_62120CF6981340308A6A634B108487EB" + { + "Name" = "8:#1901" + "Sequence" = "3:1" + "Attributes" = "3:2" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_D640B865F42A4DE1BA76D4B91D9198E6" + { + "Sequence" = "3:100" + "DisplayName" = "8:Progress" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdProgressDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "ShowProgress" + { + "Name" = "8:ShowProgress" + "DisplayName" = "8:#1009" + "Description" = "8:#1109" + "Type" = "3:5" + "ContextData" = "8:1;True=1;False=0" + "Attributes" = "3:0" + "Setting" = "3:0" + "Value" = "3:1" + "DefaultValue" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_742C433E3C6C4D3FA0FF82150AAF048F" + { + "Name" = "8:#1901" + "Sequence" = "3:2" + "Attributes" = "3:2" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_39EDA672EF9944C9A85CEFDF9026EA79" + { + "Sequence" = "3:100" + "DisplayName" = "8:Progress" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminProgressDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "ShowProgress" + { + "Name" = "8:ShowProgress" + "DisplayName" = "8:#1009" + "Description" = "8:#1109" + "Type" = "3:5" + "ContextData" = "8:1;True=1;False=0" + "Attributes" = "3:0" + "Setting" = "3:0" + "Value" = "3:1" + "DefaultValue" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_9EF6DBD8E7E34574A2C73DE6228A5977" + { + "Name" = "8:#1900" + "Sequence" = "3:2" + "Attributes" = "3:1" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_0606D6FC077E4B8FBD2DCBB325CC2771" + { + "Sequence" = "3:200" + "DisplayName" = "8:Installation Folder" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminFolderDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_7EF686FFE6F1435F873C7EF5AED85A7E" + { + "Sequence" = "3:100" + "DisplayName" = "8:Welcome" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "CopyrightWarning" + { + "Name" = "8:CopyrightWarning" + "DisplayName" = "8:#1002" + "Description" = "8:#1102" + "Type" = "3:3" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1202" + "DefaultValue" = "8:#1202" + "UsePlugInResources" = "11:TRUE" + } + "Welcome" + { + "Name" = "8:Welcome" + "DisplayName" = "8:#1003" + "Description" = "8:#1103" + "Type" = "3:3" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1203" + "DefaultValue" = "8:#1203" + "UsePlugInResources" = "11:TRUE" + } + } + } + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_D9F9C55D206542B5BE2B857FB526F247" + { + "Sequence" = "3:300" + "DisplayName" = "8:Confirm Installation" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_B284E743AFA64F978E87A863B87CE746" + { + "Name" = "8:#1902" + "Sequence" = "3:1" + "Attributes" = "3:3" + "Dialogs" + { + "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_4A739649BBDB43C0ACE26B34075AC63E" + { + "Sequence" = "3:100" + "DisplayName" = "8:Finished" + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:FALSE" + "SourcePath" = "8:\\VsdFinishedDlg.wid" + "Properties" + { + "BannerBitmap" + { + "Name" = "8:BannerBitmap" + "DisplayName" = "8:#1001" + "Description" = "8:#1101" + "Type" = "3:8" + "ContextData" = "8:Bitmap" + "Attributes" = "3:4" + "Setting" = "3:1" + "UsePlugInResources" = "11:TRUE" + } + "UpdateText" + { + "Name" = "8:UpdateText" + "DisplayName" = "8:#1058" + "Description" = "8:#1158" + "Type" = "3:15" + "ContextData" = "8:" + "Attributes" = "3:0" + "Setting" = "3:1" + "Value" = "8:#1258" + "DefaultValue" = "8:#1258" + "UsePlugInResources" = "11:TRUE" + } + } + } + } + } + } + "MergeModule" + { + } + "ProjectOutput" + { + "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_A7730A47EAAB4F7F81E968F30D8EBB3A" + { + "SourcePath" = "8:..\\..\\windows-service\\bin\\Release\\net7.0\\win-x64\\publish\\App.WindowsService.exe" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_6A06B8D5AD394233B314F92E5CEC0E55" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + "ProjectOutputGroupRegister" = "3:1" + "OutputConfiguration" = "8:" + "OutputGroupCanonicalName" = "8:PublishItems" + "OutputProjectGuid" = "8:{0642A687-220B-4E1E-99B8-A31B5DC40A35}" + "ShowKeyOutput" = "11:TRUE" + "PublishProfilePath" = "8:Properties\\PublishProfiles\\FolderProfile.pubxml" + "ExcludeFilters" + { + } + } + } + } +} diff --git a/docs/core/extensions/snippets/workers/windows-service/App.WindowsService.csproj b/docs/core/extensions/snippets/workers/windows-service/App.WindowsService.csproj index 3737a04c490b3..857c0131e6795 100644 --- a/docs/core/extensions/snippets/workers/windows-service/App.WindowsService.csproj +++ b/docs/core/extensions/snippets/workers/windows-service/App.WindowsService.csproj @@ -12,7 +12,7 @@ - + diff --git a/docs/core/extensions/snippets/workers/windows-service/Program.cs b/docs/core/extensions/snippets/workers/windows-service/Program.cs index 2b53aa224c3f0..1d7a71fdb89e9 100644 --- a/docs/core/extensions/snippets/workers/windows-service/Program.cs +++ b/docs/core/extensions/snippets/workers/windows-service/Program.cs @@ -2,25 +2,21 @@ using Microsoft.Extensions.Logging.Configuration; using Microsoft.Extensions.Logging.EventLog; -using IHost host = Host.CreateDefaultBuilder(args) - .UseWindowsService(options => - { - options.ServiceName = ".NET Joke Service"; - }) - .ConfigureServices(services => - { - LoggerProviderOptions.RegisterProviderOptions< - EventLogSettings, EventLogLoggerProvider>(services); +HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); +builder.Services.AddWindowsService(options => +{ + options.ServiceName = ".NET Joke Service"; +}); - services.AddSingleton(); - services.AddHostedService(); - }) - .ConfigureLogging((context, logging) => - { - // See: https://github.com/dotnet/runtime/issues/47303 - logging.AddConfiguration( - context.Configuration.GetSection("Logging")); - }) - .Build(); +LoggerProviderOptions.RegisterProviderOptions< + EventLogSettings, EventLogLoggerProvider>(builder.Services); -await host.RunAsync(); +builder.Services.AddSingleton(); +builder.Services.AddHostedService(); + +// See: https://github.com/dotnet/runtime/issues/47303 +builder.Logging.AddConfiguration( + builder.Configuration.GetSection("Logging")); + +IHost host = builder.Build(); +host.Run(); diff --git a/docs/core/extensions/snippets/workers/windows-service/Properties/PublishProfiles/FolderProfile.pubxml b/docs/core/extensions/snippets/workers/windows-service/Properties/PublishProfiles/FolderProfile.pubxml index 2f1fdd0a976f8..469dddecc5ae5 100644 --- a/docs/core/extensions/snippets/workers/windows-service/Properties/PublishProfiles/FolderProfile.pubxml +++ b/docs/core/extensions/snippets/workers/windows-service/Properties/PublishProfiles/FolderProfile.pubxml @@ -6,13 +6,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU - bin\Release\net6.0\win-x64\publish\ + bin\Release\net7.0\win-x64\publish\ FileSystem - net7.0 + net7.0-windows win-x64 true true false true - \ No newline at end of file + diff --git a/docs/core/extensions/snippets/workers/windows-service/WindowsBackgroundService.cs b/docs/core/extensions/snippets/workers/windows-service/WindowsBackgroundService.cs index bdf93e1e59206..81a5cc37f9a64 100644 --- a/docs/core/extensions/snippets/workers/windows-service/WindowsBackgroundService.cs +++ b/docs/core/extensions/snippets/workers/windows-service/WindowsBackgroundService.cs @@ -22,6 +22,11 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken) await Task.Delay(TimeSpan.FromMinutes(1), stoppingToken); } } + catch (TaskCanceledException) + { + // When the stopping token is canceled, for example, a call made from services.msc, + // we shouldn't exit with a non-zero exit code. In other words, this is expected... + } catch (Exception ex) { _logger.LogError(ex, "{Message}", ex.Message); diff --git a/docs/core/extensions/snippets/workers/workers.sln b/docs/core/extensions/snippets/workers/workers.sln index b3870b2b80329..bd7e304925cf8 100644 --- a/docs/core/extensions/snippets/workers/workers.sln +++ b/docs/core/extensions/snippets/workers/workers.sln @@ -15,7 +15,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App.WindowsService", "windo EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App.CloudService", "cloud-service\App.CloudService.csproj", "{D27DBD6D-3E1D-4A3F-9653-5EBFABA22123}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App.SignalCompletionService", "signal-completion-service\App.SignalCompletionService\App.SignalCompletionService.csproj", "{28F3041E-09D9-43D5-9D69-7BAE9BBA2531}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App.SignalCompletionService", "signal-completion-service\App.SignalCompletionService\App.SignalCompletionService.csproj", "{28F3041E-09D9-43D5-9D69-7BAE9BBA2531}" +EndProject +Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "App.WindowsService.Installer", "windows-service-installer\App.WindowsService.Installer\App.WindowsService.Installer.vdproj", "{D0114B0A-E567-4B3D-BF56-398381706B0A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -51,6 +53,8 @@ Global {28F3041E-09D9-43D5-9D69-7BAE9BBA2531}.Debug|Any CPU.Build.0 = Debug|Any CPU {28F3041E-09D9-43D5-9D69-7BAE9BBA2531}.Release|Any CPU.ActiveCfg = Release|Any CPU {28F3041E-09D9-43D5-9D69-7BAE9BBA2531}.Release|Any CPU.Build.0 = Release|Any CPU + {D0114B0A-E567-4B3D-BF56-398381706B0A}.Debug|Any CPU.ActiveCfg = Debug + {D0114B0A-E567-4B3D-BF56-398381706B0A}.Release|Any CPU.ActiveCfg = Release EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/docs/core/extensions/sslstream-best-practices.md b/docs/core/extensions/sslstream-best-practices.md index 93ffad7c21176..3fbf9613da1fa 100644 --- a/docs/core/extensions/sslstream-best-practices.md +++ b/docs/core/extensions/sslstream-best-practices.md @@ -3,14 +3,14 @@ title: TLS/SSL best practices description: Learn the best practices when using SslStream in .NET. author: rzikm ms.author: radekzikmund -ms.date: 1/9/2023 +ms.date: 03/13/2023 --- # TLS/SSL best practices TLS (Transport Layer Security) is a cryptographic protocol designed to secure communication between two computers over the internet. The TLS protocol is exposed in .NET via the class. -This article presents best practices for setting up secure communication between client and server and assumes use of .NET. For best practices with .NET Framework, see [Transport Layer Security (TLS) best practices with the .NET Framework](/dotnet/framework/network-programming/tls). +This article presents best practices for setting up secure communication between client and server and assumes use of .NET. For best practices with .NET Framework, see [Transport Layer Security (TLS) best practices with the .NET Framework](../../framework/network-programming/tls.md). ## Select TLS version diff --git a/docs/core/extensions/sslstream-migration-from-framework.md b/docs/core/extensions/sslstream-migration-from-framework.md index 37c82607a768e..febc91fee0752 100644 --- a/docs/core/extensions/sslstream-migration-from-framework.md +++ b/docs/core/extensions/sslstream-migration-from-framework.md @@ -1,18 +1,18 @@ --- -title: Migrate from .NET Framework to .NET -description: Learn how to migrate code using SslStream in .NET Framework to .NET. +title: Migrate SslStream code from .NET Framework to .NET +description: Learn how to migrate code that uses SslStream in .NET Framework to .NET. author: rzikm ms.author: radekzikmund -ms.date: 1/9/2023 +ms.date: 03/13/2023 --- -# Migrate from .NET Framework to .NET +# Migrate SslStream code from .NET Framework to .NET .NET Core brought many improvements as well as breaking changes to how works. The most important change related to network security is that the class has been mostly obsoleted and affects only the legacy interface. -Since .NET, allowed SSL/TLS protocols and certificate validation callbacks must be configured separately for each instance via the or . In order to configure network security options used in HTTPS in , you need to configure the security options in the underlying handler. The default handler used by is which has property accepting . +For each instance, you must configure the allowed TLS protocols and certificate validation callbacks separately via or . To configure network security options used in HTTPS in , you need to configure the security options in the underlying handler. The default handler used by is , which has an property that accepts . -Consider the following example, as it demonstrates how to create an with a custom certificate validation callback: +Consider the following example that demonstrates how to create an with a custom certificate validation callback: ```csharp bool CustomCertificateValidator( @@ -36,7 +36,7 @@ HttpClient httpClient = new( }); ``` -Following table show how to migrate individual properties related to SSL/TLS. +The following table shows how to migrate individual properties related to TLS. | Source API | Target API | |---|---| diff --git a/docs/core/extensions/sslstream-troubleshooting.md b/docs/core/extensions/sslstream-troubleshooting.md index 8e69cfb841766..7ea96387312a9 100644 --- a/docs/core/extensions/sslstream-troubleshooting.md +++ b/docs/core/extensions/sslstream-troubleshooting.md @@ -3,7 +3,7 @@ title: Troubleshoot SslStream authentication issues description: Learn how to troubleshoot and investigate issues when performing authentication with SslStream in .NET. author: rzikm ms.author: radekzikmund -ms.date: 1/9/2023 +ms.date: 03/13/2023 --- # Troubleshoot `SslStream` authentication issues diff --git a/docs/core/extensions/timer-service.md b/docs/core/extensions/timer-service.md index 2b99cad313008..99d96db37a517 100644 --- a/docs/core/extensions/timer-service.md +++ b/docs/core/extensions/timer-service.md @@ -1,9 +1,9 @@ --- title: Implement the IHostedService interface -description: Learn how to implement a custom IHostedService interface with .NET. +description: Learn how to implement a custom IHostedService interface in C#, much like the inbuilt .NET BackgroundService. author: IEvangelist ms.author: dapine -ms.date: 04/20/2022 +ms.date: 03/13/2023 ms.topic: tutorial --- @@ -50,9 +50,9 @@ When is called, Replace the existing `Program` contents with the following C# code: -:::code source="snippets/workers/timer-service/Program.cs" highlight="6"::: +:::code source="snippets/workers/timer-service/Program.cs" highlight="4"::: -The service is registered in `IHostBuilder.ConfigureServices` (*Program.cs*) with the `AddHostedService` extension method. This is the same extension method you use when registering subclasses, as they both implement the interface. +The service is registered in (*Program.cs*) with the `AddHostedService` extension method. This is the same extension method you use when registering subclasses, as they both implement the interface. For more information on registering services, see [Dependency injection in .NET](dependency-injection.md). diff --git a/docs/core/extensions/windows-service-with-installer.md b/docs/core/extensions/windows-service-with-installer.md new file mode 100644 index 0000000000000..5207c02abc06f --- /dev/null +++ b/docs/core/extensions/windows-service-with-installer.md @@ -0,0 +1,171 @@ +--- +title: Create a Windows Service installer +description: Learn how to create a Windows Service installer project. +author: IEvangelist +ms.author: dapine +ms.date: 03/13/2023 +ms.topic: tutorial +--- + +# Create a Windows Service installer + +When you create a .NET Windows Service (not to be mistaken with a .NET Framework Windows Service), you may want to create an installer for your service. Without an installer, users would have to know how to install and configure your service. An installer bundles your app's executables and exposes a customizable installation user experience. + +In this tutorial, you'll learn how to: + +> [!div class="checklist"] +> +> - Install the Visual Studio Installer Projects extension. +> - Create a setup project. +> - Update an existing .NET Worker project to support installation. +> - Automate the installation and uninstallation with the Windows Service Control Manager. + +## Prerequisites + +- The [.NET 6.0 SDK or later](https://dotnet.microsoft.com/download/dotnet) +- A Windows OS +- A .NET integrated development environment (IDE) + - Feel free to use [Visual Studio](https://visualstudio.microsoft.com) +- An existing .NET Windows Service + +## Install the extension + +Install the [Microsoft Visual Studio Installer Projects extension](https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2022InstallerProjects). After installing, restart Visual Studio and you'll see new project templates available. + +## Update existing project + +This tutorial is based on the app created as part of the [Create a Windows Service using `BackgroundService`](windows-service.md) tutorial. You can either clone the sample repo or use the app you built in the previous tutorial. + +[!INCLUDE [workers-samples-browser](includes/workers-samples-browser.md)] + +Open the solution in Visual Studio, and select F5 to ensure that the app builds and runs as expected. Press Ctrl+C to stop the app. + +### Handle installation switches + +The Windows Service app needs to handle installation switches. The setup project will call into the Windows Service app with `/Install` and `/Uninstall` switches during installation and uninstallation respectively. When these switches are present, the app will behave differently, in that it will only perform installation or uninstallation using the Windows Service Control Manager executable (_sc.exe_). + +For the app to call a separate process, install the [CliWrap](https://www.nuget.org/packages/CliWrap) NuGet package as a convenience. To install the `CliWrap` package, use the `dotnet add package` command: + +```dotnetcli +dotnet add App.WindowsService.csproj package CliWrap +``` + +For more information, see [dotnet add package](../tools/dotnet-add-package.md). + +With `CliWrap` installed, open the _Program.cs_ file of the `App.WindowsService` project. After the `using` statements, but before the `IHost` is created, add the following code: + +```csharp +using CliWrap; + +const string ServiceName = ".NET Joke Service"; + +if (args is { Length: 1 }) +{ + string executablePath = + Path.Combine(AppContext.BaseDirectory, "App.WindowsService.exe"); + + if (args[0] is "/Install") + { + await Cli.Wrap("sc") + .WithArguments(new[] { "create", ServiceName, $"binPath={executablePath}", "start=auto" }) + .ExecuteAsync(); + } + else if (args[0] is "/Uninstall") + { + await Cli.Wrap("sc") + .WithArguments(new[] { "stop", ServiceName }) + .ExecuteAsync(); + + await Cli.Wrap("sc") + .WithArguments(new[] { "delete", ServiceName }) + .ExecuteAsync(); + } + + return; +} +``` + +The preceding code: + +- Declares the service name as a `const string` value. +- Checks the `args` for a single value. +- Gets the executable path from the . +- When the `"/Install"` switch is present, `sc create ".NET Joke Service" binPath="path/to/App.WindowsService.exe" start=auto` is called. +- When the `"/Uninstall"` switch is present, `sc stop ".NET Joke Service"` and `sc delete ".NET Joke Service"` are called. + +When no installation switches are present, the app behaves as it did before, but it now includes installation functionality. + +## Add new setup project + +To add a new setup project, right-click on the solution in the **Solution Explorer** and select **Add > New Project**: + +:::image type="content" source="media/workers/new-setup-project.png" alt-text="Add new project dialog: New Setup Project."::: + +Select **Setup Project** from the available templates, then select **Next**. Provide the desired **Name** and **Location**, then select **Create**. + +### Configure installer project + +To configure the install project, select the project in the **Solution Explorer**. Select F4 to open the project properties pane. You can configure the app's "add" and "remove" icons, author, manufacturer, product name, title, target platform, and so on. + +:::image type="content" source="media/workers/f4-installer-properties.png" alt-text="Installer project properties pane."::: + +The installer project needs to define two custom actions for installation behavior. Right-click the project in the **Solution Explorer**, and then select **View > Custom Actions**. + +:::image type="content" source="media/workers/custom-actions.png" alt-text="Installer project Custom Actions context menu."::: + +From the **Custom Actions** window, select **Install > Add Custom Action**. + +:::image type="content" source="media/workers/select-item.png" alt-text="Custom Actions properties dialog: select item."::: + +Double-click the **Application Folder**, and select **Publish Items from App.WindowsService (Active)**. + +:::image type="content" source="media/workers/select-item-publish.png" alt-text="Custom Actions properties dialog: select item app folder."::: + +Select **Ok** to confirm the selection. Right-click the added **Publish Items from App.WindowsService (Active)** node under **Install**, then select **Properties**. + +:::image type="content" source="media/workers/install-properties.png" alt-text="Publish items properties."::: + +Add `/Install` to the **Arguments**. Follow these same steps for **Uninstall**, adding `/Uninstall` to the **Arguments**. + +Once you've done both, you should see the following: + +:::image type="content" source="media/workers/custom-actions-added.png" alt-text="Custom Actions with Install and Uninstall actions defined."::: + +With these updates, the setup project has been configured to delegate its *Install* and *Uninstall* actions to call into the Windows Service app with appropriate arguments. + +## Test installation + +To test the installer, expand **Solution Configurations** in Visual Studio, and select **Release** (assuming **Debug** was selected). Build the solution and then right-click on the setup project and select **Build**. By default, setup projects are not part of the build. + +Select **View > Output**, and ensure that the **Show output from** dropdown has **Build** selected. The Microsoft Installer (MSI) file path is displayed. Copy the path, and open the installer. Run the installer: + +:::row::: + :::column::: + **1. Installer welcome dialog** + :::image type="content" source="media/workers/installer-welcome.png" lightbox="media/workers/installer-welcome.png" alt-text="Installer welcome dialog."::: + :::column-end::: + :::column::: + **2. Installer select folder dialog** + :::image type="content" source="media/workers/installer-select-folder.png" lightbox="media/workers/installer-select-folder.png" alt-text="Installer select folder dialog."::: + :::column-end::: +:::row-end::: + +:::row::: + :::column::: + **3. Installer confirm dialog** + :::image type="content" source="media/workers/installer-confirm.png" lightbox="media/workers/installer-confirm.png" alt-text="Installer confirm dialog."::: + :::column-end::: + :::column::: + **4. Installer complete dialog** + :::image type="content" source="media/workers/installer-complete.png" lightbox="media/workers/installer-complete.png" alt-text="Installer complete dialog."::: + :::column-end::: +:::row-end::: + +Once the service is installed, you can open **Services** to start the service. To uninstall the service, use the **Windows Add or Remove Programs** feature to call the installer. + +## See also + +- [Worker Services in .NET](workers.md) +- [Create a Queue Service](queue-service.md) +- [Use scoped services within a `BackgroundService`](scoped-service.md) +- [Implement the `IHostedService` interface](timer-service.md) diff --git a/docs/core/extensions/windows-service.md b/docs/core/extensions/windows-service.md index ea1c5895d2b12..8e7133c420706 100644 --- a/docs/core/extensions/windows-service.md +++ b/docs/core/extensions/windows-service.md @@ -1,13 +1,13 @@ --- -title: Create a Windows Service using BackgroundService +title: Create Windows Service using BackgroundService description: Learn how to create a Windows Service using the BackgroundService in .NET. author: IEvangelist ms.author: dapine -ms.date: 06/30/2022 +ms.date: 03/13/2023 ms.topic: tutorial --- -# Create a Windows Service using `BackgroundService` +# Create Windows Service using `BackgroundService` .NET Framework developers are probably familiar with Windows Service apps. Before .NET Core and .NET 5+, developers who relied on .NET Framework could create Windows Services to perform background tasks or execute long-running processes. This functionality is still available and you can create Worker Services that run as a Windows Service. @@ -50,7 +50,7 @@ For more information on the .NET CLI add package command, see [dotnet add packag After successfully adding the packages, your project file should now contain the following package references: -:::code language="xml" source="snippets/workers/windows-service/App.WindowsService.csproj" range="14-18" highlight="2-4"::: +:::code language="xml" source="snippets/workers/windows-service/App.WindowsService.csproj" range="14-17" highlight="2-3"::: ## Update project file @@ -103,9 +103,9 @@ In the preceding code, the `JokeService` is injected along with an `ILogger`. Bo Replace the template *Program.cs* file contents with the following C# code: -:::code source="snippets/workers/windows-service/Program.cs" highlight="6-9,15-16"::: +:::code source="snippets/workers/windows-service/Program.cs" highlight="6-9,14-15"::: -The extension method configures the app to work as a Windows Service. The service name is set to `".NET Joke Service"`. The hosted service is registered for dependency injection. +The `AddWindowsService` extension method configures the app to work as a Windows Service. The service name is set to `".NET Joke Service"`. The hosted service is registered for dependency injection. For more information on registering services, see [Dependency injection in .NET](dependency-injection.md). @@ -161,7 +161,7 @@ For more information, see [`dotnet publish`](../tools/dotnet-publish.md). ## Create the Windows Service -To create the Windows Service, use the native Windows Service Control Manager's (sc.exe) create command. Run PowerShell as an Administrator. +If you're unfamiliar with using PowerShell and you'd rather create an installer for your service, see [Create a Windows Service installer](windows-service-with-installer.md). Otherwise, to create the Windows Service, use the native Windows Service Control Manager's (_sc.exe_) create command. Run PowerShell as an Administrator. ```powershell sc.exe create ".NET Joke Service" binpath="C:\Path\To\App.WindowsService.exe" @@ -338,7 +338,13 @@ For more information, see [sc.exe delete](/windows-server/administration/windows ## See also +- [Create a Windows Service installer](windows-service-with-installer.md) - [Worker Services in .NET](workers.md) - [Create a Queue Service](queue-service.md) - [Use scoped services within a `BackgroundService`](scoped-service.md) - [Implement the `IHostedService` interface](timer-service.md) + +## Next + +> [!div class="nextstepaction"] +> [Create a Windows Service installer](windows-service-with-installer.md) diff --git a/docs/core/extensions/work-with-resx-files-programmatically.md b/docs/core/extensions/work-with-resx-files-programmatically.md index a4d26d3629416..3248f0551981f 100644 --- a/docs/core/extensions/work-with-resx-files-programmatically.md +++ b/docs/core/extensions/work-with-resx-files-programmatically.md @@ -1,7 +1,7 @@ --- title: "Working with .resx Files Programmatically" description: Create or retrieve data from XML resource (.resx) files programmatically using types and members in the System.Resources namespace of the .NET Class Library. -ms.date: 08/09/2021 +ms.date: 03/13/2023 dev_langs: - "csharp" - "vb" diff --git a/docs/core/extensions/workers.md b/docs/core/extensions/workers.md index 28d91e0a76451..4ffc8156b81f1 100644 --- a/docs/core/extensions/workers.md +++ b/docs/core/extensions/workers.md @@ -1,9 +1,9 @@ --- title: Worker Services -description: Learn how to implement a custom IHostedService and use existing implementations with .NET. +description: Learn how to implement a custom IHostedService and use existing implementations in C#. Discover various worker implementations, templates, and service patterns. author: IEvangelist ms.author: dapine -ms.date: 07/20/2022 +ms.date: 03/13/2023 ms.topic: overview --- @@ -39,13 +39,13 @@ The Worker Service template is available to the .NET CLI, and Visual Studio. For The preceding `Program` class: -- Creates the default . -- Calls to add the `Worker` class as a hosted service with . +- Creates a . +- Calls to register the `Worker` as a hosted service. - Builds an from the builder. - Calls `Run` on the `host` instance, which runs the app. > [!TIP] -> By default the Worker Service template doesn't enable server garbage collection (GC). All of the scenarios that require long-running services should consider performance implications of this default. To enable server GC, add the `ServerGarbageCollection` node to the project file: +> By default the Worker template doesn't enable server garbage collection (GC). All of the scenarios that require long-running services should consider performance implications of this default. To enable server GC, add the `ServerGarbageCollection` node to the project file: > > ```xml > @@ -55,25 +55,6 @@ The preceding `Program` class: > > For more information regarding performance considerations, see [Server GC](../../standard/garbage-collection/workstation-server-gc.md#server-gc). For more information on configuring server GC, see [Server GC configuration examples](../runtime-config/garbage-collector.md#workstation-vs-server). -The *Program.cs* file from the template can be rewritten using top-level statements: - -```csharp -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using App.WorkerService; - -using IHost host = Host.CreateDefaultBuilder(args) - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }) - .Build(); - -await host.RunAsync(); -``` - -This is functionally equivalent to the original template. For more information on C# 9 features, see [What's new in C# 9.0](../../csharp/whats-new/csharp-9.md). - As for the `Worker`, the template provides a simple implementation. :::code language="csharp" source="snippets/workers/background-service/Worker.cs"::: @@ -82,7 +63,7 @@ The preceding `Worker` class is a subclass of @@ -92,23 +73,23 @@ For more information, see [.NET project SDKs](../project-sdk/overview.md). ### NuGet package -An app based on the Worker Service template uses the `Microsoft.NET.Sdk.Worker` SDK and has an explicit package reference to the [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting) package. +An app based on the Worker template uses the `Microsoft.NET.Sdk.Worker` SDK and has an explicit package reference to the [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting) package. ### Containers and cloud adaptability -With most modern .NET workloads, containers are a viable option. When creating a long-running service from the Worker Service template in Visual Studio, you can opt-in to **Docker support**. Doing so will create a *Dockerfile* that will containerize your .NET app. A [*Dockerfile*](https://docs.docker.com/engine/reference/builder) is a set of instructions to build an image. For .NET apps, the *Dockerfile* usually sits in the root of the directory next to a solution file. +With most modern .NET workloads, containers are a viable option. When creating a long-running service from the Worker template in Visual Studio, you can opt-in to **Docker support**. Doing so will create a *Dockerfile* that will containerize your .NET app. A [*Dockerfile*](https://docs.docker.com/engine/reference/builder) is a set of instructions to build an image. For .NET apps, the *Dockerfile* usually sits in the root of the directory next to a solution file. :::code language="dockerfile" source="snippets/workers/background-service/Dockerfile"::: The preceding *Dockerfile* steps include: -- Setting the base image from `mcr.microsoft.com/dotnet/runtime:6.0` as the alias `base`. +- Setting the base image from `mcr.microsoft.com/dotnet/runtime:7.0` as the alias `base`. - Changing the working directory to */app*. -- Setting the `build` alias from the `mcr.microsoft.com/dotnet/sdk:6.0` image. +- Setting the `build` alias from the `mcr.microsoft.com/dotnet/sdk:7.0` image. - Changing the working directory to */src*. - Copying the contents and publishing the .NET app: - The app is published using the [`dotnet publish`](../tools/dotnet-publish.md) command. -- Relayering the .NET SDK image from `mcr.microsoft.com/dotnet/runtime:6.0` (the `base` alias). +- Relayering the .NET SDK image from `mcr.microsoft.com/dotnet/runtime:7.0` (the `base` alias). - Copying the published build output from the */publish*. - Defining the entry point, which delegates to [`dotnet App.BackgroundService.dll`](../tools/dotnet.md). @@ -124,7 +105,7 @@ In the preceding project file, the `` element specifies ` For more information on Docker with .NET, see [Tutorial: Containerize a .NET app](../docker/build-container.md). For more information on deploying to Azure, see [Tutorial: Deploy a Worker Service to Azure](cloud-service.md). > [!IMPORTANT] -> If you want to leverage _User Secrets_ with the Worker Service template, you'd have to explicitly reference the `Microsoft.Extensions.Configuration.UserSecrets` NuGet package. +> If you want to leverage _User Secrets_ with the Worker template, you'd have to explicitly reference the `Microsoft.Extensions.Configuration.UserSecrets` NuGet package. ## Hosted Service extensibility diff --git a/docs/core/install/includes/linux-install-60-apt.md b/docs/core/install/includes/linux-install-60-apt.md index 804041992e1c8..0d032d90b2fb4 100644 --- a/docs/core/install/includes/linux-install-60-apt.md +++ b/docs/core/install/includes/linux-install-60-apt.md @@ -5,7 +5,7 @@ ms.date: 10/26/2021 ms.topic: include --- -### Install the SDK +### Install .NET 6 SDK The .NET SDK allows you to develop apps with .NET. If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following commands: @@ -17,9 +17,9 @@ sudo apt-get update && \ > [!IMPORTANT] > If you receive an error message similar to **Unable to locate package dotnet-sdk-6.0**, see the [troubleshooting](#troubleshooting) section. -### Install the runtime +### Install .NET 6 Runtime -The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands: +Both .NET Runtime and the ASP.NET Core Runtime allow you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands: ```bash sudo apt-get update && \ diff --git a/docs/core/install/includes/linux-install-package-manager-x64-vs-arm.md b/docs/core/install/includes/linux-install-package-manager-x64-vs-arm.md index 0bc7846161dc3..e489ab015524c 100644 --- a/docs/core/install/includes/linux-install-package-manager-x64-vs-arm.md +++ b/docs/core/install/includes/linux-install-package-manager-x64-vs-arm.md @@ -4,6 +4,5 @@ For more information on installing .NET **without a package manager**, see one of the following articles: -- [Alternatively install .NET with Snap.](../linux-snap.md) - [Alternatively install .NET with `install-dotnet` script.](../linux-scripted-manual.md#scripted-install) - [Manually install .NET](../linux-scripted-manual.md#manual-install) diff --git a/docs/core/install/includes/linux-install-previews.md b/docs/core/install/includes/linux-install-previews.md index d8cb7ed4b1828..dca7183db6570 100644 --- a/docs/core/install/includes/linux-install-previews.md +++ b/docs/core/install/includes/linux-install-previews.md @@ -5,8 +5,7 @@ ms.date: 09/27/2021 ms.topic: include --- -Preview and release candidate versions of .NET aren't available in package managers. You can install previews and release candidates of .NET in one of the following ways: +Preview and release candidate versions of .NET aren't available in package repositories. You can install previews and release candidates of .NET in one of the following ways: -- [Snap package](../linux-snap.md) - [Scripted install with _install-dotnet.sh_](../linux-scripted-manual.md#scripted-install) - [Manual binary extraction](../linux-scripted-manual.md#manual-install) diff --git a/docs/core/install/includes/package-manager-heading-hack-pkgname.md b/docs/core/install/includes/package-manager-heading-hack-pkgname.md index e8df1f35bbbde..c786f86063ee6 100644 --- a/docs/core/install/includes/package-manager-heading-hack-pkgname.md +++ b/docs/core/install/includes/package-manager-heading-hack-pkgname.md @@ -12,7 +12,7 @@ The type of .NET product to install. Valid options are: - **type**\ Chooses the SDK or the runtime. Valid options are: - - sdk + - sdk (only available for the **dotnet** product) - runtime - **version**\ diff --git a/docs/core/install/index.yml b/docs/core/install/index.yml index a61c1018b6e72..aa8f0452ebf61 100644 --- a/docs/core/install/index.yml +++ b/docs/core/install/index.yml @@ -1,18 +1,17 @@ ### YamlMime:Landing title: Install .NET on Windows, Linux, and macOS -summary: Learn about installing .NET Core, .NET 5, and later versions on Windows, Linux, and macOS. Discover the dependencies required to develop, deploy, and run .NET apps. +summary: Learn about installing .NET on Windows, Linux, and macOS. Discover the dependencies required to develop, deploy, and run .NET apps. metadata: title: Install .NET on Windows, Linux, and macOS - description: Learn where to download and install .NET Core, .NET 5, and later versions on Windows, Linux, and macOS. Discover the dependencies required to develop, deploy, and run .NET apps. + description: Learn where to download and install .NET on Windows, Linux, and macOS. Discover the dependencies required to develop, deploy, and run .NET apps. ms.topic: landing-page - ms.date: 06/29/2020 + ms.date: 01/26/2023 # linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | sample | tutorial | video | whats-new landingContent: - # Card - title: Windows linkLists: @@ -60,12 +59,12 @@ landingContent: url: linux-opensuse.md - text: Red Hat Enterprise Linux and CentOS Stream url: linux-rhel.md - - text: SUSE Linux Enterprise Server + - text: SUSE Linux Enterprise Server url: linux-sles.md - text: Ubuntu url: linux-ubuntu.md -# Card + # Card - title: "Q&A" linkLists: - linkListType: get-started diff --git a/docs/core/install/linux-alpine.md b/docs/core/install/linux-alpine.md index f5b4fd032f329..c3cc184a211d2 100644 --- a/docs/core/install/linux-alpine.md +++ b/docs/core/install/linux-alpine.md @@ -16,7 +16,6 @@ If you're using Docker, consider using [official .NET Docker images](../docker/i The Alpine package manager supports installing some versions of .NET. If the .NET package is unavailable, you'll need to install .NET in one of the following alternative ways: -- [Install with Snap.](linux-snap.md) - [Use the .NET install script.](linux-scripted-manual.md#scripted-install) - [Download and install .NET manually.](linux-scripted-manual.md#manual-install) diff --git a/docs/core/install/linux-fedora.md b/docs/core/install/linux-fedora.md index 52cd25d744ea8..c99080e508507 100644 --- a/docs/core/install/linux-fedora.md +++ b/docs/core/install/linux-fedora.md @@ -14,7 +14,6 @@ ms.date: 12/21/2022 For more information on installing .NET without a package manager, see one of the following articles: -- [Install the .NET SDK or the .NET Runtime with Snap.](linux-snap.md) - [Install the .NET SDK or the .NET Runtime with a script.](linux-scripted-manual.md#scripted-install) - [Install the .NET SDK or the .NET Runtime manually.](linux-scripted-manual.md#manual-install) @@ -24,15 +23,15 @@ The following table is a list of currently supported .NET releases and the versi | Fedora | .NET | |--------|-----------| -| 37 | 6 | -| 36 | 6 | -| 35 | 6 | - -> [!IMPORTANT] -> .NET 7 isn't yet ready for Fedora. This article will be updated when it's available. +| 37 | 7, 6 | +| 36 | 7, 6 | [!INCLUDE [versions-not-supported](includes/versions-not-supported.md)] +## Install .NET 7 + +[!INCLUDE [linux-dnf-install-70](includes/linux-install-70-dnf.md)] + ## Install .NET 6 [!INCLUDE [linux-dnf-install-60](includes/linux-install-60-dnf.md)] @@ -51,7 +50,7 @@ The following table is a list of currently supported .NET releases and the versi ## Install on older distributions -Older versions of Fedora don't contain .NET Core in the default package repositories. You can install .NET with [snap](linux-snap.md), through the [_dotnet-install.sh_ script](linux-scripted-manual.md#scripted-install), or use Microsoft's repository to install .NET: +Older versions of Fedora don't contain .NET Core in the default package repositories. You can install .NET with the [_dotnet-install.sh_ script](linux-scripted-manual.md#scripted-install), or use Microsoft's repository to install .NET: 01. First, add the Microsoft signing key to your list of trusted keys. @@ -63,6 +62,8 @@ Older versions of Fedora don't contain .NET Core in the default package reposito | Fedora Version | Package repository | | -------------- | ------- | + | 35 | `https://packages.microsoft.com/config/fedora/35/prod.repo` | + | 34 | `https://packages.microsoft.com/config/fedora/34/prod.repo` | | 33 | `https://packages.microsoft.com/config/fedora/33/prod.repo` | | 32 | `https://packages.microsoft.com/config/fedora/32/prod.repo` | | 31 | `https://packages.microsoft.com/config/fedora/31/prod.repo` | @@ -75,7 +76,7 @@ Older versions of Fedora don't contain .NET Core in the default package reposito sudo wget -O /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/31/prod.repo ``` -[!INCLUDE [linux-dnf-install-60](./includes/linux-install-60-dnf.md)] +[!INCLUDE [linux-dnf-install-70](./includes/linux-install-70-dnf.md)] ## How to install other versions @@ -89,7 +90,6 @@ This section provides information on common errors you may get while using the p For more information on installing .NET without a package manager, see one of the following articles: -- [Install the .NET SDK or the .NET Runtime with Snap.](linux-snap.md) - [Install the .NET SDK or the .NET Runtime with a script.](linux-scripted-manual.md#scripted-install) - [Install the .NET SDK or the .NET Runtime manually.](linux-scripted-manual.md#manual-install) @@ -97,7 +97,7 @@ For more information on installing .NET without a package manager, see one of th [!INCLUDE [package-manager-failed-to-fetch-rpm](includes/package-manager-failed-to-fetch-rpm.md)] -### Errors related to missing `fxr`, `libhostfxr.so`, or `FrameworkList.xml` +### Errors related to missing `fxr`, `libhostfxr.so`, `FrameworkList.xml`, or `/usr/share/dotnet` For more information about solving these problems, see [Troubleshoot `fxr`, `libhostfxr.so`, and `FrameworkList.xml` errors](linux-package-mixup.md). diff --git a/docs/core/install/linux-package-mixup.md b/docs/core/install/linux-package-mixup.md index 2fe3b49a01ca2..43a8ab4627914 100644 --- a/docs/core/install/linux-package-mixup.md +++ b/docs/core/install/linux-package-mixup.md @@ -2,13 +2,14 @@ title: Troubleshoot .NET package mix ups on Linux description: Learn about how to troubleshoot strange .NET package errors on Linux. These errors may occur when you run the dotnet command. author: omajid -ms.date: 12/21/2022 +ms.date: 03/01/2023 no-loc: ['usr','lib64','share','dotnet','libhostfxr.so', 'fxr', 'FrameworkList.xml', 'System.IO.FileNotFoundException'] +zone_pivot_groups: operating-systems-set-two --- # Troubleshoot .NET errors related to missing files on Linux -When you try to use .NET on Linux, commands such as `dotnet new` and `dotnet run` may fail with a message related to a file not being found, such as _fxr_, _libhostfxr.so_, or _FrameworkList.xml_. Some of the error messages may be similar to the following: +When you try to use .NET on Linux, commands such as `dotnet new` and `dotnet run` may fail with a message related to a file not being found, such as _fxr_, _libhostfxr.so_, or _FrameworkList.xml_. Some of the error messages may be similar to the following items: - **System.IO.FileNotFoundException** @@ -32,9 +33,12 @@ When you try to use .NET on Linux, commands such as `dotnet new` and `dotnet run One symptom of these problems is that both the `/usr/lib64/dotnet` and `/usr/share/dotnet` folders are on your system. +> [!TIP] +> Use the `dotnet --info` command to list which SDKs and Runtimes are installed. For more information, see [How to check that .NET is already installed](how-to-detect-installed-versions.md?pivots=os-linux). + ## What's going on -This generally happens when two Linux package repositories provide .NET packages. While Microsoft provides a Linux package repository to source .NET packages, some Linux distributions also provide .NET packages, such as: +These errors usually occur when two Linux package repositories provide .NET packages. While Microsoft provides a Linux package repository to source .NET packages, some Linux distributions also provide .NET packages. These distributions include: - Alpine Linux - Arch @@ -44,60 +48,78 @@ This generally happens when two Linux package repositories provide .NET packages - RHEL - Ubuntu 22.04+ -Mixing .NET packages from two different sources will most likely lead to issues since the packages may place things at different paths, and may be compiled differently. +If you mix .NET packages from two different sources, you'll likely run into problems. The packages might place things at different paths and might be compiled differently. ## Solutions The solution to these problems is to use .NET from one package repository. Which repository to pick, and how to do it, varies by use-case and the Linux distribution. -If your distribution provides .NET packages, it's recommended that you use that package repository instead of Microsoft's. +- [My Linux distribution provides .NET packages, and I want to use them.](#my-linux-distribution-provides-net-packages-and-i-want-to-use-them) +- [I need a version of .NET that isn't provided by my Linux distribution.](#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution) -01. **I only use .NET and no other packages from the Microsoft repository, and my distribution provides .NET packages.** +### My Linux distribution provides .NET packages, and I want to use them - If you only use the Microsoft repository for .NET packages and not for any other Microsoft package such as `mdatp`, `powershell`, or `mssql`, then: +::: zone pivot="os-linux-redhat" - 01. Remove the Microsoft repository. - 01. Remove the .NET related packages from your OS. - 01. Install the .NET packages from the distribution repository. +- **Do you use the Microsoft repository for other packages, such as PowerShell and MSSQL?** - For Fedora, CentOS 8+, RHEL 8+, use the following bash commands: + - **Yes** - ```bash - sudo dnf remove packages-microsoft-prod - sudo dnf remove 'dotnet*' 'aspnet*' 'netstandard*' - sudo dnf install dotnet-sdk-7.0 - ``` + Configure your package manager to ignore the .NET packages from the Microsoft repository. It's possible that you've installed .NET from both repositories, so you want to choose one or the other. - For Ubuntu (or any other apt-based distribution) use the following bash commands + 01. Remove the existing .NET packages from your distribution. You want to start over and ensure that you don't install them from the wrong repository. - ```bash - sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*' - sudo rm /etc/apt/sources.list.d/microsoft-prod.list - sudo apt update - sudo apt install dotnet-sdk-7.0 - ``` + ```bash + sudo dnf remove 'dotnet*' 'aspnet*' 'netstandard*' + ``` -02. **I want to use the distribution provided .NET packages, but I also use the Microsoft repository for other packages.** + 01. Configure the Microsoft repository to ignore .NET packages. - If you use the Microsoft repository for Microsoft packages such as `mdatp`, `powershell`, or `mssql`, but you don't want to use the repository for .NET, then: + ```bash + echo 'excludepkgs=dotnet*,aspnet*,netstandard*' | sudo tee -a /etc/yum.repos.d/microsoft-prod.repo + ``` - 01. Configure the Microsoft repository to exclude any .NET package. - 01. Remove the .NET related packages from your OS. - 01. Install the .NET packages from the distribution repository. + 01. Reinstall .NET from the distribution's package feed. For more information, see [Install .NET on Linux](linux.md). - For Fedora, CentOS 8+, RHEL 8+, use the following bash commands: + - **No** - ```bash - echo 'excludepkgs=dotnet*,aspnet*,netstandard*' | sudo tee -a /etc/yum.repos.d/microsoft-prod.repo - sudo dnf remove 'dotnet*' 'aspnet*' 'netstandard*' - sudo dnf install dotnet-sdk-7.0 - ``` + 01. Remove the existing .NET packages from your distribution. You want to start over and ensure that you don't install them from the wrong repository. - For Ubuntu (or any other distribution that uses apt): + ```bash + sudo dnf remove 'dotnet*' 'aspnet*' 'netstandard*' + ``` - 01. Remove the .NET packages if you previously installed them. For more information, see scenario #1. - 01. Create `/etc/apt/preferences` if it doesn't already exist. - 01. Add the following config to the preferences file, which prevents packages that start with `dotnet` or `aspnetcore` from being sourced by the Microsoft feed: + 01. Delete the Microsoft repository feed from your distribution. + + ```bash + sudo dnf remove packages-microsoft-prod + ``` + + 01. Reinstall .NET from the distribution's package feed. For more information, see [Install .NET on Linux](linux.md). + +::: zone-end + +::: zone pivot="os-linux-ubuntu, os-linux-other" + +- **Do you use the Microsoft repository for other packages, such as PowerShell and MSSQL?** + + - **Yes** + + Configure your package manager to ignore the .NET packages from the Microsoft repository. It's possible that you've installed .NET from both repositories, so you want to choose one or the other. + + 01. Remove the existing .NET packages from your distribution. You want to start over and ensure that you don't install them from the wrong repository. + + ```bash + sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*' + ``` + + 01. Create `/etc/apt/preferences`, if it doesn't already exist. + + ```bash + touch /etc/apt/preferences + ``` + + 01. Open `/etc/apt/preferences` in an editor and add the following settings, which prevents packages that start with `dotnet`, `aspnetcore`, or `netstandard` from being sourced from the Microsoft repository: ```bash Package: dotnet* aspnet* netstandard* @@ -105,49 +127,84 @@ If your distribution provides .NET packages, it's recommended that you use that Pin-Priority: -10 ``` - 01. Install .NET. + 01. Reinstall .NET from the distribution's package feed. For more information, see [Install .NET on Linux](linux.md). + + - **No** + + 01. Remove the existing .NET packages from your distribution. You want to start over and ensure that you don't install them from the wrong repository. + + ```bash + sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*' + ``` + + 01. Delete the Microsoft repository feed from your distribution. ```bash - sudo apt-get update && sudo apt-get install -y dotnet7 + sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list + sudo apt update ``` -03. **I need a recent version of .NET that's not provided by the Linux distribution repositories.** + 01. Reinstall .NET from the distribution's package feed. For more information, see [Install .NET on Linux](linux.md). + +::: zone-end + +### I need a version of .NET that isn't provided by my Linux distribution + +::: zone pivot="os-linux-redhat" + +Configure your package manager to ignore the .NET packages from the distribution's repository. It's possible that you've installed .NET from both repositories, so you want to choose one or the other. - In this case, keep the Microsoft repository, but configure it so .NET packages from the Microsoft repository are considered a higher priority. Then, remove the already-installed .NET packages and then re-install the .NET packages from the Microsoft repository. - - For Fedora, CentOS 8+, RHEL 8+, use the following bash commands: +01. Remove the existing .NET packages from your distribution. You want to start over and ensure that you don't install them from the wrong repository. ```bash - echo 'priority=50' | sudo tee -a /etc/yum.repos.d/microsoft-prod.repo sudo dnf remove 'dotnet*' 'aspnet*' 'netstandard*' - sudo dnf install dotnet-sdk-7.0 ``` - For Ubuntu (or any other distribution that uses apt) make sure you've installed the Microsoft repository feeds and then install the package. +01. Configure the Linux repository to ignore .NET packages. - 01. Remove the .NET packages if you previously installed them. For more information, see scenario #1. - 01. Create `/etc/apt/preferences` if it doesn't already exist. - 01. Add the following config to the preferences file, adding the specific package you want to pin as a high priority, which will be sourced by the Microsoft Feed. For example, use the following example to pin .NET SDK 7.0: + ```bash + echo 'excludepkgs=dotnet*,aspnet*,netstandard*' | sudo tee -a /etc/yum.repos.d/.repo + ``` - ```bash - Package: dotnet-sdk-7.0 - Pin: origin "packages.microsoft.com" - Pin-Priority: 999 - ``` + Make sure to replace `` with your distribution's package source. - 01. Install .NET. +01. Reinstall .NET from the distribution's package feed. For more information, see [Install .NET on Linux](linux.md). - ```bash - sudo apt-get update && sudo apt-get install -y dotnet-sdk-7.0 - ``` +::: zone-end + +::: zone pivot="os-linux-ubuntu, os-linux-other" -04. **I've encountered a bug in the Linux distribution version of .NET, I need the latest Microsoft version.** +Configure your package manager to ignore the .NET packages from the distribution's repository. It's possible that you've installed .NET from both repositories, so you want to choose one or the other. - Use solution 3 to solve this problem. +01. Remove the existing .NET packages from your distribution. You want to start over and ensure that you don't install them from the wrong repository. + + ```bash + sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*' + ``` + +01. Create `/etc/apt/preferences`, if it doesn't already exist. + + ```bash + touch /etc/apt/preferences + ``` + +01. Open `/etc/apt/preferences` in an editor and add the following settings, which prevents packages that start with `dotnet`, `aspnetcore`, or `netstandard` from being sourced from the distribution's repository. + + ```bash + Package: dotnet* aspnet* netstandard* + Pin: origin "" + Pin-Priority: -10 + ``` + + Make sure to replace `` with your distribution's package source, for example, on Ubuntu you would use `archive.ubuntu.com`. + +01. Reinstall .NET from the Microsoft package feed. For more information, see [Install .NET on Linux](linux.md). If using Ubuntu, see [My Ubuntu distribution doesn't include the .NET version I want, or I need an out-of-support .NET version](linux-ubuntu.md#my-ubuntu-distribution-doesnt-include-the-net-version-i-want-or-i-need-an-out-of-support-net-version). + +::: zone-end ## Online references -Many of these problems have been reported by users such as yourself. The following is a list of those issues. You can read through them for insights on what may be happening: +Many other users have reported these problems. The following is a list of those issues. You can read through them for insights on what may be happening: - System.IO.FileNotFoundException and '/usr/share/dotnet/packs/Microsoft.NETCore.App.Ref/5.0.0/data/FrameworkList.xml' @@ -176,9 +233,8 @@ Many of these problems have been reported by users such as yourself. The followi - [Core #4644: Cannot install .NET Core SDK 2.1 on Fedora 32](https://github.com/dotnet/core/issues/4655) - [Runtime #49375: After updating to 5.0.200-1 using package manager, it appears that no sdks are installed](https://github.com/dotnet/runtime/issues/49375) -## Next steps +## See also -- [Install .NET on Linux](linux.md) +- [How to check that .NET is already installed](how-to-detect-installed-versions.md?pivots=os-linux) - [How to remove the .NET Runtime and SDK](remove-runtime-sdk-versions.md?pivots=os-linux) -- [Tutorial: Create a new app with Visual Studio Code](../tutorials/with-visual-studio-code.md). -- [Tutorial: Containerize a .NET app](../docker/build-container.md). +- [Install .NET on Linux](linux.md) diff --git a/docs/core/install/linux-scripted-manual.md b/docs/core/install/linux-scripted-manual.md index 694a59120ce35..cd00db92ef18f 100644 --- a/docs/core/install/linux-scripted-manual.md +++ b/docs/core/install/linux-scripted-manual.md @@ -10,8 +10,6 @@ ms.date: 12/21/2022 This article demonstrates how to install the .NET SDK or the .NET Runtime on Linux by using the install script or by extracting the binaries. For a list of distributions that support the built-in package manager, see [Install .NET on Linux](linux.md). -You can also install .NET with snap. For more information, see [Install the .NET SDK or the .NET Runtime with Snap](linux-snap.md). - [!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)] ## .NET releases @@ -75,11 +73,17 @@ You can usually install a recent version of *libgdiplus* by [adding the Mono rep ## Scripted install -The [dotnet-install scripts](../tools/dotnet-install-script.md) are used for automation and non-admin installs of the **SDK** and **Runtime**. You can download the script from . +The [dotnet-install scripts](../tools/dotnet-install-script.md) are used for automation and non-admin installs of the **SDK** and **Runtime**. You can download the script from . When .NET is installed in this way, you'll need to install dependencies required by your Linux distribution. Use the links in the [Install .NET on Linux](linux.md) article for your specific Linux distribution. > [!IMPORTANT] > Bash is required to run the script. +You can download the script with `wget`: + +```bash +wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh +``` + Before running this script, you'll need to grant permission for this script to run as an executable: ```bash @@ -106,21 +110,23 @@ You can install a specific major version with the `--channel` parameter to indic For more information, see [dotnet-install scripts reference](../tools/dotnet-install-script.md). +To enable .NET on the command line, see [Set environment variables system-wide](#set-environment-variables-system-wide). + ## Manual install As an alternative to the package managers, you can download and manually install the SDK and runtime. Manual installation is commonly used as part of continuous integration testing or on an unsupported Linux distribution. For a developer or user, it's better to use a package manager. -First, download a **binary** release for either the SDK or the runtime from one of the following sites. If you install the .NET SDK, you will not need to install the corresponding runtime: +Download a **binary** release for either the SDK or the runtime from one of the following sites. The .NET SDK includes the corresponding runtime: - ✔️ [.NET 7 downloads](https://dotnet.microsoft.com/download/dotnet/7.0) - ✔️ [.NET 6 downloads](https://dotnet.microsoft.com/download/dotnet/6.0) - [All .NET Core downloads](https://dotnet.microsoft.com/download/dotnet) -Next, extract the downloaded file and use the `export` command to set `DOTNET_ROOT` to the extracted folder's location and then ensure .NET is in PATH. This should make the .NET CLI commands available at the terminal. +Extract the downloaded file and use the `export` command to set `DOTNET_ROOT` to the extracted folder's location and then ensure .NET is in PATH. Exporting `DOTNET_ROOT` makes the .NET CLI commands available in the terminal. For more information about .NET environment variables, see [.NET SDK and CLI environment variables](../tools/dotnet-environment-variables.md#net-sdk-and-cli-environment-variables). -Alternatively, after downloading the .NET binary, the following commands may be run from the directory where the file is saved to extract the runtime. This will also make the .NET CLI commands available at the terminal and set the required environment variables. **Remember to change the `DOTNET_FILE` value to the name of the downloaded binary**: +Alternatively, after downloading the .NET binary, the following commands may be run from the directory where the file is saved to extract the runtime. Running the following commands makes the .NET CLI commands available at the terminal and sets the required environment variables. **Remember to change the `DOTNET_FILE` value to the name of the downloaded binary**: ```bash DOTNET_FILE=dotnet-sdk-7.0.100-linux-x64.tar.gz @@ -131,9 +137,9 @@ mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT" export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools ``` -This approach lets you install different versions into separate locations and choose explicitly which one to use by which application. +The preceding install script approach allows installing different versions into separate locations so you can choose explicitly which one to use by which app. -### Set environment variables system-wide +## Set environment variables system-wide If you used the previous install script, the variables set only apply to your current terminal session. Add them to your shell profile. There are a number of different shells available for Linux and each has a different profile. For example: diff --git a/docs/core/install/linux-snap.md b/docs/core/install/linux-snap.md index 7a4c5e9b099d3..59453ea20e274 100644 --- a/docs/core/install/linux-snap.md +++ b/docs/core/install/linux-snap.md @@ -6,7 +6,7 @@ ms.author: adegeo ms.date: 12/21/2022 --- -# Install the .NET SDK or the .NET Runtime with Snap +# Install .NET SDK or .NET Runtime with Snap Use a Snap package to install the .NET SDK or .NET Runtime. Snaps are a great alternative to the package manager built into your Linux distribution. This article describes how to install .NET through [Snap](https://snapcraft.io/dotnet-sdk). diff --git a/docs/core/install/linux-ubuntu-1604.md b/docs/core/install/linux-ubuntu-1604.md new file mode 100644 index 0000000000000..4d8e057067f92 --- /dev/null +++ b/docs/core/install/linux-ubuntu-1604.md @@ -0,0 +1,68 @@ +--- +title: Install .NET on Ubuntu 16.04 +description: Demonstrates the various ways to install .NET SDK and .NET Runtime on Ubuntu 16.04. +author: adegeo +ms.author: adegeo +ms.date: 03/01/2023 +--- + +# Install .NET SDK or .NET Runtime on Ubuntu 16.04 + +This article discusses how to install .NET on Ubuntu 16.04; Only .NET 6 is supported. + +[!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)] + +[!INCLUDE [linux-install-package-manager-x64-vs-arm](includes/linux-install-package-manager-x64-vs-arm.md)] + +## Supported versions + +The following versions of .NET are supported or available for Ubuntu 16.04: + +| Supported .NET versions | Available in Ubuntu feed | [Available in Microsoft feed](linux-ubuntu.md#register-the-microsoft-package-repository) | +|-------------------------|--------------------------|-----------------------------------| +| 6.0 | None | 6.0, 5.0, 3.1, 3.0, 2.2, 2.1, 2.0 | + +When an [Ubuntu version](https://wiki.ubuntu.com/Releases) falls out of support, .NET is no longer supported with that version. + +[!INCLUDE [versions-not-supported](includes/versions-not-supported.md)] + +## Add the Microsoft package repository + +[!INCLUDE [linux-prep-intro-apt](includes/linux-prep-intro-apt.md)] + +```bash +wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +sudo dpkg -i packages-microsoft-prod.deb +rm packages-microsoft-prod.deb +``` + +[!INCLUDE [linux-apt-install-70](includes/linux-install-70-apt.md)] + +## How to install other versions + +[!INCLUDE [package-manager-switcher](./includes/package-manager-heading-hack-pkgname.md)] + +## Troubleshooting + +If you run into issues installing or even running .NET, see [Troubleshooting](linux-ubuntu.md#troubleshooting). + +## Dependencies + +When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed: + +- libc6 +- libgcc1 +- libgssapi-krb5-2 +- libicu55 +- libssl1.0.0 +- libstdc++6 +- zlib1g + +[!INCLUDE [linux-libgdiplus-general](includes/linux-libgdiplus-general.md)] + +You can install a recent version of *libgdiplus* by [adding the Mono repository to your system](https://www.mono-project.com/download/stable/#download-lin-ubuntu). + +## Next steps + +- [How to enable TAB completion for the .NET CLI](../tools/enable-tab-autocomplete.md) +- [Tutorial: Create a console application with .NET SDK using Visual Studio Code](../tutorials/with-visual-studio-code.md) diff --git a/docs/core/install/linux-ubuntu-1804.md b/docs/core/install/linux-ubuntu-1804.md new file mode 100644 index 0000000000000..22fb7c8d8f936 --- /dev/null +++ b/docs/core/install/linux-ubuntu-1804.md @@ -0,0 +1,68 @@ +--- +title: Install .NET on Ubuntu 18.04 +description: Demonstrates the various ways to install .NET SDK and .NET Runtime on Ubuntu 18.04. +author: adegeo +ms.author: adegeo +ms.date: 03/01/2023 +--- + +# Install .NET SDK or .NET Runtime on Ubuntu 18.04 + +This article discusses how to install .NET on Ubuntu 18.04; .NET 6 and .NET 7 are supported. + +[!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)] + +[!INCLUDE [linux-install-package-manager-x64-vs-arm](includes/linux-install-package-manager-x64-vs-arm.md)] + +## Supported versions + +The following versions of .NET are supported or available for Ubuntu 18.04: + +| Supported .NET versions | Available in Ubuntu feed | [Available in Microsoft feed](linux-ubuntu.md#register-the-microsoft-package-repository) | +|-------------------------|--------------------------|-----------------------------------| +| 7.0, 6.0 | None | 7.0. 6.0, 5.0, 3.1, 2.2, 2.1 | + +When an [Ubuntu version](https://wiki.ubuntu.com/Releases) falls out of support, .NET is no longer supported with that version. + +[!INCLUDE [versions-not-supported](includes/versions-not-supported.md)] + +## Add the Microsoft package repository + +[!INCLUDE [linux-prep-intro-apt](includes/linux-prep-intro-apt.md)] + +```bash +wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +sudo dpkg -i packages-microsoft-prod.deb +rm packages-microsoft-prod.deb +``` + +[!INCLUDE [linux-apt-install-70](includes/linux-install-70-apt.md)] + +## How to install other versions + +[!INCLUDE [package-manager-switcher](./includes/package-manager-heading-hack-pkgname.md)] + +## Troubleshooting + +If you run into issues installing or even running .NET, see [Troubleshooting](linux-ubuntu.md#troubleshooting). + +## Dependencies + +When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed: + +- libc6 +- libgcc1 +- libgssapi-krb5-2 +- libicu60 +- libssl1.1 +- libstdc++6 +- zlib1g + +[!INCLUDE [linux-libgdiplus-general](includes/linux-libgdiplus-general.md)] + +You can install a recent version of *libgdiplus* by [adding the Mono repository to your system](https://www.mono-project.com/download/stable/#download-lin-ubuntu). + +## Next steps + +- [How to enable TAB completion for the .NET CLI](../tools/enable-tab-autocomplete.md) +- [Tutorial: Create a console application with .NET SDK using Visual Studio Code](../tutorials/with-visual-studio-code.md) diff --git a/docs/core/install/linux-ubuntu-2004.md b/docs/core/install/linux-ubuntu-2004.md new file mode 100644 index 0000000000000..02225f62d09bb --- /dev/null +++ b/docs/core/install/linux-ubuntu-2004.md @@ -0,0 +1,68 @@ +--- +title: Install .NET on Ubuntu 20.04 +description: Demonstrates the various ways to install .NET SDK and .NET Runtime on Ubuntu 20.04. +author: adegeo +ms.author: adegeo +ms.date: 03/01/2023 +--- + +# Install .NET SDK or .NET Runtime on Ubuntu 20.04 + +This article discusses how to install .NET on Ubuntu 20.04; .NET 6 and .NET 7 are supported. + +[!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)] + +[!INCLUDE [linux-install-package-manager-x64-vs-arm](includes/linux-install-package-manager-x64-vs-arm.md)] + +## Supported versions + +The following versions of .NET are supported or available for Ubuntu 20.04: + +| Supported .NET versions | Available in Ubuntu feed | [Available in Microsoft feed](linux-ubuntu.md#register-the-microsoft-package-repository) | +|-------------------------|--------------------------|-----------------------------------| +| 7.0, 6.0 | None | 7.0. 6.0, 5.0, 3.1, 2.1 | + +When an [Ubuntu version](https://wiki.ubuntu.com/Releases) falls out of support, .NET is no longer supported with that version. + +[!INCLUDE [versions-not-supported](includes/versions-not-supported.md)] + +## Add the Microsoft package repository + +[!INCLUDE [linux-prep-intro-apt](includes/linux-prep-intro-apt.md)] + +```bash +wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +sudo dpkg -i packages-microsoft-prod.deb +rm packages-microsoft-prod.deb +``` + +[!INCLUDE [linux-apt-install-70](includes/linux-install-70-apt.md)] + +## How to install other versions + +[!INCLUDE [package-manager-switcher](./includes/package-manager-heading-hack-pkgname.md)] + +## Troubleshooting + +If you run into issues installing or even running .NET, see [Troubleshooting](linux-ubuntu.md#troubleshooting). + +## Dependencies + +When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed: + +- libc6 +- libgcc1 +- libgssapi-krb5-2 +- libicu66 +- libssl1.1 +- libstdc++6 +- zlib1g + +[!INCLUDE [linux-libgdiplus-general](includes/linux-libgdiplus-general.md)] + +You can install a recent version of *libgdiplus* by [adding the Mono repository to your system](https://www.mono-project.com/download/stable/#download-lin-ubuntu). + +## Next steps + +- [How to enable TAB completion for the .NET CLI](../tools/enable-tab-autocomplete.md) +- [Tutorial: Create a console application with .NET SDK using Visual Studio Code](../tutorials/with-visual-studio-code.md) diff --git a/docs/core/install/linux-ubuntu-2204.md b/docs/core/install/linux-ubuntu-2204.md new file mode 100644 index 0000000000000..7c274770db2f4 --- /dev/null +++ b/docs/core/install/linux-ubuntu-2204.md @@ -0,0 +1,76 @@ +--- +title: Install .NET on Ubuntu 22.04 +description: Demonstrates the various ways to install .NET SDK and .NET Runtime on Ubuntu 22.04. +author: adegeo +ms.author: adegeo +ms.date: 03/01/2023 +--- + +# Install .NET SDK or .NET Runtime on Ubuntu 22.04 + +This article discusses how to install .NET on Ubuntu 22.04; .NET 6 and .NET 7 are supported. + +[!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)] + +[!INCLUDE [linux-install-package-manager-x64-vs-arm](includes/linux-install-package-manager-x64-vs-arm.md)] + +.NET is available in the Ubuntu package manager feeds, as well as the Microsoft package repository. However, you should only one use or the other to install .NET. If you want to use the Microsoft package repository, see [How to register the Microsoft package repository](linux-ubuntu.md#register-the-microsoft-package-repository). + +## Supported versions + +The following versions of .NET are supported or available for Ubuntu 22.04: + +| Supported .NET versions | Available in Ubuntu feed | [Available in Microsoft feed](linux-ubuntu.md#register-the-microsoft-package-repository) | +|-------------------------|--------------------------|-----------------------------------| +| 7.0, 6.0 | 6.0 | 7.0, 6.0, 3.1 | + +When an [Ubuntu version](https://wiki.ubuntu.com/Releases) falls out of support, .NET is no longer supported with that version. + +[!INCLUDE [versions-not-supported](includes/versions-not-supported.md)] + +## Install .NET 7 + +.NET 7 packages aren't available in the Ubuntu package manager feeds. You must use the Microsoft package repository. + +> [!WARNING] +> If you've previously installed .NET 6 from the Ubuntu feed, you'll run into issues installing .NET 7 from the Microsoft package repository. .NET is installed to different locations and is resolved differently for both package feeds. It's recommended that you uninstall .NET 6 and then install with the Microsoft package repository. +> +> For more information about how to clean your system and install .NET 7, see [I need a version of .NET that isn't provided by my Linux distribution](linux-package-mixup.md?pivots=os-linux-ubuntu#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution). + +## Install .NET 6 + +This section describes how to install .NET 6. + +[!INCLUDE [linux-apt-install-60](includes/linux-install-60-apt.md)] + +## How to install other versions + +Other versions of .NET aren't supported in the Ubuntu feeds. Instead, use the Microsoft package repository. + +## Troubleshooting + +If you run into issues installing or even running .NET, see [Troubleshooting](linux-ubuntu.md#troubleshooting). + +## Dependencies + +When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed: + +- libc6 +- libgcc1 +- libgcc-s1 +- libgssapi-krb5-2 +- libicu71 +- liblttng-ust1 +- libssl3 +- libstdc++6 +- libunwind8 +- zlib1g + +[!INCLUDE [linux-libgdiplus-general](includes/linux-libgdiplus-general.md)] + +You can install a recent version of *libgdiplus* by [adding the Mono repository to your system](https://www.mono-project.com/download/stable/#download-lin-ubuntu). + +## Next steps + +- [How to enable TAB completion for the .NET CLI](../tools/enable-tab-autocomplete.md) +- [Tutorial: Create a console application with .NET SDK using Visual Studio Code](../tutorials/with-visual-studio-code.md) diff --git a/docs/core/install/linux-ubuntu-2210.md b/docs/core/install/linux-ubuntu-2210.md new file mode 100644 index 0000000000000..c85de0e557f40 --- /dev/null +++ b/docs/core/install/linux-ubuntu-2210.md @@ -0,0 +1,70 @@ +--- +title: Install .NET on Ubuntu 22.10 +description: Demonstrates the various ways to install .NET SDK and .NET Runtime on Ubuntu 22.10. +author: adegeo +ms.author: adegeo +ms.date: 03/01/2023 +--- + +# Install .NET SDK or .NET Runtime on Ubuntu 22.10 + +This article discusses how to install .NET on Ubuntu 22.10; .NET 6 and .NET 7 are both supported. + +[!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)] + +[!INCLUDE [linux-install-package-manager-x64-vs-arm](includes/linux-install-package-manager-x64-vs-arm.md)] + +.NET is available in the Ubuntu package manager feeds, as well as the Microsoft repository. However, you should only one use or the other to install .NET. Review the [Decide how to install .NET](linux-ubuntu.md#decide-how-to-install-net) section to determine which feed you should use. + +> [!WARNING] +> Don't use both repositories to manage .NET. If you've previously installed .NET from the Ubuntu feed or the Microsoft feed, you'll run into issues using the other feed. .NET is installed to different locations and is resolved differently for both package feeds. It's recommended that you uninstall previously installed versions of .NET and then install with the Microsoft package repository. For more information, see [How to register the Microsoft package repository](linux-ubuntu.md#register-the-microsoft-package-repository). + +## Supported versions + +The following versions of .NET are supported or available for Ubuntu 22.10: + +| Supported .NET versions | Available in Ubuntu feed | [Available in Microsoft feed](linux-ubuntu.md#register-the-microsoft-package-repository) | +|-------------------------|--------------------------|-----------------------------------| +| 7.0, 6.0 | 7.0, 6.0 | 7.0, 6.0, 3.1 | + +When an [Ubuntu version](https://wiki.ubuntu.com/Releases) falls out of support, .NET is no longer supported with that version. + +[!INCLUDE [versions-not-supported](includes/versions-not-supported.md)] + +## Install .NET + +[!INCLUDE [linux-apt-install-70](includes/linux-install-70-apt.md)] + +## How to install other versions + +.NET package names are standardized across all Linux distributions. The following table lists the packages: + +[!INCLUDE [package-manager-switcher](./includes/package-manager-heading-hack-pkgname.md)] + +## Troubleshooting + +If you run into issues installing or even running .NET, see [Troubleshooting](linux-ubuntu.md#troubleshooting). + +## Dependencies + +When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed: + +- libc6 +- libgcc1 +- libgcc-s1 +- libgssapi-krb5-2 +- libicu71 +- liblttng-ust1 +- libssl3 +- libstdc++6 +- libunwind8 +- zlib1g + +[!INCLUDE [linux-libgdiplus-general](includes/linux-libgdiplus-general.md)] + +You can install a recent version of *libgdiplus* by [adding the Mono repository to your system](https://www.mono-project.com/download/stable/#download-lin-ubuntu). + +## Next steps + +- [How to enable TAB completion for the .NET CLI](../tools/enable-tab-autocomplete.md) +- [Tutorial: Create a console application with .NET SDK using Visual Studio Code](../tutorials/with-visual-studio-code.md) diff --git a/docs/core/install/linux-ubuntu.md b/docs/core/install/linux-ubuntu.md index 93d5f904945c4..93070091c29fc 100644 --- a/docs/core/install/linux-ubuntu.md +++ b/docs/core/install/linux-ubuntu.md @@ -1,200 +1,210 @@ --- -title: Install .NET on Ubuntu +title: .NET and Ubuntu overview description: Demonstrates the various ways to install .NET SDK and .NET Runtime on Ubuntu. author: adegeo ms.author: adegeo -ms.date: 12/21/2022 +ms.date: 03/02/2023 --- # Install the .NET SDK or the .NET Runtime on Ubuntu -.NET is supported on Ubuntu. This article describes how to install .NET on Ubuntu. When an [Ubuntu version](https://wiki.ubuntu.com/Releases) falls out of support, .NET is no longer supported with that version. +This article describes how to install .NET on Ubuntu. The Microsoft package repository contains every version of .NET that is currently, or was previously, supported on Ubuntu. Starting with Ubuntu 22.04, some versions of .NET are available in the Ubuntu package feed. For more information about available versions, see the [Supported distributions](#supported-distributions) section. -[!INCLUDE [linux-intro-sdk-vs-runtime](includes/linux-intro-sdk-vs-runtime.md)] +> [!WARNING] +> It's recommended that you avoid using both the Microsoft and Ubuntu package repositories for .NET, as this leads to problems when apps try to resolve a specific version of .NET. -[!INCLUDE [linux-install-package-manager-x64-vs-arm](includes/linux-install-package-manager-x64-vs-arm.md)] +| Method | Pros | Cons | +|--------|------|------| +| [Package manager
(Microsoft feed)](#register-the-microsoft-package-repository) |
  • Supported versions always available.
  • Patches are available right way.
  • Dependencies are included.
  • Easy removal.
|
  • Requires registering the Microsoft package repository.
  • Preview releases aren't available.
  • Only supports x64 Ubuntu.
| +| [Package manager
(Ubuntu feed)](#supported-distributions) |
  • Usually the latest version is available.
  • Patches are available right way.
  • Dependencies are included.
  • Easy removal.
|
  • .NET versions available vary by Ubuntu version.
  • Preview releases aren't available.
  • Only supports x64 Ubuntu.
| +| [Script \ Manual extraction](linux-scripted-manual.md) |
  • Control where .NET is installed.
  • Preview releases are available.
|
  • Manually install updates.
  • Manually install dependencies.
  • Manual removal.
| -## Supported distributions +## Decide how to install .NET -The following table is a list of currently supported .NET releases and the versions of Ubuntu they're supported on. +When your version of Ubuntu supports .NET through the built-in Ubuntu feed, support for those builds of .NET is provided by Canonical and the builds may be optimized for different workloads. Microsoft provides support for packages in the Microsoft package repository feed. -| Ubuntu | .NET | -|------------------------|------------| -| [22.10](#2210) | 7, 6 | -| [22.04 (LTS)](#2204) | 7, 6 | -| [20.04 (LTS)](#2004) | 7, 6 | -| [18.04 (LTS)](#1804) | 7, 6 | -| [16.04 (LTS)](#1604) | 6 | +Use the following sections to determine how you should install .NET: -[!INCLUDE [versions-not-supported](includes/versions-not-supported.md)] +- [I'm using Ubuntu 22.10, and I only need .NET 6.0 or .NET 7.0](#im-using-ubuntu-2210-and-i-only-need-net-60-or-net-70) +- [I'm using Ubuntu 22.04, and I only need .NET 6.0](#im-using-ubuntu-2204-and-i-only-need-net-60) +- [I'm using Ubuntu 22.04, and I need .NET 7.0](#im-using-ubuntu-2204-and-i-need-net-70) +- [I'm using a version of Ubuntu prior to 22.04](#im-using-a-version-of-ubuntu-prior-to-2204) +- [I'm using other Microsoft packages, such as `powershell`, `mdatp`, or `mssql`](#im-using-other-microsoft-packages-such-as-powershell-mdatp-or-mssql) +- [I want to create a .NET app](#i-want-to-create-a-net-app) +- [I want to run a .NET app in a container, cloud, or continuous-integration scenario](#i-want-to-run-a-net-app-in-a-container-cloud-or-continuous-integration-scenario) +- [My Ubuntu distribution doesn't include the .NET version I want, or I need an out-of-support .NET version](#my-ubuntu-distribution-doesnt-include-the-net-version-i-want-or-i-need-an-out-of-support-net-version) +- [I want to install a preview version](#i-want-to-install-a-preview-version) +- [I don't want to use APT](#i-dont-want-to-use-apt) +- [I'm using an Arm-based CPU](#im-using-an-arm-based-cpu) -## Install preview versions +### I'm using Ubuntu 22.10, and I only need .NET 6.0 or .NET 7.0 -[!INCLUDE [preview installs don't support package managers](./includes/linux-install-previews.md)] +Install .NET through the Ubuntu feed. For more information, see [Install .NET on Ubuntu 22.10](linux-ubuntu-2210.md). -## Remove preview versions +If you're going to use other Microsoft repository packages, such as `powershell`, `mdatp`, or `mssql`, you'll need to de-prioritize the .NET packages provided by the Microsoft repository. For instructions on how to de-prioritize the packages, see [My Linux distribution provides .NET packages, and I want to use them](linux-package-mixup.md?pivots=os-linux-ubuntu#my-linux-distribution-provides-net-packages-and-i-want-to-use-them). -[!INCLUDE [package-manager uninstall notice](./includes/linux-uninstall-preview-info.md)] +### I'm using Ubuntu 22.04, and I only need .NET 6.0 - +Use the same package sources for the SDK as you use for the runtime. For example, if you're using Ubuntu 22.04 and .NET 6, but not .NET 7, it's recommended that you install .NET through the built-in Ubuntu feed. If, however, you move to .NET 7, which isn't provided by Canonical for Ubuntu 22.04, you should [Register and install with the Microsoft package repository](#register-the-microsoft-package-repository). Review the other suggestions in the [Decide how to install .NET](#decide-how-to-install-net) section. -## 22.10 +### I want to run a .NET app in a container, cloud, or continuous-integration scenario -> [!IMPORTANT] -> .NET 7 isn't yet ready in the Ubuntu feed, and is only available via the Microsoft feeds. However, .NET 6 is available in the 22.10 Ubuntu feed. These instructions demonstrate how to install .NET 7 via the Microsoft package manager feed. +If your Ubuntu version provides the .NET version you require, install it from the built-in feed. Otherwise, [register the Microsoft package repository](#register-the-microsoft-package-repository) and install .NET from that repository. Review the information in the [Supported distributions](#supported-distributions) section. -[!INCLUDE [linux-prep-intro-apt](includes/linux-prep-intro-apt.md)] +If the version of .NET you want isn't available, try using the [dotnet-install script](linux-scripted-manual.md#scripted-install). -```bash -wget https://packages.microsoft.com/config/ubuntu/22.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb -sudo dpkg -i packages-microsoft-prod.deb -rm packages-microsoft-prod.deb -``` +### My Ubuntu distribution doesn't include the .NET version I want, or I need an out-of-support .NET version -[!INCLUDE [linux-apt-install-70](includes/linux-install-70-apt.md)] +We recommend you use APT and the Microsoft package repository. For more information, see the [Register and install with the Microsoft package repository](#register-the-microsoft-package-repository) section. -> [!NOTE] -> [Ubuntu 22.10 includes OpenSSL 3](https://discourse.ubuntu.com/t/openssl-3-0-transition-plans/24453) as the baseline version. Versions of .NET prior to .NET 6 don't support OpenSSL 3. Microsoft doesn't test or support using OpenSSL 1.x on Ubuntu 22.10. For more information, see [.NET 6 Security Improvements](https://devblogs.microsoft.com/dotnet/announcing-net-6/#security). +### I want to install a preview version -## 22.04 +Use one of the following ways to install .NET: -> [!WARNING] -> If you've previously installed .NET from `packages.microsoft.com`, you may run into issues swapping to the built in Ubuntu package manager feeds for .NET. For more information, see the [Advisory on installing .NET on Ubuntu](https://github.com/dotnet/core/issues/7699) and [Troubleshoot .NET package mixups](linux-package-mixup.md#whats-going-on). +- [Install .NET with `install-dotnet` script.](linux-scripted-manual.md#scripted-install) +- [Manually install .NET](linux-scripted-manual.md#manual-install) -.NET 6 is included in the Ubuntu 22.04 package manager feeds. +### I don't want to use APT -> [!IMPORTANT] -> .NET 7 **isn't** included in the Ubuntu feeds and you must use the [22.04 Microsoft package feed](#2204-microsoft-package-feed). +If you want an automated installation, use the [Linux installation script](linux-scripted-manual.md#scripted-install). -### Install the SDK +If you want full control over the .NET installation experience, download a tarball and manually install .NET. For more information, see [Manual install](linux-scripted-manual.md#manual-install). -The .NET SDK allows you to develop apps with .NET. If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following commands: +### I'm using an Arm-based CPU -```bash -sudo apt-get update && \ - sudo apt-get install -y dotnet-sdk-6.0 -``` +Use one of the following ways to install .NET: -### Install the runtime +- [Install .NET with `install-dotnet` script.](linux-scripted-manual.md#scripted-install) +- [Manually install .NET](linux-scripted-manual.md#manual-install) -The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands: +## Supported distributions -```bash -sudo apt-get update && \ - sudo apt-get install -y aspnetcore-runtime-6.0 -``` +The following table is a list of currently supported .NET releases and the versions of Ubuntu they're supported on. Each link goes to the specific Ubuntu version page with specific instructions on how to install .NET for that version of Ubuntu. -As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn't include ASP.NET Core support: replace `aspnetcore-runtime-6.0` in the previous command with `dotnet-runtime-6.0`: + -```bash -sudo apt-get install -y dotnet-runtime-6.0 -``` +| Ubuntu | Supported .NET versions | Available in Ubuntu feed | [Available in Microsoft feed](#register-the-microsoft-package-repository) | +|-------------------------------------|-------------------------|--------------------------|-----------------------------------| +| [22.10](linux-ubuntu-2210.md) | 7.0, 6.0 | 7.0, 6.0 | 7.0, 6.0, 3.1 | +| [22.04 (LTS)](linux-ubuntu-2204.md) | 7.0, 6.0 | 6.0 | 7.0, 6.0, 3.1 | +| [20.04 (LTS)](linux-ubuntu-2004.md) | 7.0, 6.0 | None | 7.0. 6.0, 5.0, 3.1, 2.1 | +| [18.04 (LTS)](linux-ubuntu-1804.md) | 7.0, 6.0 | None | 7.0. 6.0, 5.0, 3.1, 2.2, 2.1 | +| [16.04 (LTS)](linux-ubuntu-1604.md) | 6.0 | None | 6.0, 5.0, 3.1, 3.0, 2.2, 2.1, 2.0 | -## 22.04 (Microsoft package feed) +When an [Ubuntu version](https://wiki.ubuntu.com/Releases) falls out of support, .NET is no longer supported with that version. -> [!IMPORTANT] -> .NET 6 is included in the Ubuntu 22.04 package manager feeds, but .NET 7 isn't. To install .NET 7 you must use the Microsoft package feed. If you've previously installed .NET from the Ubuntu package manager feed, you may run into issues swapping to the Microsoft package manager feed for .NET. For more information, see the [Advisory on installing .NET on Ubuntu](https://github.com/dotnet/core/issues/7699) and [Troubleshoot .NET package mixups](linux-package-mixup.md#whats-going-on). +[!INCLUDE [versions-not-supported](includes/versions-not-supported.md)] -[!INCLUDE [linux-prep-intro-apt](includes/linux-prep-intro-apt.md)] +## Register the Microsoft package repository -```bash -wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb -sudo dpkg -i packages-microsoft-prod.deb -rm packages-microsoft-prod.deb -``` +The Microsoft package repository contains all versions of .NET that were previously, or currently are, [supported with your version of Ubuntu](#supported-distributions). If your version of Ubuntu provides .NET packages, you'll need to de-prioritize the Ubuntu packages and use the Microsoft repository. For instructions on how to de-prioritize the packages, see [I need a version of .NET that isn't provided by my Linux distribution](linux-package-mixup.md?pivots=os-linux-ubuntu#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution). -[!INCLUDE [linux-apt-install-70](includes/linux-install-70-apt.md)] +> [!IMPORTANT] +> Package manager installs are only supported on the **x64** architecture. Other architectures, such as **Arm**, must install .NET by some other means such as with the [installer script](linux-scripted-manual.md#scripted-install) or by [manual installation](linux-scripted-manual.md#manual-install). -> [!NOTE] -> [Ubuntu 22.04 includes OpenSSL 3](https://discourse.ubuntu.com/t/openssl-3-0-transition-plans/24453) as the baseline version. Versions of .NET prior to .NET 6 don't support OpenSSL 3. Microsoft doesn't test or support using OpenSSL 1.x on Ubuntu 22.10. For more information, see [.NET 6 Security Improvements](https://devblogs.microsoft.com/dotnet/announcing-net-6/#security). +Preview releases are **not** available in the Microsoft package repository. For more information, see [Install preview versions](#install-preview-versions). -## 20.04 +> [!CAUTION] +> We recommend that you only use one repository to manage all of your .NET installs. If you've previously installed .NET with the Ubuntu repository, you must clean the system of .NET packages and configure the APT to ignore the Ubuntu feed. For more information about how to do this, see [I need a version of .NET that isn't provided by my Linux distribution](linux-package-mixup.md?pivots=os-linux-ubuntu#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution). [!INCLUDE [linux-prep-intro-apt](includes/linux-prep-intro-apt.md)] ```bash -wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +# Get Ubuntu version +declare repo_version=$(if command -v lsb_release &> /dev/null; then lsb_release -r -s; else grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"'; fi) + +# Download Microsoft signing key and repository +wget https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -O packages-microsoft-prod.deb + +# Install Microsoft signing key and repository sudo dpkg -i packages-microsoft-prod.deb + +# Clean up rm packages-microsoft-prod.deb + +# Update packages +sudo apt update ``` -[!INCLUDE [linux-apt-install-60](includes/linux-install-60-apt.md)] +## Install .NET -## 18.04 +After you've [registered the Microsoft package repository](#register-the-microsoft-package-repository), or if your version of Ubuntu's default feed supports the .NET package, you can install .NET through the package manager with the `apt install ` command. Replace `` with the name of the .NET package you want to install. For example, to install .NET SDK 7.0, use the command `apt install dotnet-sdk-7.0`. The following table lists the currently supported .NET packages: -[!INCLUDE [linux-prep-intro-apt](includes/linux-prep-intro-apt.md)] +|| Product | Type | Package | +|---------|--------------|---------|--------------------------| +| **7.0** | ASP.NET Core | Runtime | `aspnetcore-runtime-7.0` | +| **7.0** | .NET | Runtime | `dotnet-runtime-7.0` | +| **7.0** | .NET | SDK | `dotnet-sdk-7.0` | +| **6.0** | ASP.NET Core | Runtime | `aspnetcore-runtime-6.0` | +| **6.0** | .NET | Runtime | `dotnet-runtime-6.0` | +| **6.0** | .NET | SDK | `dotnet-sdk-6.0` | -```bash -wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb -sudo dpkg -i packages-microsoft-prod.deb -rm packages-microsoft-prod.deb -``` +If you want to install an unsupported version of .NET, check the [Supported distributions](#supported-distributions) section to see if that version of .NET is available. Then, substitute the **version** of .NET you want to install. For example, to install ASP.NET Core 2.1, use the package name `aspnetcore-runtime-2.1`. -[!INCLUDE [linux-apt-install-60](includes/linux-install-60-apt.md)] +> [!TIP] +> If you're not creating .NET apps, install the ASP.NET Core runtime as it includes the .NET runtime and also supports ASP.NET Core apps. -## 16.04 +Some enviornment variables affect how .NET is run after it's installed. For more information, see [.NET SDK and CLI environment variables](../tools/dotnet-environment-variables.md#net-sdk-and-cli-environment-variables). -[!INCLUDE [linux-prep-intro-apt](includes/linux-prep-intro-apt.md)] +## Uninstall .NET + +If you installed .NET through a package manager, uninstall in the same way with the `apt-get remove` command: ```bash -wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb -sudo dpkg -i packages-microsoft-prod.deb -rm packages-microsoft-prod.deb +sudo apt-get remove dotnet-sdk-6.0 ``` -[!INCLUDE [linux-apt-install-60](includes/linux-install-60-apt.md)] +For more information, see [Uninstall .NET](remove-runtime-sdk-versions.md?pivots=os-linux#uninstall-net). + +## Install preview versions -## How to install other versions +[!INCLUDE [preview installs don't support package managers](./includes/linux-install-previews.md)] -[!INCLUDE [package-manager-switcher](./includes/package-manager-heading-hack-pkgname.md)] +## Remove preview versions + +[!INCLUDE [package-manager uninstall notice](./includes/linux-uninstall-preview-info.md)] ## Use APT to update .NET -When a new patch release is available for .NET, you can simply upgrade it through APT with the following commands: +If you installed .NET through a package manager, you can upgrade the package with the `apt upgrade` command. For example, the following commands upgrade the `dotnet-sdk-7.0` package with the latest version: ```bash -sudo apt-get update -sudo apt-get upgrade +sudo apt update +sudo apt upgrade dotnet-sdk-7.0 ``` -If you've upgraded your Linux distribution since installing .NET, you may need to reconfigure the Microsoft package repository. Run the installation instructions for your current distribution version to upgrade to the appropriate package repository for .NET updates. +> [!TIP] +> If you've upgraded your Linux distribution since installing .NET, you may need to reconfigure the Microsoft package repository. Run the installation instructions for your current distribution version to upgrade to the appropriate package repository for .NET updates. ## Troubleshooting -Starting with Ubuntu 22.04 you may run into a situation where it seems only a piece of .NET is available. For example, when you've installed the runtime and the SDK, but when running `dotnet --info` the SDK isn't listed. This can be related to using two different package sources. The official Ubuntu 22.04 and Ubuntu 22.10 package feeds include .NET, but you may have also installed .NET from the Microsoft feeds. For more information about how to fix this problem, see [Troubleshoot _fxr_, _libhostfxr.so_, and _FrameworkList.xml_ errors](linux-package-mixup.md) +Starting with Ubuntu 22.04 you may run into a situation where it seems only a piece of .NET is available. For example, when you've installed the runtime and the SDK, but when running `dotnet --info` only the runtime is listed. This can be related to using two different package sources. The built-in Ubuntu 22.04 and Ubuntu 22.10 package feeds include some versions of .NET, but not all, and you may have also installed .NET from the Microsoft feeds. For more information about how to fix this problem, see [Troubleshoot .NET errors related to missing files on Linux](linux-package-mixup.md?pivots=os-linux-ubuntu#solutions). ### APT problems @@ -229,7 +239,7 @@ sudo apt-get update && \ ## Dependencies -When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed: +When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you must install these dependencies to run your app: - libc6 - libgcc1 diff --git a/docs/core/install/linux.md b/docs/core/install/linux.md index 1504572c6b426..b00053b14a881 100644 --- a/docs/core/install/linux.md +++ b/docs/core/install/linux.md @@ -3,7 +3,7 @@ title: Install .NET on Linux distributions description: Learn about how to install .NET on Linux. .NET is not only available at package.microsoft.com, but also the official package archives for various Linux distributions. author: adegeo ms.author: adegeo -ms.date: 11/08/2022 +ms.date: 03/01/2023 --- # Install .NET on Linux @@ -35,7 +35,6 @@ You may need to install [.NET dependencies](https://github.com/dotnet/core/blob/ - [Fedora](linux-fedora.md) - [openSUSE](linux-opensuse.md) - [SLES](linux-sles.md) -- [Snap](linux-snap.md) - [Ubuntu](linux-ubuntu.md) .NET is [supported by Microsoft](https://github.com/dotnet/core/blob/main/microsoft-support.md) when downloaded from a Microsoft source. Best effort support is offered from Microsoft when downloaded from elsewhere. You can open issues at [dotnet/core](https://github.com/dotnet/core) if you run into problems. diff --git a/docs/core/install/macos.md b/docs/core/install/macos.md index d6fc5e5ca286a..da4a9a802f5dc 100644 --- a/docs/core/install/macos.md +++ b/docs/core/install/macos.md @@ -99,7 +99,7 @@ First, download a **binary** release for either the SDK or the runtime from one - ✔️ [.NET Core 3.1 downloads](https://dotnet.microsoft.com/download/dotnet/3.1) - [All .NET downloads](https://dotnet.microsoft.com/download/dotnet) -Next, extract the downloaded file and use the `export` command to set `DOTNET_ROOT` to the extracted folder's location and then ensure .NET is in PATH. This should make the .NET CLI commands available at the terminal. +Next, extract the downloaded file and use the `export` command to set `DOTNET_ROOT` to the extracted folder's location and then ensure .NET is in PATH. This should make the .NET CLI commands available at the terminal. For more information about .NET environment variables, see [.NET SDK and CLI environment variables](../tools/dotnet-environment-variables.md#net-sdk-and-cli-environment-variables). Alternatively, after downloading the .NET binary, the following commands may be run from the directory where the file is saved to extract the runtime. This will also make the .NET CLI commands available at the terminal and set the required environment variables. **Remember to change the `DOTNET_FILE` value to the name of the downloaded binary**: @@ -186,7 +186,7 @@ The [dotnet-install scripts](../tools/dotnet-install-script.md) are used for aut The script defaults to installing the latest [long term support (LTS)](https://dotnet.microsoft.com/platform/support/policy/dotnet-core) version, which is .NET 6. You can choose a specific release by specifying the `channel` switch. Include the `runtime` switch to install a runtime. Otherwise, the script installs the SDK. -The following command installs the ASP.NET Core runtime for maximum compatability. The ASP.NET Core runtime also includes the standard .NET runtime. +The following command installs the ASP.NET Core runtime for maximum compatibility. The ASP.NET Core runtime also includes the standard .NET runtime. ```bash ./dotnet-install.sh --channel 7.0 --runtime aspnetcore diff --git a/docs/core/install/remove-runtime-sdk-versions.md b/docs/core/install/remove-runtime-sdk-versions.md index 7f53d2dc6d459..482d58df91166 100644 --- a/docs/core/install/remove-runtime-sdk-versions.md +++ b/docs/core/install/remove-runtime-sdk-versions.md @@ -1,19 +1,19 @@ --- title: Remove the .NET runtime and SDK -description: This article describes how to determine which versions of the .NET Runtime and SDK are currently installed, and then, how to remove them on Windows, Mac, and Linux. +description: This article describes how to uninstall .NET. You'll need to determine which versions of the .NET Runtime and SDK are currently installed, and then, how to remove them on Windows, Mac, and Linux. author: adegeo ms.author: adegeo -ms.date: 11/04/2021 +ms.date: 02/22/2023 zone_pivot_groups: operating-systems-set-one --- # How to remove the .NET Runtime and SDK -Over time, as you install updated versions of the .NET runtime and SDK, you may want to remove outdated versions of .NET from your machine. Removing older versions of the runtime may change the runtime chosen to run shared framework applications, as detailed in the article on [.NET version selection](../versions/selection.md). +Over time, as you install updated versions of the .NET runtime and SDK, you may want to remove outdated versions of .NET from your machine. Uninstalling older versions of the runtime may change the runtime chosen to run shared framework applications, as detailed in the article on [.NET version selection](../versions/selection.md). ## Should I remove a version? -The [.NET version selection](../versions/selection.md) behaviors and the runtime compatibility of .NET across updates enables safe removal of previous versions. .NET runtime updates are compatible within a major version **band** such as 6.x and 5.x. Additionally, newer releases of the .NET SDK generally maintain the ability to build applications that target previous versions of the runtime in a compatible manner. +The [.NET version selection](../versions/selection.md) behaviors and the runtime compatibility of .NET across updates enables safe removal of previous versions. .NET runtime updates are compatible within a major version **band** such as 7.x and 6.x. Additionally, newer releases of the .NET SDK generally maintain the ability to build applications that target previous versions of the runtime in a compatible manner. In general, you only need the latest SDK and latest patch version of the runtimes required for your application. Instances where you might want to keep older SDK or runtime versions include maintaining *project.json*-based applications. Unless your application has specific reasons for earlier SDKs or runtimes, you may safely remove older versions. @@ -37,15 +37,25 @@ Select any versions you want to remove from your computer and click **Uninstall* The best way for you to uninstall .NET is to mirror the action you used to install .NET. The specifics depend on your chosen Linux distribution and the installation method. +Preview releases are manually installed, and must be manually uninstalled. For more information, see the [Scripted or manual](#scripted-or-manual) section. + > [!IMPORTANT] > For Red Hat installations, consult the [Red Hat Product Documentation for .NET](https://access.redhat.com/documentation/en-us/net/6.0/). +You can remove the following types if .NET installations: + +- [Package manager](#package-manager) +- [Manually or scripted installs](#scripted-or-manual) +- [Snap installs](#snap) + +### Package manager + There's no need to first uninstall the .NET SDK when upgrading it using a package manager, unless you're upgrading from a preview version that was manually installed. The package manager `update` or `refresh` commands will automatically remove the older version upon the successful installation of a newer version. If you have a preview version installed, uninstall it. If you installed .NET using a package manager, use that same package manager to uninstall the .NET SDK or runtime. .NET installations support most popular package managers. Consult the documentation for your distribution's package manager for the precise syntax in your environment: - [apt-get(8)](https://linux.die.net/man/8/apt-get) is used by Debian based systems, including Ubuntu. -- [yum(8)](https://linux.die.net/man/8/yum) is used on Fedora, CentOS, and Oracle Linux. +- [yum(8)](https://linux.die.net/man/8/yum) is used on Fedora, CentOS, Oracle Linux, and RHEL. - [zypper(8)](https://en.opensuse.org/SDB:Zypper_manual_(plain)) is used on openSUSE and SUSE Linux Enterprise System (SLES). - [dnf(8)](https://dnf.readthedocs.io/en/latest/command_ref.html) is used on Fedora. @@ -55,55 +65,68 @@ The package name for the .NET SDK installation for most package managers is `dot For machines that have installed only the runtime, and not the SDK, the package name is `dotnet-runtime-` for the .NET runtime, and `aspnetcore-runtime-` for the entire runtime stack. -> [!TIP] -> .NET Core installations earlier than 2.0 didn't uninstall the host application when the SDK was uninstalled using the package manager. Using `apt-get`, the command is: -> -> ```bash -> apt-get remove dotnet-host -> ``` -> -> There's no version attached to `dotnet-host`. +### Snap -If you installed using a tarball, you must remove .NET using the manual method. +To remove a Snap package, use the `snap remove ` command. For example, to remove .NET Runtime 3.1, use `snap remove dotnet-runtime-31`. -On Linux, you must remove the SDKs and runtimes separately, by removing the versioned directories. These directories may vary depending on your Linux distribution. Removing them deletes the SDK and runtime from disk. For example, to remove the 1.0.1 SDK and runtime, you would use the following bash commands: +::: zone-end -```bash -version="1.0.1" -sudo rm -rf /usr/share/dotnet/sdk/$version -sudo rm -rf /usr/share/dotnet/shared/Microsoft.NETCore.App/$version -sudo rm -rf /usr/share/dotnet/shared/Microsoft.AspNetCore.All/$version -sudo rm -rf /usr/share/dotnet/shared/Microsoft.AspNetCore.App/$version -sudo rm -rf /usr/share/dotnet/host/fxr/$version -``` +::: zone pivot="os-linux, os-macos" + +### Scripted or manual + +If you installed .NET using the [dotnet-install script](linux-scripted-manual.md#scripted-install), or by [extracting a tarball](linux-scripted-manual.md#manual-install), you must remove .NET using the manual method. > [!IMPORTANT] -> The version folders may not match the "version" you're uninstalling. The individual runtimes and SDKs that are installed with a single .NET release may have different versions. For example, you may have installed ASP.NET Core 5 Runtime, which installed the 5.0.2 ASP.NET Core runtime and the 5.0.8 .NET runtime. Each has a different versioned folder. For more information, see [Overview of how .NET is versioned](../versions/index.md). +> This information is written for Linux, but also applies to macOS. On macOS, the root directory is most likely `/usr/local/share/dotnet/`. Substitute the directories accordingly. -The parent directories for the SDK and runtime are listed in the output from the `dotnet --list-sdks` and `dotnet --list-runtimes` command, as shown in the earlier table. +When you manually install .NET, it's generally installed to the `/usr/share/dotnet/`, `/usr/lib/dotnet/`, or the `$HOME/.dotnet` directory. The SDK, runtime, and .NET host, are installed into separate sub directories. These "component" directories contain a directory for each version of .NET. By removing the versioned directories, you remove that version of .NET from your system. These directories may vary depending on your Linux distribution. -::: zone-end +There are three commands you can use to discover where .NET is installed: `dotnet --list-sdks` for SDKs, `dotnet --list-runtimes` for runtimes, and `dotnet --info` for everything. These commands don't list the .NET host. To determine which hosts are installed, check the `/usr/share/dotnet/host/fxr/` directory. The following list represents the directories of a specific version of .NET, where the `$version` variable represents the version of the .NET: + +- **SDK**: + + `/usr/share/dotnet/sdk/$version/` + +- **Runtime**: -::: zone pivot="os-macos" + The runtime is based on specific .NET product runtimes, such as `Microsoft.AspNetCore.All` or `Microsoft.NETCore.App` (the .NET runtime specifically). These are installed to the `/usr/share/dotnet/shared/$product/$version` directory, where `$product` is the product runtime. For example, you may see the following directories: -On Mac, you must remove the SDKs and runtimes separately, by removing the versioned directories. Removing them deletes the SDK and runtime from disk. For example, to remove the 1.0.1 SDK and runtime, you would use the following bash commands: + ``` + /usr/share/dotnet/shared/Microsoft.NETCore.App/$version/ + /usr/share/dotnet/shared/Microsoft.AspNetCore.All/$version/ + /usr/share/dotnet/shared/Microsoft.AspNetCore.App/$version/ + ``` + +- **.NET host** + + `/usr/share/dotnet/host/fxr/$version/` + +Use the `rm -rf` command to remove a version of .NET. For example, to remove the 6.0.406 SDK, run the following command: ```bash -version="1.0.1" -sudo rm -rf /usr/local/share/dotnet/sdk/$version -sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.NETCore.App/$version -sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.AspNetCore.All/$version -sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.AspNetCore.App/$version -sudo rm -rf /usr/local/share/dotnet/host/fxr/$version +sudo rm -rf /usr/share/dotnet/sdk/6.0.406 ``` > [!IMPORTANT] -> The version folders may not match the "version" you're uninstalling. The individual runtimes and SDKs that are installed with .NET may have different versions. For example, you may have installed .NET 5 Runtime, which installed the 5.0.2 ASP.NET Core runtime and the 5.0.8 .NET runtime. For more information, see [Overview of how .NET is versioned](../versions/index.md). +> The version directories may not match the "version" you're uninstalling. The individual runtimes and SDKs that are installed with a single .NET release may have different versions. For example, you may have installed ASP.NET Core 5 Runtime, which installed the 5.0.2 ASP.NET Core runtime and the 5.0.8 .NET runtime. Each has a different versioned directory. For more information, see [Overview of how .NET is versioned](../versions/index.md). > [!IMPORTANT] -> If you're using an Arm-based Mac, such as one with an M1 chip, review the folder paths described in [Install .NET on Arm-based Macs](macos.md#arm-based-macs). +> If you're using an Arm-based Mac, such as one with an M1 chip, review the directory paths described in [Install .NET on Arm-based Macs](macos.md#arm-based-macs). + +::: zone-end + +::: zone pivot="os-linux" + +### Prior to .NET Core 2.0 + +.NET Core installations earlier than 2.0 didn't uninstall the .NET host application when the SDK was uninstalled using the package manager. Using `apt-get`, the command is: + +```bash +apt-get remove dotnet-host +``` -The parent directories for the SDK and runtime are listed in the output from the `dotnet --list-sdks` and `dotnet --list-runtimes` command, as shown in the earlier table. +There's no version attached to `dotnet-host`. ::: zone-end @@ -129,18 +152,18 @@ Starting with Visual Studio 2019 version 16.3, Visual Studio is in charge of its ::: zone-end -## Remove the NuGet fallback folder +## Remove the NuGet fallback directory -Before .NET Core 3.0 SDK, the .NET Core SDK installers used a folder named *NuGetFallbackFolder* to store a cache of NuGet packages. This cache was used during operations such as `dotnet restore` or `dotnet build /t:Restore`. The *NuGetFallbackFolder* is located at *C:\Program Files\dotnet\sdk* on Windows and at */usr/local/share/dotnet/sdk* on macOS. +Before .NET Core 3.0 SDK, the .NET Core SDK installers used a directory named *NuGetFallbackFolder* to store a cache of NuGet packages. This cache was used during operations such as `dotnet restore` or `dotnet build /t:Restore`. The *NuGetFallbackFolder* was located under the *sdk* folder where .NET is installed. For example it could be at *C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder* on Windows and at */usr/local/share/dotnet/sdk/NuGetFallbackFolder* on macOS. -You may want to remove this folder, if: +You may want to remove this directory, if: - You're only developing using .NET Core 3.0 SDK or .NET 5 or later versions. - You're developing using .NET Core SDK versions earlier than 3.0, but you can work online. -If you want to remove the NuGet fallback folder, you can delete it, but you'll need administrative privileges to do so. +If you want to remove the NuGet fallback directory, you can delete it, but you'll need administrative privileges to do so. -It's not recommended to delete the *dotnet* folder. Doing so would remove any global tools you've previously installed. Also, on Windows: +It's not recommended to delete the *dotnet* directory. Doing so would remove any global tools you've previously installed. Also, on Windows: - You'll break Visual Studio 2019 version 16.3 and later versions. You can run **Repair** to recover. - If there are .NET Core SDK entries in the **Apps & features** dialog, they'll be orphaned. diff --git a/docs/core/install/windows.md b/docs/core/install/windows.md index 44b83da1dd7b7..9e50b0e4c7479 100644 --- a/docs/core/install/windows.md +++ b/docs/core/install/windows.md @@ -129,7 +129,7 @@ The [dotnet-install scripts](../tools/dotnet-install-script.md) are used for CI The script defaults to installing the latest [long term support (LTS)](https://dotnet.microsoft.com/platform/support/policy/dotnet-core) version, which is .NET 6. You can choose a specific release by specifying the `Channel` switch. Include the `Runtime` switch to install a runtime. Otherwise, the script installs the SDK. -The following command installs the ASP.NET Core runtime for maximum compatability. The ASP.NET Core runtime also includes the standard .NET runtime. +The following command installs the ASP.NET Core runtime for maximum compatibility. The ASP.NET Core runtime also includes the standard .NET runtime. ```powershell dotnet-install.ps1 -Channel 7.0 -Runtime aspnetcore diff --git a/docs/core/introduction.md b/docs/core/introduction.md index 3632f1037c8b6..b0dd95ff44113 100644 --- a/docs/core/introduction.md +++ b/docs/core/introduction.md @@ -1,13 +1,13 @@ --- title: .NET (and .NET Core) - introduction and overview description: Learn about .NET (and .NET Core). .NET is a free, open-source development platform for building many kinds of apps. -ms.date: 11/08/2022 +ms.date: 03/24/2023 ms.custom: "updateeachrelease" recommendations: false --- # What is .NET? Introduction and overview -[.NET is a free](https://dotnet.microsoft.com/download/), cross-platform, [open source developer platform](https://github.com/dotnet/core) for building many kinds of applications. .NET is built on a [high-performance runtime](https://devblogs.microsoft.com/dotnet/category/performance/) that is used in production by many [high-scale apps](https://devblogs.microsoft.com/dotnet/category/developer-stories/). +[.NET is a free](https://dotnet.microsoft.com/download/), cross-platform, [open-source developer platform](https://github.com/dotnet/core) for building many kinds of applications. .NET is built on a [high-performance runtime](https://devblogs.microsoft.com/dotnet/category/performance/) that is used in production by many [high-scale apps](https://devblogs.microsoft.com/dotnet/category/developer-stories/). **Cloud apps** @@ -39,9 +39,9 @@ recommendations: false .NET features allow developers to productively write reliable and performant code. -* [Asynchronous code](../csharp/programming-guide/concepts/async/index.md) +* [Asynchronous code](../csharp/asynchronous-programming/index.md) * [Attributes](../standard/attributes/index.md) -* [Reflection](../csharp/programming-guide/concepts/reflection.md) +* [Reflection](/dotnet/csharp/advanced-topics/reflection-and-attributes/) * [Code analyzers](../fundamentals/code-analysis/overview.md) * [Delegates and lambdas](../standard/delegates-lambdas.md) * [Events](../standard/events/index.md) @@ -79,28 +79,20 @@ Console.WriteLine("Hello, World!"); The app can be built and run with the [.NET CLI](tools/index.md): -```bash -% dotnet run -Hello, World! -``` - -It can also be built and run as two separate steps. The following example is for an app that is named *app*: - -```bash -% dotnet build -% ./bin/Debug/net6.0/app +```dotnetcli +dotnet run Hello, World! ``` ## Binary distributions -* [.NET SDK](sdk.md) -- Set of tools, libraries, and runtimes for development, building, and testing apps. -* [.NET Runtimes](https://dotnet.microsoft.com/download/dotnet) -- Set of runtimes and libraries, for running apps. +* [.NET SDK](sdk.md): Set of tools, libraries, and runtimes for development, building, and testing apps. +* [.NET Runtimes](https://dotnet.microsoft.com/download/dotnet): Set of runtimes and libraries, for running apps. You can download .NET from: -* [The Microsoft download site](https://dotnet.microsoft.com/download/). -* [Containers](https://mcr.microsoft.com/catalog?search=dotnet/). +* [The Microsoft download site](https://dotnet.microsoft.com/download). +* [Containers](https://mcr.microsoft.com/catalog?search=dotnet). * [Linux package managers](install/linux.md). ## Free and open source @@ -150,9 +142,9 @@ The runtime is designed to support multiple programming languages. C#, F#, and V ## Compilation -.NET apps (as written in a high-level language like C#) are compiled to an [Intermediate Language (IL)](https://en.wikipedia.org/wiki/Common_Intermediate_Language). IL is a compact code format that can be supported on any operating system or architecture. Most .NET apps use APIs that are supported in multiple environments, requiring only the .NET runtime to run. +.NET apps (as written in a high-level language like C#) are compiled into an [Intermediate](https://en.wikipedia.org/wiki/Common_Intermediate_Language) Language (IL)](https://en.wikipedia.org/wiki/Common_Intermediate_Language). IL is a compact code format that can be supported on any operating system or architecture. Most .NET apps use APIs that are supported in multiple environments, requiring only the .NET runtime to run. -IL needs to be compiled to native code in order to execute on a CPU, for example Arm64 or x64. .NET supports both Ahead-Of-Time (AOT) and Just-In-Time (JIT) compilation models. +IL needs to be compiled to native code to execute on a CPU, for example, Arm64 or x64. .NET supports both Ahead-Of-Time (AOT) and Just-In-Time (JIT) compilation models. * On Android, macOS, and Linux, JIT compilation is the default, and AOT is optional (for example, with [ReadyToRun](deploying/ready-to-run.md)). * On [iOS](/xamarin/ios/), AOT is mandatory (except when running in the simulator). @@ -206,6 +198,7 @@ For more information, see the following resources: MSBuild and the .NET CLI can be used with various continuous integration tools and environments, such as: * [GitHub Actions](https://github.com/features/actions) +* [GitHub Actions and .NET](../devops/github-actions-overview.md) * [Azure DevOps](/azure/devops/user-guide/what-is-azure-devops) * [CAKE for C#](https://cakebuild.net/) * [FAKE for F#](https://fake.build/) @@ -219,7 +212,7 @@ For more information, see [Use the .NET SDK in Continuous Integration (CI) envir * *Self-contained* apps include the .NET runtime and dependent libraries. They can be [single-file](deploying/single-file/overview.md) or multi-file. Users of the application can run it on a machine that doesn't have the .NET runtime installed. Self-contained apps always target a single operating system and architecture configuration. * *Framework-dependent* apps require a compatible version of the .NET runtime, typically installed globally. Framework-dependent apps can be published for a single operating system and architecture configuration or as "portable," targeting all supported configurations. -.NET apps are launched with a native executable, by default. The executable is both operating system and architecture-specific. Apps can also be launched with the [`dotnet` command](tools/dotnet.md). +.NET apps are launched with a native executable, by default. The executable is both operating-system and architecture-specific. Apps can also be launched with the [`dotnet` command](tools/dotnet.md). Apps can be [deployed in containers](docker/introduction.md). Microsoft provides [container images](https://mcr.microsoft.com/catalog?search=dotnet) for various target environments. diff --git a/docs/core/native-interop/expose-components-to-com.md b/docs/core/native-interop/expose-components-to-com.md index 35976b4a015b9..d458c48fd06d5 100644 --- a/docs/core/native-interop/expose-components-to-com.md +++ b/docs/core/native-interop/expose-components-to-com.md @@ -100,6 +100,18 @@ For example, the following code block adds the `Server.tlb` type library at inde ``` +## Loading in the default `AssemblyLoadContext` + +During activation, the assembly containing the COM component is loaded in a separate based on the assembly path. If there is one assembly providing multiple COM servers, the `AssemblyLoadContext` is reused such that all of the servers from that assembly reside in the same load context. If there are multiple assemblies providing COM servers, a new `AssemblyLoadContext` is created for each assembly, and each server resides in the load context that corresponds to its assembly. + +In .NET 8 and later versions, the assembly can specify that it should be loaded in the default `AssemblyLoadContext`. To enable loading in the default context, add the following [RuntimeHostConfigurationOption](../runtime-config/index.md#msbuild-properties) item to the project: + +```xml + + + +``` + ## Sample There is a fully functional [COM server sample](https://github.com/dotnet/samples/tree/main/core/extensions/COMServerDemo) in the dotnet/samples repository on GitHub. @@ -109,8 +121,6 @@ There is a fully functional [COM server sample](https://github.com/dotnet/sample > [!IMPORTANT] > In .NET Framework, an "Any CPU" assembly can be consumed by both 32-bit and 64-bit clients. By default, in .NET Core, .NET 5, and later versions, "Any CPU" assemblies are accompanied by a 64-bit *\*.comhost.dll*. Because of this, they can only be consumed by 64-bit clients. That is the default because that is what the SDK represents. This behavior is identical to how the "self-contained" feature is published: by default it uses what the SDK provides. The `NETCoreSdkRuntimeIdentifier` MSBuild property determines the bitness of *\*.comhost.dll*. The managed part is actually bitness agnostic as expected, but the accompanying native asset defaults to the targeted SDK. -During activation, the assembly containing the COM component is loaded in a separate based on the assembly path. If there is one assembly providing multiple COM servers, the `AssemblyLoadContext` is reused such that all of the servers from that assembly reside in the same load context. If there are multiple assemblies providing COM servers, a new `AssemblyLoadContext` is created for each assembly, and each server resides in the load context that corresponds to its assembly. - [Self-contained deployments](../deploying/index.md#publish-self-contained) of COM components are not supported. Only [framework-dependent deployments](../deploying/index.md#publish-framework-dependent) of COM components are supported. Additionally, loading both .NET Framework and .NET Core into the same process does have diagnostic limitations. The primary limitation is the debugging of managed components as it is not possible to debug both .NET Framework and .NET Core at the same time. In addition, the two runtime instances don't share managed assemblies. This means that it isn't possible to share actual .NET types across the two runtimes and instead all interactions must be restricted to the exposed COM interface contracts. diff --git a/docs/core/porting/index.md b/docs/core/porting/index.md index 9f985bce10ce6..61a6271505009 100644 --- a/docs/core/porting/index.md +++ b/docs/core/porting/index.md @@ -1,8 +1,8 @@ --- -title: Port from .NET Framework to .NET 6 +title: Port from .NET Framework to .NET 7 description: Understand the porting process and discover tools you may find helpful when porting a .NET Framework project to .NET 6. author: adegeo -ms.date: 07/22/2022 +ms.date: 02/28/2023 ms.custom: devdivchpfy22 no-loc: ["package.config", PackageReference] --- @@ -25,7 +25,7 @@ Consider the following dependencies before you migrate a Windows Forms or WPF ap .NET uses the open-source versions of Windows Forms and WPF and includes enhancements over .NET Framework. -For tutorials on migrating your desktop application to .NET 6, see one of the following articles: +For tutorials on migrating your desktop application to .NET, see one of the following articles: - [Migrate .NET Framework WPF apps to .NET](/dotnet/desktop/wpf/migration/convert-project-from-net-framework?view=netdesktop-6.0&preserve-view=true) - [Migrate .NET Framework Windows Forms apps to .NET](/dotnet/desktop/winforms/migration/?view=netdesktop-6.0&preserve-view=true) @@ -42,7 +42,29 @@ For more information, see [Use the Windows Compatibility Pack to port code to .N ## .NET Framework compatibility mode -The .NET Framework compatibility mode was introduced in .NET Standard 2.0. The compatibility mode allows .NET Standard and .NET (including .NET Core 3.1) projects to reference .NET Framework libraries on Windows only. Referencing .NET Framework libraries doesn't work for all projects, such as if the library uses WPF APIs, but it does unblock many porting scenarios. For more information, see the [Analyze your dependencies to port code from .NET Framework to .NET](third-party-deps.md#net-framework-compatibility-mode). +The .NET Framework compatibility mode was introduced in .NET Standard 2.0. The compatibility mode allows .NET Standard and .NET projects to reference .NET Framework libraries as if they were compiled for the project's target framework. However, some .NET implementations may support a larger chunk of .NET Framework than others. For example, .NET Core 3.0 extends the .NET Framework compatibility mode to Windows Forms and WPF.Referencing .NET Framework libraries doesn't work for all projects, such as if the library uses WPF APIs, but it does unblock many porting scenarios. For more information, see the [Analyze your dependencies to port code from .NET Framework to .NET](third-party-deps.md#net-framework-compatibility-mode). + +Referencing .NET Framework libraries doesn't work in all cases, as it depends on which .NET Framework APIs were used and whether or not these APIs are supported by the project's target framework. Also, some of the .NET Framework APIs will only work on Windows. The .NET Framework compatibility mode unblocks many porting scenarios but you should test your projects to ensure that they also work at runtime. For more information, see the [Analyze your dependencies to port code from .NET Framework to](third-party-deps.md#net-framework-compatibility-mode). + +## Target framework changes in SDK-style projects + +As previously mentioned, the project files for .NET use a different format than .NET Framework, known as the SDK-style project format. Even if you're not moving from .NET Framework to .NET, you should still upgrade the project file to the latest format. The way to specify a target framework is different in SDK-style projects. In .NET Framework, the `` property is used with a moniker that specifies the version of .NET Framework. For example, .NET Framework 4.7.2 looks like the following snippet: + +```xml + + v4.7.2 + +``` + +An SDK-style project uses a different property to identify the target framework, the `` property. When targeting .NET Framework, the moniker starts with `net` and ends with the version of .NET Framework without any periods. For example, the moniker to target .NET Framework 4.7.2 is `net472`: + +```xml + + net472 + +``` + +For a list of all target monikers, see [Target frameworks in SDK-style projects](../../standard/frameworks.md#supported-target-frameworks). ## Unavailable technologies @@ -56,6 +78,8 @@ There are a few technologies in .NET Framework that don't exist in .NET: Remoting is used for communicating across application domains, which are no longer supported. For simple communication across processes, consider inter-process communication (IPC) mechanisms as an alternative to remoting, such as the class or the class. For more complex scenarios, consider frameworks such as [StreamJsonRpc](https://github.com/microsoft/vs-streamjsonrpc) or [ASP.NET Core](/aspnet/core) (either using [gRPC](/aspnet/core/grpc) or [RESTful Web API services](/aspnet/core/web-api)). + Because remoting is not supported, calls to `BeginInvoke()` and `EndInvoke()` on delegate objects will throw `PlatformNotSupportedException`. + - [Code access security (CAS)](net-framework-tech-unavailable.md#code-access-security-cas) CAS was a sandboxing technique supported by .NET Framework but deprecated in .NET Framework 4.0. It was replaced by Security Transparency and it isn't supported in .NET. Instead, use security boundaries provided by the operating system, such as virtualization, containers, or user accounts. @@ -72,7 +96,7 @@ There are a few technologies in .NET Framework that don't exist in .NET: WF isn't supported in .NET. For an alternative, see [CoreWF](https://github.com/UiPath/corewf). -For more information about these unsupported technologies, see [.NET Framework technologies unavailable on .NET Core and .NET 5+](net-framework-tech-unavailable.md). +For more information about these unsupported technologies, see [.NET Framework technologies unavailable on .NET 6+](net-framework-tech-unavailable.md). ## Cross-platform @@ -109,7 +133,7 @@ The [.NET Upgrade Assistant](upgrade-assistant-overview.md) is a command-line to - Console - Class libraries -This tool uses the other tools listed in this article and guides the migration process. For more information about the tool, see [Overview of the .NET Upgrade Assistant](upgrade-assistant-overview.md). +This tool uses the other tools listed in this article, such as **try-convert**, and guides the migration process. For more information about the tool, see [Overview of the .NET Upgrade Assistant](upgrade-assistant-overview.md). ### try-convert diff --git a/docs/core/porting/net-framework-tech-unavailable.md b/docs/core/porting/net-framework-tech-unavailable.md index 52fff7bfced08..64367dc84f5e3 100644 --- a/docs/core/porting/net-framework-tech-unavailable.md +++ b/docs/core/porting/net-framework-tech-unavailable.md @@ -1,13 +1,13 @@ --- -title: .NET Framework technologies unavailable on .NET Core and .NET 5+ +title: .NET Framework technologies unavailable on .NET 6+ titleSuffix: "" -description: Learn about .NET Framework technologies that are unavailable on .NET Core and .NET 5 and later versions. -ms.date: 05/11/2022 +description: Learn about .NET Framework technologies that are unavailable on .NET 6 and later versions. +ms.date: 02/28/2023 ms.topic: reference --- -# .NET Framework technologies unavailable on .NET Core and .NET 5+ +# .NET Framework technologies unavailable on .NET -Several technologies available to .NET Framework libraries aren't available for use with .NET 5+ (and .NET Core), such as app domains, remoting, and code access security (CAS). If your libraries rely on one or more of the technologies listed on this page, consider the alternative approaches mentioned. +Several technologies available to .NET Framework libraries aren't available for use with .NET 6+, such as app domains, remoting, and code access security (CAS). If your libraries rely on one or more of the technologies listed on this page, consider the alternative approaches mentioned. For more information on API compatibility, see [Breaking changes in .NET](../compatibility/breaking-changes.md). @@ -15,11 +15,11 @@ For more information on API compatibility, see [Breaking changes in .NET](../com Application domains (AppDomains) isolate apps from one another. AppDomains require runtime support and are resource-expensive. Creating more app domains isn't supported, and there are no plans to add this capability in the future. For code isolation, use separate processes or containers as an alternative. To dynamically load assemblies, use the class. -To make code migration from .NET Framework easier, .NET 5+ exposes some of the API surface. Some of the APIs function normally (for example, ), some members do nothing (for example, ), and some of them throw (for example, ). Check the types you use against the [`System.AppDomain` reference source](https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs) in the [dotnet/runtime GitHub repository](https://github.com/dotnet/runtime). Make sure to select the branch that matches your implemented version. +To make code migration from .NET Framework easier, .NET 6+ exposes some of the API surface. Some of the APIs function normally (for example, ), some members do nothing (for example, ), and some of them throw (for example, ). Check the types you use against the [`System.AppDomain` reference source](https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs) in the [dotnet/runtime GitHub repository](https://github.com/dotnet/runtime). Make sure to select the branch that matches your implemented version. ## Remoting -.NET Remoting isn't supported on .NET 5+ (and .NET Core). .NET remoting was identified as a problematic architecture. It's used for communicating across application domains, which are no longer supported. Also, remoting requires runtime support, which is expensive to maintain. +.NET Remoting isn't supported on .NET 6+. .NET remoting was identified as a problematic architecture. It's used for communicating across application domains, which are no longer supported. Also, remoting requires runtime support, which is expensive to maintain. For simple communication across processes, consider inter-process communication (IPC) mechanisms as an alternative to remoting, such as the class or the class. For more complex scenarios, the open-source [StreamJsonRpc](https://github.com/microsoft/vs-streamjsonrpc) project provides a cross-platform .NET Standard remoting framework that works on top of existing stream or pipe connections. @@ -27,9 +27,11 @@ Across machines, use a network-based solution as an alternative. Preferably, use For more messaging options, see [.NET Open Source Developer Projects: Messaging](https://github.com/Microsoft/dotnet/blob/master/dotnet-developer-projects.md#messaging). +Because remoting is not supported, calls to `BeginInvoke()` and `EndInvoke()` on delegate objects will throw `PlatformNotSupportedException`. For more information, see [Migrating Delegate BeginInvoke Calls For .NET Core](https://devblogs.microsoft.com/dotnet/migrating-delegate-begininvoke-calls-for-net-core/). + ## Code access security (CAS) -Sandboxing, which relies on the runtime or the framework to constrain which resources a managed application or library uses or runs, [isn't supported on .NET Framework](/previous-versions/dotnet/framework/code-access-security/code-access-security) and therefore is also not supported on .NET Core and .NET 5+. CAS is no longer treated as a security boundary, because there are too many cases in .NET Framework and the runtime where an elevation of privileges occurs. Also, CAS makes the implementation more complicated and often has correctness-performance implications for applications that don't intend to use it. +Sandboxing, which relies on the runtime or the framework to constrain which resources a managed application or library uses or runs, [isn't supported on .NET Framework](/previous-versions/dotnet/framework/code-access-security/code-access-security) and therefore is also not supported on .NET 6+. CAS is no longer treated as a security boundary, because there are too many cases in .NET Framework and the runtime where an elevation of privileges occurs. Also, CAS makes the implementation more complicated and often has correctness-performance implications for applications that don't intend to use it. Use security boundaries provided by the operating system, such as virtualization, containers, or user accounts, for running processes with the minimum set of privileges. @@ -41,18 +43,18 @@ To run processes with the least set of privileges, use security boundaries provi ## System.EnterpriseServices - (COM+) isn't supported by .NET Core and .NET 5+. + (COM+) isn't supported by .NET 6+. ## Workflow Foundation -Windows Workflow Foundation (WF) is not supported in .NET 5+ (including .NET Core). For an alternative, see [CoreWF](https://github.com/UiPath/corewf). +Windows Workflow Foundation (WF) is not supported in .NET 6+. For an alternative, see [CoreWF](https://github.com/UiPath/corewf). > [!TIP] -> Windows Communication Foundation (WCF) server can be used in .NET 5+ by using the [CoreWCF NuGet packages](https://www.nuget.org/profiles/corewcf). For more information, see [CoreWCF 1.0 has been Released](https://devblogs.microsoft.com/dotnet/corewcf-v1-released/). +> Windows Communication Foundation (WCF) server can be used in .NET 6+ by using the [CoreWCF NuGet packages](https://www.nuget.org/profiles/corewcf). For more information, see [CoreWCF 1.0 has been Released](https://devblogs.microsoft.com/dotnet/corewcf-v1-released/). ## Saving assemblies generated by reflection -.NET 5+ (including .NET Core) does not support saving assemblies that are generated by the APIs. The method is not available in .NET 5+ (including .NET Core). In addition, the following fields of the enumeration aren't available: +.NET 6+ doesn't support saving assemblies that are generated by the APIs. The method is not available in .NET 6+. In addition, the following fields of the enumeration aren't available: - - @@ -64,13 +66,13 @@ For more information, see [dotnet/runtime issue 15704](https://github.com/dotnet ## Loading multi-module assemblies -Assemblies that consist of multiple modules (`OutputType=Module` in MSBuild) are not supported in .NET 5+ (including .NET Core). +Assemblies that consist of multiple modules (`OutputType=Module` in MSBuild) are not supported in .NET 6+. As an alternative, consider merging the individual modules into a single assembly file. ## XSLT script blocks -XSLT [script blocks](../../standard/data/xml/script-blocks-using-msxsl-script.md) are supported only in .NET Framework. They are not supported on .NET Core or .NET 5 or later. +XSLT [script blocks](../../standard/data/xml/script-blocks-using-msxsl-script.md) are supported only in .NET Framework. They are not supported on .NET 6 or later. ## See also diff --git a/docs/core/porting/porting-approaches.md b/docs/core/porting/porting-approaches.md index 34e4c32da9f9c..e234d67f07076 100644 --- a/docs/core/porting/porting-approaches.md +++ b/docs/core/porting/porting-approaches.md @@ -7,6 +7,10 @@ ms.date: 06/10/2021 --- # Create a porting plan +We recommend using the Visual Studio [.NET Upgrade Assistant](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.upgradeassistant) to update .NET Framework code to the latest .NET versions. For more information see the blog [Upgrading your .NET projects with Visual Studio](https://devblogs.microsoft.com/dotnet/upgrade-assistant-now-in-visual-studio/). + +[!INCLUDE[](~/includes/deprecating-api-port.md)] + Before you jump straight into the code, take the time to go through the recommended pre-migration steps. This article gives you insight into the kinds of issues you may come across, and helps you decide on an approach that makes the most sense. ## Port your code diff --git a/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/StarVoteControl/StarVoteControl.csproj b/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/StarVoteControl/StarVoteControl.csproj index a459036f11fc3..a916b213f10fb 100644 --- a/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/StarVoteControl/StarVoteControl.csproj +++ b/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/StarVoteControl/StarVoteControl.csproj @@ -1,6 +1,6 @@  - net6.0-windows + net7.0-windows Library false true @@ -9,7 +9,7 @@ - + all diff --git a/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings.sln b/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings.sln new file mode 100644 index 0000000000000..9e930fc4b4fe0 --- /dev/null +++ b/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32014.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebSiteRatings", "WebSiteRatings\WebSiteRatings.csproj", "{A81C8D30-C7B1-47B8-A361-69E6BFFDA94D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StarVoteControl", "StarVoteControl\StarVoteControl.csproj", "{017DDFB1-F6D9-47DF-8239-EDF096ADF7AE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A81C8D30-C7B1-47B8-A361-69E6BFFDA94D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A81C8D30-C7B1-47B8-A361-69E6BFFDA94D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A81C8D30-C7B1-47B8-A361-69E6BFFDA94D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A81C8D30-C7B1-47B8-A361-69E6BFFDA94D}.Release|Any CPU.Build.0 = Release|Any CPU + {017DDFB1-F6D9-47DF-8239-EDF096ADF7AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {017DDFB1-F6D9-47DF-8239-EDF096ADF7AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {017DDFB1-F6D9-47DF-8239-EDF096ADF7AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {017DDFB1-F6D9-47DF-8239-EDF096ADF7AE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {17ABD217-1BFF-4969-AD70-16A7B007C10E} + EndGlobalSection +EndGlobal diff --git a/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/Models/Database.cs b/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/Models/Database.cs index 2b634e67cc4e1..6bb4e4436c81d 100644 --- a/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/Models/Database.cs +++ b/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/Models/Database.cs @@ -16,7 +16,7 @@ public static IEnumerable ReadSites() using (SqliteConnection connection = OpenConnection()) { connection.Open(); - + using (SqliteCommand readCmd = connection.CreateCommand()) { readCmd.CommandText = @"SELECT * FROM Sites"; diff --git a/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/WebSiteRatings.csproj b/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/WebSiteRatings.csproj index 88f80e019e9a3..b1c75a0bd81bb 100644 --- a/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/WebSiteRatings.csproj +++ b/docs/core/porting/snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/WebSiteRatings.csproj @@ -1,6 +1,6 @@  - net6.0-windows + net7.0-windows WinExe false true @@ -15,10 +15,10 @@ - - - + + + all @@ -28,8 +28,7 @@ - - + diff --git a/docs/core/porting/upgrade-assistant-aspnetmvc.md b/docs/core/porting/upgrade-assistant-aspnetmvc.md index 841ea3f44abd9..49512a323daa9 100644 --- a/docs/core/porting/upgrade-assistant-aspnetmvc.md +++ b/docs/core/porting/upgrade-assistant-aspnetmvc.md @@ -6,6 +6,8 @@ ms.date: 11/08/2021 --- # Upgrade an ASP.NET MVC app to .NET 6 with the .NET Upgrade Assistant +For the latest information on updating from ASP.NET Framework to ASP.NET Core, see [Upgrade from ASP.NET MVC and Web API to ASP.NET Core MVC](/aspnet/core/migration/mvc). + diff --git a/docs/core/porting/upgrade-assistant-wpf-framework.md b/docs/core/porting/upgrade-assistant-wpf-framework.md index 4c7ed60546cd1..600888e3420c0 100644 --- a/docs/core/porting/upgrade-assistant-wpf-framework.md +++ b/docs/core/porting/upgrade-assistant-wpf-framework.md @@ -1,18 +1,22 @@ --- -title: Upgrade WPF apps to .NET 6 -description: Use the .NET Upgrade Assistant to upgrade an existing .NET Framework WPF app to .NET 6. The .NET Upgrade Assistant is a CLI tool that helps migrating an app from .NET Framework to .NET 6. +title: Upgrade WPF apps to .NET 7 +description: Use the .NET Upgrade Assistant to upgrade an existing .NET Framework WPF app to .NET 7. The .NET Upgrade Assistant is a CLI tool that helps migrating an app from .NET Framework to .NET 7. author: adegeo -ms.date: 01/25/2022 +ms.date: 03/04/2023 --- -# Upgrade a WPF App to .NET 6 with the .NET Upgrade Assistant +# Upgrade a WPF App to .NET 7 with the .NET Upgrade Assistant -The [.NET Upgrade Assistant](upgrade-assistant-overview.md) is a command-line tool that can assist with upgrading .NET Framework WPF apps to .NET 6. This article provides: +The [.NET Upgrade Assistant](upgrade-assistant-overview.md) is a command-line tool that can assist with upgrading .NET Framework WPF apps to .NET 7. This article provides: -- A demonstration of how to run the tool against a .NET Framework WPF app +- An overview of how the tool works with WPF projects +- A sample app for you to download and upgrade - Troubleshooting tips For more information on how to install the tool, see [Overview of the .NET Upgrade Assistant](upgrade-assistant-overview.md). +> [!TIP] +> The .NET Upgrade Assistant is receiving frequent updates. If you discover problems using the tool, report them in the tool's [GitHub repository](https://github.com/dotnet/upgrade-assistant). + ## Demo app You can use the [Basic WPF Sample][wpf-sample] project to test upgrading with the Upgrade Assistant. @@ -26,28 +30,27 @@ For example, running the analyze mode with the [Basic WPF Sample][wpf-sample] ap ```console > upgrade-assistant analyze .\WebSiteRatings.sln -[09:50:56 INF] Loaded 5 extensions -[09:50:57 INF] Using MSBuild from C:\Program Files\dotnet\sdk\6.0.101\ -[09:50:57 INF] Using Visual Studio install from C:\Program Files\Microsoft Visual Studio\2022\Preview [v17] -[09:50:59 INF] Recommending executable TFM net6.0 because the project builds to a web app -[09:50:59 INF] Recommending Windows TFM net6.0-windows because the project either has Windows-specific dependencies or builds to a WinExe -[09:50:59 INF] Marking assembly reference System.Configuration for removal based on package mapping configuration System.Configuration -[09:50:59 INF] Adding package System.Configuration.ConfigurationManager based on package mapping configuration System.Configuration -[09:50:59 INF] Marking assembly reference System.Web for removal based on package mapping configuration ASP.NET -[09:50:59 INF] Adding framework reference Microsoft.AspNetCore.App based on package mapping configuration ASP.NET -[09:50:59 INF] Marking assembly reference System.Web.Extensions for removal based on package mapping configuration ASP.NET -[09:51:00 INF] Reference to .NET Upgrade Assistant analyzer package (Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, version 0.3.261602) needs to be added -[09:51:01 INF] Adding Microsoft.Windows.Compatibility 6.0.0 -[09:51:01 INF] Recommending Windows TFM net6.0-windows because the project either has Windows-specific dependencies or builds to a WinExe -[09:51:01 INF] Reference to .NET Upgrade Assistant analyzer package (Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, version 0.3.261602) needs to be added -[09:51:01 INF] Adding Microsoft.Windows.Compatibility 6.0.0 -[09:51:01 INF] Running analyzers on WebSiteRatings -[09:51:02 INF] Identified 0 diagnostics in project WebSiteRatings -[09:51:02 INF] Running analyzers on StarVoteControl -[09:51:02 INF] Identified 0 diagnostics in project StarVoteControl -``` - -There's quite a bit of internal diagnostic information in the output, but some information is helpful. Notice that the analyze mode indicates that the upgrade will recommend that the project target the `net6.0-windows` target framework moniker ([TFM](../../standard/frameworks.md)). This is because the projects referenced by the solution are WPF projects, a Windows-only technology. A console application would probably get the recommendation to upgrade to TFM `net6.0` directly, unless it used some Windows-specific libraries. +[15:39:00 INF] Loaded 9 extensions +[15:39:02 INF] Using MSBuild from C:\Program Files\dotnet\sdk\7.0.201\ +[15:39:02 INF] Using Visual Studio install from C:\Program Files\Microsoft Visual Studio\2022\Preview [v17] +[15:39:05 INF] Writing output to C:\code\migration\AnalysisReport.sarif +[15:39:06 INF] Recommending Windows TFM net7.0-windows for project WebSiteRatings.csproj because the project either has Windows-specific dependencies or builds to a WinExe +[15:39:06 INF] Marking assembly reference System.Configuration for removal based on package mapping configuration System.Configuration +[15:39:06 INF] Adding package System.Configuration.ConfigurationManager based on package mapping configuration System.Configuration +[15:39:08 INF] Package EntityFramework, Version=6.2.0 does not support the target(s) net7.0-windows but a newer version (6.4.4) does. +[15:39:09 INF] Reference to .NET Upgrade Assistant analyzer package (Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, version 0.4.410601) needs to be added +[15:39:10 INF] Adding Microsoft.Windows.Compatibility 7.0.0 helps with speeding up the upgrade process for Windows-based APIs +[15:39:13 INF] Recommending Windows TFM net7.0-windows for project StarVoteControl.csproj because the project either has Windows-specific dependencies or builds to a WinExe +[15:39:13 INF] Reference to .NET Upgrade Assistant analyzer package (Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, version 0.4.410601) needs to be added +[15:39:13 INF] Adding Microsoft.Windows.Compatibility 7.0.0 helps with speeding up the upgrade process for Windows-based APIs +[15:39:13 INF] Running analyzers on WebSiteRatings +[15:39:14 INF] Identified 0 diagnostics in project WebSiteRatings +[15:39:14 INF] Running analyzers on StarVoteControl +[15:39:15 INF] Identified 0 diagnostics in project StarVoteControl +[15:39:15 INF] Analysis Complete, the report is available at C:\code\migration\AnalysisReport.sarif +``` + +There's quite a bit of internal diagnostic information in the output, but some information is helpful. Notice that the analyze mode indicates that the upgrade recommends that the project target the `net7.0-windows` target framework moniker ([TFM](../../standard/frameworks.md)). This recommendation is made because the projects referenced by the solution are WPF projects, a Windows-only technology. A console application would probably get the recommendation to upgrade to TFM `net7.0` directly, unless it used some Windows-specific libraries. If any errors or warnings are reported, take care of them before you start an upgrade. @@ -55,13 +58,17 @@ If any errors or warnings are reported, take care of them before you start an up Open a terminal and navigate to the folder where the target project or solution is located. Run the `upgrade-assistant upgrade` command, passing in the name of the project or solution you're upgrading. -When a project is provided, the upgrade process starts on that project immediately. If a solution is provided, you'll select which project you normally run, known as the [upgrade entrypoint](#select-the-entrypoint). Based on that project, a dependency graph is created and a suggestion as to which order you should upgrade the projects is provided. +When you upgrade a solution that contains multiple projects, you must select which project in the solution is the **entrypoint**. Based on the **entrypoint** project, a dependency graph is created to determine which projects to upgrade and in what order. If the solution contains projects that aren't a part of the dependency graph, they're ignored and you'll need to upgrade these projects separately. + +Dependencies are upgraded first, then the **entrypoint** project. + +Using the [Basic WPF Sample][wpf-sample] app, upgrade the solution file: ```console upgrade-assistant upgrade .\WebSiteRatings.sln ``` -The tool runs and shows you a list of the steps it will do. As each step is completed, the tool provides a set of commands allowing the user to apply or skip the next step or some other option such as: +The tool runs and displays a list of steps it will perform. As each step is completed, the tool provides a set of commands allowing the user to apply or skip the next step or some other option such as: - Get more information about the step. - Change projects. @@ -70,11 +77,7 @@ The tool runs and shows you a list of the steps it will do. As each step is comp Pressing Enter without choosing a number selects the first item in the list. -As each step initializes, it may provide information about what it thinks will happen if you apply the step. - -### Select the Entrypoint - -The first step in upgrading the [example app][wpf-sample] is choosing which project in the solution serves as the entrypoint project. +As each step initializes, it may provide information about what it thinks will happen if you apply the step. The next step is to choose which project to upgrade. You should see the following output: ``` Upgrade Steps @@ -90,65 +93,65 @@ Choose a command: 5. Exit ``` -Choose **command 1** to start that step. The results are displayed: - -``` -[13:28:49 INF] Applying upgrade step Select an entrypoint -Please select the project you run. We will then analyze the dependencies and identify the recommended order to upgrade projects. - 1. StarVoteControl - 2. WebSiteRatings -``` - -There are two projects listed: The main WPF app (WebSiteRatings) and the UserControl project (StarVoteControl). Select the WebSiteRatings project for the entrypoint, which is **item 2**. +> [!TIP] +> Pay attention to the output of each step, as it may contain information about something the tool can't upgrade. Depending on the complexity of your app, you may have more upgrade work to do after the tool is finished. -### Select a project to upgrade +## Select a project to upgrade -After the entrypoint is determined, the next step is to choose which project to upgrade first. In this example, the tool determined that the WPF UserControl project (StarVoteControl) should be upgraded first since the main WPF app project has a dependency on the control. +After the entrypoint is determined, the next step is to choose which project to upgrade. With the [Basic WPF Sample][wpf-sample] app, the tool determined that the **StarVoteControl** project first, since the **WebSiteRatings** project depends on it. It's best to follow the recommended upgrade path. ``` -[13:44:47 INF] Applying upgrade step Select project to upgrade +[15:45:52 INF] Applying upgrade step Select project to upgrade Here is the recommended order to upgrade. Select enter to follow this list, or input the project you want to start with. 1. StarVoteControl 2. WebSiteRatings ``` -The recommended path here, is to first upgrade the **StarVoteControl** project first, since the **WebSiteRatings** project depends on it. It's best to follow the recommended upgrade path. - -Upgrading the **StarVoteControl** is a simple project and doesn't present any post-upgrade problems. Therefore, this article continues on as if that project has already been upgraded and the next project to upgrade is **WebSiteRatings**. - -### Upgrade the project +## Upgrade the project -Once a project is selected, a list of upgrade steps the tool will take is listed. - -> [!IMPORTANT] -> For the purposes of this example, the **WebSiteRatings** project is described. It's assumed that the **StarVoteControl** project was successfully upgraded. The reason for demonstrating the **WebSiteRatings** project is that it contains more of the common issues you'll run into when upgrading an app. -> -> Based on the project you're upgrading, you may or may not see every step listed in this example. - -The following output describes the steps involved in upgrading the project: +Once a project is selected, a list of upgrade steps the tool takes is listed. The first step is selected, which is to back up the project. The list of steps looks similar to the following snippet: ``` -[16:09:24 INF] Initializing upgrade step Back up project +[15:50:50 INF] Initializing upgrade step Back up project Upgrade Steps -Entrypoint: C:\code\migration\wpf\sampleApp\WebSiteRatings\WebSiteRatings.csproj -Current Project: C:\code\migration\wpf\sampleApp\WebSiteRatings\WebSiteRatings.csproj +Entrypoint: C:\code\migration\WebSiteRatings\WebSiteRatings.csproj +Current Project: C:\code\migration\WebSiteRatings\WebSiteRatings.csproj 1. [Next step] Back up project 2. Convert project file to SDK style 3. Clean up NuGet package references + a. Duplicate reference analyzer + b. Package map reference analyzer + c. Target compatibility reference analyzer + d. Upgrade assistant reference analyzer + e. Windows Compatibility Pack Analyzer + f. MyDotAnalyzer reference analyzer + g. Newtonsoft.Json reference analyzer + h. Windows App SDK package analysis + i. Transitive reference analyzer 4. Update TFM 5. Update NuGet Packages + a. Duplicate reference analyzer + b. Package map reference analyzer + c. Target compatibility reference analyzer + d. Upgrade assistant reference analyzer + e. Windows Compatibility Pack Analyzer + f. MyDotAnalyzer reference analyzer + g. Newtonsoft.Json reference analyzer + h. Windows App SDK package analysis + i. Transitive reference analyzer 6. Add template files -7. Upgrade app config files +7. Update WCF service to CoreWCF (Preview) +8. Upgrade app config files a. Convert Application Settings b. Convert Connection Strings c. Disable unsupported configuration sections -8. Update source code +9. Update source code a. Apply fix for UA0002: Types should be upgraded b. Apply fix for UA0012: 'UnsafeDeserialize()' does not exist -9. Move to next project +10. Move to next project Choose a command: 1. Apply next step (Back up project) @@ -159,130 +162,11 @@ Choose a command: 6. Exit ``` -> [!NOTE] -> For the rest of this article, the upgrade steps aren't explicitly shown unless there is something important to call out. The results of each step are still shown. - -#### Create a backup - -In this example of upgrading the project, you'll apply each step. The first step, **command 1**, is backing up the project: - -``` -[16:10:42 INF] Applying upgrade step Back up project -Please choose a backup path - 1. Use default path [C:\code\migration\wpf\sampleApp.backup] - 2. Enter custom path -``` - -The tool chooses a default backup path named after the current folder, but with `.backup` appended to it. You can choose a custom path as an alternative to the default path. For each upgraded project, the folder of the project is copied to the backup folder. In this example, the `WebSiteRatings` folder is copied from _sampleApp\WebSiteRatings_ to _sampleApp.backup\WebSiteRatings_ during the backup step: - -``` -[16:10:44 INF] Backing up C:\code\migration\wpf\sampleApp\WebSiteRatings to C:\code\migration\wpf\sampleApp.backup\WebSiteRatings -[16:10:45 INF] Project backed up to C:\code\migration\wpf\sampleApp.backup\WebSiteRatings -[16:10:45 INF] Upgrade step Back up project applied successfully -Please press enter to continue... -``` - -#### Upgrade the project file - -The project is upgraded from the .NET Framework project format to the .NET SDK project format. - -``` -[16:10:51 INF] Applying upgrade step Convert project file to SDK style -[16:10:51 INF] Converting project file format with try-convert, version 0.3.261602+8aa571efd8bac422c95c35df9c7b9567ad534ad0 -[16:10:51 INF] Recommending TFM net6.0-windows because of dependency on project C:\code\migration\wpf\sampleApp\StarVoteControl\StarVoteControl.csproj -C:\code\migration\wpf\sampleApp\WebSiteRatings\WebSiteRatings.csproj contains an App.config file. App.config is replaced by appsettings.json in .NET Core. You will need to delete App.config and migrate to appsettings.json if it's applicable to your project. -[16:10:52 INF] Converting project C:\code\migration\wpf\sampleApp\WebSiteRatings\WebSiteRatings.csproj to SDK style -[16:10:53 INF] Project file converted successfully! The project may require additional changes to build successfully against the new .NET target. -[16:10:55 INF] Upgrade step Convert project file to SDK style applied successfully -Please press enter to continue... -``` - -Pay attention to the output of each step. Notice that the example output indicates that you'll have a manual step to complete after the upgrade: - -> App.config is replaced by appsettings.json in .NET Core. You will need to delete App.config and migrate to appsettings.json if it's applicable to your project. - -As part of this upgrade step, the NuGet packages referenced by the _packages.config_ are migrated to the project file. - -#### Clean up NuGet references - -Once the project format has been updated, the next step is to clean up the NuGet package references. - -In addition to the packages referenced by your app, the _packages.config_ file contains references to the dependencies of those packages. For example, if you added reference to package **A** which depends on package **B**, both packages would be referenced in the _packages.config_ file. In the new project system, only the reference to package **A** is required. This step analyzes the package references and removes those that aren't required. - -``` -[16:55:18 INF] Applying upgrade step Clean up NuGet package references -[16:55:18 INF] Removing outdated assembly reference: System.Configuration -[16:55:18 INF] Removing outdated package reference: ControlzEx, Version=4.4.0 -[16:55:18 INF] Removing outdated package reference: Microsoft.Xaml.Behaviors.Wpf, Version=1.1.19 -[16:55:18 INF] Removing outdated package reference: SQLite.Native, Version=3.12.3 -[16:55:18 INF] Adding package reference: System.Configuration.ConfigurationManager, Version=5.0.0 -[16:55:18 INF] Adding package reference: Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, Version=0.3.261602 -[16:55:21 WRN] No version of System.Configuration.ConfigurationManager found that supports ["net452"]; leaving unchanged -[16:55:21 INF] Upgrade step Clean up NuGet package references applied successfully -Please press enter to continue... -``` - -Your app is still referencing .NET Framework assemblies. Some of those assemblies may be available as NuGet packages. This step analyzes those assemblies and references the appropriate NuGet package. - -#### Handle the TFM - -The tool next changes the [TFM](../../standard/frameworks.md) from .NET Framework to the suggested SDK. In this example, it's `net6.0-windows`. - -``` -[16:56:36 INF] Applying upgrade step Update TFM -[16:56:36 INF] Recommending TFM net6.0-windows because of dependency on project C:\code\migration\wpf\sampleApp\StarVoteControl\StarVoteControl.csproj -[16:56:40 INF] Updated TFM to net6.0-windows -[16:56:40 INF] Upgrade step Update TFM applied successfully -Please press enter to continue... -``` - -#### Upgrade NuGet packages - -Next, the tool updates the project's NuGet packages to the versions that support the updated TFM, `net6.0-windows`. - -``` -[16:58:06 INF] Applying upgrade step Update NuGet Packages -[16:58:06 INF] Removing outdated package reference: Microsoft.CSharp, Version=4.7.0 -[16:58:06 INF] Removing outdated package reference: System.Data.DataSetExtensions, Version=4.5.0 -[16:58:06 INF] Removing outdated package reference: EntityFramework, Version=6.2.0 -[16:58:06 INF] Adding package reference: EntityFramework, Version=6.4.4 -[16:58:11 INF] Upgrade step Update NuGet Packages applied successfully -Please press enter to continue... -``` - -#### Templates, config, and code files - -The next few steps may be skipped automatically by the tool if the tool determines there isn't anything to do for your project. - -Once the packages are updated, the next step is to update any template files. In this example, there are no template files that need to be updated or added to the project. This step is skipped and the next step is automatically started: Upgrade app config files. In this example, the step only needs to convert the connection strings: +Each step details first what it's going to do, then prompts you to do it. For example, the previous snippet was at step **1. [Next step] Back up project**. Any step that doesn't apply, is skipped. For example, if the tool processes **7. Update WCF service to CoreWCF (Preview)**, but your app doesn't define a WCF service, it's skipped and step 8 is processed. In turn, if step 8 doesn't apply, it's skipped too. You may see many steps skipped as the tool tries to find the next step that applies. -``` -[17:02:52 INF] Applying upgrade step Convert Connection Strings -[17:02:53 INF] Upgrade step Convert Connection Strings applied successfully -[17:02:53 INF] Applying upgrade step Upgrade app config files -[17:02:53 INF] Upgrade step Upgrade app config files applied successfully -``` +## Complete the upgrade -The final step before this project's upgrade is completed, is to update any out-of-date code references. Based on the type of project you're upgrading, a list of known code fixes is displayed for this step. Some of the fixes may not apply to your project. - -``` -8. Update source code - a. Apply fix for UA0002: Types should be upgraded - b. Apply fix for UA0012: 'UnsafeDeserialize()' does not exist -``` - -In this case, none of the suggested fixes apply to the example project, and this step automatically completes immediately after the previous step was completed. - -``` -[17:02:58 INF] Initializing upgrade step Update source code -[17:02:58 INF] Running analyzers on WebSiteRatings -[17:02:59 INF] Identified 0 diagnostics in project WebSiteRatings -[17:02:59 INF] Initializing upgrade step Move to next project -``` - -#### Completing the upgrade - -If there are any more projects to migrate, the tool lets you select which project to upgrade next. When there are no more projects to upgrade, the tool brings you to the "Finalize upgrade" step: +Once the project has been upgraded, the tool prompts you to select the next project in the dependency graph to upgrade. Once all projects are upgraded, the tool you to the "Finalize upgrade" step, which completes the upgrade ``` 1. [Next step] Finalize upgrade @@ -300,7 +184,7 @@ Once the upgrade is complete, the migrated WPF project looks like the following ```xml - net6.0-windows + net7.0-windows WinExe false true @@ -315,8 +199,9 @@ Once the upgrade is complete, the migrated WPF project looks like the following + - + all @@ -339,33 +224,38 @@ Notice that the .NET Upgrade Assistant also adds analyzers to the project that a ## After upgrading -After you upgrade your projects, you'll need to compile and test them. Most certainly you'll have more work to do in finishing the upgrade. It's possible that the .NET Framework version of your app contained library references that your project isn't actually using. You'll need to analyze each reference and determine whether or not it's required. The tool may have also added or upgraded a NuGet package reference to wrong version. +After you upgrade your projects, you'll need to compile and test them. Most likely there is more work to do to finish the upgrade. It's possible that the .NET Framework version of your app contained library references that your project isn't actually using. Analyze each reference and determine whether or not it's required. The tool may have also added or upgraded a NuGet package reference to wrong version. At the time this article was published, the following updates are needed to complete the upgrade of the example project: -- Upgrade the `System.Configuration.ConfigurationManager` NuGet package to version **6.0.0**. The wrong version (**5.0.0**) was selected by the upgrade tool: +- Upgrade the `System.Configuration.ConfigurationManager` NuGet package to version **7.0.0**. + + The wrong version (**5.0.0**) was selected by the upgrade tool: ```xml - + ``` -Once that item is fixed, the example app compiles and runs. However, there are more things that could be upgraded, for example, this app is using the `Microsoft.Data.Sqlite 1.0.0` NuGet package, the last version supporting .NET Framework directly. This package has a dependency on the `SQLite` package. If `Microsoft.Data.Sqlite` is upgraded for `6.0.0`, that dependency is removed. +- Upgrade the `Microsoft.Data.Sqlite` NuGet package to version **7.0.3**. -## Modernize: appsettings.json + Upgrading this package isn't required. However, version **1.0.0** was selected, which is the last version supporting .NET Framework directly, and supports .NET Standard 1.3. This package has a dependency on the `SQLite` package, and is currently deprecated. If `Microsoft.Data.Sqlite` is upgraded to **7.0.3**, that dependency is removed and the project is using a supported package version. -.NET Framework uses the _App.config_ file to load settings for your app, such as connection strings and logging providers. .NET now uses the _appsettings.json_ file for app settings. + After the `Microsoft.Data.Sqlite` package is upgraded to **7.0.3**, you can remove the `SQLite` package from the project. -_App.config_ files are supported in .NET through the `System.Configuration.ConfigurationManager` NuGet package, and support for _appsettings.json_ is provided by the `Microsoft.Extensions.Configuration` NuGet package. +## Modernize: appsettings.json -As other libraries upgrade to .NET, they'll modernize by supporting _appsettings.json_ instead of _App.config_. For example, logging providers in .NET Framework that have been upgraded for .NET 6 no longer use _App.config_ for settings. It's good for you to follow their direction and also move away from using _App.config_. +.NET Framework uses the _App.config_ file to load settings for your app, such as connection strings and logging providers. .NET now uses the _appsettings.json_ file for app settings. The upgrade tool tries its best to migrate settings and connections strings from the _App.config_ file to the _appsettings.json_ file, but make sure you compare them and verify that everything is correct. -With the WPF example app upgraded in the preceding section, we can remove the dependency on `System.Configuration.ConfigurationManager` and move to _appsettings.json_ for the connection string used by the local database. +Even though _appsettings.json_ is the modern way to store and retrieve settings and connection strings, your code isn't using it and is still relying on the _App.config_ file. _App.config_ files are supported in .NET through the `System.Configuration.ConfigurationManager` NuGet package, and support for _appsettings.json_ is provided by the `Microsoft.Extensions.Configuration` NuGet package. -01. Remove the `System.Configuration.ConfigurationManager` NuGet package. -01. Add both the `Microsoft.Extensions.Configuration` and `Microsoft.Extensions.Configuration.Json` NuGet packages. +As other libraries upgrade to .NET, they modernize by supporting _appsettings.json_ instead of _App.config_. For example, logging providers in .NET Framework that have been upgraded for .NET 6+ no longer use _App.config_ for settings. It's good for you to follow their direction and also move away from using _App.config_. + +### Use appsettings.json with the WPF sample app - There are a variety of related `Microsoft.Extensions.Configuration` related NuGet packages your app may require. +As an example, after upgrading the [WPF sample app][wpf-sample], remove the dependency on `System.Configuration.ConfigurationManager` and move to _appsettings.json_ for the connection string used by the local database. +01. Remove the `System.Configuration.ConfigurationManager` NuGet package. +01. Add the `Microsoft.Extensions.Configuration.Json` NuGet package. 01. Delete the _App.config_ file from the project. In the example app, this file only contained a single connection string, which was migrated to the _appsettings.json_ file by the upgrade tool. @@ -394,9 +284,9 @@ With the WPF example app upgraded in the preceding section, we can remove the de ## Modernize: Web browser control -The control referenced by the project is based on Internet Explorer, which is out-of-date. WPF for .NET includes a new browser control based on Microsoft Edge. Complete the following steps to upgrade to the new web browser control: +The control referenced by the [WPF sample app][wpf-sample] is based on Internet Explorer, which is out-of-date. WPF for .NET includes a new browser control based on Microsoft Edge. Complete the following steps to upgrade to the new web browser control: -01. Add reference to the `Microsoft.Web.WebView2` NuGet package. +01. Add the `Microsoft.Web.WebView2` NuGet package. 01. In the _MainWindow.xaml_ file: 01. Import the control to the **wpfControls** namespace in the root element: @@ -407,7 +297,7 @@ The control referenced by the project :::code language="xaml" source="./snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/MainWindow.xaml" range="51-53" ::: -01. Edit the _MainWindow.xaml.cs_ code behind file. Update the `ListBox_SelectionChanged` method to set the `browser.Source` property to a valid . This code previously passed in the website URL as a string, but the new control requires a `Uri`. +01. Edit the _MainWindow.xaml.cs_ code behind file. Update the `ListBox_SelectionChanged` method to set the `browser.Source` property to a valid . This code previously passed in the website URL as a string, but the control requires a `Uri`. :::code language="csharp" source="./snippets/upgrade-assistant-wpf-framework/csharp/WebSiteRatings/MainWindow.xaml.cs" range="38-46" highlight="43" ::: @@ -415,24 +305,18 @@ Depending on which version of Windows a user of your app is running, they may ne ## Visual Basic projects -If you're using Visual Basic to code your project, the Upgrade Assistant may contain additional steps, such as migrating the `My` namespace. You should only see these steps added when your project is using these features. With the example app, the code in the **MatchingGame.Logic** uses the `My` namespace to access the registry. This project will have a step related to `My`: +If you're using Visual Basic to code your project, the Upgrade Assistant may contain extra steps, such as migrating the `My` namespace. You should only see these steps added when your project is using these features. ``` 7. Update Visual Basic project a. Update vbproj to support "My." namespace ``` -## Troubleshooting tips - -There are several known problems that can occur when using the .NET Upgrade Assistant. In some cases, these are problems with the [try-convert tool](https://github.com/dotnet/try-convert) that the .NET Upgrade Assistant uses internally. - -[The tool's GitHub repository](https://github.com/dotnet/upgrade-assistant#troubleshooting-common-issues) has more troubleshooting tips and known issues. - ## See also +- [.NET Upgrade Assistant GitHub Repository](https://github.com/dotnet/upgrade-assistant) - [Upgrade a Windows Forms App to .NET 6](upgrade-assistant-winforms-framework.md) - [Upgrade an ASP.NET MVC App to .NET 6](upgrade-assistant-aspnetmvc.md) - [Overview of the .NET Upgrade Assistant](upgrade-assistant-overview.md) -- [.NET Upgrade Assistant GitHub Repository](https://github.com/dotnet/upgrade-assistant) [wpf-sample]: https://github.com/dotnet/samples/tree/main/wpf/WebSiteBrowser/ diff --git a/docs/core/porting/versioning-sdk-msbuild-vs.md b/docs/core/porting/versioning-sdk-msbuild-vs.md index f20e498c47c4a..577ee0eb8dc10 100644 --- a/docs/core/porting/versioning-sdk-msbuild-vs.md +++ b/docs/core/porting/versioning-sdk-msbuild-vs.md @@ -22,7 +22,7 @@ The support timeframe for the SDK typically matches that of the Visual Studio ve | SDK Version | MSBuild/Visual Studio version | Ship date | Lifecycle | |------------------|--------------------|--------------|-----------| -| 2.1.5xx | 15.9 | Nov '18 | Aug '211 | +| 2.1.5xx | 15.9 | Nov '18 | Aug '21 | | 2.1.8xx | 16.2 (No VS) | July '19 | Aug '21 | | 3.1.1xx | 16.4 | Dec '19 | Oct '21 | | 3.1.4xx | 16.7 | Aug '20 | Dec '22 | @@ -30,28 +30,32 @@ The support timeframe for the SDK typically matches that of the Visual Studio ve | 5.0.2xx | 16.9 | March '21 | May '221 | | 5.0.3xx | 16.10 | May '21 | Aug '21 | | 5.0.4xx | 16.11 | Aug '21 | May '221 | -| 6.0.100 | 17.02 | Nov '21 | Jul '23 | -| 6.0.200 | 17.1 | Feb '22 | May '22 | -| 6.0.300 | 17.23 | May '22 | Oct '22 | -| 6.0.400 | 17.3 | Aug '22 | Nov '242 | -| 7.0.100 | 17.4 | Nov '22 | TBD | -| 7.0.200 | 17.5 | TBD | TBD | +| 6.0.1xx | 17.03 | Nov '21 | Jul '23 | +| 6.0.2xx | 17.1 | Feb '22 | May '22 | +| 6.0.3xx | 17.24 | May '22 | Oct '23 | +| 6.0.4xx | 17.3 | Aug '22 | Nov '242 | +| 7.0.1xx | 17.4 | Nov '22 | Jul '23 | +| 7.0.2xx | 17.55 | Feb '23 | May '23 | +| 7.0.3xx | 17.6 | May '23 | TBD | > [!NOTE] > Targeting `net6.0` is officially supported in Visual Studio 17.0+ only. - +> Targeting `net7.0` is officially supported in Visual Studio 17.4+ only. +> > 1 The .NET 5 SDK will be supported in Visual Studio scenarios until December 2022 when 3.1 goes out of support. MSBuild/Visual Studio supported for longer. > -> 2 Visual Studio 17.3 will be in support until 17.4 ships +> 2 Visual Studio 17.3 went out of support in Nov '22. 6.0.4xx will be in support for the life of .NET 6 as a stand-alone release. +> +> 3 With .NET 6, the.NET 6.0.100 SDK can be used in version 16.11 for **downlevel** targeting. This means that you're not forced to update your SDK and Visual Studio versions simultaneously. However, you won't be able to target .NET 6 because of limitations in 6.0 features and C# 10 features in version 16.11. This compatibility is specifically for targeting 5.0 and below. +> +> 4 6.0.300 and newer SDKs require a minimum Visual Studio version of 17.0. +> +> 5 7.0.200 and newer SDKs require a minimum Visual Studio version of 17.4. > > [Visual Studio 2019 Lifecycle](/lifecycle/products/visual-studio-2019) > > [Visual Studio 2022 Lifecycle](/lifecycle/products/visual-studio-2022) -> 2 With .NET 6, the.NET 6.0.100 SDK can be used in version 16.11 for **downlevel** targeting. This means that you're not forced to update your SDK and Visual Studio versions simultaneously. However, you won't be able to target .NET 6 because of limitations in 6.0 features and C# 10 features in version 16.11. This compatibility is specifically for targeting 5.0 and below. -> -> 3 6.0.300 and newer SDKs require a minimum Visual Studio version of 17.0. - ## Targeting and support rules Starting with .NET SDK 7.0.100 and .NET SDK 6.0.300, a policy has been put into place regarding which versions of MSBuild and Visual Studio a given version of the .NET SDK will run in. The policy is: @@ -78,20 +82,15 @@ To ensure consistent tooling, you should use `dotnet build` rather than `msbuild ## Preview versioning -Major versions of the .NET SDK are typically released within a few days of a Visual Studio preview version. While there may be other combinations that work, only the latest preview released is tested and officially supported. The following table shows which version of Visual Studio each .NET 7 preview version was tested with prior to release. +Major versions of the .NET SDK are typically released within a few days of a Visual Studio preview version. While there may be other combinations that work, only the latest preview released is tested and officially supported. The following table shows which version of Visual Studio each .NET preview version was tested with prior to release. | SDK preview version | Visual Studio version | |-|-| -| Preview 1 | 17.2 Preview 1 | -| Preview 2 | 17.2 Preview 2 | -| Preview 3 | 17.2 Preview 3 | -| Preview 4 | 17.3 Preview 1 | -| Preview 5 | 17.3 Preview 2 | -| Preview 6 | 17.3 Preview 3 | -| Preview 7 | 17.4 Preview 1 | -| RC 1 | 17.4 Preview 2 | -| RC 2 | 17.4 Preview 3 | +| 7.0.100 RC 2 | 17.4 Preview 3 | | 7.0.100 | 17.4.0 | +| 8.0.100 Preview 1 | 17.6 Preview 1 | +| 8.0.100 Preview 2 | 17.6 Preview 2 | +| 8.0.100 Preview 3 | 17.6 Preview 3 | ## Reference diff --git a/docs/core/project-sdk/msbuild-props.md b/docs/core/project-sdk/msbuild-props.md index d0bd702c75933..8891c315b9e97 100644 --- a/docs/core/project-sdk/msbuild-props.md +++ b/docs/core/project-sdk/msbuild-props.md @@ -146,7 +146,7 @@ You can specify properties such as `PackageId`, `PackageVersion`, `PackageIcon`, ### PackRelease -The `PackRelease` property is similar to the [PublishRelease](#publishrelease) property, except that it changes the default behavior of `dotnet pack`. +The `PackRelease` property is similar to the [PublishRelease](#publishrelease) property, except that it changes the default behavior of `dotnet pack`. This property was introduced in .NET 7. ```xml @@ -155,7 +155,9 @@ The `PackRelease` property is similar to the [PublishRelease](#publishrelease) p ``` > [!NOTE] -> To use `PackRelease` in a project that's part of a Visual Studio solution, you must set the environment variable `DOTNET_CLI_ENABLE_PACK_RELEASE_FOR_SOLUTIONS` to `true` (or any other value). Setting this variable will increase the time required to pack solutions that have many projects. +> +> - Starting in the .NET 8 SDK, `PackRelease` defaults to `true`. For more information, see ['dotnet pack' uses Release configuration](../compatibility/sdk/8.0/dotnet-pack-config.md). +> - .NET 7 SDK only: To use `PackRelease` in a project that's part of a Visual Studio solution, you must set the environment variable `DOTNET_CLI_ENABLE_PACK_RELEASE_FOR_SOLUTIONS` to `true` (or any other value). For solutions that have many projects, setting this variable increases the time required to pack. ## Publish-related properties @@ -343,7 +345,7 @@ When this property is `true`, XML documentation files for the project's referenc ### PublishRelease -The `PublishRelease` property informs `dotnet publish` to use the `Release` configuration by default instead of the `Debug` configuration. +The `PublishRelease` property informs `dotnet publish` to use the `Release` configuration by default instead of the `Debug` configuration. This property was introduced in .NET 7. ```xml @@ -353,8 +355,9 @@ The `PublishRelease` property informs `dotnet publish` to use the `Release` conf > [!NOTE] > -> - This property does not affect the behavior of `dotnet build /t:Publish` and changes the configuration only when publishing via the .NET CLI. -> - To use `PublishRelease` in a project that's part of a Visual Studio solution, you must set the environment variable `DOTNET_CLI_ENABLE_PUBLISH_RELEASE_FOR_SOLUTIONS` to `true` (or any other value). This will increase the time required to publish solutions that have many projects. When publishing a solution with this variable enabled, the executable project's `PublishRelease` value takes precedence and flows the new default configuration to any other projects in the solution. If a solution contains multiple executable or top-level projects with differing values of `PublishRelease`, the solution won't successfully publish. +> - Starting in the .NET 8 SDK, `PublishRelease` defaults to `true` for projects that target .NET 8 or later. For more information, see ['dotnet publish' uses Release configuration](../compatibility/sdk/8.0/dotnet-publish-config.md). +> - This property does not affect the behavior of `dotnet build /t:Publish`, and it only changes the configuration only when publishing via the .NET CLI. +> - .NET 7 SDK only: To use `PublishRelease` in a project that's part of a Visual Studio solution, you must set the environment variable `DOTNET_CLI_ENABLE_PUBLISH_RELEASE_FOR_SOLUTIONS` to `true` (or any other value). When publishing a solution with this variable enabled, the executable project's `PublishRelease` value takes precedence and flows the new default configuration to any other projects in the solution. If a solution contains multiple executable or top-level projects with differing values of `PublishRelease`, the solution won't successfully publish. For solutions that have many projects, use of this setting increases the time required to publish. ### RollForward @@ -573,6 +576,9 @@ Library authors who intend to ship preview assemblies should set this property t Set the `EnableWindowsTargeting` property to `true` to build Windows apps (for example, Windows Forms or Windows Presentation Foundation apps) on a non-Windows platform. If you don't set this property to `true`, you'll get build warning [NETSDK1100](../tools/sdk-errors/netsdk1100.md). This error occurs because targeting and runtime packs aren't automatically downloaded on platforms that aren't supported. By setting this property, those packs are downloaded when cross-targeting. +> [!NOTE] +> This property is currently recommended to allow development on non-Windows platforms. But when the application is ready to be released, it should be built on Windows. When building on a non-Windows platform, the output may not be the same as when building on Windows. In particular, the executable is not marked as a Windows application (which means that it will always launch a console window) and won't have an icon embedded. + ```xml true diff --git a/docs/core/project-sdk/overview.md b/docs/core/project-sdk/overview.md index 5aa3a5b06fad0..6055c95a4320c 100644 --- a/docs/core/project-sdk/overview.md +++ b/docs/core/project-sdk/overview.md @@ -212,7 +212,10 @@ In SDK-style projects, use an MSBuild target named `PreBuild` or `PostBuild` and ## Customize the build -There are various ways to [customize a build](/visualstudio/msbuild/customize-your-build). You may want to override a property by passing it as an argument to an [msbuild](/visualstudio/msbuild/msbuild-command-line-reference) or [dotnet](../tools/index.md) command. You can also add the property to the project file or to a *Directory.Build.props* file. For a list of useful properties for .NET projects, see [MSBuild reference for .NET SDK projects](msbuild-props.md). +There are various ways to [customize a build](/visualstudio/msbuild/customize-your-build). You may want to override a property by passing it as an argument to an [msbuild](/visualstudio/msbuild/msbuild-command-line-reference) or [dotnet](../tools/index.md) command. You can also add the property to the project file or to a [*Directory.Build.props* file](/visualstudio/msbuild/customize-by-directory#directorybuildprops-and-directorybuildtargets). For a list of useful properties for .NET projects, see [MSBuild reference for .NET SDK projects](msbuild-props.md). + +> [!TIP] +> An easy way to create a new *Directory.Build.props* file from the command line is by using the command `dotnet new buildprops` at the root of your repository. ### Custom targets @@ -256,6 +259,6 @@ You can configure how to use the custom target. Since it's an MSBuild target, it ## See also -- [Install .NET Core](../install/index.yml) +- [Customize your build (MSBuild)](/visualstudio/msbuild/customize-your-build) - [How to use MSBuild project SDKs](/visualstudio/msbuild/how-to-use-project-sdk) - [Package custom MSBuild targets and props with NuGet](/nuget/create-packages/creating-a-package#include-msbuild-props-and-targets-in-a-package) diff --git a/docs/core/rid-catalog.md b/docs/core/rid-catalog.md index 4e18af3b14038..31c8b084e1939 100644 --- a/docs/core/rid-catalog.md +++ b/docs/core/rid-catalog.md @@ -90,7 +90,6 @@ Only common values are listed. For the latest and complete version, see the [run - Windows, not version-specific - `win-x64` - `win-x86` - - `win-arm` - `win-arm64` - Windows 7 / Windows Server 2008 R2 - `win7-x64` @@ -98,11 +97,9 @@ Only common values are listed. For the latest and complete version, see the [run - Windows 8.1 / Windows Server 2012 R2 - `win81-x64` - `win81-x86` - - `win81-arm` - Windows 11 / Windows Server 2022 / Windows 10 / Windows Server 2016 - `win10-x64` - `win10-x86` - - `win10-arm` - `win10-arm64` There are no `win11` RIDs; use `win10` RIDs for Windows 11. For more information, see [.NET dependencies and requirements](./install/windows.md#dependencies). diff --git a/docs/core/runtime-config/compilation.md b/docs/core/runtime-config/compilation.md index a9a0af8ed6237..9ea07b6590d85 100644 --- a/docs/core/runtime-config/compilation.md +++ b/docs/core/runtime-config/compilation.md @@ -147,3 +147,18 @@ This setting enables dynamic or tiered profile-guided optimization (PGO) in .NET | | Setting name | Values | | - | - | - | | **Environment variable** | `DOTNET_TieredPGO` | `1` - enabled
`0` - disabled | +| **MSBuild property** | `TieredPGO` | `true` - enabled
`false` - disabled | + +### Examples + +Project file: + +```xml + + + + true + + + +``` diff --git a/docs/core/runtime-config/garbage-collector.md b/docs/core/runtime-config/garbage-collector.md index d00f8711b5400..2a226342c160a 100644 --- a/docs/core/runtime-config/garbage-collector.md +++ b/docs/core/runtime-config/garbage-collector.md @@ -12,8 +12,8 @@ Settings are arranged into groups on this page. The settings within each group a > [!NOTE] > -> - These settings can also be changed dynamically by the app as it's running, so any configuration options you set may be overridden. -> - Some settings, such as [latency level](../../standard/garbage-collection/latency.md), are typically set only through the API at design time. Such settings are omitted from this page. +> - These configurations are only read by the runtime when the GC is initialized (usually this means during the process startup time). If you change an environment variable when a process is already running, the change won't be reflected in that process. Settings that can be changed through APIs at run time, such as [latency level](../../standard/garbage-collection/latency.md), are omitted from this page. +> - Because GC is per process, it rarely ever makes sense to set these configurations at the machine level. For example, you wouldn't want every .NET process on a machine to use server GC or the same heap hard limit. > - For number values, use decimal notation for settings in the *runtimeconfig.json* file and hexadecimal notation for environment variable settings. For hexadecimal values, you can specify them with or without the "0x" prefix. > - If you're using the environment variables, .NET 6 standardizes on the prefix `DOTNET_` instead of `COMPlus_`. However, the `COMPlus_` prefix will continue to work. If you're using a previous version of the .NET runtime, you should still use the `COMPlus_` prefix, for example, `COMPlus_gcServer`. diff --git a/docs/core/runtime-discovery/troubleshoot-app-launch.md b/docs/core/runtime-discovery/troubleshoot-app-launch.md index 4da815f68768a..b0664f0e8ded2 100644 --- a/docs/core/runtime-discovery/troubleshoot-app-launch.md +++ b/docs/core/runtime-discovery/troubleshoot-app-launch.md @@ -2,7 +2,7 @@ title: Troubleshoot app launch failures description: Learn about common reasons for app launch failures and possible solutions. ms.topic: troubleshooting -ms.date: 03/24/2022 +ms.date: 03/29/2023 zone_pivot_groups: operating-systems-set-one --- @@ -14,7 +14,7 @@ If you already know which .NET version you need, you can download it from [.NET ## .NET installation not found -If a .NET installation is not found, the application fails to launch with a message similar to: +If a .NET installation isn't found, the application fails to launch with a message similar to: ::: zone pivot="os-windows" @@ -29,7 +29,7 @@ Host version: 7.0.0 ::: zone-end -::: zone pivot="os-linux,os-macos" +::: zone pivot="os-linux" ```bash You must install .NET to run this application. @@ -40,16 +40,33 @@ Host version: 7.0.0 .NET location: Not found ``` +This may be due to a [package mix-up](../install/linux-package-mixup.md). + +Global installs are registered in the following location: `/etc/dotnet/install_location`. For more information, see [install locations](https://github.com/dotnet/designs/blob/main/accepted/2020/install-locations.md). ::: zone-end -The error message includes a link to download .NET. You can follow this link to get to the appropriate download page. You can also pick the .NET version (specified by `Host version`) from [.NET downloads](https://dotnet.microsoft.com/download/dotnet). +::: zone pivot="os-macos" + +```bash +You must install .NET to run this application. + +App: /home/user/repos/myapp/myapp +Architecture: x64 +Host version: 7.0.0 +.NET location: Not found +``` + +Global installs are registered in the following location: `/etc/dotnet/install_location`. For more information, see [install locations](https://github.com/dotnet/designs/blob/main/accepted/2020/install-locations.md). +::: zone-end + +The error message includes a link to download .NET. You can follow that link to get to the appropriate download page. You can also pick the .NET version (specified by `Host version`) from [.NET downloads](https://dotnet.microsoft.com/download/dotnet). ::: zone pivot="os-windows,os-macos" On the [download page](https://dotnet.microsoft.com/download/dotnet) for the required .NET version, find the **.NET Runtime** download that matches the architecture listed in the error message. You can then install it by downloading and running an **Installer**. ::: zone-end ::: zone pivot="os-linux" -.NET is available through various Linux package managers. See [Install .NET on Linux](../install/linux.md) for details. Note that preview versions of .NET are typically not available through package managers. +.NET is available through various Linux package managers. For more information, see [Install .NET on Linux](../install/linux.md). (Preview versions of .NET aren't typically available through package managers.) You need to install the .NET Runtime package for the appropriate version, like `dotnet-runtime6`. ::: zone-end @@ -58,7 +75,7 @@ Alternatively, on the [download page](https://dotnet.microsoft.com/download/dotn ## Required framework not found -If a required framework or compatible version is not found, the application fails to launch with a message similar to: +If a required framework or compatible version isn't found, the application fails to launch with a message similar to: ::: zone pivot="os-windows" @@ -108,7 +125,7 @@ The following frameworks were found: ::: zone-end -The error indicates the name, version, and architecture of the missing framework and the location at which it is expected to be installed. To run the application, you can [install a compatible runtime](#install-a-compatible-runtime) at the specified ".NET location". If the application is targeting a lower version than one you have installed and you would like to run it on a higher version, you can also [configure roll-forward behavior](#configure-roll-forward-behavior) for the application. +The error indicates the name, version, and architecture of the missing framework and the location at which it's expected to be installed. To run the application, you can [install a compatible runtime](#install-a-compatible-runtime) at the specified ".NET location". If the application targets a lower version than one you have installed and you'd like to run it on a higher version, you can also [configure roll-forward behavior](#configure-roll-forward-behavior) for the application. ### Install a compatible runtime @@ -119,28 +136,28 @@ Alternately, you can download a runtime from the [.NET downloads](https://dotnet The following table shows the frameworks that each runtime contains. ::: zone pivot="os-windows" -| Runtime download | Included frameworks | -| -------------------- | ------------------- | -| ASP.NET Core Runtime | Microsoft.NETCore.App
Microsoft.AspNetCore.App | +| Runtime download | Included frameworks | +| -------------------- | ------------------------------------------------------ | +| ASP.NET Core Runtime | Microsoft.NETCore.App
Microsoft.AspNetCore.App | | .NET Desktop Runtime | Microsoft.NETCore.App
Microsoft.WindowsDesktop.App | -| .NET Runtime | Microsoft.NETCore.App | +| .NET Runtime | Microsoft.NETCore.App | ::: zone-end ::: zone pivot="os-linux,os-macos" -| Runtime download | Included frameworks | -| -------------------- | ------------------- | +| Runtime download | Included frameworks | +| -------------------- | -------------------------------------------------- | | ASP.NET Core Runtime | Microsoft.NETCore.App
Microsoft.AspNetCore.App | -| .NET Runtime | Microsoft.NETCore.App | +| .NET Runtime | Microsoft.NETCore.App | ::: zone-end -Select a runtime download containing the missing framework, and install it. +Select a runtime download that contains the missing framework, and then install it. ::: zone pivot="os-windows,os-macos" On the [download page](https://dotnet.microsoft.com/download/dotnet) for the required .NET version, find the runtime download that matches the architecture listed in the error message. You likely want to download an **Installer**. ::: zone-end ::: zone pivot="os-linux" -.NET is available through various Linux package managers. See [Install .NET on Linux](../install/linux.md) for details. Note that preview versions of .NET are typically not available through package managers. +.NET is available through various Linux package managers. See [Install .NET on Linux](../install/linux.md) for details. (Preview versions of .NET aren't typically available through package managers.) You need to install the .NET runtime package for the appropriate version, like `dotnet-runtime6` or `dotnet-aspnet6`. ::: zone-end @@ -162,7 +179,7 @@ In most cases, when the application that failed to launch is using such an insta There are other installation and workaround options to consider. -#### Run the dotnet-install script +### Run the dotnet-install script Download the [dotnet-install script](../tools/dotnet-install-script.md#recommended-version) for your operating system. Run the script with options based on the information in the error message. The [dotnet-install script reference page](../tools/dotnet-install-script.md) shows all available options. @@ -185,7 +202,7 @@ If you encounter an error stating that running scripts is disabled, you may need Set-ExecutionPolicy Bypass -Scope Process ``` -For more details on installation using the script, see [Install with PowerShell automation](../install/windows.md#install-with-powershell-automation). +For more information on installation using the script, see [Install with PowerShell automation](../install/windows.md#install-with-powershell-automation). ::: zone-end ::: zone pivot="os-linux" @@ -200,7 +217,7 @@ For example, the error message in the previous section would correspond to: ./dotnet-install.sh --architecture x64 --install-dir /usr/share/dotnet/ --runtime dotnet --version 5.0.15 ``` -For more details on installation using the script, see [Scripted install](../install/linux-scripted-manual.md#scripted-install). +For more information on installation using the script, see [Scripted install](../install/linux-scripted-manual.md#scripted-install). ::: zone-end ::: zone pivot="os-macos" @@ -215,10 +232,10 @@ For example, the error message in the previous section would correspond to: ./dotnet-install.sh --architecture x64 --install-dir /usr/local/share/dotnet/ --runtime dotnet --version 5.0.15 ``` -For more details on installation using the script, see [Install with bash automation](../install/macos.md#install-with-bash-automation). +For more information on installation using the script, see [Install with bash automation](../install/macos.md#install-with-bash-automation). ::: zone-end -#### Download binaries +### Download binaries You can download a binary archive of .NET from the [download page](https://dotnet.microsoft.com/download/dotnet). From the **Binaries** column of the runtime download, download the binary release matching the required architecture. Extract the downloaded archive to the ".NET location" specified in the error message. @@ -239,7 +256,7 @@ For more details on manual installation, see [Install .NET on macOS](../install/ If you already have a higher version of the required framework installed, you can make the application run on that higher version by configuring its roll-forward behavior. When running the application, you can specify the [`--roll-forward` command line option](../tools/dotnet.md#rollforward) or set the [`DOTNET_ROLL_FORWARD` environment variable](../tools/dotnet-environment-variables.md#dotnet_roll_forward). -By default, an application requires a framework that matches the same major version that the application targets, but can use a higher minor or patch version. However, application developers may have specified a different behavior. For more details, see [Framework-dependent apps roll-forward](../versions/selection.md#framework-dependent-apps-roll-forward). +By default, an application requires a framework that matches the same major version that the application targets, but can use a higher minor or patch version. However, application developers may have specified a different behavior. For more information, see [Framework-dependent apps roll-forward](../versions/selection.md#framework-dependent-apps-roll-forward). > [!NOTE] > Since using this option lets the application run on a different framework version than the one for which it was designed, it may result in unintended behavior due to changes between versions of a framework. @@ -254,17 +271,17 @@ On Windows, before .NET 7, the application could search for frameworks in multip 1. Subdirectories relative to: - - `dotnet` executable when running the application through `dotnet` - - `DOTNET_ROOT` environment variable (if set) when running the application through its executable (`apphost`) + - `dotnet` executable when running the application through `dotnet`. + - `DOTNET_ROOT` environment variable (if set) when running the application through its executable (`apphost`). 2. Globally registered install location (if set) in `HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\\InstallLocation`. 3. Default install location of `%ProgramFiles%\dotnet` (or `%ProgramFiles(x86)%\dotnet` for 32-bit processes on 64-bit Windows). This multi-level lookup behavior was enabled by default but could be disabled by setting the environment variable `DOTNET_MULTILEVEL_LOOKUP=0`. -For applications targeting .NET 7 and later, multi-level lookup is completely disabled and only one location—the first location where a .NET installation is found—is searched. When running an application through `dotnet`, frameworks are only searched for in subdirectories relative to `dotnet`. When running an application through its executable (`apphost`), frameworks are only searched for in the first of the above locations where .NET is found. +For applications targeting .NET 7 and later, multi-level lookup is completely disabled and only one location—the first location where a .NET installation is found—is searched. When an application is run through `dotnet`, frameworks are only searched for in subdirectories relative to `dotnet`. When an application is run through its executable (`apphost`), frameworks are only searched for in the first of the previously listed locations where .NET is found. -For more details, see [Disable multi-level lookup by default](https://github.com/dotnet/designs/blob/main/accepted/2022/disable-multi-level-lookup-by-default.md). +For more information, see [Multi-level lookup is disabled](../compatibility/deployment/7.0/multilevel-lookup.md). ::: zone-end diff --git a/docs/core/testing/index.md b/docs/core/testing/index.md index 1509c7e654590..25279d35aeb4d 100644 --- a/docs/core/testing/index.md +++ b/docs/core/testing/index.md @@ -3,7 +3,7 @@ title: Testing in .NET description: This article gives a brief overview of testing concepts, terminology, and tools for testing in .NET. author: IEvangelist ms.author: dapine -ms.date: 08/01/2022 +ms.date: 03/22/2023 ms.custom: devdivchpfy22 --- @@ -59,7 +59,7 @@ For more information, see the following resources: ### MSTest -[MSTest](https://github.com/Microsoft/testfx-docs) is the Microsoft test framework for all .NET languages. It's extensible and works with both .NET CLI and Visual Studio. For more information, see the following resources: +[MSTest](https://github.com/microsoft/testfx) is the Microsoft test framework for all .NET languages. It's extensible and works with both .NET CLI and Visual Studio. For more information, see the following resources: - [Unit testing with C#](unit-testing-with-mstest.md) - [Unit testing with F#](unit-testing-fsharp-with-mstest.md) diff --git a/docs/core/testing/order-unit-tests.md b/docs/core/testing/order-unit-tests.md index 0828d5fb14f4e..e8812136a70bc 100644 --- a/docs/core/testing/order-unit-tests.md +++ b/docs/core/testing/order-unit-tests.md @@ -3,7 +3,7 @@ title: Order unit tests description: Learn how to order unit tests with .NET Core. author: IEvangelist ms.author: dapine -ms.date: 08/08/2022 +ms.date: 03/17/2023 zone_pivot_groups: unit-testing-framework-set-one recommendations: false --- diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/ByAlphabeticalOrder.cs b/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/ByAlphabeticalOrder.cs index 3ef892add7691..fcf227efc59b9 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/ByAlphabeticalOrder.cs +++ b/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/ByAlphabeticalOrder.cs @@ -1,39 +1,38 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace MSTest.Project +namespace MSTest.Project; + +[TestClass] +public class ByAlphabeticalOrder { - [TestClass] - public class ByAlphabeticalOrder + public static bool Test1Called; + public static bool Test2Called; + public static bool Test3Called; + + [TestMethod] + public void Test2() + { + Test2Called = true; + + Assert.IsTrue(Test1Called); + Assert.IsFalse(Test3Called); + } + + [TestMethod] + public void Test1() { - public static bool Test1Called; - public static bool Test2Called; - public static bool Test3Called; - - [TestMethod] - public void Test2() - { - Test2Called = true; - - Assert.IsTrue(Test1Called); - Assert.IsFalse(Test3Called); - } - - [TestMethod] - public void Test1() - { - Test1Called = true; - - Assert.IsFalse(Test2Called); - Assert.IsFalse(Test3Called); - } - - [TestMethod] - public void Test3() - { - Test3Called = true; - - Assert.IsTrue(Test1Called); - Assert.IsTrue(Test2Called); - } + Test1Called = true; + + Assert.IsFalse(Test2Called); + Assert.IsFalse(Test3Called); + } + + [TestMethod] + public void Test3() + { + Test3Called = true; + + Assert.IsTrue(Test1Called); + Assert.IsTrue(Test2Called); } } diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/MSTest.Project.csproj b/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/MSTest.Project.csproj index 8f70324edd002..9990d23bed6d9 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/MSTest.Project.csproj +++ b/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/MSTest.Project.csproj @@ -1,14 +1,14 @@ - net6.0 + net7.0 false enable enable - + diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/NUnit.TestProject/ByOrder.cs b/docs/core/testing/snippets/order-unit-tests/csharp/NUnit.TestProject/ByOrder.cs index a9a06d44668e2..4c80f0a2d11cb 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/NUnit.TestProject/ByOrder.cs +++ b/docs/core/testing/snippets/order-unit-tests/csharp/NUnit.TestProject/ByOrder.cs @@ -1,52 +1,51 @@ using NUnit.Framework; -namespace NUnit.Project +namespace NUnit.Project; + +public class ByOrder { - public class ByOrder + public static bool Test1Called; + public static bool Test2ACalled; + public static bool Test2BCalled; + public static bool Test3Called; + + [Test, Order(5)] + public void Test1() + { + Test1Called = true; + + Assert.IsFalse(Test2ACalled); + Assert.IsTrue(Test2BCalled); + Assert.IsTrue(Test3Called); + } + + [Test, Order(0)] + public void Test2B() { - public static bool Test1Called; - public static bool Test2ACalled; - public static bool Test2BCalled; - public static bool Test3Called; - - [Test, Order(5)] - public void Test1() - { - Test1Called = true; - - Assert.IsFalse(Test2ACalled); - Assert.IsTrue(Test2BCalled); - Assert.IsTrue(Test3Called); - } - - [Test, Order(0)] - public void Test2B() - { - Test2BCalled = true; - - Assert.IsFalse(Test1Called); - Assert.IsFalse(Test2ACalled); - Assert.IsTrue(Test3Called); - } - - [Test] - public void Test2A() - { - Test2ACalled = true; - - Assert.IsTrue(Test1Called); - Assert.IsTrue(Test2BCalled); - Assert.IsTrue(Test3Called); - } - - [Test, Order(-5)] - public void Test3() - { - Test3Called = true; - - Assert.IsFalse(Test1Called); - Assert.IsFalse(Test2ACalled); - Assert.IsFalse(Test2BCalled); - } + Test2BCalled = true; + + Assert.IsFalse(Test1Called); + Assert.IsFalse(Test2ACalled); + Assert.IsTrue(Test3Called); + } + + [Test] + public void Test2A() + { + Test2ACalled = true; + + Assert.IsTrue(Test1Called); + Assert.IsTrue(Test2BCalled); + Assert.IsTrue(Test3Called); + } + + [Test, Order(-5)] + public void Test3() + { + Test3Called = true; + + Assert.IsFalse(Test1Called); + Assert.IsFalse(Test2ACalled); + Assert.IsFalse(Test2BCalled); } } diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/NUnit.TestProject/NUnit.Project.csproj b/docs/core/testing/snippets/order-unit-tests/csharp/NUnit.TestProject/NUnit.Project.csproj index b0666fdbe49d0..87a7c6de48d41 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/NUnit.TestProject/NUnit.Project.csproj +++ b/docs/core/testing/snippets/order-unit-tests/csharp/NUnit.TestProject/NUnit.Project.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 false enable enable @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Attributes/TestPriorityAttribute.cs b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Attributes/TestPriorityAttribute.cs index ba1a330dfdca1..b2cd35e7c26d3 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Attributes/TestPriorityAttribute.cs +++ b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Attributes/TestPriorityAttribute.cs @@ -1,12 +1,9 @@ -using System; +namespace XUnit.Project.Attributes; -namespace XUnit.Project.Attributes +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] +public class TestPriorityAttribute : Attribute { - [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] - public class TestPriorityAttribute : Attribute - { - public int Priority { get; private set; } + public int Priority { get; private set; } - public TestPriorityAttribute(int priority) => Priority = priority; - } + public TestPriorityAttribute(int priority) => Priority = priority; } diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByAlphabeticalOrder.cs b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByAlphabeticalOrder.cs index fc21dc9b3d9fd..52c60f51f11e7 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByAlphabeticalOrder.cs +++ b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByAlphabeticalOrder.cs @@ -2,7 +2,9 @@ namespace XUnit.Project; -[TestCaseOrderer("XUnit.Project.Orderers.AlphabeticalOrderer", "XUnit.Project")] +[TestCaseOrderer( + ordererTypeName: "XUnit.Project.Orderers.AlphabeticalOrderer", + ordererAssemblyName: "XUnit.Project")] public class ByAlphabeticalOrder { public static bool Test1Called; diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByDisplayName.cs b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByDisplayName.cs index e3de4d318bdb7..5ec370bcd676d 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByDisplayName.cs +++ b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByDisplayName.cs @@ -2,7 +2,9 @@ // Need to turn off test parallelization so we can validate the run order [assembly: CollectionBehavior(DisableTestParallelization = true)] -[assembly: TestCollectionOrderer("XUnit.Project.Orderers.DisplayNameOrderer", "XUnit.Project")] +[assembly: TestCollectionOrderer( + ordererTypeName: "XUnit.Project.Orderers.DisplayNameOrderer", + ordererAssemblyName: "XUnit.Project")] namespace XUnit.Project; diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByPriorityOrder.cs b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByPriorityOrder.cs index 80f4110338847..b34ac957f8ac0 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByPriorityOrder.cs +++ b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/ByPriorityOrder.cs @@ -3,7 +3,9 @@ namespace XUnit.Project; -[TestCaseOrderer("XUnit.Project.Orderers.PriorityOrderer", "XUnit.Project")] +[TestCaseOrderer( + ordererTypeName: "XUnit.Project.Orderers.PriorityOrderer", + ordererAssemblyName: "XUnit.Project")] public class ByPriorityOrder { public static bool Test1Called; diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/AlphabeticalOrderer.cs b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/AlphabeticalOrderer.cs index 4d207d0d7bfbf..36ba2952ffc49 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/AlphabeticalOrderer.cs +++ b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/AlphabeticalOrderer.cs @@ -1,14 +1,11 @@ -using System.Collections.Generic; -using System.Linq; -using Xunit.Abstractions; +using Xunit.Abstractions; using Xunit.Sdk; -namespace XUnit.Project.Orderers +namespace XUnit.Project.Orderers; + +public class AlphabeticalOrderer : ITestCaseOrderer { - public class AlphabeticalOrderer : ITestCaseOrderer - { - public IEnumerable OrderTestCases( - IEnumerable testCases) where TTestCase : ITestCase => - testCases.OrderBy(testCase => testCase.TestMethod.Method.Name); - } -} \ No newline at end of file + public IEnumerable OrderTestCases( + IEnumerable testCases) where TTestCase : ITestCase => + testCases.OrderBy(testCase => testCase.TestMethod.Method.Name); +} diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/DisplayNameOrderer.cs b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/DisplayNameOrderer.cs index c6ac8a6bbd561..81701d353b074 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/DisplayNameOrderer.cs +++ b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/DisplayNameOrderer.cs @@ -1,14 +1,11 @@ -using System.Collections.Generic; -using System.Linq; -using Xunit; +using Xunit; using Xunit.Abstractions; -namespace XUnit.Project.Orderers +namespace XUnit.Project.Orderers; + +public class DisplayNameOrderer : ITestCollectionOrderer { - public class DisplayNameOrderer : ITestCollectionOrderer - { - public IEnumerable OrderTestCollections( - IEnumerable testCollections) => - testCollections.OrderBy(collection => collection.DisplayName); - } + public IEnumerable OrderTestCollections( + IEnumerable testCollections) => + testCollections.OrderBy(collection => collection.DisplayName); } \ No newline at end of file diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/PriorityOrderer.cs b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/PriorityOrderer.cs index c20d4aac1258d..f7d1f1f33045f 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/PriorityOrderer.cs +++ b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/Orderers/PriorityOrderer.cs @@ -1,43 +1,40 @@ -using System.Collections.Generic; -using System.Linq; -using Xunit.Abstractions; +using Xunit.Abstractions; using Xunit.Sdk; using XUnit.Project.Attributes; -namespace XUnit.Project.Orderers +namespace XUnit.Project.Orderers; + +public class PriorityOrderer : ITestCaseOrderer { - public class PriorityOrderer : ITestCaseOrderer + public IEnumerable OrderTestCases( + IEnumerable testCases) where TTestCase : ITestCase { - public IEnumerable OrderTestCases( - IEnumerable testCases) where TTestCase : ITestCase + string assemblyName = typeof(TestPriorityAttribute).AssemblyQualifiedName!; + var sortedMethods = new SortedDictionary>(); + foreach (TTestCase testCase in testCases) { - string assemblyName = typeof(TestPriorityAttribute).AssemblyQualifiedName!; - var sortedMethods = new SortedDictionary>(); - foreach (TTestCase testCase in testCases) - { - int priority = testCase.TestMethod.Method - .GetCustomAttributes(assemblyName) - .FirstOrDefault() - ?.GetNamedArgument(nameof(TestPriorityAttribute.Priority)) ?? 0; - - GetOrCreate(sortedMethods, priority).Add(testCase); - } + int priority = testCase.TestMethod.Method + .GetCustomAttributes(assemblyName) + .FirstOrDefault() + ?.GetNamedArgument(nameof(TestPriorityAttribute.Priority)) ?? 0; - foreach (TTestCase testCase in - sortedMethods.Keys.SelectMany( - priority => sortedMethods[priority].OrderBy( - testCase => testCase.TestMethod.Method.Name))) - { - yield return testCase; - } + GetOrCreate(sortedMethods, priority).Add(testCase); } - private static TValue GetOrCreate( - IDictionary dictionary, TKey key) - where TKey : struct - where TValue : new() => - dictionary.TryGetValue(key, out TValue? result) - ? result - : (dictionary[key] = new TValue()); + foreach (TTestCase testCase in + sortedMethods.Keys.SelectMany( + priority => sortedMethods[priority].OrderBy( + testCase => testCase.TestMethod.Method.Name))) + { + yield return testCase; + } } + + private static TValue GetOrCreate( + IDictionary dictionary, TKey key) + where TKey : struct + where TValue : new() => + dictionary.TryGetValue(key, out TValue? result) + ? result + : (dictionary[key] = new TValue()); } diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/XUnit.Project.csproj b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/XUnit.Project.csproj index 7f41e3e3b326f..86b8d0906ce03 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/XUnit.Project.csproj +++ b/docs/core/testing/snippets/order-unit-tests/csharp/XUnit.TestProject/XUnit.Project.csproj @@ -1,14 +1,14 @@  - net6.0 + net7.0 false enable enable - + all diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/order-unit-tests.sln b/docs/core/testing/snippets/order-unit-tests/csharp/order-unit-tests.sln new file mode 100644 index 0000000000000..d09689908b262 --- /dev/null +++ b/docs/core/testing/snippets/order-unit-tests/csharp/order-unit-tests.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33402.96 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnit.Project", "XUnit.TestProject\XUnit.Project.csproj", "{D83A050B-0EB0-4F71-B8BC-484B6F9D190F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MSTest.Project", "MSTest.Project\MSTest.Project.csproj", "{0E96EEEE-5C73-4AA9-B8E6-D6B9228776DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NUnit.Project", "NUnit.TestProject\NUnit.Project.csproj", "{954712AC-0658-46BE-950A-A77B3CAB60E1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D83A050B-0EB0-4F71-B8BC-484B6F9D190F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D83A050B-0EB0-4F71-B8BC-484B6F9D190F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D83A050B-0EB0-4F71-B8BC-484B6F9D190F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D83A050B-0EB0-4F71-B8BC-484B6F9D190F}.Release|Any CPU.Build.0 = Release|Any CPU + {0E96EEEE-5C73-4AA9-B8E6-D6B9228776DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E96EEEE-5C73-4AA9-B8E6-D6B9228776DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E96EEEE-5C73-4AA9-B8E6-D6B9228776DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E96EEEE-5C73-4AA9-B8E6-D6B9228776DB}.Release|Any CPU.Build.0 = Release|Any CPU + {954712AC-0658-46BE-950A-A77B3CAB60E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {954712AC-0658-46BE-950A-A77B3CAB60E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {954712AC-0658-46BE-950A-A77B3CAB60E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {954712AC-0658-46BE-950A-A77B3CAB60E1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3360BBDC-050A-4118-9F96-39336C770989} + EndGlobalSection +EndGlobal diff --git a/docs/core/testing/snippets/unit-testing-using-mstest/csharp/PrimeService.Tests/PrimeService.Tests.csproj b/docs/core/testing/snippets/unit-testing-using-mstest/csharp/PrimeService.Tests/PrimeService.Tests.csproj index 33d592913b81d..31fcd2d92dc5a 100644 --- a/docs/core/testing/snippets/unit-testing-using-mstest/csharp/PrimeService.Tests/PrimeService.Tests.csproj +++ b/docs/core/testing/snippets/unit-testing-using-mstest/csharp/PrimeService.Tests/PrimeService.Tests.csproj @@ -7,7 +7,7 @@
- + diff --git a/docs/core/testing/unit-testing-with-dotnet-test.md b/docs/core/testing/unit-testing-with-dotnet-test.md index fc371868f7da7..dee614f3389d5 100644 --- a/docs/core/testing/unit-testing-with-dotnet-test.md +++ b/docs/core/testing/unit-testing-with-dotnet-test.md @@ -121,7 +121,7 @@ Follow the instructions for "Replace the code in *PrimeService.cs* with the foll ## Create a test -A popular approach in test driven development (TDD) is to write a test before implementing the target code. This tutorial uses the TDD approach. The `IsPrime` method is callable, but not implemented. A test call to `IsPrime` fails. With TDD, a test is written that is known to fail. The target code is updated to make the test pass. You keep repeating this approach, writing a failing test and then updating the target code to pass. +A popular approach in test driven development (TDD) is to write a (failing) test before implementing the target code. This tutorial uses the TDD approach. The `IsPrime` method is callable, but not implemented. A test call to `IsPrime` fails. With TDD, a test is written that is known to fail. The target code is updated to make the test pass. You keep repeating this approach, writing a failing test and then updating the target code to pass. Update the *PrimeService.Tests* project: diff --git a/docs/core/testing/unit-testing-with-mstest.md b/docs/core/testing/unit-testing-with-mstest.md index 04751fe02a464..0c1e440c11ed0 100644 --- a/docs/core/testing/unit-testing-with-mstest.md +++ b/docs/core/testing/unit-testing-with-mstest.md @@ -98,7 +98,7 @@ The following outline shows the final solution layout: Change to the *unit-testing-using-mstest* directory, and run [`dotnet sln add`](../tools/dotnet-sln.md): ```dotnetcli -dotnet sln add .\PrimeService.Tests\PrimeService.Tests.csproj +dotnet sln add ./PrimeService.Tests/PrimeService.Tests.csproj ``` ## Create the first test diff --git a/docs/core/tools/dotnet-add-reference.md b/docs/core/tools/dotnet-add-reference.md index e1c7b0bbbd7ca..9f7a2b0158977 100644 --- a/docs/core/tools/dotnet-add-reference.md +++ b/docs/core/tools/dotnet-add-reference.md @@ -1,7 +1,7 @@ --- title: dotnet add reference command -description: The dotnet add reference command provides a convenient option to add project to project references. -ms.date: 02/14/2020 +description: The dotnet add reference command provides a convenient option to add project-to-project references. +ms.date: 03/21/2023 --- # dotnet add reference @@ -32,6 +32,18 @@ The `dotnet add reference` command provides a convenient option to add project r ``` +## Add a reference to an assembly that isn't in a project + +There's no CLI command to add a reference to an assembly that isn't in a project or a package. But you can do that by editing your *.csproj* file and adding markup similar to the following example: + +```xml + + + ".\MyDLLFolder\MyAssembly.dll + + +``` + ## Arguments - **`PROJECT`** diff --git a/docs/core/tools/dotnet-build.md b/docs/core/tools/dotnet-build.md index 06e954723ffb0..5a7810e6fa866 100644 --- a/docs/core/tools/dotnet-build.md +++ b/docs/core/tools/dotnet-build.md @@ -1,7 +1,7 @@ --- title: dotnet build command description: The dotnet build command builds a project and all of its dependencies. -ms.date: 08/12/2021 +ms.date: 01/23/2023 --- # dotnet build @@ -118,6 +118,10 @@ The project or solution file to build. If a project or solution file isn't speci Directory in which to place the built binaries. If not specified, the default path is `./bin///`. For projects with multiple target frameworks (via the `TargetFrameworks` property), you also need to define `--framework` when you specify this option. + - .NET 7.0.200 SDK and later + + If you specify the `--output` option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. The `--output` option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. For more information, see [Solution-level `--output` option no longer valid for build-related commands](../compatibility/sdk/7.0/solution-level-output-no-longer-valid.md). + [!INCLUDE [os](../../../includes/cli-os.md)] - **`-r|--runtime `** @@ -132,7 +136,9 @@ The project or solution file to build. If a project or solution file isn't speci The URI of the NuGet package source to use during the restore operation. -[!INCLUDE [verbosity](../../../includes/cli-verbosity-minimal.md)] +- **`-v|--verbosity `** + + Sets the verbosity level of the command. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`. The default is `minimal`. By default, MSBuild displays warnings and errors at all verbosity levels. To exclude warnings, use `/property:WarningLevel=0`. For more information, see and [WarningLevel](../../csharp/language-reference/compiler-options/errors-warnings.md#warninglevel). - **`--use-current-runtime, --ucr [true|false]`** diff --git a/docs/core/tools/dotnet-clean.md b/docs/core/tools/dotnet-clean.md index 0062d27068152..3bb646a3a42e0 100644 --- a/docs/core/tools/dotnet-clean.md +++ b/docs/core/tools/dotnet-clean.md @@ -52,6 +52,10 @@ The MSBuild project or solution to clean. If a project or solution file is not s The directory that contains the build artifacts to clean. Specify the `-f|--framework ` switch with the output directory switch if you specified the framework when the project was built. + - .NET 7.0.200 SDK and later + + If you specify the `--output` option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. The `--output` option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. For more information, see [Solution-level `--output` option no longer valid for build-related commands](../compatibility/sdk/7.0/solution-level-output-no-longer-valid.md). + * **`-r|--runtime `** Cleans the output folder of the specified runtime. This is used when a [self-contained deployment](../deploying/index.md#publish-self-contained) was created. diff --git a/docs/core/tools/dotnet-dev-certs.md b/docs/core/tools/dotnet-dev-certs.md index f9dad3bc14136..db9a4b3c0c194 100644 --- a/docs/core/tools/dotnet-dev-certs.md +++ b/docs/core/tools/dotnet-dev-certs.md @@ -99,7 +99,7 @@ The `dotnet dev-certs` command manages a self-signed certificate to enable HTTPS For information about the effect of this option when used with `--password`, `--no-password`, or without either of those options, see [--export-path](#exportpath) earlier in this article. - - **`-i|--import `** +- **`-i|--import `** Imports the provided HTTPS development certificate into the local machine. Requires that you also specify the `--clean` option, which clears out any existing HTTPS developer certificates. diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index 3b1b9ad9c163c..a6a76aeac62b9 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -1,7 +1,7 @@ --- title: .NET environment variables description: Learn about the environment variables that you can use to configure the .NET SDK, .NET CLI, and .NET runtime. -ms.date: 09/07/2022 +ms.date: 04/04/2023 --- # .NET environment variables @@ -181,7 +181,13 @@ See [EventPipe environment variables](../diagnostics/eventpipe.md#trace-using-en ### `DOTNET_ROOT`, `DOTNET_ROOT(x86)` -Specifies the location of the .NET runtimes, if they are not installed in the default location. The default location on Windows is `C:\Program Files\dotnet`. The default location on Linux and macOS is `/usr/local/share/dotnet`. This environment variable is used only when running apps via generated executables (apphosts). `DOTNET_ROOT(x86)` is used instead when running a 32-bit executable on a 64-bit OS. +Specifies the location of the .NET runtimes, if they are not installed in the default location. The default location on Windows is `C:\Program Files\dotnet`. The default location on macOS is `/usr/local/share/dotnet`. The default location on Linux varies depending on distro and installment method. The default location on Ubuntu 22.04 is `/usr/share/dotnet` (when installed from `packages.microsoft.com`) or `/usr/lib/dotnet` (when installed from Jammy feed). For more information, see the following resources: + +- [Troubleshoot app launch failures](../runtime-discovery/troubleshoot-app-launch.md?pivots=os-linux) +- GitHub issue [dotnet/core#7699](https://github.com/dotnet/core/issues/7699) +- GitHub issue [dotnet/runtime#79237](https://github.com/dotnet/runtime/issues/79237) + +This environment variable is used only when running apps via generated executables (apphosts). `DOTNET_ROOT(x86)` is used instead when running a 32-bit executable on a 64-bit OS. ### `NUGET_PACKAGES` @@ -236,6 +242,10 @@ For more information, see [the `--roll-forward` option for the `dotnet` command] Disables minor version roll forward, if set to `0`. This setting is superseded in .NET Core 3.0 by `DOTNET_ROLL_FORWARD`. The new settings should be used instead. +### `DOTNET_CLI_FORCE_UTF8_ENCODING` + +Forces the use of UTF-8 encoding in the console, even for older versions of Windows 10 that don't fully support UTF-8. For more information, see [SDK no longer changes console encoding when finished](../compatibility/sdk/8.0/console-encoding-fix.md). + ### `DOTNET_CLI_UI_LANGUAGE` Sets the language of the CLI UI using a locale value such as `en-us`. The supported values are the same as for Visual Studio. For more information, see the section on changing the installer language in the [Visual Studio installation documentation](/visualstudio/install/install-visual-studio). The .NET resource manager rules apply, so you don't have to pick an exact match—you can also pick descendants in the `CultureInfo` tree. For example, if you set it to `fr-CA`, the CLI will find and use the `fr` translations. If you set it to a language that is not supported, the CLI falls back to English. @@ -283,14 +293,14 @@ Specifies the minimum number of hours between background downloads of advertisin Controls diagnostics tracing from the hosting components, such as `dotnet.exe`, `hostfxr`, and `hostpolicy`. -* `COREHOST_TRACE=[0/1]` - default is `0` - tracing disabled. If set to `1`, diagnostics tracing is enabled. -* `COREHOST_TRACEFILE=` - has an effect only if tracing is enabled by setting `COREHOST_TRACE=1`. When set, the tracing information is written to the specified file; otherwise, the trace information is written to `stderr`. -* `COREHOST_TRACE_VERBOSITY=[1/2/3/4]` - default is `4`. The setting is used only when tracing is enabled via `COREHOST_TRACE=1`. +- `COREHOST_TRACE=[0/1]` - default is `0` - tracing disabled. If set to `1`, diagnostics tracing is enabled. +- `COREHOST_TRACEFILE=` - has an effect only if tracing is enabled by setting `COREHOST_TRACE=1`. When set, the tracing information is written to the specified file; otherwise, the trace information is written to `stderr`. +- `COREHOST_TRACE_VERBOSITY=[1/2/3/4]` - default is `4`. The setting is used only when tracing is enabled via `COREHOST_TRACE=1`. - * `4` - all tracing information is written - * `3` - only informational, warning, and error messages are written - * `2` - only warning and error messages are written - * `1` - only error messages are written + - `4` - all tracing information is written + - `3` - only informational, warning, and error messages are written + - `2` - only warning and error messages are written + - `1` - only error messages are written The typical way to get detailed trace information about application startup is to set `COREHOST_TRACE=1` and`COREHOST_TRACEFILE=host_trace.txt` and then run the application. A new file `host_trace.txt` will be created in the current directory with the detailed information. diff --git a/docs/core/tools/dotnet-install-script.md b/docs/core/tools/dotnet-install-script.md index 6d6a88eb8d2b9..18f6837353abe 100644 --- a/docs/core/tools/dotnet-install-script.md +++ b/docs/core/tools/dotnet-install-script.md @@ -288,6 +288,10 @@ Manually installing .NET doesn't add the environment variables system-wide, and > echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> ~/.bashrc > ``` +## Uninstall + +There is no uninstall script. For more information about manually uninstalling .NET, see [How to remove the .NET Runtime and SDK](../install/remove-runtime-sdk-versions.md#scripted-or-manual). + ## See also - [.NET releases](https://github.com/dotnet/core/releases) diff --git a/docs/core/tools/dotnet-list-package.md b/docs/core/tools/dotnet-list-package.md index 5295dfd8e3628..80af272b457c3 100644 --- a/docs/core/tools/dotnet-list-package.md +++ b/docs/core/tools/dotnet-list-package.md @@ -20,6 +20,8 @@ dotnet list [|] package [--config ] [--include-prerelease] [--include-transitive] [--interactive] [--outdated] [--source ] [-v|--verbosity ] [--vulnerable] + [--format ] + [--output-version ] dotnet list package -h|--help ``` @@ -118,6 +120,14 @@ The project or solution file to operate on. If not specified, the command search Lists packages that have known vulnerabilities. Cannot be combined with `--deprecated` or `--outdated` options. Nuget.org is the source of information about vulnerabilities. For more information, see [Vulnerabilities](/nuget/api/registration-base-url-resource) and [How to Scan NuGet Packages for Security Vulnerabilities](https://devblogs.microsoft.com/nuget/how-to-scan-nuget-packages-for-security-vulnerabilities/). +- **`--format `** + + Sets the report output format. Allowed values are `console`, `json`. Defaults to `console`. Available starting in .NET SDK 7.0.200. + +- **`--output-version `** + + Sets the report output version. Allowed value is `1`. Defaults to `1`. Requires the `--format json` option. When a new JSON version is available, the command will produce the new format by default. This option will let you specify that the command should produce an earlier format. Available starting in .NET SDK 7.0.200. + ## Examples - List package references of a specific project: @@ -137,3 +147,27 @@ The project or solution file to operate on. If not specified, the command search ```dotnetcli dotnet list package --framework netcoreapp3.0 ``` + +- List package references in machine readable json output format: + + ```dotnetcli + dotnet list package --format json + ``` + +- List package references for a specific target framework in machine readable json output format: + + ```dotnetcli + dotnet list package --framework netcoreapp3.0 --format json + ``` + +- Save machine readable json output of package references, including transitive dependency and vulnerability details into a file: + + ```dotnetcli + dotnet list package --include-transitive --vulnerable --format json >> dependencyReport.json + ``` + +- List package references in machine readable json output format with output version 1: + + ```dotnetcli + dotnet list package --format json --output-version 1 + ``` diff --git a/docs/core/tools/dotnet-new-sdk-templates.md b/docs/core/tools/dotnet-new-sdk-templates.md index b391d90471534..66ea34aa4ab3b 100644 --- a/docs/core/tools/dotnet-new-sdk-templates.md +++ b/docs/core/tools/dotnet-new-sdk-templates.md @@ -43,7 +43,6 @@ The following table shows the templates that come pre-installed with the .NET SD | ASP.NET Core Web App | [`webapp, razor`](#web-options) | [C#] | Web/MVC/Razor Pages | 2.2, 2.0 | | ASP.NET Core with Angular | [`angular`](#spa) | [C#] | Web/MVC/SPA | 2.0 | | ASP.NET Core with React.js | [`react`](#spa) | [C#] | Web/MVC/SPA | 2.0 | -| ASP.NET Core with React.js and Redux | [`reactredux`](#reactredux) | [C#] | Web/MVC/SPA | 2.0 | | Razor Class Library | [`razorclasslib`](#razorclasslib) | [C#] | Web/Razor/Library/Razor Class Library | 2.1 | | ASP.NET Core Web API | [`webapi`](#webapi) | [C#], F# | Web/WebAPI | 1.0 | | ASP.NET Core gRPC Service | [`grpc`](#web-others) | [C#] | Web/gRPC | 3.0 | @@ -719,7 +718,7 @@ The ability to create a project for an earlier TFM depends on having that versio The Azure Active Directory B2C instance to connect to. Use with `IndividualB2C` authentication. The default value is `https://login.microsoftonline.com/tfp/`. -- **`-minimal`** +- **`-minimal|--use-minimal-apis`** Create a project that uses the [ASP.NET Core minimal API](/aspnet/core/fundamentals/minimal-apis). @@ -751,9 +750,13 @@ The ability to create a project for an earlier TFM depends on having that versio Excludes *launchSettings.json* from the generated template. +- **`--no-openapi`** + + Turns off OpenAPI (Swagger) support. `AddSwaggerGen`, `UseSwagger`, and `UseSwaggerUI` aren't called. + - **`--no-https`** - Turns off HTTPS. `app.UseHsts` and `app.UseHttpsRedirection` aren't added to `Startup.Configure`. This option only applies if `IndividualB2C` or `SingleOrg` aren't being used for authentication. + Turns off HTTPS. No *https* launch profile is created in `launchSettings.json`. `app.UseHsts` and `app.UseHttpsRedirection` aren't called in *Program.cs*/*Startup.cs*. This option only applies if `IndividualB2C` or `SingleOrg` aren't being used for authentication. - **`-uld|--use-local-db`** @@ -767,6 +770,7 @@ The ability to create a project for an earlier TFM depends on having that versio | SDK version | Default value | |-------------|-----------------| + | 7.0 | `net7.0` | | 6.0 | `net6.0` | | 5.0 | `net5.0` | | 3.1 | `netcoreapp3.1` | diff --git a/docs/core/tools/dotnet-nuget-delete.md b/docs/core/tools/dotnet-nuget-delete.md index 2a4cfa89e5583..fc3560d657d21 100644 --- a/docs/core/tools/dotnet-nuget-delete.md +++ b/docs/core/tools/dotnet-nuget-delete.md @@ -2,7 +2,7 @@ title: dotnet nuget delete command description: The dotnet-nuget-delete command deletes or unlists a package from the server. author: karann-msft -ms.date: 06/26/2019 +ms.date: 03/21/2023 --- # dotnet nuget delete @@ -52,7 +52,7 @@ The `dotnet nuget delete` command deletes or unlists a package from the server. * **`--no-service-endpoint`** - Doesn't append "api/v2/package" to the source URL. + By default, the command appends "/api/v2/package" to the specified URL. This option is for custom feeds that must use the exact source URL as specified with the `--source` option. For more information, see the `--source` option later in this article. * **`--non-interactive`** @@ -60,7 +60,7 @@ The `dotnet nuget delete` command deletes or unlists a package from the server. * **`-s|--source `** - Specifies the server URL. Supported URLs for nuget.org include `https://www.nuget.org`, `https://www.nuget.org/api/v3`, and `https://www.nuget.org/api/v2/package`. For private feeds, replace the host name (for example, `%hostname%/api/v3`). + Specifies the server URL. The URL specified by using this option can be either V2 (`https://www.nuget.org/api/v2/`) or V3 (`https://api.nuget.org/v3/index.json`). For private feeds, replace the host name (for example, `%hostname%/api/v3/index.json`). ## Examples diff --git a/docs/core/tools/dotnet-nuget-push.md b/docs/core/tools/dotnet-nuget-push.md index 3683a2695e308..a32ff25f4ade2 100644 --- a/docs/core/tools/dotnet-nuget-push.md +++ b/docs/core/tools/dotnet-nuget-push.md @@ -30,6 +30,17 @@ The `dotnet nuget push` command pushes a package to the server and publishes it. The command pushes an existing package. It doesn't create a package. To create a package, use [`dotnet pack`](dotnet-pack.md). +### Hierarchical folder structure + +This command can store packages in a hierarchical folder structure, which is recommended to optimize performance. It stores packages in a hierarchical folder structure when publishing to a local folder (feed), like `nuget add` does, if there already is at least one package in the feed that is in a hierarchical folder structure. If the feed has a hierarchical folder structured package already in it, `dotnet nuget push` respects that structure. So, if you want to publish to a local feed using the .NET CLI instead of the NuGet CLI: + +* Before you publish the first package, go to your global packages folder, at *%userprofile%.nuget\packages*, and select the root folder of a package id. It can be any package that is not part of a framework, like .NET standard or ASP.NET. +* Copy the selected package folder into the root folder of the local feed. +* Use `dotnet nuget push` to publish your package to the local feed. +* You can now delete the folder you previously copied in, and you can freely use `dotnet nuget push` to publish to your local feed. + +Alternatively, use the NuGet CLI for the first package, then you can use `dotnet nuget push` for the rest. For more information, see [Local feeds](/nuget/hosting-packages/local-feeds). + ## Arguments - **`ROOT`** @@ -148,5 +159,3 @@ The command pushes an existing package. It doesn't create a package. To create a ``` - For pushing to Azure Artifacts, [see Azure Artifacts' push documentation](/azure/devops/artifacts/nuget/dotnet-exe#publish-packages). - - This command doesn't store packages in a hierarchical folder structure, which is recommended to optimize performance. For more information, see [Local feeds](/nuget/hosting-packages/local-feeds). diff --git a/docs/core/tools/dotnet-pack.md b/docs/core/tools/dotnet-pack.md index efe158234fc2a..ba403788febb7 100644 --- a/docs/core/tools/dotnet-pack.md +++ b/docs/core/tools/dotnet-pack.md @@ -97,6 +97,10 @@ You can provide MSBuild properties to the `dotnet pack` command for the packing Places the built packages in the directory specified. + - .NET 7.0.200 SDK + + In the 7.0.200 SDK, if you specify the `--output` option when running this command on a solution, the CLI will emit an error. This is a regression and was fixed in 7.0.201 and later versions of the .NET SDK. + - **`--runtime `** Specifies the target runtime to restore packages for. For a list of Runtime Identifiers (RIDs), see the [RID catalog](../rid-catalog.md). diff --git a/docs/core/tools/dotnet-publish.md b/docs/core/tools/dotnet-publish.md index 1386312ac4716..7659bb3e324eb 100644 --- a/docs/core/tools/dotnet-publish.md +++ b/docs/core/tools/dotnet-publish.md @@ -50,6 +50,8 @@ Any parameters passed to `dotnet publish` are passed to MSBuild. The `-c` and `- The `dotnet publish` command accepts MSBuild options, such as `-p` for setting properties and `-l` to define a logger. For example, you can set an MSBuild property by using the format: `-p:=`. +### .pubxml files + You can also set publish-related properties by referring to a *.pubxml* file. For example: ```dotnetcli @@ -58,6 +60,26 @@ dotnet publish -p:PublishProfile=FolderProfile The preceding example uses the *FolderProfile.pubxml* file that is found in the *\/Properties/PublishProfiles* folder. If you specify a path and file extension when setting the `PublishProfile` property, they are ignored. MSBuild by default looks in the *Properties/PublishProfiles* folder and assumes the *pubxml* file extension. To specify the path and filename including extension, set the `PublishProfileFullPath` property instead of the `PublishProfile` property. +In the *.pubxml* file: + +* `PublishUrl` is used by Visual Studio to denote the Publish target. +* `PublishDir` is used by the CLI to denote the Publish target. + +If you want the scenario to work in all places, you can initialize both these properties to the same value in the *.pubxml* file. When GitHub issue [dotnet/sdk#20931](https://github.com/dotnet/sdk/issues/20931) is resolved, only one of these properties will need to be set. + +Some properties in the *.pubxml* file are honored only by Visual Studio and have no effect on `dotnet publish`. We're working to bring the CLI more into alignment with Visual Studio's behavior. But some properties will never be used by the CLI. The CLI and Visual Studio both do the packaging aspect of publishing, and [dotnet/sdk#29817](https://github.com/dotnet/sdk/pull/29817) plans to add support for more properties related to that. But the CLI doesn't do the deployment automation aspect of publishing, and properties related to that are not supported. The most notable *.pubxml* properties that are not supported by `dotnet publish` are the following ones that impact the build: + +* `LastUsedBuildConfiguration` +* `Configuration` +* `Platform` +* `LastUsedPlatform` +* `TargetFramework` +* `TargetFrameworks` +* `RuntimeIdentifier` +* `RuntimeIdentifiers` + +### MSBuild properties + The following MSBuild properties change the output of `dotnet publish`. - `PublishReadyToRun` @@ -148,6 +170,10 @@ For more information, see the following resources: $(DefaultItemExcludes);publishoutput** ``` + - .NET 7.0.200 SDK and later + + If you specify the `--output` option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. The `--output` option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. For more information, see [Solution-level `--output` option no longer valid for build-related commands](../compatibility/sdk/7.0/solution-level-output-no-longer-valid.md). + - .NET Core 3.x SDK and later If you specify a relative path when publishing a project, the generated output directory is relative to the current working directory, not to the project file location. diff --git a/docs/core/tools/dotnet-sdk-check.md b/docs/core/tools/dotnet-sdk-check.md index cdc5a599f0932..a694053d7ea29 100644 --- a/docs/core/tools/dotnet-sdk-check.md +++ b/docs/core/tools/dotnet-sdk-check.md @@ -30,29 +30,26 @@ Here's an example of output from the command: ```output .NET SDKs: -Version Status ------------------------------------------------------------ -2.1.816 Up to date. -2.2.401 .NET 2.2 is out of support. -3.1.410 Up to date. -5.0.204 Up to date. -5.0.301 Up to date. +Version Status +---------------------------------------- +3.1.426 .NET 3.1 is out of support. +7.0.103 Up to date. +7.0.200 Patch 7.0.201 is available. .NET Runtimes: -Name Version Status -------------------------------------------------------------------------------------------- -Microsoft.AspNetCore.All 2.1.28 Up to date. -Microsoft.AspNetCore.App 2.1.28 Up to date. -Microsoft.NETCore.App 2.1.28 Up to date. -Microsoft.AspNetCore.All 2.2.6 .NET 2.2 is out of support. -Microsoft.AspNetCore.App 2.2.6 .NET 2.2 is out of support. -Microsoft.NETCore.App 2.2.6 .NET 2.2 is out of support. -Microsoft.AspNetCore.App 3.1.16 Up to date. -Microsoft.NETCore.App 3.1.16 Up to date. -Microsoft.WindowsDesktop.App 3.1.16 Up to date. -Microsoft.AspNetCore.App 5.0.7 Up to date. -Microsoft.NETCore.App 5.0.7 Up to date. -Microsoft.WindowsDesktop.App 5.0.7 Up to date. +Name Version Status +-------------------------------------------------------------------------- +Microsoft.AspNetCore.App 5.0.17 .NET 5.0 is out of support. +Microsoft.NETCore.App 5.0.17 .NET 5.0 is out of support. +Microsoft.WindowsDesktop.App 5.0.17 .NET 5.0 is out of support. +Microsoft.NETCore.App 6.0.10 Patch 6.0.14 is available. +Microsoft.NETCore.App 6.0.11 Patch 6.0.14 is available. +Microsoft.NETCore.App 6.0.13 Patch 6.0.14 is available. +Microsoft.AspNetCore.App 7.0.3 Up to date. +Microsoft.NETCore.App 7.0.3 Up to date. +Microsoft.WindowsDesktop.App 7.0.3 Up to date. + +The latest versions of .NET can be installed from https://aka.ms/dotnet-core-download. For more information about .NET lifecycles, see https://aka.ms/dotnet-core-support. ``` ## Options diff --git a/docs/core/tools/dotnet-test.md b/docs/core/tools/dotnet-test.md index d91697b19bd89..836e761021db3 100644 --- a/docs/core/tools/dotnet-test.md +++ b/docs/core/tools/dotnet-test.md @@ -196,6 +196,10 @@ Where `Microsoft.NET.Test.Sdk` is the test host, `xunit` is the test framework. Directory in which to find the binaries to run. If not specified, the default path is `./bin///`. For projects with multiple target frameworks (via the `TargetFrameworks` property), you also need to define `--framework` when you specify this option. `dotnet test` always runs tests from the output directory. You can use to consume test assets in the output directory. + - .NET 7.0.200 SDK and later + + If you specify the `--output` option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. The `--output` option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. For more information, see [Solution-level `--output` option no longer valid for build-related commands](../compatibility/sdk/7.0/solution-level-output-no-longer-valid.md). + [!INCLUDE [os](../../../includes/cli-os.md)] - **`--results-directory `** diff --git a/docs/core/tools/dotnet-watch.md b/docs/core/tools/dotnet-watch.md index c154d25ce9302..f7d3dbb75b958 100644 --- a/docs/core/tools/dotnet-watch.md +++ b/docs/core/tools/dotnet-watch.md @@ -146,6 +146,10 @@ As an alternative to disabling response compression, manually add the browser re - **`DOTNET_WATCH_SUPPRESS_STATIC_FILE_HANDLING`** When set to `1` or `true`, `dotnet watch` won't do special handling for static content files. `dotnet watch` sets MSBuild property `DotNetWatchContentFiles` to `false`. + +- **`DOTNET_WATCH_RESTART_ON_RUDE_EDIT`** + + When set to `1` or `true`, `dotnet watch` will always restart on rude edits instead of asking. ## Files watched by default diff --git a/docs/core/tools/global-tools-how-to-create.md b/docs/core/tools/global-tools-how-to-create.md index 12090ac926460..8cad5f15dc3ca 100644 --- a/docs/core/tools/global-tools-how-to-create.md +++ b/docs/core/tools/global-tools-how-to-create.md @@ -63,7 +63,7 @@ This is the first in a series of three tutorials. In this tutorial, you create a ```csharp using System.Reflection; - namespace TeleprompterConsole; + namespace microsoft.botsay; internal class Program { @@ -74,6 +74,8 @@ This is the first in a series of three tutorials. In this tutorial, you create a } ``` + The `using System.Reflection;` directive is needed by code that you add in the next step. + 1. Replace the `Main` method with the following code to process the command-line arguments for the application. ```csharp diff --git a/docs/core/tools/nuget-signed-package-verification.md b/docs/core/tools/nuget-signed-package-verification.md index e474aa90546e6..1336eb1e90e24 100644 --- a/docs/core/tools/nuget-signed-package-verification.md +++ b/docs/core/tools/nuget-signed-package-verification.md @@ -6,11 +6,11 @@ ms.date: 11/07/2022 --- # NuGet signed-package verification -You can [sign a NuGet package](/nuget/create-packages/sign-a-package) to enable the package consumer to validate the package's authenticity and integrity. If verification is enabled, .NET verifies signed packages during a package restore operation, which occurs automatically when the consumer builds or runs their project. +You can [sign a NuGet package](/nuget/create-packages/sign-a-package) to enable package consumers to validate the package's authenticity and integrity. If verification is enabled, .NET verifies signed packages during a package restore operation, which occurs automatically when a package consumer builds or runs their project. -NuGet package signatures are based on X.509 certificates, and a prerequisite for signed-package verification is a certificate root store that's valid for both code signing and timestamping. +NuGet package signatures are based on X.509 certificates, and a prerequisite for signed-package verification is a certificate root store that is valid for both code signing and timestamping. -Starting with .NET 7, NuGet uses fallback certificate bundles included in the .NET SDK to verify signed packages where a suitable system root store is not available. These bundles are sourced from the [Microsoft Trusted Root Program](/security/trusted-root/program-requirements) and contain the same code signing and timestamping certificates as the root store on Windows. +Starting with .NET 7, NuGet uses certificate bundles included in the .NET SDK to verify signed packages where a suitable system root store is not available. These bundles are sourced from the [Microsoft Trusted Root Program](/security/trusted-root/program-requirements) and contain the same code signing and timestamping certificates as the root store on Windows. These certificate bundles should contain all of the root certificates necessary to verify packages from [NuGet.org](https://nuget.org). Some NuGet commands, such as `sign` and `verify`, always perform signed package verification. @@ -24,25 +24,29 @@ The following sections for each operating system describe: Verification is enabled by default during package restore operations. -NuGet uses the default root store on Windows, which already supports general-purpose code signing and timestamping. .NET SDK fallback certificate bundles aren't used. +NuGet uses the default root store on Windows, which already supports general-purpose code signing and timestamping. .NET SDK certificate bundles aren't used. ## Linux -Prior to .NET 8 SDK, verification is disabled by default during package restore operations. To opt in, set the environment variable `DOTNET_NUGET_SIGNATURE_VERIFICATION` to `true`. +Verification is disabled by default during package restore operations. To opt in, set the environment variable `DOTNET_NUGET_SIGNATURE_VERIFICATION` to `true`. -Starting with .NET 8 SDK, verification is enabled by default. To opt out, set the environment variable `DOTNET_NUGET_SIGNATURE_VERIFICATION` to `false`. - -NuGet uses .NET SDK fallback certificate bundles by default. You can override the code signing fallback certificate bundle by providing a certificate bundle valid for code signing at the following probe path: +For code signing certificate verification, NuGet will first probe for a certificate bundle at the following location: ```text /etc/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem ``` +If a valid certificate bundle is found, NuGet will prefer it over the .NET SDK's certificate bundle for code signing. If it contains at least the same set of root certificates as the .NET SDK's certificate bundle, then NuGet signed package verification should succeed. If it lacks root certificates, like those used in signed packages on [NuGet.org](https://nuget.org), NuGet signed package verification will fail with an untrusted status (via [NU3018](/nuget/reference/errors-and-warnings/nu3018) or [NU3028](/nuget/reference/errors-and-warnings/nu3028)). Adding root certificates to this certificate bundle can enable successful verification; however, keep in mind that this certificate bundle is a system-wide trust store, whereas .NET SDK certificate bundles are used as an application-wide trust store. + +If a valid certificate bundle is not found at the above location, NuGet will fall back to using the .NET SDK's certificate bundle for code signing. + +For timestamping certificate verification, NuGet always uses the .NET SDK's certificate bundle for timestamping. + ## macOS Verification is disabled by default during package restore operations. To opt in, set the environment variable `DOTNET_NUGET_SIGNATURE_VERIFICATION` to `true`. However, we recommend that you don't enable verification. For more information, see [NuGet/Home#11985](https://github.com/NuGet/Home/issues/11985) and [NuGet/Home#11986](https://github.com/NuGet/Home/issues/11986). -NuGet uses only .NET SDK fallback certificate bundles. +NuGet uses only the .NET SDK's certificate bundles. ## See also diff --git a/docs/core/tools/sdk-errors/netsdk1045.md b/docs/core/tools/sdk-errors/netsdk1045.md index cf5304541d6c1..2130f1c0c33b4 100644 --- a/docs/core/tools/sdk-errors/netsdk1045.md +++ b/docs/core/tools/sdk-errors/netsdk1045.md @@ -44,6 +44,14 @@ If you have a preview installed of the requested .NET SDK version, you also need For example, .NET Core 3.0 and later require Visual Studio 2019. Upgrade to [Visual Studio 2019 version 16.3](https://visualstudio.microsoft.com/downloads) or later to build your project. +## Visual Studio for Mac + +VS for Mac supports both `dotnet msbuild` and MSBuild on Mono. But the .NET SDK version is downgraded when MSBuild on Mono is used, and this can result in the NETSDK1045 error. + +Open the **Solution Properties** window (ctrl-click the solution in the **Solution** window and select **Properties**), select **Build - General**, and uncheck **Build with MSBuild on Mono**. This **Build with MSBuild on Mono** option will be checked if there are any classic projects in the solution, and this can cause problems since Mono does not support the later .NET SDKs. + +For more information about which Visual Studio for Mac 2022 versions support which .NET versions, see [Supported versions of .NET](/visualstudio/mac/supported-versions-net). + ## PATH environment variable The build tools use the PATH environment variable to find the right version of the .NET build tools. If the PATH environment variable contains direct paths to older build tools, this error message could appear. Make sure the only path to the .NET tools in the PATH environment variable is to the top-level *dotnet* folder, for example, *C:\Program Files\dotnet*. An example of an incorrect PATH would be something like *C:\Program Files\dotnet\2.1.0\sdks*. diff --git a/docs/core/tools/sdk-errors/netsdk1082.md b/docs/core/tools/sdk-errors/netsdk1082.md index 019c95ebe5651..b9b5b3148d234 100644 --- a/docs/core/tools/sdk-errors/netsdk1082.md +++ b/docs/core/tools/sdk-errors/netsdk1082.md @@ -6,7 +6,7 @@ ms.date: 07/08/2022 f1_keywords: - NETSDK1082 --- -# NETSDK1082: PackageReference to Microsoft.AspNetCore.App is not necessary +# NETSDK1082: There was no runtime pack available NETSDK1082 warns you that the runtime pack for your [runtime identifier](../../rid-catalog.md) (RID) could not be found in your NuGet feed. The full error message is similar to the following example: diff --git a/docs/core/tools/telemetry.md b/docs/core/tools/telemetry.md index 0e8680f3cb4de..e123a607d0575 100644 --- a/docs/core/tools/telemetry.md +++ b/docs/core/tools/telemetry.md @@ -24,7 +24,7 @@ Telemetry *is collected* when using any of the [.NET CLI commands](index.md), su ## How to opt out -The .NET SDK telemetry feature is enabled by default. To opt out of the telemetry feature, set the `DOTNET_CLI_TELEMETRY_OPTOUT` environment variable to `1` or `true`. +The .NET SDK telemetry feature is enabled by default for Microsoft distributions of the SDK. To opt out of the telemetry feature, set the `DOTNET_CLI_TELEMETRY_OPTOUT` environment variable to `1` or `true`. A single telemetry entry is also sent by the .NET SDK installer when a successful installation happens. To opt out, set the `DOTNET_CLI_TELEMETRY_OPTOUT` environment variable before you install the .NET SDK. @@ -47,7 +47,7 @@ To disable this message and the .NET welcome message, set the `DOTNET_NOLOGO` en ## Data points -The telemetry feature doesn't collect personal data, such as usernames or email addresses. It doesn't scan your code and doesn't extract project-level data, such as name, repository, or author. The data is sent securely to Microsoft servers using [Azure Monitor](https://azure.microsoft.com/services/monitor/) technology, held under restricted access, and published under strict security controls from secure [Azure Storage](https://azure.microsoft.com/services/storage/) systems. +The telemetry feature doesn't collect personal data, such as usernames or email addresses. It doesn't scan your code and doesn't extract project-level data, such as name, repository, or author. It doesn't extract the contents of any data files accessed or created by your apps, dumps of any memory occupied by your apps' objects, or the contents of the clipboard. The data is sent securely to Microsoft servers using [Azure Monitor](https://azure.microsoft.com/services/monitor/) technology, held under restricted access, and published under strict security controls from secure [Azure Storage](https://azure.microsoft.com/services/storage/) systems. Protecting your privacy is important to us. If you suspect the telemetry is collecting sensitive data or the data is being insecurely or inappropriately handled, file an issue in the [dotnet/sdk](https://github.com/dotnet/sdk/issues) repository or send an email to [dotnet@microsoft.com](mailto:dotnet@microsoft.com) for investigation. diff --git a/docs/core/tutorials/cli-templates-create-item-template.md b/docs/core/tutorials/cli-templates-create-item-template.md index 7bbdfae1bb4e9..22eefa5dde620 100644 --- a/docs/core/tutorials/cli-templates-create-item-template.md +++ b/docs/core/tutorials/cli-templates-create-item-template.md @@ -34,6 +34,8 @@ In this part of the series, you'll learn how to: * Open a terminal and navigate to the _working\templates_ folder. +[!INCLUDE [dotnet6-syntax-note](includes/dotnet6-syntax-note.md)] + ## Create the required folders This series uses a "working folder" where your template source is contained and a "testing folder" used to test your templates. The working folder and testing folder should be under the same parent folder. diff --git a/docs/core/tutorials/cli-templates-create-project-template.md b/docs/core/tutorials/cli-templates-create-project-template.md index 93d2a3004c088..b66397adc30e6 100644 --- a/docs/core/tutorials/cli-templates-create-project-template.md +++ b/docs/core/tutorials/cli-templates-create-project-template.md @@ -44,6 +44,8 @@ In this part of the series you'll learn how to: * Complete [part 1](cli-templates-create-item-template.md) of this tutorial series. * Open a terminal and navigate to the _working\templates_ folder. +[!INCLUDE [dotnet6-syntax-note](includes/dotnet6-syntax-note.md)] + ## Create a project template Project templates produce ready-to-run projects that make it easy for users to start with a working set of code. .NET includes a few project templates such as a console application or a class library. In this example, you'll create a new console project that replaces the standard "Hello World" console output with one that runs asynchronously. diff --git a/docs/core/tutorials/cli-templates-create-template-package.md b/docs/core/tutorials/cli-templates-create-template-package.md index 94ba8c6adfd95..fe29529c6753c 100644 --- a/docs/core/tutorials/cli-templates-create-template-package.md +++ b/docs/core/tutorials/cli-templates-create-template-package.md @@ -30,11 +30,13 @@ In this part of the series you'll learn how to: * Open a terminal and navigate to the _working\\_ folder. +[!INCLUDE [dotnet6-syntax-note](includes/dotnet6-syntax-note.md)] + ## Create a template package project A template package is one or more templates packaged into a NuGet package. When you install or uninstall a template package, all templates contained in the package are added or removed, respectively. The previous parts of this tutorial series only worked with individual templates. To share a non-packed template, you have to copy the template folder and install via that folder. Because a template package can have more than one template in it, and is a single file, sharing is easier. -Template packages are represented by a NuGet package (_.nupkg_) file. And, like any NuGet package, you can upload the template package to a NuGet feed. The `dotnet new --install` command supports installing template package from a NuGet package feed. Additionally, you can install a template package from a _.nupkg_ file directly. +Template packages are represented by a NuGet package (_.nupkg_) file. And, like any NuGet package, you can upload the template package to a NuGet feed. The `dotnet new install` command supports installing template package from a NuGet package feed. Additionally, you can install a template package from a _.nupkg_ file directly. Normally you use a C# project file to compile code and produce a binary. However, the project can also be used to generate a template package. By changing the settings of the _.csproj_, you can prevent it from compiling any code and instead include all the assets of your templates as resources. When this project is built, it produces a template package NuGet package. @@ -96,7 +98,7 @@ The settings under `` in the XML snippet are broken into three gr The first group deals with properties required for a NuGet package. The three `` settings have to do with the NuGet package properties to identify your package on a NuGet feed. Specifically the `` value is used to uninstall the template package with a single name instead of a directory path. It can also be used to install the template package from a NuGet feed. The remaining settings, such as `` and `<PackageTags>`, have to do with metadata displayed on the NuGet feed. For more information about NuGet settings, see [NuGet and MSBuild properties](/nuget/reference/msbuild-targets). > [!NOTE] -> To ensure that the template package appears in `dotnet new --search` results, set `<PackageType>` to `Template`. +> To ensure that the template package appears in `dotnet new search` results, set `<PackageType>` to `Template`. In the second group, the `<TargetFramework>` setting ensures that MSBuild executes properly when you run the pack command to compile and pack the project. @@ -177,7 +179,7 @@ Currently installed items: dotnet new uninstall AdatumCorporation.Utility.Templates ``` -Run `dotnet new uninstall AdatumCorporation.Utility.Templates` to uninstall the template package. The command will output information about what template packages were uninstalled. +Run `dotnet new uninstall AdatumCorporation.Utility.Templates` to uninstall the template package. The command will output information about what template packages were uninstalled. Congratulations! You've installed and uninstalled a template package. diff --git a/docs/core/tutorials/debugging-with-visual-studio-code.md b/docs/core/tutorials/debugging-with-visual-studio-code.md index 3abe51018cdf9..c5117105ef4c0 100644 --- a/docs/core/tutorials/debugging-with-visual-studio-code.md +++ b/docs/core/tutorials/debugging-with-visual-studio-code.md @@ -2,7 +2,7 @@ title: Debug a .NET console application using Visual Studio Code description: Learn how to debug a .NET console app using Visual Studio Code. ms.date: 11/11/2022 -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-version-6-7 recommendations: false --- # Tutorial: Debug a .NET console application using Visual Studio Code @@ -424,9 +424,3 @@ In this tutorial, you used Visual Studio Code debugging tools. In the next tutor > [Publish a .NET console application using Visual Studio Code](publishing-with-visual-studio-code.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 6 and .NET 7. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/tutorials/debugging-with-visual-studio-mac.md b/docs/core/tutorials/debugging-with-visual-studio-mac.md index 591fe0c598368..23321397fe693 100644 --- a/docs/core/tutorials/debugging-with-visual-studio-mac.md +++ b/docs/core/tutorials/debugging-with-visual-studio-mac.md @@ -1,7 +1,7 @@ --- title: Debug a .NET console application using Visual Studio for Mac description: Learn how to debug a .NET console app using Visual Studio Mac. -ms.date: 11/30/2020 +ms.date: 01/28/2023 recommendations: false --- # Tutorial: Debug a .NET console application using Visual Studio for Mac @@ -32,13 +32,13 @@ By default, Visual Studio for Mac uses the Debug build configuration, so you don A *breakpoint* temporarily interrupts the execution of the application before the line with the breakpoint is executed. -1. Set a breakpoint on the line that displays the name, date, and time. To do that, place the cursor in the line of code and press <kbd>⌘</kbd><kbd>\\</kbd> (<kbd>command</kbd>+<kbd>\\</kbd>). Another way to set a breakpoint is by selecting **Run** > **Toggle Breakpoint** from the menu. +1. Set a breakpoint on the line that displays the name, date, and time. To do that, place the cursor in the line of code and press <kbd>⌘</kbd><kbd>\\</kbd> (<kbd>command</kbd>+<kbd>\\</kbd>). Another way to set a breakpoint is by selecting **Debug** > **Toggle Breakpoint** from the menu. Visual Studio indicates the line on which the breakpoint is set by highlighting it and displaying a red dot in the left margin. :::image type="content" source="media/debugging-with-visual-studio-mac/set-breakpoint-in-editor.png" alt-text="Visual Studio Program window with breakpoint set"::: -1. Press <kbd>⌘</kbd><kbd>↵</kbd> (<kbd>command</kbd>+<kbd>enter</kbd>) to start the program in debugging mode. Another way to start debugging is by choosing **Run** > **Start Debugging** from the menu. +1. Press <kbd>⌘</kbd><kbd>↵</kbd> (<kbd>command</kbd>+<kbd>enter</kbd>) to start the program in debugging mode. Another way to start debugging is by choosing **Debug** > **Start Debugging** from the menu. 1. Enter a string in the terminal window when the program prompts for a name, and then press <kbd>enter</kbd>. @@ -50,7 +50,7 @@ A *breakpoint* temporarily interrupts the execution of the application before th The **Immediate** window lets you interact with the application you're debugging. You can interactively change the value of variables to see how it affects your program. -1. If the **Immediate** window is not visible, display it by choosing **View** > **Debug Pads** > **Immediate**. +1. If the **Immediate** window is not visible, display it by choosing **View** > **Debug Windows** > **Immediate**. 1. Enter `name = "Gracie"` in the **Immediate** window and press <kbd>enter</kbd>. @@ -112,7 +112,7 @@ The program displays a string that the user enters. What happens if the user doe 1. Close the terminal window. -1. Clear the breakpoint by clicking on the red dot in the left margin of the code window. Another way to clear a breakpoint is by choosing **Run > Toggle Breakpoint** while the line of code is selected. +1. Clear the breakpoint by clicking on the red dot in the left margin of the code window. Another way to clear a breakpoint is by choosing **Debug > Toggle Breakpoint** while the line of code is selected. ## Step through a program @@ -124,7 +124,7 @@ Visual Studio also allows you to step line by line through a program and monitor Visual Studio stops on the line with the breakpoint. -1. Press <kbd>⇧</kbd><kbd>⌘</kbd><kbd>I</kbd> (<kbd>shift</kbd>+<kbd>command</kbd>+<kbd>I</kbd>) or select **Run** > **Step Into** to advance one line. +1. Press <kbd>⇧</kbd><kbd>⌘</kbd><kbd>I</kbd> (<kbd>shift</kbd>+<kbd>command</kbd>+<kbd>I</kbd>) or select **Debug** > **Step Into** to advance one line. Visual Studio highlights and displays an arrow beside the next line of execution. diff --git a/docs/core/tutorials/debugging-with-visual-studio.md b/docs/core/tutorials/debugging-with-visual-studio.md index a7717b395fd08..f393d36737338 100644 --- a/docs/core/tutorials/debugging-with-visual-studio.md +++ b/docs/core/tutorials/debugging-with-visual-studio.md @@ -2,7 +2,7 @@ title: Debug a .NET console application using Visual Studio description: Learn how to debug a .NET console app using Visual Studio. ms.date: 11/30/2022 -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-version-6-7 dev_langs: - "csharp" - "vb" @@ -371,9 +371,3 @@ In this tutorial, you used Visual Studio debugging tools. In the next tutorial, > [Publish a .NET console application using Visual Studio](publishing-with-visual-studio.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 6 and .NET 7. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/tutorials/includes/dotnet6-syntax-note.md b/docs/core/tutorials/includes/dotnet6-syntax-note.md new file mode 100644 index 0000000000000..cb845fbf29188 --- /dev/null +++ b/docs/core/tutorials/includes/dotnet6-syntax-note.md @@ -0,0 +1,11 @@ +--- +author: adegeo +ms.author: adegeo +ms.date: 03/14/2023 +ms.topic: include +--- + +> [!IMPORTANT] +> This article is written for .NET 7. However, it also applies to .NET 6 and previous versions, with one difference: The `dotnet new` syntax is different. The `list`, `search`, `install`, and `uninstall` subcommands should be `--list`, `--search`, `--install`, and `--uninstall` options, respectively. +> +> For example, the `dotnet new install` command in .NET 7 becomes `dotnet new --install` in .NET 6. Use the `dotnet new --help` command to see a list of all options and subcommands. diff --git a/docs/core/tutorials/library-with-visual-studio-code.md b/docs/core/tutorials/library-with-visual-studio-code.md index 532f9173ca799..f7c304e9c4b38 100644 --- a/docs/core/tutorials/library-with-visual-studio-code.md +++ b/docs/core/tutorials/library-with-visual-studio-code.md @@ -2,7 +2,7 @@ title: Create a .NET class library using Visual Studio Code description: Learn how to create a .NET class library using Visual Studio Code. ms.date: 11/11/2022 -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-version-6-7 recommendations: false --- # Tutorial: Create a .NET class library using Visual Studio Code @@ -436,9 +436,3 @@ In this tutorial, you created a solution, added a library project, and added a c > [Test a .NET class library with .NET using Visual Studio Code](testing-library-with-visual-studio-code.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 6 and .NET 7. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/tutorials/library-with-visual-studio.md b/docs/core/tutorials/library-with-visual-studio.md index 142ab2de8ba4f..6704e2febdfae 100644 --- a/docs/core/tutorials/library-with-visual-studio.md +++ b/docs/core/tutorials/library-with-visual-studio.md @@ -2,7 +2,7 @@ title: Create a .NET class library using Visual Studio description: Learn how to create a .NET class library using Visual Studio. ms.date: 11/11/2022 -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-version-6-7 dev_langs: - "csharp" - "vb" @@ -282,9 +282,3 @@ Or learn how to publish a console app. If you publish the console app from the s > [Publish a .NET console application using Visual Studio](publishing-with-visual-studio.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 6 and .NET 7. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/tutorials/media/with-visual-studio/create-new-project.png b/docs/core/tutorials/media/with-visual-studio/create-new-project.png index a861144e0811e..840627a3a1187 100644 Binary files a/docs/core/tutorials/media/with-visual-studio/create-new-project.png and b/docs/core/tutorials/media/with-visual-studio/create-new-project.png differ diff --git a/docs/core/tutorials/publishing-with-visual-studio-code.md b/docs/core/tutorials/publishing-with-visual-studio-code.md index dcf9463127f4c..497aad83be9bb 100644 --- a/docs/core/tutorials/publishing-with-visual-studio-code.md +++ b/docs/core/tutorials/publishing-with-visual-studio-code.md @@ -2,7 +2,7 @@ title: Publish a .NET console application using Visual Studio Code description: Learn how to use Visual Studio Code and the .NET CLI to create the set of files that are needed to run a .NET application. ms.date: 12/19/2022 -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-version-6-7 recommendations: false --- # Tutorial: Publish a .NET console application using Visual Studio Code @@ -224,9 +224,3 @@ In this tutorial, you published a console app. In the next tutorial, you create > [Create a .NET class library using Visual Studio Code](library-with-visual-studio-code.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 6 and .NET 7. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/tutorials/publishing-with-visual-studio.md b/docs/core/tutorials/publishing-with-visual-studio.md index 08803f15113bc..e61247ea46f81 100644 --- a/docs/core/tutorials/publishing-with-visual-studio.md +++ b/docs/core/tutorials/publishing-with-visual-studio.md @@ -2,7 +2,7 @@ title: Publish a .NET console application using Visual Studio description: Learn how to use Visual Studio to create the set of files that are needed to run a .NET application. ms.date: 12/19/2022 -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-version-6-7 dev_langs: - "csharp" - "vb" @@ -234,9 +234,3 @@ In this tutorial, you published a console app. In the next tutorial, you create > [Create a .NET class library using Visual Studio](library-with-visual-studio.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 5 and .NET 6. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/tutorials/snippets/library-with-visual-studio-6-0/csharp/StringLibraryTest/StringLibraryTest.csproj b/docs/core/tutorials/snippets/library-with-visual-studio-6-0/csharp/StringLibraryTest/StringLibraryTest.csproj index 329cadcd7a381..cf1e2b46a03d0 100644 --- a/docs/core/tutorials/snippets/library-with-visual-studio-6-0/csharp/StringLibraryTest/StringLibraryTest.csproj +++ b/docs/core/tutorials/snippets/library-with-visual-studio-6-0/csharp/StringLibraryTest/StringLibraryTest.csproj @@ -8,7 +8,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="MSTest.TestAdapter" Version="3.0.2" /> <PackageReference Include="MSTest.TestFramework" Version="3.0.2" /> <PackageReference Include="coverlet.collector" Version="3.2.0" /> diff --git a/docs/core/tutorials/snippets/library-with-visual-studio/csharp/StringLibraryTest/StringLibraryTest.csproj b/docs/core/tutorials/snippets/library-with-visual-studio/csharp/StringLibraryTest/StringLibraryTest.csproj index 01d34f244d5cd..9c01c12015733 100644 --- a/docs/core/tutorials/snippets/library-with-visual-studio/csharp/StringLibraryTest/StringLibraryTest.csproj +++ b/docs/core/tutorials/snippets/library-with-visual-studio/csharp/StringLibraryTest/StringLibraryTest.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="MSTest.TestAdapter" Version="3.0.2" /> <PackageReference Include="MSTest.TestFramework" Version="3.0.2" /> <PackageReference Include="coverlet.collector" Version="3.2.0"> diff --git a/docs/core/tutorials/snippets/library-with-visual-studio/vb/StringLibraryTest/StringLibraryTest.vbproj b/docs/core/tutorials/snippets/library-with-visual-studio/vb/StringLibraryTest/StringLibraryTest.vbproj index 2fdaaa6728b76..f7e6e4e209c8f 100644 --- a/docs/core/tutorials/snippets/library-with-visual-studio/vb/StringLibraryTest/StringLibraryTest.vbproj +++ b/docs/core/tutorials/snippets/library-with-visual-studio/vb/StringLibraryTest/StringLibraryTest.vbproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="MSTest.TestAdapter" Version="3.0.2" /> <PackageReference Include="MSTest.TestFramework" Version="3.0.2" /> <PackageReference Include="coverlet.collector" Version="3.2.0" /> diff --git a/docs/core/tutorials/testing-library-with-visual-studio-code.md b/docs/core/tutorials/testing-library-with-visual-studio-code.md index f41b2be9d48d9..af8ebdb99f9de 100644 --- a/docs/core/tutorials/testing-library-with-visual-studio-code.md +++ b/docs/core/tutorials/testing-library-with-visual-studio-code.md @@ -2,7 +2,7 @@ title: Test a .NET class library using Visual Studio Code description: Learn how to use Visual Studio Code and the .NET CLI to create and run a unit test project for a .NET class library. ms.date: 11/11/2022 -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-version-6-7 recommendations: false --- # Tutorial: Test a .NET class library using Visual Studio Code @@ -374,9 +374,3 @@ A library doesn't have to be distributed as a package. It can be bundled with a > [Publish a .NET console application using Visual Studio Code](publishing-with-visual-studio-code.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 6 and .NET 7. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/tutorials/testing-library-with-visual-studio.md b/docs/core/tutorials/testing-library-with-visual-studio.md index 911b2583cb075..92a258f79bca6 100644 --- a/docs/core/tutorials/testing-library-with-visual-studio.md +++ b/docs/core/tutorials/testing-library-with-visual-studio.md @@ -2,7 +2,7 @@ title: Test a .NET class library using Visual Studio description: Learn how to use Visual Studio to create and run a unit test project for a .NET class library. ms.date: 11/11/2022 -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-version-6-7 dev_langs: - "csharp" - "vb" @@ -216,9 +216,3 @@ A library doesn't have to be distributed as a package. It can be bundled with a > [Publish a .NET console application using Visual Studio](publishing-with-visual-studio.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 6 and .NET 7. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/tutorials/top-level-templates.md b/docs/core/tutorials/top-level-templates.md index bc9faf07b09f8..4fd75af7ec788 100644 --- a/docs/core/tutorials/top-level-templates.md +++ b/docs/core/tutorials/top-level-templates.md @@ -140,7 +140,3 @@ class Program > The content of the `Program.cs` file might be different to match the code style defined in the global Visual Studio text editor settings or the `EditorConfig` file. > > For more information, see [Create portable, custom editor settings with EditorConfig](/visualstudio/ide/create-portable-custom-editor-options) and [Options, Text Editor, C#, Advanced](/visualstudio/ide/reference/options-text-editor-csharp-advanced). - -## Template feedback - -[Top-level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) was introduced in .NET 6. Add an up or down vote in [GitHub issue #27420](https://github.com/dotnet/docs/issues/27420) to let us know if you support the use of this feature in project templates. diff --git a/docs/core/tutorials/with-visual-studio-code.md b/docs/core/tutorials/with-visual-studio-code.md index 0747c2bcbc7fc..46a3c6cb5bbb8 100644 --- a/docs/core/tutorials/with-visual-studio-code.md +++ b/docs/core/tutorials/with-visual-studio-code.md @@ -2,7 +2,7 @@ title: Create a .NET console application using Visual Studio Code description: Learn how to create a .NET console application using Visual Studio Code and the .NET CLI. ms.date: 11/11/2022 -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-version-6-7 recommendations: false --- # Tutorial: Create a .NET console application using Visual Studio Code @@ -247,9 +247,3 @@ In this tutorial, you created a .NET console application. In the next tutorial, > [Debug a .NET console application using Visual Studio Code](debugging-with-visual-studio-code.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 6 and .NET 7. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/tutorials/with-visual-studio.md b/docs/core/tutorials/with-visual-studio.md index 0d3b51cca8768..ab8012e045356 100644 --- a/docs/core/tutorials/with-visual-studio.md +++ b/docs/core/tutorials/with-visual-studio.md @@ -1,8 +1,8 @@ --- title: Create a .NET console application using Visual Studio description: Learn how to create a .NET console application with C# or Visual Basic using Visual Studio. -ms.date: 11/11/2022 -zone_pivot_groups: dotnet-version +ms.date: 01/28/2023 +zone_pivot_groups: dotnet-version-6-7 dev_langs: - "csharp" - "vb" @@ -31,7 +31,7 @@ Create a .NET console app project named "HelloWorld". :::image type="content" source="./media/with-visual-studio/start-window-2022.png" alt-text="Create a new project button selected on the Visual Studio start page"::: -1. On the **Create a new project** page, enter **console** in the search box. Next, choose **C#** or **Visual Basic** from the language list, and then choose **All platforms** from the platform list. Choose the **Console Application** template, and then choose **Next**. +1. On the **Create a new project** page, enter **console** in the search box. Next, choose **C#** or **Visual Basic** from the language list, and then choose **All platforms** from the platform list. Choose the **Console App** template, and then choose **Next**. :::image type="content" source="./media/with-visual-studio/create-new-project.png" alt-text="Create a new project window with filters selected"::: @@ -47,7 +47,7 @@ Create a .NET console app project named "HelloWorld". * Select **Do not use top-level statements**. * Select **Create**. - The template creates a simple application that displays "Hello World" in the console window. The code is in the *Program.cs* or *Program.vb* file: + The template creates a simple application that displays "Hello, World!" in the console window. The code is in the *Program.cs* or *Program.vb* file: ```csharp namespace HelloWorld; @@ -81,7 +81,7 @@ Create a .NET console app project named "HelloWorld". 1. Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> to run the program without debugging. - A console window opens with the text "Hello World!" printed on the screen. + A console window opens with the text "Hello, World!" printed on the screen. (Or "Hello World!" without a comma in the Visual Basic project template.) :::image type="content" source="./media/with-visual-studio/hello-world-console-net6.png" alt-text="Console window showing Hello World Press any key to continue"::: @@ -242,9 +242,3 @@ In this tutorial, you created a .NET console application. In the next tutorial, > [Debug a .NET console application using Visual Studio](debugging-with-visual-studio.md) ::: zone-end - -::: zone pivot="dotnet-core-3-1,dotnet-5-0" - -This tutorial is only available for .NET 6 and .NET 7. Select one of those options at the top of the page. - -::: zone-end diff --git a/docs/core/versions/index.md b/docs/core/versions/index.md index febe59cbf11d3..e4da0c0d68482 100644 --- a/docs/core/versions/index.md +++ b/docs/core/versions/index.md @@ -82,6 +82,18 @@ Preview versions have a `-preview.[number].[build]` appended to the version numb After a release goes out, the release branches generally stop producing daily builds and instead start producing servicing builds. Servicing versions have a `-servicing-[number]` appended to the version. For example, `5.0.1-servicing-006924`. +## .NET runtime compatibility + +The .NET runtime maintains a high level of compatibility between versions. .NET apps should, by and large, continue to work after upgrading to a new major .NET runtime version. + +Each major .NET runtime version contains intentional, carefully vetted, and documented [breaking changes](../compatibility/breaking-changes.md). The documented breaking changes aren't the only source of issues that can affect an app after upgrade. For example, a performance improvement in the .NET runtime (that's not considered to be a breaking change) can expose latent app threading bugs that cause the app to not work on that version. It's expected for large apps to require a few fixes after upgrading to a new .NET runtime major version. + +By default, .NET apps are configured to run on a given .NET runtime major version, so recompilation is highly recommended to upgrade the app to run on a new .NET runtime major version. Then retest the app after upgrading to identify any issues. + +Suppose upgrading via app recompilation isn't feasible. In that case, the .NET runtime provides [additional settings](selection.md#control-roll-forward-behavior) to enable an app to run on a higher major .NET runtime version than the version it was compiled for. These settings don't change the risks involved in upgrading the app to a higher major .NET runtime version, and it's still required to retest the app post upgrade. + +The .NET runtime supports loading libraries that target older .NET runtime versions. An app upgraded to newer major .NET runtime version can reference libraries and NuGet packages that target older .NET runtime versions. It isn't necessary to simultaneously upgrade the target runtime version of all libraries and NuGet packages referenced by the app. + ## See also - [Target frameworks](../../standard/frameworks.md) diff --git a/docs/core/versions/selection.md b/docs/core/versions/selection.md index 1110b89073a0b..01aa8ab5cb504 100644 --- a/docs/core/versions/selection.md +++ b/docs/core/versions/selection.md @@ -100,6 +100,8 @@ It's possible that 5.0.3 and 5.1.0 behave differently, particularly for scenario ### Control roll-forward behavior +> Before overriding default roll-forward behavior, familiarize yourself with the level of [.NET runtime compatibility](index.md#net-runtime-compatibility). + The roll-forward behavior for an application can be configured in four different ways: 01. Project-level setting by setting the `<RollForward>` property: diff --git a/docs/core/whats-new/dotnet-7.md b/docs/core/whats-new/dotnet-7.md index f037eb68196af..0fce9f8fbba50 100644 --- a/docs/core/whats-new/dotnet-7.md +++ b/docs/core/whats-new/dotnet-7.md @@ -44,7 +44,7 @@ For information about these and other updates, see the [What's new in System.Tex .NET's [regular expression](../../standard/base-types/regular-expressions.md) library has seen significant functional and performance improvements in .NET 7: -- The new option <xref:System.Text.RegularExpressions.RegexOptions.NonBacktracking?displayProperty=nameWithType> enables matching using an approach that avoids backtracking and guarantees linear-time processing in the length of the input. The nonbacktracking engine can't be used in a right-to-left search and a has a few other restrictions, but is fast for all regular expressions and inputs. +- The new option <xref:System.Text.RegularExpressions.RegexOptions.NonBacktracking?displayProperty=nameWithType> enables matching using an approach that avoids backtracking and guarantees linear-time processing in the length of the input. The nonbacktracking engine can't be used in a right-to-left search and has a few other restrictions, but is fast for all regular expressions and inputs. - Regular expression source generators are new. Source generators build an engine that's optimized for *your* pattern at compile time, providing throughput performance benefits. The source that's emitted is part of your project, so you can view and debug it. In addition, a new source-generator diagnostic `SYSLIB1045` alerts you to places you use <xref:System.Text.RegularExpressions.Regex> that could be converted to the source generator. For more information, see [.NET regular expression source generators](../../standard/base-types/regular-expression-source-generators.md). @@ -167,7 +167,7 @@ WPF in .NET 7 includes numerous bug fixes as well as performance and accessibili ### Orleans -Orleans is a cross-platform framework for building robust, scalable distributed applications. For information about the latest updates for Orleans, see [What's new in Orleans 7.0](../../orleans/whats-new-in-orleans.md). +Orleans is a cross-platform framework for building robust, scalable distributed applications. For information about the latest updates for Orleans, see [Migrate from Orleans 3.x to 7.0](../../orleans/migration-guide.md). ### .NET Upgrade Assistant and CoreWCF diff --git a/docs/core/whats-new/dotnet-8.md b/docs/core/whats-new/dotnet-8.md new file mode 100644 index 0000000000000..3ffd28cabde38 --- /dev/null +++ b/docs/core/whats-new/dotnet-8.md @@ -0,0 +1,474 @@ +--- +title: What's new in .NET 8 +description: Learn about the new .NET features introduced in .NET 8. +titleSuffix: "" +ms.date: 04/10/2023 +ms.topic: overview +ms.author: gewarren +author: gewarren +--- +# What's new in .NET 8 + +.NET 8 is the successor to [.NET 7](dotnet-7.md). It will be [supported for three years](https://dotnet.microsoft.com/platform/support/policy/dotnet-core) as a long-term support (LTS) release. You can [download .NET 8 here](https://dotnet.microsoft.com/download/dotnet). + +This article has been updated for .NET 8 Preview 3. + +> [!IMPORTANT] +> +> - This information relates to a pre-release product that may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here. +> - Much of the other .NET documentation on <https://learn.microsoft.com> has not yet been updated for .NET 8. + +## .NET SDK changes + +This section contains the following subtopics: + +- [Simplified output paths](#simplified-output-paths) +- ['dotnet workload clean' command](#dotnet-workload-clean-command) +- ['dotnet publish' and 'dotnet pack' assets](#dotnet-publish-and-dotnet-pack-assets) + +### Simplified output paths + +.NET 8 Preview 3 introduces an option to simplify the output path and folder structure for build outputs. Previously, .NET apps produced a deep and complex set of output paths for different build artifacts. The new, simplified output path structure gathers all build outputs into a common location, which makes it easier for tooling to anticipate. + +To opt into the new output path format, set the `UseArtifactsOutput` property to `true` in your *Directory.Build.props* file. + +By default, the common location is a folder named *.artifacts* in the root of your repository rather than in each project folder. The folder structure under the root artifacts folder is as follows: + +```txt +.artifacts + |_<Type of output> + |_<Project name> + |_<Pivot> +``` + +The following table shows the default values for each level in the folder structure. The values, as well as the default location, can be overridden using properties in the *Directory.build.props* file. + +| Folder level | Description | +|---------|---------| +| Type of output | Examples: `bin`, `obj`, `publish`, or `package` | +| Project name | Separates output by each project. This level is omitted if no *Directory.build.props* file is found. | +| Pivot | Distinguishes between builds of a project for different configurations, target frameworks, and runtime identifiers. If multiple elements are needed, they're joined by an underscore (`_`). | + +For more information, see the [Simplified output paths](https://github.com/dotnet/designs/blob/simplify-output-paths-2/accepted/2023/simplify-output-paths.md) design proposal. + +### 'dotnet workload clean' command + +.NET 8 Preview 3 introduces a new command to clean up workload packs that might be left over through several .NET SDK or Visual Studio updates. If you encounter issues when managing workloads, consider using `workload clean` to safely restore to a known state before trying again. The command has two modes: + +- `dotnet workload clean` + + Runs [workload garbage collection](https://github.com/dotnet/designs/blob/main/accepted/2021/workloads/workload-installation.md#workload-pack-installation-records-and-garbage-collection) for file-based or MSI-based workloads, which cleans up orphaned packs. Orphaned packs are from uninstalled versions of the .NET SDK or packs where installation records for the pack no longer exist. + + If Visual Studio is installed, the command also lists any workloads that you should clean up manually using Visual Studio. + +- `dotnet workload clean --all` + + This mode is more aggressive and cleans every pack on the machine that's of the current SDK workload installation type (and that's not from Visual Studio). It also removes all workload installation records for the running .NET SDK feature band and below. + +### 'dotnet publish' and 'dotnet pack' assets + +Since the [`dotnet publish`](../tools/dotnet-publish.md) and [`dotnet pack`](../tools/dotnet-pack.md) commands are intended to produce production assets, they now produce `Release` assets by default. + +The following output shows the different behavior between `dotnet build` and `dotnet publish`, and how you can revert to publishing `Debug` assets by setting the `PublishRelease` property to `false`. + +```console +/app# dotnet new console +/app# dotnet build + app -> /app/bin/Debug/net8.0/app.dll +/app# dotnet publish + app -> /app/bin/Release/net8.0/app.dll + app -> /app/bin/Release/net8.0/publish/ +/app# dotnet publish -p:PublishRelease=false + app -> /app/bin/Debug/net8.0/app.dll + app -> /app/bin/Debug/net8.0/publish/ +``` + +For more information, see ['dotnet pack' uses Release config](../compatibility/sdk/8.0/dotnet-pack-config.md) and ['dotnet publish' uses Release config](../compatibility/sdk/8.0/dotnet-publish-config.md). + +## Serialization + +Various improvements have been made to <xref:System.Text.Json?displayProperty=fullName> serialization and deserialization functionality. + +- Performance and reliability enhancements of the [source generator](../../standard/serialization/system-text-json/source-generation.md) when used with ASP.NET Core in Native AOT apps. +- The [source generator](../../standard/serialization/system-text-json/source-generation.md) now supports serializing types with [`required`](../../standard/serialization/system-text-json/required-properties.md) and [`init`](../../csharp/language-reference/keywords/init.md) properties. These were both already supported in reflection-based serialization. +- [Customize handling of members that aren't in the JSON payload.](../../standard/serialization/system-text-json/missing-members.md) +- Support for serializing properties from interface hierarchies. The following code shows an example where the properties from both the immediately implemented interface and its base interface are serialized. + + ```csharp + IDerived value = new DerivedImplement { Base = 0, Derived =1 }; + JsonSerializer.Serialize(value); // {"Base":0,"Derived":1} + + public interface IBase + { + public int Base { get; set; } + } + + public interface IDerived : IBase + { + public int Derived { get; set; } + } + + public class DerivedImplement : IDerived + { + public int Base { get; set; } + public int Derived { get; set; } + } + ``` + +- [`JsonNamingPolicy`](/dotnet/api/system.text.json.jsonnamingpolicy?view=net-8.0&preserve-view=true#properties) includes new naming policies for `snake_case` (with an underscore) and `kebab-case` (with a hyphen) property name conversions. Use these policies similarly to the existing <xref:System.Text.Json.JsonNamingPolicy.CamelCase?displayProperty=nameWithType> policy: + + ```csharp + var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower }; + JsonSerializer.Serialize(new { PropertyName = "value" }, options); // { "property_name" : "value" } + ``` + +- <xref:System.Text.Json.JsonSerializerOptions.MakeReadOnly?displayProperty=nameWithType> gives you explicit control over when a `JsonSerializerOptions` instance is frozen. (You can also check it with the <xref:System.Text.Json.JsonSerializerOptions.IsReadOnly> property.) + +For more information about JSON serialization in general, see [JSON serialization and deserialization in .NET](../../standard/serialization/system-text-json/overview.md). + +## Core .NET libraries + +This section contains the following subtopics: + +- [Methods for working with randomness](#methods-for-working-with-randomness) +- [Performance-focused types](#performance-focused-types) +- [System.Numerics and System.Runtime.Intrinsics](#systemnumerics-and-systemruntimeintrinsics) +- [Data validation](#data-validation) + +### Methods for working with randomness + +The <xref:System.Random?displayProperty=fullName> and <xref:System.Security.Cryptography.RandomNumberGenerator?displayProperty=fullName> types introduce two new methods for working with randomness. + +#### GetItems\<T>() + +The new <xref:System.Random.GetItems%2A?displayProperty=fullName> and <xref:System.Security.Cryptography.RandomNumberGenerator.GetItems%2A?displayProperty=fullName> methods let you randomly choose a specified number of items from an input set. The following example shows how to use `System.Random.GetItems<T>()` (on the instance provided by the <xref:System.Random.Shared?displayProperty=nameWithType> property) to randomly insert 31 items into an array. This example could be used in a game of "Simon" where players must remember a sequence of colored buttons. + +```csharp +private static ReadOnlySpan<Button> s_allButtons = new[] +{ + Button.Red, + Button.Green, + Button.Blue, + Button.Yellow, +}; + +... + +Button[] thisRound = Random.Shared.GetItems(s_allButtons, 31); +// Rest of game goes here ... +``` + +#### Shuffle\<T>() + +The new <xref:System.Random.Shuffle%2A?displayProperty=nameWithType> and <xref:System.Security.Cryptography.RandomNumberGenerator.Shuffle%60%601(System.Span{%60%600})?displayProperty=nameWithType> methods let you randomize the order of a span. These methods are useful for reducing training bias in machine learning (so the first thing isn't always training, and the last thing always test). + +```csharp +YourType[] trainingData = LoadTrainingData(); +Random.Shared.Shuffle(trainingData); + +IDataView sourceData = mlContext.Data.LoadFromEnumerable(trainingData); + +DataOperationsCatalog.TrainTestData split = mlContext.Data.TrainTestSplit(sourceData); +model = chain.Fit(split.TrainSet); + +IDataView predictions = model.Transform(split.TestSet); +// ... +``` + +### Performance-focused types + +.NET 8 introduces several new types aimed at improving app performance. + +- The new <xref:System.Collections.Frozen?displayProperty=fullName> namespace includes the collection types <xref:System.Collections.Frozen.FrozenDictionary%602> and <xref:System.Collections.Frozen.FrozenSet%601>. These types don't allow any changes to keys and values once a collection created. That requirement allows faster read operations (for example, `TryGetValue()`). These types are particularly useful for collections that are populated on first use and then persisted for the duration of a long-lived service, for example: + + ```csharp + private static readonly FrozenDictionary<string, bool> s_configurationData = + LoadConfigurationData().ToFrozenDictionary(optimizeForReads: true); + // ... + if (s_configurationData.TryGetValue(key, out bool setting) && setting) + { + Process(); + } + ``` + +- The new <xref:System.Buffers.IndexOfAnyValues%601?displayProperty=fullName> type is designed to be passed to methods that look for the first occurrence of any value in the passed collection. For example, <xref:System.String.IndexOfAny(System.Char[])?displayProperty=nameWithType> looks for the first occurrence of any character in the specified array in the `string` it's called on. NET 8 adds new overloads of methods like <xref:System.String.IndexOfAny%2A?displayProperty=nameWithType> and <xref:System.MemoryExtensions.IndexOfAny%2A?displayProperty=nameWithType> that accept an instance of the new type. When you create an instance of <xref:System.Buffers.IndexOfAnyValues%601?displayProperty=fullName>, all the data that's necessary to optimize subsequent searches is derived *at that time*, meaning the work is done up front. +- The new <xref:System.Text.CompositeFormat?displayProperty=fullName> type is useful for optimizing format strings that aren't known at compile time (for example, if the format string is loaded from a resource file). A little extra time is spent up front to do work such as parsing the string, but it saves the work from being done on each use. + + ```csharp + private static readonly CompositeFormat s_rangeMessage = CompositeFormat.Parse(LoadRangeMessageResource()); + // ... + static string GetMessage(int min, int max) => + string.Format(CultureInfo.InvariantCulture, s_rangeMessage, min, max); + ``` + +- New <xref:System.IO.Hashing.XxHash3?displayProperty=fullName> and <xref:System.IO.Hashing.XxHash128?displayProperty=fullName> types provide implementations of the fast XXH3 and XXH128 hash algorithms. + +### System.Numerics and System.Runtime.Intrinsics + +This section covers improvements to the <xref:System.Numerics?displayProperty=fullName> and <xref:System.Runtime.Intrinsics?displayProperty=fullName> namespaces. + +- <xref:System.Runtime.Intrinsics.Vector256%601>, <xref:System.Numerics.Matrix3x2>, and <xref:System.Numerics.Matrix4x4> have improved hardware acceleration on .NET 8. For example, <xref:System.Runtime.Intrinsics.Vector256%601> was reimplemented to internally be `2x Vector128<T>` operations, where possible. This allows partial acceleration of some functions when `Vector128.IsHardwareAccelerated == true` but `Vector256.IsHardwareAccelerated == false`, such as on Arm64. +- .NET 8 includes the initial implementation of <xref:System.Runtime.Intrinsics.Vector512%601>. +- Hardware intrinsics are now annotated with the `ConstExpected` attribute. This ensures that users are aware when the underlying hardware expects a constant and therefore when a non-constant value may unexpectedly hurt performance. +- The <xref:System.Numerics.IFloatingPointIeee754%601.Lerp(%600,%600,%600)> `Lerp` API has been added to <xref:System.Numerics.IFloatingPointIeee754%601> and therefore to `float` (<xref:System.Single>), `double` (<xref:System.Double>), and <xref:System.Half>. This API allows a linear interpolation between two values to be performed efficiently and correctly. + +### Data validation + +The <xref:System.ComponentModel.DataAnnotations?displayProperty=fullName> namespace includes new data validation attributes intended for validation scenarios in cloud-native services. While the pre-existing `DataAnnotations` validators are geared towards typical UI data-entry validation, such as fields on a form, the new attributes are designed to validate non-user-entry data, such as [configuration options](../extensions/options.md#options-validation). In addition to the new attributes, new properties were added to the <xref:System.ComponentModel.DataAnnotations.RangeAttribute> and <xref:System.ComponentModel.DataAnnotations.RequiredAttribute> types. + +| New API | Description| +| - | - | +| <xref:System.ComponentModel.DataAnnotations.RequiredAttribute.DisallowAllDefaultValues?displayProperty=nameWithType> | Validates that structs don't equal their default values. | +| <xref:System.ComponentModel.DataAnnotations.RangeAttribute.MinimumIsExclusive?displayProperty=nameWithType><br/><xref:System.ComponentModel.DataAnnotations.RangeAttribute.MaximumIsExclusive?displayProperty=nameWithType> | Specifies whether bounds are included in the allowable range. | +| <xref:System.ComponentModel.DataAnnotations.LengthAttribute?displayProperty=nameWithType> | Specifies both lower and upper bounds for strings or collections. For example, `[Length(10, 20)]` requires at least 10 elements and at most 20 elements in a collection. | +| <xref:System.ComponentModel.DataAnnotations.Base64StringAttribute?displayProperty=nameWithType> | Validates that a string is a valid Base64 representation. | +| <xref:System.ComponentModel.DataAnnotations.AllowedValuesAttribute?displayProperty=nameWithType><br/><xref:System.ComponentModel.DataAnnotations.DeniedValuesAttribute?displayProperty=nameWithType> | Specify allow lists and deny lists, respectively. For example, `[AllowedValues("apple", "banana", "mango")]`. | + +## Extension libraries + +### ValidateOptionsResultBuilder type + +.NET 8 Preview 3 introduces the <xref:Microsoft.Extensions.Options.ValidateOptionsResultBuilder> type to facilitate the creation of a <xref:Microsoft.Extensions.Options.ValidateOptionsResult> object. Importantly, this builder allows for the accumulation of multiple errors. Previously, creating the <xref:Microsoft.Extensions.Options.ValidateOptionsResult> object that's required to implement <xref:Microsoft.Extensions.Options.IValidateOptions%601.Validate(System.String,%600)?displayProperty=nameWithType> was difficult and sometimes resulted in layered validation errors. If there were multiple errors, the validation process often stopped at the first error. + +The following code snippet shows an example usage of <xref:Microsoft.Extensions.Options.ValidateOptionsResultBuilder>. + +```csharp +ValidateOptionsResultBuilder builder = new(); +builder.AddError("Error: invalid operation code"); +builder.AddResult(ValidateOptionsResult.Fail("Invalid request parameters")); +builder.AddError("Malformed link", "Url"); + +// Build ValidateOptionsResult object has accumulating multiple errors. +ValidateOptionsResult result = builder.Build(); + +// Reset the builder to allow using it in new validation operation. +builder.Clear(); +``` + +## Source generator for configuration binding + +[ASP.NET Core uses configuration providers](/aspnet/core/fundamentals/configuration/) to perform app configuration. The providers read key-value pair data from different sources, such as settings files, environment variables, and Azure Key Vault. <xref:Microsoft.Extensions.Configuration.ConfigurationBinder> is the type that maps configuration values to strongly typed objects. Previously, the mapping was performed using reflection, which can cause issues for trimming and Native AOT. Starting in .NET 8, you can opt into the use of a source generator to generate the binding implementations. The generator probes for <xref:Microsoft.Extensions.Options.ConfigureOptions%601.Configure(%600)>, <xref:Microsoft.Extensions.Configuration.ConfigurationBinder.Bind%2A>, and <xref:Microsoft.Extensions.Configuration.ConfigurationBinder.Get%2A> calls to retrieve type info from. When the generator is enabled in a project, the compiler implicitly chooses generated methods over the pre-existing reflection-based framework implementations. + +To opt into the source generator, set the `EnableMicrosoftExtensionsConfigurationBinderSourceGenerator` property to `true` in your project file: + +```xml +<PropertyGroup> + <EnableMicrosoftExtensionsConfigurationBinderSourceGenerator>true</EnableMicrosoftExtensionsConfigurationBinderSourceGenerator> +</PropertyGroup> +``` + +For Preview 3, you'll also need to download the latest preview version of the [Microsoft.Extensions.Configuration.Binder NuGet package](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Binder). + +The following code shows an example of invoking the binder. + +```csharp +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +WebApplicationBuilder builder = WebApplication.CreateBuilder(args); +IConfigurationSection section = builder.Configuration.GetSection("MyOptions"); + +// !! Configure call - to be replaced with source-gen'd implementation +builder.Services.Configure<MyOptions>(section); + +// !! Get call - to be replaced with source-gen'd implementation +MyOptions options0 = section.Get<MyOptions>(); + +// !! Bind call - to be replaced with source-gen'd implementation +MyOptions options1 = new MyOptions(); +section.Bind(myOptions1); + +WebApplication app = builder.Build(); +app.MapGet("/", () => "Hello World!"); +app.Run(); + +public class MyOptions +{ + public int A { get; set; } + public string S { get; set; } + public byte[] Data { get; set; } + public Dictionary<string, string> Values { get; set; } + public List<MyClass> Values2 { get; set; } +} + +public class MyClass +{ + public int SomethingElse { get; set; } +} +``` + +## Reflection improvements + +[Function pointers](../../csharp/language-reference/unsafe-code.md#function-pointers) were introduced in .NET 5, however, the corresponding support for reflection wasn't added at that time. When using `typeof` or reflection on a function pointer, for example, `typeof(delegate*<void>())` or `FieldInfo.FieldType` respectively, an <xref:System.IntPtr> was returned. Starting in .NET 8, a <xref:System.Type?displayProperty=nameWithType> object is returned instead. This type provides access to function pointer metadata, including the calling conventions, return type, and parameters. + +> [!NOTE] +> A function pointer instance, which is a physical address to a function, continues to be represented as an <xref:System.IntPtr>. Only the reflection type has changed. + +The new functionality is currently implemented only in the CoreCLR runtime and <xref:System.Reflection.MetadataLoadContext>. + +New APIs have been added to <xref:System.Type?displayProperty=fullName>, such as <xref:System.Type.IsFunctionPointer>, and to <xref:System.Reflection.PropertyInfo?displayProperty=fullName>, <xref:System.Reflection.FieldInfo?displayProperty=fullName>, and <xref:System.Reflection.ParameterInfo?displayProperty=fullName>. The following code shows how to use some of the new APIs for reflection. + +```csharp +// Sample class that contains a function pointer field. +public unsafe class UClass +{ + public delegate* unmanaged[Cdecl, SuppressGCTransition]<in int, void> _fp; +} + +// ... + +FieldInfo fieldInfo = typeof(UClass).GetField(nameof(UClass._fp)); + +// Obtain the function pointer type from a field. +Type fpType = fieldInfo.FieldType; + +// New methods to determine if a type is a function pointer. +Console.WriteLine($"IsFunctionPointer: {fpType.IsFunctionPointer}"); +Console.WriteLine($"IsUnmanagedFunctionPointer: {fpType.IsUnmanagedFunctionPointer}"); + +// New methods to obtain the return and parameter types. +Console.WriteLine($"Return type: {fpType.GetFunctionPointerReturnType()}"); + +foreach (Type parameterType in fpType.GetFunctionPointerParameterTypes()) +{ + Console.WriteLine($"Parameter type: {parameterType}"); +} + +// Access to custom modifiers and calling conventions requires a "modified type". +Type modifiedType = fieldInfo.GetModifiedFieldType(); + +// A modified type forwards most members to its underlying type. +Type normalType = modifiedType.UnderlyingSystemType; + +// New method to obtain the calling conventions. +foreach (Type callConv in modifiedType.GetFunctionPointerCallingConventions()) +{ + Console.WriteLine($"Calling convention: {callConv}"); +} + +// New method to obtain the custom modifiers. +foreach (Type modreq in modifiedType.GetFunctionPointerParameterTypes()[0].GetRequiredCustomModifiers()) +{ + Console.WriteLine($"Required modifier for first parameter: {modreq}"); +} +``` + +The previous example produces the following output: + +```txt +IsFunctionPointer: True +IsUnmanagedFunctionPointer: True +Return type: System.Void +Parameter type: System.Int32& +Calling convention: System.Runtime.CompilerServices.CallConvSuppressGCTransition +Calling convention: System.Runtime.CompilerServices.CallConvCdecl +Required modifier for first parameter: System.Runtime.InteropServices.InAttribute +``` + +## Native AOT support + +The option to [publish as native AOT](../deploying/native-aot/index.md) was first introduced in .NET 7. Publishing an app with native AOT creates a fully self-contained version of your app that doesn't need a runtime—everything is included in a single file. + +.NET 8 adds support for the x64 and Arm64 architectures on *macOS*. + +Also, the sizes of native AOT apps on Linux are now up to 50% smaller. The following table shows the size of a "Hello World" app published with native AOT that includes the entire .NET runtime on .NET 7 vs. .NET 8: + +| Operating system | .NET 7 | .NET 8 Preview 1 | +| --------------------------------------- | ------- | ---------------- | +| Linux x64 (with `-p:StripSymbols=true`) | 3.76 MB | 1.84 MB | +| Windows x64 | 2.85 MB | 1.77 MB | + +## Performance improvements + +.NET 8 includes improvements to code generation and just-in time (JIT) compilation: + +- Arm64 performance improvements +- SIMD improvements +- Cloud-native improvements +- Profile-guided optimization (PGO) improvements +- Support for AVX-512 ISA extensions +- JIT throughput improvements +- Loop and general optimizations + +## .NET container images + +The following changes have been made to .NET container images for .NET 8: + +- [Debian 12](#debian-12) +- [Non-root user](#non-root-user) +- [Preview images](#preview-images) +- [Chiseled Ubuntu images](#chiseled-ubuntu-images) +- [Build multi-platform container images](#build-multi-platform-container-images) + +### Debian 12 + +The container images now use [Debian 12 (Bookworm)](https://wiki.debian.org/DebianBookworm). Debian is the default Linux distro in the .NET container images. + +### Non-root user + +Images include a `non-root` user. This user makes the images `non-root` capable. To run as `non-root`, add the following line at the end of your Dockerfile (or a similar instruction in your Kubernetes manifests): + +```dockerfile +USER app +``` + +.NET 8 Preview 3 adds an environment variable for the UID for the `non-root` user, which is 64198. This environment variable is useful for the Kubernetes `runAsNonRoot` test, which requires that the container user be set via UID and not by name. This [dockerfile](https://github.com/dotnet/dotnet-docker/blob/e5bc76bca49a1bbf9c11e74a590cf6a9fe9dbf2a/samples/aspnetapp/Dockerfile.alpine-non-root#L27) shows an example usage. + +The default port also changed from port `80` to `8080`. To support this change, a new environment variable `ASPNETCORE_HTTP_PORTS` is available to make it easier to change ports. The variable accepts a list of ports, which is simpler than the format required by `ASPNETCORE_URLS`. If you change the port back to port `80` using one of these variables, you can't run as `non-root`. + +### Preview images + +Preview container images tags now have a `-preview` suffix instead of just using the version number. For example, to pull the .NET 8 Preview SDK, use the following tag: + +`docker run --rm -it mcr.microsoft.com/dotnet/sdk:8.0-preview` + +The `-preview` suffix will be removed for release candidate (RC) releases. + +### Chiseled Ubuntu images + +[Chiseled Ubuntu images](https://hub.docker.com/r/ubuntu/dotnet-deps) are available for .NET 8. Chiseled images have a reduced attacked surface because they're ultra-small, have no package manager or shell, and are `non-root`. This type of image is for developers that want the benefit of appliance-style computing. Chiseled images are published to the [.NET nightly artifact registry](https://mcr.microsoft.com/product/dotnet/nightly/aspnet/tags). + +### Build multi-platform container images + +Docker supports using and building [multi-platform images](https://docs.docker.com/build/building/multi-platform/) that work across multiple environments. .NET 8 introduces a new pattern that enables you to mix and match architectures with the .NET images you build. As an example, if you're using macOS and want to target an x64 cloud service in Azure, you can build the image by using the `--platform` switch as follows: + +`docker build --pull -t app --platform linux/amd64` + +The .NET SDK now supports `$TARGETARCH` values and the `-a` argument on restore. The following code snippet shows an example: + +```dockerfile +RUN dotnet restore -a $TARGETARCH + +# Copy everything else and build app. +COPY aspnetapp/. . +RUN dotnet publish -a $TARGETARCH --self-contained false --no-restore -o /app +``` + +For more information, see the [Improving multi-platform container support](https://devblogs.microsoft.com/dotnet/improving-multiplatform-container-support/) blog post. + +## .NET on Linux + +### Minimum support baselines for Linux + +The minimum support baselines for Linux have been updated for .NET 8: + +- .NET will be built targeting Ubuntu 16.04, for all architectures. That's primarily important for defining the minimum `glibc` version for .NET 8. For example, .NET 8 will fail to even start on Ubuntu 14.04. +- For Red Hat Enterprise Linux (RHEL), .NET supports RHEL 8+ and drops RHEL 7. + +For more information, see [Red Hat Enterprise Linux Family support](https://github.com/dotnet/core/blob/main/linux-support.md#red-hat-enterprise-linux-family-support). + +### Build your own .NET on Linux + +In previous .NET versions, you could build .NET from source, but it required you to create a "source tarball" from the [dotnet/installer](https://github.com/dotnet/installer) repo commit that corresponded to a release. In .NET 8, that's no longer necessary and you can build .NET on Linux directly from the [dotnet/dotnet](https://github.com/dotnet/dotnet) repository. That repo uses [dotnet/source-build](https://github.com/dotnet/source-build) to build .NET runtimes, tools, and SDKs. This is the same build that Red Hat and Canonical use to build .NET. + +Building in a container is the easiest approach for most people, since the `dotnet-buildtools/prereqs` container images contain all the required dependencies. For more information, see the [build instructions](https://github.com/dotnet/dotnet#building). + +## See also + +- [Breaking changes in .NET 8](../compatibility/8.0.md) +- [.NET blog: Announcing .NET 8 Preview 1](https://devblogs.microsoft.com/dotnet/announcing-dotnet-8-preview-1/) +- [.NET blog: Announcing .NET 8 Preview 2](https://devblogs.microsoft.com/dotnet/announcing-dotnet-8-preview-2/) +- [.NET blog: Announcing .NET 8 Preview 3](https://devblogs.microsoft.com/dotnet/announcing-dotnet-8-preview-3/) +- [.NET blog: ASP.NET Core updates in .NET 8 Preview 1](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-1/) +- [.NET blog: ASP.NET Core updates in .NET 8 Preview 1](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-2/) diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index e1cf685a340df..719042b120fc2 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -27,7 +27,7 @@ C# 8.0 is also part of this release, which includes the [nullable reference type Tutorials related to C# 8.0 language features: - [Tutorial: Express your design intent more clearly with nullable and non-nullable reference types](../../csharp/tutorials/nullable-reference-types.md) -- [Tutorial: Generate and consume async streams using C# 8.0 and .NET Core 3.0](../../csharp/tutorials/generate-consume-asynchronous-stream.md) +- [Tutorial: Generate and consume async streams using C# 8.0 and .NET Core 3.0](../../csharp/asynchronous-programming/generate-consume-asynchronous-stream.md) - [Tutorial: Use pattern matching to build type-driven and data-driven algorithms](../../csharp/fundamentals/tutorials/pattern-matching.md) Language enhancements were added to support the following API features detailed below: @@ -463,7 +463,7 @@ async IAsyncEnumerable<int> GetBigResultsAsync() In addition to being able to `await foreach`, you can also create async iterators, for example, an iterator that returns an `IAsyncEnumerable/IAsyncEnumerator` that you can both `await` and `yield` in. For objects that need to be disposed, you can use `IAsyncDisposable`, which various BCL types implement, such as `Stream` and `Timer`. -For more information, see the [async streams tutorial](../../csharp/tutorials/generate-consume-asynchronous-stream.md). +For more information, see the [async streams tutorial](../../csharp/asynchronous-programming/generate-consume-asynchronous-stream.md). ### IEEE Floating-point diff --git a/docs/csharp/advanced-topics/expression-trees/debugging-expression-trees-in-visual-studio.md b/docs/csharp/advanced-topics/expression-trees/debugging-expression-trees-in-visual-studio.md new file mode 100644 index 0000000000000..ce0bcc3e75c41 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/debugging-expression-trees-in-visual-studio.md @@ -0,0 +1,38 @@ +--- +title: "Debug expression trees in Visual Studio" +description: Learn about the DebugView property in Visual Studio. See how to use this property to analyze the structure and content of expression trees. +ms.date: 03/06/2023 +--- +# Debugging expression trees in Visual Studio + +You can analyze the structure and content of expression trees when you debug your applications. To get a quick overview of the expression tree structure, you can use the `DebugView` property, which represents expression trees [using a special syntax](debugview-syntax.md). `DebugView` is available only in debug mode. + +:::image type="content" source="media/debugging-expression-trees-in-visual-studio/debugview-expression-tree.png" alt-text="Screenshot of the DebugView of an expression tree within VS debugger."::: + +Since `DebugView` is a string, you can use the [built-in Text Visualizer](/visualstudio/debugger/view-strings-visualizer#open-a-string-visualizer) to view it across multiple lines, by selecting **Text Visualizer** from the magnifying glass icon next to the `DebugView` label. + +:::image type="content" source="media/debugging-expression-trees-in-visual-studio/string-visualizer-debugview.png" alt-text="Screenshot of the Text Visualizer applied to results of DebugView."::: + +Alternatively, you can install and use [a custom visualizer](/visualstudio/debugger/create-custom-visualizers-of-data) for expression trees, such as: + +- [Readable Expressions](https://github.com/agileobjects/ReadableExpressions) ([MIT license](https://github.com/agileobjects/ReadableExpressions/blob/master/LICENCE.md), available at the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=vs-publisher-1232914.ReadableExpressionsVisualizers)), renders the expression tree as themeable C# code, with various rendering options: + + :::image type="content" source="media/debugging-expression-trees-in-visual-studio/readable-expressions-visualizer.png" alt-text="Screenshot of the Readable Expressions visualizer."::: + +- [Expression Tree Visualizer](https://github.com/zspitz/ExpressionTreeVisualizer/blob/master/README.md) ([MIT license](https://github.com/zspitz/ExpressionTreeVisualizer/blob/master/LICENSE)) provides a tree view of the expression tree and its individual nodes: + +:::image type="content" source="media/debugging-expression-trees-in-visual-studio/expression-tree-visualizer.png" alt-text="Screenshot of the Expression Tree Visualizer."::: + +## Open a visualizer for an expression tree + +Select the magnifying glass icon that appears next to the expression tree in **DataTips**, a **Watch** window, the **Autos** window, or the **Locals** window. A list of available visualizers is displayed: + +:::image type="content" source="media/debugging-expression-trees-in-visual-studio/expression-tree-visualizers.png" alt-text="Screenshot showing the Opening of visualizers from Visual Studio."::: + +Select the visualizer you want to use. + +## See also + +- [Debugging in Visual Studio](/visualstudio/debugger/debugger-feature-tour) +- [Create Custom Visualizers](/visualstudio/debugger/create-custom-visualizers-of-data) +- [`DebugView` syntax](debugview-syntax.md) diff --git a/docs/csharp/advanced-topics/expression-trees/debugview-syntax.md b/docs/csharp/advanced-topics/expression-trees/debugview-syntax.md new file mode 100644 index 0000000000000..f8d6bde01e437 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/debugview-syntax.md @@ -0,0 +1,156 @@ +--- +title: Syntax used by DebugView property +description: Describes the special syntax used by the DebugView property to produce a string representation of expression trees +author: zspitz +ms.date: 03/06/2023 +helpviewer_keywords: +- "expression trees" +- "debugview" +--- +# DebugView syntax + +The **DebugView** property (available only when debugging) provides a string rendering of expression trees. Most of the syntax is fairly straightforward to understand; the special cases are described in the following sections. + +Each example is followed by a block comment, containing the **DebugView**. + +## ParameterExpression + +<xref:System.Linq.Expressions.ParameterExpression> variable names are displayed with a `$` symbol at the beginning. + +If a parameter doesn't have a name, it's assigned an automatically generated name, such as `$var1` or `$var2`. + +```csharp +ParameterExpression numParam = Expression.Parameter(typeof(int), "num"); +/* + $num +*/ + +ParameterExpression numParam = Expression.Parameter(typeof(int)); +/* + $var1 +*/ +``` + +## ConstantExpression + +For <xref:System.Linq.Expressions.ConstantExpression> objects that represent integer values, strings, and `null`, the value of the constant is displayed. + +For numeric types that have standard suffixes as C# literals, the suffix is added to the value. The following table shows the suffixes associated with various numeric types. + +| Type | Keyword | Suffix | +|----------------------------------------------------|-----------------------------------------------------------------------------------|--------| +| <xref:System.UInt32?displayProperty=nameWithType> | [uint](../../language-reference/builtin-types/integral-numeric-types.md) | U | +| <xref:System.Int64?displayProperty=nameWithType> | [long](../../language-reference/builtin-types/integral-numeric-types.md) | L | +| <xref:System.UInt64?displayProperty=nameWithType> | [ulong](../../language-reference/builtin-types/integral-numeric-types.md) | UL | +| <xref:System.Double?displayProperty=nameWithType> | [double](../../language-reference/builtin-types/floating-point-numeric-types.md) | D | +| <xref:System.Single?displayProperty=nameWithType> | [float](../../language-reference/builtin-types/floating-point-numeric-types.md) | F | +| <xref:System.Decimal?displayProperty=nameWithType> | [decimal](../../language-reference/builtin-types/floating-point-numeric-types.md) | M | + +```csharp +int num = 10; +ConstantExpression expr = Expression.Constant(num); +/* + 10 +*/ + +double num = 10; +ConstantExpression expr = Expression.Constant(num); +/* + 10D +*/ +``` + +## BlockExpression + +If the type of a <xref:System.Linq.Expressions.BlockExpression> object differs from the type of the last expression in the block, the type is displayed within angle brackets (`<` and `>`). Otherwise, the type of the <xref:System.Linq.Expressions.BlockExpression> object isn't displayed. + +```csharp +BlockExpression block = Expression.Block(Expression.Constant("test")); +/* + .Block() { + "test" + } +*/ + +BlockExpression block = Expression.Block(typeof(Object), Expression.Constant("test")); +/* + .Block<System.Object>() { + "test" + } +*/ +``` + +## LambdaExpression + +<xref:System.Linq.Expressions.LambdaExpression> objects are displayed together with their delegate types. + +If a lambda expression doesn't have a name, it's assigned an automatically generated name, such as `#Lambda1` or `#Lambda2`. + +```csharp +LambdaExpression lambda = Expression.Lambda<Func<int>>(Expression.Constant(1)); +/* + .Lambda #Lambda1<System.Func'1[System.Int32]>() { + 1 + } +*/ + +LambdaExpression lambda = Expression.Lambda<Func<int>>(Expression.Constant(1), "SampleLambda", null); +/* + .Lambda #SampleLambda<System.Func'1[System.Int32]>() { + 1 + } +*/ +``` + +## LabelExpression + +If you specify a default value for the <xref:System.Linq.Expressions.LabelExpression> object, this value is displayed before the <xref:System.Linq.Expressions.LabelTarget> object. + +The `.Label` token indicates the start of the label. The `.LabelTarget` token indicates the destination of the target to jump to. + +If a label doesn't have a name, it's assigned an automatically generated name, such as `#Label1` or `#Label2`. + +```csharp +LabelTarget target = Expression.Label(typeof(int), "SampleLabel"); +BlockExpression block = Expression.Block( + Expression.Goto(target, Expression.Constant(0)), + Expression.Label(target, Expression.Constant(-1)) +); +/* + .Block() { + .Goto SampleLabel { 0 }; + .Label + -1 + .LabelTarget SampleLabel: + } +*/ + +LabelTarget target = Expression.Label(); +BlockExpression block = Expression.Block( + Expression.Goto(target), + Expression.Label(target) +); +/* + .Block() { + .Goto #Label1 { }; + .Label + .LabelTarget #Label1: + } +*/ +``` + +## Checked Operators + +Checked operators are displayed with the `#` symbol in front of the operator. For example, the checked addition operator is displayed as `#+`. + +```csharp +Expression expr = Expression.AddChecked( Expression.Constant(1), Expression.Constant(2)); +/* + 1 #+ 2 +*/ + +Expression expr = Expression.ConvertChecked( Expression.Constant(10.0), typeof(int)); +/* + #(System.Int32)10D +*/ +``` diff --git a/docs/csharp/advanced-topics/expression-trees/expression-classes.md b/docs/csharp/advanced-topics/expression-trees/expression-classes.md new file mode 100644 index 0000000000000..b29836ac7fea9 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/expression-classes.md @@ -0,0 +1,54 @@ +--- +title: .NET Runtime support for expression trees +description: Learn about .NET runtime types supporting expression trees, creating expression trees, and techniques for working with expression tree APIs. +ms.date: 03/06/2023 +--- + +# .NET Runtime support for expression trees + +There's a large list of classes in the .NET runtime that work with Expression Trees. You can see the full list at <xref:System.Linq.Expressions>. Rather than enumerate the full list, let's understand how the runtime classes have been designed. + +In language design, an expression is a body of code that evaluates and returns a value. Expressions may be simple: the constant expression `1` returns the constant value of 1. They may be more complicated: The expression `(-B + Math.Sqrt(B*B - 4 * A * C)) / (2 * A)` returns one root for a quadratic equation (in the case where the equation has a solution). + +## System.Linq.Expression and derived types + +One of the complexities of working with expression trees is that many different kinds of expressions are valid in many places in programs. Consider an assignment expression. The right hand side of an assignment could be a constant value, a variable, a method call expression, or others. That language flexibility means that you may encounter many different expression types anywhere in the nodes of a tree when you traverse an expression tree. Therefore, when you work with the base expression type, that's the simplest way to work. However, sometimes you need to know more. The base Expression class contains a `NodeType` property for this purpose. It returns an `ExpressionType`, which is an enumeration of possible expression types. Once you know the type of the node, you cast it to that type, and perform specific actions knowing the type of the expression node. You can search for certain node types, and then work with the specific properties of that kind of expression. + +For example, this code prints the name of a variable for a variable access expression. The following code shows the practice of checking the node type, then casting to a variable access expression and then checking the properties of the specific expression type: + +```csharp +Expression<Func<int, int>> addFive = (num) => num + 5; + +if (addFive.NodeType == ExpressionType.Lambda) +{ + var lambdaExp = (LambdaExpression)addFive; + + var parameter = lambdaExp.Parameters.First(); + + Console.WriteLine(parameter.Name); + Console.WriteLine(parameter.Type); +} +``` + +## Create expression trees + +The `System.Linq.Expression` class also contains many static methods to create expressions. These methods create an expression node using the arguments supplied for its children. In this way, you build up an expression from its leaf nodes. For example, this code builds an Add expression: + +```csharp +// Addition is an add expression for "1 + 2" +var one = Expression.Constant(1, typeof(int)); +var two = Expression.Constant(2, typeof(int)); +var addition = Expression.Add(one, two); +``` + +You can see from this simple example that many types are involved in creating and working with expression trees. That complexity is necessary to provide the capabilities of the rich vocabulary provided by the C# language. + +## Navigate the APIs + +There are Expression node types that map to almost all of the syntax elements of the C# language. Each type has specific methods for that type of language element. It's a lot to keep in your head at one time. Rather than try to memorize everything, here are the techniques you use to work with Expression trees: + +1. Look at the members of the `ExpressionType` enum to determine possible nodes you should be examining. This list helps when you want to traverse and understand an expression tree. +1. Look at the static members of the `Expression` class to build an expression. Those methods can build any expression type from a set of its child nodes. +1. Look at the `ExpressionVisitor` class to build a modified expression tree. + +You find more as you look at each of those three areas. Invariably, you find what you need when you start with one of those three steps. diff --git a/docs/csharp/advanced-topics/expression-trees/expression-trees-building.md b/docs/csharp/advanced-topics/expression-trees/expression-trees-building.md new file mode 100644 index 0000000000000..72d653ae4f055 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/expression-trees-building.md @@ -0,0 +1,90 @@ +--- +title: Building Expression Trees +description: Learn about techniques for building expression trees. +ms.date: 03/07/2023 +--- +# Build expression trees + +The C# compiler created all the expression trees you've seen so far. You created a lambda expression assigned to a variable typed as an `Expression<Func<T>>` or some similar type. For many scenarios, you build an expression in memory at run time. + +Expression trees are immutable. Being immutable means that you must build the tree from the leaves up to the root. The APIs you use to build expression trees reflect this fact: The methods you use to build a node take all its children as arguments. Let's walk through a few examples to show you the techniques. + +## Create nodes + +You start with the addition expression you've been working with throughout these sections: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="AddExpression"::: + +To construct that expression tree, you first construct the leaf nodes. The leaf nodes are constants. Use the <xref:System.Linq.Expressions.Expression.Constant%2A> method to create the nodes: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="BuildConstantLeaves"::: + +Next, build the addition expression: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="BuildAdditionNode"::: + +Once you've built the addition expression, you create the lambda expression: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="BuildLambdaExpression"::: + +This lambda expression contains no arguments. Later in this section, you see how to map arguments to parameters and build more complicated expressions. + +For expressions like this one, you may combine all the calls into a single statement: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="SingleExpression"::: + +## Build a tree + +The previous section showed the basics of building an expression tree in memory. More complex trees generally mean more node types, and more nodes in the tree. Let's run through one more example and show two more node types that you typically build when you create expression trees: the argument nodes, and method call nodes. Let's build an expression tree to create this expression: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="SquareRootLambda"::: + +You start by creating parameter expressions for `x` and `y`: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="BuildParameters"::: + +Creating the multiplication and addition expressions follows the pattern you've already seen: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="BuildSumOfSquare"::: + +Next, you need to create a method call expression for the call to `Math.Sqrt`. + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="DistanceMethod"::: + +The `GetMethod` call could return `null` if the method isn't found. Most likely that's because you've misspelled the method name. Otherwise, it could mean the required assembly isn't loaded. Finally, you put the method call into a lambda expression, and make sure to define the arguments to the lambda expression: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="CreateLambda"::: + +In this more complicated example, you see a couple more techniques that you often need to create expression trees. + +First, you need to create the objects that represent parameters or local variables before you use them. Once you've created those objects, you can use them in your expression tree wherever you need. + +Second, you need to use a subset of the Reflection APIs to create a <xref:System.Reflection.MethodInfo?displayProperty=nameWithType> object so that you can create an expression tree to access that method. You must limit yourself to the subset of the Reflection APIs that are available on the .NET Core platform. Again, these techniques extend to other expression trees. + +## Build code in depth + +You aren't limited in what you can build using these APIs. However, the more complicated expression tree that you want to build, the more difficult the code is to manage and to read. + +Let's build an expression tree that is the equivalent of this code: + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="FactorialFunc"::: + +The preceding code didn't build the expression tree, but simply the delegate. Using the `Expression` class, you can't build statement lambdas. Here's the code that is required to build the same functionality. There isn't an API for building a `while` loop, instead you need to build a loop that contains a conditional test, and a label target to break out of the loop. + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="BuildFactorialFunc"::: + +The code to build the expression tree for the factorial function is quite a bit longer, more complicated, and it's riddled with labels and break statements and other elements you'd like to avoid in our everyday coding tasks. + +For this section, you wrote code to visit every node in this expression tree and write out information about the nodes that are created in this sample. You can [view or download the sample code](https://github.com/dotnet/samples/tree/main/csharp/expression-trees) at the dotnet/docs GitHub repository. Experiment for yourself by building and running the samples. + +## Map code constructs to expressions + +The following code example demonstrates an expression tree that represents the lambda expression `num => num < 5` by using the API. + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="BuildRelationalExpression"::: + +The expression trees API also supports assignments and control flow expressions such as loops, conditional blocks, and `try-catch` blocks. By using the API, you can create expression trees that are more complex than those that can be created from lambda expressions by the C# compiler. The following example demonstrates how to create an expression tree that calculates the factorial of a number. + +:::code language="csharp" source="snippets/BuildExpressions.cs" id="BuildFactorial"::: + +For more information, see [Generating Dynamic Methods with Expression Trees in Visual Studio 2010](https://devblogs.microsoft.com/csharpfaq/generating-dynamic-methods-with-expression-trees-in-visual-studio-2010/), which also applies to later versions of Visual Studio. diff --git a/docs/csharp/advanced-topics/expression-trees/expression-trees-execution.md b/docs/csharp/advanced-topics/expression-trees/expression-trees-execution.md new file mode 100644 index 0000000000000..3411a244cf5d2 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/expression-trees-execution.md @@ -0,0 +1,87 @@ +--- +title: Executing Expression Trees +description: Learn about executing expression trees by converting them into executable Intermediate Language (IL) instructions. +ms.date: 03/06/2023 +--- + +# Execute expression trees + +An *expression tree* is a data structure that represents some code. It isn't compiled and executable code. If you want to execute +the .NET code represented by an expression tree, you must convert it into executable IL instructions. Executing an expression tree may return a value, or it may just perform an action such as calling a method. + +Only expression trees that represent lambda expressions can be executed. Expression trees that represent lambda expressions are of type <xref:System.Linq.Expressions.LambdaExpression> or <xref:System.Linq.Expressions.Expression%601>. To execute these expression trees, call the <xref:System.Linq.Expressions.LambdaExpression.Compile%2A> method to create an executable delegate, and then invoke the delegate. + +> [!NOTE] +> If the type of the delegate is not known, that is, the lambda expression is of type <xref:System.Linq.Expressions.LambdaExpression> and not <xref:System.Linq.Expressions.Expression%601>, call the <xref:System.Delegate.DynamicInvoke%2A> method on the delegate instead of invoking it directly. + +If an expression tree doesn't represent a lambda expression, you can create a new lambda expression that has the original expression tree as its body, by calling the <xref:System.Linq.Expressions.Expression.Lambda%60%601%28System.Linq.Expressions.Expression%2CSystem.Collections.Generic.IEnumerable%7BSystem.Linq.Expressions.ParameterExpression%7D%29> method. Then, you can execute the lambda expression as described earlier in this section. + +## Lambda expressions to functions + +You can convert any LambdaExpression, or any type derived from LambdaExpression into executable IL. Other expression types can't be directly converted into code. This restriction has little effect in practice. Lambda expressions are the only types of expressions that you would want to execute by converting to executable intermediate language (IL). (Think about what it would mean to directly execute a <xref:System.Linq.Expressions.ConstantExpression?displayProperty=nameWithType>. Would it mean anything useful?) Any expression tree that is a <xref:System.Linq.Expressions.LambdaExpression?displayProperty=nameWithType>, or a type derived from `LambdaExpression` can be converted to IL. The expression type <xref:System.Linq.Expressions.Expression%601?displayProperty=nameWithType> is the only concrete example in the .NET Core libraries. It's used to represent an expression that maps to any delegate type. Because this type maps to a delegate type, .NET can examine the expression, and generate IL for an appropriate delegate that matches the signature of the lambda expression. The delegate type is based on the expression type. You must know the return type and the argument list if you want to use the delegate object in a strongly typed manner. The `LambdaExpression.Compile()` method returns the `Delegate` type. You have to cast it to the correct delegate type to have any compile-time tools check the argument list or return type. + +In most cases, a simple mapping between an expression and its corresponding delegate exists. For example, an expression tree represented by `Expression<Func<int>>` would be converted to a delegate of the type `Func<int>`. For a lambda expression with any return type and argument list, there exists a delegate type that is the target type for the executable code represented by that lambda expression. + +The <xref:System.Linq.Expressions.LambdaExpression?displayProperty=nameWithType> type contains <xref:System.Linq.Expressions.LambdaExpression.Compile%2A?displayProperty=nameWithType> and <xref:System.Linq.Expressions.LambdaExpression.CompileToMethod%2A?displayProperty=nameWithType> members that you would use to convert an expression tree to executable code. The `Compile` method creates a delegate. The `CompileToMethod` method updates a <xref:System.Reflection.Emit.MethodBuilder?displayProperty=nameWithType> object with the IL that represents the compiled output of the expression tree. + +> [!IMPORTANT] +> `CompileToMethod` is only available in .NET Framework, not in .NET Core or .NET 5 and later. + +Optionally, you can also provide a <xref:System.Runtime.CompilerServices.DebugInfoGenerator?displayProperty=nameWithType> that receives the symbol debugging information for the generated delegate object. The `DebugInfoGenerator` provides full debugging information about the generated delegate. + +You would convert an expression into a delegate using the following code: + +:::code language="csharp" source="snippets/RunExpressionTrees.cs" id="ConvertToDelegate"::: + +The following code example demonstrates the concrete types used when you compile and execute an expression tree. + +:::code language="csharp" source="snippets/RunExpressionTrees.cs" id="CreateExpressionTree"::: + +The following code example demonstrates how to execute an expression tree that represents raising a number to a power by creating a lambda expression and executing it. The result, which represents the number raised to the power, is displayed. + +:::code language="csharp" source="snippets/RunExpressionTrees.cs" id="ConvertToFund"::: + +## Execution and lifetimes + +You execute the code by invoking the delegate created when you called `LambdaExpression.Compile()`. The preceding code, `add.Compile()`, returns a delegate. You invoke that delegate by calling `func()`, which executes the code. + +That delegate represents the code in the expression tree. You can retain the handle to that delegate and invoke it later. You don't need to compile the expression tree each time you want to execute the code it represents. (Remember that expression trees are immutable, and compiling the same expression tree later creates a delegate that executes the same code.) + +> [!CAUTION] +> Don't create any more sophisticated caching mechanisms to increase performance by avoiding unnecessary compile calls. Comparing two arbitrary expression trees to determine if they represent the same algorithm is a time consuming operation. The compute time you save avoiding any extra calls to `LambdaExpression.Compile()` are likely more than consumed by the time executing code that determines if two different expression trees result in the same executable code. + +## Caveats + +Compiling a lambda expression to a delegate and invoking that delegate is one of the simplest operations you can perform with an expression tree. However, even with this simple operation, there are caveats you must be aware of. + +Lambda Expressions create closures over any local variables that are referenced in the expression. You must guarantee that any variables that would be part of the delegate are usable at the location where you call `Compile`, and when you execute the resulting delegate. The compiler ensures that variables are in scope. However, if your expression accesses a variable that implements `IDisposable`, it's possible that your code might dispose of the object while it's still held by the expression tree. + +For example, this code works fine, because `int` doesn't implement `IDisposable`: + +:::code language="csharp" source="snippets/RunExpressionTrees.cs" id="CreateBoundFunc"::: + +The delegate has captured a reference to the local variable `constant`. That variable is accessed at any time later, when the function returned by `CreateBoundFunc` executes. + +However, consider the following (rather contrived) class that implements <xref:System.IDisposable?displayProperty=nameWithType>: + +:::code language="csharp" source="snippets/RunExpressionTrees.cs" id="ResourceClass"::: + +If you use it in an expression as shown in the following code, you get a <xref:System.ObjectDisposedException?displayProperty=nameWithType> when you execute the code referenced by the `Resource.Argument` property: + +:::code language="csharp" source="snippets/RunExpressionTrees.cs" id="CreateBoundResource"::: + +The delegate returned from this method has closed over the `constant` object, which has been disposed of. (It's been disposed, because it was declared in a `using` statement.) + +Now, when you execute the delegate returned from this method, you have an `ObjectDisposedException` thrown at the point of execution. + +It does seem strange to have a runtime error representing a compile-time construct, but that's the world you enter when you work with expression trees. + +There are numerous permutations of this problem, so it's hard to offer general guidance to avoid it. Be careful about accessing local variables when defining expressions, and be careful about accessing state in the current object (represented by `this`) when creating an expression tree returned via a public API. + +The code in your expression may reference methods or properties in other assemblies. That assembly must be accessible when the expression is defined, when it's compiled, and when the resulting delegate is invoked. You're met with a `ReferencedAssemblyNotFoundException` in cases where it isn't present. + +## Summary + +Expression Trees that represent lambda expressions can be compiled to create a delegate that you can execute. Expression trees provide one mechanism to execute the code represented by an expression tree. + +The Expression Tree does represent the code that would execute for any given construct you create. As long as the environment where you compile and execute the code matches the environment where you create the expression, everything works as expected. When that doesn't happen, the errors are predictable, and they're caught in your first tests of any code using the expression trees. diff --git a/docs/csharp/advanced-topics/expression-trees/expression-trees-explained.md b/docs/csharp/advanced-topics/expression-trees/expression-trees-explained.md new file mode 100644 index 0000000000000..506a630124a07 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/expression-trees-explained.md @@ -0,0 +1,52 @@ +--- +title: Expression tree data structures +description: Learn about expression trees and how they're useful in translating algorithms for external execution and inspecting code before executing it. +ms.date: 03/06/2023 +--- +# Expression trees - data that defines code + +An Expression Tree is a data structure that defines code. Expression trees are based on the same structures that a compiler uses to analyze code and generate the compiled output. As you read this article, you notice quite a bit of similarity between Expression Trees and the types used in the Roslyn APIs to build [Analyzers and CodeFixes](https://github.com/dotnet/roslyn-analyzers). (Analyzers and CodeFixes are NuGet packages that perform static analysis on code and suggest potential fixes for a developer.) The concepts are similar, and the end result is a data structure that allows examination of the source code in a meaningful way. However, Expression Trees are based on a different set of classes and APIs than the Roslyn APIs. Here's a line of code: + +```csharp +var sum = 1 + 2; +``` + +If you analyze the preceding code as an expression tree, the tree contains several nodes. The outermost node is a variable declaration statement with assignment (`var sum = 1 + 2;`) That outermost node contains several child nodes: a variable declaration, an assignment operator, and an expression representing the right hand side of the equals sign. That expression is further subdivided into expressions that represent the addition operation, and left and right operands of the addition. + +Let's drill down a bit more into the expressions that make up the right side of the equals sign. The expression is `1 + 2`, a binary expression. More specifically, it's a binary addition expression. A binary addition expression has two children, representing the left and right nodes of the addition expression. Here, both nodes are constant expressions: The left operand is the value `1`, and the right operand is the value `2`. + +Visually, the entire statement is a tree: You could start at the root node, and travel to each node in the tree to see the code that makes up the statement: + +- Variable declaration statement with assignment (`var sum = 1 + 2;`) + - Implicit variable type declaration (`var sum`) + - Implicit var keyword (`var`) + - Variable name declaration (`sum`) + - Assignment operator (`=`) + - Binary addition expression (`1 + 2`) + - Left operand (`1`) + - Addition operator (`+`) + - Right operand (`2`) + +The preceding tree may look complicated, but it's very powerful. Following the same process, you decompose much more complicated expressions. Consider this expression: + +```csharp +var finalAnswer = this.SecretSauceFunction( + currentState.createInterimResult(), currentState.createSecondValue(1, 2), + decisionServer.considerFinalOptions("hello")) + + MoreSecretSauce('A', DateTime.Now, true); +``` + +The preceding expression is also a variable declaration with an assignment. In this instance, the right hand side of the assignment is a much more complicated tree. You're not going to decompose this expression, but consider what the different nodes might be. There are method calls using the current object as a receiver, one that has an explicit `this` receiver, one that doesn't. There are method calls using other receiver objects, there are constant arguments of different types. And finally, there's a binary addition operator. Depending on the return type of `SecretSauceFunction()` or `MoreSecretSauce()`, that binary addition operator may be a method call to an overridden addition operator, resolving to a static method call to the binary addition operator defined for a class. + +Despite this perceived complexity, the preceding expression creates a tree structure navigated as easily as the first sample. You keep traversing child nodes to find leaf nodes in the expression. Parent nodes have references to their children, and each node has a property that describes what kind of node it is. + +The structure of an expression tree is very consistent. Once you've learned the basics, you understand even the most complex code when it's represented +as an expression tree. The elegance in the data structure explains how the C# compiler analyzes the most complex C# programs and creates proper output from that complicated source code. + +Once you become familiar with the structure of expression trees, you find that knowledge you've gained quickly enables you to work with many more advanced scenarios. There's incredible power to expression trees. + +In addition to translating algorithms to execute in other environments, expression trees make it easier to write algorithms that inspect code before executing it. You write a method whose arguments are expressions and then examine those expressions before executing the code. The Expression Tree is a full representation of the code: you see values of any subexpression. You see method and property names. You see the value of any constant expressions. You convert an expression tree into an executable delegate, and execute the code. + +The APIs for Expression Trees enable you to create trees that represent almost any valid code construct. However, to keep things as simple as possible, some C# idioms can't be created in an expression tree. One example is asynchronous expressions (using the `async` and `await` keywords). If your needs require synchronous algorithms, you would need to manipulate the `Task` objects directly, rather than rely on the compiler support. Another is in creating loops. Typically, you create these loops by using `for`, `foreach`, `while` or `do` loops. As you see [later in this series](expression-trees-building.md), the APIs for expression trees support a single loop expression, with `break` and `continue` expressions that control repeating the loop. + +The one thing you can't do is modify an expression tree. Expression Trees are immutable data structures. If you want to mutate (change) an expression tree, you must create a new tree that is a copy of the original, but with your desired changes. diff --git a/docs/csharp/advanced-topics/expression-trees/expression-trees-interpreting.md b/docs/csharp/advanced-topics/expression-trees/expression-trees-interpreting.md new file mode 100644 index 0000000000000..a508ddef47ce5 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/expression-trees-interpreting.md @@ -0,0 +1,275 @@ +--- +title: Interpret Expressions +description: Learn how to write code to examine the structure of an expression tree. +ms.date: 03/06/2023 +--- +# Interpret expressions + +The following code example demonstrates how the expression tree that represents the lambda expression `num => num < 5` can be decomposed into its parts. + +:::code language="csharp" source="snippets/InterpretExpressions.cs" id="ParseExpression"::: + +Now, let's write some code to examine the structure of an *expression tree*. Every node in an expression tree is an object of a class that is derived from `Expression`. + +That design makes visiting all the nodes in an expression tree a relatively straightforward recursive operation. The general strategy is to start at the root node and determine what kind of node it is. + +If the node type has children, recursively visit the children. At each child node, repeat the process used at the root node: determine the type, and if the type has children, visit each of the children. + +## Examine an expression with no children + +Let's start by visiting each node in a simple expression tree. Here's the code that creates a constant expression and then examines its properties: + +:::code language="csharp" source="snippets/InterpretExpressions.cs" id="VisitConstant"::: + +The preceding code prints the following output: + +```output +This is a/an Constant expression type +The type of the constant value is System.Int32 +The value of the constant value is 24 +``` + +Now, let's write the code that would examine this expression and write out some important properties about it. + +## Addition expression + +Let's start with the addition sample from the introduction to this section. + +```csharp +Expression<Func<int>> sum = () => 1 + 2; +``` + +> [!NOTE] +> Don't use`var` to declare this expression tree, because the natural type of the delegate is `Func<int>`, not `Expression<Func<int>>`. + +The root node is a `LambdaExpression`. In order to get the interesting code on the right-hand side of the `=>` operator, you need to find one of the children of the `LambdaExpression`. You do that with all the expressions in this section. The parent node does help us find the return type of the `LambdaExpression`. + +To examine each node in this expression, you need to recursively visit many nodes. Here's a simple first implementation: + +:::code language="csharp" source="snippets/InterpretExpressions.cs" id="VisitAddition"::: + +This sample prints the following output: + +```output +This expression is a/an Lambda expression type +The name of the lambda is <null> +The return type is System.Int32 +The expression has 2 arguments. They are: + Parameter Type: System.Int32, Name: a + Parameter Type: System.Int32, Name: b +The body is a/an Add expression +The left side is a Parameter expression + Parameter Type: System.Int32, Name: a +The right side is a Parameter expression + Parameter Type: System.Int32, Name: b +``` + +You notice much repetition in the preceding code sample. Let's clean that up and build a more general purpose expression node visitor. That's going to require us to write a recursive algorithm. Any node could be of a type that might have children. Any node that has children requires us to visit those children and determine what that node is. Here's the cleaned up version that utilizes recursion to visit the addition operations: + +:::code language="csharp" source="snippets/Visitors.cs"::: + +This algorithm is the basis of an algorithm that visits any arbitrary `LambdaExpression`. The code you created only looks for a small sample of the possible sets of expression tree nodes that it may encounter. However, you can still learn quite a bit from what it produces. (The default case in the `Visitor.CreateFromExpression` method prints a message to the error console when a new node type is encountered. That way, you know to add a new expression type.) + +When you run this visitor on the preceding addition expression, you get the following output: + +```output +This expression is a/an Lambda expression type +The name of the lambda is <null> +The return type is System.Int32 +The expression has 2 argument(s). They are: + This is an Parameter expression type + Type: System.Int32, Name: a, ByRef: False + This is an Parameter expression type + Type: System.Int32, Name: b, ByRef: False +The expression body is: + This binary expression is a Add expression + The Left argument is: + This is an Parameter expression type + Type: System.Int32, Name: a, ByRef: False + The Right argument is: + This is an Parameter expression type + Type: System.Int32, Name: b, ByRef: False +``` + +Now that you've built a more general visitor implementation, you can visit and process many more different types of expressions. + +## Addition Expression with more operands + +Let's try a more complicated example, +yet still limit the node types to addition only: + +:::code language="csharp" source="snippets/InterpretExpressions.cs" id="NoParens"::: + +Before you run these examples on the visitor algorithm, try a thought exercise to work out what the output might be. Remember that the `+` operator is a *binary operator*: it must have two children, representing the left and right operands. There are several possible ways to construct a tree that could be correct: + +:::code language="csharp" source="snippets/InterpretExpressions.cs" id="ParensPermutations"::: + +You can see the separation into two possible answers to highlight the most promising. The first represents *right associative* expressions. The second represent *left associative* expressions. The advantage of both of those two formats is that the format scales to any arbitrary number of addition expressions. + +If you do run this expression through the visitor, you see this output, verifying that the simple addition expression is *left associative*. + +In order to run this sample, and see the full expression tree, you make one change to the source expression tree. When the expression tree contains all constants, the resulting tree simply contains the constant value of `10`. The compiler performs all the addition and reduces the expression to its simplest form. Simply adding one variable in the expression is sufficient to see the original tree: + +:::code language="csharp" source="snippets/InterpretExpressions.cs" id="VariableAddition"::: + +Create a visitor for this sum and run the visitor you see this output: + +```output +This expression is a/an Lambda expression type +The name of the lambda is <null> +The return type is System.Int32 +The expression has 1 argument(s). They are: + This is an Parameter expression type + Type: System.Int32, Name: a, ByRef: False +The expression body is: + This binary expression is a Add expression + The Left argument is: + This binary expression is a Add expression + The Left argument is: + This binary expression is a Add expression + The Left argument is: + This is an Constant expression type + The type of the constant value is System.Int32 + The value of the constant value is 1 + The Right argument is: + This is an Parameter expression type + Type: System.Int32, Name: a, ByRef: False + The Right argument is: + This is an Constant expression type + The type of the constant value is System.Int32 + The value of the constant value is 3 + The Right argument is: + This is an Constant expression type + The type of the constant value is System.Int32 + The value of the constant value is 4 +``` + +You can run any of the other samples through the visitor code and see what tree it represents. Here's an example of the preceding `sum3` expression (with an additional parameter to prevent the compiler from computing the constant): + +:::code language="csharp" source="snippets/InterpretExpressions.cs" id="VariableParensAddition"::: + +Here's the output from the visitor: + +```output +This expression is a/an Lambda expression type +The name of the lambda is <null> +The return type is System.Int32 +The expression has 2 argument(s). They are: + This is an Parameter expression type + Type: System.Int32, Name: a, ByRef: False + This is an Parameter expression type + Type: System.Int32, Name: b, ByRef: False +The expression body is: + This binary expression is a Add expression + The Left argument is: + This binary expression is a Add expression + The Left argument is: + This is an Constant expression type + The type of the constant value is System.Int32 + The value of the constant value is 1 + The Right argument is: + This is an Parameter expression type + Type: System.Int32, Name: a, ByRef: False + The Right argument is: + This binary expression is a Add expression + The Left argument is: + This is an Constant expression type + The type of the constant value is System.Int32 + The value of the constant value is 3 + The Right argument is: + This is an Parameter expression type + Type: System.Int32, Name: b, ByRef: False +``` + +Notice that the parentheses aren't part of the output. There are no nodes in the expression tree that represent the parentheses in the input expression. The structure of the expression tree contains all the information necessary to communicate the precedence. + +## Extending this sample + +The sample deals with only the most rudimentary expression trees. The code you've seen in this section only handles constant integers and the binary `+` operator. As a final sample, let's update the visitor to handle a more complicated expression. Let's make it work for the following factorial expression: + +:::code language="csharp" source="snippets/InterpretExpressions.cs" id="FactorialVisitor"::: + +This code represents one possible implementation for the mathematical *factorial* function. The way you've written this code highlights two limitations of building expression trees by assigning lambda expressions to Expressions. First, statement lambdas aren't allowed. That means you can't use loops, blocks, if / else statements, and other control structures common in C#. You're limited to using expressions. Second, you can't recursively call the same expression. You could if it were already a delegate, but you can't call it in its expression tree form. In the section on [building expression trees](expression-trees-building.md), you learn techniques to overcome these limitations. + +In this expression, you encounter nodes of all these types: + +1. Equal (binary expression) +1. Multiply (binary expression) +1. Conditional (the `? :` expression) +1. Method Call Expression (calling `Range()` and `Aggregate()`) + +One way to modify the visitor algorithm is to keep executing it, and write the node type every time you reach your `default` clause. After a few iterations, you've see each of the potential nodes. Then, you have all you need. The result would be something like this: + +:::code language="csharp" source="snippets/Visitors2.cs" id="UpdatedVisitor"::: + +The `ConditionalVisitor` and `MethodCallVisitor` process those two nodes: + +:::code language="csharp" source="snippets/Visitors2.cs" id="NewNodes"::: + +And the output for the expression tree would be: + +```output +This expression is a/an Lambda expression type +The name of the lambda is <null> +The return type is System.Int32 +The expression has 1 argument(s). They are: + This is an Parameter expression type + Type: System.Int32, Name: n, ByRef: False +The expression body is: + This expression is a Conditional expression + The Test for this expression is: + This binary expression is a Equal expression + The Left argument is: + This is an Parameter expression type + Type: System.Int32, Name: n, ByRef: False + The Right argument is: + This is an Constant expression type + The type of the constant value is System.Int32 + The value of the constant value is 0 + The True clause for this expression is: + This is an Constant expression type + The type of the constant value is System.Int32 + The value of the constant value is 1 + The False clause for this expression is: + This expression is a Call expression + This is a static method call + The method name is System.Linq.Enumerable.Aggregate + The Arguments are: + This expression is a Call expression + This is a static method call + The method name is System.Linq.Enumerable.Range + The Arguments are: + This is an Constant expression type + The type of the constant value is System.Int32 + The value of the constant value is 1 + This is an Parameter expression type + Type: System.Int32, Name: n, ByRef: False + This expression is a Lambda expression type + The name of the lambda is <null> + The return type is System.Int32 + The expression has 2 arguments. They are: + This is an Parameter expression type + Type: System.Int32, Name: product, ByRef: False + This is an Parameter expression type + Type: System.Int32, Name: factor, ByRef: False + The expression body is: + This binary expression is a Multiply expression + The Left argument is: + This is an Parameter expression type + Type: System.Int32, Name: product, ByRef: False + The Right argument is: + This is an Parameter expression type + Type: System.Int32, Name: factor, ByRef: False +``` + +## Extend the Sample Library + +The samples in this section show the core techniques to visit and examine nodes in an expression tree. It simplified the types of nodes you'll encounter to concentrate on the core tasks of visiting and accessing nodes in an expression tree. + +First, the visitors only handle constants that are integers. Constant values could be any other numeric type, and the C# language supports conversions and promotions between those types. A more robust version of this code would mirror all those capabilities. + +Even the last example recognizes a subset of the possible node types. You can still feed it many expressions that cause it to fail. A full implementation is included in .NET Standard under the name <xref:System.Linq.Expressions.ExpressionVisitor> and can handle all the possible node types. + +Finally, the library used in this article was built for demonstration and learning. It's not optimized. It makes the structures clear, and to highlight the techniques used to visit the nodes and analyze what's there. + +Even with those limitations, you should be well on your way to writing algorithms that read and understand expression trees. diff --git a/docs/csharp/advanced-topics/expression-trees/expression-trees-translating.md b/docs/csharp/advanced-topics/expression-trees/expression-trees-translating.md new file mode 100644 index 0000000000000..1958263376893 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/expression-trees-translating.md @@ -0,0 +1,119 @@ +--- +title: Translate Expression Trees +description: Learn how to visit each node in an expression tree while building a modified copy of that expression tree. +ms.date: 03/07/2023 +--- +# Translate expression trees + +In this article, you learn how to visit each node in an expression tree while building a modified copy of that expression tree. You translate expression trees to understand the algorithms so that it can be translated into another environment. You change the algorithm that has been created. You might add logging, intercept method calls and track them, or other purposes. + +The code you build to translate an expression tree is an extension of what you've already seen to visit all the nodes in a tree. When you translate an expression tree, you visit all the nodes, and while visiting them, build the new tree. The new tree may contain references to the original nodes, or new nodes that you've placed in the tree. + +Let's visit an expression tree, and creating a new tree with some replacement nodes. In this example, let's replace any constant with a constant that is 10 times larger. Otherwise, you leave the expression tree intact. Rather than reading the value of the constant and replacing it with a new constant, you make this replacement by replacing the constant node with a new node that performs the multiplication. + +Here, once you find a constant node, you create a new multiplication node whose children are the original constant and the constant `10`: + +:::code language="csharp" source="snippets/TranslateExpressions.cs" id="ReplaceNode"::: + +Create a new tree by replacing the original node with the substitute. You verify the changes by compiling and executing the replaced tree. + +:::code language="csharp" source="snippets/TranslateExpressions.cs" id="TranslateNode"::: + +Building a new tree is a combination of visiting the nodes in the existing tree, and creating new nodes and inserting them into the tree. The previous example shows the importance of expression trees being immutable. Notice that the new tree created in the preceding code contains a mixture of newly created nodes, and nodes from the existing tree. Nodes can be used in both trees because the nodes in the existing tree can't be modified. Reusing nodes results in significant memory efficiencies. The same nodes can be used throughout a tree, or in multiple expression trees. Since nodes can't be modified, the same node can be reused whenever it's needed. + +## Traverse and execute an addition + +Let's verify the new tree by building a second visitor that walks the tree of addition nodes and computes the result. Make a couple modifications to the visitor that you've seen so far. In this new version, the visitor returns the partial sum of the addition operation up to this point. For a constant expression it's simply the value of the constant expression. For an addition expression, the result is the sum of the left and right operands, once those trees have been traversed. + +:::code language="csharp" source="snippets/TranslateExpressions.cs" id="TraverseAndCreateNode"::: + +There's quite a bit of code here, but the concepts are approachable. This code visits children in a depth first search. When it encounters a constant node, the visitor returns the value of the constant. After the visitor has visited both children, those children have computed the sum computed for that subtree. The addition node can now compute its sum. Once all the nodes in the expression tree have been visited, the sum has been computed. You can trace the execution by running the sample in the debugger and tracing the execution. + +Let's make it easier to trace how the nodes are analyzed and how the sum is computed by traversing the tree. Here's an updated version of the Aggregate method that includes quite a bit of tracing information: + +:::code language="csharp" source="snippets/TranslateExpressions.cs" id="Aggregate"::: + +Running it on the `sum` expression yields the following output: + +```output +10 +Found Addition Expression +Computing Left node +Found Addition Expression +Computing Left node +Found Constant: 1 +Left is: 1 +Computing Right node +Found Constant: 2 +Right is: 2 +Computed sum: 3 +Left is: 3 +Computing Right node +Found Addition Expression +Computing Left node +Found Constant: 3 +Left is: 3 +Computing Right node +Found Constant: 4 +Right is: 4 +Computed sum: 7 +Right is: 7 +Computed sum: 10 +10 +``` + +Trace the output and follow along in the preceding code. You should be able to work out how the code visits each node and computes the sum as it goes through the tree and finds the sum. + +Now, let's look at a different run, with the expression given by `sum1`: + +:::code language="csharp" source="snippets/TranslateExpressions.cs" id="sum1Expression"::: + +Here's the output from examining this expression: + +```output +Found Addition Expression +Computing Left node +Found Constant: 1 +Left is: 1 +Computing Right node +Found Addition Expression +Computing Left node +Found Constant: 2 +Left is: 2 +Computing Right node +Found Addition Expression +Computing Left node +Found Constant: 3 +Left is: 3 +Computing Right node +Found Constant: 4 +Right is: 4 +Computed sum: 7 +Right is: 7 +Computed sum: 9 +Right is: 9 +Computed sum: 10 +10 +``` + +While the final answer is the same, the tree traversal is different. The nodes are traveled in a different order, because the tree was constructed with different operations occurring first. + +### Create a modified copy + +Create a new **Console Application** project. Add a `using` directive to the file for the `System.Linq.Expressions` namespace. Add the `AndAlsoModifier` class to your project. + +:::code language="csharp" source="snippets/TranslateExpressions.cs" id="AndAlsoModifier"::: + +This class inherits the <xref:System.Linq.Expressions.ExpressionVisitor> class and is specialized to modify expressions that represent conditional `AND` operations. It changes these operations from a conditional `AND` to a conditional `OR`. The class overrides the <xref:System.Linq.Expressions.ExpressionVisitor.VisitBinary%2A> method of the base type, because conditional `AND` expressions are represented as binary expressions. In the `VisitBinary` method, if the expression that is passed to it represents a conditional `AND` operation, the code constructs a new expression that contains the conditional `OR` operator instead of the conditional `AND` operator. If the expression that is passed to `VisitBinary` doesn't represent a conditional `AND` operation, the method defers to the base class implementation. The base class methods construct nodes that are like the expression trees that are passed in, but the nodes have their sub trees replaced with the expression trees produced recursively by the visitor. + +Add a `using` directive to the file for the `System.Linq.Expressions` namespace. Add code to the `Main` method in the Program.cs file to create an expression tree and pass it to the method that modifies it. + +:::code language="csharp" source="snippets/TranslateExpressions.cs" id="ModifyExpression"::: + +The code creates an expression that contains a conditional `AND` operation. It then creates an instance of the `AndAlsoModifier` class and passes the expression to the `Modify` method of this class. Both the original and the modified expression trees are outputted to show the change. Compile and run the application. + +## Learn more + +This sample shows a small subset of the code you would build to traverse and interpret the algorithms represented by an expression tree. For information on building a general purpose library that translates expression trees into another language, read [this series](/archive/blogs/mattwar/linq-building-an-iqueryable-provider-series) by Matt Warren. It goes into great detail on how to translate any of the code you might find in an expression tree. + +You've now seen the true power of expression trees. You examine a set of code, make any changes you'd like to that code, and execute the changed version. Because the expression trees are immutable, you create new trees by using the components of existing trees. Reusing nodes minimizes the amount of memory needed to create modified expression trees. diff --git a/docs/csharp/advanced-topics/expression-trees/index.md b/docs/csharp/advanced-topics/expression-trees/index.md new file mode 100644 index 0000000000000..055dcef61496e --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/index.md @@ -0,0 +1,68 @@ +--- +title: "Expression Trees" +description: Learn about expression trees. See how to compile and run code represented by these data structures, where each node is an expression. +ms.date: 03/07/2023 +ms.custom: updateeachrelease +--- +# Expression Trees + +*Expression trees* represent code in a tree-like data structure, where each node is an expression, for example, a method call or a binary operation such as `x < y`. + +If you have used LINQ, you have experience with a rich library where the `Func` types are part of the API set. (If you aren't familiar with LINQ, you probably want to read [the LINQ tutorial](../../programming-guide/concepts/linq/index.md) and the article about [lambda expressions](../../language-reference/operators/lambda-expressions.md) before this one.) Expression Trees provide richer interaction with the arguments that are functions. + +You write function arguments, typically using Lambda Expressions, when you create LINQ queries. In a typical LINQ query, those function arguments are transformed into a delegate the compiler creates. + +You've likely already written code that uses Expression trees. Entity Framework's LINQ APIs accept Expression trees as the arguments for the LINQ Query Expression Pattern. That enables [Entity Framework](/ef/) to translate the query you wrote in C# into SQL that executes in the database engine. Another example is [Moq](https://github.com/Moq/moq), which is a popular mocking framework for .NET. + +When you want to have a richer interaction, you need to use *Expression Trees*. Expression Trees represent code as a structure that you examine, modify, or execute. These tools give you the power to manipulate code during run time. You write code that examines running algorithms, or injects new capabilities. In more advanced scenarios, you modify running algorithms and even translate C# expressions into another form for execution in another environment. + +You compile and run code represented by expression trees. Building and running expression trees enables dynamic modification of executable code, the execution of LINQ queries in various databases, and the creation of dynamic queries. For more information about expression trees in LINQ, see [How to use expression trees to build dynamic queries](../../programming-guide/concepts/linq/how-to-use-expression-trees-to-build-dynamic-queries.md). + +Expression trees are also used in the dynamic language runtime (DLR) to provide interoperability between dynamic languages and .NET and to enable compiler writers to emit expression trees instead of Microsoft intermediate language (MSIL). For more information about the DLR, see [Dynamic Language Runtime Overview](../../../framework/reflection-and-codedom/dynamic-language-runtime-overview.md). + +You can have the C# or Visual Basic compiler create an expression tree for you based on an anonymous lambda expression, or you can create expression trees manually by using the <xref:System.Linq.Expressions> namespace. + +When a lambda expression is assigned to a variable of type <xref:System.Linq.Expressions.Expression%601>, the compiler emits code to build an expression tree that represents the lambda expression. + +The C# compiler generates expression trees only from expression lambdas (or single-line lambdas). It can't parse statement lambdas (or multi-line lambdas). For more information about lambda expressions in C#, see [Lambda Expressions](../../language-reference/operators/lambda-expressions.md). + +The following code examples demonstrate how to have the C# compiler create an expression tree that represents the lambda expression `num => num < 5`. + +```csharp +Expression<Func<int, bool>> lambda = num => num < 5; +``` + +You create expression trees in your code. You build the tree by creating each node and attaching the nodes into a tree structure. You learn how to create expressions in the article on [building expression trees](expression-trees-building.md). + +Expression trees are immutable. If you want to modify an expression tree, you must construct a new expression tree by copying the existing one and replacing nodes in it. You use an expression tree visitor to traverse the existing expression tree. For more information, see the article on [translating expression trees](./expression-trees-translating.md). + +Once you build an expression tree, you [execute the code represented by the expression tree](expression-trees-execution.md). + +## Limitations + +There are some newer C# language elements that don't translate well into expression trees. Expression trees can't contain `await` expressions, or `async` lambda expressions. Many of the features added in C# 6 and later don't appear exactly as written in expression trees. Instead, newer features are exposed in expression trees in the equivalent, earlier syntax, where possible. Other constructs aren't available. It means that code that interprets expression trees works the same when new language features are introduced. However, the expression trees Even with these limitations, expression trees do enable you to create dynamic algorithms that rely on interpreting and modifying code that is represented as a data structure. It enables rich libraries such as Entity Framework to accomplish what they do. + +Expression trees won't support new expression node types. It would be a breaking change for all libraries interpreting expression trees to introduce new node types. The following list includes most C# language elements that can't be used: + +- [Conditional methods](../../language-reference/preprocessor-directives.md#conditional-compilation) that have been removed +- [`base` access](../../language-reference/keywords/base.md) +- Method group expressions, including [*address-of* (`&`)](../../language-reference/operators/pointer-related-operators.md) a method group, and anonymous method expressions +- References to [local functions](../../programming-guide/classes-and-structs/local-functions.md) +- Statements, including assignment (`=`) and statement bodied expressions +- [Partial methods](../../language-reference/keywords/partial-method.md) with only a defining declaration +- [Unsafe pointer operations](../../language-reference/unsafe-code.md#pointer-types) +- [`dynamic` operations](../../language-reference/builtin-types/reference-types.md#the-dynamic-type) +- [Coalescing operators with `null` or `default` literal left side, null coalescing assignment](../../language-reference/operators/assignment-operator.md#null-coalescing-assignment), and the [null propagating operator (`?.`)](../../language-reference/operators/null-coalescing-operator.md) +- [Multi-dimensional array initializers](../../programming-guide/arrays/multidimensional-arrays.md), [indexed properties, and dictionary initializers](../../programming-guide/classes-and-structs/object-and-collection-initializers.md#collection-initializers) +- [`throw` expressions](../../language-reference/keywords/throw.md#the-throw-expression) +- Accessing [`static virtual` or `abstract` interface members](../../language-reference/keywords/interface.md#static-abstract-and-virtual-members) +- Lambda expressions that have [attributes](../../language-reference/operators/lambda-expressions.md#attributes) +- [Interpolated strings](../../language-reference/tokens/interpolated.md) +- UTF-8 string conversions or [UTF-8 string literals](../../language-reference/builtin-types/reference-types.md#utf-8-string-literals) +- Method invocations using [variable arguments](../../language-reference/keywords/params.md), [named arguments or optional arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md) +- Expressions using <xref:System.Index?displayProperty=nameWithType> or <xref:System.Range?displayProperty=nameWithType>, [index "from end" (`^`) operator](../../language-reference/operators/member-access-operators.md#index-from-end-operator-) or [range expressions (`..`)](../../language-reference/operators/member-access-operators.md#range-operator-) +- [`async` lambda expressions or `await` expressions](../../language-reference/operators/lambda-expressions.md#async-lambdas), including [`await foreach` and `await using`](../../language-reference/operators/await.md#asynchronous-streams-and-disposables) +- [Tuple literals, tuple conversions, tuple `==` or `!=`, or `with` expressions](../../language-reference/builtin-types/value-tuples.md) +- [Discards (`_`)](../../fundamentals/functional/discards.md), [deconstructing assignment](../../fundamentals/functional/deconstruct.md), [pattern matching `is` operator or the pattern matching `switch` expression](../../language-reference/operators/patterns.md) +- COM call with `ref` omitted on the arguments +- [`ref`](../../language-reference/keywords/ref.md), [`in`](../../language-reference/keywords/in-parameter-modifier.md) or [`out`](../../language-reference/keywords/out-parameter-modifier.md) parameters, `ref` return values, `out` arguments, or any values of [`ref struct` type](../../language-reference/builtin-types/ref-struct.md) diff --git a/docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/debugview-expression-tree.png b/docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/debugview-expression-tree.png similarity index 100% rename from docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/debugview-expression-tree.png rename to docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/debugview-expression-tree.png diff --git a/docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/expression-tree-visualizer.png b/docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/expression-tree-visualizer.png similarity index 100% rename from docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/expression-tree-visualizer.png rename to docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/expression-tree-visualizer.png diff --git a/docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/expression-tree-visualizers.png b/docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/expression-tree-visualizers.png similarity index 100% rename from docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/expression-tree-visualizers.png rename to docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/expression-tree-visualizers.png diff --git a/docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/readable-expressions-visualizer.png b/docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/readable-expressions-visualizer.png similarity index 100% rename from docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/readable-expressions-visualizer.png rename to docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/readable-expressions-visualizer.png diff --git a/docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/string-visualizer-debugview.png b/docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/string-visualizer-debugview.png similarity index 100% rename from docs/csharp/programming-guide/concepts/expression-trees/media/debugging-expression-trees-in-visual-studio/string-visualizer-debugview.png rename to docs/csharp/advanced-topics/expression-trees/media/debugging-expression-trees-in-visual-studio/string-visualizer-debugview.png diff --git a/docs/csharp/advanced-topics/expression-trees/snippets/BuildExpressions.cs b/docs/csharp/advanced-topics/expression-trees/snippets/BuildExpressions.cs new file mode 100644 index 0000000000000..c29027ec71811 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/snippets/BuildExpressions.cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; + +namespace ExpressionTreeExample; +public static class BuildExpressions +{ + public static void AddExpression() + { + // <AddExpression> + Expression<Func<int>> sum = () => 1 + 2; + // </AddExpression> + } + + public static void BuildAddExpression() + { + // <BuildConstantLeaves> + var one = Expression.Constant(1, typeof(int)); + var two = Expression.Constant(2, typeof(int)); + // </BuildConstantLeaves> + + // <BuildAdditionNode> + var addition = Expression.Add(one, two); + // </BuildAdditionNode> + + // <BuildLambdaExpression> + var lambda = Expression.Lambda(addition); + // </BuildLambdaExpression> + + // <SingleExpression> + var lambda2 = Expression.Lambda( + Expression.Add( + Expression.Constant(1, typeof(int)), + Expression.Constant(2, typeof(int)) + ) + ); + // </SingleExpression> + } + + public static void SquareRootLambda() + { + // <SquareRootLambda> + Expression<Func<double, double, double>> distanceCalc = + (x, y) => Math.Sqrt(x * x + y * y); + // </SquareRootLambda> + } + + public static void BuildSquareRoot() + { + // <BuildParameters> + var xParameter = Expression.Parameter(typeof(double), "x"); + var yParameter = Expression.Parameter(typeof(double), "y"); + // </BuildParameters> + + // <BuildSumOfSquare> + var xSquared = Expression.Multiply(xParameter, xParameter); + var ySquared = Expression.Multiply(yParameter, yParameter); + var sum = Expression.Add(xSquared, ySquared); + // </BuildSumOfSquare> + + // <DistanceMethod> + var sqrtMethod = typeof(Math).GetMethod("Sqrt", new[] { typeof(double) }) ?? throw new InvalidOperationException("Math.Sqrt not found!"); + var distance = Expression.Call(sqrtMethod, sum); + // </DistanceMethod> + + // <CreateLambda> + var distanceLambda = Expression.Lambda( + distance, + xParameter, + yParameter); + // </CreateLambda> + } + + public static void FactorialFunc() + { + // <FactorialFunc> + Func<int, int> factorialFunc = (n) => + { + var res = 1; + while (n > 1) + { + res = res * n; + n--; + } + return res; + }; + // </FactorialFunc> + } + + public static void BuildFactorialFunc() + { + // <BuildFactorialFunc> + var nArgument = Expression.Parameter(typeof(int), "n"); + var result = Expression.Variable(typeof(int), "result"); + + // Creating a label that represents the return value + LabelTarget label = Expression.Label(typeof(int)); + + var initializeResult = Expression.Assign(result, Expression.Constant(1)); + + // This is the inner block that performs the multiplication, + // and decrements the value of 'n' + var block = Expression.Block( + Expression.Assign(result, + Expression.Multiply(result, nArgument)), + Expression.PostDecrementAssign(nArgument) + ); + + // Creating a method body. + BlockExpression body = Expression.Block( + new[] { result }, + initializeResult, + Expression.Loop( + Expression.IfThenElse( + Expression.GreaterThan(nArgument, Expression.Constant(1)), + block, + Expression.Break(label, result) + ), + label + ) + ); + // </BuildFactorialFunc> + } + + public static void BuildRelationalExpression() + { + // <BuildRelationalExpression> + // Manually build the expression tree for + // the lambda expression num => num < 5. + ParameterExpression numParam = Expression.Parameter(typeof(int), "num"); + ConstantExpression five = Expression.Constant(5, typeof(int)); + BinaryExpression numLessThanFive = Expression.LessThan(numParam, five); + Expression<Func<int, bool>> lambda1 = + Expression.Lambda<Func<int, bool>>( + numLessThanFive, + new ParameterExpression[] { numParam }); + // </BuildRelationalExpression> + } + + public static void BuildFactorial() + { + // <BuildFactorial> + // Creating a parameter expression. + ParameterExpression value = Expression.Parameter(typeof(int), "value"); + + // Creating an expression to hold a local variable. + ParameterExpression result = Expression.Parameter(typeof(int), "result"); + + // Creating a label to jump to from a loop. + LabelTarget label = Expression.Label(typeof(int)); + + // Creating a method body. + BlockExpression block = Expression.Block( + // Adding a local variable. + new[] { result }, + // Assigning a constant to a local variable: result = 1 + Expression.Assign(result, Expression.Constant(1)), + // Adding a loop. + Expression.Loop( + // Adding a conditional block into the loop. + Expression.IfThenElse( + // Condition: value > 1 + Expression.GreaterThan(value, Expression.Constant(1)), + // If true: result *= value -- + Expression.MultiplyAssign(result, + Expression.PostDecrementAssign(value)), + // If false, exit the loop and go to the label. + Expression.Break(label, result) + ), + // Label to jump to. + label + ) + ); + + // Compile and execute an expression tree. + int factorial = Expression.Lambda<Func<int, int>>(block, value).Compile()(5); + + Console.WriteLine(factorial); + // Prints 120. + // </BuildFactorial> + } +} diff --git a/docs/csharp/advanced-topics/expression-trees/snippets/ExpressionTreeExample.csproj b/docs/csharp/advanced-topics/expression-trees/snippets/ExpressionTreeExample.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/snippets/ExpressionTreeExample.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/advanced-topics/expression-trees/snippets/InterpretExpressions.cs b/docs/csharp/advanced-topics/expression-trees/snippets/InterpretExpressions.cs new file mode 100644 index 0000000000000..a9e39623a98e7 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/snippets/InterpretExpressions.cs @@ -0,0 +1,117 @@ +using System.Linq.Expressions; +public static class InterpretExpressions +{ + public static void ParseExpression() + { + // <ParseExpression> + // Add the following using directive to your code file: + // using System.Linq.Expressions; + + // Create an expression tree. + Expression<Func<int, bool>> exprTree = num => num < 5; + + // Decompose the expression tree. + ParameterExpression param = (ParameterExpression)exprTree.Parameters[0]; + BinaryExpression operation = (BinaryExpression)exprTree.Body; + ParameterExpression left = (ParameterExpression)operation.Left; + ConstantExpression right = (ConstantExpression)operation.Right; + + Console.WriteLine("Decomposed expression: {0} => {1} {2} {3}", + param.Name, left.Name, operation.NodeType, right.Value); + + // This code produces the following output: + + // Decomposed expression: num => num LessThan 5 + // </ParseExpression> + } + + public static void VisitConstantExpression() + { + // <VisitConstant> + var constant = Expression.Constant(24, typeof(int)); + + Console.WriteLine($"This is a/an {constant.NodeType} expression type"); + Console.WriteLine($"The type of the constant value is {constant.Type}"); + Console.WriteLine($"The value of the constant value is {constant.Value}"); + // </VisitConstant> + } + + public static void VisitAddition() + { + // <VisitAddition> + Expression<Func<int, int, int>> addition = (a, b) => a + b; + + Console.WriteLine($"This expression is a {addition.NodeType} expression type"); + Console.WriteLine($"The name of the lambda is {((addition.Name == null) ? "<null>" : addition.Name)}"); + Console.WriteLine($"The return type is {addition.ReturnType.ToString()}"); + Console.WriteLine($"The expression has {addition.Parameters.Count} arguments. They are:"); + foreach (var argumentExpression in addition.Parameters) + { + Console.WriteLine($"\tParameter Type: {argumentExpression.Type.ToString()}, Name: {argumentExpression.Name}"); + } + + var additionBody = (BinaryExpression)addition.Body; + Console.WriteLine($"The body is a {additionBody.NodeType} expression"); + Console.WriteLine($"The left side is a {additionBody.Left.NodeType} expression"); + var left = (ParameterExpression)additionBody.Left; + Console.WriteLine($"\tParameter Type: {left.Type.ToString()}, Name: {left.Name}"); + Console.WriteLine($"The right side is a {additionBody.Right.NodeType} expression"); + var right = (ParameterExpression)additionBody.Right; + Console.WriteLine($"\tParameter Type: {right.Type.ToString()}, Name: {right.Name}"); + // </VisitAddition> + } + + public static void AdditionExamples() + { + // <NoParens> + Expression<Func<int>> sum = () => 1 + 2 + 3 + 4; + // </NoParens> + + var visitor = new Visitors.LambdaVisitor(sum); + visitor.Visit("Sum: "); + + + // <ParensPermutations> + Expression<Func<int>> sum1 = () => 1 + (2 + (3 + 4)); + Expression<Func<int>> sum2 = () => ((1 + 2) + 3) + 4; + + Expression<Func<int>> sum3 = () => (1 + 2) + (3 + 4); + Expression<Func<int>> sum4 = () => 1 + ((2 + 3) + 4); + Expression<Func<int>> sum5 = () => (1 + (2 + 3)) + 4; + // </ParensPermutations> + } + + public static void VariableAddition() + { + // <VariableAddition> + Expression<Func<int, int>> sum = (a) => 1 + a + 3 + 4; + // </VariableAddition> + + var visitor = new Visitors.LambdaVisitor(sum); + visitor.Visit("Sum Variable: "); + } + + public static void VariableParensAddition() + { + // <VariableParensAddition> + Expression<Func<int, int, int>> sum3 = (a, b) => (1 + a) + (3 + b); + // </VariableParensAddition> + + var visitor = new Visitors.LambdaVisitor(sum3 ); + visitor.Visit("Sum Parens Variable: "); + } + + public static void FactorialVisitor() + { + // <FactorialVisitor> + Expression<Func<int, int>> factorial = (n) => + n == 0 ? + 1 : + Enumerable.Range(1, n).Aggregate((product, factor) => product * factor); + // </FactorialVisitor> + + Visitors2.LambdaVisitor visitor = new Visitors2.LambdaVisitor(factorial); + visitor.Visit("Factorial: "); + + } +} diff --git a/docs/csharp/advanced-topics/expression-trees/snippets/Program.cs b/docs/csharp/advanced-topics/expression-trees/snippets/Program.cs new file mode 100644 index 0000000000000..dc99efbce3a10 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/snippets/Program.cs @@ -0,0 +1,16 @@ +using ExpressionTreeExample; + +RunExpressionTrees.ConvertToDelegate(); +RunExpressionTrees.CreateExpressionTree(); +RunExpressionTrees.BuildExpressionTree(); + +InterpretExpressions.ParseExpression(); +InterpretExpressions.VisitConstantExpression(); +InterpretExpressions.VisitAddition(); +InterpretExpressions.AdditionExamples(); +InterpretExpressions.VariableAddition(); +InterpretExpressions.VariableParensAddition(); +InterpretExpressions.FactorialVisitor(); + +TranslateExpressions.TraverseAndCreate(); +TranslateExpressions.ModifyExpression(); diff --git a/docs/csharp/advanced-topics/expression-trees/snippets/RunExpressionTrees.cs b/docs/csharp/advanced-topics/expression-trees/snippets/RunExpressionTrees.cs new file mode 100644 index 0000000000000..286db92638ba4 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/snippets/RunExpressionTrees.cs @@ -0,0 +1,102 @@ +using System.Linq.Expressions; + +public static class RunExpressionTrees +{ + public static void ConvertToDelegate() + { + // <ConvertToDelegate> + Expression<Func<int>> add = () => 1 + 2; + var func = add.Compile(); // Create Delegate + var answer = func(); // Invoke Delegate + Console.WriteLine(answer); + // </ConvertToDelegate> + } + + public static void CreateExpressionTree() + { + // <CreateExpressionTree> + Expression<Func<int, bool>> expr = num => num < 5; + + // Compiling the expression tree into a delegate. + Func<int, bool> result = expr.Compile(); + + // Invoking the delegate and writing the result to the console. + Console.WriteLine(result(4)); + + // Prints True. + + // You can also use simplified syntax + // to compile and run an expression tree. + // The following line can replace two previous statements. + Console.WriteLine(expr.Compile()(4)); + + // Also prints True. + // </CreateExpressionTree> + } + + public static void BuildExpressionTree() + { + // <ConvertToFund> + // The expression tree to execute. + BinaryExpression be = Expression.Power(Expression.Constant(2d), Expression.Constant(3d)); + + // Create a lambda expression. + Expression<Func<double>> le = Expression.Lambda<Func<double>>(be); + + // Compile the lambda expression. + Func<double> compiledExpression = le.Compile(); + + // Execute the lambda expression. + double result = compiledExpression(); + + // Display the result. + Console.WriteLine(result); + + // This code produces the following output: + // 8 + // </ConvertToFund> + } + + // <CreateBoundFunc> + private static Func<int, int> CreateBoundFunc() + { + var constant = 5; // constant is captured by the expression tree + Expression<Func<int, int>> expression = (b) => constant + b; + var rVal = expression.Compile(); + return rVal; + } + // </CreateBoundFunc> + + // <CreateBoundResource> + private static Func<int, int> CreateBoundResource() + { + using (var constant = new Resource()) // constant is captured by the expression tree + { + Expression<Func<int, int>> expression = (b) => constant.Argument + b; + var rVal = expression.Compile(); + return rVal; + } + } + // </CreateBoundResource> +} + +// <ResourceClass> +public class Resource : IDisposable +{ + private bool isDisposed = false; + public int Argument + { + get + { + if (!isDisposed) + return 5; + else throw new ObjectDisposedException("Resource"); + } + } + + public void Dispose() + { + isDisposed = true; + } +} +// </ResourceClass> diff --git a/docs/csharp/advanced-topics/expression-trees/snippets/TranslateExpressions.cs b/docs/csharp/advanced-topics/expression-trees/snippets/TranslateExpressions.cs new file mode 100644 index 0000000000000..4c0c3bec91cb6 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/snippets/TranslateExpressions.cs @@ -0,0 +1,151 @@ +using System.Linq.Expressions; + +namespace ExpressionTreeExample; +public static class TranslateExpressions +{ + // <ReplaceNode> + private static Expression ReplaceNodes(Expression original) + { + if (original.NodeType == ExpressionType.Constant) + { + return Expression.Multiply(original, Expression.Constant(10)); + } + else if (original.NodeType == ExpressionType.Add) + { + var binaryExpression = (BinaryExpression)original; + return Expression.Add( + ReplaceNodes(binaryExpression.Left), + ReplaceNodes(binaryExpression.Right)); + } + return original; + } + // </ReplaceNode> + + public static void TranslateNode() + { + // <TranslateNode> + var one = Expression.Constant(1, typeof(int)); + var two = Expression.Constant(2, typeof(int)); + var addition = Expression.Add(one, two); + var sum = ReplaceNodes(addition); + var executableFunc = Expression.Lambda(sum); + + var func = (Func<int>)executableFunc.Compile(); + var answer = func(); + Console.WriteLine(answer); + // </TranslateNode> + } + + public static void TraverseAndCreate() + { + // <TraverseAndCreateNode> + var one = Expression.Constant(1, typeof(int)); + var two = Expression.Constant(2, typeof(int)); + var three = Expression.Constant(3, typeof(int)); + var four = Expression.Constant(4, typeof(int)); + var addition = Expression.Add(one, two); + var add2 = Expression.Add(three, four); + var sum = Expression.Add(addition, add2); + + // Declare the delegate, so you can call it + // from itself recursively: + Func<Expression, int> aggregate = null!; + // Aggregate, return constants, or the sum of the left and right operand. + // Major simplification: Assume every binary expression is an addition. + aggregate = (exp) => + exp.NodeType == ExpressionType.Constant ? + (int)((ConstantExpression)exp).Value : + aggregate(((BinaryExpression)exp).Left) + aggregate(((BinaryExpression)exp).Right); + + var theSum = aggregate(sum); + Console.WriteLine(theSum); + // </TraverseAndCreateNode> + + Aggregate(sum); + + // <sum1Expression> + Expression<Func<int>> sum1 = () => 1 + (2 + (3 + 4)); + // </sum1Expression> + Console.WriteLine(); + Console.WriteLine("sum1 aggregate"); + Aggregate(sum); + } + + // <Aggregate> + private static int Aggregate(Expression exp) + { + if (exp.NodeType == ExpressionType.Constant) + { + var constantExp = (ConstantExpression)exp; + Console.Error.WriteLine($"Found Constant: {constantExp.Value}"); + if (constantExp.Value is int value) + { + return value; + } + else + { + return 0; + } + } + else if (exp.NodeType == ExpressionType.Add) + { + var addExp = (BinaryExpression)exp; + Console.Error.WriteLine("Found Addition Expression"); + Console.Error.WriteLine("Computing Left node"); + var leftOperand = Aggregate(addExp.Left); + Console.Error.WriteLine($"Left is: {leftOperand}"); + Console.Error.WriteLine("Computing Right node"); + var rightOperand = Aggregate(addExp.Right); + Console.Error.WriteLine($"Right is: {rightOperand}"); + var sum = leftOperand + rightOperand; + Console.Error.WriteLine($"Computed sum: {sum}"); + return sum; + } + else throw new NotSupportedException("Haven't written this yet"); + } + // </Aggregate> + + + public static void ModifyExpression() + { + // <ModifyExpression> + Expression<Func<string, bool>> expr = name => name.Length > 10 && name.StartsWith("G"); + Console.WriteLine(expr); + + AndAlsoModifier treeModifier = new AndAlsoModifier(); + Expression modifiedExpr = treeModifier.Modify((Expression)expr); + + Console.WriteLine(modifiedExpr); + + /* This code produces the following output: + + name => ((name.Length > 10) && name.StartsWith("G")) + name => ((name.Length > 10) || name.StartsWith("G")) + */ + // </ModifyExpression> + } +} + +// <AndAlsoModifier> +public class AndAlsoModifier : ExpressionVisitor +{ + public Expression Modify(Expression expression) + { + return Visit(expression); + } + + protected override Expression VisitBinary(BinaryExpression b) + { + if (b.NodeType == ExpressionType.AndAlso) + { + Expression left = this.Visit(b.Left); + Expression right = this.Visit(b.Right); + + // Make this binary expression an OrElse operation instead of an AndAlso operation. + return Expression.MakeBinary(ExpressionType.OrElse, left, right, b.IsLiftedToNull, b.Method); + } + + return base.VisitBinary(b); + } +} +// </AndAlsoModifier> diff --git a/docs/csharp/advanced-topics/expression-trees/snippets/Visitors.cs b/docs/csharp/advanced-topics/expression-trees/snippets/Visitors.cs new file mode 100644 index 0000000000000..b2cc46ddaa528 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/snippets/Visitors.cs @@ -0,0 +1,97 @@ +using System.Linq.Expressions; + +namespace Visitors; +// Base Visitor class: +public abstract class Visitor +{ + private readonly Expression node; + + protected Visitor(Expression node) => this.node = node; + + public abstract void Visit(string prefix); + + public ExpressionType NodeType => node.NodeType; + public static Visitor CreateFromExpression(Expression node) => + node.NodeType switch + { + ExpressionType.Constant => new ConstantVisitor((ConstantExpression)node), + ExpressionType.Lambda => new LambdaVisitor((LambdaExpression)node), + ExpressionType.Parameter => new ParameterVisitor((ParameterExpression)node), + ExpressionType.Add => new BinaryVisitor((BinaryExpression)node), + _ => throw new NotImplementedException($"Node not processed yet: {node.NodeType}"), + }; +} + +// Lambda Visitor +public class LambdaVisitor : Visitor +{ + private readonly LambdaExpression node; + public LambdaVisitor(LambdaExpression node) : base(node) => this.node = node; + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This expression is a {NodeType} expression type"); + Console.WriteLine($"{prefix}The name of the lambda is {((node.Name == null) ? "<null>" : node.Name)}"); + Console.WriteLine($"{prefix}The return type is {node.ReturnType}"); + Console.WriteLine($"{prefix}The expression has {node.Parameters.Count} argument(s). They are:"); + // Visit each parameter: + foreach (var argumentExpression in node.Parameters) + { + var argumentVisitor = CreateFromExpression(argumentExpression); + argumentVisitor.Visit(prefix + "\t"); + } + Console.WriteLine($"{prefix}The expression body is:"); + // Visit the body: + var bodyVisitor = CreateFromExpression(node.Body); + bodyVisitor.Visit(prefix + "\t"); + } +} + +// Binary Expression Visitor: +public class BinaryVisitor : Visitor +{ + private readonly BinaryExpression node; + public BinaryVisitor(BinaryExpression node) : base(node) => this.node = node; + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This binary expression is a {NodeType} expression"); + var left = CreateFromExpression(node.Left); + Console.WriteLine($"{prefix}The Left argument is:"); + left.Visit(prefix + "\t"); + var right = CreateFromExpression(node.Right); + Console.WriteLine($"{prefix}The Right argument is:"); + right.Visit(prefix + "\t"); + } +} + +// Parameter visitor: +public class ParameterVisitor : Visitor +{ + private readonly ParameterExpression node; + public ParameterVisitor(ParameterExpression node) : base(node) + { + this.node = node; + } + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This is an {NodeType} expression type"); + Console.WriteLine($"{prefix}Type: {node.Type}, Name: {node.Name}, ByRef: {node.IsByRef}"); + } +} + +// Constant visitor: +public class ConstantVisitor : Visitor +{ + private readonly ConstantExpression node; + public ConstantVisitor(ConstantExpression node) : base(node) => this.node = node; + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This is an {NodeType} expression type"); + Console.WriteLine($"{prefix}The type of the constant value is {node.Type}"); + Console.WriteLine($"{prefix}The value of the constant value is {node.Value}"); + } +} + diff --git a/docs/csharp/advanced-topics/expression-trees/snippets/Visitors2.cs b/docs/csharp/advanced-topics/expression-trees/snippets/Visitors2.cs new file mode 100644 index 0000000000000..808258d8adec4 --- /dev/null +++ b/docs/csharp/advanced-topics/expression-trees/snippets/Visitors2.cs @@ -0,0 +1,160 @@ +using System.Linq.Expressions; + +namespace Visitors2; +// Base Visitor class: +public abstract class Visitor +{ + private readonly Expression node; + + protected Visitor(Expression node) => this.node = node; + + public abstract void Visit(string prefix); + + public ExpressionType NodeType => node.NodeType; + + // <UpdatedVisitor> + public static Visitor CreateFromExpression(Expression node) => + node.NodeType switch + { + ExpressionType.Constant => new ConstantVisitor((ConstantExpression)node), + ExpressionType.Lambda => new LambdaVisitor((LambdaExpression)node), + ExpressionType.Parameter => new ParameterVisitor((ParameterExpression)node), + ExpressionType.Add => new BinaryVisitor((BinaryExpression)node), + ExpressionType.Equal => new BinaryVisitor((BinaryExpression)node), + ExpressionType.Multiply => new BinaryVisitor((BinaryExpression) node), + ExpressionType.Conditional => new ConditionalVisitor((ConditionalExpression) node), + ExpressionType.Call => new MethodCallVisitor((MethodCallExpression) node), + _ => throw new NotImplementedException($"Node not processed yet: {node.NodeType}"), + }; + // </UpdatedVisitor> +} + +// Lambda Visitor +public class LambdaVisitor : Visitor +{ + private readonly LambdaExpression node; + public LambdaVisitor(LambdaExpression node) : base(node) => this.node = node; + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This expression is a {NodeType} expression type"); + Console.WriteLine($"{prefix}The name of the lambda is {((node.Name == null) ? "<null>" : node.Name)}"); + Console.WriteLine($"{prefix}The return type is {node.ReturnType}"); + Console.WriteLine($"{prefix}The expression has {node.Parameters.Count} argument(s). They are:"); + // Visit each parameter: + foreach (var argumentExpression in node.Parameters) + { + var argumentVisitor = CreateFromExpression(argumentExpression); + argumentVisitor.Visit(prefix + "\t"); + } + Console.WriteLine($"{prefix}The expression body is:"); + // Visit the body: + var bodyVisitor = CreateFromExpression(node.Body); + bodyVisitor.Visit(prefix + "\t"); + } +} + +// Binary Expression Visitor: +public class BinaryVisitor : Visitor +{ + private readonly BinaryExpression node; + public BinaryVisitor(BinaryExpression node) : base(node) => this.node = node; + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This binary expression is a {NodeType} expression"); + var left = CreateFromExpression(node.Left); + Console.WriteLine($"{prefix}The Left argument is:"); + left.Visit(prefix + "\t"); + var right = CreateFromExpression(node.Right); + Console.WriteLine($"{prefix}The Right argument is:"); + right.Visit(prefix + "\t"); + } +} + +// Parameter visitor: +public class ParameterVisitor : Visitor +{ + private readonly ParameterExpression node; + public ParameterVisitor(ParameterExpression node) : base(node) + { + this.node = node; + } + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This is an {NodeType} expression type"); + Console.WriteLine($"{prefix}Type: {node.Type}, Name: {node.Name}, ByRef: {node.IsByRef}"); + } +} + +// Constant visitor: +public class ConstantVisitor : Visitor +{ + private readonly ConstantExpression node; + public ConstantVisitor(ConstantExpression node) : base(node) => this.node = node; + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This is an {NodeType} expression type"); + Console.WriteLine($"{prefix}The type of the constant value is {node.Type}"); + Console.WriteLine($"{prefix}The value of the constant value is {node.Value}"); + } +} + +// <NewNodes> +public class ConditionalVisitor : Visitor +{ + private readonly ConditionalExpression node; + public ConditionalVisitor(ConditionalExpression node) : base(node) + { + this.node = node; + } + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This expression is a {NodeType} expression"); + var testVisitor = Visitor.CreateFromExpression(node.Test); + Console.WriteLine($"{prefix}The Test for this expression is:"); + testVisitor.Visit(prefix + "\t"); + var trueVisitor = Visitor.CreateFromExpression(node.IfTrue); + Console.WriteLine($"{prefix}The True clause for this expression is:"); + trueVisitor.Visit(prefix + "\t"); + var falseVisitor = Visitor.CreateFromExpression(node.IfFalse); + Console.WriteLine($"{prefix}The False clause for this expression is:"); + falseVisitor.Visit(prefix + "\t"); + } +} + +public class MethodCallVisitor : Visitor +{ + private readonly MethodCallExpression node; + public MethodCallVisitor(MethodCallExpression node) : base(node) + { + this.node = node; + } + + public override void Visit(string prefix) + { + Console.WriteLine($"{prefix}This expression is a {NodeType} expression"); + if (node.Object == null) + Console.WriteLine($"{prefix}This is a static method call"); + else + { + Console.WriteLine($"{prefix}The receiver (this) is:"); + var receiverVisitor = Visitor.CreateFromExpression(node.Object); + receiverVisitor.Visit(prefix + "\t"); + } + + var methodInfo = node.Method; + Console.WriteLine($"{prefix}The method name is {methodInfo.DeclaringType}.{methodInfo.Name}"); + // There is more here, like generic arguments, and so on. + Console.WriteLine($"{prefix}The Arguments are:"); + foreach (var arg in node.Arguments) + { + var argVisitor = Visitor.CreateFromExpression(arg); + argVisitor.Visit(prefix + "\t"); + } + } +} +// </NewNodes> diff --git a/docs/csharp/tutorials/default-interface-methods-versions.md b/docs/csharp/advanced-topics/interface-implementation/default-interface-methods-versions.md similarity index 81% rename from docs/csharp/tutorials/default-interface-methods-versions.md rename to docs/csharp/advanced-topics/interface-implementation/default-interface-methods-versions.md index da1eaa2f26b8d..dba13d7fd5169 100644 --- a/docs/csharp/tutorials/default-interface-methods-versions.md +++ b/docs/csharp/advanced-topics/interface-implementation/default-interface-methods-versions.md @@ -1,8 +1,7 @@ --- title: Safely update interfaces using default interface methods in C# description: This advanced tutorial explores how you can safely add new capabilities to existing interface definitions without breaking all classes and structs that implement that interface. -ms.date: 11/01/2022 -ms.technology: csharp-advanced-concepts +ms.date: 03/17/2023 --- # Tutorial: Update interfaces with default interface methods @@ -18,7 +17,7 @@ In this tutorial, you'll learn how to: ## Prerequisites -You’ll need to set up your machine to run .NET, including the C# compiler. The C# compiler is available with [Visual Studio 2022](https://visualstudio.microsoft.com/downloads) or the [.NET SDK](https://dotnet.microsoft.com/download). +You need to set up your machine to run .NET, including the C# compiler. The C# compiler is available with [Visual Studio 2022](https://visualstudio.microsoft.com/downloads) or the [.NET SDK](https://dotnet.microsoft.com/download). ## Scenario overview @@ -34,7 +33,7 @@ From those interfaces, the team could build a library for their users to create Now, it's time to upgrade the library for the next release. One of the requested features enables a loyalty discount for customers that have lots of orders. This new loyalty discount gets applied whenever a customer makes an order. The specific discount is a property of each individual customer. Each implementation of `ICustomer` can set different rules for the loyalty discount. -The most natural way to add this functionality is to enhance the `ICustomer` interface with a method to apply any loyalty discount. This design suggestion caused concern among experienced developers: "Interfaces are immutable once they've been released! This is a breaking change!" *Default interface implementations* for upgrading interfaces. The library authors can add new members to the interface and provide a default implementation for those members. +The most natural way to add this functionality is to enhance the `ICustomer` interface with a method to apply any loyalty discount. This design suggestion caused concern among experienced developers: "Interfaces are immutable once they've been released! Don't make a breaking change!" *Default interface implementations* for upgrading interfaces. The library authors can add new members to the interface and provide a default implementation for those members. Default interface implementations enable developers to upgrade an interface while still enabling any implementors to override that implementation. Users of the library can accept the default implementation as a non-breaking change. If their business rules are different, they can override. @@ -42,7 +41,7 @@ Default interface implementations enable developers to upgrade an interface whil The team agreed on the most likely default implementation: a loyalty discount for customers. -The upgrade should provide the functionality to set two properties: the number of orders needed to be eligible for the discount, and the percentage of the discount. This makes it a perfect scenario for default interface methods. You can add a method to the `ICustomer` interface, and provide the most likely implementation. All existing, and any new implementations can use the default implementation, or provide their own. +The upgrade should provide the functionality to set two properties: the number of orders needed to be eligible for the discount, and the percentage of the discount. These features make it a perfect scenario for default interface methods. You can add a method to the `ICustomer` interface, and provide the most likely implementation. All existing, and any new implementations can use the default implementation, or provide their own. First, add the new method to the interface, including the body of the method: @@ -60,11 +59,11 @@ That cast from `SampleCustomer` to `ICustomer` is necessary. The `SampleCustomer ## Provide parameterization -That's a good start. But, the default implementation is too restrictive. Many consumers of this system may choose different thresholds for number of purchases, a different length of membership, or a different percentage discount. You can provide a better upgrade experience for more customers by providing a way to set those parameters. Let's add a static method that sets those three parameters controlling the default implementation: +The default implementation is too restrictive. Many consumers of this system may choose different thresholds for number of purchases, a different length of membership, or a different percentage discount. You can provide a better upgrade experience for more customers by providing a way to set those parameters. Let's add a static method that sets those three parameters controlling the default implementation: :::code language="csharp" source="./snippets/default-interface-members-versions/finished/customer-relationship/ICustomer.cs" id="SnippetLoyaltyDiscountVersionTwo"::: -There are many new language capabilities shown in that small code fragment. Interfaces can now include static members, including fields and methods. Different access modifiers are also enabled. The additional fields are private, the new method is public. Any of the modifiers are allowed on interface members. +There are many new language capabilities shown in that small code fragment. Interfaces can now include static members, including fields and methods. Different access modifiers are also enabled. The other fields are private, the new method is public. Any of the modifiers are allowed on interface members. Applications that use the general formula for computing the loyalty discount, but different parameters, don't need to provide a custom implementation; they can set the arguments through a static method. For example, the following code sets a "customer appreciation" that rewards any customer with more than one month's membership: @@ -84,4 +83,4 @@ In an implementation of a class that implements this interface, the override can You can see the entire finished code in our [samples repo on GitHub](https://github.com/dotnet/samples/tree/main/csharp/tutorials/default-interface-members-versions/finished/customer-relationship). You can get the starter application on our [samples repo on GitHub](https://github.com/dotnet/samples/tree/main/csharp/tutorials/default-interface-members-versions/starter/customer-relationship). -These new features mean that interfaces can be updated safely when there's a reasonable default implementation for those new members. Carefully design interfaces to express single functional ideas that can be implemented by multiple classes. That makes it easier to upgrade those interface definitions when new requirements are discovered for that same functional idea. +These new features mean that interfaces can be updated safely when there's a reasonable default implementation for those new members. Carefully design interfaces to express single functional ideas implemented by multiple classes. That makes it easier to upgrade those interface definitions when new requirements are discovered for that same functional idea. diff --git a/docs/csharp/tutorials/mixins-with-default-interface-methods.md b/docs/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods.md similarity index 83% rename from docs/csharp/tutorials/mixins-with-default-interface-methods.md rename to docs/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods.md index 9329c8e50317b..075304f167687 100644 --- a/docs/csharp/tutorials/mixins-with-default-interface-methods.md +++ b/docs/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods.md @@ -1,8 +1,7 @@ --- title: Create mixin types using default interface methods description: Using default interface members you can extend interfaces with optional default implementations for implementors. -ms.technology: csharp-advanced-concepts -ms.date: 11/01/2022 +ms.date: 03/17/2023 --- # Tutorial: Mix functionality in when creating classes using interfaces with default interface methods @@ -18,15 +17,15 @@ In this tutorial, you'll learn how to: ## Prerequisites -You’ll need to set up your machine to run .NET, including the C# compiler. The C# compiler is available with [Visual Studio 2022](https://visualstudio.microsoft.com/downloads), or the [.NET SDK](https://dotnet.microsoft.com/download/dotnet) or later. +You need to set up your machine to run .NET, including the C# compiler. The C# compiler is available with [Visual Studio 2022](https://visualstudio.microsoft.com/downloads), or the [.NET SDK](https://dotnet.microsoft.com/download/dotnet). ## Limitations of extension methods -One way you can implement behavior that appears as part of an interface is to define [extension methods](../programming-guide/classes-and-structs/extension-methods.md) that provide the default behavior. Interfaces declare a minimum set of members while providing a greater surface area for any class that implements that interface. For example, the extension methods in <xref:System.Linq.Enumerable> provide the implementation for any sequence to be the source of a LINQ query. +One way you can implement behavior that appears as part of an interface is to define [extension methods](../../programming-guide/classes-and-structs/extension-methods.md) that provide the default behavior. Interfaces declare a minimum set of members while providing a greater surface area for any class that implements that interface. For example, the extension methods in <xref:System.Linq.Enumerable> provide the implementation for any sequence to be the source of a LINQ query. -Extension methods are resolved at compile time, using the declared type of the variable. Classes that implement the interface can provide a better implementation for any extension method. Variable declarations must match the implementing type to enable the compiler to choose that implementation. When the compile-time type matches the interface, method calls resolve to the extension method. Another concern with extension methods is that those methods are accessible wherever the class containing the extension methods is accessible. Classes cannot declare if they should or should not provide features declared in extension methods. +Extension methods are resolved at compile time, using the declared type of the variable. Classes that implement the interface can provide a better implementation for any extension method. Variable declarations must match the implementing type to enable the compiler to choose that implementation. When the compile-time type matches the interface, method calls resolve to the extension method. Another concern with extension methods is that those methods are accessible wherever the class containing the extension methods is accessible. Classes can't declare if they should or shouldn't provide features declared in extension methods. -You can declare the default implementations as interface methods. Then, every class automatically uses the default implementation. Any class that can provide a better implementation can override the interface method definition with a better algorithm. In one sense, this technique sounds similar to how you could use [extension methods](../programming-guide/classes-and-structs/extension-methods.md). +You can declare the default implementations as interface methods. Then, every class automatically uses the default implementation. Any class that can provide a better implementation can override the interface method definition with a better algorithm. In one sense, this technique sounds similar to how you could use [extension methods](../../programming-guide/classes-and-structs/extension-methods.md). In this article, you'll learn how default interface implementations enable new scenarios. @@ -39,7 +38,7 @@ Consider a home automation application. You probably have many different types o Some of these extended capabilities could be emulated in devices that support the minimal set. That indicates providing a default implementation. For those devices that have more capabilities built in, the device software would use the native capabilities. For other lights, they could choose to implement the interface and use the default implementation. -Default interface members is a better solution for this scenario than extension methods. Class authors can control which interfaces they choose to implement. Those interfaces they choose are available as methods. In addition, because default interface methods are virtual by default, the method dispatch always chooses the implementation in the class. +Default interface members provide a better solution for this scenario than extension methods. Class authors can control which interfaces they choose to implement. Those interfaces they choose are available as methods. In addition, because default interface methods are virtual by default, the method dispatch always chooses the implementation in the class. Let's create the code to demonstrate these differences. @@ -63,7 +62,7 @@ You could add a basic implementation to the overhead light, but a better solutio :::code language="csharp" source="./snippets/mixins-with-default-interface-methods/ITimerLight.cs" id="SnippetTimerLightFinal"::: -By adding that change, the `OverheadLight` class can implement the timer function by declaring support for the interface: +The `OverheadLight` class can implement the timer function by declaring support for the interface: ```csharp public class OverheadLight : ITimerLight { } @@ -73,7 +72,7 @@ A different light type may support a more sophisticated protocol. It can provide :::code language="csharp" source="./snippets/mixins-with-default-interface-methods/HalogenLight.cs" id="SnippetHalogenLight"::: -Unlike overriding virtual class methods, the declaration of `TurnOnFor` in the `HalogenLight` class does not use the `override` keyword. +Unlike overriding virtual class methods, the declaration of `TurnOnFor` in the `HalogenLight` class doesn't use the `override` keyword. ## Mix and match capabilities @@ -97,7 +96,7 @@ The `HalogenLight` you created earlier doesn't support blinking. So, don't add t ## Detect the light types using pattern matching -Next, let's write some test code. You can make use of C#'s [pattern matching](../fundamentals/functional/pattern-matching.md) feature to determine a light's capabilities by examining which interfaces it supports. The following method exercises the supported capabilities of each light: +Next, let's write some test code. You can make use of C#'s [pattern matching](../../fundamentals/functional/pattern-matching.md) feature to determine a light's capabilities by examining which interfaces it supports. The following method exercises the supported capabilities of each light: :::code language="csharp" source="./snippets/mixins-with-default-interface-methods/Program.cs" id="SnippetTestLightFunctions"::: @@ -117,6 +116,6 @@ The default implementation assumes no power: These changes compile cleanly, even though the `ExtraFancyLight` declares support for the `ILight` interface and both derived interfaces, `ITimerLight` and `IBlinkingLight`. There's only one "closest" implementation declared in the `ILight` interface. Any class that declared an override would become the one "closest" implementation. You saw examples in the preceding classes that overrode the members of other derived interfaces. -Avoid overriding the same method in multiple derived interfaces. Doing so creates an ambiguous method call whenever a class implements both derived interfaces. The compiler can't pick a single better method so it issues an error. For example, if both the `IBlinkingLight` and `ITimerLight` implemented an override of `PowerStatus`, the `OverheadLight` would need to provide a more specific override. Otherwise, the compiler can't pick between the implementations in the two derived interfaces. You can usually avoid this situation by keeping interface definitions small and focused on one feature. In this scenario, each capability of a light is its own interface; multiple interfaces are only inherited by classes. +Avoid overriding the same method in multiple derived interfaces. Doing so creates an ambiguous method call whenever a class implements both derived interfaces. The compiler can't pick a single better method so it issues an error. For example, if both the `IBlinkingLight` and `ITimerLight` implemented an override of `PowerStatus`, the `OverheadLight` would need to provide a more specific override. Otherwise, the compiler can't pick between the implementations in the two derived interfaces. You can usually avoid this situation by keeping interface definitions small and focused on one feature. In this scenario, each capability of a light is its own interface; only classes inherit multiple interfaces. This sample shows one scenario where you can define discrete features that can be mixed into classes. You declare any set of supported functionality by declaring which interfaces a class supports. The use of virtual default interface methods enables classes to use or define a different implementation for any or all the interface methods. This language capability provides new ways to model the real-world systems you're building. Default interface methods provide a clearer way to express related classes that may mix and match different features using virtual implementations of those capabilities. diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/ICustomer.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/ICustomer.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/ICustomer.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/ICustomer.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/IOrder.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/IOrder.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/IOrder.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/IOrder.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/Program.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/Program.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/Program.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/Program.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/SampleCustomer.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/SampleCustomer.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/SampleCustomer.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/SampleCustomer.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/SampleOrder.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/SampleOrder.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/SampleOrder.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/SampleOrder.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/customer-relationship.csproj b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/customer-relationship.csproj similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/finished/customer-relationship/customer-relationship.csproj rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/finished/customer-relationship/customer-relationship.csproj diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/ICustomer.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/ICustomer.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/ICustomer.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/ICustomer.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/IOrder.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/IOrder.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/IOrder.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/IOrder.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/Program.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/Program.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/Program.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/Program.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/SampleCustomer.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/SampleCustomer.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/SampleCustomer.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/SampleCustomer.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/SampleOrder.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/SampleOrder.cs similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/SampleOrder.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/SampleOrder.cs diff --git a/docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/customer-relationship.csproj b/docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/customer-relationship.csproj similarity index 100% rename from docs/csharp/tutorials/snippets/default-interface-members-versions/starter/customer-relationship/customer-relationship.csproj rename to docs/csharp/advanced-topics/interface-implementation/snippets/default-interface-members-versions/starter/customer-relationship/customer-relationship.csproj diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/ExtraFancyLight.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/ExtraFancyLight.cs similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/ExtraFancyLight.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/ExtraFancyLight.cs diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/HalogenLight.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/HalogenLight.cs similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/HalogenLight.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/HalogenLight.cs diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/IBlinkingLight.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/IBlinkingLight.cs similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/IBlinkingLight.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/IBlinkingLight.cs diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/ILight.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/ILight.cs similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/ILight.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/ILight.cs diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/ITimerLight.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/ITimerLight.cs similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/ITimerLight.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/ITimerLight.cs diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/LEDLight.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/LEDLight.cs similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/LEDLight.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/LEDLight.cs diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/OverheadLight.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/OverheadLight.cs similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/OverheadLight.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/OverheadLight.cs diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/Program.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/Program.cs similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/Program.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/Program.cs diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/UnusedExampleCode.cs b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/UnusedExampleCode.cs similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/UnusedExampleCode.cs rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/UnusedExampleCode.cs diff --git a/docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/mixins-with-interfaces.csproj b/docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/mixins-with-interfaces.csproj similarity index 100% rename from docs/csharp/tutorials/snippets/mixins-with-default-interface-methods/mixins-with-interfaces.csproj rename to docs/csharp/advanced-topics/interface-implementation/snippets/mixins-with-default-interface-methods/mixins-with-interfaces.csproj diff --git a/docs/csharp/advanced-topics/interop/example-com-class.md b/docs/csharp/advanced-topics/interop/example-com-class.md new file mode 100644 index 0000000000000..369f17aad6585 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/example-com-class.md @@ -0,0 +1,32 @@ +--- +title: "Example COM Class" +description: Learn how to expose a class as a COM object in C#. This example adds code in a .cs file to a project and sets the Register for COM Interop property. +ms.date: 02/15/2023 +ms.topic: how-to +helpviewer_keywords: + - "examples [C#], COM classes" + - "COM, exposing C# objects to" +--- +# Example COM Class + +The following code is an example of a class that you would expose as a COM object. After you place this code in a .cs file added to your project, set the **Register for COM Interop** property to **True**. For more information, see [How to: Register a Component for COM Interop](/previous-versions/visualstudio/visual-studio-2010/w29wacsy(v=vs.100)). + +Exposing C# objects to COM requires declaring a class interface, an "events interface" if necessary, and the class itself. Class members must follow these rules to be visible to COM: + +- The class must be public. +- Properties, methods, and events must be public. +- Properties and methods must be declared on the class interface. +- Events must be declared in the event interface. + +Other public members in the class that you don't declare in these interfaces aren't visible to COM, but they're visible to other .NET objects. To expose properties and methods to COM, you must declare them on the class interface and mark them with a `DispId` attribute, and implement them in the class. The order in which you declare the members in the interface is the order used for the COM vtable. To expose events from your class, you must declare them on the events interface and mark them with a `DispId` attribute. The class shouldn't implement this interface. + +The class implements the class interface; it can implement more than one interface, but the first implementation is the default class interface. Implement the methods and properties exposed to COM here. They must be public and must match the declarations in the class interface. Also, declare the events raised by the class here. They must be public and must match the declarations in the events interface. + +## Example + +:::code language="csharp" source="./snippets/ExampleCOMClass/ExampleCOM.cs"::: + +## See also + +- [Interoperability](./index.md) +- [Build Page, Project Designer (C#)](/visualstudio/ide/reference/build-page-project-designer-csharp) diff --git a/docs/csharp/advanced-topics/interop/how-to-access-office-interop-objects.md b/docs/csharp/advanced-topics/interop/how-to-access-office-interop-objects.md new file mode 100644 index 0000000000000..dda97e915ba9e --- /dev/null +++ b/docs/csharp/advanced-topics/interop/how-to-access-office-interop-objects.md @@ -0,0 +1,147 @@ +--- +title: "How to access Office interop objects - C# Programming Guide" +description: Learn about C# features that simplify access to Office API objects. Use the new features to write code that creates and displays an Excel worksheet. +ms.topic: how-to +ms.date: 02/15/2023 +helpviewer_keywords: + - "optional parameters [C#], Office programming" + - "named and optional arguments [C#], Office programming" + - "dynamic [C#], Office programming" + - "optional arguments [C#], Office programming" + - "named arguments [C#], Office programming" + - "Office programming [C#]" +--- +# How to access Office interop objects + +C# has features that simplify access to Office API objects. The new features include named and optional arguments, a new type called `dynamic`, and the ability to pass arguments to reference parameters in COM methods as if they were value parameters. + +In this article, you use the new features to write code that creates and displays a Microsoft Office Excel worksheet. You write code to add an Office Word document that contains an icon that is linked to the Excel worksheet. + +To complete this walkthrough, you must have Microsoft Office Excel 2007 and Microsoft Office Word 2007, or later versions, installed on your computer. + +[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] + +[!INCLUDE[vsto_framework](../../includes/vsto-framework.md)] + +## To create a new console application + +1. Start Visual Studio. +1. On the **File** menu, point to **New**, and then select **Project**. The **New Project** dialog box appears. +1. In the **Installed Templates** pane, expand **C#**, and then select **Windows**. +1. Look at the top of the **New Project** dialog box to make sure to select **.NET Framework 4** (or later version) as a target framework. +1. In the **Templates** pane, select **Console Application**. +1. Type a name for your project in the **Name** field. +1. Select **OK**. + +The new project appears in **Solution Explorer**. + +## To add references + +1. In **Solution Explorer**, right-click your project's name and then select **Add Reference**. The **Add Reference** dialog box appears. +1. On the **Assemblies** page, select **Microsoft.Office.Interop.Word** in the **Component Name** list, and then hold down the CTRL key and select **Microsoft.Office.Interop.Excel**. If you don't see the assemblies, you may need to install them. See [How to: Install Office Primary Interop Assemblies](/visualstudio/vsto/how-to-install-office-primary-interop-assemblies). +1. Select **OK**. + +## To add necessary using directives + +In **Solution Explorer**, right-click the *Program.cs* file and then select **View Code**. Add the following `using` directives to the top of the code file: + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet1"::: + +## To create a list of bank accounts + +Paste the following class definition into **Program.cs**, under the `Program` class. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet2"::: + +Add the following code to the `Main` method to create a `bankAccounts` list that contains two accounts. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet3"::: + +## To declare a method that exports account information to Excel + +1. Add the following method to the `Program` class to set up an Excel worksheet. Method <xref:Microsoft.Office.Interop.Excel.Workbooks.Add%2A> has an optional parameter for specifying a particular template. Optional parameters enable you to omit the argument for that parameter if you want to use the parameter's default value. Because you didn't supply an argument, `Add` uses the default template and creates a new workbook. The equivalent statement in earlier versions of C# requires a placeholder argument: `ExcelApp.Workbooks.Add(Type.Missing)`. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet4"::: + +Add the following code at the end of `DisplayInExcel`. The code inserts values into the first two columns of the first row of the worksheet. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet5"::: + +Add the following code at the end of `DisplayInExcel`. The `foreach` loop puts the information from the list of accounts into the first two columns of successive rows of the worksheet. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet7"::: + +Add the following code at the end of `DisplayInExcel` to adjust the column widths to fit the content. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet13"::: + +Earlier versions of C# require explicit casting for these operations because `ExcelApp.Columns[1]` returns an `Object`, and `AutoFit` is an Excel <xref:Microsoft.Office.Interop.Excel.Range> method. The following lines show the casting. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet14"::: + +C# converts the returned `Object` to `dynamic` automatically if the assembly is referenced by the [**EmbedInteropTypes**](../../language-reference/compiler-options/inputs.md#embedinteroptypes) compiler option or, equivalently, if the Excel **Embed Interop Types** property is true. True is the default value for this property. + +## To run the project + +Add the following line at the end of `Main`. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet8"::: + +Press CTRL+F5. An Excel worksheet appears that contains the data from the two accounts. + +## To add a Word document + +The following code opens a Word application and creates an icon that links to the Excel worksheet. Paste method `CreateIconInWordDoc`, provided later in this step, into the `Program` class. `CreateIconInWordDoc` uses named and optional arguments to reduce the complexity of the method calls to <xref:Microsoft.Office.Interop.Word.Documents.Add%2A> and <xref:Microsoft.Office.Interop.Word.Selection.PasteSpecial%2A>. These calls incorporate two other features that simplify calls to COM methods that have reference parameters. First, you can send arguments to the reference parameters as if they were value parameters. That is, you can send values directly, without creating a variable for each reference parameter. The compiler generates temporary variables to hold the argument values, and discards the variables when you return from the call. Second, you can omit the `ref` keyword in the argument list. + +The `Add` method has four reference parameters, all of which are optional. You can omit arguments for any or all of the parameters if you want to use their default values. + +The `PasteSpecial` method inserts the contents of the Clipboard. The method has seven reference parameters, all of which are optional. The following code specifies arguments for two of them: `Link`, to create a link to the source of the Clipboard contents, and `DisplayAsIcon`, to display the link as an icon. You can use named arguments for those two arguments and omit the others. Although these arguments are reference parameters, you don't have to use the `ref` keyword, or to create variables to send in as arguments. You can send the values directly. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet9"::: + +Add the following statement at the end of `Main`. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet11"::: + +Add the following statement at the end of `DisplayInExcel`. The `Copy` method adds the worksheet to the Clipboard. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet12"::: + +Press CTRL+F5. A Word document appears that contains an icon. Double-click the icon to bring the worksheet to the foreground. + +## To set the Embed Interop Types property + +More enhancements are possible when you call a COM type that doesn't require a primary interop assembly (PIA) at run time. Removing the dependency on PIAs results in version independence and easier deployment. For more information about the advantages of programming without PIAs, see [Walkthrough: Embedding Types from Managed Assemblies](../../../standard/assembly/embed-types-visual-studio.md). + +In addition, programming is easier because the `dynamic` type represents the required and returned types declared in COM methods. Variables that have type `dynamic` aren't evaluated until run time, which eliminates the need for explicit casting. For more information, see [Using Type dynamic](using-type-dynamic.md). + +Embedding type information instead of using PIAs is default behavior. Because of that default, several of the previous examples are simplified. You don't need any explicit casting. For example, the declaration of `worksheet` in `DisplayInExcel` is written as `Excel._Worksheet workSheet = excelApp.ActiveSheet` rather than `Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet`. The calls to `AutoFit` in the same method also would require explicit casting without the default, because `ExcelApp.Columns[1]` returns an `Object`, and `AutoFit` is an Excel method. The following code shows the casting. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet14"::: + +To change the default and use PIAs instead of embedding type information, expand the References node in Solution Explorer, and then select **Microsoft.Office.Interop.Excel** or **Microsoft.Office.Interop.Word**. If you can't see the **Properties** window, press **F4**. Find **Embed Interop Types** in the list of properties, and change its value to **False**. Equivalently, you can compile by using the [**References**](../../language-reference/compiler-options/inputs.md#references) compiler option instead of [**EmbedInteropTypes**](../../language-reference/compiler-options/inputs.md#embedinteroptypes) at a command prompt. + +## To add additional formatting to the table + +Replace the two calls to `AutoFit` in `DisplayInExcel` with the following statement. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet15"::: + +The <xref:Microsoft.Office.Interop.Excel.Range.AutoFormat%2A> method has seven value parameters, all of which are optional. Named and optional arguments enable you to provide arguments for none, some, or all of them. In the previous statement, you supply an argument for only one of the parameters, `Format`. Because `Format` is the first parameter in the parameter list, you don't have to provide the parameter name. However, the statement might be easier to understand if you include the parameter name, as shown in the following code. + +:::code language="csharp" source="./snippets/OfficeInterop/program.cs" id="Snippet16"::: + +Press CTRL+F5 to see the result. You can find other formats in the listed in the <xref:Microsoft.Office.Interop.Excel.XlRangeAutoFormat> enumeration. + +## Example + +The following code shows the complete example. + +:::code language="csharp" source="./snippets/OfficeInterop/walkthrough.cs" id="Snippet18"::: + +## See also + +- <xref:System.Type.Missing?displayProperty=nameWithType> +- [dynamic](../../language-reference/builtin-types/reference-types.md) +- [Named and Optional Arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md) +- [How to use named and optional arguments in Office programming](how-to-use-named-and-optional-arguments-in-office-programming.md) diff --git a/docs/csharp/advanced-topics/interop/how-to-use-indexed-properties-in-com-interop-programming.md b/docs/csharp/advanced-topics/interop/how-to-use-indexed-properties-in-com-interop-programming.md new file mode 100644 index 0000000000000..ecee301be0693 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/how-to-use-indexed-properties-in-com-interop-programming.md @@ -0,0 +1,43 @@ +--- +title: "How to use indexed properties in COM interop programming" +description: Learn how indexed properties improve the way C# objects consume COM properties that have parameters. +ms.date: 02/15/2023 +ms.topic: how-to +helpviewer_keywords: + - "indexed properties [C#]" + - "Office programming [C#], indexed properties" + - "properties [C#], indexed" +--- +# How to use indexed properties in COM interop programming + +Indexed properties work together with other features in C#, such as [named and optional arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md), a new type ([dynamic](../../language-reference/builtin-types/reference-types.md)), and [embedded type information](../../../standard/assembly/embed-types-visual-studio.md), to enhance Microsoft Office programming. + +[!INCLUDE[vsto_framework](../../includes/vsto-framework.md)] + +In earlier versions of C#, methods are accessible as properties only if the `get` method has no parameters and the `set` method has one and only one value parameter. However, not all COM properties meet those restrictions. For example, the Excel <xref:Microsoft.Office.Interop.Excel.Range.Range%2A> property has a `get` accessor that requires a parameter for the name of the range. In the past, because you couldn't access the `Range` property directly, you had to use the `get_Range` method instead, as shown in the following example. + +:::code language="{language}" source="snippets/IndexedProperties/Program.cs" id="Snippet1"::: + +Indexed properties enable you to write the following instead: + +:::code language="{language}" source="snippets/IndexedProperties/Program.cs" id="Snippet2"::: + +The previous example also uses the [optional arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md) feature, which enables you to omit `Type.Missing`. + +Indexed properties enable you to write the following code. + +:::code language="{language}" source="snippets/IndexedProperties/Program.cs" id="Snippet4"::: + +You can't create indexed properties of your own. The feature only supports consumption of existing indexed properties. + +## Example + +The following code shows a complete example. For more information about how to set up a project that accesses the Office API, see [How to access Office interop objects by using C# features](./how-to-access-office-interop-objects.md). + +:::code language="{language}" source="snippets/IndexedProperties/Program.cs" id="Snippet5"::: + +## See also + +- [Named and Optional Arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md) +- [dynamic](../../language-reference/builtin-types/reference-types.md) +- [Using Type dynamic](using-type-dynamic.md) diff --git a/docs/csharp/advanced-topics/interop/how-to-use-named-and-optional-arguments-in-office-programming.md b/docs/csharp/advanced-topics/interop/how-to-use-named-and-optional-arguments-in-office-programming.md new file mode 100644 index 0000000000000..4ef1e855f85e1 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/how-to-use-named-and-optional-arguments-in-office-programming.md @@ -0,0 +1,81 @@ +--- +title: "How to use C# named and optional arguments in Office programming" +description: Learn how to use named arguments and optional arguments to facilitate access to COM interfaces such as the Microsoft Office automation APIs. +ms.date: 02/16/2023 +helpviewer_keywords: + - "named and optional arguments [C#], Office programming" + - "optional arguments [C#], Office programming" + - "named arguments [C#], Office programming" +ms.topic: how-to +--- +# How to use named and optional arguments in Office programming + +Named arguments and optional arguments enhance convenience, flexibility, and readability in C# programming. In addition, these features greatly facilitate access to COM interfaces such as the Microsoft Office automation APIs. + +[!INCLUDE[vsto_framework](../../includes/vsto-framework.md)] + +In the following example, method [ConvertToTable](<xref:Microsoft.Office.Interop.Word.Range.ConvertToTable%2A>) has 16 parameters that represent characteristics of a table, such as number of columns and rows, formatting, borders, fonts, and colors. All 16 parameters are optional, because most of the time you don't want to specify particular values for all of them. However, without named and optional arguments, you must provide a value or a placeholder value. With named and optional arguments, you specify values only for the parameters required for your project. + +You must have Microsoft Office Word installed on your computer to complete these procedures. + +[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] + +## Create a new console application + +Start Visual Studio. On the **File** menu, point to **New**, and then select **Project**. In the **Templates Categories** pane, expand **C#**, and then select **Windows**. Look in the top of the **Templates** pane to make sure that **.NET Framework 4** appears in the **Target Framework** box. In the **Templates** pane, select **Console Application**. Type a name for your project in the **Name** field. Select **OK**. The new project appears in **Solution Explorer**. + +## Add a reference + +In **Solution Explorer**, right-click your project's name and then select **Add Reference**. The **Add Reference** dialog box appears. On the **.NET** page, select **Microsoft.Office.Interop.Word** in the **Component Name** list. Select **OK**. + +## Add necessary using directives + +In **Solution Explorer**, right-click the *Program.cs* file and then select **View Code**. Add the following `using` directives to the top of the code file: + +:::code language="csharp" source="./snippets/NamedAndOptional/wordprogram.cs" id="Snippet4"::: + +## Display text in a Word document + +In the `Program` class in *Program.cs*, add the following method to create a Word application and a Word document. The [Add](<xref:Microsoft.Office.Interop.Word.Documents.Add%2A>) method has four optional parameters. This example uses their default values. Therefore, no arguments are necessary in the calling statement. + +:::code language="csharp" source="./snippets/NamedAndOptional/wordprogram.cs" id="Snippet6"::: + +Add the following code at the end of the method to define where to display text in the document, and what text to display: + +:::code language="csharp" source="./snippets/NamedAndOptional/wordprogram.cs" id="Snippet7"::: + +## Run the application + +Add the following statement to Main: + +:::code language="csharp" source="./snippets/NamedAndOptional/wordprogram.cs" id="Snippet8"::: + +Press <kbd>CTRL</kbd>+<kbd>F5</kbd> to run the project. A Word document appears that contains the specified text. + +## Change the text to a table + +Use the `ConvertToTable` method to enclose the text in a table. The method has 16 optional parameters. IntelliSense encloses optional parameters in brackets, as shown in the following illustration. + +![List of parameters for ConvertToTable method](./media/how-to-use-named-and-optional-arguments-in-office-programming/convert-table-parameters.png) + +Named and optional arguments enable you to specify values for only the parameters that you want to change. Add the following code to the end of method `DisplayInWord` to create a table. The argument specifies that the commas in the text string in `range` separate the cells of the table. + +:::code language="csharp" source="./snippets/NamedAndOptional/wordprogram.cs" id="Snippet9"::: + +Press <kbd>CTRL</kbd>+<kbd>F5</kbd> to run the project. + +## Experiment with other parameters + +Change the table so that it has one column and three rows, replace the last line in `DisplayInWord` with the following statement and then type <kbd>CTRL</kbd>+<kbd>F5</kbd>. + +:::code language="csharp" source="./snippets/NamedAndOptional/wordprogram.cs" id="Snippet10"::: + +Specify a predefined format for the table, replace the last line in `DisplayInWord` with the following statement and then type <kbd>CTRL</kbd>+<kbd>F5</kbd>. The format can be any of the [WdTableFormat](<xref:Microsoft.Office.Interop.Word.WdTableFormat>) constants. + +:::code language="csharp" source="./snippets/NamedAndOptional/wordprogram.cs" id="Snippet11"::: + +## Example + +The following code includes the full example: + +:::code language="csharp" source="./snippets/NamedAndOptional/wordprogram.cs" id="Snippet12"::: diff --git a/docs/csharp/advanced-topics/interop/how-to-use-platform-invoke-to-play-a-wave-file.md b/docs/csharp/advanced-topics/interop/how-to-use-platform-invoke-to-play-a-wave-file.md new file mode 100644 index 0000000000000..f2f6039dca047 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/how-to-use-platform-invoke-to-play-a-wave-file.md @@ -0,0 +1,35 @@ +--- +title: "How to use platform invoke to play a WAV file" +description: This C# code example illustrates how to use platform invoke services to play a WAV sound file on the Windows operating system. +ms.topic: how-to +ms.date: 02/15/2023 +helpviewer_keywords: + - "platform invoke, sound files" + - "interoperability [C#], playing WAV files using pinvoke" + - "wav files" + - ".wav files" +--- +# How to use platform invoke to play a WAV file + +The following C# code example illustrates how to use platform invoke services to play a WAV sound file on the Windows operating system. + +## Example + +This example code uses <xref:System.Runtime.InteropServices.DllImportAttribute> to import `winmm.dll`'s `PlaySound` method entry point as `Form1 PlaySound()`. The example has a simple Windows Form with a button. Clicking the button opens a standard windows <xref:System.Windows.Forms.OpenFileDialog> dialog box so that you can open a file to play. When a wave file is selected, it's played by using the `PlaySound()` method of the *winmm.dll* library. For more information about this method, see [Using the PlaySound function with Waveform-Audio Files](/windows/desktop/multimedia/using-playsound-to-play-waveform-audio-files). Browse and select a file that has a .wav extension, and then select **Open** to play the wave file by using platform invoke. A text box shows the full path of the file selected. + +:::code language="csharp" source="snippets/WinSound/Form1.cs"::: + +The **Open Files** dialog box is filtered to show only files that have a .wav extension through the filter settings. + +## Compiling the code + +Create a new C# Windows Forms Application project in Visual Studio and name it **WinSound**. Copy the preceding code, and paste it over the contents of the *Form1.cs* file. Copy the following code, and paste it in the *Form1.Designer.cs* file, in the `InitializeComponent()` method, after any existing code. + +:::code language="csharp" source="snippets/WinSound/Form1.Designer.cs" id="Initialization"::: + +Compile and run the code. + +## See also + +- [A Closer Look at Platform Invoke](../../../framework/interop/consuming-unmanaged-dll-functions.md#a-closer-look-at-platform-invoke) +- [Marshaling Data with Platform Invoke](../../../framework/interop/marshalling-data-with-platform-invoke.md) diff --git a/docs/csharp/advanced-topics/interop/index.md b/docs/csharp/advanced-topics/interop/index.md new file mode 100644 index 0000000000000..c589156ed0402 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/index.md @@ -0,0 +1,60 @@ +--- +title: "Interoperability Overview" +description: Learn about interoperability between C# and unmanaged code, including platform invoke, C++ interop, exposing COM components to C#, and exposing C# to COM. +ms.date: 02/15/2023 +helpviewer_keywords: + - "COM interop" + - "C# language, interoperability" + - "C++ Interop" + - "interoperability, about interoperability" + - "platform invoke" +--- +# Interoperability Overview + +Interoperability enables you to preserve and take advantage of existing investments in unmanaged code. Code that runs under the control of the common language runtime (CLR) is *managed code*, and code that runs outside the CLR is *unmanaged code*. COM, COM+, C++ components, ActiveX components, and Microsoft Windows API are examples of unmanaged code. + +.NET enables interoperability with unmanaged code through platform invoke services, the <xref:System.Runtime.InteropServices> namespace, C++ interoperability, and COM interoperability (COM interop). + +## Platform Invoke + +*Platform invoke* is a service that enables managed code to call unmanaged functions implemented in dynamic link libraries (DLLs), such as the Microsoft Windows API. It locates and invokes an exported function and marshals its arguments (integers, strings, arrays, structures, and so on) across the interoperation boundary as needed. + +For more information, see [Consuming Unmanaged DLL Functions](../../../framework/interop/consuming-unmanaged-dll-functions.md) and [How to use platform invoke to play a WAV file](./how-to-use-platform-invoke-to-play-a-wave-file.md). + +> [!NOTE] +> The [Common Language Runtime](../../../standard/clr.md) (CLR) manages access to system resources. Calling unmanaged code that is outside the CLR bypasses this security mechanism, and therefore presents a security risk. For example, unmanaged code might call resources in unmanaged code directly, bypassing CLR security mechanisms. For more information, see [Security in .NET](../../../standard/security/index.md). + +## C++ Interop + +You can use C++ interop, also known as It Just Works (IJW), to wrap a native C++ class. C++ interop enables code authored in C# or another .NET language to access it. You write C++ code to wrap a native DLL or COM component. Unlike other .NET languages, Visual C++ has interoperability support that enables managed and unmanaged code in the same application and even in the same file. You then build the C++ code by using the **/clr** compiler switch to produce a managed assembly. Finally, you add a reference to the assembly in your C# project and use the wrapped objects just as you would use other managed classes. + +## Exposing COM Components to C\# + +You can consume a COM component from a C# project. The general steps are as follows: + +1. Locate a COM component to use and register it. Use regsvr32.exe to register or un–register a COM DLL. +1. Add to the project a reference to the COM component or type library. + When you add the reference, Visual Studio uses the [Tlbimp.exe (Type Library Importer)](../../../framework/tools/tlbimp-exe-type-library-importer.md), which takes a type library as input, to output a .NET interop assembly. The assembly, also named a runtime callable wrapper (RCW), contains managed classes and interfaces that wrap the COM classes and interfaces that are in the type library. Visual Studio adds to the project a reference to the generated assembly. +1. Create an instance of a class defined in the RCW. Creating an instance of that class creates an instance of the COM object. +1. Use the object just as you use other managed objects. When the object is reclaimed by garbage collection, the instance of the COM object is also released from memory. + +For more information, see [Exposing COM Components to the .NET Framework](../../../framework/interop/exposing-com-components.md). + +## Exposing C# to COM + +COM clients can consume C# types that have been correctly exposed. The basic steps to expose C# types are as follows: + +1. Add interop attributes in the C# project. + You can make an assembly COM visible by modifying C# project properties. For more information, see [Assembly Information Dialog Box](/visualstudio/ide/reference/assembly-information-dialog-box). +1. Generate a COM type library and register it for COM usage. + You can modify C# project properties to automatically register the C# assembly for COM interop. Visual Studio uses the [Regasm.exe (Assembly Registration Tool)](../../../framework/tools/regasm-exe-assembly-registration-tool.md), using the `/tlb` command-line switch, which takes a managed assembly as input, to generate a type library. This type library describes the `public` types in the assembly and adds registry entries so that COM clients can create managed classes. + + For more information, see [Exposing .NET Framework Components to COM](../../../framework/interop/exposing-dotnet-components-to-com.md) and [Example COM Class](./example-com-class.md). + +## See also + +- [Improving Interop Performance](/previous-versions/msp-n-p/ff647812(v=pandp.10)) +- [Introduction to Interoperability between COM and .NET](/office/client-developer/outlook/pia/introduction-to-interoperability-between-com-and-net) +- [Introduction to COM Interop in Visual Basic](../../../visual-basic/programming-guide/com-interop/introduction-to-com-interop.md) +- [Marshaling between Managed and Unmanaged Code](../../../framework/interop/interop-marshalling.md) +- [Interoperating with Unmanaged Code](../../../framework/interop/index.md) diff --git a/docs/csharp/programming-guide/classes-and-structs/media/how-to-use-named-and-optional-arguments-in-office-programming/convert-table-parameters.png b/docs/csharp/advanced-topics/interop/media/how-to-use-named-and-optional-arguments-in-office-programming/convert-table-parameters.png similarity index 100% rename from docs/csharp/programming-guide/classes-and-structs/media/how-to-use-named-and-optional-arguments-in-office-programming/convert-table-parameters.png rename to docs/csharp/advanced-topics/interop/media/how-to-use-named-and-optional-arguments-in-office-programming/convert-table-parameters.png diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/ExampleCOM.cs b/docs/csharp/advanced-topics/interop/snippets/ExampleComClass/ExampleCOM.cs similarity index 88% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/ExampleCOM.cs rename to docs/csharp/advanced-topics/interop/snippets/ExampleComClass/ExampleCOM.cs index 0c7dfb2e2c984..c7cb2f860e142 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/ExampleCOM.cs +++ b/docs/csharp/advanced-topics/interop/snippets/ExampleComClass/ExampleCOM.cs @@ -1,5 +1,4 @@ -//<Snippet8> -using System.Runtime.InteropServices; +using System.Runtime.InteropServices; namespace project_name { @@ -21,4 +20,3 @@ public class ComClass1 : ComClass1Interface { } } -//</Snippet8> \ No newline at end of file diff --git a/docs/csharp/advanced-topics/interop/snippets/ExampleComClass/ExampleComClass.csproj b/docs/csharp/advanced-topics/interop/snippets/ExampleComClass/ExampleComClass.csproj new file mode 100644 index 0000000000000..cfadb03dd5ae2 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/ExampleComClass/ExampleComClass.csproj @@ -0,0 +1,9 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/indexedpropscom.csproj b/docs/csharp/advanced-topics/interop/snippets/IndexedProperties/indexedpropscom.csproj similarity index 83% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/indexedpropscom.csproj rename to docs/csharp/advanced-topics/interop/snippets/IndexedProperties/indexedpropscom.csproj index 332005f18b92d..cca556c5925d3 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/indexedpropscom.csproj +++ b/docs/csharp/advanced-topics/interop/snippets/IndexedProperties/indexedpropscom.csproj @@ -59,6 +59,15 @@ <EmbedInteropTypes>True</EmbedInteropTypes> </COMReference> </ItemGroup> + <ItemGroup> + <Reference Include="Microsoft.Office.Interop.Excel1"> + <HintPath>..\..\..\..\..\..\..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\Office15\Microsoft.Office.Interop.Excel.dll</HintPath> + <EmbedInteropTypes>True</EmbedInteropTypes> + </Reference> + <Reference Include="Microsoft.Office.Interop.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL"> + <EmbedInteropTypes>True</EmbedInteropTypes> + </Reference> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/program.cs b/docs/csharp/advanced-topics/interop/snippets/IndexedProperties/program.cs similarity index 100% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/program.cs rename to docs/csharp/advanced-topics/interop/snippets/IndexedProperties/program.cs diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/properties/assemblyinfo.cs b/docs/csharp/advanced-topics/interop/snippets/IndexedProperties/properties/assemblyinfo.cs similarity index 100% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/properties/assemblyinfo.cs rename to docs/csharp/advanced-topics/interop/snippets/IndexedProperties/properties/assemblyinfo.cs diff --git a/docs/csharp/advanced-topics/interop/snippets/IndexedProperties/snippets.5000.json b/docs/csharp/advanced-topics/interop/snippets/IndexedProperties/snippets.5000.json new file mode 100644 index 0000000000000..bdbadbbcc9797 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/IndexedProperties/snippets.5000.json @@ -0,0 +1,11 @@ +{ + "host": "visualstudio", + "expectederrors": [ + { + "file": "docs/csharp/advanced-topics/interop/snippets/IndexedProperties/Program.cs", + "line": 13, + "column": 40, + "error": "CS0234" + } + ] +} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/app.config b/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/app.config similarity index 100% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/app.config rename to docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/app.config diff --git a/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/namedandoptionalsnippets.csproj b/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/namedandoptionalsnippets.csproj new file mode 100644 index 0000000000000..33eca3e6eee53 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/namedandoptionalsnippets.csproj @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>10.0.20319</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{595F32EC-B330-4DA1-9D79-9E5E1EA6DDAB}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NamedAndOptionalSnippets</RootNamespace> + <AssemblyName>NamedAndOptionalSnippets</AssemblyName> + <TargetFrameworkVersion>v4.8</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="WordProgram.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <COMReference Include="Microsoft.Office.Core"> + <Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid> + <VersionMajor>2</VersionMajor> + <VersionMinor>8</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>primary</WrapperTool> + <Isolated>False</Isolated> + <EmbedInteropTypes>True</EmbedInteropTypes> + </COMReference> + <COMReference Include="Microsoft.Office.Interop.Excel"> + <Guid>{00020813-0000-0000-C000-000000000046}</Guid> + <VersionMajor>1</VersionMajor> + <VersionMinor>9</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>primary</WrapperTool> + <Isolated>False</Isolated> + <EmbedInteropTypes>True</EmbedInteropTypes> + </COMReference> + <COMReference Include="Microsoft.Office.Interop.Word"> + <Guid>{00020905-0000-0000-C000-000000000046}</Guid> + <VersionMajor>8</VersionMajor> + <VersionMinor>7</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>primary</WrapperTool> + <Isolated>False</Isolated> + <EmbedInteropTypes>True</EmbedInteropTypes> + </COMReference> + <COMReference Include="VBIDE"> + <Guid>{0002E157-0000-0000-C000-000000000046}</Guid> + <VersionMajor>5</VersionMajor> + <VersionMinor>3</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>primary</WrapperTool> + <Isolated>False</Isolated> + <EmbedInteropTypes>True</EmbedInteropTypes> + </COMReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/properties/assemblyinfo.cs b/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/properties/assemblyinfo.cs similarity index 100% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/properties/assemblyinfo.cs rename to docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/properties/assemblyinfo.cs diff --git a/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/snippets.5000.json b/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/snippets.5000.json new file mode 100644 index 0000000000000..7aa30d9f5c11d --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/snippets.5000.json @@ -0,0 +1,11 @@ +{ + "host": "visualstudio", + "expectederrors": [ + { + "file": "docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/WordProgram.cs", + "line": 8, + "column": 24, + "error": "CS0234" + } + ] +} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs b/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/wordprogram.cs similarity index 84% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs rename to docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/wordprogram.cs index 4403b1862846f..869010da0a10b 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs +++ b/docs/csharp/advanced-topics/interop/snippets/NamedAndOptional/wordprogram.cs @@ -1,9 +1,6 @@ // //<Snippet12> using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; //<Snippet4> using Word = Microsoft.Office.Interop.Word; //</Snippet4> @@ -104,18 +101,6 @@ static void VS2008() Word.Range range = doc.Range(ref n, ref n); range.InsertAfter("Testing, testing, testing. . ."); - - //<Snippet14> - // Call to ConvertToTable in Visual C# 2008 or earlier. This code - // is not part of the solution. - var missing = Type.Missing; - object separator = ","; - range.ConvertToTable(ref separator, ref missing, ref missing, - ref missing, ref missing, ref missing, ref missing, - ref missing, ref missing, ref missing, ref missing, - ref missing, ref missing, ref missing, ref missing, - ref missing); - //</Snippet14> } } } diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/app.config b/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/app.config similarity index 100% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/app.config rename to docs/csharp/advanced-topics/interop/snippets/OfficeInterop/app.config diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/officeprogrammingwalkthrough.csproj b/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/officeprogrammingwalkthrough.csproj similarity index 100% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/officeprogrammingwalkthrough.csproj rename to docs/csharp/advanced-topics/interop/snippets/OfficeInterop/officeprogrammingwalkthrough.csproj diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/program.cs b/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/program.cs new file mode 100644 index 0000000000000..e2a062005586c --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/program.cs @@ -0,0 +1,196 @@ +// Snippets 5000 Note: +// The container used for building our samples doesn't include the Office assemblies. +// This sample will generate a few errors in the CI build. Those are expected, +// so the build passes. +// +// If you update this sample, make sure to build it locally. +// Then, make sure no new errors are added. + +using System; +using System.Collections.Generic; +//<Snippet1> +using Excel = Microsoft.Office.Interop.Excel; +using Word = Microsoft.Office.Interop.Word; +//</Snippet1> + +namespace OfficeProgrammingWalkthrough +{ + class Program + { + static void Main(string[] args) + { + //<Snippet3> + // Create a list of accounts. + var bankAccounts = new List<Account> { + new Account { + ID = 345678, + Balance = 541.27 + }, + new Account { + ID = 1230221, + Balance = -127.44 + } + }; + //</Snippet3> + + //<Snippet8> + // Display the list in an Excel spreadsheet. + DisplayInExcel(bankAccounts); + //</Snippet8> + + //<Snippet11> + // Create a Word document that contains an icon that links to + // the spreadsheet. + CreateIconInWordDoc(); + //</Snippet11> + } + + //<Snippet4> + static void DisplayInExcel(IEnumerable<Account> accounts) + { + var excelApp = new Excel.Application(); + // Make the object visible. + excelApp.Visible = true; + + // Create a new, empty workbook and add it to the collection returned + // by property Workbooks. The new workbook becomes the active workbook. + // Add has an optional parameter for specifying a particular template. + // Because no argument is sent in this example, Add creates a new workbook. + excelApp.Workbooks.Add(); + + // This example uses a single workSheet. The explicit type casting is + // removed in a later procedure. + Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet; + } + //</Snippet4> + + //<Snippet9> + static void CreateIconInWordDoc() + { + var wordApp = new Word.Application(); + wordApp.Visible = true; + + // The Add method has four reference parameters, all of which are + // optional. Visual C# allows you to omit arguments for them if + // the default values are what you want. + wordApp.Documents.Add(); + + // PasteSpecial has seven reference parameters, all of which are + // optional. This example uses named arguments to specify values + // for two of the parameters. Although these are reference + // parameters, you do not need to use the ref keyword, or to create + // variables to send in as arguments. You can send the values directly. + wordApp.Selection.PasteSpecial( Link: true, DisplayAsIcon: true); + } + //</Snippet9> + + static void DisplayInExcelFull(IEnumerable<Account> accounts) + { + var excelApp = new Excel.Application(); + // Make the object visible. + excelApp.Visible = true; + + // Create a new, empty workbook and add it to the collection returned + // by property Workbooks. The new workbook becomes the active workbook. + // Add has an optional parameter for specifying a particular template. + // Because no argument is sent in this example, Add creates a new workbook. + excelApp.Workbooks.Add(); + + // This example uses a single workSheet. + Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet; + + //<Snippet5> + // Establish column headings in cells A1 and B1. + workSheet.Cells[1, "A"] = "ID Number"; + workSheet.Cells[1, "B"] = "Current Balance"; + //</Snippet5> + + //<Snippet6> + // Establish column headings. Both parameters must be supplied in + // Visual C# 2008 or earlier versions. + //workSheet.get_Range("A1", Type.Missing).Value2 = "ID Number"; + //workSheet.get_Range("B1", Type.Missing).Value2 = "Current Balance"; + // Move to the next row. + //workSheet.get_Range("A2", Type.Missing).Select(); + //</Snippet6> + + //<Snippet7> + + var row = 1; + foreach (var acct in accounts) + { + row++; + workSheet.Cells[row, "A"] = acct.ID; + workSheet.Cells[row, "B"] = acct.Balance; + } + //</Snippet7> + + // Columns returns a Range object that represents all the columns + // on the active worksheet. AutoFit fits the width of the columns + // to their content. + //ExcelApp.Columns.AutoFit(); + + //<Snippet13> + workSheet.Columns[1].AutoFit(); + workSheet.Columns[2].AutoFit(); + //</Snippet13> + + //<Snippet14> + ((Excel.Range)workSheet.Columns[1]).AutoFit(); + ((Excel.Range)workSheet.Columns[2]).AutoFit(); + //</Snippet14> + + //<Snippet15> + // Call to AutoFormat in Visual C# 2010. + workSheet.Range["A1", "B3"].AutoFormat( + Excel.XlRangeAutoFormat.xlRangeAutoFormatClassic2); + //</Snippet15> + + //<Snippet16> + // Call to AutoFormat in Visual C# 2010. + workSheet.Range["A1", "B3"].AutoFormat(Format: + Excel.XlRangeAutoFormat.xlRangeAutoFormatClassic2); + //</Snippet16> + + //<Snippet12> + // Put the spreadsheet contents on the clipboard. The Copy method has one + // optional parameter for specifying a destination. Because no argument + // is sent, the destination is the Clipboard. + workSheet.Range["A1:B3"].Copy(); + //</Snippet12> + + //ExcelApp.get_Range("A5:C6").PasteSpecial( Transpose: true); + //dynamic val = Type.Missing; + //ExcelApp.get_Range("A5:C6").PasteSpecial(val, val, val, Transpose: true); + //ExcelApp.get_Range("A5:C6").Copy(); + } + + // These examples are in Named and Optional, main topic. Can be deleted here. + static void TestExcelCom() + { + var excelApp = new Microsoft.Office.Interop.Excel.Application(); + var myFormat = Microsoft.Office.Interop.Excel.XlRangeAutoFormat.xlRangeAutoFormatAccounting1; + + // Using named and optional arguments, you can supply arguments for + // only the parameters for which you do not want to use the default + // value, and omit arguments for the other parameters. In the following + // call, a value is sent for only one parameter. + excelApp.get_Range("A1", "B4").AutoFormat( Format: myFormat ); + + // In Visual C# 2008 and earlier versions, you need to supply an argument for + // every parameter. The following call supplies a value for the first + // parameter, and sends a placeholder value for the other six. The + // default values are used for those parameters. + excelApp.get_Range("A1", "B4").AutoFormat(myFormat, Type.Missing, + Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); + } + } + + //<Snippet2> + public class Account + { + public int ID { get; set; } + public double Balance { get; set; } + } + //</Snippet2> +} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/properties/assemblyinfo.cs b/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/properties/assemblyinfo.cs similarity index 100% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/properties/assemblyinfo.cs rename to docs/csharp/advanced-topics/interop/snippets/OfficeInterop/properties/assemblyinfo.cs diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/snippets.5000.json b/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/snippets.5000.json new file mode 100644 index 0000000000000..3e875d6f2f74e --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/snippets.5000.json @@ -0,0 +1,53 @@ +{ + "host": "visualstudio", + "expectederrors": [ + { + "file": "docs/csharp/advanced-topics/interop/snippets/OfficeInterop/Program.cs", + "line": 6, + "column": 25, + "error": "CS0234" + }, + { + "file": "docs/csharp/advanced-topics/interop/snippets/OfficeInterop/Program.cs", + "line": 7, + "column": 24, + "error": "CS0234" + }, + { + "file": "docs/csharp/advanced-topics/interop/snippets/OfficeInterop/Walkthrough.cs", + "line": 5, + "column": 25, + "error": "CS0234" + }, + { + "file": "docs/csharp/advanced-topics/interop/snippets/OfficeInterop/Walkthrough.cs", + "line": 6, + "column": 24, + "error": "CS0234" + }, + { + "file": "docs/csharp/advanced-topics/interop/snippets/OfficeInterop/Program.cs", + "line": 6, + "column": 25, + "error": "CS0234" + }, + { + "file": "docs/csharp/advanced-topics/interop/snippets/OfficeInterop/Program.cs", + "line": 7, + "column": 24, + "error": "CS0234" + }, + { + "file": "docs/csharp/advanced-topics/interop/snippets/OfficeInterop/Walkthrough.cs", + "line": 5, + "column": 25, + "error": "CS0234" + }, + { + "file": "docs/csharp/advanced-topics/interop/snippets/OfficeInterop/Walkthrough.cs", + "line": 6, + "column": 24, + "error": "CS0234" + } + ] +} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/walkthrough.cs b/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/walkthrough.cs similarity index 95% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/walkthrough.cs rename to docs/csharp/advanced-topics/interop/snippets/OfficeInterop/walkthrough.cs index 8328d190a5483..26e3f227ac52f 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/walkthrough.cs +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeInterop/walkthrough.cs @@ -1,4 +1,4 @@ -// Snippets 5000 Note: +// Snippets 5000 Note: // The container used for building our samples doesn't include the Office assemblies. // This sample will generate a few errors in the CI build. Those are expected, // so the build passes. @@ -7,13 +7,11 @@ // Then, make sure no new errors are added. //<Snippet18> -using System; using System.Collections.Generic; -using System.Linq; using Excel = Microsoft.Office.Interop.Excel; using Word = Microsoft.Office.Interop.Word; -namespace OfficeProgramminWalkthruComplete +namespace OfficeProgrammingWalkthruComplete { class Walkthrough { @@ -48,7 +46,7 @@ static void DisplayInExcel(IEnumerable<Account> accounts) // Create a new, empty workbook and add it to the collection returned // by property Workbooks. The new workbook becomes the active workbook. - // Add has an optional parameter for specifying a praticular template. + // Add has an optional parameter for specifying a particular template. // Because no argument is sent in this example, Add creates a new workbook. excelApp.Workbooks.Add(); diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/OfficeWalkthrough.csproj b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/OfficeWalkthrough.csproj new file mode 100644 index 0000000000000..e2c9249e84417 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/OfficeWalkthrough.csproj @@ -0,0 +1,223 @@ +<Project ToolsVersion="17.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <!-- + This section defines project-level properties. + + AssemblyName + Name of the output assembly. + Configuration + Specifies a default value for debug. + OutputType + Must be "Library" for VSTO. + Platform + Specifies what CPU the output of this project can run on. + NoStandardLibraries + Set to "false" for VSTO. + RootNamespace + In C#, this specifies the namespace given to new files. In VB, all objects are + wrapped in this namespace at runtime. + --> + <PropertyGroup> + <ProjectTypeGuids>{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{5A1BC04B-DFEF-4A19-9C0F-570492BE0DE7}</ProjectGuid> + <OutputType>Library</OutputType> + <NoStandardLibraries>false</NoStandardLibraries> + <RootNamespace>OfficeWalkthrough</RootNamespace> + <AssemblyName>OfficeWalkthrough</AssemblyName> + <LoadBehavior>3</LoadBehavior> + <TargetFrameworkVersion>v4.8</TargetFrameworkVersion> + <DefineConstants>VSTO40</DefineConstants> + <BootstrapperEnabled>true</BootstrapperEnabled> + <BootstrapperComponentsLocation>HomeSite</BootstrapperComponentsLocation> + </PropertyGroup> + <ItemGroup> + <BootstrapperPackage Include="Microsoft.VSTORuntime.4.0"> + <Visible>False</Visible> + <ProductName>Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29</ProductName> + <Install>true</Install> + </BootstrapperPackage> + </ItemGroup> + <PropertyGroup> + <!-- + OfficeApplication + Add-in host application + --> + <OfficeApplication>Excel</OfficeApplication> + </PropertyGroup> + <!-- + This section defines properties that are set when the "Debug" configuration is selected. + + DebugSymbols + If "true", create symbols (.pdb). If "false", do not create symbols. + DefineConstants + Constants defined for the preprocessor. + EnableUnmanagedDebugging + If "true", starting the debugger will attach both managed and unmanaged debuggers. + Optimize + If "true", optimize the build output. If "false", do not optimize. + OutputPath + Output path of project relative to the project file. + WarningLevel + Warning level for the compiler. + --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> + <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <!-- + This section defines properties that are set when the "Release" configuration is selected. + + DebugSymbols + If "true", create symbols (.pdb). If "false", do not create symbols. + DefineConstants + Constants defined for the preprocessor. + EnableUnmanagedDebugging + If "true", starting the debugger will attach both managed and unmanaged debuggers. + Optimize + If "true", optimize the build output. If "false", do not optimize. + OutputPath + Output path of project relative to the project file. + WarningLevel + Warning level for the compiler. + --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> + <DefineConstants>$(DefineConstants);TRACE</DefineConstants> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <!-- + This section specifies references for the project. + --> + <ItemGroup> + <Reference Include="Accessibility" /> + <Reference Include="Microsoft.Office.Interop.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL"> + <EmbedInteropTypes>True</EmbedInteropTypes> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + </ItemGroup> + <ItemGroup> + <Reference Include="Microsoft.Office.Tools.v4.0.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <Private>False</Private> + </Reference> + <Reference Include="Microsoft.VisualStudio.Tools.Applications.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <Private>False</Private> + </Reference> + <Reference Include="Microsoft.Office.Tools, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <Private>False</Private> + </Reference> + <Reference Include="Microsoft.Office.Tools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <Private>False</Private> + </Reference> + <Reference Include="Microsoft.Office.Tools.Excel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <Private>False</Private> + </Reference> + </ItemGroup> + <ItemGroup> + <Reference Include="Microsoft.Office.Tools.Common.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <Private>True</Private> + </Reference> + </ItemGroup> + <ItemGroup> + <Reference Include="Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"> + <Private>False</Private> + <EmbedInteropTypes>true</EmbedInteropTypes> + </Reference> + <Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"> + <Private>False</Private> + <EmbedInteropTypes>true</EmbedInteropTypes> + </Reference> + <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <Private>False</Private> + </Reference> + </ItemGroup> + <!-- + This section defines the user source files that are part of the project. + + A "Compile" element specifies a source file to compile. + An "EmbeddedResource" element specifies an .resx file for embedded resources. + A "None" element specifies a file that is not to be passed to the compiler (for instance, + a text file or XML file). + The "AppDesigner" element specifies the directory where the application properties files + can be found. + --> + <ItemGroup> + <Compile Include="account.cs" /> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <None Include="OfficeWalkthrough_TemporaryKey.pfx" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + </Compile> + <Compile Include="ThisAddIn.cs"> + <SubType>Code</SubType> + </Compile> + <None Include="ThisAddIn.Designer.xml"> + <DependentUpon>ThisAddIn.cs</DependentUpon> + </None> + <Compile Include="ThisAddIn.Designer.cs"> + <DependentUpon>ThisAddIn.Designer.xml</DependentUpon> + </Compile> + <AppDesigner Include="Properties\" /> + </ItemGroup> + <PropertyGroup> + <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> + <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> + </PropertyGroup> + <PropertyGroup> + <SignManifests>true</SignManifests> + </PropertyGroup> + <PropertyGroup> + <ManifestKeyFile>OfficeWalkthrough_TemporaryKey.pfx</ManifestKeyFile> + </PropertyGroup> + <PropertyGroup> + <ManifestCertificateThumbprint>64E5FAB68A3026C22AD36BD5DF7B81CF865E4CCE</ManifestCertificateThumbprint> + </PropertyGroup> + <!-- Include the build rules for a C# project. --> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- Include additional build rules for an Office application add-in. --> + <Import Project="$(VSToolsPath)\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" Condition="'$(VSToolsPath)' != ''" /> + <!-- This section defines VSTO properties that describe the host-changeable project properties. --> + <ProjectExtensions> + <VisualStudio> + <FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}"> + <ProjectProperties HostName="Excel" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0" VstxVersion="4.0" ApplicationType="Excel" Language="cs" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\16.0\Excel\InstallRoot\Path#excel.exe" DebugInfoCommandLine="/x" AddItemTemplatesGuid="{51063C3A-E220-4D12-8922-BDA915ACD783}" /> + <Host Name="Excel" GeneratedCodeNamespace="OfficeWalkthrough" IconIndex="0"> + <HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" /> + </Host> + </FlavorProperties> + </VisualStudio> + </ProjectExtensions> +</Project> \ No newline at end of file diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/AssemblyInfo.cs b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..acbac56e94243 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OfficeWalkthrough")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OfficeWalkthrough")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("500e9810-a014-472b-a2a2-d4788b8a1e8b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Resources.Designer.cs b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Resources.Designer.cs new file mode 100644 index 0000000000000..d90dd91e028b0 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace OfficeWalkthrough.Properties { + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OfficeWalkthrough.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Resources.resx b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Resources.resx similarity index 100% rename from samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Resources.resx rename to docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Resources.resx diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Settings.Designer.cs b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Settings.Designer.cs new file mode 100644 index 0000000000000..310a76c3a23b7 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace OfficeWalkthrough.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Settings.settings b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Settings.settings similarity index 100% rename from samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Settings.settings rename to docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/Properties/Settings.settings diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/ThisAddIn.Designer.cs b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/ThisAddIn.Designer.cs new file mode 100644 index 0000000000000..1930812ecb4e5 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/ThisAddIn.Designer.cs @@ -0,0 +1,237 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +#pragma warning disable 414 +namespace OfficeWalkthrough { + + + /// + [Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(0)] + [global::System.Security.Permissions.PermissionSetAttribute(global::System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")] + public sealed partial class ThisAddIn : Microsoft.Office.Tools.AddInBase { + + internal Microsoft.Office.Tools.CustomTaskPaneCollection CustomTaskPanes; + + internal Microsoft.Office.Tools.SmartTagCollection VstoSmartTags; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + private global::System.Object missing = global::System.Type.Missing; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + internal Microsoft.Office.Interop.Excel.Application Application; + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + public ThisAddIn(global::Microsoft.Office.Tools.Excel.ApplicationFactory factory, global::System.IServiceProvider serviceProvider) : + base(factory, serviceProvider, "AddIn", "ThisAddIn") { + Globals.Factory = factory; + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void Initialize() { + base.Initialize(); + this.Application = this.GetHostItem<Microsoft.Office.Interop.Excel.Application>(typeof(Microsoft.Office.Interop.Excel.Application), "Application"); + Globals.ThisAddIn = this; + global::System.Windows.Forms.Application.EnableVisualStyles(); + this.InitializeCachedData(); + this.InitializeControls(); + this.InitializeComponents(); + this.InitializeData(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void FinishInitialization() { + this.InternalStartup(); + this.OnStartup(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void InitializeDataBindings() { + this.BeginInitialization(); + this.BindToData(); + this.EndInitialization(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeCachedData() { + if ((this.DataHost == null)) { + return; + } + if (this.DataHost.IsCacheInitialized) { + this.DataHost.FillCachedData(this); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeData() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void BindToData() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private void StartCaching(string MemberName) { + this.DataHost.StartCaching(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private void StopCaching(string MemberName) { + this.DataHost.StopCaching(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private bool IsCached(string MemberName) { + return this.DataHost.IsCached(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void BeginInitialization() { + this.BeginInit(); + this.CustomTaskPanes.BeginInit(); + this.VstoSmartTags.BeginInit(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void EndInitialization() { + this.VstoSmartTags.EndInit(); + this.CustomTaskPanes.EndInit(); + this.EndInit(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeControls() { + this.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(null, null, "CustomTaskPanes", "CustomTaskPanes", this); + this.VstoSmartTags = Globals.Factory.CreateSmartTagCollection(null, null, "VstoSmartTags", "VstoSmartTags", this); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeComponents() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private bool NeedsFill(string MemberName) { + return this.DataHost.NeedsFill(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void OnShutdown() { + this.VstoSmartTags.Dispose(); + this.CustomTaskPanes.Dispose(); + base.OnShutdown(); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + internal sealed partial class Globals { + + /// + private Globals() { + } + + private static ThisAddIn _ThisAddIn; + + private static global::Microsoft.Office.Tools.Excel.ApplicationFactory _factory; + + private static ThisRibbonCollection _ThisRibbonCollection; + + internal static ThisAddIn ThisAddIn { + get { + return _ThisAddIn; + } + set { + if ((_ThisAddIn == null)) { + _ThisAddIn = value; + } + else { + throw new System.NotSupportedException(); + } + } + } + + internal static global::Microsoft.Office.Tools.Excel.ApplicationFactory Factory { + get { + return _factory; + } + set { + if ((_factory == null)) { + _factory = value; + } + else { + throw new System.NotSupportedException(); + } + } + } + + internal static ThisRibbonCollection Ribbons { + get { + if ((_ThisRibbonCollection == null)) { + _ThisRibbonCollection = new ThisRibbonCollection(_factory.GetRibbonFactory()); + } + return _ThisRibbonCollection; + } + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")] + internal sealed partial class ThisRibbonCollection : Microsoft.Office.Tools.Ribbon.RibbonCollectionBase { + + /// + internal ThisRibbonCollection(global::Microsoft.Office.Tools.Ribbon.RibbonFactory factory) : + base(factory) { + } + } +} diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/ThisAddIn.Designer.xml b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/ThisAddIn.Designer.xml new file mode 100644 index 0000000000000..78d353d140328 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/ThisAddIn.Designer.xml @@ -0,0 +1,5 @@ +<hostitem:hostItem hostitem:baseType="Microsoft.Office.Tools.AddInBase" hostitem:namespace="OfficeWalkthrough" hostitem:className="ThisAddIn" hostitem:identifier="ThisAddIn" hostitem:primaryCookie="AddIn" hostitem:master="true" hostitem:factoryType="Microsoft.Office.Tools.Excel.ApplicationFactory" hostitem:startupIndex="0" xmlns:hostitem="http://schemas.microsoft.com/2004/VisualStudio/Tools/Applications/HostItem.xsd"> + <hostitem:hostObject hostitem:name="Application" hostitem:identifier="Application" hostitem:type="Microsoft.Office.Interop.Excel.Application" hostitem:cookie="Application" hostitem:modifier="Internal" /> + <hostitem:hostControl hostitem:name="CustomTaskPanes" hostitem:identifier="CustomTaskPanes" hostitem:type="Microsoft.Office.Tools.CustomTaskPaneCollection" hostitem:primaryCookie="CustomTaskPanes" hostitem:modifier="Internal" /> + <hostitem:hostControl hostitem:name="VstoSmartTags" hostitem:identifier="VstoSmartTags" hostitem:type="Microsoft.Office.Tools.SmartTagCollection" hostitem:primaryCookie="VstoSmartTags" hostitem:modifier="Internal" /> +</hostitem:hostItem> \ No newline at end of file diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/ThisAddIn.cs b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/ThisAddIn.cs new file mode 100644 index 0000000000000..fc559caf33d22 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/ThisAddIn.cs @@ -0,0 +1,125 @@ +using System; +//<Usings> +using System.Collections.Generic; +using Excel = Microsoft.Office.Interop.Excel; +using Word = Microsoft.Office.Interop.Word; +//</Usings> + +namespace OfficeWalkthrough +{ + public partial class ThisAddIn + { + private void ThisAddIn_Startup(object sender, System.EventArgs e) + { + //<CreateAccount> + var bankAccounts = new List<Account> + { + new Account + { + ID = 345, + Balance = 541.27 + }, + new Account + { + ID = 123, + Balance = -127.44 + } + }; + //</CreateAccount> + + //<CallDisplay> + DisplayInExcel(bankAccounts, (account, cell) => + // This multiline lambda expression sets custom processing rules + // for the bankAccounts. + { + cell.Value = account.ID; + cell.Offset[0, 1].Value = account.Balance; + if (account.Balance < 0) + { + cell.Interior.Color = 255; + cell.Offset[0, 1].Interior.Color = 255; + } + }); + //</CallDisplay> + + //<PasteIntoWord> + var wordApp = new Word.Application(); + wordApp.Visible = true; + wordApp.Documents.Add(); + wordApp.Selection.PasteSpecial(Link: true, DisplayAsIcon: true); + //</PasteIntoWord> + } + + //<Display> + void DisplayInExcel(IEnumerable<Account> accounts, + Action<Account, Excel.Range> DisplayFunc) + { + var excelApp = this.Application; + // Add a new Excel workbook. + excelApp.Workbooks.Add(); + excelApp.Visible = true; + excelApp.Range["A1"].Value = "ID"; + excelApp.Range["B1"].Value = "Balance"; + excelApp.Range["A2"].Select(); + + foreach (var ac in accounts) + { + DisplayFunc(ac, excelApp.ActiveCell); + excelApp.ActiveCell.Offset[1, 0].Select(); + } + // Copy the results to the Clipboard. + excelApp.Range["A1:B3"].Copy(); + } + //</Display> + + + private void ThisAddIn_Shutdown(object sender, System.EventArgs e) + { + } + + void Pieces(IEnumerable<Account> accounts, + Action<Account, Excel.Range> DisplayFunc) + { + var excelApp = this.Application; + // Add a new Excel workbook. + excelApp.Workbooks.Add(); + excelApp.Visible = true; + excelApp.Range["A1"].Value = "ID"; + excelApp.Range["B1"].Value = "Balance"; + excelApp.Range["A2"].Select(); + + foreach (var ac in accounts) + { + DisplayFunc(ac, excelApp.ActiveCell); + excelApp.ActiveCell.Offset[1, 0].Select(); + } + // Copy the results to the Clipboard. + excelApp.Range["A1:B3"].Copy(); + + //<AutoFit> + excelApp.Columns[1].AutoFit(); + excelApp.Columns[2].AutoFit(); + //</AutoFit> + + //<IndexedProperties> + // Visual C# 2010 provides indexed properties for COM programming. + excelApp.Range["A1"].Value = "ID"; + excelApp.ActiveCell.Offset[1, 0].Select(); + //</IndexedProperties> + } + + #region VSTO generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InternalStartup() + { + this.Startup += new System.EventHandler(ThisAddIn_Startup); + this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); + } + + #endregion + } +} diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/account.cs b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/account.cs new file mode 100644 index 0000000000000..cfeb558af9711 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/account.cs @@ -0,0 +1,10 @@ +namespace OfficeWalkthrough +{ + //<AccountClass> + class Account + { + public int ID { get; set; } + public double Balance { get; set; } + } + //</AccountClass> +} diff --git a/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/snippets.5000.json b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/snippets.5000.json new file mode 100644 index 0000000000000..d81b4b07a87a4 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/snippets.5000.json @@ -0,0 +1,17 @@ +{ + "host": "visualstudio", + "expectederrors": [ + { + "file": "docs/csharp/advanced-topics/interop/snippets/OfficeWalkthrough/OfficeWalkthrough.csproj", + "line": 211, + "column": 3, + "error": "MSB4019" + }, + { + "file": "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/Microsoft.Common.CurrentVersion.targets", + "line": 3476, + "column": 5, + "error": "MSB3323" + } + ] +} diff --git a/docs/csharp/advanced-topics/interop/snippets/WinSound/Form1.Designer.cs b/docs/csharp/advanced-topics/interop/snippets/WinSound/Form1.Designer.cs new file mode 100644 index 0000000000000..717fe52e6e1f2 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/WinSound/Form1.Designer.cs @@ -0,0 +1,73 @@ +namespace WinSound; + +partial class Form1 +{ + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "Form1"; + + //<Initialization> + this.button1 = new System.Windows.Forms.Button(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(192, 40); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(88, 24); + this.button1.TabIndex = 0; + this.button1.Text = "Browse"; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(8, 40); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(168, 20); + this.textBox1.TabIndex = 1; + this.textBox1.Text = "File path"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(5, 13); + this.ClientSize = new System.Drawing.Size(292, 266); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.button1); + this.Name = "Form1"; + this.Text = "Platform Invoke WinSound C#"; + this.ResumeLayout(false); + this.PerformLayout(); + //</Initialization> + + } + + #endregion +} diff --git a/docs/csharp/advanced-topics/interop/snippets/WinSound/Form1.cs b/docs/csharp/advanced-topics/interop/snippets/WinSound/Form1.cs new file mode 100644 index 0000000000000..2f27bfb406251 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/WinSound/Form1.cs @@ -0,0 +1,56 @@ +using System.Runtime.InteropServices; + +namespace WinSound; + +public partial class Form1 : Form +{ + private TextBox textBox1; + private Button button1; + + public Form1() // Constructor. + { + InitializeComponent(); + } + + [DllImport("winmm.DLL", EntryPoint = "PlaySound", SetLastError = true, CharSet = CharSet.Unicode, ThrowOnUnmappableChar = true)] + private static extern bool PlaySound(string szSound, System.IntPtr hMod, PlaySoundFlags flags); + + [System.Flags] + public enum PlaySoundFlags : int + { + SND_SYNC = 0x0000, + SND_ASYNC = 0x0001, + SND_NODEFAULT = 0x0002, + SND_LOOP = 0x0008, + SND_NOSTOP = 0x0010, + SND_NOWAIT = 0x00002000, + SND_FILENAME = 0x00020000, + SND_RESOURCE = 0x00040004 + } + + private void button1_Click(object sender, System.EventArgs e) + { + var dialog1 = new OpenFileDialog(); + + dialog1.Title = "Browse to find sound file to play"; + dialog1.InitialDirectory = @"c:\"; + //<Snippet5> + dialog1.Filter = "Wav Files (*.wav)|*.wav"; + //</Snippet5> + dialog1.FilterIndex = 2; + dialog1.RestoreDirectory = true; + + if (dialog1.ShowDialog() == DialogResult.OK) + { + textBox1.Text = dialog1.FileName; + PlaySound(dialog1.FileName, new System.IntPtr(), PlaySoundFlags.SND_SYNC); + } + } + + private void Form1_Load(object sender, EventArgs e) + { + // Including this empty method in the sample because in the IDE, + // when users click on the form, generates code that looks for a default method + // with this name. We add it here to prevent confusion for those using the samples. + } +} diff --git a/docs/csharp/advanced-topics/interop/snippets/WinSound/Form1.resx b/docs/csharp/advanced-topics/interop/snippets/WinSound/Form1.resx new file mode 100644 index 0000000000000..1af7de150c99c --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/WinSound/Form1.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/docs/csharp/advanced-topics/interop/snippets/WinSound/Program.cs b/docs/csharp/advanced-topics/interop/snippets/WinSound/Program.cs new file mode 100644 index 0000000000000..d4ae6a27f4ef2 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/WinSound/Program.cs @@ -0,0 +1,16 @@ +namespace WinSound; + +internal static class Program +{ + /// <summary> + /// The main entry point for the application. + /// </summary> + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new Form1()); + } +} \ No newline at end of file diff --git a/docs/csharp/advanced-topics/interop/snippets/WinSound/WinSound.csproj b/docs/csharp/advanced-topics/interop/snippets/WinSound/WinSound.csproj new file mode 100644 index 0000000000000..e1a0735019283 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/WinSound/WinSound.csproj @@ -0,0 +1,11 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>WinExe</OutputType> + <TargetFramework>net7.0-windows</TargetFramework> + <Nullable>enable</Nullable> + <UseWindowsForms>true</UseWindowsForms> + <ImplicitUsings>enable</ImplicitUsings> + </PropertyGroup> + +</Project> \ No newline at end of file diff --git a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConstTestProject/MakeConstTestProject/snippets.5000.json b/docs/csharp/advanced-topics/interop/snippets/WinSound/snippets5000.json similarity index 100% rename from docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConstTestProject/MakeConstTestProject/snippets.5000.json rename to docs/csharp/advanced-topics/interop/snippets/WinSound/snippets5000.json diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs/ironpythonsample.csproj b/docs/csharp/advanced-topics/interop/snippets/dynamic-iron-python-walkthrough/ironpythonsample.csproj similarity index 82% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs/ironpythonsample.csproj rename to docs/csharp/advanced-topics/interop/snippets/dynamic-iron-python-walkthrough/ironpythonsample.csproj index 2f9410af74103..602948ec1c2e0 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs/ironpythonsample.csproj +++ b/docs/csharp/advanced-topics/interop/snippets/dynamic-iron-python-walkthrough/ironpythonsample.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> </PropertyGroup> <ItemGroup> diff --git a/docs/csharp/advanced-topics/interop/snippets/dynamic-iron-python-walkthrough/program.cs b/docs/csharp/advanced-topics/interop/snippets/dynamic-iron-python-walkthrough/program.cs new file mode 100644 index 0000000000000..4a08c91557ce6 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/dynamic-iron-python-walkthrough/program.cs @@ -0,0 +1,44 @@ +using System; +//<Snippet1> +using System.Linq; +using Microsoft.Scripting.Hosting; +using IronPython.Hosting; +//</Snippet1> + +namespace IronPythonSample +{ + class Program + { + static void Main(string[] args) + { + //<Snippet2> + // Set the current directory to the IronPython libraries. + System.IO.Directory.SetCurrentDirectory( + Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + + @"\IronPython 2.7\Lib"); + + // Create an instance of the random.py IronPython library. + Console.WriteLine("Loading random.py"); + ScriptRuntime py = Python.CreateRuntime(); + dynamic random = py.UseFile("random.py"); + Console.WriteLine("random.py loaded."); + //</Snippet2> + + //<Snippet3> + // Initialize an enumerable set of integers. + int[] items = Enumerable.Range(1, 7).ToArray(); + + // Randomly shuffle the array of integers by using IronPython. + for (int i = 0; i < 5; i++) + { + random.shuffle(items); + foreach (int item in items) + { + Console.WriteLine(item); + } + Console.WriteLine("-------------------"); + } + //</Snippet3> + } + } +} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/dynamicwalkthroughcs.csproj b/docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/dynamicwalkthroughcs.csproj similarity index 100% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/dynamicwalkthroughcs.csproj rename to docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/dynamicwalkthroughcs.csproj diff --git a/docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/program.cs b/docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/program.cs new file mode 100644 index 0000000000000..09f03c9b473c0 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/program.cs @@ -0,0 +1,23 @@ +using System; + +namespace DynamicWalkthrough +{ + class Program + { + static void Main(string[] args) + { + //<Snippet8> + dynamic rFile = new ReadOnlyFile(@"..\..\..\TextFile1.txt"); + foreach (string line in rFile.Customer) + { + Console.WriteLine(line); + } + Console.WriteLine("----------------------------"); + foreach (string line in rFile.Customer(StringSearchOption.Contains, true)) + { + Console.WriteLine(line); + } + //</Snippet8> + } + } +} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs b/docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/readonlyfile.cs similarity index 99% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs rename to docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/readonlyfile.cs index 364dbbe1dfe29..a49e5b0cb9536 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs +++ b/docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/readonlyfile.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; //<Snippet1> using System.IO; using System.Dynamic; diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/textfile1.txt b/docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/textfile1.txt similarity index 100% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/textfile1.txt rename to docs/csharp/advanced-topics/interop/snippets/dynamic-walkthrough/textfile1.txt diff --git a/docs/csharp/advanced-topics/interop/snippets/using-dynamic/Program.cs b/docs/csharp/advanced-topics/interop/snippets/using-dynamic/Program.cs new file mode 100644 index 0000000000000..c598047d337c8 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/using-dynamic/Program.cs @@ -0,0 +1,82 @@ +namespace TestDynamicSnippets +{ + class UsingDynamic + { + //<Snippet50> + static void Main(string[] args) + { + ExampleClass ec = new ExampleClass(); + // The following call to exampleMethod1 causes a compiler error + // if exampleMethod1 has only one parameter. Uncomment the line + // to see the error. + //ec.exampleMethod1(10, 4); + + dynamic dynamic_ec = new ExampleClass(); + // The following line is not identified as an error by the + // compiler, but it causes a run-time exception. + dynamic_ec.exampleMethod1(10, 4); + + // The following calls also do not cause compiler errors, whether + // appropriate methods exist or not. + dynamic_ec.someMethod("some argument", 7, null); + dynamic_ec.nonexistentMethod(); + } + //</Snippet50> + } + + // <Snippet56> + class ExampleClass + { + public ExampleClass() { } + public ExampleClass(int v) { } + + public void exampleMethod1(int i) { } + + public void exampleMethod2(string str) { } + } + // </Snippet56> + + class OtherExamples + { + static void Examples() + { + ExampleClass ec = new ExampleClass(); + + //<Snippet51> + dynamic d = 1; + var testSum = d + 3; + // Rest the mouse pointer over testSum in the following statement. + System.Console.WriteLine(testSum); + //</Snippet51> + + //<Snippet52> + var testInstance = new ExampleClass(d); + //</Snippet52> + + //<Snippet53> + dynamic d1 = 7; + dynamic d2 = "a string"; + dynamic d3 = System.DateTime.Today; + dynamic d4 = System.Diagnostics.Process.GetProcesses(); + //</Snippet53> + + //<Snippet54> + int i = d1; + string str = d2; + DateTime dt = d3; + System.Diagnostics.Process[] procs = d4; + //</Snippet54> + + //<Snippet55> + // Valid. + ec.exampleMethod2("a string"); + + // The following statement does not cause a compiler error, even though ec is not + // dynamic. A run-time exception is raised because the run-time type of d1 is int. + ec.exampleMethod2(d1); + // The following statement does cause a compiler error. + //ec.exampleMethod2(7); + //</Snippet55> + } + } +} diff --git a/docs/csharp/advanced-topics/interop/snippets/using-dynamic/using-dynamic.csproj b/docs/csharp/advanced-topics/interop/snippets/using-dynamic/using-dynamic.csproj new file mode 100644 index 0000000000000..981c842fe608b --- /dev/null +++ b/docs/csharp/advanced-topics/interop/snippets/using-dynamic/using-dynamic.csproj @@ -0,0 +1,11 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <RootNamespace>using_dynamic</RootNamespace> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/advanced-topics/interop/using-type-dynamic.md b/docs/csharp/advanced-topics/interop/using-type-dynamic.md new file mode 100644 index 0000000000000..3fd3aa1f5f54b --- /dev/null +++ b/docs/csharp/advanced-topics/interop/using-type-dynamic.md @@ -0,0 +1,66 @@ +--- +title: "Using type dynamic" +description: Learn how to use the dynamic type. The dynamic type is a static type, but dynamic objects bypass static type checking. +ms.date: 02/17/2023 +helpviewer_keywords: + - "dynamic [C#], about dynamic type" + - "dynamic type [C#]" +--- +# Using type dynamic + +The `dynamic` type is a static type, but an object of type `dynamic` bypasses static type checking. In most cases, it functions like it has type `object`. The compiler assumes a `dynamic` element supports any operation. Therefore, you don't have to determine whether the object gets its value from a COM API, from a dynamic language such as IronPython, from the HTML Document Object Model (DOM), from reflection, or from somewhere else in the program. However, if the code isn't valid, errors surface at run time. + +For example, if instance method `exampleMethod1` in the following code has only one parameter, the compiler recognizes that the first call to the method, `ec.exampleMethod1(10, 4)`, isn't valid because it contains two arguments. The call causes a compiler error. The compiler doesn't check the second call to the method, `dynamic_ec.exampleMethod1(10, 4)`, because the type of `dynamic_ec` is `dynamic`. Therefore, no compiler error is reported. However, the error doesn't escape notice indefinitely. It appears at run time and causes a run-time exception. + +:::code language="csharp" source="./snippets/using-dynamic/Program.cs" id="Snippet50"::: + +:::code language="csharp" source="./snippets/using-dynamic/Program.cs" id="Snippet56"::: + +The role of the compiler in these examples is to package together information about what each statement is proposing to do to the `dynamic` object or expression. The runtime examines the stored information and any statement that isn't valid causes a run-time exception. + +The result of most dynamic operations is itself `dynamic`. For example, if you rest the mouse pointer over the use of `testSum` in the following example, IntelliSense displays the type **(local variable) dynamic testSum**. + +:::code language="csharp" source="./snippets/using-dynamic/Program.cs" id="Snippet51"::: + +Operations in which the result isn't `dynamic` include: + +* Conversions from `dynamic` to another type. +* Constructor calls that include arguments of type `dynamic`. + +For example, the type of `testInstance` in the following declaration is `ExampleClass`, not `dynamic`: + +:::code language="csharp" source="./snippets/using-dynamic/Program.cs" id="Snippet52"::: + +## Conversions + +Conversions between dynamic objects and other types are easy. Conversions enable the developer to switch between dynamic and non-dynamic behavior. + +You can convert any to `dynamic` implicitly, as shown in the following examples. + +:::code language="csharp" source="./snippets/using-dynamic/Program.cs" id="Snippet53"::: + +Conversely, you can dynamically apply any implicit conversion to any expression of type `dynamic`. + +:::code language="csharp" source="./snippets/using-dynamic/Program.cs" id="Snippet54"::: + +## Overload resolution with arguments of type dynamic + +Overload resolution occurs at run time instead of at compile time if one or more of the arguments in a method call have the type `dynamic`, or if the receiver of the method call is of type `dynamic`. In the following example, if the only accessible `exampleMethod2` method takes a string argument, sending `d1` as the argument doesn't cause a compiler error, but it does cause a run-time exception. Overload resolution fails at run time because the run-time type of `d1` is `int`, and `exampleMethod2` requires a string. + +:::code language="csharp" source="./snippets/using-dynamic/Program.cs" id="Snippet55"::: + +## Dynamic language runtime + +The dynamic language runtime (DLR) provides the infrastructure that supports the `dynamic` type in C#, and also the implementation of dynamic programming languages such as IronPython and IronRuby. For more information about the DLR, see [Dynamic Language Runtime Overview](../../../framework/reflection-and-codedom/dynamic-language-runtime-overview.md). + +## COM interop + +Many COM methods allow for variation in argument types and return type by designating the types as `object`. COM interop necessitates explicit casting of the values to coordinate with strongly typed variables in C#. If you compile by using the [**EmbedInteropTypes** (C# Compiler Options)](../../language-reference/compiler-options/inputs.md#embedinteroptypes) option, the introduction of the `dynamic` type enables you to treat the occurrences of `object` in COM signatures as if they were of type `dynamic`, and thereby to avoid much of the casting. For more information on using the `dynamic` type with COM objects, see the article on [How to access Office interop objects by using C# features](./how-to-access-office-interop-objects.md). + +## Related articles + +|Title|Description| +|-----------|-----------------| +|[dynamic](../../language-reference/builtin-types/reference-types.md)|Describes the usage of the `dynamic` keyword.| +|[Dynamic Language Runtime Overview](../../../framework/reflection-and-codedom/dynamic-language-runtime-overview.md)|Provides an overview of the DLR, which is a runtime environment that adds a set of services for dynamic languages to the common language runtime (CLR).| +|[Walkthrough: Creating and Using Dynamic Objects](walkthrough-creating-and-using-dynamic-objects.md)|Provides step-by-step instructions for creating a custom dynamic object and for creating a project that accesses an `IronPython` library.| diff --git a/docs/csharp/advanced-topics/interop/walkthrough-creating-and-using-dynamic-objects.md b/docs/csharp/advanced-topics/interop/walkthrough-creating-and-using-dynamic-objects.md new file mode 100644 index 0000000000000..8d389e044ad65 --- /dev/null +++ b/docs/csharp/advanced-topics/interop/walkthrough-creating-and-using-dynamic-objects.md @@ -0,0 +1,125 @@ +--- +title: "Walkthrough: Creating and Using Dynamic Objects in C#" +description: Learn how to create and use dynamic objects in this walkthrough. Create a custom dynamic object and a project that uses an 'IronPython' library. +ms.date: 02/17/2023 +helpviewer_keywords: + - "dynamic objects" + - "dynamic objects [C#]" +--- +# Walkthrough: Creating and Using Dynamic Objects in C\# + +Dynamic objects expose members such as properties and methods at run time, instead of at compile time. Dynamic objects enable you to create objects to work with structures that don't match a static type or format. For example, you can use a dynamic object to reference the HTML Document Object Model (DOM), which can contain any combination of valid HTML markup elements and attributes. Because each HTML document is unique, the members for a particular HTML document are determined at run time. A common method to reference an attribute of an HTML element is to pass the name of the attribute to the `GetProperty` method of the element. To reference the `id` attribute of the HTML element `<div id="Div1">`, you first obtain a reference to the `<div>` element, and then use `divElement.GetProperty("id")`. If you use a dynamic object, you can reference the `id` attribute as `divElement.id`. + + Dynamic objects also provide convenient access to dynamic languages such as IronPython and IronRuby. You can use a dynamic object to refer to a dynamic script interpreted at run time. + + You reference a dynamic object by using late binding. You specify the type of a late-bound object as `dynamic`.For more information, see [dynamic](../../language-reference/builtin-types/reference-types.md). + + You can create custom dynamic objects by using the classes in the <xref:System.Dynamic?displayProperty=nameWithType> namespace. For example, you can create an <xref:System.Dynamic.ExpandoObject> and specify the members of that object at run time. You can also create your own type that inherits the <xref:System.Dynamic.DynamicObject> class. You can then override the members of the <xref:System.Dynamic.DynamicObject> class to provide run-time dynamic functionality. + + This article contains two independent walkthroughs: + +- Create a custom object that dynamically exposes the contents of a text file as properties of an object. +- Create a project that uses an `IronPython` library. + +## Prerequisites + +* [Visual Studio 2022 version 17.3 or a later version](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019) with the **.NET desktop development** workload installed. The .NET 7 SDK is included when you select this workload. + +[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] + +* For the second walkthrough, install [IronPython](https://ironpython.net/) for .NET. Go to their [Download page](https://ironpython.net/download/) to obtain the latest version. + +## Create a Custom Dynamic Object + +The first walkthrough defines a custom dynamic object that searches the contents of a text file. A dynamic property specifies the text to search for. For example, if calling code specifies `dynamicFile.Sample`, the dynamic class returns a generic list of strings that contains all of the lines from the file that begin with "Sample". The search is case-insensitive. The dynamic class also supports two optional arguments. The first argument is a search option enum value that specifies that the dynamic class should search for matches at the start of the line, the end of the line, or anywhere in the line. The second argument specifies that the dynamic class should trim leading and trailing spaces from each line before searching. For example, if calling code specifies `dynamicFile.Sample(StringSearchOption.Contains)`, the dynamic class searches for "Sample" anywhere in a line. If calling code specifies `dynamicFile.Sample(StringSearchOption.StartsWith, false)`, the dynamic class searches for "Sample" at the start of each line, and doesn't remove leading and trailing spaces. The default behavior of the dynamic class is to search for a match at the start of each line and to remove leading and trailing spaces. + +### Create a custom dynamic class + +Start Visual Studio. Select **Create a new project**. In the **Create a new project** dialog, select C#, select **Console Application**, and then select **Next**. In the **Configure your new project** dialog, enter `DynamicSample` for the **Project name**, and then select **Next**. In the **Additional information** dialog, select **.NET 7.0 (Current)** for the **Target Framework**, and then select **Create**. In **Solution Explorer**, right-click the DynamicSample project and select **Add** > **Class**. In the **Name** box, type `ReadOnlyFile`, and then select **Add**. At the top of the *ReadOnlyFile.cs* or *ReadOnlyFile.vb* file, add the following code to import the <xref:System.IO?displayProperty=nameWithType> and <xref:System.Dynamic?displayProperty=nameWithType> namespaces. + +:::code language="csharp" source="./snippets/dynamic-walkthrough/readonlyfile.cs" id="Snippet1"::: + +The custom dynamic object uses an enum to determine the search criteria. Before the class statement, add the following enum definition. + +:::code language="csharp" source="./snippets/dynamic-walkthrough/readonlyfile.cs" id="Snippet2"::: + +Update the class statement to inherit the `DynamicObject` class, as shown in the following code example. + +:::code language="csharp" source="./snippets/dynamic-walkthrough/readonlyfile.cs" id="Snippet3"::: + +Add the following code to the `ReadOnlyFile` class to define a private field for the file path and a constructor for the `ReadOnlyFile` class. + +:::code language="csharp" source="./snippets/dynamic-walkthrough/readonlyfile.cs" id="Snippet4"::: + +1. Add the following `GetPropertyValue` method to the `ReadOnlyFile` class. The `GetPropertyValue` method takes, as input, search criteria and returns the lines from a text file that match that search criteria. The dynamic methods provided by the `ReadOnlyFile` class call the `GetPropertyValue` method to retrieve their respective results. + +:::code language="csharp" source="./snippets/dynamic-walkthrough/readonlyfile.cs" id="Snippet5"::: + +After the `GetPropertyValue` method, add the following code to override the <xref:System.Dynamic.DynamicObject.TryGetMember%2A> method of the <xref:System.Dynamic.DynamicObject> class. The <xref:System.Dynamic.DynamicObject.TryGetMember%2A> method is called when a member of a dynamic class is requested and no arguments are specified. The `binder` argument contains information about the referenced member, and the `result` argument references the result returned for the specified member. The <xref:System.Dynamic.DynamicObject.TryGetMember%2A> method returns a Boolean value that returns `true` if the requested member exists; otherwise it returns `false`. + +:::code language="csharp" source="./snippets/dynamic-walkthrough/readonlyfile.cs" id="Snippet6"::: + +After the `TryGetMember` method, add the following code to override the <xref:System.Dynamic.DynamicObject.TryInvokeMember%2A> method of the <xref:System.Dynamic.DynamicObject> class. The <xref:System.Dynamic.DynamicObject.TryInvokeMember%2A> method is called when a member of a dynamic class is requested with arguments. The `binder` argument contains information about the referenced member, and the `result` argument references the result returned for the specified member. The `args` argument contains an array of the arguments that are passed to the member. The <xref:System.Dynamic.DynamicObject.TryInvokeMember%2A> method returns a Boolean value that returns `true` if the requested member exists; otherwise it returns `false`. + +The custom version of the `TryInvokeMember` method expects the first argument to be a value from the `StringSearchOption` enum that you defined in a previous step. The `TryInvokeMember` method expects the second argument to be a Boolean value. If one or both arguments are valid values, they're passed to the `GetPropertyValue` method to retrieve the results. + +:::code language="csharp" source="./snippets/dynamic-walkthrough/readonlyfile.cs" id="Snippet7"::: + +Save and close the file. + +### Create a sample text file + +In **Solution Explorer**, right-click the DynamicSample project and select **Add** > **New Item**. In the **Installed Templates** pane, select **General**, and then select the **Text File** template. Leave the default name of *TextFile1.txt* in the **Name** box, and then select **Add**. Copy the following text to the *TextFile1.txt* file. + +```text +List of customers and suppliers + +Supplier: Lucerne Publishing (https://www.lucernepublishing.com/) +Customer: Preston, Chris +Customer: Hines, Patrick +Customer: Cameron, Maria +Supplier: Graphic Design Institute (https://www.graphicdesigninstitute.com/) +Supplier: Fabrikam, Inc. (https://www.fabrikam.com/) +Customer: Seubert, Roxanne +Supplier: Proseware, Inc. (http://www.proseware.com/) +Customer: Adolphi, Stephan +Customer: Koch, Paul +``` + +Save and close the file. + +### Create a sample application that uses the custom dynamic object + +In **Solution Explorer**, double-click the *Program.cs* file. Add the following code to the `Main` procedure to create an instance of the `ReadOnlyFile` class for the *TextFile1.txt* file. The code uses late binding to call dynamic members and retrieve lines of text that contain the string "Customer". + +:::code language="csharp" source="./snippets/dynamic-walkthrough/program.cs" id="Snippet8"::: + +Save the file and press <kbd>Ctrl</kdb>+<kbd>F5</kbd> to build and run the application. + +## Call a dynamic language library + +The following walkthrough creates a project that accesses a library written in the dynamic language IronPython. + +### To create a custom dynamic class + +In Visual Studio, select **File** > **New** > **Project**. In the **Create a new project** dialog, select C#, select **Console Application**, and then select **Next**. In the **Configure your new project** dialog, enter `DynamicIronPythonSample` for the **Project name**, and then select **Next**. In the **Additional information** dialog, select **.NET 7.0 (Current)** for the **Target Framework**, and then select **Create**. Install the [IronPython](https://www.nuget.org/packages/IronPython) NuGet package. Edit the *Program.cs* file. At the top of the file, add the following code to import the `Microsoft.Scripting.Hosting` and `IronPython.Hosting` namespaces from the IronPython libraries and the `System.Linq` namespace. + +:::code language="csharp" source="./snippets/dynamic-iron-python-walkthrough/program.cs" id="Snippet1"::: + +In the Main method, add the following code to create a new `Microsoft.Scripting.Hosting.ScriptRuntime` object to host the IronPython libraries. The `ScriptRuntime` object loads the IronPython library module random.py. + +:::code language="csharp" source="./snippets/dynamic-iron-python-walkthrough/program.cs" id="Snippet2"::: + +After the code to load the random.py module, add the following code to create an array of integers. The array is passed to the `shuffle` method of the random.py module, which randomly sorts the values in the array. + +:::code language="csharp" source="./snippets/dynamic-iron-python-walkthrough/program.cs" id="Snippet3"::: + +Save the file and press <kbd>Ctrl</kdb>+<kbd>F5</kbd> to build and run the application. + +## See also + +- <xref:System.Dynamic?displayProperty=nameWithType> +- <xref:System.Dynamic.DynamicObject?displayProperty=nameWithType> +- [Using Type dynamic](./using-type-dynamic.md) +- [dynamic](../../language-reference/builtin-types/reference-types.md) +- [Implementing Dynamic Interfaces (downloadable PDF from Microsoft TechNet)](https://download.microsoft.com/download/5/4/B/54B83DFE-D7AA-4155-9687-B0CF58FF65D7/implementing-dynamic-interfaces.pdf) diff --git a/docs/csharp/advanced-topics/interop/walkthrough-office-programming.md b/docs/csharp/advanced-topics/interop/walkthrough-office-programming.md new file mode 100644 index 0000000000000..e695acee55a1b --- /dev/null +++ b/docs/csharp/advanced-topics/interop/walkthrough-office-programming.md @@ -0,0 +1,133 @@ +--- +title: "Walkthrough: Office Programming - C#" +description: Learn about the features Visual Studio offers that improve Microsoft Office programming. +ms.date: 02/15/2023 +ms.topic: tutorial +dev_langs: + - "csharp" +helpviewer_keywords: + - "Office programming [C#]" +--- +# Walkthrough: Office Programming in C\# + +C# offers features that improve Microsoft Office programming. Helpful C# features include named and optional arguments and return values of type `dynamic`. In COM programming, you can omit the `ref` keyword and gain access to indexed properties. + +Both languages enable embedding of type information, which allows deployment of assemblies that interact with COM components without deploying primary interop assemblies (PIAs) to the user's computer. For more information, see [Walkthrough: Embedding Types from Managed Assemblies](../../../standard/assembly/embed-types-visual-studio.md). + +This walkthrough demonstrates these features in the context of Office programming, but many of these features are also useful in general programming. In the walkthrough, you use an Excel Add-in application to create an Excel workbook. Next, you create a Word document that contains a link to the workbook. Finally, you see how to enable and disable the PIA dependency. + +[!INCLUDE[vsto_framework](../../includes/vsto-framework.md)] + +## Prerequisites + +You must have Microsoft Office Excel and Microsoft Office Word installed on your computer to complete this walkthrough. + +[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] + +## Set up an Excel Add-in application + +1. Start Visual Studio. +1. On the **File** menu, point to **New**, and then select **Project**. +1. In the **Installed Templates** pane, expand **C#**, expand **Office**, and then select the version year of the Office product. +1. In the **Templates** pane, select **Excel \<version> Add-in**. +1. Look at the top of the **Templates** pane to make sure that **.NET Framework 4**, or a later version, appears in the **Target Framework** box. +1. Type a name for your project in the **Name** box, if you want to. +1. Select **OK**. +1. The new project appears in **Solution Explorer**. + +## Add references + +1. In **Solution Explorer**, right-click your project's name and then select **Add Reference**. The **Add Reference** dialog box appears. +1. On the **Assemblies** tab, select **Microsoft.Office.Interop.Excel**, version `<version>.0.0.0` (for a key to the Office product version numbers, see [Microsoft Versions](https://en.wikipedia.org/wiki/Microsoft_Office#Versions)), in the **Component Name** list, and then hold down the CTRL key and select **Microsoft.Office.Interop.Word**, `version <version>.0.0.0`. If you don't see the assemblies, you may need to install them (see [How to: Install Office Primary Interop Assemblies](/visualstudio/vsto/how-to-install-office-primary-interop-assemblies)). +1. Select **OK**. + +## Add necessary Imports statements or using directives + +In **Solution Explorer**, right-click the **ThisAddIn.cs** file and then select **View Code**. Add the following `using` directives (C#) to the top of the code file if they aren't already present. + +:::code language="csharp" source="./snippets/OfficeWalkthrough/ThisAddIn.cs" id="Usings"::: + +## Create a list of bank accounts + +In **Solution Explorer**, right-click your project's name, select **Add**, and then select **Class**. Name the class Account.cs. Select **Add**. Replace the definition of the `Account` class with the following code. The class definitions use *auto-implemented properties*. + +:::code language="csharp" source="./snippets/OfficeWalkthrough/account.cs" id="AccountClass"::: + +To create a `bankAccounts` list that contains two accounts, add the following code to the `ThisAddIn_Startup` method in *ThisAddIn.cs*. The list declarations use *collection initializers*. + +:::code language="csharp" source="./snippets/OfficeWalkthrough/ThisAddIn.cs" id="CreateAccount"::: + +## Export data to Excel + +In the same file, add the following method to the `ThisAddIn` class. The method sets up an Excel workbook and exports data to it. + +:::code language="csharp" source="./snippets/OfficeWalkthrough/ThisAddIn.cs" id="Display"::: + +- Method [Add](<xref:Microsoft.Office.Interop.Excel.Workbooks.Add%2A>) has an *optional parameter* for specifying a particular template. Optional parameters enable you to omit the argument for that parameter if you want to use the parameter's default value. Because the previous example has no arguments, `Add` uses the default template and creates a new workbook. The equivalent statement in earlier versions of C# requires a placeholder argument: `excelApp.Workbooks.Add(Type.Missing)`. For more information, see [Named and Optional Arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md). +- The `Range` and `Offset` properties of the [Range](<xref:Microsoft.Office.Interop.Excel.Range>) object use the *indexed properties* feature. This feature enables you to consume these properties from COM types by using the following typical C# syntax. Indexed properties also enable you to use the `Value` property of the `Range` object, eliminating the need to use the `Value2` property. The `Value` property is indexed, but the index is optional. Optional arguments and indexed properties work together in the following example. + +:::code language="csharp" source="./snippets/OfficeWalkthrough/ThisAddIn.cs" id="IndexedProperties"::: + +You can't create indexed properties of your own. The feature only supports consumption of existing indexed properties. + +Add the following code at the end of `DisplayInExcel` to adjust the column widths to fit the content. + +:::code language="csharp" source="./snippets/OfficeWalkthrough/ThisAddIn.cs" id="AutoFit"::: + +These additions demonstrate another feature in C#: treating `Object` values returned from COM hosts such as Office as if they have type [dynamic](../../language-reference/builtin-types/reference-types.md). COM objects are treated as `dynamic` automatically when **Embed Interop Types** has its default value, `True`, or, equivalently, when you reference the assembly with the [**EmbedInteropTypes**](../../language-reference/compiler-options/inputs.md#embedinteroptypes) compiler option. For more information about embedding interop types, see procedures "To find the PIA reference" and "To restore the PIA dependency" later in this article. For more information about `dynamic`, see [dynamic](../../language-reference/builtin-types/reference-types.md) or [Using Type dynamic](using-type-dynamic.md). + +## Invoke DisplayInExcel + +Add the following code at the end of the `ThisAddIn_StartUp` method. The call to `DisplayInExcel` contains two arguments. The first argument is the name of the list of accounts processed. The second argument is a multiline lambda expression defining how to process the data. The `ID` and `balance` values for each account are displayed in adjacent cells, and the row is displayed in red if the balance is less than zero. For more information, see [Lambda Expressions](../../language-reference/operators/lambda-expressions.md). + +:::code language="csharp" source="./snippets/OfficeWalkthrough/ThisAddIn.cs" id="CallDisplay"::: + +To run the program, press F5. An Excel worksheet appears that contains the data from the accounts. + +## Add a Word document + +Add the following code at the end of the `ThisAddIn_StartUp` method to create a Word document that contains a link to the Excel workbook. + +:::code language="csharp" source="./snippets/OfficeWalkthrough/ThisAddIn.cs" id="PasteIntoWord"::: + +This code demonstrates several of the features in C#: the ability to omit the `ref` keyword in COM programming, named arguments, and optional arguments.The [PasteSpecial](<xref:Microsoft.Office.Interop.Word.Selection.PasteSpecial%2A>) method has seven parameters, all of which are optional reference parameters. Named and optional arguments enable you to designate the parameters you want to access by name and to send arguments to only those parameters. In this example, arguments indicate creating a link to the workbook on the Clipboard (parameter `Link`) and displaying that the link in the Word document as an icon (parameter `DisplayAsIcon`). C# also enables you to omit the `ref` keyword for these arguments. + +## Run the application + +Press F5 to run the application. Excel starts and displays a table that contains the information from the two accounts in `bankAccounts`. Then a Word document appears that contains a link to the Excel table. + +## Clean up the completed project + +In Visual Studio, select **Clean Solution** on the **Build** menu. Otherwise, the add-in runs every time that you open Excel on your computer. + +## Find the PIA reference + +1. Run the application again, but don't select **Clean Solution**. +1. Select the **Start**. Locate **Microsoft Visual Studio \<version>** and open a developer command prompt. +1. Type `ildasm` in the Developer Command Prompt for Visual Studio window, and then press ENTER. The IL DASM window appears. +1. On the **File** menu in the IL DASM window, select **File** > **Open**. Double-click **Visual Studio \<version>**, and then double-click **Projects**. Open the folder for your project, and look in the bin/Debug folder for *your project name*.dll. Double-click *your project name*.dll. A new window displays your project's attributes, in addition to references to other modules and assemblies. The assembly includes the namespaces `Microsoft.Office.Interop.Excel` and `Microsoft.Office.Interop.Word`. By default in Visual Studio, the compiler imports the types you need from a referenced PIA into your assembly. For more information, see [How to: View Assembly Contents](../../../standard/assembly/view-contents.md). +1. Double-click the **MANIFEST** icon. A window appears that contains a list of assemblies that contain items referenced by the project. `Microsoft.Office.Interop.Excel` and `Microsoft.Office.Interop.Word` aren't in the list. Because you imported the types your project needs into your assembly, you aren't required to install references to a PIA. Importing the types into your assembly makes deployment easier. The PIAs don't have to be present on the user's computer. An application doesn't require deployment of a specific version of a PIA. Applications can work with multiple versions of Office, provided that the necessary APIs exist in all versions. Because deployment of PIAs is no longer necessary, you can create an application in advanced scenarios that works with multiple versions of Office, including earlier versions. Your code can't use any APIs that aren't available in the version of Office you're working with. It isn't always clear whether a particular API was available in an earlier version. Working with earlier versions of Office isn't recommended. +1. Close the manifest window and the assembly window. + +## Restore the PIA dependency + +1. In **Solution Explorer**, select the **Show All Files** button. Expand the **References** folder and select **Microsoft.Office.Interop.Excel**. Press F4 to display the **Properties** window. +1. In the **Properties** window, change the **Embed Interop Types** property from **True** to **False**. +1. Repeat steps 1 and 2 in this procedure for `Microsoft.Office.Interop.Word`. +1. In C#, comment out the two calls to `Autofit` at the end of the `DisplayInExcel` method. +1. Press F5 to verify that the project still runs correctly. +1. Repeat steps 1-3 from the previous procedure to open the assembly window. Notice that `Microsoft.Office.Interop.Word` and `Microsoft.Office.Interop.Excel` are no longer in the list of embedded assemblies. +1. Double-click the **MANIFEST** icon and scroll through the list of referenced assemblies. Both `Microsoft.Office.Interop.Word` and `Microsoft.Office.Interop.Excel` are in the list. Because the application references the Excel and Word PIAs, and the **Embed Interop Types** property is **False**, both assemblies must exist on the end user's computer. +1. In Visual Studio, select **Clean Solution** on the **Build** menu to clean up the completed project. + +## See also + +- [Auto-Implemented Properties (C#)](../../programming-guide/classes-and-structs/auto-implemented-properties.md) +- [Object and Collection Initializers](../../programming-guide/classes-and-structs/object-and-collection-initializers.md) +- [Named and Optional Arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md) +- [dynamic](../../language-reference/builtin-types/reference-types.md) +- [Using Type dynamic](using-type-dynamic.md) +- [Lambda Expressions (C#)](../../language-reference/operators/lambda-expressions.md) +- [Walkthrough: Embedding Type Information from Microsoft Office Assemblies in Visual Studio](/previous-versions/visualstudio/visual-studio-2013/ee317478(v=vs.120)) +- [Walkthrough: Embedding Types from Managed Assemblies](../../../standard/assembly/embed-types-visual-studio.md) +- [Walkthrough: Creating Your First VSTO Add-in for Excel](/visualstudio/vsto/walkthrough-creating-your-first-vsto-add-in-for-excel) diff --git a/docs/csharp/advanced-topics/performance/index.md b/docs/csharp/advanced-topics/performance/index.md new file mode 100644 index 0000000000000..c9a681b88972a --- /dev/null +++ b/docs/csharp/advanced-topics/performance/index.md @@ -0,0 +1,106 @@ +--- +title: Avoid memory allocations and data copies +description: Performance work in .NET means removing allocations from your code. One technique is to change critical data structures from `class` to `struct`. That changes semantics and means more data is being copied. Learn how to minimize allocations while preserving semantics and avoid extra copies. +ms.date: 02/03/2023 +ms.technology: csharp-advanced-concepts +--- +# Reduce memory allocations using new C# features + +> [!IMPORTANT] +> The techniques described in this section improve performance when applied to *hot paths* in your code. *Hot paths* are those sections of your codebase that are executed often and repeatedly in normal operations. Applying these techniques to code that isn't often executed will have minimal impact. Before making any changes to improve performance, it's critical to measure a baseline. Then, analyze that baseline to determine where memory bottlenecks occur. You can learn about many cross platform tools to measure your application's performance in the section on [Diagnostics and instrumentation](../../../core/diagnostics/index.md). You can practice a profiling session in the tutorial to [Measure memory usage](/visualstudio/profiling/memory-usage) in the Visual Studio documentation. +> +> Once you've measured memory usage and have determined that you can reduce allocations, use the techniques in this section to reduce allocations. After each successive change, measure memory usage again. Make sure each change has a positive impact on the memory usage in your application. + +Performance work in .NET often means removing allocations from your code. Every block of memory you allocate must eventually be freed. Fewer allocations reduce time spent in garbage collection. It allows for more predictable execution time by removing garbage collections from specific code paths. + +A common tactic to reduce allocations is to change critical data structures from `class` types to `struct` types. This change impacts the semantics of using those types. Parameters and returns are now passed by value instead of by reference. The cost of copying a value is negligible if the types are small, three words or less (considering one word being of natural size of one integer). It's measurable and can have real performance impact for larger types. To combat the effect of copying, developers can pass these types by `ref` to get back the intended semantics. + +The C# `ref` features give you the ability to express the desired semantics for `struct` types without negatively impacting their overall usability. Prior to these enhancements, developers needed to resort to `unsafe` constructs with pointers and raw memory to achieve the same performance impact. The compiler generates *verifiably safe code* for the new `ref` related features. *Verifiably safe code* means the compiler detects possible buffer overruns or accessing unallocated or freed memory. The compiler detects and prevents some errors. + +## Pass and return by reference + +Variables in C# store *values*. In `struct` types, the value is the contents of an instance of the type. In `class` types, the value is a reference to a block of memory that stores an instance of the type. Adding the `ref` modifier means that the variable stores the *reference* to the value. In `struct` types, the reference points to the storage containing the value. In `class` types, the reference points to the storage containing the reference to the block of memory. + +In C#, parameters to methods are *passed by value*, and return values are *return by value*. The *value* of the argument is passed to the method. The *value* of the return argument is the return value. + +The `ref`, `in`, or `out` modifier indicates that parameter is *passed by reference*. The *reference* to the storage location is passed to the method. Adding `ref` to the method signature means the return value is *returned by reference*. The *reference* to the storage location is the return value. + +You can also use *ref assignment* to have a variable refer to another variable. A typical assignment copies the *value* of the right hand side to the variable on the left hand side of the assignment. A *ref assignment* copies the memory location of the variable on the right hand side to the variable on the left hand side. The `ref` now refers to the original variable: + +:::code language="csharp" source="./snippets/ref-safety/Program.cs" id="RefAssignment"::: + +When you *assign* a variable, you change its *value*. When you *ref assign* a variable, you change what it refers to. + +You can work directly with the storage for values using `ref` variables, pass by reference, and ref assignment. Scope rules enforced by the compiler ensure safety when working directly with storage. + +## Ref safe to escape scope + +C# includes rules for `ref` expressions to ensure that a `ref` expression can't be accessed where the storage it refers to is no longer valid. Consider the following example: + +```csharp +public ref int CantEscape() +{ + int index = 42; + return ref index; // Error: index's ref safe to escape scope is the body of CantEscape +} +``` + +The compiler reports an error because you can't return a reference to a local variable from a method. The caller can't access the storage being referred to. The *ref safe to escape scope* defines the scope in which a `ref` expression is safe to access or modify. The following table lists the *ref safe to escape scopes* for variable types. `ref` fields can't be declared in a `class` or a non-ref `struct`, so those those rows aren't in the table: + +| Declaration | *ref safe to escape scope* | +|-----------------------------|-------------------------------| +| non-ref local | block where local is declared | +| non-ref parameter | current method | +| `ref`, `in` parameter | calling method | +| `out` parameter | current method | +| `class` field | calling method | +| non-ref `struct` field | current method | +| `ref` field of `ref struct` | calling method | + +A variable can be `ref` returned if its *ref safe to escape scope* is the calling method. If its *ref safe to escape scope* is the current method or a block, `ref` return is disallowed. The following snippet shows two examples. A member field can be accessed from the scope calling a method, so a class or struct field's *ref safe to escape scope* is the calling method. The *ref safe to escape scope* for a parameter with the `ref`, or `in` modifiers is the entire method. Both can be `ref` returned from a member method: + +:::code language="csharp" source="./snippets/ref-safety/EscapeScopes.cs" id="RefSafeToEscapeScopes"::: + +> [!NOTE] +> When the `in` modifier is applied to a parameter, that parameter can be returned by `ref readonly`, not `ref`. + +The compiler ensures that a reference can't escape its *ref safe to escape scope*. You can use `ref` parameters, `ref return` and `ref` local variables safely because the compiler detects if you've accidentally written code where a `ref` expression could be accessed when its storage isn't valid. + +## Safe to escape scope and ref structs + +`ref struct` types require more rules to ensure they can be used safely. A `ref struct` type may include `ref` fields. That requires the introduction of a *safe to escape scope*. For most types, the *safe to escape scope* is the calling method. In other words, a value that's not a `ref struct` can always be returned from a method. + +Informally, the *safe to escape scope* for a `ref struct` is the scope where all of its `ref` fields can be accessed. In other words, it's the intersection of the *ref safe to escape scopes* of all its `ref` fields. The following method returns a `ReadOnlySpan<char>` to a member field, so its *safe to escape scope* is the method: + +:::code language="csharp" source="./snippets/ref-safety/EscapeScopes.cs" id="SafeToEscapeScope"::: + +In contrast, the following code emits an error because the `ref field` member of the `Span<int>` refers to the stack allocated array of integers. It can't escape the method: + +```csharp +public Span<int> M() +{ + int length = 3; + Span<int> numbers = stackalloc int[length]; + for (var i = 0; i < length; i++) + { + numbers[i] = i; + } + return numbers; // Error! numbers can't escape this method. +} +``` + +## Unify memory types + +The introduction of <xref:System.Span%601?displayProperty=fullName> and <xref:System.Memory%601?displayProperty=fullName> provide a unified model for working with memory. <xref:System.ReadOnlySpan%601?displayProperty=fullName> and <xref:System.ReadOnlyMemory%601?displayProperty=fullName> provide readonly versions for accessing memory. They all provide an abstraction over a block of memory storing an array of similar elements. The difference is that `Span<T>` and `ReadOnlySpan<T>` are `ref struct` types whereas `Memory<T>` and `ReadOnlyMemory<T>` are `struct` types. Spans contain a `ref field`. Therefore instances of a span can't leave its *safe to escape scope*. The *safe to escape* scope of a `ref struct` is the *ref safe to escape scope* of its `ref field`. The implementation of `Memory<T>` and `ReadOnlyMemory<T>` remove this restriction. You use these types to directly access memory buffers. + +## Improve performance with ref safety + +Using these features to improve performance involves these tasks: + +- *Avoid allocations*: When you change a type from a `class` to a `struct`, you change how it's stored. Local variables are stored on the stack. Members are stored inline when the container object is allocated. This change means fewer allocations and that decreases the work the garbage collector does. It may also decrease memory pressure so the garbage collector runs less often. +- *Preserve reference semantics*: Changing a type from a `class` to a `struct` changes the semantics of passing a variable to a method. Code that modified the state of its parameters needs modification. Now that the parameter is a `struct`, the method is modifying a copy of the original object. You can restore the original semantics by passing that parameter as a `ref` parameter. After that change, the method modifies the original `struct` again. +- *Avoid copying data*: Copying larger `struct` types can impact performance in some code paths. You can also add the `ref` modifier to pass larger data structures to methods by reference instead of by value. +- *Restrict modifications*: When a `struct` type is passed by reference, the called method could modify the state of the struct. You can replace the `ref` modifier with the `in` modifier to indicate that the argument can't be modified. You can also create `readonly struct` types or `struct` types with `readonly` members to provide more control over what members of a `struct` can be modified. +- *Directly manipulate memory*: Some algorithms are most efficient when treating data structures as a block of memory containing a sequence of elements. The `Span` and `Memory` types provide safe access to blocks of memory. + +None of these techniques require `unsafe` code. Used wisely, you can get performance characteristics from safe code that was previously only possible by using unsafe techniques. You can try the techniques yourself in the tutorial on [reducing memory allocations](ref-tutorial.md) diff --git a/docs/csharp/advanced-topics/performance/media/ref-tutorial/allocationsbytype.png b/docs/csharp/advanced-topics/performance/media/ref-tutorial/allocationsbytype.png new file mode 100644 index 0000000000000..91ab8bc824a9c Binary files /dev/null and b/docs/csharp/advanced-topics/performance/media/ref-tutorial/allocationsbytype.png differ diff --git a/docs/csharp/advanced-topics/performance/media/ref-tutorial/final-allocations.png b/docs/csharp/advanced-topics/performance/media/ref-tutorial/final-allocations.png new file mode 100644 index 0000000000000..c954c50dacf82 Binary files /dev/null and b/docs/csharp/advanced-topics/performance/media/ref-tutorial/final-allocations.png differ diff --git a/docs/csharp/advanced-topics/performance/media/ref-tutorial/profilerallocationgraph.png b/docs/csharp/advanced-topics/performance/media/ref-tutorial/profilerallocationgraph.png new file mode 100644 index 0000000000000..94d94f226d7cc Binary files /dev/null and b/docs/csharp/advanced-topics/performance/media/ref-tutorial/profilerallocationgraph.png differ diff --git a/docs/csharp/advanced-topics/performance/ref-tutorial.md b/docs/csharp/advanced-topics/performance/ref-tutorial.md new file mode 100644 index 0000000000000..f8e577c1c06e8 --- /dev/null +++ b/docs/csharp/advanced-topics/performance/ref-tutorial.md @@ -0,0 +1,225 @@ +--- +title: "Tutorial: Reduce memory allocations using struct data types and ref language features." +description: Learn to remove allocations from your code. Make use of `struct` types for fewer allocations. Use the `ref` and `in` modifiers to avoid copies and enable or disable modification. Use `ref struct` types like `Span<T>` to directly use memory efficiently. +ms.date: 01/27/2023 +ms.technology: csharp-advanced-concepts +--- +# Tutorial: Reduce memory allocations with `ref` safety + +Often, performance tuning for a .NET application involves two techniques. First, reduce the number and size of heap allocations. Second, reduce how often data is copied. Visual Studio provides great [tools](/visualstudio/profiling/dotnet-alloc-tool) that help analyze how your application is using memory. Once you've determined where your app makes unnecessary allocations, you make changes to minimize those allocations. You convert `class` types to `struct` types. You use `ref` safety [features](index.md) to preserve semantics and minimize extra copying. + +Use [Visual Studio 17.5](https://visualstudio.microsoft.com/) for the best experience with this tutorial. The .NET object allocation tool used to analyze memory usage is part of Visual Studio. You can use [Visual Studio Code](https://code.visualstudio.com/) and the command line to run the application and make all the changes. However, you won't be able to see the analysis results of your changes. + +The application you'll use is a simulation of an IoT application that monitors several sensors to determine if an intruder has entered a secret gallery with valuables. The IoT sensors are constantly sending data that measures the mix of Oxygen (O2) and Carbon Dioxide (CO2) in the air. They also report the temperature and relative humidity. Each of these values is fluctuating slightly all the time. However, when a person enters the room, the change a bit more, and always in the same direction: Oxygen decreases, Carbon Dioxide increases, temperature increases, as does relative humidity. When the sensors combine to show increases, the intruder alarm is triggered. + +In this tutorial, you'll run the application, take measurements on memory allocations, then improve the performance by reducing the number of allocations. The source code is available in the [samples browser](/samples/dotnet/samples/performance-allocations/). + +## Explore the starter application + +Download the application and run the starter sample. The starter application works correctly, but because it allocates many small objects with each measurement cycle, its performance slowly degrades as it runs over time. + +```console +Press <return> to start simulation + +Debounced measurements: + Temp: 67.332 + Humidity: 41.077% + Oxygen: 21.097% + CO2 (ppm): 404.906 +Average measurements: + Temp: 67.332 + Humidity: 41.077% + Oxygen: 21.097% + CO2 (ppm): 404.906 + +Debounced measurements: + Temp: 67.349 + Humidity: 46.605% + Oxygen: 20.998% + CO2 (ppm): 408.707 +Average measurements: + Temp: 67.349 + Humidity: 46.605% + Oxygen: 20.998% + CO2 (ppm): 408.707 +``` + +Many rows removed. + +```console +Debounced measurements: + Temp: 67.597 + Humidity: 46.543% + Oxygen: 19.021% + CO2 (ppm): 429.149 +Average measurements: + Temp: 67.568 + Humidity: 45.684% + Oxygen: 19.631% + CO2 (ppm): 423.498 +Current intruders: 3 +Calculated intruder risk: High + +Debounced measurements: + Temp: 67.602 + Humidity: 46.835% + Oxygen: 19.003% + CO2 (ppm): 429.393 +Average measurements: + Temp: 67.568 + Humidity: 45.684% + Oxygen: 19.631% + CO2 (ppm): 423.498 +Current intruders: 3 +Calculated intruder risk: High +``` + +You can explore the code to learn how the application works. The main program runs the simulation. After you press `<Enter>`, it creates a room, and gathers some initial baseline data: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-starter/Program.cs" id="Baseline"::: + +Once that baseline data has been established, it runs the simulation on the room, where a random number generator determines if an intruder has entered the room: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-starter/Program.cs" id="Simulation"::: + +Other types contain the measurements, a debounced measurement that is the average of the last 50 measurements, and the average of all measurements taken. + +Next, run the application using the [.NET object allocation tool](/visualstudio/profiling/dotnet-alloc-tool). Make sure you're using the `Release` build, not the `Debug` build. On the *Debug* menu, open the *Performance profiler*. Check the *.NET Object Allocation Tracking* option, but nothing else. Run your application to completion. The profiler measures object allocations and reports on allocations and garbage collection cycles. You should see a graph similar to the following image: + +:::image type="content" source="media/ref-tutorial/profilerallocationgraph.png" alt-text="Allocation graph for running the intruder alert app before any optimizations."::: + +The previous graph shows that working to minimize allocations will provide performance benefits. You see a sawtooth pattern in the live objects graph. That tells you that numerous objects are created that quickly become garbage. They're later collected, as shown in the object delta graph. The downward red bars indicate a garbage collection cycle. + +Next, look at the *Allocations* tab below the graphs. This table shows what types are allocated the most: + +:::image type="content" source="media/ref-tutorial/allocationsbytype.png" alt-text="Chart that shows which types are allocated most frequently."::: + +The <xref:System.String?displayProperty=nameWithType> type accounts for the most allocations. The most important task should be to minimize the frequency of string allocations. This application prints numerous formatted output to the console constantly. For this simulation, we want to keep messages, so we'll concentrate on the next two rows: the `SensorMeasurement` type, and the `IntruderRisk` type. + +Double-click on the `SensorMeasurement` line. You can see that all the allocations take place in the `static` method `SensorMeasurement.TakeMeasurement`. You can see the method in the following snippet: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-starter/SensorMeasurement.cs" id="TakeMeasurement"::: + +Every measurement allocates a new `SensorMeasurement` object, which is a `class` type. Every `SensorMeasurement` created causes a heap allocation. + +## Change classes to structs + +The following code shows the initial declaration of `SensorMeasurement`: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-starter/SensorMeasurement.cs" id="SensorMeasurementClass"::: + +The type was originally created as a `class` because it contains numerous `double` measurements. It's larger than you'd want to copy in hot paths. However, that decision meant a large number of allocations. Change the type from a `class` to a `struct`. + +Changing from a `class` to `struct` introduces a few compiler errors because the original code used `null` reference checks in a few spots. The first is in the `DebounceMeasurement` class, in the `AddMeasurement` method: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-starter/DebounceMeasurement.cs" id="AddDebounceMeasurement"::: + +The `DebounceMeasurement` type contains an array of 50 measurements. The readings for a sensor are reported as the average of the last 50 measurements. That reduces the noise in the readings. Before a full 50 readings have been taken, these values are `null`. The code checks for `null` reference to report the correct average on system startup. After changing the `SensorMeasurement` type to a struct, you must use a different test. The `SensorMeasurement` type includes a `string` for the room identifier, so you can use that test instead: + +```csharp +if (recentMeasurements[i].Room is not null) +``` + +The other three compiler errors are all in the method that repeatedly takes measurements in a room: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-starter/Room.cs" id="InitialTakeMeasurement"::: + +In the starter method, the local variable for the `SensorMeasurement` is a *nullable reference*: + +```csharp +SensorMeasurement? measure = default; +``` + +Now that the `SensorMeasurement` is a `struct` instead of a `class`, the nullable is a *nullable value type*. You can change the declaration to a value type to fix the remaining compiler errors: + +```csharp +SensorMeasurement measure = default; +``` + +Now that the compiler errors have been addressed, you should examine the code to ensure the semantics haven't changed. Because `struct` types are passed by value, modifications made to method parameters aren't visible after the method returns. + +> [!IMPORTANT] +> Changing a type from a `class` to a `struct` can change the semantics of your program. When a `class` type is passed to a method, any mutations made in the method are made to the argument. When a `struct` type is passed to a method, and mutations made in the method are made to *a copy* of the argument. That means any method that modifies its arguments by design should be updated to use the `ref` modifier on any argument type you've changed from a `class` to a `struct`. + +The `SensorMeasurement` type doesn't include any methods that change state, so that's not a concern in this sample. You can prove that by adding the `readonly` modifier to the `SensorMeasurement` struct: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-finished/SensorMeasurement.cs" id="ReadonlySensorMeasurement"::: + +The compiler enforces the `readonly` nature of the `SensorMeasurement` struct. If your inspection of the code missed some method that modified state, the compiler would tell you. Your app still builds without errors, so this type is `readonly`. Adding the `readonly` modifier when you change a type from a `class` to a `struct` can help you find members that modify the state of the `struct`. + +## Avoid making copies + +You've removed a large number of unnecessary allocations from your app. The `SensorMeasurement` type doesn't appear in the table anywhere. + +Now, it's doing extra working copying the `SensorMeasurement` structure every time it's used as a parameter or a return value. The `SensorMeasurement` struct contains four doubles, a <xref:System.DateTime> and a `string`. That structure is measurably larger than a reference. Let's add the `ref` or `in` modifiers to places where the `SensorMeasurement` type is used. + +The next step is to find methods that return a measurement, or take a measurement as an argument, and use references where possible. Start in the `SensorMeasurement` struct. The static `TakeMeasurement` method creates and returns a new `SensorMeasurement`: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-finished/SensorMeasurement.cs" id="TakeMeasurement"::: + +We'll leave this one as is, returning by value. If you tried to return by `ref`, you'd get a compiler error. You can't return a `ref` to a new structure locally created in the method. The design of the immutable struct means you can only set the values of the measurement at construction. This method must create a new measurement struct. + +Let's look again at `DebounceMeasurement.AddMeasurement`. You should add the `in` modifier to the `measurement` parameter: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-finished/DebounceMeasurement.cs" id="InArgument"::: + +That saves one copy operation. The `in` parameter is a reference to the copy already created by the caller. You can also save a copy with the `TakeMeasurement` method in the `Room` type. This method illustrates how the compiler provides safety when you pass arguments by `ref`. The initial `TakeMeasurement` method in the `Room` type takes an argument of `Func<SensorMeasurement, bool>`. If you try to add the `in` or `ref` modifier to that declaration, the compiler reports an error. You can't pass a `ref` argument to a lambda expression. The compiler can't guarantee that the called expression doesn't copy the reference. If the lambda expression *captures* the reference, the reference could have a lifetime longer than the value it refers to. Accessing it outside its *ref safe to escape scope* would result in memory corruption. The `ref` safety rules don't allow it. You can learn more in the overview of [ref safety features](index.md#ref-safe-to-escape-scope). + +## Preserve semantics + +The final sets of changes won't have a major impact on this application's performance because the types aren't created in hot paths. These changes illustrate some of the other techniques you'd use in your performance tuning. Let's take a look at the initial `Room` class: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-starter/Room.cs" id="RoomClass"::: + +This type contains several properties. Some are `class` types. Creating a `Room` object involves multiple allocations. One for the `Room` itself, and one for each of the members of a `class` type that it contains. You can convert two of these properties from `class` types to `struct` types: the `DebounceMeasurement` and `AverageMeasurement` types. Let's work through that transformation with both types. + +Change the `DebounceMeasurement` type from a `class` to `struct`. That introduces a compiler error `CS8983: A 'struct' with field initializers must include an explicitly declared constructor`. You can fix this by adding an empty parameterless constructor: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-finished/DebounceMeasurement.cs" id="ParameterlessCtor"::: + +You can learn more about this requirement in the language reference article on [structs](../../language-reference/builtin-types/struct.md#struct-initialization-and-default-values). + + The <xref:System.Object.ToString?displayProperty=nameWithType> override doesn't modify any of the values of the struct. You can add the `readonly` modifier to that method declaration. The `DebounceMeasurement` type is *mutable*, so you'll need to take care that modifications don't affect copies that are discarded. The `AddMeasurement` method does modify the state of the object. It's called from the `Room` class, in the `TakeMeasurements` method. You want those changes to persist after calling the method. You can change the `Room.Debounce` property to return a *reference* to a single instance of the `DebounceMeasurement` type: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-finished/Room.cs" id="DebounceAsReference"::: + +There are a few changes in the previous example. First, the *property* is a readonly property that returns a readonly reference to the instance owned by this room. It's now backed by a declared field that's initialized when the `Room` object is instantiated. After making these changes, you'll update the implementation of `AddMeasurement` method. It uses the private backing field, `debounce`, not the readonly property `Debounce`. That way, the changes take place on the single instance created during initialization. + +The same technique works with the `Average` property. First, you modify the `AverageMeasurement` type from a `class` to a `struct`, and add the `readonly` modifier on the `ToString` method: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-finished/AverageMeasurement.cs"::: + +Then, you modify the `Room` class following the same technique you used for the `Debounce` property. The `Average` property returns a `readonly ref` to the private field for the average measurement. The `AddMeasurement` method modifies the internal fields. + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-finished/Room.cs" id="AverageMeasurement"::: + +## Avoid boxing + +There's one final change to improve performance. The main program is printing stats for the room, including the risk assessment: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-starter/Program.cs" id="RoomStatus"::: + +The call to the generated `ToString` boxes the enum value. You can avoid that by writing an override in the `Room` class that formats the string based on the value of estimated risk: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-finished/Room.cs" id="RoomToString"::: + +Then, modify the code in the main program to call this new `ToString` method: + +:::code language="csharp" source="./snippets/ref-tutorial/IntruderAlert-finished/Program.cs" id="RoomStatsFinished"::: + +Run the app using the profiler and look at the updated table for allocations. + +:::image type="content" source="media/ref-tutorial/final-allocations.png" alt-text="Allocation graph for running the intruder alert app after modifications."::: + +You've removed numerous allocations, and provided your app with a performance boost. + +## Using ref safety in your application + +These techniques are low-level performance tuning. They can increase performance in your application when applied to hot paths, and when you've measured the impact before and after the changes. In most cases, the cycle you'll follow is: + +- *Measure allocations*: Determine what types are being allocated the most, and when you can reduce the heap allocations. +- *Convert class to struct*: Many times, types can be converted from a `class` to a `struct`. Your app uses stack space instead of making heap allocations. +- *Preserve semantics*: Converting a `class` to a `struct` can impact the semantics for parameters and return values. Any method that modifies its parameters should now mark those parameters with the `ref` modifier. That ensures the modifications are made to the correct object. Similarly, if a property or method return value should be modified by the caller, that return should be marked with the `ref` modifier. +- *Avoid copies*: When you pass a large struct as a parameter, you can mark the parameter with the `in` modifier. You can pass a reference in fewer bytes, and ensure that the method doesn't modify the original value. You can also return values by `readonly ref` to return a reference that can't be modified. + +Using these techniques you can improve performance in hot paths of your code. diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-safety/EscapeScopes.cs b/docs/csharp/advanced-topics/performance/snippets/ref-safety/EscapeScopes.cs new file mode 100644 index 0000000000000..3bd9798e6a213 --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-safety/EscapeScopes.cs @@ -0,0 +1,31 @@ +namespace RefSafety; + +public class EscapeScopes +{ + // <SafeToEscapeScope> + private string longMessage = "This is a long message"; + + public ReadOnlySpan<char> Safe() + { + var span = longMessage.AsSpan(); + return span; + } + // </SafeToEscapeScope> + + // <RefSafeToEscapeScopes> + private int anIndex; + + public ref int RetrieveIndexRef() + { + return ref anIndex; + } + + public ref int RefMin(ref int left, ref int right) + { + if (left < right) + return ref left; + else + return ref right; + } + // </RefSafeToEscapeScopes> +} diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-safety/Program.cs b/docs/csharp/advanced-topics/performance/snippets/ref-safety/Program.cs new file mode 100644 index 0000000000000..774d9e9cc2626 --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-safety/Program.cs @@ -0,0 +1,17 @@ +using RefSafety; + + +ref int value = ref (new EscapeScopes().RetrieveIndexRef()); +Console.WriteLine(value); + +// <RefAssignment> +int anInteger = 42; // assignment. +ref int location = ref anInteger; // ref assignment. +ref int sameLocation = ref location; // ref assignment + +Console.WriteLine(location); // output: 42 + +sameLocation = 19; // assignment + +Console.WriteLine(anInteger); // output: 19 +// </RefAssignment> \ No newline at end of file diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-safety/ref-safety.csproj b/docs/csharp/advanced-topics/performance/snippets/ref-safety/ref-safety.csproj new file mode 100644 index 0000000000000..c793d81660aca --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-safety/ref-safety.csproj @@ -0,0 +1,11 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <RootNamespace>ref_safety</RootNamespace> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/AverageMeasurement.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/AverageMeasurement.cs new file mode 100644 index 0000000000000..ad13e77f2382d --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/AverageMeasurement.cs @@ -0,0 +1,34 @@ +namespace IntruderAlert; + +public struct AverageMeasurement +{ + private double sumCO2 = 0; + private double sumO2 = 0; + private double sumTemperature = 0; + private double sumHumidity = 0; + private int totalMeasurements = 0; + + public AverageMeasurement() { } + + public readonly double CO2 => sumCO2 / totalMeasurements; + public readonly double O2 => sumO2 / totalMeasurements; + public readonly double Temperature => sumTemperature / totalMeasurements; + public readonly double Humidity => sumHumidity / totalMeasurements; + + public void AddMeasurement(in SensorMeasurement datum) + { + totalMeasurements++; + sumCO2 += datum.CO2; + sumO2 += datum.O2; + sumTemperature += datum.Temperature; + sumHumidity+= datum.Humidity; + } + + public readonly override string ToString() => $""" + Average measurements: + Temp: {Temperature:F3} + Humidity: {Humidity:P3} + Oxygen: {O2:P3} + CO2 (ppm): {CO2:F3} + """; +} diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/DebounceMeasurement.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/DebounceMeasurement.cs new file mode 100644 index 0000000000000..3dbf503ae08ee --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/DebounceMeasurement.cs @@ -0,0 +1,51 @@ +namespace IntruderAlert; + +public struct DebounceMeasurement +{ + private const int debounceSize = 50; + SensorMeasurement[] recentMeasurements = new SensorMeasurement[debounceSize]; + int totalMeasurements = 0; + public double CO2 { get; private set; } + public double O2 { get; private set; } + public double Temperature { get; private set; } + public double Humidity { get; private set; } + + // <ParameterlessCtor> + public DebounceMeasurement() { } + // </ParameterlessCtor> + + // <InArgument> + public void AddMeasurement(in SensorMeasurement datum) + { + int index = totalMeasurements % debounceSize; + recentMeasurements[index] = datum; + totalMeasurements++; + double sumCO2 = 0; + double sumO2 = 0; + double sumTemp = 0; + double sumHumidity = 0; + for (int i = 0; i < debounceSize; i++) + { + if (recentMeasurements[i].Room is not null) + { + sumCO2 += recentMeasurements[i].CO2; + sumO2+= recentMeasurements[i].O2; + sumTemp+= recentMeasurements[i].Temperature; + sumHumidity += recentMeasurements[i].Humidity; + } + } + O2 = sumO2 / ((totalMeasurements > debounceSize) ? debounceSize : totalMeasurements); + CO2 = sumCO2 / ((totalMeasurements > debounceSize) ? debounceSize : totalMeasurements); + Temperature = sumTemp / ((totalMeasurements > debounceSize) ? debounceSize : totalMeasurements); + Humidity = sumHumidity / ((totalMeasurements > debounceSize) ? debounceSize : totalMeasurements); + } + // </InArgument> + + public readonly override string ToString() => $""" + Debounced measurements: + Temp: {Temperature:F3} + Humidity: {Humidity:P3} + Oxygen: {O2:P3} + CO2 (ppm): {CO2:F3} + """; +} diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/IntruderAlert.csproj b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/IntruderAlert.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/IntruderAlert.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/Program.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/Program.cs new file mode 100644 index 0000000000000..09d9b76d9f2b2 --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/Program.cs @@ -0,0 +1,43 @@ +using IntruderAlert; + +Console.WriteLine("Press <return> to start simulation"); +Console.ReadLine(); +var room = new Room("gallery"); +var r = new Random(); + +int counter = 0; + +room.TakeMeasurements( + () => + { + ref readonly DebounceMeasurement debounce = ref room.Debounce; + Console.WriteLine(debounce.ToString()); + ref readonly AverageMeasurement average = ref room.Average; + Console.WriteLine(average.ToString()); + Console.WriteLine(); + counter++; + return counter < 20000; + }); + +counter = 0; +room.TakeMeasurements( + () => + { + ref readonly DebounceMeasurement debounce = ref room.Debounce; + Console.WriteLine(debounce.ToString()); + ref readonly AverageMeasurement average = ref room.Average; + Console.WriteLine(average.ToString()); + room.Intruders += (room.Intruders, r.Next(5)) switch + { + ( > 0, 0) => -1, + ( < 3, 1) => 1, + _ => 0 + }; + + // <RoomStatsFinished> + Console.WriteLine(room.ToString()); + // </RoomStatsFinished> + Console.WriteLine(); + counter++; + return counter < 200000; + }); \ No newline at end of file diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/Room.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/Room.cs new file mode 100644 index 0000000000000..ceb12a9703343 --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/Room.cs @@ -0,0 +1,66 @@ +namespace IntruderAlert; + +public enum IntruderRisk +{ + None, + Low, + Medium, + High, + Extreme +} + +public class Room +{ + // <AverageMeasurement> + private AverageMeasurement average = new(); + public ref readonly AverageMeasurement Average { get { return ref average; } } + // </AverageMeasurement> + + // <DebounceAsReference> + private DebounceMeasurement debounce = new(); + public ref readonly DebounceMeasurement Debounce { get { return ref debounce; } } + // </DebounceAsReference> + + public string Name { get; } + + private IntruderRisk risk; + public ref readonly IntruderRisk RiskStatus => ref risk; + + public int Intruders { get; set; } + public Room(string name) + { + Name = name; + } + + public void TakeMeasurements(Func<bool> MeasurementHandler) + { + SensorMeasurement measure = default; + do { + measure = SensorMeasurement.TakeMeasurement(Name, Intruders); + average.AddMeasurement(measure); + debounce.AddMeasurement(measure); + var CO2Variance = (debounce.CO2 - average.CO2) > 10.0 / 4; + var O2Variance = (average.O2 - debounce.O2) > 0.005 / 4.0; + var TempVariance = (debounce.Temperature - average.Temperature) > 0.05 / 4.0; + var HumidityVariance = (debounce.Humidity - average.Humidity) > 0.20 / 4; + risk = IntruderRisk.None; + if (CO2Variance) { risk++; } + if (O2Variance) { risk++; } + if (TempVariance) { risk++; } + if (HumidityVariance) { risk++; } + } while (MeasurementHandler()); + } + + // <RoomToString> + public override string ToString() => + $"Calculated intruder risk: {RiskStatus switch + { + IntruderRisk.None => "None", + IntruderRisk.Low => "Low", + IntruderRisk.Medium => "Medium", + IntruderRisk.High => "High", + IntruderRisk.Extreme => "Extreme", + _ => "Error!" + }}, Current intruders: {Intruders.ToString()}"; + // </RoomToString> +} diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/SensorMeasurement.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/SensorMeasurement.cs new file mode 100644 index 0000000000000..335d469dab196 --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-finished/SensorMeasurement.cs @@ -0,0 +1,43 @@ +namespace IntruderAlert; + +// <ReadonlySensorMeasurement> +public readonly struct SensorMeasurement +// </ReadonlySensorMeasurement> +{ + private static readonly Random generator = new Random(); + + // <TakeMeasurement> + public static SensorMeasurement TakeMeasurement(string room, int intruders) + { + return new SensorMeasurement + { + CO2 = (CO2Concentration + intruders * 10) + (20 * generator.NextDouble() - 10.0), + O2 = (O2Concentration - intruders * 0.01) + (0.005 * generator.NextDouble() - 0.0025), + Temperature = (TemperatureSetting + intruders * 0.05) + (0.5 * generator.NextDouble() - 0.25), + Humidity = (HumiditySetting + intruders * 0.005) + (0.20 * generator.NextDouble() - 0.10), + Room = room, + TimeRecorded = DateTime.Now + }; + } + // </TakeMeasurement> + + private const double CO2Concentration = 409.8; // increases with people. + private const double O2Concentration = 0.2100; // decreases + private const double TemperatureSetting = 67.5; // increases + private const double HumiditySetting = 0.4500; // increases + + public required double CO2 { get; init; } + public required double O2 { get; init; } + public required double Temperature { get; init; } + public required double Humidity { get; init; } + public required string Room { get; init; } + public required DateTime TimeRecorded { get; init; } + + public override string ToString() => $""" + Room: {Room} at {TimeRecorded}: + Temp: {Temperature:F3} + Humidity: {Humidity:P3} + Oxygen: {O2:P3} + CO2 (ppm): {CO2:F3} + """; +} diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/AverageMeasurement.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/AverageMeasurement.cs new file mode 100644 index 0000000000000..6d44b982cf32e --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/AverageMeasurement.cs @@ -0,0 +1,33 @@ +namespace IntruderAlert; + +public class AverageMeasurement +{ + private double sumCO2; + private double sumO2; + private double sumTemperature; + private double sumHumidity; + private int totalMeasurements; + + public double CO2 => sumCO2 / totalMeasurements; + public double O2 => sumO2 / totalMeasurements; + public double Temperature => sumTemperature / totalMeasurements; + public double Humidity => sumHumidity / totalMeasurements; + + public void AddMeasurement(SensorMeasurement datum) + { + totalMeasurements++; + sumCO2 += datum.CO2; + sumO2 += datum.O2; + sumTemperature += datum.Temperature; + sumHumidity+= datum.Humidity; + + } + + public override string ToString() => $""" + Average measurements: + Temp: {Temperature:F3} + Humidity: {Humidity:P3} + Oxygen: {O2:P3} + CO2 (ppm): {CO2:F3} + """; +} diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/DebounceMeasurement.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/DebounceMeasurement.cs new file mode 100644 index 0000000000000..7c724e5ae8aac --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/DebounceMeasurement.cs @@ -0,0 +1,47 @@ +namespace IntruderAlert; + +public class DebounceMeasurement +{ + private const int debounceSize = 50; + SensorMeasurement[] recentMeasurements = new SensorMeasurement[debounceSize]; + int totalMeasurements = 0; + public double CO2 { get; private set; } + public double O2 { get; private set; } + public double Temperature { get; private set; } + public double Humidity { get; private set; } + + // <AddDebounceMeasurement> + public void AddMeasurement(SensorMeasurement datum) + { + int index = totalMeasurements % debounceSize; + recentMeasurements[index] = datum; + totalMeasurements++; + double sumCO2 = 0; + double sumO2 = 0; + double sumTemp = 0; + double sumHumidity = 0; + for (int i = 0; i < debounceSize; i++) + { + if (recentMeasurements[i] is not null) + { + sumCO2 += recentMeasurements[i].CO2; + sumO2+= recentMeasurements[i].O2; + sumTemp+= recentMeasurements[i].Temperature; + sumHumidity += recentMeasurements[i].Humidity; + } + } + O2 = sumO2 / ((totalMeasurements > debounceSize) ? debounceSize : totalMeasurements); + CO2 = sumCO2 / ((totalMeasurements > debounceSize) ? debounceSize : totalMeasurements); + Temperature = sumTemp / ((totalMeasurements > debounceSize) ? debounceSize : totalMeasurements); + Humidity = sumHumidity / ((totalMeasurements > debounceSize) ? debounceSize : totalMeasurements); + } + // </AddDebounceMeasurement> + + public override string ToString() => $""" + Debounced measurements: + Temp: {Temperature:F3} + Humidity: {Humidity:P3} + Oxygen: {O2:P3} + CO2 (ppm): {CO2:F3} + """; +} diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/IntruderAlert.csproj b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/IntruderAlert.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/IntruderAlert.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/Program.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/Program.cs new file mode 100644 index 0000000000000..920e96bcc5567 --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/Program.cs @@ -0,0 +1,44 @@ +using IntruderAlert; + +// <Baseline> +Console.WriteLine("Press <return> to start simulation"); +Console.ReadLine(); +var room = new Room("gallery"); +var r = new Random(); + +int counter = 0; + +room.TakeMeasurements( + m => + { + Console.WriteLine(room.Debounce); + Console.WriteLine(room.Average); + Console.WriteLine(); + counter++; + return counter < 20000; + }); +// </Baseline> + +// <Simulation> +counter = 0; +room.TakeMeasurements( + m => + { + Console.WriteLine(room.Debounce); + Console.WriteLine(room.Average); + room.Intruders += (room.Intruders, r.Next(5)) switch + { + ( > 0, 0) => -1, + ( < 3, 1) => 1, + _ => 0 + }; + + // <RoomStatus> + Console.WriteLine($"Current intruders: {room.Intruders}"); + Console.WriteLine($"Calculated intruder risk: {room.RiskStatus}"); + // </RoomStatus> + Console.WriteLine(); + counter++; + return counter < 200000; + }); +// </Simulation> diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/Room.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/Room.cs new file mode 100644 index 0000000000000..be17504b37a9b --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/Room.cs @@ -0,0 +1,56 @@ +namespace IntruderAlert; + +public enum IntruderRisk +{ + None, + Low, + Medium, + High, + Extreme +} + +// <RoomClass> +public class Room +{ + public AverageMeasurement Average { get; } = new (); + public DebounceMeasurement Debounce { get; } = new (); + public string Name { get; } + + public IntruderRisk RiskStatus + { + get + { + var CO2Variance = (Debounce.CO2 - Average.CO2) > 10.0 / 4; + var O2Variance = (Average.O2 - Debounce.O2) > 0.005 / 4.0; + var TempVariance = (Debounce.Temperature - Average.Temperature) > 0.05 / 4.0; + var HumidityVariance = (Debounce.Humidity - Average.Humidity) > 0.20 / 4; + IntruderRisk risk = IntruderRisk.None; + if (CO2Variance) { risk++; } + if (O2Variance) { risk++; } + if (TempVariance) { risk++; } + if (HumidityVariance) { risk++; } + return risk; + } + } + + public int Intruders { get; set; } + + + public Room(string name) + { + Name = name; + } + + // <InitialTakeMeasurement> + public void TakeMeasurements(Func<SensorMeasurement, bool> MeasurementHandler) + { + SensorMeasurement? measure = default; + do { + measure = SensorMeasurement.TakeMeasurement(Name, Intruders); + Average.AddMeasurement(measure); + Debounce.AddMeasurement(measure); + } while (MeasurementHandler(measure)); + } + // </InitialTakeMeasurement> +} +// </RoomClass> \ No newline at end of file diff --git a/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/SensorMeasurement.cs b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/SensorMeasurement.cs new file mode 100644 index 0000000000000..99bca29d29e97 --- /dev/null +++ b/docs/csharp/advanced-topics/performance/snippets/ref-tutorial/IntruderAlert-starter/SensorMeasurement.cs @@ -0,0 +1,43 @@ +namespace IntruderAlert; + +// <SensorMeasurementClass> +public class SensorMeasurement +{ + private static readonly Random generator = new Random(); + + // <TakeMeasurement> + public static SensorMeasurement TakeMeasurement(string room, int intruders) + { + return new SensorMeasurement + { + CO2 = (CO2Concentration + intruders * 10) + (20 * generator.NextDouble() - 10.0), + O2 = (O2Concentration - intruders * 0.01) + (0.005 * generator.NextDouble() - 0.0025), + Temperature = (TemperatureSetting + intruders * 0.05) + (0.5 * generator.NextDouble() - 0.25), + Humidity = (HumiditySetting + intruders * 0.005) + (0.20 * generator.NextDouble() - 0.10), + Room = room, + TimeRecorded = DateTime.Now + }; + } + // </TakeMeasurement> + + private const double CO2Concentration = 409.8; // increases with people. + private const double O2Concentration = 0.2100; // decreases + private const double TemperatureSetting = 67.5; // increases + private const double HumiditySetting = 0.4500; // increases + + public required double CO2 { get; init; } + public required double O2 { get; init; } + public required double Temperature { get; init; } + public required double Humidity { get; init; } + public required string Room { get; init; } + public required DateTime TimeRecorded { get; init; } + + public override string ToString() => $""" + Room: {Room} at {TimeRecorded}: + Temp: {Temperature:F3} + Humidity: {Humidity:P3} + Oxygen: {O2:P3} + CO2 (ppm): {CO2:F3} + """; +} +// </SensorMeasurementClass> diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/accessing-attributes-by-using-reflection.md b/docs/csharp/advanced-topics/reflection-and-attributes/accessing-attributes-by-using-reflection.md new file mode 100644 index 0000000000000..97cf41175f087 --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/accessing-attributes-by-using-reflection.md @@ -0,0 +1,36 @@ +--- +title: "Access attributes using reflection" +description: Use reflection to get information defined with custom attributes in C# by using the GetCustomAttributes method. +ms.date: 03/15/2023 +--- +# Access attributes using reflection + +The fact that you can define custom attributes and place them in your source code would be of little value without some way of retrieving that information and acting on it. By using reflection, you can retrieve the information that was defined with custom attributes. The key method is `GetCustomAttributes`, which returns an array of objects that are the run-time equivalents of the source code attributes. This method has many overloaded versions. For more information, see <xref:System.Attribute>. + +An attribute specification such as: + +```csharp +[Author("P. Ackerman", Version = 1.1)] +class SampleClass { } +``` + +is conceptually equivalent to the following code: + +```csharp +var anonymousAuthorObject = new Author("P. Ackerman") +{ + Version = 1.1 +}; +``` + +However, the code isn't executed until `SampleClass` is queried for attributes. Calling `GetCustomAttributes` on `SampleClass` causes an `Author` object to be constructed and initialized. If the class has other attributes, other attribute objects are constructed similarly. `GetCustomAttributes` then returns the `Author` object and any other attribute objects in an array. You can then iterate over this array, determine what attributes were applied based on the type of each array element, and extract information from the attribute objects. + +Here's a complete example. A custom attribute is defined, applied to several entities, and retrieved via reflection. + +:::code language="csharp" source="./snippets/conceptual/ReadAttributes.cs" id="DefineAndReadAttribute"::: + +## See also + +- <xref:System.Reflection> +- <xref:System.Attribute> +- [Retrieving Information Stored in Attributes](../../../standard/attributes/retrieving-information-stored-in-attributes.md) diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/attribute-tutorial.md b/docs/csharp/advanced-topics/reflection-and-attributes/attribute-tutorial.md new file mode 100644 index 0000000000000..ee64f4cf49fff --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/attribute-tutorial.md @@ -0,0 +1,132 @@ +--- +title: "Tutorial: Define and read custom attributes." +description: Learn how attributes work in C#. You define custom attributes to add metadata to your code. You read those attributes to learn about the code at runtime +author: mgroves +ms.date: 03/15/2023 +--- + +# Define and read custom attributes + +Attributes provide a way of associating information with code in a declarative way. They can also provide a reusable element that can be applied to various targets. Consider the <xref:System.ObsoleteAttribute>. It can be applied to classes, structs, methods, constructors, and more. It _declares_ that the element is obsolete. It's then up to the C# compiler to look for this attribute, and do some action in response. + +In this tutorial, you learn how to add attributes to your code, how to create and use your own attributes, and how to use some attributes that are built into .NET. + +## Prerequisites + +You need to set up your machine to run .NET. You can find the installation instructions on the [.NET Downloads](https://dotnet.microsoft.com/download) page. You can run this application on Windows, Ubuntu Linux, macOS, or in a Docker container. You need to install your favorite code editor. The following descriptions use [Visual Studio Code](https://code.visualstudio.com), which is an open-source, cross-platform editor. However, you can use whatever tools you're comfortable with. + +## Create the app + +Now that you've installed all the tools, create a new .NET console app. To use the command line generator, execute the following command in your favorite shell: + +```dotnetcli +dotnet new console +``` + +This command creates bare-bones .NET project files. You run `dotnet restore` to restore the dependencies needed to compile this project. + +[!INCLUDE[DotNet Restore Note](~/includes/dotnet-restore-note.md)] + +To execute the program, use `dotnet run`. You should see "Hello, World" output to the console. + +## Add attributes to code + +In C#, attributes are classes that inherit from the `Attribute` base class. Any class that inherits from `Attribute` can be used as a sort of "tag" on other pieces of code. For instance, there's an attribute called `ObsoleteAttribute`. This attribute signals that code is obsolete and shouldn't be used anymore. You place this attribute on a class, for instance, by using square brackets. + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="ObsoleteExample1"::: + +While the class is called `ObsoleteAttribute`, it's only necessary to use `[Obsolete]` in the code. Most C# code follows this convention. You can use the full name `[ObsoleteAttribute]` if you choose. + +When marking a class obsolete, it's a good idea to provide some information as to *why* it's obsolete, and/or *what* to use instead. You include a string +parameter to the Obsolete attribute to provide this explanation. + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="ObsoleteExample2"::: + +The string is being passed as an argument to an `ObsoleteAttribute` constructor, as if you were writing `var attr = new ObsoleteAttribute("some string")`. + +Parameters to an attribute constructor are limited to simple types/literals: `bool, int, double, string, Type, enums, etc` and arrays of those types. +You can't use an expression or a variable. You're free to use positional or named parameters. + +## Create your own attribute + +You create an attribute by defining a new class that inherits from the `Attribute` base class. + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="CreateAttributeExample1"::: + +With the preceding code, you can use `[MySpecial]` (or `[MySpecialAttribute]`) as an attribute elsewhere in the code base. + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="CreateAttributeExample2"::: + +Attributes in the .NET base class library like `ObsoleteAttribute` trigger certain behaviors within the compiler. However, any attribute you create acts only as metadata, and doesn't result in any code within the attribute class being executed. It's up to you to act on that metadata elsewhere in your code. + +There's a 'gotcha' here to watch out for. As mentioned earlier, only certain types can be passed as arguments when using attributes. However, when creating an attribute type, the C# compiler doesn't stop you from creating those parameters. In the following example, you've created an attribute with a constructor that compiles correctly. + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="AttributeGotcha1"::: + +However, you're unable to use this constructor with attribute syntax. + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="AttributeGotcha2"::: + +The preceding code causes a compiler error like `Attribute constructor parameter 'myClass' has type 'Foo', which is not a valid attribute parameter type` + +## How to restrict attribute usage + +Attributes can be used on the following "targets". The preceding examples show them on classes, but they can also be used on: + +- Assembly +- Class +- Constructor +- Delegate +- Enum +- Event +- Field +- GenericParameter +- Interface +- Method +- Module +- Parameter +- Property +- ReturnValue +- Struct + +When you create an attribute class, by default, C# allows you to use that attribute on any of the possible attribute targets. If you want to restrict your attribute to certain targets, you can do so by using the `AttributeUsageAttribute` on your attribute class. That's right, an attribute on an attribute! + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="AttributeUsageExample1"::: + +If you attempt to put the above attribute on something that's not a class or a struct, you get a compiler error like `Attribute 'MyAttributeForClassAndStructOnly' is not valid on this declaration type. It is only valid on 'class, struct' declarations` + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="AttributeUsageExample2"::: + +## How to use attributes attached to a code element + +Attributes act as metadata. Without some outward force, they don't actually do anything. + +To find and act on attributes, reflection is needed. Reflection allows you to write code in C# that examines other code. For instance, you can use Reflection to get information about a class(add `using System.Reflection;` at the head of your code): + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="ReflectionExample1"::: + +That prints something like: `The assembly qualified name of MyClass is ConsoleApplication.MyClass, attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null` + +Once you have a `TypeInfo` object (or a `MemberInfo`, `FieldInfo`, or other object), you can use the `GetCustomAttributes` method. This method returns a collection of `Attribute` objects. You can also use `GetCustomAttribute` and specify an Attribute type. + +Here's an example of using `GetCustomAttributes` on a `MemberInfo` instance for `MyClass` (which we saw earlier has an `[Obsolete]` attribute on it). + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="ReflectionExample2"::: + +That prints to console: `Attribute on MyClass: ObsoleteAttribute`. Try adding other attributes to `MyClass`. + +It's important to note that these `Attribute` objects are instantiated lazily. That is, they aren't be instantiated until you use `GetCustomAttribute` or `GetCustomAttributes`. They're also instantiated each time. Calling `GetCustomAttributes` twice in a row returns two different instances of `ObsoleteAttribute`. + +## Common attributes in the runtime + +Attributes are used by many tools and frameworks. NUnit uses attributes like `[Test]` and `[TestFixture]` that are used by the NUnit test runner. ASP.NET MVC uses attributes like `[Authorize]` and provides an action filter framework to perform cross-cutting concerns on MVC actions. [PostSharp](https://www.postsharp.net) uses the attribute syntax to allow aspect-oriented programming in C#. + +Here are a few notable attributes built into the .NET Core base class libraries: + +* `[Obsolete]`. This one was used in the above examples, and it lives in the `System` namespace. It's useful to provide declarative documentation about a changing code base. A message can be provided in the form of a string, and another boolean parameter can be used to escalate from a compiler warning to a compiler error. +* `[Conditional]`. This attribute is in the `System.Diagnostics` namespace. This attribute can be applied to methods (or attribute classes). You must pass a string to the constructor. If that string doesn't match a `#define` directive, then the C# compiler removes any calls to that method (but not the method itself). Typically you use this technique for debugging (diagnostics) purposes. +* `[CallerMemberName]`. This attribute can be used on parameters, and lives in the `System.Runtime.CompilerServices` namespace. `CallerMemberName` is an attribute that is used to inject the name of the method that is calling another method. It's a way to eliminate 'magic strings' when implementing INotifyPropertyChanged in various UI frameworks. As an example: + +:::code language="csharp" source="./snippets/tutorial/Program.cs" id="CallerMemberName1"::: + +In the above code, you don't have to have a literal `"Name"` string. Using `CallerMemberName` prevents typo-related bugs and also makes for smoother refactoring/renaming. Attributes bring declarative power to C#, but they're a meta-data form of code and don't act by themselves. diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/creating-custom-attributes.md b/docs/csharp/advanced-topics/reflection-and-attributes/creating-custom-attributes.md new file mode 100644 index 0000000000000..96d0dc8c5b99e --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/creating-custom-attributes.md @@ -0,0 +1,47 @@ +--- +title: "Create custom attributes" +description: Learn how to create custom attributes in C# by defining an attribute class that derives from the Attribute class. +ms.date: 03/15/2023 +f1_keywords: + - "attributeNamedArgument_CSharpKeyword" +--- +# Create custom attributes + +You can create your own custom attributes by defining an attribute class, a class that derives directly or indirectly from <xref:System.Attribute>, which makes identifying attribute definitions in metadata fast and easy. Suppose you want to tag types with the name of the programmer who wrote the type. You might define a custom `Author` attribute class: + +```csharp +[System.AttributeUsage(System.AttributeTargets.Class | + System.AttributeTargets.Struct) +] +public class AuthorAttribute : System.Attribute +{ + private string Name; + public double Version; + + public AuthorAttribute(string name) + { + Name = name; + Version = 1.0; + } +} +``` + +The class name `AuthorAttribute` is the attribute's name, `Author`, plus the `Attribute` suffix. It's derived from `System.Attribute`, so it's a custom attribute class. The constructor's parameters are the custom attribute's positional parameters. In this example, `name` is a positional parameter. Any public read-write fields or properties are named parameters. In this case, `version` is the only named parameter. Note the use of the `AttributeUsage` attribute to make the `Author` attribute valid only on class and `struct` declarations. + +You could use this new attribute as follows: + +:::code language="csharp" source="./snippets/conceptual/ReadAttributes.cs" id="SampleWithVersion"::: + +`AttributeUsage` has a named parameter, `AllowMultiple`, with which you can make a custom attribute single-use or multiuse. In the following code example, a multiuse attribute is created. + +:::code language="csharp" source="./snippets/conceptual/ReadAttributes.cs" id="DefineCustomAttribute"::: + +In the following code example, multiple attributes of the same type are applied to a class. + +:::code language="csharp" source="./snippets/conceptual/ReadAttributes.cs" id="MultipleAuthors"::: + +## See also + +- <xref:System.Reflection> +- [Writing Custom Attributes](../../../standard/attributes/writing-custom-attributes.md) +- [AttributeUsage (C#)](../../language-reference/attributes/general.md) diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/generics-and-attributes.md b/docs/csharp/advanced-topics/reflection-and-attributes/generics-and-attributes.md new file mode 100644 index 0000000000000..cb1fee897c866 --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/generics-and-attributes.md @@ -0,0 +1,45 @@ +--- +title: "Generics and attributes" +description: Learn about applying attributes to generic types. See code examples and view more available resources. +ms.date: 03/15/2023 +helpviewer_keywords: + - "generics [C#], attributes" + - "attributes [C#], with generics" +--- +# Generics and Attributes + +Attributes can be applied to generic types in the same way as nongeneric types. However, you can apply attributes only on *open generic types* and *closed constructed generic types*, not on *partially constructed generic types*. An *open generic type* is one where none of the type arguments are specified, such as `Dictionary<TKey, TValue>` A *closed constructed generic type* specifies all type arguments, such as `Dictionary<string, object>`. A *partially constructed generic type* specifies some, but not all, type arguments. An example is `Dictionary<string, TValue>`. + +The following examples use this custom attribute: + +:::code language="csharp" source="./snippets/conceptual/GenericsAndAttributes.cs" id="CustomAttribute"::: + +An attribute can reference an open generic type: + +:::code language="csharp" source="./snippets/conceptual/GenericsAndAttributes.cs" id="GenericClassAsAttribute"::: + +Specify multiple type parameters using the appropriate number of commas. In this example, `GenericClass2` has two type parameters: + +:::code language="csharp" source="./snippets/conceptual/GenericsAndAttributes.cs" id="TypeParameters"::: + +An attribute can reference a closed constructed generic type: + +:::code language="csharp" source="./snippets/conceptual/GenericsAndAttributes.cs" id="ClosedGeneric"::: + +An attribute that references a generic type parameter causes a compile-time error: + +```csharp +[CustomAttribute(info = typeof(GenericClass3<int, T, string>))] //Error CS0416 +class ClassD<T> { } +``` + +Beginning with C# 11, a generic type can inherit from <xref:System.Attribute>: + +:::code language="csharp" source="./snippets/conceptual/GenericsAndAttributes.cs" id="GenericAttribute"::: + +To obtain information about a generic type or type parameter at run time, you can use the methods of <xref:System.Reflection>. For more information, see [Generics and Reflection](./generics-and-reflection.md). + +## See also + +- [Generics](../../fundamentals/types/generics.md) +- [Attributes](../../../standard/attributes/index.md) diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/generics-and-reflection.md b/docs/csharp/advanced-topics/reflection-and-attributes/generics-and-reflection.md new file mode 100644 index 0000000000000..300f7ebffbacb --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/generics-and-reflection.md @@ -0,0 +1,42 @@ +--- +title: "Generics and reflection" +description: Learn to use reflection to obtain information about generic types. View lists of terms and conditions for generic reflection. +ms.date: 03/05/2023 +helpviewer_keywords: + - "generics [C#], reflection" + - "reflection [C#], generic types" +--- +# Generics and reflection + +Because the Common Language Runtime (CLR) has access to generic type information at run time, you can use reflection to obtain information about generic types in the same way as for nongeneric types. For more information, see [Generics in the Run Time](../../programming-guide/generics/generics-in-the-run-time.md). + +The <xref:System.Reflection.Emit> namespace also contains new members that support generics. See [How to: Define a Generic Type with Reflection Emit](../../../framework/reflection-and-codedom/how-to-define-a-generic-type-with-reflection-emit.md). + +For a list of the invariant conditions for terms used in generic reflection, see the <xref:System.Type.IsGenericType%2A> property remarks: + +- <xref:System.Type.IsGenericType%2A>: Returns true if a type is generic. +- <xref:System.Type.GetGenericArguments%2A>: Returns an array of `Type` objects that represent the type arguments supplied for a constructed type, or the type parameters of a generic type definition. +- <xref:System.Type.GetGenericTypeDefinition%2A>: Returns the underlying generic type definition for the current constructed type. +- <xref:System.Type.GetGenericParameterConstraints%2A>: Returns an array of `Type` objects that represent the constraints on the current generic type parameter. +- <xref:System.Type.ContainsGenericParameters%2A>: Returns true if the type or any of its enclosing types or methods contain type parameters for which specific types haven't been supplied. +- <xref:System.Type.GenericParameterAttributes%2A>: Gets a combination of `GenericParameterAttributes` flags that describe the special constraints of the current generic type parameter. +- <xref:System.Type.GenericParameterPosition%2A>: For a `Type` object that represents a type parameter, gets the position of the type parameter in the type parameter list of the generic type definition or generic method definition that declared the type parameter. +- <xref:System.Type.IsGenericParameter%2A>: Gets a value that indicates whether the current `Type` represents a type parameter of a generic type or method definition. +- <xref:System.Type.IsGenericTypeDefinition%2A>: Gets a value that indicates whether the current <xref:System.Type> represents a generic type definition, from which other generic types can be constructed. Returns true if the type represents the definition of a generic type. +- <xref:System.Type.DeclaringMethod%2A>: Returns the generic method that defined the current generic type parameter, or null if the type parameter wasn't defined by a generic method. +- <xref:System.Type.MakeGenericType%2A>: Substitutes the elements of an array of types for the type parameters of the current generic type definition, and returns a <xref:System.Type> object representing the resulting constructed type. + +In addition, members of the <xref:System.Reflection.MethodInfo> class enable run-time information for generic methods. See the <xref:System.Reflection.MethodBase.IsGenericMethod%2A> property remarks for a list of invariant conditions for terms used to reflect on generic methods: + +- <xref:System.Reflection.MethodBase.IsGenericMethod%2A>: Returns true if a method is generic. +- <xref:System.Reflection.MethodInfo.GetGenericArguments%2A>: Returns an array of Type objects that represent the type arguments of a constructed generic method or the type parameters of a generic method definition. +- <xref:System.Reflection.MethodInfo.GetGenericMethodDefinition%2A>: Returns the underlying generic method definition for the current constructed method. +- <xref:System.Reflection.MethodBase.ContainsGenericParameters%2A>: Returns true if the method or any of its enclosing types contain any type parameters for which specific types haven't been supplied. +- <xref:System.Reflection.MethodBase.IsGenericMethodDefinition%2A>: Returns true if the current <xref:System.Reflection.MethodInfo> represents the definition of a generic method. +- <xref:System.Reflection.MethodInfo.MakeGenericMethod%2A>: Substitutes the elements of an array of types for the type parameters of the current generic method definition, and returns a <xref:System.Reflection.MethodInfo> object representing the resulting constructed method. + +## See also + +- [Generics](../../fundamentals/types/generics.md) +- [Reflection and Generic Types](../../../framework/reflection-and-codedom/reflection-and-generic-types.md) +- [Generics](../../../standard/generics/index.md) diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/how-to-create-a-c-cpp-union-by-using-attributes.md b/docs/csharp/advanced-topics/reflection-and-attributes/how-to-create-a-c-cpp-union-by-using-attributes.md new file mode 100644 index 0000000000000..9b7c232389232 --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/how-to-create-a-c-cpp-union-by-using-attributes.md @@ -0,0 +1,25 @@ +--- +title: "How to create a C/C++ union by using attributes (C#)" +description: Learn how to use attributes to customize how structs are laid out in memory in C#. This example implements the equivalent of a union from C/C++. +ms.date: 03/15/2023 +ms.topic: how-to +--- +# How to create a C/C++ union by using attributes in C\# + +By using attributes, you can customize how structs are laid out in memory. For example, you can create what is known as a union in C/C++ by using the `StructLayout(LayoutKind.Explicit)` and `FieldOffset` attributes. + +In this code segment, all of the fields of `TestUnion` start at the same location in memory. + +:::code language="csharp" source="./snippets/conceptual/CStyleUnion.cs" id="SameLocation"::: + +The following code is another example where fields start at different explicitly set locations. + +:::code language="csharp" source="./snippets/conceptual/CStyleUnion.cs" id="ExplicitLayout"::: + +The two integer fields, `i1` and `i2` combined, share the same memory locations as `lg`. Either `lg` uses the first 8 bytes, or `i1` uses the first 4 bytes and `i2` uses the next 4 bytes. This sort of control over struct layout is useful when using platform invocation. + +## See also + +- <xref:System.Reflection> +- <xref:System.Attribute> +- [Attributes](../../../standard/attributes/index.md) diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq.md b/docs/csharp/advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq.md new file mode 100644 index 0000000000000..7b9bce9b3844b --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq.md @@ -0,0 +1,15 @@ +--- +title: "How to query an assembly's metadata with Reflection (LINQ)" +description: Learn how to use LINQ with .NET reflection APIs in C# to retrieve specific metadata about methods that match a search criterion. +ms.topic: how-to +ms.date: 03/15/2023 +--- +# How to query an assembly's metadata with Reflection (LINQ) + +You use the .NET reflection APIs to examine the metadata in a .NET assembly and create collections of types, type members, and parameters that are in that assembly. Because these collections support the generic <xref:System.Collections.Generic.IEnumerable%601> interface, they can be queried by using LINQ. + +The following example shows how LINQ can be used with reflection to retrieve specific metadata about methods that match a specified search criterion. In this case, the query finds the names of all the methods in the assembly that return enumerable types such as arrays. + +:::code language="csharp" source="./snippets/conceptual/Program.cs" id="QueryReflection"::: + +The example uses the <xref:System.Reflection.Assembly.GetTypes%2A?displayProperty=nameWithType> method to return an array of types in the specified assembly. The [where](../../language-reference/keywords/where-clause.md) filter is applied so that only public types are returned. For each public type, a subquery is generated by using the <xref:System.Reflection.MethodInfo> array that is returned from the <xref:System.Type.GetMethods%2A?displayProperty=nameWithType> call. These results are filtered to return only those methods whose return type is an array or else a type that implements <xref:System.Collections.Generic.IEnumerable%601>. Finally, these results are grouped by using the type name as a key. diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/index.md b/docs/csharp/advanced-topics/reflection-and-attributes/index.md new file mode 100644 index 0000000000000..999ea58f3f811 --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/index.md @@ -0,0 +1,152 @@ +--- +title: "Attributes and reflection" +description: Use attributes to associate metadata or declarative information with code in C#. An attribute can be queried at run time by using reflection. Reflection provides objects that describe assemblies, modules, and types in C#. If your code includes attributes, reflection enables you to access them. +ms.date: 03/15/2023 +--- +# Attributes + +Attributes provide a powerful method of associating metadata, or declarative information, with code (assemblies, types, methods, properties, and so forth). After an attribute is associated with a program entity, the attribute can be queried at run time by using a technique called *reflection*. + +Attributes have the following properties: + +- Attributes add metadata to your program. *Metadata* is information about the types defined in a program. All .NET assemblies contain a specified set of metadata that describes the types and type members defined in the assembly. You can add custom attributes to specify any additional information that is required. +- You can apply one or more attributes to entire assemblies, modules, or smaller program elements such as classes and properties. +- Attributes can accept arguments in the same way as methods and properties. +- Your program can examine its own metadata or the metadata in other programs by using reflection. + +Reflection provides objects (of type <xref:System.Type>) that describe assemblies, modules, and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties. If you're using attributes in your code, reflection enables you to access them. For more information, see [Attributes](../../../standard/attributes/index.md). + +Here's a simple example of reflection using the <xref:System.Object.GetType> method - inherited by all types from the `Object` base class - to obtain the type of a variable: + +> [!NOTE] +> Make sure you add `using System;` and `using System.Reflection;` at the top of your *.cs* file. + +:::code language="csharp" source="./snippets/conceptual/Program.cs" id="GetTypeInformation"::: + +The output is: `System.Int32`. + +The following example uses reflection to obtain the full name of the loaded assembly. + +:::code language="csharp" source="./snippets/conceptual/Program.cs" id="GetAssemblyInfo"::: + +The output is something like: `System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e`. + +> [!NOTE] +> The C# keywords `protected` and `internal` have no meaning in Intermediate Language (IL) and are not used in the reflection APIs. The corresponding terms in IL are *Family* and *Assembly*. To identify an `internal` method using reflection, use the <xref:System.Reflection.MethodBase.IsAssembly%2A> property. To identify a `protected internal` method, use the <xref:System.Reflection.MethodBase.IsFamilyOrAssembly%2A>. + +## Using attributes + +Attributes can be placed on almost any declaration, though a specific attribute might restrict the types of declarations on which it's valid. In C#, you specify an attribute by placing the name of the attribute enclosed in square brackets (`[]`) above the declaration of the entity to which it applies. + +In this example, the <xref:System.SerializableAttribute> attribute is used to apply a specific characteristic to a class: + +:::code language="csharp" source="./snippets/conceptual/AttributesOverview.cs" id="Snippet1"::: + +A method with the attribute <xref:System.Runtime.InteropServices.DllImportAttribute> is declared like the following example: + +:::code language="csharp" source="./snippets/conceptual/AttributesOverview.cs" id="Snippet2"::: + +More than one attribute can be placed on a declaration as the following example shows: + +:::code language="csharp" source="./snippets/conceptual/AttributesOverview.cs" id="Snippet4"::: + +Some attributes can be specified more than once for a given entity. An example of such a multiuse attribute is <xref:System.Diagnostics.ConditionalAttribute>: + +:::code language="csharp" source="./snippets/conceptual/AttributesOverview.cs" id="Snippet5"::: + +> [!NOTE] +> By convention, all attribute names end with the word "Attribute" to distinguish them from other items in the .NET libraries. However, you do not need to specify the attribute suffix when using attributes in code. For example, `[DllImport]` is equivalent to `[DllImportAttribute]`, but `DllImportAttribute` is the attribute's actual name in the .NET Class Library. + +### Attribute parameters + +Many attributes have parameters, which can be positional, unnamed, or named. Any positional parameters must be specified in a certain order and can't be omitted. Named parameters are optional and can be specified in any order. Positional parameters are specified first. For example, these three attributes are equivalent: + +```csharp +[DllImport("user32.dll")] +[DllImport("user32.dll", SetLastError=false, ExactSpelling=false)] +[DllImport("user32.dll", ExactSpelling=false, SetLastError=false)] +``` + +The first parameter, the DLL name, is positional and always comes first; the others are named. In this case, both named parameters default to false, so they can be omitted. Positional parameters correspond to the parameters of the attribute constructor. Named or optional parameters correspond to either properties or fields of the attribute. Refer to the individual attribute's documentation for information on default parameter values. + +For more information on allowed parameter types, see the [Attributes](~/_csharpstandard/standard/attributes.md#2224-attribute-parameter-types) section of the [C# language specification](~/_csharpstandard/standard/README.md) + +### Attribute targets + +The *target* of an attribute is the entity that the attribute applies to. For example, an attribute may apply to a class, a particular method, or an entire assembly. By default, an attribute applies to the element that follows it. But you can also explicitly identify, for example, whether an attribute is applied to a method, or to its parameter, or to its return value. + +To explicitly identify an attribute target, use the following syntax: + +```csharp +[target : attribute-list] +``` + +The list of possible `target` values is shown in the following table. + +| Target value | Applies to | +|--------------|------------------------------------------------------------------------| +| `assembly` | Entire assembly | +| `module` | Current assembly module | +| `field` | Field in a class or a struct | +| `event` | Event | +| `method` | Method or `get` and `set` property accessors | +| `param` | Method parameters or `set` property accessor parameters | +| `property` | Property | +| `return` | Return value of a method, property indexer, or `get` property accessor | +| `type` | Struct, class, interface, enum, or delegate | + +You would specify the `field` target value to apply an attribute to the backing field created for an [auto-implemented property](../../properties.md). + +The following example shows how to apply attributes to assemblies and modules. For more information, see [Common Attributes (C#)](../../language-reference/attributes/global.md). + +```csharp +using System; +using System.Reflection; +[assembly: AssemblyTitleAttribute("Production assembly 4")] +[module: CLSCompliant(true)] +``` + +The following example shows how to apply attributes to methods, method parameters, and method return values in C#. + +:::code language="csharp" source="./snippets/conceptual/AttributesOverview.cs" id="Snippet6"::: + +> [!NOTE] +> Regardless of the targets on which `ValidatedContract` is defined to be valid, the `return` target has to be specified, even if `ValidatedContract` were defined to apply only to return values. In other words, the compiler will not use `AttributeUsage` information to resolve ambiguous attribute targets. For more information, see [AttributeUsage](../../language-reference/attributes/general.md). + +## Common uses for attributes + +The following list includes a few of the common uses of attributes in code: + +- Marking methods using the `WebMethod` attribute in Web services to indicate that the method should be callable over the SOAP protocol. For more information, see <xref:System.Web.Services.WebMethodAttribute>. +- Describing how to marshal method parameters when interoperating with native code. For more information, see <xref:System.Runtime.InteropServices.MarshalAsAttribute>. +- Describing the COM properties for classes, methods, and interfaces. +- Calling unmanaged code using the <xref:System.Runtime.InteropServices.DllImportAttribute> class. +- Describing your assembly in terms of title, version, description, or trademark. +- Describing which members of a class to serialize for persistence. +- Describing how to map between class members and XML nodes for XML serialization. +- Describing the security requirements for methods. +- Specifying characteristics used to enforce security. +- Controlling optimizations by the just-in-time (JIT) compiler so the code remains easy to debug. +- Obtaining information about the caller to a method. + +## Reflection overview + +Reflection is useful in the following situations: + +- When you have to access attributes in your program's metadata. For more information, see [Retrieving Information Stored in Attributes](../../../standard/attributes/retrieving-information-stored-in-attributes.md). +- For examining and instantiating types in an assembly. +- For building new types at run time. Use classes in <xref:System.Reflection.Emit>. +- For performing late binding, accessing methods on types created at run time. See the article [Dynamically Loading and Using Types](../../../framework/reflection-and-codedom/dynamically-loading-and-using-types.md). + +## Related sections + +For more information: + +- [Common Attributes (C#)](../../language-reference/attributes/global.md) +- [Caller Information (C#)](../../language-reference/attributes/caller-information.md) +- [Attributes](../../../standard/attributes/index.md) +- [Reflection](../../../framework/reflection-and-codedom/reflection.md) +- [Viewing Type Information](../../../framework/reflection-and-codedom/viewing-type-information.md) +- [Reflection and Generic Types](../../../framework/reflection-and-codedom/reflection-and-generic-types.md) +- <xref:System.Reflection.Emit> +- [Retrieving Information Stored in Attributes](../../../standard/attributes/retrieving-information-stored-in-attributes.md) diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/AttributesAndReflection.csproj b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/AttributesAndReflection.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/AttributesAndReflection.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/AttributesOverview.cs b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/AttributesOverview.cs new file mode 100644 index 0000000000000..96997205ec815 --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/AttributesOverview.cs @@ -0,0 +1,55 @@ +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace AttributeOverview; + +public class ValidatedContractAttribute : System.Attribute +{ +} + +// <Snippet1> +[Serializable] +public class SampleClass +{ + // Objects of this type can be serialized. +} +// </Snippet1> + +class AttributesOverview +{ + // <Snippet2> + [System.Runtime.InteropServices.DllImport("user32.dll")] + extern static void SampleMethod(); + // </Snippet2> + + // <Snippet4> + void MethodA([In][Out] ref double x) { } + void MethodB([Out][In] ref double x) { } + void MethodC([In, Out] ref double x) { } + // </Snippet4> + + // <Snippet5> + [Conditional("DEBUG"), Conditional("TEST1")] + void TraceMethod() + { + // ... + } + // </Snippet5> + + // <Snippet6> + // default: applies to method + [ValidatedContract] + int Method1() { return 0; } + + // applies to method + [method: ValidatedContract] + int Method2() { return 0; } + + // applies to parameter + int Method3([ValidatedContract] string contract) { return 0; } + + // applies to return value + [return: ValidatedContract] + int Method4() { return 0; } + // </Snippet6> +} diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/CStyleUnion.cs b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/CStyleUnion.cs new file mode 100644 index 0000000000000..dbcd54b8644bd --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/CStyleUnion.cs @@ -0,0 +1,45 @@ +using System.Runtime.InteropServices; + +namespace AttributesAndReflection; + +// <SameLocation> +[System.Runtime.InteropServices.StructLayout(LayoutKind.Explicit)] +struct TestUnion +{ + [System.Runtime.InteropServices.FieldOffset(0)] + public int i; + + [System.Runtime.InteropServices.FieldOffset(0)] + public double d; + + [System.Runtime.InteropServices.FieldOffset(0)] + public char c; + + [System.Runtime.InteropServices.FieldOffset(0)] + public byte b; +} +// </SameLocation> + +// <ExplicitLayout> +[System.Runtime.InteropServices.StructLayout(LayoutKind.Explicit)] +struct TestExplicit +{ + [System.Runtime.InteropServices.FieldOffset(0)] + public long lg; + + [System.Runtime.InteropServices.FieldOffset(0)] + public int i1; + + [System.Runtime.InteropServices.FieldOffset(4)] + public int i2; + + [System.Runtime.InteropServices.FieldOffset(8)] + public double d; + + [System.Runtime.InteropServices.FieldOffset(12)] + public char c; + + [System.Runtime.InteropServices.FieldOffset(14)] + public byte b; +} +// </ExplicitLayout> diff --git a/docs/csharp/programming-guide/generics/snippets/GenericsAndAttributes.cs b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/GenericsAndAttributes.cs similarity index 96% rename from docs/csharp/programming-guide/generics/snippets/GenericsAndAttributes.cs rename to docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/GenericsAndAttributes.cs index 7f62e9c44ed5a..a0e7a26df35a1 100644 --- a/docs/csharp/programming-guide/generics/snippets/GenericsAndAttributes.cs +++ b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/GenericsAndAttributes.cs @@ -1,5 +1,5 @@  -namespace generics; +namespace GenericsExamples; //<CustomAttribute> class CustomAttribute : Attribute diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/Program.cs b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/Program.cs new file mode 100644 index 0000000000000..dc1df248ecb26 --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/Program.cs @@ -0,0 +1,45 @@ +// See https://aka.ms/new-console-template for more information + + +using System.Reflection; + +ReflectionExamples.TestAuthorAttribute.Test(); + +// <GetTypeInformation> +// Using GetType to obtain type information: +int i = 42; +Type type = i.GetType(); +Console.WriteLine(type); +// </GetTypeInformation> + +// <GetAssemblyInfo> +// Using Reflection to get information of an Assembly: +Assembly info = typeof(int).Assembly; +Console.WriteLine(info); +// </GetAssemblyInfo> + +Query(); + +void Query() +{ + // <QueryReflection> + Assembly assembly = Assembly.Load("System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"); + var pubTypesQuery = from type in assembly.GetTypes() + where type.IsPublic + from method in type.GetMethods() + where method.ReturnType.IsArray == true + || (method.ReturnType.GetInterface( + typeof(System.Collections.Generic.IEnumerable<>).FullName!) != null + && method.ReturnType.FullName != "System.String") + group method.ToString() by type.ToString(); + + foreach (var groupOfMethods in pubTypesQuery) + { + Console.WriteLine("Type: {0}", groupOfMethods.Key); + foreach (var method in groupOfMethods) + { + Console.WriteLine(" {0}", method); + } + } + // </QueryReflection> +} diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/ReadAttributes.cs b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/ReadAttributes.cs new file mode 100644 index 0000000000000..4478625420dce --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/conceptual/ReadAttributes.cs @@ -0,0 +1,91 @@ +namespace ReflectionExamples; + +// <DefineAndReadAttribute> +// Multiuse attribute. +// <DefineCustomAttribute> +[System.AttributeUsage(System.AttributeTargets.Class | + System.AttributeTargets.Struct, + AllowMultiple = true) // Multiuse attribute. +] +public class AuthorAttribute : System.Attribute +{ + string Name; + public double Version; + + public AuthorAttribute(string name) + { + Name = name; + + // Default value. + Version = 1.0; + } + + public string GetName() => Name; +} +// </DefineCustomAttribute> + +// Class with the Author attribute. +[Author("P. Ackerman")] +public class FirstClass +{ + // ... +} + +// Class without the Author attribute. +public class SecondClass +{ + // ... +} + +// Class with multiple Author attributes. +// <MultipleAuthors> +[Author("P. Ackerman"), Author("R. Koch", Version = 2.0)] +public class ThirdClass +{ + // ... +} +// </MultipleAuthors> + +class TestAuthorAttribute +{ + public static void Test() + { + PrintAuthorInfo(typeof(FirstClass)); + PrintAuthorInfo(typeof(SecondClass)); + PrintAuthorInfo(typeof(ThirdClass)); + } + + private static void PrintAuthorInfo(System.Type t) + { + System.Console.WriteLine($"Author information for {t}"); + + // Using reflection. + System.Attribute[] attrs = System.Attribute.GetCustomAttributes(t); // Reflection. + + // Displaying output. + foreach (System.Attribute attr in attrs) + { + if (attr is AuthorAttribute a) + { + System.Console.WriteLine($" {a.GetName()}, version {a.Version:f}"); + } + } + } +} +/* Output: + Author information for FirstClass + P. Ackerman, version 1.00 + Author information for SecondClass + Author information for ThirdClass + R. Koch, version 2.00 + P. Ackerman, version 1.00 +*/ +// </DefineAndReadAttribute> + +// <SampleWithVersion> +[Author("P. Ackerman", Version = 1.1)] +class SampleClass +{ + // P. Ackerman's code goes here... +} +// </SampleWithVersion> diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/snippets/tutorial/Program.cs b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/tutorial/Program.cs new file mode 100644 index 0000000000000..30d1ff57213cf --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/tutorial/Program.cs @@ -0,0 +1,133 @@ +using System.ComponentModel; +using System.Reflection; +using System.Runtime.CompilerServices; + +#pragma warning disable CS0612 +public class Program +{ + public static void Main(string[] args) + { + var c = new MyClass(); // this should trigger a warning at compile time since MyClass has an Obsolete attribute + + // this code enumerates all the possible targets of an attributes + // for purposes of compile time checking + var targets = new List<AttributeTargets> + { + AttributeTargets.All, + AttributeTargets.Assembly, + AttributeTargets.Class, + AttributeTargets.Constructor, + AttributeTargets.Delegate, + AttributeTargets.Enum, + AttributeTargets.Event, + AttributeTargets.Field, + AttributeTargets.GenericParameter, + AttributeTargets.Interface, + AttributeTargets.Method, + AttributeTargets.Module, + AttributeTargets.Parameter, + AttributeTargets.Property, + AttributeTargets.ReturnValue, + AttributeTargets.Struct + }; + + // <ReflectionExample1> + TypeInfo typeInfo = typeof(MyClass).GetTypeInfo(); + Console.WriteLine("The assembly qualified name of MyClass is " + typeInfo.AssemblyQualifiedName); + // </ReflectionExample1> + + // <ReflectionExample2> + var attrs = typeInfo.GetCustomAttributes(); + foreach(var attr in attrs) + Console.WriteLine("Attribute on MyClass: " + attr.GetType().Name); + // </ReflectionExample2> + } +} + +// <ObsoleteExample1> +[Obsolete] +public class MyClass +{ +} +// </ObsoleteExample1> + +// <ObsoleteExample2> +[Obsolete("ThisClass is obsolete. Use ThisClass2 instead.")] +public class ThisClass +{ +} +// </ObsoleteExample2> +#pragma warning restore CS0612 +// <CreateAttributeExample1> +public class MySpecialAttribute : Attribute +{ +} +// </CreateAttributeExample1> + +// <CreateAttributeExample2> +[MySpecial] +public class SomeOtherClass +{ +} +// </CreateAttributeExample2> + +// <AttributeUsageExample1> +[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] +public class MyAttributeForClassAndStructOnly : Attribute +{ +} +// </AttributeUsageExample1> + +// <AttributeUsageExample2> +public class Foo +{ + // if the below attribute was uncommented, it would cause a compiler error + // [MyAttributeForClassAndStructOnly] + public Foo() + { } +} +// </AttributeUsageExample2> + +// <CallerMemberName1> +public class MyUIClass : INotifyPropertyChanged +{ + public event PropertyChangedEventHandler? PropertyChanged; + + public void RaisePropertyChanged([CallerMemberName] string propertyName = default!) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + + private string? _name; + public string? Name + { + get { return _name;} + set + { + if (value != _name) + { + _name = value; + RaisePropertyChanged(); // notice that "Name" is not needed here explicitly + } + } + } +} +// </CallerMemberName1> + +/* +// <AttributeGotcha1> +public class GotchaAttribute : Attribute +{ + public GotchaAttribute(Foo myClass, string str) + { + } +} +// </AttributeGotcha1> + +// <AttributeGotcha2> +[Gotcha(new Foo(), "test")] // does not compile +public class AttributeFail +{ +} +// </AttributeGotcha2> +*/ diff --git a/docs/csharp/advanced-topics/reflection-and-attributes/snippets/tutorial/attributes.csproj b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/tutorial/attributes.csproj new file mode 100644 index 0000000000000..556085493bfcd --- /dev/null +++ b/docs/csharp/advanced-topics/reflection-and-attributes/snippets/tutorial/attributes.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <Nullable>enable</Nullable> + <ImplicitUsings>enable</ImplicitUsings> + </PropertyGroup> + +</Project> \ No newline at end of file diff --git a/docs/csharp/async.md b/docs/csharp/async.md deleted file mode 100644 index bd2d087a40e64..0000000000000 --- a/docs/csharp/async.md +++ /dev/null @@ -1,262 +0,0 @@ ---- -title: Asynchronous programming - C# -description: Learn about the C# language-level asynchronous programming model provided by .NET Core. -author: BillWagner -ms.date: 05/20/2020 -ms.technology: csharp-async -ms.assetid: b878c34c-a78f-419e-a594-a2b44fa521a4 ---- -# Asynchronous programming - -If you have any I/O-bound needs (such as requesting data from a network, accessing a database, or reading and writing to a file system), you'll want to utilize asynchronous programming. You could also have CPU-bound code, such as performing an expensive calculation, which is also a good scenario for writing async code. - -C# has a language-level asynchronous programming model, which allows for easily writing asynchronous code without having to juggle callbacks or conform to a library that supports asynchrony. It follows what is known as the [Task-based Asynchronous Pattern (TAP)](../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md). - -## Overview of the asynchronous model - -The core of async programming is the `Task` and `Task<T>` objects, which model asynchronous operations. They are supported by the `async` and `await` keywords. The model is fairly simple in most cases: - -- For I/O-bound code, you await an operation that returns a `Task` or `Task<T>` inside of an `async` method. -- For CPU-bound code, you await an operation that is started on a background thread with the <xref:System.Threading.Tasks.Task.Run%2A?displayProperty=nameWithType> method. - -The `await` keyword is where the magic happens. It yields control to the caller of the method that performed `await`, and it ultimately allows a UI to be responsive or a service to be elastic. While [there are ways](../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md) to approach async code other than `async` and `await`, this article focuses on the language-level constructs. - -### I/O-bound example: Download data from a web service - -You may need to download some data from a web service when a button is pressed but don't want to block the UI thread. It can be accomplished like this: - -```csharp -private readonly HttpClient _httpClient = new HttpClient(); - -downloadButton.Clicked += async (o, e) => -{ - // This line will yield control to the UI as the request - // from the web service is happening. - // - // The UI thread is now free to perform other work. - var stringData = await _httpClient.GetStringAsync(URL); - DoSomethingWithData(stringData); -}; -``` - -The code expresses the intent (downloading data asynchronously) without getting bogged down in interacting with `Task` objects. - -### CPU-bound example: Perform a calculation for a game - -Say you're writing a mobile game where pressing a button can inflict damage on many enemies on the screen. Performing the damage calculation can be expensive, and doing it on the UI thread would make the game appear to pause as the calculation is performed! - -The best way to handle this is to start a background thread, which does the work using `Task.Run`, and await its result using `await`. This allows the UI to feel smooth as the work is being done. - -```csharp -private DamageResult CalculateDamageDone() -{ - // Code omitted: - // - // Does an expensive calculation and returns - // the result of that calculation. -} - -calculateButton.Clicked += async (o, e) => -{ - // This line will yield control to the UI while CalculateDamageDone() - // performs its work. The UI thread is free to perform other work. - var damageResult = await Task.Run(() => CalculateDamageDone()); - DisplayDamage(damageResult); -}; -``` - -This code clearly expresses the intent of the button's click event, it doesn't require managing a background thread manually, and it does so in a non-blocking way. - -### What happens under the covers - -On the C# side of things, the compiler transforms your code into a state machine that keeps track of things like yielding execution when an `await` is reached and resuming execution when a background job has finished. - -For the theoretically inclined, this is an implementation of the [Promise Model of asynchrony](https://en.wikipedia.org/wiki/Futures_and_promises). - -## Key pieces to understand - -* Async code can be used for both I/O-bound and CPU-bound code, but differently for each scenario. -* Async code uses `Task<T>` and `Task`, which are constructs used to model work being done in the background. -* The `async` keyword turns a method into an async method, which allows you to use the `await` keyword in its body. -* When the `await` keyword is applied, it suspends the calling method and yields control back to its caller until the awaited task is complete. -* `await` can only be used inside an async method. - -## Recognize CPU-bound and I/O-bound work - -The first two examples of this guide showed how you could use `async` and `await` for I/O-bound and CPU-bound work. It's key that you can identify when a job you need to do is I/O-bound or CPU-bound because it can greatly affect the performance of your code and could potentially lead to misusing certain constructs. - -Here are two questions you should ask before you write any code: - -1. Will your code be "waiting" for something, such as data from a database? - - If your answer is "yes", then your work is **I/O-bound**. - -1. Will your code be performing an expensive computation? - - If you answered "yes", then your work is **CPU-bound**. - -If the work you have is **I/O-bound**, use `async` and `await` *without* `Task.Run`. You *should not* use the Task Parallel Library. - -If the work you have is **CPU-bound** and you care about responsiveness, use `async` and `await`, but spawn off the work on another thread *with* `Task.Run`. If the work is appropriate for concurrency and parallelism, also consider using the [Task Parallel Library](../standard/parallel-programming/task-parallel-library-tpl.md). - -Additionally, you should always measure the execution of your code. For example, you may find yourself in a situation where your CPU-bound work is not costly enough compared with the overhead of context switches when multithreading. Every choice has its tradeoff, and you should pick the correct tradeoff for your situation. - -## More examples - -The following examples demonstrate various ways you can write async code in C#. They cover a few different scenarios you may come across. - -### Extract data from a network - -This snippet downloads the HTML from the homepage at <https://dotnetfoundation.org> and counts the number of times the string ".NET" occurs in the HTML. It uses ASP.NET to define a Web API controller method, which performs this task and returns the number. - -> [!NOTE] -> If you plan on doing HTML parsing in production code, don't use regular expressions. Use a parsing library instead. - -```csharp -private readonly HttpClient _httpClient = new HttpClient(); - -[HttpGet, Route("DotNetCount")] -public async Task<int> GetDotNetCount() -{ - // Suspends GetDotNetCount() to allow the caller (the web server) - // to accept another request, rather than blocking on this one. - var html = await _httpClient.GetStringAsync("https://dotnetfoundation.org"); - - return Regex.Matches(html, @"\.NET").Count; -} -``` - -Here's the same scenario written for a Universal Windows App, which performs the same task when a Button is pressed: - -```csharp -private readonly HttpClient _httpClient = new HttpClient(); - -private async void OnSeeTheDotNetsButtonClick(object sender, RoutedEventArgs e) -{ - // Capture the task handle here so we can await the background task later. - var getDotNetFoundationHtmlTask = _httpClient.GetStringAsync("https://dotnetfoundation.org"); - - // Any other work on the UI thread can be done here, such as enabling a Progress Bar. - // This is important to do here, before the "await" call, so that the user - // sees the progress bar before execution of this method is yielded. - NetworkProgressBar.IsEnabled = true; - NetworkProgressBar.Visibility = Visibility.Visible; - - // The await operator suspends OnSeeTheDotNetsButtonClick(), returning control to its caller. - // This is what allows the app to be responsive and not block the UI thread. - var html = await getDotNetFoundationHtmlTask; - int count = Regex.Matches(html, @"\.NET").Count; - - DotNetCountLabel.Text = $"Number of .NETs on dotnetfoundation.org: {count}"; - - NetworkProgressBar.IsEnabled = false; - NetworkProgressBar.Visibility = Visibility.Collapsed; -} -``` - -### Wait for multiple tasks to complete - -You may find yourself in a situation where you need to retrieve multiple pieces of data concurrently. The `Task` API contains two methods, <xref:System.Threading.Tasks.Task.WhenAll%2A?displayProperty=nameWithType> and <xref:System.Threading.Tasks.Task.WhenAny%2A?displayProperty=nameWithType>, that allow you to write asynchronous code that performs a non-blocking wait on multiple background jobs. - -This example shows how you might grab `User` data for a set of `userId`s. - -```csharp -public async Task<User> GetUserAsync(int userId) -{ - // Code omitted: - // - // Given a user Id {userId}, retrieves a User object corresponding - // to the entry in the database with {userId} as its Id. -} - -public static async Task<IEnumerable<User>> GetUsersAsync(IEnumerable<int> userIds) -{ - var getUserTasks = new List<Task<User>>(); - foreach (int userId in userIds) - { - getUserTasks.Add(GetUserAsync(userId)); - } - - return await Task.WhenAll(getUserTasks); -} -``` - -Here's another way to write this more succinctly, using LINQ: - -```csharp -public async Task<User> GetUserAsync(int userId) -{ - // Code omitted: - // - // Given a user Id {userId}, retrieves a User object corresponding - // to the entry in the database with {userId} as its Id. -} - -public static async Task<User[]> GetUsersAsync(IEnumerable<int> userIds) -{ - var getUserTasks = userIds.Select(id => GetUserAsync(id)); - return await Task.WhenAll(getUserTasks); -} -``` - -Although it's less code, use caution when mixing LINQ with asynchronous code. Because LINQ uses deferred (lazy) execution, async calls won't happen immediately as they do in a `foreach` loop unless you force the generated sequence to iterate with a call to `.ToList()` or `.ToArray()`. - -## Important info and advice - -With async programming, there are some details to keep in mind that can prevent unexpected behavior. - -* `async` **methods need to have an** `await` **keyword in their body or they will never yield!** - - This is important to keep in mind. If `await` is not used in the body of an `async` method, the C# compiler generates a warning, but the code compiles and runs as if it were a normal method. This is incredibly inefficient, as the state machine generated by the C# compiler for the async method is not accomplishing anything. - -* **Add "Async" as the suffix of every async method name you write.** - - This is the convention used in .NET to more easily differentiate synchronous and asynchronous methods. Certain methods that aren't explicitly called by your code (such as event handlers or web controller methods) don't necessarily apply. Because they are not explicitly called by your code, being explicit about their naming isn't as important. - -* `async void` **should only be used for event handlers.** - - `async void` is the only way to allow asynchronous event handlers to work because events do not have return types (thus cannot make use of `Task` and `Task<T>`). Any other use of `async void` does not follow the TAP model and can be challenging to use, such as: - - * Exceptions thrown in an `async void` method can't be caught outside of that method. - * `async void` methods are difficult to test. - * `async void` methods can cause bad side effects if the caller isn't expecting them to be async. - -* **Tread carefully when using async lambdas in LINQ expressions** - - Lambda expressions in LINQ use deferred execution, meaning code could end up executing at a time when you're not expecting it to. The introduction of blocking tasks into this can easily result in a deadlock if not written correctly. Additionally, the nesting of asynchronous code like this can also make it more difficult to reason about the execution of the code. Async and LINQ are powerful but should be used together as carefully and clearly as possible. - -* **Write code that awaits Tasks in a non-blocking manner** - - Blocking the current thread as a means to wait for a `Task` to complete can result in deadlocks and blocked context threads and can require more complex error-handling. The following table provides guidance on how to deal with waiting for tasks in a non-blocking way: - - | Use this... | Instead of this... | When wishing to do this... | - |----------------------|------------------------------|--------------------------------------------| - | `await` | `Task.Wait` or `Task.Result` | Retrieving the result of a background task | - | `await Task.WhenAny` | `Task.WaitAny` | Waiting for any task to complete | - | `await Task.WhenAll` | `Task.WaitAll` | Waiting for all tasks to complete | - | `await Task.Delay` | `Thread.Sleep` | Waiting for a period of time | - -* **Consider using** `ValueTask` **where possible** - - Returning a `Task` object from async methods can introduce performance bottlenecks in certain paths. `Task` is a reference type, so using it means allocating an object. In cases where a method declared with the `async` modifier returns a cached result or completes synchronously, the extra allocations can become a significant time cost in performance critical sections of code. It can become costly if those allocations occur in tight loops. For more information, see [generalized async return types](language-reference/keywords/async.md#return-types). - -* **Consider using** `ConfigureAwait(false)` - - A common question is, "when should I use the <xref:System.Threading.Tasks.Task.ConfigureAwait(System.Boolean)?displayProperty=nameWithType> method?". The method allows for a `Task` instance to configure its awaiter. This is an important consideration and setting it incorrectly could potentially have performance implications and even deadlocks. For more information on `ConfigureAwait`, see the [ConfigureAwait FAQ](https://devblogs.microsoft.com/dotnet/configureawait-faq). - -* **Write less stateful code** - - Don't depend on the state of global objects or the execution of certain methods. Instead, depend only on the return values of methods. Why? - - * Code will be easier to reason about. - * Code will be easier to test. - * Mixing async and synchronous code is far simpler. - * Race conditions can typically be avoided altogether. - * Depending on return values makes coordinating async code simple. - * (Bonus) it works really well with dependency injection. - -A recommended goal is to achieve complete or near-complete [Referential Transparency](https://en.wikipedia.org/wiki/Referential_transparency_%28computer_science%29) in your code. Doing so will result in a predictable, testable, and maintainable codebase. - -## Other resources - -* [The Task asynchronous programming model (C#)](./programming-guide/concepts/async/task-asynchronous-programming-model.md). diff --git a/docs/csharp/programming-guide/concepts/async/async-return-types.md b/docs/csharp/asynchronous-programming/async-return-types.md similarity index 91% rename from docs/csharp/programming-guide/concepts/async/async-return-types.md rename to docs/csharp/asynchronous-programming/async-return-types.md index ae93b9cb2f060..38d2295dd0a71 100644 --- a/docs/csharp/programming-guide/concepts/async/async-return-types.md +++ b/docs/csharp/asynchronous-programming/async-return-types.md @@ -1,8 +1,7 @@ --- -title: Async return types (C#) +title: Async return types description: Learn about the return types that async methods can have in C# with code examples for each type. -ms.date: 07/02/2021 -ms.assetid: ddb2539c-c898-48c1-ad92-245e4a996df8 +ms.date: 02/08/2023 --- # Async return types (C#) @@ -43,13 +42,13 @@ The following code separates calling the `WaitAndApologizeAsync` method from awa ## Task\<TResult\> return type -The <xref:System.Threading.Tasks.Task%601> return type is used for an async method that contains a [return](../../../language-reference/statements/jump-statements.md#the-return-statement) statement in which the operand is `TResult`. +The <xref:System.Threading.Tasks.Task%601> return type is used for an async method that contains a [return](../language-reference/statements/jump-statements.md#the-return-statement) statement in which the operand is `TResult`. In the following example, the `GetLeisureHoursAsync` method contains a `return` statement that returns an integer. The method declaration must specify a return type of `Task<int>`. The <xref:System.Threading.Tasks.Task.FromResult%2A> async method is a placeholder for an operation that returns a <xref:System.DateTime.DayOfWeek>. :::code language="csharp" source="snippets/async-return-types/async-returns1.cs" ID="LeisureHours"::: -When `GetLeisureHoursAsync` is called from within an await expression in the `ShowTodaysInfo` method, the await expression retrieves the integer value (the value of `leisureHours`) that's stored in the task returned by the `GetLeisureHours` method. For more information about await expressions, see [await](../../../language-reference/operators/await.md). +When `GetLeisureHoursAsync` is called from within an await expression in the `ShowTodaysInfo` method, the await expression retrieves the integer value (the value of `leisureHours`) that's stored in the task returned by the `GetLeisureHours` method. For more information about await expressions, see [await](../language-reference/operators/await.md). You can better understand how `await` retrieves the result from a `Task<T>` by separating the call to `GetLeisureHoursAsync` from the application of `await`, as the following code shows. A call to method `GetLeisureHoursAsync` that isn't immediately awaited returns a `Task<int>`, as you would expect from the declaration of the method. The task is assigned to the `getLeisureHoursTask` variable in the example. Because `getLeisureHoursTask` is a <xref:System.Threading.Tasks.Task%601>, it contains a <xref:System.Threading.Tasks.Task%601.Result> property of type `TResult`. In this case, `TResult` represents an integer type. When `await` is applied to `getLeisureHoursTask`, the await expression evaluates to the contents of the <xref:System.Threading.Tasks.Task%601.Result%2A> property of `getLeisureHoursTask`. The value is assigned to the `ret` variable. @@ -66,7 +65,7 @@ You use the `void` return type in asynchronous event handlers, which require a ` The caller of a void-returning async method can't catch exceptions thrown from the method. Such unhandled exceptions are likely to cause your application to fail. If a method that returns a <xref:System.Threading.Tasks.Task> or <xref:System.Threading.Tasks.Task%601> throws an exception, the exception is stored in the returned task. The exception is rethrown when the task is awaited. Make sure that any async method that can produce an exception has a return type of <xref:System.Threading.Tasks.Task> or <xref:System.Threading.Tasks.Task%601> and that calls to the method are awaited. -For more information about how to catch exceptions in async methods, see the [Exceptions in async methods](../../../language-reference/keywords/try-catch.md#exceptions-in-async-methods) section of the [try-catch](../../../language-reference/keywords/try-catch.md) article. +For more information about how to catch exceptions in async methods, see the [Exceptions in async methods](../language-reference/keywords/try-catch.md#exceptions-in-async-methods) section of the [try-catch](../language-reference/keywords/try-catch.md) article. The following example shows the behavior of an async event handler. In the example code, an async event handler must let the main thread know when it finishes. Then the main thread can wait for an async event handler to complete before exiting the program. @@ -74,9 +73,9 @@ The following example shows the behavior of an async event handler. In the examp ## Generalized async return types and ValueTask\<TResult\> -An async method can return any type that has an accessible `GetAwaiter` method that returns an instance of an *awaiter type*. In addition, the type returned from the `GetAwaiter` method must have the <xref:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute?displayProperty=nameWithType> attribute. You can learn more in the article on [Attributes read by the compiler](../../../language-reference/attributes/general.md#asyncmethodbuilder-attribute) or the feature spec for [Task like return types](~/_csharplang/proposals/csharp-7.0/task-types.md). +An async method can return any type that has an accessible `GetAwaiter` method that returns an instance of an *awaiter type*. In addition, the type returned from the `GetAwaiter` method must have the <xref:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute?displayProperty=nameWithType> attribute. You can learn more in the article on [Attributes read by the compiler](../language-reference/attributes/general.md#asyncmethodbuilder-attribute) or the feature spec for [Task like return types](~/_csharplang/proposals/csharp-7.0/task-types.md). -This feature is the complement to [awaitable expressions](~/_csharpstandard/standard/expressions.md#11882-awaitable-expressions), which describes the requirements for the operand of `await`. Generalized async return types enable the compiler to generate `async` methods that return different types. Generalized async return types enabled performance improvements in the .NET libraries. Because <xref:System.Threading.Tasks.Task> and <xref:System.Threading.Tasks.Task%601> are reference types, memory allocation in performance-critical paths, particularly when allocations occur in tight loops, can adversely affect performance. Support for generalized return types means that you can return a lightweight value type instead of a reference type to avoid additional memory allocations. +This feature is the complement to [awaitable expressions](~/_csharpstandard/standard/expressions.md#12982-awaitable-expressions), which describes the requirements for the operand of `await`. Generalized async return types enable the compiler to generate `async` methods that return different types. Generalized async return types enabled performance improvements in the .NET libraries. Because <xref:System.Threading.Tasks.Task> and <xref:System.Threading.Tasks.Task%601> are reference types, memory allocation in performance-critical paths, particularly when allocations occur in tight loops, can adversely affect performance. Support for generalized return types means that you can return a lightweight value type instead of a reference type to avoid additional memory allocations. .NET provides the <xref:System.Threading.Tasks.ValueTask%601?displayProperty=nameWithType> structure as a lightweight implementation of a generalized task-returning value. To use the <xref:System.Threading.Tasks.ValueTask%601?displayProperty=nameWithType> type, you must add the `System.Threading.Tasks.Extensions` NuGet package to your project. The following example uses the <xref:System.Threading.Tasks.ValueTask%601> structure to retrieve the value of two dice rolls. @@ -99,5 +98,5 @@ The preceding example reads lines from a string asynchronously. Once each line i - <xref:System.Threading.Tasks.Task.FromResult%2A> - [Process asynchronous tasks as they complete](start-multiple-async-tasks-and-process-them-as-they-complete.md) - [Asynchronous programming with async and await (C#)](index.md) -- [async](../../../language-reference/keywords/async.md) -- [await](../../../language-reference/operators/await.md) +- [async](../language-reference/keywords/async.md) +- [await](../language-reference/operators/await.md) diff --git a/docs/csharp/asynchronous-programming/async-scenarios.md b/docs/csharp/asynchronous-programming/async-scenarios.md new file mode 100644 index 0000000000000..2b2fa96d2e7f1 --- /dev/null +++ b/docs/csharp/asynchronous-programming/async-scenarios.md @@ -0,0 +1,261 @@ +--- +title: Asynchronous programming - C# +description: Learn about the C# language-level asynchronous programming model provided by .NET Core. +author: BillWagner +ms.date: 02/08/2023 +ms.technology: csharp-async +--- +# Asynchronous programming + +If you have any I/O-bound needs (such as requesting data from a network, accessing a database, or reading and writing to a file system), you'll want to utilize asynchronous programming. You could also have CPU-bound code, such as performing an expensive calculation, which is also a good scenario for writing async code. + +C# has a language-level asynchronous programming model, which allows for easily writing asynchronous code without having to juggle callbacks or conform to a library that supports asynchrony. It follows what is known as the [Task-based Asynchronous Pattern (TAP)](../../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md). + +## Overview of the asynchronous model + +The core of async programming is the `Task` and `Task<T>` objects, which model asynchronous operations. They are supported by the `async` and `await` keywords. The model is fairly simple in most cases: + +- For I/O-bound code, you await an operation that returns a `Task` or `Task<T>` inside of an `async` method. +- For CPU-bound code, you await an operation that is started on a background thread with the <xref:System.Threading.Tasks.Task.Run%2A?displayProperty=nameWithType> method. + +The `await` keyword is where the magic happens. It yields control to the caller of the method that performed `await`, and it ultimately allows a UI to be responsive or a service to be elastic. While [there are ways](../../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md) to approach async code other than `async` and `await`, this article focuses on the language-level constructs. + +### I/O-bound example: Download data from a web service + +You may need to download some data from a web service when a button is pressed but don't want to block the UI thread. It can be accomplished like this, using the <xref:System.Net.Http.HttpClient?displayProperty=fullName> class: + +```csharp +private readonly HttpClient _httpClient = new HttpClient(); + +downloadButton.Clicked += async (o, e) => +{ + // This line will yield control to the UI as the request + // from the web service is happening. + // + // The UI thread is now free to perform other work. + var stringData = await _httpClient.GetStringAsync(URL); + DoSomethingWithData(stringData); +}; +``` + +The code expresses the intent (downloading data asynchronously) without getting bogged down in interacting with `Task` objects. + +### CPU-bound example: Perform a calculation for a game + +Say you're writing a mobile game where pressing a button can inflict damage on many enemies on the screen. Performing the damage calculation can be expensive, and doing it on the UI thread would make the game appear to pause as the calculation is performed! + +The best way to handle this is to start a background thread, which does the work using `Task.Run`, and await its result using `await`. This allows the UI to feel smooth as the work is being done. + +```csharp +private DamageResult CalculateDamageDone() +{ + // Code omitted: + // + // Does an expensive calculation and returns + // the result of that calculation. +} + +calculateButton.Clicked += async (o, e) => +{ + // This line will yield control to the UI while CalculateDamageDone() + // performs its work. The UI thread is free to perform other work. + var damageResult = await Task.Run(() => CalculateDamageDone()); + DisplayDamage(damageResult); +}; +``` + +This code clearly expresses the intent of the button's click event, it doesn't require managing a background thread manually, and it does so in a non-blocking way. + +### What happens under the covers + +On the C# side of things, the compiler transforms your code into a state machine that keeps track of things like yielding execution when an `await` is reached and resuming execution when a background job has finished. + +For the theoretically inclined, this is an implementation of the [Promise Model of asynchrony](https://en.wikipedia.org/wiki/Futures_and_promises). + +## Key pieces to understand + +* Async code can be used for both I/O-bound and CPU-bound code, but differently for each scenario. +* Async code uses `Task<T>` and `Task`, which are constructs used to model work being done in the background. +* The `async` keyword turns a method into an async method, which allows you to use the `await` keyword in its body. +* When the `await` keyword is applied, it suspends the calling method and yields control back to its caller until the awaited task is complete. +* `await` can only be used inside an async method. + +## Recognize CPU-bound and I/O-bound work + +The first two examples of this guide showed how you could use `async` and `await` for I/O-bound and CPU-bound work. It's key that you can identify when a job you need to do is I/O-bound or CPU-bound because it can greatly affect the performance of your code and could potentially lead to misusing certain constructs. + +Here are two questions you should ask before you write any code: + +1. Will your code be "waiting" for something, such as data from a database? + + If your answer is "yes", then your work is **I/O-bound**. + +1. Will your code be performing an expensive computation? + + If you answered "yes", then your work is **CPU-bound**. + +If the work you have is **I/O-bound**, use `async` and `await` *without* `Task.Run`. You *should not* use the Task Parallel Library. + +If the work you have is **CPU-bound** and you care about responsiveness, use `async` and `await`, but spawn off the work on another thread *with* `Task.Run`. If the work is appropriate for concurrency and parallelism, also consider using the [Task Parallel Library](../../standard/parallel-programming/task-parallel-library-tpl.md). + +Additionally, you should always measure the execution of your code. For example, you may find yourself in a situation where your CPU-bound work is not costly enough compared with the overhead of context switches when multithreading. Every choice has its tradeoff, and you should pick the correct tradeoff for your situation. + +## More examples + +The following examples demonstrate various ways you can write async code in C#. They cover a few different scenarios you may come across. + +### Extract data from a network + +This snippet downloads the HTML from the homepage at <https://dotnetfoundation.org> and counts the number of times the string ".NET" occurs in the HTML. It uses ASP.NET to define a Web API controller method, which performs this task and returns the number. + +> [!NOTE] +> If you plan on doing HTML parsing in production code, don't use regular expressions. Use a parsing library instead. + +```csharp +private readonly HttpClient _httpClient = new HttpClient(); + +[HttpGet, Route("DotNetCount")] +public async Task<int> GetDotNetCount() +{ + // Suspends GetDotNetCount() to allow the caller (the web server) + // to accept another request, rather than blocking on this one. + var html = await _httpClient.GetStringAsync("https://dotnetfoundation.org"); + + return Regex.Matches(html, @"\.NET").Count; +} +``` + +Here's the same scenario written for a Universal Windows App, which performs the same task when a Button is pressed: + +```csharp +private readonly HttpClient _httpClient = new HttpClient(); + +private async void OnSeeTheDotNetsButtonClick(object sender, RoutedEventArgs e) +{ + // Capture the task handle here so we can await the background task later. + var getDotNetFoundationHtmlTask = _httpClient.GetStringAsync("https://dotnetfoundation.org"); + + // Any other work on the UI thread can be done here, such as enabling a Progress Bar. + // This is important to do here, before the "await" call, so that the user + // sees the progress bar before execution of this method is yielded. + NetworkProgressBar.IsEnabled = true; + NetworkProgressBar.Visibility = Visibility.Visible; + + // The await operator suspends OnSeeTheDotNetsButtonClick(), returning control to its caller. + // This is what allows the app to be responsive and not block the UI thread. + var html = await getDotNetFoundationHtmlTask; + int count = Regex.Matches(html, @"\.NET").Count; + + DotNetCountLabel.Text = $"Number of .NETs on dotnetfoundation.org: {count}"; + + NetworkProgressBar.IsEnabled = false; + NetworkProgressBar.Visibility = Visibility.Collapsed; +} +``` + +### Wait for multiple tasks to complete + +You may find yourself in a situation where you need to retrieve multiple pieces of data concurrently. The `Task` API contains two methods, <xref:System.Threading.Tasks.Task.WhenAll%2A?displayProperty=nameWithType> and <xref:System.Threading.Tasks.Task.WhenAny%2A?displayProperty=nameWithType>, that allow you to write asynchronous code that performs a non-blocking wait on multiple background jobs. + +This example shows how you might grab `User` data for a set of `userId`s. + +```csharp +public async Task<User> GetUserAsync(int userId) +{ + // Code omitted: + // + // Given a user Id {userId}, retrieves a User object corresponding + // to the entry in the database with {userId} as its Id. +} + +public static async Task<IEnumerable<User>> GetUsersAsync(IEnumerable<int> userIds) +{ + var getUserTasks = new List<Task<User>>(); + foreach (int userId in userIds) + { + getUserTasks.Add(GetUserAsync(userId)); + } + + return await Task.WhenAll(getUserTasks); +} +``` + +Here's another way to write this more succinctly, using LINQ: + +```csharp +public async Task<User> GetUserAsync(int userId) +{ + // Code omitted: + // + // Given a user Id {userId}, retrieves a User object corresponding + // to the entry in the database with {userId} as its Id. +} + +public static async Task<User[]> GetUsersAsync(IEnumerable<int> userIds) +{ + var getUserTasks = userIds.Select(id => GetUserAsync(id)).ToArray(); + return await Task.WhenAll(getUserTasks); +} +``` + +Although it's less code, use caution when mixing LINQ with asynchronous code. Because LINQ uses deferred (lazy) execution, async calls won't happen immediately as they do in a `foreach` loop unless you force the generated sequence to iterate with a call to `.ToList()` or `.ToArray()`. The above example uses <xref:System.Linq.Enumerable.ToArray%2A?displayProperty=nameWithType> to perform the query eagerly and store the results in an array. That forces the code `id => GetUserAsync(id)` to run and start the task. + +## Important info and advice + +With async programming, there are some details to keep in mind that can prevent unexpected behavior. + +* `async` **methods need to have an** `await` **keyword in their body or they will never yield!** + + This is important to keep in mind. If `await` is not used in the body of an `async` method, the C# compiler generates a warning, but the code compiles and runs as if it were a normal method. This is incredibly inefficient, as the state machine generated by the C# compiler for the async method is not accomplishing anything. + +* **Add "Async" as the suffix of every async method name you write.** + + This is the convention used in .NET to more easily differentiate synchronous and asynchronous methods. Certain methods that aren't explicitly called by your code (such as event handlers or web controller methods) don't necessarily apply. Because they are not explicitly called by your code, being explicit about their naming isn't as important. + +* `async void` **should only be used for event handlers.** + + `async void` is the only way to allow asynchronous event handlers to work because events do not have return types (thus cannot make use of `Task` and `Task<T>`). Any other use of `async void` does not follow the TAP model and can be challenging to use, such as: + + * Exceptions thrown in an `async void` method can't be caught outside of that method. + * `async void` methods are difficult to test. + * `async void` methods can cause bad side effects if the caller isn't expecting them to be async. + +* **Tread carefully when using async lambdas in LINQ expressions** + + Lambda expressions in LINQ use deferred execution, meaning code could end up executing at a time when you're not expecting it to. The introduction of blocking tasks into this can easily result in a deadlock if not written correctly. Additionally, the nesting of asynchronous code like this can also make it more difficult to reason about the execution of the code. Async and LINQ are powerful but should be used together as carefully and clearly as possible. + +* **Write code that awaits Tasks in a non-blocking manner** + + Blocking the current thread as a means to wait for a `Task` to complete can result in deadlocks and blocked context threads and can require more complex error-handling. The following table provides guidance on how to deal with waiting for tasks in a non-blocking way: + + | Use this... | Instead of this... | When wishing to do this... | + |----------------------|------------------------------|--------------------------------------------| + | `await` | `Task.Wait` or `Task.Result` | Retrieving the result of a background task | + | `await Task.WhenAny` | `Task.WaitAny` | Waiting for any task to complete | + | `await Task.WhenAll` | `Task.WaitAll` | Waiting for all tasks to complete | + | `await Task.Delay` | `Thread.Sleep` | Waiting for a period of time | + +* **Consider using** `ValueTask` **where possible** + + Returning a `Task` object from async methods can introduce performance bottlenecks in certain paths. `Task` is a reference type, so using it means allocating an object. In cases where a method declared with the `async` modifier returns a cached result or completes synchronously, the extra allocations can become a significant time cost in performance critical sections of code. It can become costly if those allocations occur in tight loops. For more information, see [generalized async return types](../language-reference/keywords/async.md#return-types). + +* **Consider using** `ConfigureAwait(false)` + + A common question is, "when should I use the <xref:System.Threading.Tasks.Task.ConfigureAwait(System.Boolean)?displayProperty=nameWithType> method?". The method allows for a `Task` instance to configure its awaiter. This is an important consideration and setting it incorrectly could potentially have performance implications and even deadlocks. For more information on `ConfigureAwait`, see the [ConfigureAwait FAQ](https://devblogs.microsoft.com/dotnet/configureawait-faq). + +* **Write less stateful code** + + Don't depend on the state of global objects or the execution of certain methods. Instead, depend only on the return values of methods. Why? + + * Code will be easier to reason about. + * Code will be easier to test. + * Mixing async and synchronous code is far simpler. + * Race conditions can typically be avoided altogether. + * Depending on return values makes coordinating async code simple. + * (Bonus) it works really well with dependency injection. + +A recommended goal is to achieve complete or near-complete [Referential Transparency](https://en.wikipedia.org/wiki/Referential_transparency_%28computer_science%29) in your code. Doing so will result in a predictable, testable, and maintainable codebase. + +## Other resources + +* [The Task asynchronous programming model (C#)](task-asynchronous-programming-model.md). diff --git a/docs/csharp/programming-guide/concepts/async/cancel-an-async-task-or-a-list-of-tasks.md b/docs/csharp/asynchronous-programming/cancel-an-async-task-or-a-list-of-tasks.md similarity index 76% rename from docs/csharp/programming-guide/concepts/async/cancel-an-async-task-or-a-list-of-tasks.md rename to docs/csharp/asynchronous-programming/cancel-an-async-task-or-a-list-of-tasks.md index cf2bdad85ca41..a7e9ea968e120 100644 --- a/docs/csharp/programming-guide/concepts/async/cancel-an-async-task-or-a-list-of-tasks.md +++ b/docs/csharp/asynchronous-programming/cancel-an-async-task-or-a-list-of-tasks.md @@ -1,13 +1,11 @@ --- -title: Cancel a list of tasks (C#) +title: Cancel a list of tasks description: Learn how to use cancellation tokens to signal a cancellation request to a list of tasks. -ms.date: 02/03/2021 +ms.date: 02/09/2023 ms.topic: tutorial -ms.assetid: eec32dbb-70ea-4c88-bd27-fa2e34546914 -recommendations: false --- -# Cancel a list of tasks (C#) +# Cancel a list of tasks You can cancel an async console application if you don't want to wait for it to finish. By following the example in this topic, you can add a cancellation to an application that downloads the contents of a list of websites. You can cancel many tasks by associating the <xref:System.Threading.CancellationTokenSource> instance with each task. If you select the <kbd>Enter</kbd> key, you cancel all tasks that aren't yet complete. @@ -29,7 +27,7 @@ This tutorial requires the following: ### Create example application -Create a new .NET Core console application. You can create one by using the [`dotnet new console`](../../../../core/tools/dotnet-new-sdk-templates.md#console) command or from [Visual Studio](/visualstudio/install/install-visual-studio). Open the *Program.cs* file in your favorite code editor. +Create a new .NET Core console application. You can create one by using the [`dotnet new console`](../../core/tools/dotnet-new-sdk-templates.md#console) command or from [Visual Studio](/visualstudio/install/install-visual-studio). Open the *Program.cs* file in your favorite code editor. ### Replace using statements @@ -103,15 +101,27 @@ static async Task Main() s_cts.Cancel(); }); - Task sumPageSizesTask = SumPageSizesAsync(); - - await Task.WhenAny(new[] { cancelTask, sumPageSizesTask }); - + Task finishedTask = await Task.WhenAny(new[] { cancelTask, sumPageSizesTask }); + if (finishedTask == cancelTask) + { + // wait for the cancellation to take place: + try + { + await sumPageSizesTask; + Console.WriteLine("Download task completed before cancel request was processed."); + } + catch (TaskCanceledException) + { + Console.WriteLine("Download task has been cancelled."); + } + } Console.WriteLine("Application ending."); } ``` -The updated `Main` method is now considered an [Async main](../../../fundamentals/program-structure/main-command-line.md#async-main-return-values), which allows for an asynchronous entry point into the executable. It writes a few instructional messages to the console, then declares a <xref:System.Threading.Tasks.Task> instance named `cancelTask`, which will read console key strokes. If the <kbd>Enter</kbd> key is pressed, a call to <xref:System.Threading.CancellationTokenSource.Cancel?displayProperty=nameWithType> is made. This will signal cancellation. Next, the `sumPageSizesTask` variable is assigned from the `SumPageSizesAsync` method. Both tasks are then passed to <xref:System.Threading.Tasks.Task.WhenAny(System.Threading.Tasks.Task[])?displayProperty=nameWithType>, which will continue when any of the two tasks have completed. +The updated `Main` method is now considered an [Async main](../fundamentals/program-structure/main-command-line.md#async-main-return-values), which allows for an asynchronous entry point into the executable. It writes a few instructional messages to the console, then declares a <xref:System.Threading.Tasks.Task> instance named `cancelTask`, which will read console key strokes. If the <kbd>Enter</kbd> key is pressed, a call to <xref:System.Threading.CancellationTokenSource.Cancel?displayProperty=nameWithType> is made. This will signal cancellation. Next, the `sumPageSizesTask` variable is assigned from the `SumPageSizesAsync` method. Both tasks are then passed to <xref:System.Threading.Tasks.Task.WhenAny(System.Threading.Tasks.Task[])?displayProperty=nameWithType>, which will continue when any of the two tasks have completed. + +The next block of code ensures that the application doesn't exit until the cancellation has been processed. If the first task to complete is the `cancelTask`, the `sumPageSizeTask` is awaited. If it was cancelled, when awaited it throws a <xref:System.Threading.Tasks.TaskCanceledException?displayProperty=nameWithType>. The block catches that exception, and prints a message. ## Create the asynchronous sum page sizes method @@ -187,7 +197,7 @@ Application ending. The following code is the complete text of the *Program.cs* file for the example. -:::code language="csharp" source="snippets/cancel-tasks/cancel-tasks/Program.cs"::: +:::code language="csharp" source="snippets/cancel-tasks/Program.cs"::: ## See also diff --git a/docs/csharp/programming-guide/concepts/async/cancel-async-tasks-after-a-period-of-time.md b/docs/csharp/asynchronous-programming/cancel-async-tasks-after-a-period-of-time.md similarity index 83% rename from docs/csharp/programming-guide/concepts/async/cancel-async-tasks-after-a-period-of-time.md rename to docs/csharp/asynchronous-programming/cancel-async-tasks-after-a-period-of-time.md index 4a3dcd9ecdb2e..1bedcb3141590 100644 --- a/docs/csharp/programming-guide/concepts/async/cancel-async-tasks-after-a-period-of-time.md +++ b/docs/csharp/asynchronous-programming/cancel-async-tasks-after-a-period-of-time.md @@ -1,12 +1,11 @@ --- -title: Cancel async tasks after a period of time (C#)" +title: Cancel async tasks after a period of time" description: Learn how to schedule cancellation of any associated tasks that are not completed within a period of time. -ms.date: 02/03/2021 +ms.date: 02/09/2023 ms.topic: tutorial -ms.assetid: 194282c2-399f-46da-a7a6-96674e00b0b3 --- -# Cancel async tasks after a period of time (C#) +# Cancel async tasks after a period of time You can cancel an asynchronous operation after a period of time by using the <xref:System.Threading.CancellationTokenSource.CancelAfter%2A?displayProperty=nameWithType> method if you don't want to wait for the operation to finish. This method schedules the cancellation of any associated tasks that aren't complete within the period of time that's designated by the `CancelAfter` expression. @@ -56,7 +55,7 @@ static async Task Main() } ``` -The updated `Main` method writes a few instructional messages to the console. Within the [try catch](../../../language-reference/keywords/try-catch.md), a call to <xref:System.Threading.CancellationTokenSource.CancelAfter(System.Int32)?displayProperty=nameWithType> schedules a cancellation. This will signal cancellation after a period of time. +The updated `Main` method writes a few instructional messages to the console. Within the [try catch](../language-reference/keywords/try-catch.md), a call to <xref:System.Threading.CancellationTokenSource.CancelAfter(System.Int32)?displayProperty=nameWithType> schedules a cancellation. This will signal cancellation after a period of time. Next, the `SumPageSizesAsync` method is awaited. If processing all of the URLs occurs faster than the scheduled cancellation, the application ends. However, if the scheduled cancellation is triggered before all of the URLs are processed, a <xref:System.OperationCanceledException> is thrown. @@ -79,7 +78,7 @@ Application ending. The following code is the complete text of the *Program.cs* file for the example. -:::code language="csharp" source="snippets/cancel-tasks/cancel-task-after-period-of-time/Program.cs"::: +:::code language="csharp" source="snippets/cancel-task-after-period-of-time/Program.cs"::: ## See also diff --git a/docs/csharp/tutorials/generate-consume-asynchronous-stream.md b/docs/csharp/asynchronous-programming/generate-consume-asynchronous-stream.md similarity index 94% rename from docs/csharp/tutorials/generate-consume-asynchronous-stream.md rename to docs/csharp/asynchronous-programming/generate-consume-asynchronous-stream.md index faa7d764e7438..665dfd9f55a36 100644 --- a/docs/csharp/tutorials/generate-consume-asynchronous-stream.md +++ b/docs/csharp/asynchronous-programming/generate-consume-asynchronous-stream.md @@ -35,7 +35,7 @@ This tutorial assumes you're familiar with C# and .NET, including either Visual ## Run the starter application -You can get the code for the starter application used in this tutorial from the [dotnet/docs](https://github.com/dotnet/docs) repository in the [csharp/whats-new/tutorials](https://github.com/dotnet/docs/tree/main/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/start) folder. +You can get the code for the starter application used in this tutorial from the [dotnet/docs](https://github.com/dotnet/docs) repository in the [asynchronous-programming/snippets](https://github.com/dotnet/docs/tree/main/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/start) folder. The starter application is a console application that uses the [GitHub GraphQL](https://developer.github.com/v4/) interface to retrieve recent issues written in the [dotnet/docs](https://github.com/dotnet/docs) repository. Start by looking at the following code for the starter app `Main` method: @@ -137,7 +137,7 @@ You use another extension method, <xref:System.Threading.Tasks.TaskAsyncEnumerab :::code language="csharp" source="snippets/generate-consume-asynchronous-streams/finished/Program.cs" id="SnippetEnumerateWithCancellation" ::: -You can get the code for the finished tutorial from the [dotnet/docs](https://github.com/dotnet/docs) repository in the [csharp/whats-new/tutorials](https://github.com/dotnet/docs/tree/main/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/finished) folder. +You can get the code for the finished tutorial from the [dotnet/docs](https://github.com/dotnet/docs) repository in the [asynchronous-programming/snippets](https://github.com/dotnet/docs/tree/main/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/finished) folder. ## Run the finished application @@ -146,3 +146,5 @@ Run the application again. Contrast its behavior with the behavior of the starte You can see improvements in memory use by examining the code. You no longer need to allocate a collection to store all the results before they're enumerated. The caller can determine how to consume the results and if a storage collection is needed. Run both the starter and finished applications and you can observe the differences between the implementations for yourself. You can delete the GitHub access token you created when you started this tutorial after you've finished. If an attacker gained access to that token, they could access GitHub APIs using your credentials. + +In this tutorial, you used async streams to read a individual items from a network API that returns pages of data. Async streams can also read from "never ending streams" like a stock ticker, or sensor device. The call to `MoveNextAsync` returns the next item as soon as it's available. diff --git a/docs/csharp/asynchronous-programming/index.md b/docs/csharp/asynchronous-programming/index.md new file mode 100644 index 0000000000000..8ad1f734efc1d --- /dev/null +++ b/docs/csharp/asynchronous-programming/index.md @@ -0,0 +1,263 @@ +--- +title: Asynchronous programming in C# +description: An overview of the C# language support for asynchronous programming using async, await, Task, and Task<T> +ms.date: 02/08/2023 +--- +# Asynchronous programming with async and await + +The [Task asynchronous programming model (TAP)](task-asynchronous-programming-model.md) provides an abstraction over asynchronous code. You write code as a sequence of statements, just like always. You can read that code as though each statement completes before the next begins. The compiler performs many transformations because some of those statements may start work and return a <xref:System.Threading.Tasks.Task> that represents the ongoing work. + +That's the goal of this syntax: enable code that reads like a sequence of statements, but executes in a much more complicated order based on external resource allocation and when tasks are complete. It's analogous to how people give instructions for processes that include asynchronous tasks. Throughout this article, you'll use an example of instructions for making breakfast to see how the `async` and `await` keywords make it easier to reason about code that includes a series of asynchronous instructions. You'd write the instructions something like the following list to explain how to make a breakfast: + +1. Pour a cup of coffee. +1. Heat a pan, then fry two eggs. +1. Fry three slices of bacon. +1. Toast two pieces of bread. +1. Add butter and jam to the toast. +1. Pour a glass of orange juice. + +If you have experience with cooking, you'd execute those instructions **asynchronously**. You'd start warming the pan for eggs, then start the bacon. You'd put the bread in the toaster, then start the eggs. At each step of the process, you'd start a task, then turn your attention to tasks that are ready for your attention. + +Cooking breakfast is a good example of asynchronous work that isn't parallel. One person (or thread) can handle all these tasks. Continuing the breakfast analogy, one person can make breakfast asynchronously by starting the next task before the first task completes. The cooking progresses whether or not someone is watching it. As soon as you start warming the pan for the eggs, you can begin frying the bacon. Once the bacon starts, you can put the bread into the toaster. + +For a parallel algorithm, you'd need multiple cooks (or threads). One would make the eggs, one the bacon, and so on. Each one would be focused on just that one task. Each cook (or thread) would be blocked synchronously waiting for the bacon to be ready to flip, or the toast to pop. + +Now, consider those same instructions written as C# statements: + +:::code language="csharp" source="snippets/index/AsyncBreakfast-starter/Program.cs" highlight="15-34"::: + +:::image type="content" source="media/synchronous-breakfast.png" alt-text="synchronous breakfast"::: + +The synchronously prepared breakfast took roughly 30 minutes because the total is the sum of each task. + +Computers don't interpret those instructions the same way people do. The computer will block on each statement until the work is complete before moving on to the next statement. That creates an unsatisfying breakfast. The later tasks wouldn't be started until the earlier tasks had been completed. It would take much longer to create the breakfast, and some items would have gotten cold before being served. + +If you want the computer to execute the above instructions asynchronously, you must write asynchronous code. + +These concerns are important for the programs you write today. When you write client programs, you want the UI to be responsive to user input. Your application shouldn't make a phone appear frozen while it's downloading data from the web. When you write server programs, you don't want threads blocked. Those threads could be serving other requests. Using synchronous code when asynchronous alternatives exist hurts your ability to scale out less expensively. You pay for those blocked threads. + +Successful modern applications require asynchronous code. Without language support, writing asynchronous code required callbacks, completion events, or other means that obscured the original intent of the code. The advantage of the synchronous code is that its step-by-step actions make it easy to scan and understand. Traditional asynchronous models forced you to focus on the asynchronous nature of the code, not on the fundamental actions of the code. + +## Don't block, await instead + +The preceding code demonstrates a bad practice: constructing synchronous code to perform asynchronous operations. As written, this code blocks the thread executing it from doing any other work. It won't be interrupted while any of the tasks are in progress. It would be as though you stared at the toaster after putting the bread in. You'd ignore anyone talking to you until the toast popped. + +Let's start by updating this code so that the thread doesn't block while tasks are running. The `await` keyword provides a non-blocking way to start a task, then continue execution when that task completes. A simple asynchronous version of the make a breakfast code would look like the following snippet: + +:::code language="csharp" source="snippets/index/AsyncBreakfast-V2/Program.cs" ID="SnippetMain"::: + +> [!IMPORTANT] +> The total elapsed time is roughly the same as the initial synchronous version. The code has yet to take advantage of some of the key features of asynchronous programming. + +> [!TIP] +> The method bodies of the `FryEggsAsync`, `FryBaconAsync`, and `ToastBreadAsync` have all been updated to return `Task<Egg>`, `Task<Bacon>`, and `Task<Toast>` respectively. The methods are renamed from their original version to include the "Async" suffix. Their implementations are shown as part of the [final version](#final-version) later in this article. + +> [!NOTE] +> The `Main` method returns `Task`, despite not having a `return` expression—this is by design. For more information, see [Evaluation of a void-returning async function](/dotnet/csharp/language-reference/language-specification/classes#14153-evaluation-of-a-void-returning-async-function). + +This code doesn't block while the eggs or the bacon are cooking. This code won't start any other tasks though. You'd still put the toast in the toaster and stare at it until it pops. But at least, you'd respond to anyone that wanted your attention. In a restaurant where multiple orders are placed, the cook could start another breakfast while the first is cooking. + +Now, the thread working on the breakfast isn't blocked while awaiting any started task that hasn't yet finished. For some applications, this change is all that's needed. A GUI application still responds to the user with just this change. However, for this scenario, you want more. You don't want each of the component tasks to be executed sequentially. It's better to start each of the component tasks before awaiting the previous task's completion. + +## Start tasks concurrently + +In many scenarios, you want to start several independent tasks immediately. Then, as each task finishes, you can continue other work that's ready. In the breakfast analogy, that's how you get breakfast done more quickly. You also get everything done close to the same time. You'll get a hot breakfast. + +The <xref:System.Threading.Tasks.Task?displayProperty=nameWithType> and related types are classes you can use to reason about tasks that are in progress. That enables you to write code that more closely resembles the way you'd create breakfast. You'd start cooking the eggs, bacon, and toast at the same time. As each requires action, you'd turn your attention to that task, take care of the next action, then wait for something else that requires your attention. + +You start a task and hold on to the <xref:System.Threading.Tasks.Task> object that represents the work. You'll `await` each task before working with its result. + +Let's make these changes to the breakfast code. The first step is to store the tasks for operations when they start, rather than awaiting them: + +```csharp +Coffee cup = PourCoffee(); +Console.WriteLine("Coffee is ready"); + +Task<Egg> eggsTask = FryEggsAsync(2); +Egg eggs = await eggsTask; +Console.WriteLine("Eggs are ready"); + +Task<Bacon> baconTask = FryBaconAsync(3); +Bacon bacon = await baconTask; +Console.WriteLine("Bacon is ready"); + +Task<Toast> toastTask = ToastBreadAsync(2); +Toast toast = await toastTask; +ApplyButter(toast); +ApplyJam(toast); +Console.WriteLine("Toast is ready"); + +Juice oj = PourOJ(); +Console.WriteLine("Oj is ready"); +Console.WriteLine("Breakfast is ready!"); +``` + +The preceding code won't get your breakfast ready any faster. The tasks are all `await`ed as soon as they are started. Next, you can move the `await` statements for the bacon and eggs to the end of the method, before serving breakfast: + +```csharp +Coffee cup = PourCoffee(); +Console.WriteLine("Coffee is ready"); + +Task<Egg> eggsTask = FryEggsAsync(2); +Task<Bacon> baconTask = FryBaconAsync(3); +Task<Toast> toastTask = ToastBreadAsync(2); + +Toast toast = await toastTask; +ApplyButter(toast); +ApplyJam(toast); +Console.WriteLine("Toast is ready"); +Juice oj = PourOJ(); +Console.WriteLine("Oj is ready"); + +Egg eggs = await eggsTask; +Console.WriteLine("Eggs are ready"); +Bacon bacon = await baconTask; +Console.WriteLine("Bacon is ready"); + +Console.WriteLine("Breakfast is ready!"); +``` + +:::image type="content" source="media/asynchronous-breakfast.png" alt-text="asynchronous breakfast"::: + +The asynchronously prepared breakfast took roughly 20 minutes, this time savings is because some tasks ran concurrently. + +The preceding code works better. You start all the asynchronous tasks at once. You await each task only when you need the results. The preceding code may be similar to code in a web application that makes requests to different microservices, then combines the results into a single page. You'll make all the requests immediately, then `await` all those tasks and compose the web page. + +## Composition with tasks + + You have everything ready for breakfast at the same time except the toast. Making the toast is the composition of an asynchronous operation (toasting the bread), and synchronous operations (adding the butter and the jam). Updating this code illustrates an important concept: + +> [!IMPORTANT] +> The composition of an asynchronous operation followed by synchronous work is an asynchronous operation. Stated another way, if any portion of an operation is asynchronous, the entire operation is asynchronous. + +The preceding code showed you that you can use <xref:System.Threading.Tasks.Task> or <xref:System.Threading.Tasks.Task%601> objects to hold running tasks. You `await` each task before using its result. The next step is to create methods that represent the combination of other work. Before serving breakfast, you want to await the task that represents toasting the bread before adding butter and jam. You can represent that work with the following code: + +:::code language="csharp" source="snippets/index/AsyncBreakfast-V3/Program.cs" ID="SnippetComposeToastTask"::: + +The preceding method has the `async` modifier in its signature. That signals to the compiler that this method contains an `await` statement; it contains asynchronous operations. This method represents the task that toasts the bread, then adds butter and jam. This method returns a <xref:System.Threading.Tasks.Task%601> that represents the composition of those three operations. The main block of code now becomes: + +:::code language="csharp" source="snippets/index/AsyncBreakfast-V3/Program.cs" ID="SnippetMain"::: + +The previous change illustrated an important technique for working with asynchronous code. You compose tasks by separating the operations into a new method that returns a task. You can choose when to await that task. You can start other tasks concurrently. + +## Asynchronous exceptions + +Up to this point, you've implicitly assumed that all these tasks complete successfully. Asynchronous methods throw exceptions, just like their synchronous counterparts. Asynchronous support for exceptions and error handling strives for the same goals as asynchronous support in general: You should write code that reads like a series of synchronous statements. Tasks throw exceptions when they can't complete successfully. The client code can catch those exceptions when a started task is `awaited`. For example, let's assume that the toaster catches fire while making the toast. You can simulate that by modifying the `ToastBreadAsync` method to match the following code: + +```csharp +private static async Task<Toast> ToastBreadAsync(int slices) +{ + for (int slice = 0; slice < slices; slice++) + { + Console.WriteLine("Putting a slice of bread in the toaster"); + } + Console.WriteLine("Start toasting..."); + await Task.Delay(2000); + Console.WriteLine("Fire! Toast is ruined!"); + throw new InvalidOperationException("The toaster is on fire"); + await Task.Delay(1000); + Console.WriteLine("Remove toast from toaster"); + + return new Toast(); +} +``` + +> [!NOTE] +> You'll get a warning when you compile the preceding code regarding unreachable code. That's intentional, because once the toaster catches fire, operations won't proceed normally. + +Run the application after making these changes, and you'll output similar to the following text: + +```console +Pouring coffee +Coffee is ready +Warming the egg pan... +putting 3 slices of bacon in the pan +Cooking first side of bacon... +Putting a slice of bread in the toaster +Putting a slice of bread in the toaster +Start toasting... +Fire! Toast is ruined! +Flipping a slice of bacon +Flipping a slice of bacon +Flipping a slice of bacon +Cooking the second side of bacon... +Cracking 2 eggs +Cooking the eggs ... +Put bacon on plate +Put eggs on plate +Eggs are ready +Bacon is ready +Unhandled exception. System.InvalidOperationException: The toaster is on fire + at AsyncBreakfast.Program.ToastBreadAsync(Int32 slices) in Program.cs:line 65 + at AsyncBreakfast.Program.MakeToastWithButterAndJamAsync(Int32 number) in Program.cs:line 36 + at AsyncBreakfast.Program.Main(String[] args) in Program.cs:line 24 + at AsyncBreakfast.Program.<Main>(String[] args) +``` + +You'll notice quite a few tasks are completed between when the toaster catches fire and the exception is observed. When a task that runs asynchronously throws an exception, that Task is ***faulted***. The Task object holds the exception thrown in the <xref:System.Threading.Tasks.Task.Exception?displayProperty=nameWithType> property. Faulted tasks throw an exception when they're awaited. + +There are two important mechanisms to understand: how an exception is stored in a faulted task, and how an exception is unpackaged and rethrown when code awaits a faulted task. + +When code running asynchronously throws an exception, that exception is stored in the `Task`. The <xref:System.Threading.Tasks.Task.Exception?displayProperty=nameWithType> property is a <xref:System.AggregateException?displayProperty=nameWithType> because more than one exception may be thrown during asynchronous work. Any exception thrown is added to the <xref:System.AggregateException.InnerExceptions?displayProperty=nameWithType> collection. If that `Exception` property is null, a new `AggregateException` is created and the thrown exception is the first item in the collection. + +The most common scenario for a faulted task is that the `Exception` property contains exactly one exception. When code `awaits` a faulted task, the first exception in the <xref:System.AggregateException.InnerExceptions?displayProperty=nameWithType> collection is rethrown. That's why the output from this example shows an `InvalidOperationException` instead of an `AggregateException`. Extracting the first inner exception makes working with asynchronous methods as similar as possible to working with their synchronous counterparts. You can examine the `Exception` property in your code when your scenario may generate multiple exceptions. + +Before going on, comment out these two lines in your `ToastBreadAsync` method. You don't want to start another fire: + +```csharp +Console.WriteLine("Fire! Toast is ruined!"); +throw new InvalidOperationException("The toaster is on fire"); +``` + +## Await tasks efficiently + +The series of `await` statements at the end of the preceding code can be improved by using methods of the `Task` class. One of those APIs is <xref:System.Threading.Tasks.Task.WhenAll%2A>, which returns a <xref:System.Threading.Tasks.Task> that completes when all the tasks in its argument list have completed, as shown in the following code: + +```csharp +await Task.WhenAll(eggsTask, baconTask, toastTask); +Console.WriteLine("Eggs are ready"); +Console.WriteLine("Bacon is ready"); +Console.WriteLine("Toast is ready"); +Console.WriteLine("Breakfast is ready!"); +``` + +Another option is to use <xref:System.Threading.Tasks.Task.WhenAny%2A>, which returns a `Task<Task>` that completes when any of its arguments complete. You can await the returned task, knowing that it has already finished. The following code shows how you could use <xref:System.Threading.Tasks.Task.WhenAny%2A> to await the first task to finish and then process its result. After processing the result from the completed task, you remove that completed task from the list of tasks passed to `WhenAny`. + +```csharp +var breakfastTasks = new List<Task> { eggsTask, baconTask, toastTask }; +while (breakfastTasks.Count > 0) +{ + Task finishedTask = await Task.WhenAny(breakfastTasks); + if (finishedTask == eggsTask) + { + Console.WriteLine("Eggs are ready"); + } + else if (finishedTask == baconTask) + { + Console.WriteLine("Bacon is ready"); + } + else if (finishedTask == toastTask) + { + Console.WriteLine("Toast is ready"); + } + await finishedTask; + breakfastTasks.Remove(finishedTask); +} +``` + +Near the end, you see the line `await finishedTask;`. The line `await Task.WhenAny` doesn't await the finished task. It `await`s the `Task` returned by `Task.WhenAny`. The result of `Task.WhenAny` is the task that has completed (or faulted). You should `await` that task again, even though you know it's finished running. That's how you retrieve its result, or ensure that the exception causing it to fault gets thrown. + +After all those changes, the final version of the code looks like this: +<a id="final-version"></a> +:::code language="csharp" source="snippets/index/AsyncBreakfast-final/Program.cs" highlight="16-47"::: + +:::image type="content" source="media/whenany-async-breakfast.png" alt-text="when any async breakfast"::: + +The final version of the asynchronously prepared breakfast took roughly 15 minutes because some tasks ran concurrently, and the code monitored multiple tasks at once and only took action when it was needed. + +This final code is asynchronous. It more accurately reflects how a person would cook a breakfast. Compare the preceding code with the first code sample in this article. The core actions are still clear from reading the code. You can read this code the same way you'd read those instructions for making a breakfast at the beginning of this article. The language features for `async` and `await` provide the translation every person makes to follow those written instructions: start tasks as you can and don't block waiting for tasks to complete. + +## Next steps + +> [!div class="nextstepaction"] +> [Explore real world scenarios for asynchronous programs](async-scenarios.md) diff --git a/docs/csharp/programming-guide/concepts/async/media/asynchronous-breakfast.png b/docs/csharp/asynchronous-programming/media/asynchronous-breakfast.png similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/asynchronous-breakfast.png rename to docs/csharp/asynchronous-programming/media/asynchronous-breakfast.png diff --git a/docs/csharp/programming-guide/concepts/async/media/synchronous-breakfast.png b/docs/csharp/asynchronous-programming/media/synchronous-breakfast.png similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/synchronous-breakfast.png rename to docs/csharp/asynchronous-programming/media/synchronous-breakfast.png diff --git a/docs/csharp/programming-guide/concepts/async/media/task-asynchronous-programming-model/navigation-trace-async-program.png b/docs/csharp/asynchronous-programming/media/task-asynchronous-programming-model/navigation-trace-async-program.png similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/task-asynchronous-programming-model/navigation-trace-async-program.png rename to docs/csharp/asynchronous-programming/media/task-asynchronous-programming-model/navigation-trace-async-program.png diff --git a/docs/csharp/programming-guide/concepts/async/media/task-asynchronous-programming-model/navigation-trace-async-program.vsdx b/docs/csharp/asynchronous-programming/media/task-asynchronous-programming-model/navigation-trace-async-program.vsdx similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/task-asynchronous-programming-model/navigation-trace-async-program.vsdx rename to docs/csharp/asynchronous-programming/media/task-asynchronous-programming-model/navigation-trace-async-program.vsdx diff --git a/docs/csharp/programming-guide/concepts/async/media/whenany-async-breakfast.png b/docs/csharp/asynchronous-programming/media/whenany-async-breakfast.png similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/whenany-async-breakfast.png rename to docs/csharp/asynchronous-programming/media/whenany-async-breakfast.png diff --git a/docs/csharp/asynchronous-programming/snippets/access-web/Program.cs b/docs/csharp/asynchronous-programming/snippets/access-web/Program.cs new file mode 100644 index 0000000000000..3cbdf78fc939b --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/access-web/Program.cs @@ -0,0 +1,31 @@ +class Program +{ + static async Task Main() => + Console.WriteLine($"learn.microsoft.com/dotnet content length = {await AccessWeb.Example.GetUrlContentLengthAsync()}"); +} + +class AccessWeb +{ + public static AccessWeb Example = new AccessWeb(); + + // <ControlFlow> + public async Task<int> GetUrlContentLengthAsync() + { + var client = new HttpClient(); + + Task<string> getStringTask = + client.GetStringAsync("https://learn.microsoft.com/dotnet"); + + DoIndependentWork(); + + string contents = await getStringTask; + + return contents.Length; + } + + void DoIndependentWork() + { + Console.WriteLine("Working..."); + } + // </ControlFlow> +} diff --git a/docs/csharp/programming-guide/concepts/async/snippets/access-web/access-web.csproj b/docs/csharp/asynchronous-programming/snippets/access-web/access-web.csproj similarity index 83% rename from docs/csharp/programming-guide/concepts/async/snippets/access-web/access-web.csproj rename to docs/csharp/asynchronous-programming/snippets/access-web/access-web.csproj index 364965dcf48a1..b690f7adaf575 100644 --- a/docs/csharp/programming-guide/concepts/async/snippets/access-web/access-web.csproj +++ b/docs/csharp/asynchronous-programming/snippets/access-web/access-web.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <RootNamespace>access_web</RootNamespace> diff --git a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/AsyncExamples.csproj b/docs/csharp/asynchronous-programming/snippets/async-return-types/AsyncExamples.csproj similarity index 84% rename from docs/csharp/programming-guide/concepts/async/snippets/async-return-types/AsyncExamples.csproj rename to docs/csharp/asynchronous-programming/snippets/async-return-types/AsyncExamples.csproj index dd6c073da39c6..1b626285b7b5a 100644 --- a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/AsyncExamples.csproj +++ b/docs/csharp/asynchronous-programming/snippets/async-return-types/AsyncExamples.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <StartupObject>AsyncExamples.Program</StartupObject> diff --git a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/AsyncStreams.cs b/docs/csharp/asynchronous-programming/snippets/async-return-types/AsyncStreams.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/async-return-types/AsyncStreams.cs rename to docs/csharp/asynchronous-programming/snippets/async-return-types/AsyncStreams.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/Program.cs b/docs/csharp/asynchronous-programming/snippets/async-return-types/Program.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/async-return-types/Program.cs rename to docs/csharp/asynchronous-programming/snippets/async-return-types/Program.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns1.cs b/docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns1.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns1.cs rename to docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns1.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns1a.cs b/docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns1a.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns1a.cs rename to docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns1a.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns2.cs b/docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns2.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns2.cs rename to docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns2.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns2a.cs b/docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns2a.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns2a.cs rename to docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns2a.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns3.cs b/docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns3.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-returns3.cs rename to docs/csharp/asynchronous-programming/snippets/async-return-types/async-returns3.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-valuetask.cs b/docs/csharp/asynchronous-programming/snippets/async-return-types/async-valuetask.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/async-return-types/async-valuetask.cs rename to docs/csharp/asynchronous-programming/snippets/async-return-types/async-valuetask.cs diff --git a/docs/csharp/asynchronous-programming/snippets/cancel-task-after-period-of-time/Program.cs b/docs/csharp/asynchronous-programming/snippets/cancel-task-after-period-of-time/Program.cs new file mode 100644 index 0000000000000..92886a0135366 --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/cancel-task-after-period-of-time/Program.cs @@ -0,0 +1,82 @@ +using System.Diagnostics; + +class Program +{ + static readonly CancellationTokenSource s_cts = new CancellationTokenSource(); + + static readonly HttpClient s_client = new HttpClient + { + MaxResponseContentBufferSize = 1_000_000 + }; + + static readonly IEnumerable<string> s_urlList = new string[] + { + "https://learn.microsoft.com", + "https://learn.microsoft.com/aspnet/core", + "https://learn.microsoft.com/azure", + "https://learn.microsoft.com/azure/devops", + "https://learn.microsoft.com/dotnet", + "https://learn.microsoft.com/dynamics365", + "https://learn.microsoft.com/education", + "https://learn.microsoft.com/enterprise-mobility-security", + "https://learn.microsoft.com/gaming", + "https://learn.microsoft.com/graph", + "https://learn.microsoft.com/microsoft-365", + "https://learn.microsoft.com/office", + "https://learn.microsoft.com/powershell", + "https://learn.microsoft.com/sql", + "https://learn.microsoft.com/surface", + "https://learn.microsoft.com/system-center", + "https://learn.microsoft.com/visualstudio", + "https://learn.microsoft.com/windows", + "https://learn.microsoft.com/xamarin" + }; + + static async Task Main() + { + Console.WriteLine("Application started."); + + try + { + s_cts.CancelAfter(3500); + + await SumPageSizesAsync(); + } + catch (OperationCanceledException) + { + Console.WriteLine("\nTasks cancelled: timed out.\n"); + } + finally + { + s_cts.Dispose(); + } + + Console.WriteLine("Application ending."); + } + + static async Task SumPageSizesAsync() + { + var stopwatch = Stopwatch.StartNew(); + + int total = 0; + foreach (string url in s_urlList) + { + int contentLength = await ProcessUrlAsync(url, s_client, s_cts.Token); + total += contentLength; + } + + stopwatch.Stop(); + + Console.WriteLine($"\nTotal bytes returned: {total:#,#}"); + Console.WriteLine($"Elapsed time: {stopwatch.Elapsed}\n"); + } + + static async Task<int> ProcessUrlAsync(string url, HttpClient client, CancellationToken token) + { + HttpResponseMessage response = await client.GetAsync(url, token); + byte[] content = await response.Content.ReadAsByteArrayAsync(token); + Console.WriteLine($"{url,-60} {content.Length,10:#,#}"); + + return content.Length; + } +} diff --git a/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-task-after-period-of-time/cancel-task-after-period-of-time.csproj b/docs/csharp/asynchronous-programming/snippets/cancel-task-after-period-of-time/cancel-task-after-period-of-time.csproj similarity index 85% rename from docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-task-after-period-of-time/cancel-task-after-period-of-time.csproj rename to docs/csharp/asynchronous-programming/snippets/cancel-task-after-period-of-time/cancel-task-after-period-of-time.csproj index 5a3de622ef71c..6440df56cb51e 100644 --- a/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-task-after-period-of-time/cancel-task-after-period-of-time.csproj +++ b/docs/csharp/asynchronous-programming/snippets/cancel-task-after-period-of-time/cancel-task-after-period-of-time.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <RootNamespace>cancel_task_after_period_of_time</RootNamespace> diff --git a/docs/csharp/asynchronous-programming/snippets/cancel-tasks/Program.cs b/docs/csharp/asynchronous-programming/snippets/cancel-tasks/Program.cs new file mode 100644 index 0000000000000..071aba37bc341 --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/cancel-tasks/Program.cs @@ -0,0 +1,96 @@ +using System.Diagnostics; + +class Program +{ + static readonly CancellationTokenSource s_cts = new CancellationTokenSource(); + + static readonly HttpClient s_client = new HttpClient + { + MaxResponseContentBufferSize = 1_000_000 + }; + + static readonly IEnumerable<string> s_urlList = new string[] + { + "https://learn.microsoft.com", + "https://learn.microsoft.com/aspnet/core", + "https://learn.microsoft.com/azure", + "https://learn.microsoft.com/azure/devops", + "https://learn.microsoft.com/dotnet", + "https://learn.microsoft.com/dynamics365", + "https://learn.microsoft.com/education", + "https://learn.microsoft.com/enterprise-mobility-security", + "https://learn.microsoft.com/gaming", + "https://learn.microsoft.com/graph", + "https://learn.microsoft.com/microsoft-365", + "https://learn.microsoft.com/office", + "https://learn.microsoft.com/powershell", + "https://learn.microsoft.com/sql", + "https://learn.microsoft.com/surface", + "https://learn.microsoft.com/system-center", + "https://learn.microsoft.com/visualstudio", + "https://learn.microsoft.com/windows", + "https://learn.microsoft.com/xamarin" + }; + + static async Task Main() + { + Console.WriteLine("Application started."); + Console.WriteLine("Press the ENTER key to cancel...\n"); + + Task cancelTask = Task.Run(() => + { + while (Console.ReadKey().Key != ConsoleKey.Enter) + { + Console.WriteLine("Press the ENTER key to cancel..."); + } + + Console.WriteLine("\nENTER key pressed: cancelling downloads.\n"); + s_cts.Cancel(); + }); + + Task sumPageSizesTask = SumPageSizesAsync(); + + Task finishedTask = await Task.WhenAny(new[] { cancelTask, sumPageSizesTask }); + if (finishedTask == cancelTask) + { + // wait for the cancellation to take place: + try + { + await sumPageSizesTask; + Console.WriteLine("Download task completed before cancel request was processed."); + } + catch (TaskCanceledException) + { + Console.WriteLine("Download task has been cancelled."); + } + } + + Console.WriteLine("Application ending."); + } + + static async Task SumPageSizesAsync() + { + var stopwatch = Stopwatch.StartNew(); + + int total = 0; + foreach (string url in s_urlList) + { + int contentLength = await ProcessUrlAsync(url, s_client, s_cts.Token); + total += contentLength; + } + + stopwatch.Stop(); + + Console.WriteLine($"\nTotal bytes returned: {total:#,#}"); + Console.WriteLine($"Elapsed time: {stopwatch.Elapsed}\n"); + } + + static async Task<int> ProcessUrlAsync(string url, HttpClient client, CancellationToken token) + { + HttpResponseMessage response = await client.GetAsync(url, token); + byte[] content = await response.Content.ReadAsByteArrayAsync(token); + Console.WriteLine($"{url,-60} {content.Length,10:#,#}"); + + return content.Length; + } +} diff --git a/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-tasks/cancel-tasks.csproj b/docs/csharp/asynchronous-programming/snippets/cancel-tasks/cancel-tasks.csproj similarity index 83% rename from docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-tasks/cancel-tasks.csproj rename to docs/csharp/asynchronous-programming/snippets/cancel-tasks/cancel-tasks.csproj index b9944c8b18f5e..e70f918df3554 100644 --- a/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-tasks/cancel-tasks.csproj +++ b/docs/csharp/asynchronous-programming/snippets/cancel-tasks/cancel-tasks.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <RootNamespace>cancel_tasks</RootNamespace> diff --git a/docs/csharp/programming-guide/concepts/async/snippets/file-access/Program.cs b/docs/csharp/asynchronous-programming/snippets/file-access/Program.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/file-access/Program.cs rename to docs/csharp/asynchronous-programming/snippets/file-access/Program.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/file-access/file-access.csproj b/docs/csharp/asynchronous-programming/snippets/file-access/file-access.csproj similarity index 83% rename from docs/csharp/programming-guide/concepts/async/snippets/file-access/file-access.csproj rename to docs/csharp/asynchronous-programming/snippets/file-access/file-access.csproj index 769ecef4f389a..872618e85cd50 100644 --- a/docs/csharp/programming-guide/concepts/async/snippets/file-access/file-access.csproj +++ b/docs/csharp/asynchronous-programming/snippets/file-access/file-access.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <RootNamespace>file_access</RootNamespace> diff --git a/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/finished/IssuePRreport.csproj b/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/finished/IssuePRreport.csproj new file mode 100644 index 0000000000000..813272f3d2974 --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/finished/IssuePRreport.csproj @@ -0,0 +1,15 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> + <PackageReference Include="Octokit" Version="5.0.2" /> + </ItemGroup> + +</Project> diff --git a/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/finished/Program.cs b/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/finished/Program.cs similarity index 100% rename from docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/finished/Program.cs rename to docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/finished/Program.cs diff --git a/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/start/IssuePRreport.csproj b/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/start/IssuePRreport.csproj new file mode 100644 index 0000000000000..813272f3d2974 --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/start/IssuePRreport.csproj @@ -0,0 +1,15 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> + <PackageReference Include="Octokit" Version="5.0.2" /> + </ItemGroup> + +</Project> diff --git a/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/start/Program.cs b/docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/start/Program.cs similarity index 100% rename from docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/start/Program.cs rename to docs/csharp/asynchronous-programming/snippets/generate-consume-asynchronous-streams/start/Program.cs diff --git a/docs/standard/base-types/snippets/regular-expression-source-generators/regex.csproj b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-V2/AsyncBreakfast.csproj similarity index 100% rename from docs/standard/base-types/snippets/regular-expression-source-generators/regex.csproj rename to docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-V2/AsyncBreakfast.csproj diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-V2/Program.cs b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-V2/Program.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-V2/Program.cs rename to docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-V2/Program.cs diff --git a/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-V3/AsyncBreakfast.csproj b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-V3/AsyncBreakfast.csproj new file mode 100644 index 0000000000000..59ed84ca9213d --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-V3/AsyncBreakfast.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <Nullable>enable</Nullable> + <ImplicitUsings>enable</ImplicitUsings> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-V3/Program.cs b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-V3/Program.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-V3/Program.cs rename to docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-V3/Program.cs diff --git a/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-final/AsyncBreakfast.csproj b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-final/AsyncBreakfast.csproj new file mode 100644 index 0000000000000..59ed84ca9213d --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-final/AsyncBreakfast.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <Nullable>enable</Nullable> + <ImplicitUsings>enable</ImplicitUsings> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-final/Program.cs b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-final/Program.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-final/Program.cs rename to docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-final/Program.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-final/access-by-line.txt b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-final/access-by-line.txt similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-final/access-by-line.txt rename to docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-final/access-by-line.txt diff --git a/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-starter/AsyncBreakfast.csproj b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-starter/AsyncBreakfast.csproj new file mode 100644 index 0000000000000..59ed84ca9213d --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-starter/AsyncBreakfast.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <Nullable>enable</Nullable> + <ImplicitUsings>enable</ImplicitUsings> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-starter/Program.cs b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-starter/Program.cs similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-starter/Program.cs rename to docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-starter/Program.cs diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-starter/access-by-line.txt b/docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-starter/access-by-line.txt similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-starter/access-by-line.txt rename to docs/csharp/asynchronous-programming/snippets/index/AsyncBreakfast-starter/access-by-line.txt diff --git a/docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks-6-0/MultipleTasks.csproj b/docs/csharp/asynchronous-programming/snippets/multiple-tasks-6-0/MultipleTasks.csproj similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks-6-0/MultipleTasks.csproj rename to docs/csharp/asynchronous-programming/snippets/multiple-tasks-6-0/MultipleTasks.csproj diff --git a/docs/csharp/asynchronous-programming/snippets/multiple-tasks-6-0/Program.cs b/docs/csharp/asynchronous-programming/snippets/multiple-tasks-6-0/Program.cs new file mode 100644 index 0000000000000..64850c314be99 --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/multiple-tasks-6-0/Program.cs @@ -0,0 +1,87 @@ +using System.Diagnostics; + +HttpClient s_client = new() +{ + MaxResponseContentBufferSize = 1_000_000 +}; + +IEnumerable<string> s_urlList = new string[] +{ + "https://learn.microsoft.com", + "https://learn.microsoft.com/aspnet/core", + "https://learn.microsoft.com/azure", + "https://learn.microsoft.com/azure/devops", + "https://learn.microsoft.com/dotnet", + "https://learn.microsoft.com/dynamics365", + "https://learn.microsoft.com/education", + "https://learn.microsoft.com/enterprise-mobility-security", + "https://learn.microsoft.com/gaming", + "https://learn.microsoft.com/graph", + "https://learn.microsoft.com/microsoft-365", + "https://learn.microsoft.com/office", + "https://learn.microsoft.com/powershell", + "https://learn.microsoft.com/sql", + "https://learn.microsoft.com/surface", + "https://learn.microsoft.com/system-center", + "https://learn.microsoft.com/visualstudio", + "https://learn.microsoft.com/windows", + "https://learn.microsoft.com/xamarin" +}; + +await SumPageSizesAsync(); + +async Task SumPageSizesAsync() +{ + var stopwatch = Stopwatch.StartNew(); + + IEnumerable<Task<int>> downloadTasksQuery = + from url in s_urlList + select ProcessUrlAsync(url, s_client); + + List<Task<int>> downloadTasks = downloadTasksQuery.ToList(); + + int total = 0; + while (downloadTasks.Any()) + { + Task<int> finishedTask = await Task.WhenAny(downloadTasks); + downloadTasks.Remove(finishedTask); + total += await finishedTask; + } + + stopwatch.Stop(); + + Console.WriteLine($"\nTotal bytes returned: {total:#,#}"); + Console.WriteLine($"Elapsed time: {stopwatch.Elapsed}\n"); +} + +static async Task<int> ProcessUrlAsync(string url, HttpClient client) +{ + byte[] content = await client.GetByteArrayAsync(url); + Console.WriteLine($"{url,-60} {content.Length,10:#,#}"); + + return content.Length; +} + +// Example output: +// https://learn.microsoft.com 132,517 +// https://learn.microsoft.com/powershell 57,375 +// https://learn.microsoft.com/gaming 33,549 +// https://learn.microsoft.com/aspnet/core 88,714 +// https://learn.microsoft.com/surface 39,840 +// https://learn.microsoft.com/enterprise-mobility-security 30,903 +// https://learn.microsoft.com/microsoft-365 67,867 +// https://learn.microsoft.com/windows 26,816 +// https://learn.microsoft.com/xamarin 57,958 +// https://learn.microsoft.com/dotnet 78,706 +// https://learn.microsoft.com/graph 48,277 +// https://learn.microsoft.com/dynamics365 49,042 +// https://learn.microsoft.com/office 67,867 +// https://learn.microsoft.com/system-center 42,887 +// https://learn.microsoft.com/education 38,636 +// https://learn.microsoft.com/azure 421,663 +// https://learn.microsoft.com/visualstudio 30,925 +// https://learn.microsoft.com/sql 54,608 +// https://learn.microsoft.com/azure/devops 86,034 + +// Total bytes returned: 1,454,184 +// Elapsed time: 00:00:01.1290403 diff --git a/docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks/MultipleTasks.csproj b/docs/csharp/asynchronous-programming/snippets/multiple-tasks/MultipleTasks.csproj similarity index 76% rename from docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks/MultipleTasks.csproj rename to docs/csharp/asynchronous-programming/snippets/multiple-tasks/MultipleTasks.csproj index d75be91610c60..8c8d40ddc3ae0 100644 --- a/docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks/MultipleTasks.csproj +++ b/docs/csharp/asynchronous-programming/snippets/multiple-tasks/MultipleTasks.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net5.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> </PropertyGroup> diff --git a/docs/csharp/asynchronous-programming/snippets/multiple-tasks/Program.cs b/docs/csharp/asynchronous-programming/snippets/multiple-tasks/Program.cs new file mode 100644 index 0000000000000..b761d88be86d8 --- /dev/null +++ b/docs/csharp/asynchronous-programming/snippets/multiple-tasks/Program.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Threading.Tasks; + +namespace ProcessTasksAsTheyFinish +{ + class Program + { + static readonly HttpClient s_client = new HttpClient + { + MaxResponseContentBufferSize = 1_000_000 + }; + + static readonly IEnumerable<string> s_urlList = new string[] + { + "https://learn.microsoft.com", + "https://learn.microsoft.com/aspnet/core", + "https://learn.microsoft.com/azure", + "https://learn.microsoft.com/azure/devops", + "https://learn.microsoft.com/dotnet", + "https://learn.microsoft.com/dynamics365", + "https://learn.microsoft.com/education", + "https://learn.microsoft.com/enterprise-mobility-security", + "https://learn.microsoft.com/gaming", + "https://learn.microsoft.com/graph", + "https://learn.microsoft.com/microsoft-365", + "https://learn.microsoft.com/office", + "https://learn.microsoft.com/powershell", + "https://learn.microsoft.com/sql", + "https://learn.microsoft.com/surface", + "https://learn.microsoft.com/system-center", + "https://learn.microsoft.com/visualstudio", + "https://learn.microsoft.com/windows", + "https://learn.microsoft.com/xamarin" + }; + + static Task Main() => SumPageSizesAsync(); + + static async Task SumPageSizesAsync() + { + var stopwatch = Stopwatch.StartNew(); + + IEnumerable<Task<int>> downloadTasksQuery = + from url in s_urlList + select ProcessUrlAsync(url, s_client); + + List<Task<int>> downloadTasks = downloadTasksQuery.ToList(); + + int total = 0; + while (downloadTasks.Any()) + { + Task<int> finishedTask = await Task.WhenAny(downloadTasks); + downloadTasks.Remove(finishedTask); + total += await finishedTask; + } + + stopwatch.Stop(); + + Console.WriteLine($"\nTotal bytes returned: {total:#,#}"); + Console.WriteLine($"Elapsed time: {stopwatch.Elapsed}\n"); + } + + static async Task<int> ProcessUrlAsync(string url, HttpClient client) + { + byte[] content = await client.GetByteArrayAsync(url); + Console.WriteLine($"{url,-60} {content.Length,10:#,#}"); + + return content.Length; + } + } +} +// Example output: +// https://learn.microsoft.com/windows 25,513 +// https://learn.microsoft.com/gaming 30,705 +// https://learn.microsoft.com/dotnet 69,626 +// https://learn.microsoft.com/dynamics365 50,756 +// https://learn.microsoft.com/surface 35,519 +// https://learn.microsoft.com 39,531 +// https://learn.microsoft.com/azure/devops 75,837 +// https://learn.microsoft.com/xamarin 60,284 +// https://learn.microsoft.com/system-center 43,444 +// https://learn.microsoft.com/enterprise-mobility-security 28,946 +// https://learn.microsoft.com/microsoft-365 43,278 +// https://learn.microsoft.com/visualstudio 31,414 +// https://learn.microsoft.com/office 42,292 +// https://learn.microsoft.com/azure 401,113 +// https://learn.microsoft.com/graph 46,831 +// https://learn.microsoft.com/education 25,098 +// https://learn.microsoft.com/powershell 58,173 +// https://learn.microsoft.com/aspnet/core 87,763 +// https://learn.microsoft.com/sql 53,362 + +// Total bytes returned: 1,249,485 +// Elapsed time: 00:00:02.7068725 diff --git a/docs/csharp/programming-guide/concepts/async/start-multiple-async-tasks-and-process-them-as-they-complete.md b/docs/csharp/asynchronous-programming/start-multiple-async-tasks-and-process-them-as-they-complete.md similarity index 86% rename from docs/csharp/programming-guide/concepts/async/start-multiple-async-tasks-and-process-them-as-they-complete.md rename to docs/csharp/asynchronous-programming/start-multiple-async-tasks-and-process-them-as-they-complete.md index fd71327fd8de2..c722416a1f721 100644 --- a/docs/csharp/programming-guide/concepts/async/start-multiple-async-tasks-and-process-them-as-they-complete.md +++ b/docs/csharp/asynchronous-programming/start-multiple-async-tasks-and-process-them-as-they-complete.md @@ -1,7 +1,7 @@ --- title: Process asynchronous tasks as they complete description: Learn how to use Task.WhenAny in C# to start multiple tasks and process their results as they finish, rather than process them in the order started. -ms.date: 10/27/2021 +ms.date: 02/08/2023 zone_pivot_groups: dotnet-version ms.topic: tutorial --- @@ -18,12 +18,12 @@ The following example uses a query to create a collection of tasks. Each task do You can follow this tutorial by using one of the following options: -* [Visual Studio 2022 version 17.0.0 Preview](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2022) with the **.NET desktop development** workload installed. The .NET 6.0 SDK is automatically installed when you select this workload. -* The [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) with a code editor of your choice, such as [Visual Studio Code](https://code.visualstudio.com/). +* [Visual Studio 2022](https://visualstudio.microsoft.com/downloads) with the **.NET desktop development** workload installed. The .NET SDK is automatically installed when you select this workload. +* The [.NET SDK](https://dotnet.microsoft.com/download/) with a code editor of your choice, such as [Visual Studio Code](https://code.visualstudio.com/). ## Create example application -Create a new .NET Core console application that targets .NET 6.0. You can create one by using the [dotnet new console](../../../../core/tools/dotnet-new-sdk-templates.md#console) command or from Visual Studio. +Create a new .NET Core console application. You can create one by using the [dotnet new console](../../core/tools/dotnet-new-sdk-templates.md#console) command or from Visual Studio. Open the *Program.cs* file in your code editor, and replace the existing code with this code: @@ -85,7 +85,7 @@ The main entry point into the console application is the `Main` method. Replace static Task Main() => SumPageSizesAsync(); ``` -The updated `Main` method is now considered an [Async main](../../../fundamentals/program-structure/main-command-line.md#async-main-return-values), which allows for an asynchronous entry point into the executable. It is expressed as a call to `SumPageSizesAsync`. +The updated `Main` method is now considered an [Async main](../fundamentals/program-structure/main-command-line.md#async-main-return-values), which allows for an asynchronous entry point into the executable. It is expressed as a call to `SumPageSizesAsync`. ## Create the asynchronous sum page sizes method @@ -117,7 +117,7 @@ static async Task SumPageSizesAsync() } ``` -The method starts by instantiating and starting a <xref:System.Diagnostics.Stopwatch>. It then includes a query that, when executed, creates a collection of tasks. Each call to `ProcessUrlAsync` in the following code returns a <xref:System.Threading.Tasks.Task%601>, where `TResult` is an integer: +The `while` loop removes one of the tasks in each iteration. After every task has completed, the loop ends. The method starts by instantiating and starting a <xref:System.Diagnostics.Stopwatch>. It then includes a query that, when executed, creates a collection of tasks. Each call to `ProcessUrlAsync` in the following code returns a <xref:System.Threading.Tasks.Task%601>, where `TResult` is an integer: ```csharp IEnumerable<Task<int>> downloadTasksQuery = @@ -125,7 +125,7 @@ IEnumerable<Task<int>> downloadTasksQuery = select ProcessUrlAsync(url, s_client); ``` -Due to [deferred execution](../../../../standard/linq/deferred-execution-example.md) with the LINQ, you call <xref:System.Linq.Enumerable.ToList%2A?displayProperty=nameWithType> to start each task. +Due to [deferred execution](../../standard/linq/deferred-execution-example.md) with the LINQ, you call <xref:System.Linq.Enumerable.ToList%2A?displayProperty=nameWithType> to start each task. ```csharp List<Task<int>> downloadTasks = downloadTasksQuery.ToList(); @@ -200,7 +200,7 @@ You can follow this tutorial by using one of the following options: ## Create example application -Create a new .NET Core console application that targets .NET 5.0 or .NET Core 3.1. You can create one by using the [dotnet new console](../../../../core/tools/dotnet-new-sdk-templates.md#console) command or from Visual Studio. Open the *Program.cs* file in your favorite code editor. +Create a new .NET Core console application that targets .NET 5.0 or .NET Core 3.1. You can create one by using the [dotnet new console](../../core/tools/dotnet-new-sdk-templates.md#console) command or from Visual Studio. Open the *Program.cs* file in your favorite code editor. ### Replace using statements @@ -259,7 +259,7 @@ The main entry point into the console application is the `Main` method. Replace static Task Main() => SumPageSizesAsync(); ``` -The updated `Main` method is now considered an [Async main](../../../fundamentals/program-structure/main-command-line.md#async-main-return-values), which allows for an asynchronous entry point into the executable. It is expressed a call to `SumPageSizesAsync`. +The updated `Main` method is now considered an [Async main](../fundamentals/program-structure/main-command-line.md#async-main-return-values), which allows for an asynchronous entry point into the executable. It is expressed a call to `SumPageSizesAsync`. ## Create the asynchronous sum page sizes method @@ -299,7 +299,7 @@ IEnumerable<Task<int>> downloadTasksQuery = select ProcessUrlAsync(url, s_client); ``` -Due to [deferred execution](../../../../standard/linq/deferred-execution-example.md) with the LINQ, you call <xref:System.Linq.Enumerable.ToList%2A?displayProperty=nameWithType> to start each task. +Due to [deferred execution](../../standard/linq/deferred-execution-example.md) with the LINQ, you call <xref:System.Linq.Enumerable.ToList%2A?displayProperty=nameWithType> to start each task. ```csharp List<Task<int>> downloadTasks = downloadTasksQuery.ToList(); diff --git a/docs/csharp/programming-guide/concepts/async/task-asynchronous-programming-model.md b/docs/csharp/asynchronous-programming/task-asynchronous-programming-model.md similarity index 89% rename from docs/csharp/programming-guide/concepts/async/task-asynchronous-programming-model.md rename to docs/csharp/asynchronous-programming/task-asynchronous-programming-model.md index 1bd11832d49bf..7065b503d6f56 100644 --- a/docs/csharp/programming-guide/concepts/async/task-asynchronous-programming-model.md +++ b/docs/csharp/asynchronous-programming/task-asynchronous-programming-model.md @@ -1,8 +1,7 @@ --- -title: The Task Asynchronous Programming (TAP) model with async and await (C#)" +title: The Task Asynchronous Programming (TAP) model with async and await" description: Learn when and how to use Task-based async programming, a simplified approach to asynchronous programming in C#. -ms.date: 03/02/2022 -ms.assetid: 9bcf896a-5826-4189-8c1a-3e35fa08243a +ms.date: 02/08/2023 --- # Task asynchronous programming model @@ -24,7 +23,7 @@ The following table shows typical areas where asynchronous programming improves | Web access | <xref:System.Net.Http.HttpClient> | <xref:Windows.Web.Http.HttpClient?displayProperty=nameWithType> <br> <xref:Windows.Web.Syndication.SyndicationClient> | | Working with files | <xref:System.Text.Json.JsonSerializer> <br> <xref:System.IO.StreamReader> <br> <xref:System.IO.StreamWriter> <br> <xref:System.Xml.XmlReader> <br> <xref:System.Xml.XmlWriter> | <xref:Windows.Storage.StorageFile> | | Working with images | | <xref:Windows.Media.Capture.MediaCapture> <br> <xref:Windows.Graphics.Imaging.BitmapEncoder> <br> <xref:Windows.Graphics.Imaging.BitmapDecoder> | -| WCF programming | [Synchronous and Asynchronous Operations](../../../../framework/wcf/synchronous-and-asynchronous-operations.md) | | +| WCF programming | [Synchronous and Asynchronous Operations](../../framework/wcf/synchronous-and-asynchronous-operations.md) | | Asynchrony proves especially valuable for applications that access the UI thread because all UI-related activity usually shares one thread. If any process is blocked in a synchronous application, all are blocked. Your application stops responding, and you might conclude that it has failed when instead it's just waiting. @@ -34,7 +33,7 @@ The async-based approach adds the equivalent of an automatic transmission to the ## <a name="BKMK_HowtoWriteanAsyncMethod"></a> Async methods are easy to write -The [async](../../../language-reference/keywords/async.md) and [await](../../../language-reference/operators/await.md) keywords in C# are the heart of async programming. By using those two keywords, you can use resources in .NET Framework, .NET Core, or the Windows Runtime to create an asynchronous method almost as easily as you create a synchronous method. Asynchronous methods that you define by using the `async` keyword are referred to as *async methods*. +The [async](../language-reference/keywords/async.md) and [await](../language-reference/operators/await.md) keywords in C# are the heart of async programming. By using those two keywords, you can use resources in .NET Framework, .NET Core, or the Windows Runtime to create an asynchronous method almost as easily as you create a synchronous method. Asynchronous methods that you define by using the `async` keyword are referred to as *async methods*. The following example shows an async method. Almost everything in the code should look familiar to you. @@ -76,7 +75,7 @@ The following characteristics summarize what makes the previous example an async In async methods, you use the provided keywords and types to indicate what you want to do, and the compiler does the rest, including keeping track of what must happen when control returns to an await point in a suspended method. Some routine processes, such as loops and exception handling, can be difficult to handle in traditional asynchronous code. In an async method, you write these elements much as you would in a synchronous solution, and the problem is solved. -For more information about asynchrony in previous versions of .NET Framework, see [TPL and traditional .NET Framework asynchronous programming](../../../../standard/parallel-programming/tpl-and-traditional-async-programming.md). +For more information about asynchrony in previous versions of .NET Framework, see [TPL and traditional .NET Framework asynchronous programming](../../standard/parallel-programming/tpl-and-traditional-async-programming.md). ## <a name="BKMK_WhatHappensUnderstandinganAsyncMethod"></a> What happens in an async method @@ -128,9 +127,9 @@ The async-based approach to asynchronous programming is preferable to existing a ## <a name="BKMK_AsyncandAwait"></a> async and await -If you specify that a method is an async method by using the [async](../../../language-reference/keywords/async.md) modifier, you enable the following two capabilities. +If you specify that a method is an async method by using the [async](../language-reference/keywords/async.md) modifier, you enable the following two capabilities. -- The marked async method can use [await](../../../language-reference/operators/await.md) to designate suspension points. The `await` operator tells the compiler that the async method can't continue past that point until the awaited asynchronous process is complete. In the meantime, control returns to the caller of the async method. +- The marked async method can use [await](../language-reference/operators/await.md) to designate suspension points. The `await` operator tells the compiler that the async method can't continue past that point until the awaited asynchronous process is complete. In the meantime, control returns to the caller of the async method. The suspension of an async method at an `await` expression doesn't constitute an exit from the method, and `finally` blocks don't run. @@ -140,14 +139,14 @@ An async method typically contains one or more occurrences of an `await` operato `async` and `await` are contextual keywords. For more information and examples, see the following topics: -- [async](../../../language-reference/keywords/async.md) -- [await](../../../language-reference/operators/await.md) +- [async](../language-reference/keywords/async.md) +- [await](../language-reference/operators/await.md) ## <a name="BKMK_ReturnTypesandParameters"></a> Return types and parameters An async method typically returns a <xref:System.Threading.Tasks.Task> or a <xref:System.Threading.Tasks.Task%601>. Inside an async method, an `await` operator is applied to a task that's returned from a call to another async method. -You specify <xref:System.Threading.Tasks.Task%601> as the return type if the method contains a [`return`](../../../language-reference/statements/jump-statements.md#the-return-statement) statement that specifies an operand of type `TResult`. +You specify <xref:System.Threading.Tasks.Task%601> as the return type if the method contains a [`return`](../language-reference/statements/jump-statements.md#the-return-statement) statement that specifies an operand of type `TResult`. You use <xref:System.Threading.Tasks.Task> as the return type if the method has no return statement or has a return statement that doesn't return an operand. @@ -188,9 +187,9 @@ An async method can also have a `void` return type. This return type is used pri An async method that has a `void` return type can't be awaited, and the caller of a void-returning method can't catch any exceptions that the method throws. -An async method can't declare [in](../../../language-reference/keywords/in-parameter-modifier.md), [ref](../../../language-reference/keywords/ref.md) or [out](../../../language-reference/keywords/out-parameter-modifier.md) parameters, but the method can call methods that have such parameters. Similarly, an async method can't return a value by reference, although it can call methods with ref return values. +An async method can't declare [in](../language-reference/keywords/in-parameter-modifier.md), [ref](../language-reference/keywords/ref.md) or [out](../language-reference/keywords/out-parameter-modifier.md) parameters, but the method can call methods that have such parameters. Similarly, an async method can't return a value by reference, although it can call methods with ref return values. -For more information and examples, see [Async return types (C#)](async-return-types.md). For more information about how to catch exceptions in async methods, see [try-catch](../../../language-reference/keywords/try-catch.md). +For more information and examples, see [Async return types (C#)](async-return-types.md). For more information about how to catch exceptions in async methods, see [try-catch](../language-reference/keywords/try-catch.md). Asynchronous APIs in Windows Runtime programming have one of the following return types, which are similar to tasks: @@ -213,11 +212,11 @@ You can ignore the convention where an event, base class, or interface contract | [Async return types (C#)](async-return-types.md) | Illustrates the types that async methods can return, and explains when each type is appropriate. | | Cancel tasks with a cancellation token as a signaling mechanism. | Shows how to add the following functionality to your async solution:<br><br> - [Cancel a list of tasks (C#)](cancel-an-async-task-or-a-list-of-tasks.md)<br>- [Cancel tasks after a period of time (C#)](cancel-async-tasks-after-a-period-of-time.md)<br>- [Process asynchronous task as they complete (C#)](start-multiple-async-tasks-and-process-them-as-they-complete.md) | | [Using async for file access (C#)](using-async-for-file-access.md) | Lists and demonstrates the benefits of using async and await to access files. | -| [Task-based asynchronous pattern (TAP)](../../../../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md) | Describes an asynchronous pattern, the pattern is based on the <xref:System.Threading.Tasks.Task> and <xref:System.Threading.Tasks.Task%601> types. | +| [Task-based asynchronous pattern (TAP)](../../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md) | Describes an asynchronous pattern, the pattern is based on the <xref:System.Threading.Tasks.Task> and <xref:System.Threading.Tasks.Task%601> types. | | [Async Videos on Channel 9](/shows/browse?terms=async) | Provides links to a variety of videos about async programming. | ## See also - [Asynchronous programming with async and await](index.md) -- [async](../../../language-reference/keywords/async.md) -- [await](../../../language-reference/operators/await.md) +- [async](../language-reference/keywords/async.md) +- [await](../language-reference/operators/await.md) diff --git a/docs/csharp/programming-guide/concepts/async/using-async-for-file-access.md b/docs/csharp/asynchronous-programming/using-async-for-file-access.md similarity index 97% rename from docs/csharp/programming-guide/concepts/async/using-async-for-file-access.md rename to docs/csharp/asynchronous-programming/using-async-for-file-access.md index 762946008bc86..38eb365b436e9 100644 --- a/docs/csharp/programming-guide/concepts/async/using-async-for-file-access.md +++ b/docs/csharp/asynchronous-programming/using-async-for-file-access.md @@ -1,9 +1,8 @@ --- title: Asynchronous file access (C#) description: Learn how to use the async feature to access files in C#. You can call into asynchronous methods without using callbacks or splitting your code across methods. -ms.date: 08/19/2020 +ms.date: 02/08/2023 ms.topic: tutorial -ms.assetid: bb018fea-5313-4c80-ab3f-7c24b2145bd9 --- # Asynchronous file access (C#) @@ -79,7 +78,7 @@ Any performance boost is almost entirely from the parallel processing and not th :::code language="csharp" source="snippets/file-access/Program.cs" id="ParallelWriteText"::: -When using the <xref:System.IO.Stream.WriteAsync%2A> and <xref:System.IO.Stream.ReadAsync%2A> methods, you can specify a <xref:System.Threading.CancellationToken>, which you can use to cancel the operation mid-stream. For more information, see [Cancellation in managed threads](../../../../standard/threading/cancellation-in-managed-threads.md). +When using the <xref:System.IO.Stream.WriteAsync%2A> and <xref:System.IO.Stream.ReadAsync%2A> methods, you can specify a <xref:System.Threading.CancellationToken>, which you can use to cancel the operation mid-stream. For more information, see [Cancellation in managed threads](../../standard/threading/cancellation-in-managed-threads.md). ## See also diff --git a/docs/csharp/expression-classes.md b/docs/csharp/expression-classes.md deleted file mode 100644 index 37377b35f0729..0000000000000 --- a/docs/csharp/expression-classes.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Framework Types Supporting Expression Trees -description: Learn about framework types supporting expression trees, creating expression trees, and techniques for working with expression tree APIs. -ms.date: 06/20/2016 -ms.technology: csharp-advanced-concepts -ms.assetid: e9c85021-0d36-48af-91b7-aaaa66f22654 ---- - -# Framework Types Supporting Expression Trees - -[Previous -- Expression Trees Explained](expression-trees-explained.md) - -There is a large list of classes in the .NET Core framework that work with Expression Trees. -You can see the full -list at <xref:System.Linq.Expressions>. -Rather than run through the full list, let's understand how the framework classes have been designed. - -In language design, an expression is a body of code that evaluates and returns a value. Expressions -may be very simple: the constant expression `1` returns the constant value of 1. They may be more -complicated: The expression `(-B + Math.Sqrt(B*B - 4 * A * C)) / (2 * A)` returns one root for a -quadratic equation (in the case where the equation has a solution). - -## It all starts with System.Linq.Expression - -One of the complexities of working with expression trees is that many different -kinds of expressions are valid in many places in programs. Consider an assignment -expression. The right hand side of an assignment could be a constant value, a variable, -a method call expression, or others. That language flexibility means that you may encounter -many different expression types anywhere in the nodes of a tree when you traverse an -expression tree. Therefore, when you can work with the base expression type, that's -the simplest way to work. However, sometimes you need to know more. -The base Expression class contains a `NodeType` property for this purpose. -It returns an `ExpressionType` which is an enumeration of possible expression types. -Once you know the type of the node, you can cast it to that type, and perform -specific actions knowing the type of the expression node. You can search for certain -node types, and then work with the specific properties of that kind of expression. - -For example, this code will print the name of a variable for a variable access -expression. I've followed the practice of checking the node type, then -casting to a variable access expression and then checking the properties of -the specific expression type: - -```csharp -Expression<Func<int, int>> addFive = (num) => num + 5; - -if (addFive.NodeType == ExpressionType.Lambda) -{ - var lambdaExp = (LambdaExpression)addFive; - - var parameter = lambdaExp.Parameters.First(); - - Console.WriteLine(parameter.Name); - Console.WriteLine(parameter.Type); -} -``` - -## Creating Expression Trees - -The `System.Linq.Expression` class also contains many static methods to create expressions. These -methods create an expression node using the arguments supplied for its children. In this way, -you build an expression up from its leaf nodes. For example, this code builds an Add expression: - -```csharp -// Addition is an add expression for "1 + 2" -var one = Expression.Constant(1, typeof(int)); -var two = Expression.Constant(2, typeof(int)); -var addition = Expression.Add(one, two); -``` - -You can see from this simple example that many types are involved in creating and working -with expression trees. That complexity is necessary to provide the capabilities of -the rich vocabulary provided by the C# language. - -## Navigating the APIs - -There are Expression node types that map to almost all of the syntax elements of the -C# language. Each type has specific methods for that type of language element. It's a lot -to keep in your head at one time. Rather than try to memorize everything, here are the techniques -I use to work with Expression trees: - -1. Look at the members of the `ExpressionType` enum to determine possible nodes you should be -examining. This really helps when you want to traverse and understand an expression tree. -2. Look at the static members of the `Expression` class to build an expression. Those methods -can build any expression type from a set of its child nodes. -3. Look at the `ExpressionVisitor` class to build a modified expression tree. - -You'll find more as you look at each of those three areas. Invariably, you will find what you need when -you start with one of those three steps. - - [Next -- Executing Expression Trees](expression-trees-execution.md) diff --git a/docs/csharp/expression-trees-building.md b/docs/csharp/expression-trees-building.md deleted file mode 100644 index 1696cc71d85f4..0000000000000 --- a/docs/csharp/expression-trees-building.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: Building Expression Trees -description: Learn about techniques for building expression trees. -ms.date: 06/20/2016 -ms.technology: csharp-advanced-concepts -ms.assetid: 542754a9-7f40-4293-b299-b9f80241902c ---- - -# Building Expression Trees - -[Previous -- Interpreting Expressions](expression-trees-interpreting.md) - -All the expression trees you've seen so far have been created -by the C# compiler. All you had to do was create a lambda expression -that was assigned to a variable typed as an `Expression<Func<T>>` or -some similar type. That's not the only way to create an expression -tree. For many scenarios you may find that you need to build an -expression in memory at run time. - -Building Expression Trees is complicated by the fact that those -expression trees are immutable. Being immutable means that you must -build the tree from the leaves up to the root. The APIs you'll use to -build expression trees reflect this fact: The methods you'll use to -build a node take all its children as arguments. Let's walk through -a few examples to show you the techniques. - -## Creating Nodes - -Let's start relatively simply again. We'll use the addition -expression I've been working with throughout these sections: - -```csharp -Expression<Func<int>> sum = () => 1 + 2; -``` - -To construct that expression tree, you must construct the leaf nodes. -The leaf nodes are constants, so you can use the `Expression.Constant` -method to create the nodes: - -```csharp -var one = Expression.Constant(1, typeof(int)); -var two = Expression.Constant(2, typeof(int)); -``` - -Next, you'll build the addition expression: - -```csharp -var addition = Expression.Add(one, two); -``` - -Once you've got the addition expression, you can create the lambda -expression: - -```csharp -var lambda = Expression.Lambda(addition); -``` - -This is a very simple lambda expression, because it contains no arguments. -Later in this section, you'll see how to map arguments to parameters -and build more complicated expressions. - -For expressions that are as simple as this one, you may combine all the -calls into a single statement: - -```csharp -var lambda = Expression.Lambda( - Expression.Add( - Expression.Constant(1, typeof(int)), - Expression.Constant(2, typeof(int)) - ) -); -``` - -## Building a Tree - -That's the basics of building an expression tree in memory. More -complex trees generally mean more node types, and more nodes in the -tree. Let's run through one more example and show two more node types -that you will typically build when you create expression trees: -the argument nodes, and method call nodes. - -Let's build an expression tree to create this expression: - -```csharp -Expression<Func<double, double, double>> distanceCalc = - (x, y) => Math.Sqrt(x * x + y * y); -``` - -You'll start by creating parameter expressions for `x` and `y`: - -```csharp -var xParameter = Expression.Parameter(typeof(double), "x"); -var yParameter = Expression.Parameter(typeof(double), "y"); -``` - -Creating the multiplication and addition expressions follows the pattern -you've already seen: - -```csharp -var xSquared = Expression.Multiply(xParameter, xParameter); -var ySquared = Expression.Multiply(yParameter, yParameter); -var sum = Expression.Add(xSquared, ySquared); -``` - -Next, you need to create a method call expression for the call to -`Math.Sqrt`. - -```csharp -var sqrtMethod = typeof(Math).GetMethod("Sqrt", new[] { typeof(double) }); -var distance = Expression.Call(sqrtMethod, sum); -``` - -And then finally, you put the method call into a lambda expression, -and make sure to define the arguments to the lambda expression: - -```csharp -var distanceLambda = Expression.Lambda( - distance, - xParameter, - yParameter); -``` - -In this more complicated example, you see a couple more techniques that -you will often need to create expression trees. - -First, you need to create the objects that represent parameters or -local variables before you use them. Once you've created those objects, -you can use them in your expression tree wherever you need. - -Second, you need to use a subset of the Reflection APIs to create a `MethodInfo` object -so that you can create an expression tree to access that method. You must limit -yourself to the subset of the Reflection APIs that are available on the .NET Core platform. Again, -these techniques will extend to other expression trees. - -## Building Code In Depth - -You aren't limited in what you can build using these APIs. However, the more -complicated expression tree that you want to build, the more difficult -the code is to manage and to read. - -Let's build an expression tree that is the equivalent of this code: - -```csharp -Func<int, int> factorialFunc = (n) => -{ - var res = 1; - while (n > 1) - { - res = res * n; - n--; - } - return res; -}; -``` - -Notice above that I did not build the expression tree, but simply the delegate. Using -the `Expression` class, you can't build statement lambdas. Here's the code that is required -to build the same functionality. It's complicated by the fact that there isn't an API to build -a `while` loop, instead you need to build a loop that contains a conditional test, and a label -target to break out of the loop. - -```csharp -var nArgument = Expression.Parameter(typeof(int), "n"); -var result = Expression.Variable(typeof(int), "result"); - -// Creating a label that represents the return value -LabelTarget label = Expression.Label(typeof(int)); - -var initializeResult = Expression.Assign(result, Expression.Constant(1)); - -// This is the inner block that performs the multiplication, -// and decrements the value of 'n' -var block = Expression.Block( - Expression.Assign(result, - Expression.Multiply(result, nArgument)), - Expression.PostDecrementAssign(nArgument) -); - -// Creating a method body. -BlockExpression body = Expression.Block( - new[] { result }, - initializeResult, - Expression.Loop( - Expression.IfThenElse( - Expression.GreaterThan(nArgument, Expression.Constant(1)), - block, - Expression.Break(label, result) - ), - label - ) -); -``` - -The code to build the expression tree for the factorial function is quite a bit longer, -more complicated, and it's riddled with labels and break statements and other elements -we'd like to avoid in our everyday coding tasks. - -For this section, I've also updated the visitor code to visit every node in this expression tree and write out information about the nodes that are created in this sample. You can [view or download the sample code](https://github.com/dotnet/samples/tree/main/csharp/expression-trees) at the dotnet/docs GitHub repository. Experiment for yourself by building and running the samples. For download instructions, see [Samples and Tutorials](../samples-and-tutorials/index.md#view-and-download-samples). - -## Examining the APIs - -The expression tree APIs are some of the more difficult to navigate in -.NET Core, but that's fine. Their purpose is a rather complex undertaking: writing code that generates -code at run time. They are necessarily complicated to provide a balance between supporting -all the control structures available in the C# language and keeping the surface area -of the APIs as small as reasonable. This balance means that many control structures are -represented not by their C# constructs, but by constructs that represent the underlying -logic that the compiler generates from these higher level constructs. - -Also, at this time, there are C# expressions that cannot be built directly -using `Expression` class methods. In general, these will be the any operators -and expressions added in C# 5 and more recent versions. (For example, `async` expressions cannot be built, and -the new `?.` operator cannot be directly created.) - -[Next -- Translating Expressions](expression-trees-translating.md) diff --git a/docs/csharp/expression-trees-execution.md b/docs/csharp/expression-trees-execution.md deleted file mode 100644 index f2ae406d61c26..0000000000000 --- a/docs/csharp/expression-trees-execution.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -title: Executing Expression Trees -description: Learn about executing expression trees by converting them into executable Intermediate Language (IL) instructions. -ms.date: 06/20/2016 -ms.technology: csharp-advanced-concepts -ms.assetid: 109e0ac5-2a9c-48b4-ac68-9b6219cdbccf ---- - -# Executing Expression Trees - -[Previous -- Framework Types Supporting Expression Trees](expression-classes.md) - -An *expression tree* is a data structure that represents some code. -It is not compiled and executable code. If you want to execute -the .NET code that is represented by an expression tree, you must -convert it into executable IL instructions. - -## Lambda Expressions to Functions - -You can convert any LambdaExpression, or any type derived from -LambdaExpression into executable IL. Other expression types -cannot be directly converted into code. This restriction has -little effect in practice. Lambda expressions are the only -types of expressions that you would want to execute by converting -to executable intermediate language (IL). (Think about what it would mean -to directly execute a `ConstantExpression`. Would it mean -anything useful?) Any expression tree that is a `LambdaExpression`, -or a type derived from `LambdaExpression` can be converted to IL. -The expression type `Expression<TDelegate>` -is the only concrete example in the .NET Core libraries. It's used -to represent an expression that maps to any delegate type. Because -this type maps to a delegate type, .NET can examine -the expression, and generate IL for an appropriate delegate that -matches the signature of the lambda expression. - -In most cases, this creates a simple mapping between an expression, -and its corresponding delegate. For example, an expression tree that -is represented by `Expression<Func<int>>` would be converted to a delegate -of the type `Func<int>`. For a lambda expression with any return type -and argument list, there exists a delegate type that is the target type -for the executable code represented by that lambda expression. - -The `LambdaExpression` type contains `Compile` and `CompileToMethod` -members that you would use to convert an expression tree to executable -code. The `Compile` method creates a delegate. The `CompileToMethod` -method updates a `MethodBuilder` object with the IL that represents -the compiled output of the expression tree. Note that `CompileToMethod` -is only available in the full desktop framework, not in the .NET Core. - -Optionally, you can also provide a `DebugInfoGenerator` that will -receive the symbol debugging information for the generated delegate -object. This enables you to convert the expression tree into a -delegate object, and have full debugging information about the -generated delegate. - -You would convert an expression into a delegate using the following -code: - -```csharp -Expression<Func<int>> add = () => 1 + 2; -var func = add.Compile(); // Create Delegate -var answer = func(); // Invoke Delegate -Console.WriteLine(answer); -``` - -Notice that the delegate type is based on the expression type. You must -know the return type and the argument list if you want to use the -delegate object in a strongly typed manner. The `LambdaExpression.Compile()` -method returns the `Delegate` type. You will have to cast it to the correct -delegate type to have any compile-time tools check the argument list or -return type. - -## Execution and Lifetimes - -You execute the code by invoking the delegate created when -you called `LambdaExpression.Compile()`. You can see this above where -`add.Compile()` returns a delegate. Invoking that delegate, by calling -`func()` executes the code. - -That delegate represents the code in the expression tree. You can -retain the handle to that delegate and invoke it later. You don't need -to compile the expression tree each time you want to execute the code -it represents. (Remember that expression trees are immutable, and -compiling the same expression tree later will create a delegate that -executes the same code.) - -I will caution you against trying to create any more sophisticated -caching mechanisms to increase performance by avoiding unnecessary -compile calls. Comparing two arbitrary expression trees to determine -if they represent the same algorithm will also be time consuming to -execute. You'll likely -find that the compute time you save avoiding any extra calls to -`LambdaExpression.Compile()` will be more than consumed by the time executing -code that determines of two different expression trees result in -the same executable code. - -## Caveats - -Compiling a lambda expression to a delegate and invoking that delegate -is one of the simplest operations you can perform with an expression -tree. However, even with this simple operation, there are caveats -you must be aware of. - -Lambda Expressions create closures over any local variables that are -referenced in the expression. You must guarantee that any variables -that would be part of the delegate are usable at the location where -you call `Compile`, and when you execute the resulting delegate. - -In general, the compiler will ensure that this is true. However, -if your expression accesses a variable that implements `IDisposable`, -it's possible that your code might dispose of the object while it -is still held by the expression tree. - -For example, this code works fine, because `int` does not implement -`IDisposable`: - -```csharp -private static Func<int, int> CreateBoundFunc() -{ - var constant = 5; // constant is captured by the expression tree - Expression<Func<int, int>> expression = (b) => constant + b; - var rVal = expression.Compile(); - return rVal; -} -``` - -The delegate has captured a reference to the local variable `constant`. -That variable is accessed at any time later, when the function returned -by `CreateBoundFunc` executes. - -However, consider this (rather contrived) class that implements -`IDisposable`: - -```csharp -public class Resource : IDisposable -{ - private bool isDisposed = false; - public int Argument - { - get - { - if (!isDisposed) - return 5; - else throw new ObjectDisposedException("Resource"); - } - } - - public void Dispose() - { - isDisposed = true; - } -} -``` - -If you use it in an expression as shown below, you'll get an -`ObjectDisposedException` when you execute the code referenced -by the `Resource.Argument` property: - -```csharp -private static Func<int, int> CreateBoundResource() -{ - using (var constant = new Resource()) // constant is captured by the expression tree - { - Expression<Func<int, int>> expression = (b) => constant.Argument + b; - var rVal = expression.Compile(); - return rVal; - } -} -``` - -The delegate returned from this method has closed over the `constant` object, -which has been disposed of. (It's been disposed, because it was declared in a -`using` statement.) - -Now, when you execute the delegate returned from this method, you'll have an -`ObjectDisposedException` thrown at the point of execution. - -It does seem strange to have a runtime error representing a compile-time -construct, but that's the world we enter when we work with -expression trees. - -There are a lot of permutations of this problem, so it's hard -to offer general guidance to avoid it. Be careful about accessing -local variables when defining expressions, and be careful about -accessing state in the current object (represented by `this`) when -creating an expression tree that can be returned by a public API. - -The code in your expression may reference methods or properties in -other assemblies. That assembly must be accessible when the expression -is defined, and when it is compiled, and when the resulting delegate -is invoked. You'll be met with a `ReferencedAssemblyNotFoundException` -in cases where it is not present. - -## Summary - -Expression Trees that represent lambda expressions can be compiled -to create a delegate that you can execute. This provides one -mechanism to execute the code represented by an expression tree. - -The Expression Tree does represent the code that would execute for -any given construct you create. As long as the environment where -you compile and execute the code matches the environment where you -create the expression, everything works as expected. When that -doesn't happen, the errors are very predictable, and they will -be caught in your first tests of any code using the expression -trees. - -[Next -- Interpreting Expressions](expression-trees-interpreting.md) diff --git a/docs/csharp/expression-trees-explained.md b/docs/csharp/expression-trees-explained.md deleted file mode 100644 index 082b7634ec1e5..0000000000000 --- a/docs/csharp/expression-trees-explained.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Expression Trees Explained -description: Learn about expression trees and how they're useful in translating algorithms for external execution and inspecting code before executing it. -ms.date: 06/20/2016 -ms.technology: csharp-advanced-concepts -ms.assetid: bbcdd339-86eb-4ae5-9911-4c214a39a92d ---- - -# Expression Trees Explained - -[Previous -- Overview](expression-trees.md) - -An Expression Tree is a data structure that defines code. They are based on the same structures -that a compiler uses to analyze code and generate the compiled output. As you read through this -tutorial, you will notice quite a bit of similarity between Expression Trees and the types used -in the Roslyn APIs to build [Analyzers and CodeFixes](https://github.com/dotnet/roslyn-analyzers). -(Analyzers and CodeFixes are NuGet packages that perform static analysis on code and can suggest -potential fixes for a developer.) -The concepts are similar, and the end result -is a data structure that allows examination of the source code in a meaningful way. However, Expression -Trees are based on a totally different set of classes and APIs than the Roslyn APIs. - -Let's look at a simple example. -Here's a line of code: - -```csharp -var sum = 1 + 2; -``` - -If you were to analyze this as an expression tree, the tree contains several nodes. -The outermost node is a variable declaration statement with assignment (`var sum = 1 + 2;`) -That outermost node contains several child nodes: a variable declaration, an assignment operator, and an -expression representing the right hand side of the equals sign. That expression is further subdivided into -expressions that represent the addition operation, and left and right operands of the addition. - -Let's drill down a bit more into the expressions that make up the right side of the equals sign. -The expression is `1 + 2`. That's a binary expression. More specifically, it's a binary addition -expression. A binary addition expression has two children, representing the left and right nodes -of the addition expression. Here, both nodes are constant expressions: The left operand is the -value `1`, and the right operand is the value `2`. - -Visually, the entire statement is a tree: You could start at the root node, and travel to -each node in the tree to see the code that makes up the statement: - -- Variable declaration statement with assignment (`var sum = 1 + 2;`) - - Implicit variable type declaration (`var sum`) - - Implicit var keyword (`var`) - - Variable name declaration (`sum`) - - Assignment operator (`=`) - - Binary addition expression (`1 + 2`) - - Left operand (`1`) - - Addition operator (`+`) - - Right operand (`2`) - -This may look complicated, but it is very powerful. Following the same process, you can decompose -much more complicated expressions. Consider this expression: - -```csharp -var finalAnswer = this.SecretSauceFunction( - currentState.createInterimResult(), currentState.createSecondValue(1, 2), - decisionServer.considerFinalOptions("hello")) + - MoreSecretSauce('A', DateTime.Now, true); -``` - -The expression above is also a variable declaration with an assignment. -In this instance, the right hand side of the assignment is a much more complicated tree. -I'm not going to decompose this expression, but consider what the different nodes might -be. There are method calls using the current object as a receiver, one that has an explicit `this` -receiver, one that does not. There are method calls using other receiver objects, -there are constant arguments of different types. And finally, there is a binary -addition operator. Depending on the return type of `SecretSauceFunction()` or -`MoreSecretSauce()`, that binary addition operator may be a method call to an -overridden addition operator, resolving to a static method call to the binary -addition operator defined for a class. - -Despite this perceived complexity, the expression above creates a tree structure -that can be navigated as easily as the first sample. You can keep traversing -child nodes to find leaf nodes in the expression. Parent nodes will have -references to their children, and each node has a property that describes -what kind of node it is. - -The structure of an expression tree is very consistent. Once you've learned -the basics, you can understand even the most complex code when it is represented -as an expression tree. The elegance in -the data structure explains how the C# compiler can analyze the most complex -C# programs and create proper output from that complicated source code. - -Once you become familiar with the structure of expression trees, you will -find that knowledge you've gained quickly enables you to work with many -more and more advanced scenarios. There is incredible power to expression -trees. - -In addition to translating algorithms to execute in other environments, -expression trees can be used to make it easier to write algorithms that inspect -code before executing it. You can write a method whose arguments are expressions -and then examine those expressions before executing the code. The Expression Tree -is a full representation of the code: you can see values of any sub-expression. -You can see method and property names. You can see the value of any constant expressions. -You can also convert an expression tree into an executable delegate, and execute the -code. - -The APIs for Expression Trees enable you to create trees that represent almost any -valid code construct. However, to keep things as simple as possible, some C# idioms -cannot be created in an expression tree. One example is asynchronous expressions (using -the `async` and `await` keywords). If your needs require asynchronous algorithms, you would need -to manipulate the `Task` objects directly, rather than rely on the compiler support. Another -is in creating loops. Typically, you create these by using `for`, `foreach`, `while` or `do` -loops. As you'll see [later in this series](expression-trees-building.md), the APIs for -expression trees support a single loop expression, with `break` and `continue` expressions that -control repeating the loop. - -The one thing you can't do is modify an expression tree. Expression Trees are immutable -data structures. If you want to mutate (change) an expression tree, you must create a new tree -that is a copy of the original, but with your desired changes. - -[Next -- Framework Types Supporting Expression Trees](expression-classes.md) diff --git a/docs/csharp/expression-trees-interpreting.md b/docs/csharp/expression-trees-interpreting.md deleted file mode 100644 index 7ed21d12ef165..0000000000000 --- a/docs/csharp/expression-trees-interpreting.md +++ /dev/null @@ -1,597 +0,0 @@ ---- -title: Interpreting Expressions -description: Learn how to write code to examine the structure of an expression tree. -ms.date: 06/20/2016 -ms.technology: csharp-advanced-concepts - -ms.assetid: adf73dde-1e52-4df3-9929-2e0670e28e16 ---- - -# Interpreting Expressions - -[Previous -- Executing Expressions](expression-trees-execution.md) - -Now, let's write some code to examine the structure of an -*expression tree*. Every node in an expression tree will be -an object of a class that is derived from `Expression`. - -That design makes visiting all the nodes in an expression tree -a relatively straight forward recursive operation. The general strategy -is to start at the root node and determine what kind of node it is. - -If the node type has children, recursively visit the children. At each -child node, repeat the process used at the root node: determine the -type, and if the type has children, visit each of the children. - -## Examining an Expression with No Children - -Let's start by visiting each node in a simple expression tree. -Here's the code that creates a constant expression and then -examines its properties: - -```csharp -var constant = Expression.Constant(24, typeof(int)); - -Console.WriteLine($"This is a/an {constant.NodeType} expression type"); -Console.WriteLine($"The type of the constant value is {constant.Type}"); -Console.WriteLine($"The value of the constant value is {constant.Value}"); -``` - -This will print the following: - -```output -This is an Constant expression type -The type of the constant value is System.Int32 -The value of the constant value is 24 -``` - -Now, let's write the code that would examine this expression and write -out some important properties about it. Here's that code: - -## Examining a simple Addition Expression - -Let's start with the addition sample from the -introduction to this section. - -```csharp -Expression<Func<int>> sum = () => 1 + 2; -``` - -> I'm not using `var` to declare this expression tree, as it is not possible -> because the right-hand side of the assignment is implicitly typed. - -The root node is a `LambdaExpression`. In order to get the interesting -code on the right-hand side of the `=>` operator, you need to find one -of the children of the `LambdaExpression`. We'll do that with all the -expressions in this section. The parent node does help us find the return -type of the `LambdaExpression`. - -To examine each node in this expression, we'll need to recursively -visit a number of nodes. Here's a simple first implementation: - -```csharp -Expression<Func<int, int, int>> addition = (a, b) => a + b; - -Console.WriteLine($"This expression is a {addition.NodeType} expression type"); -Console.WriteLine($"The name of the lambda is {((addition.Name == null) ? "<null>" : addition.Name)}"); -Console.WriteLine($"The return type is {addition.ReturnType.ToString()}"); -Console.WriteLine($"The expression has {addition.Parameters.Count} arguments. They are:"); -foreach(var argumentExpression in addition.Parameters) -{ - Console.WriteLine($"\tParameter Type: {argumentExpression.Type.ToString()}, Name: {argumentExpression.Name}"); -} - -var additionBody = (BinaryExpression)addition.Body; -Console.WriteLine($"The body is a {additionBody.NodeType} expression"); -Console.WriteLine($"The left side is a {additionBody.Left.NodeType} expression"); -var left = (ParameterExpression)additionBody.Left; -Console.WriteLine($"\tParameter Type: {left.Type.ToString()}, Name: {left.Name}"); -Console.WriteLine($"The right side is a {additionBody.Right.NodeType} expression"); -var right= (ParameterExpression)additionBody.Right; -Console.WriteLine($"\tParameter Type: {right.Type.ToString()}, Name: {right.Name}"); -``` - -This sample prints the following output: - -```output -This expression is a/an Lambda expression type -The name of the lambda is <null> -The return type is System.Int32 -The expression has 2 arguments. They are: - Parameter Type: System.Int32, Name: a - Parameter Type: System.Int32, Name: b -The body is a/an Add expression -The left side is a Parameter expression - Parameter Type: System.Int32, Name: a -The right side is a Parameter expression - Parameter Type: System.Int32, Name: b -``` - -You'll notice a lot of repetition in the code sample above. -Let's clean that up and build a more general purpose expression -node visitor. That's going to require us to write a recursive -algorithm. Any node could be of a type that might have children. -Any node that has children requires us to visit those children -and determine what that node is. Here's the cleaned up version -that utilizes recursion to visit the addition operations: - -```csharp -// Base Visitor class: -public abstract class Visitor -{ - private readonly Expression node; - - protected Visitor(Expression node) - { - this.node = node; - } - - public abstract void Visit(string prefix); - - public ExpressionType NodeType => this.node.NodeType; - public static Visitor CreateFromExpression(Expression node) - { - switch(node.NodeType) - { - case ExpressionType.Constant: - return new ConstantVisitor((ConstantExpression)node); - case ExpressionType.Lambda: - return new LambdaVisitor((LambdaExpression)node); - case ExpressionType.Parameter: - return new ParameterVisitor((ParameterExpression)node); - case ExpressionType.Add: - return new BinaryVisitor((BinaryExpression)node); - default: - Console.Error.WriteLine($"Node not processed yet: {node.NodeType}"); - return default(Visitor); - } - } -} - -// Lambda Visitor -public class LambdaVisitor : Visitor -{ - private readonly LambdaExpression node; - public LambdaVisitor(LambdaExpression node) : base(node) - { - this.node = node; - } - - public override void Visit(string prefix) - { - Console.WriteLine($"{prefix}This expression is a {NodeType} expression type"); - Console.WriteLine($"{prefix}The name of the lambda is {((node.Name == null) ? "<null>" : node.Name)}"); - Console.WriteLine($"{prefix}The return type is {node.ReturnType.ToString()}"); - Console.WriteLine($"{prefix}The expression has {node.Parameters.Count} argument(s). They are:"); - // Visit each parameter: - foreach (var argumentExpression in node.Parameters) - { - var argumentVisitor = Visitor.CreateFromExpression(argumentExpression); - argumentVisitor.Visit(prefix + "\t"); - } - Console.WriteLine($"{prefix}The expression body is:"); - // Visit the body: - var bodyVisitor = Visitor.CreateFromExpression(node.Body); - bodyVisitor.Visit(prefix + "\t"); - } -} - -// Binary Expression Visitor: -public class BinaryVisitor : Visitor -{ - private readonly BinaryExpression node; - public BinaryVisitor(BinaryExpression node) : base(node) - { - this.node = node; - } - - public override void Visit(string prefix) - { - Console.WriteLine($"{prefix}This binary expression is a {NodeType} expression"); - var left = Visitor.CreateFromExpression(node.Left); - Console.WriteLine($"{prefix}The Left argument is:"); - left.Visit(prefix + "\t"); - var right = Visitor.CreateFromExpression(node.Right); - Console.WriteLine($"{prefix}The Right argument is:"); - right.Visit(prefix + "\t"); - } -} - -// Parameter visitor: -public class ParameterVisitor : Visitor -{ - private readonly ParameterExpression node; - public ParameterVisitor(ParameterExpression node) : base(node) - { - this.node = node; - } - - public override void Visit(string prefix) - { - Console.WriteLine($"{prefix}This is an {NodeType} expression type"); - Console.WriteLine($"{prefix}Type: {node.Type.ToString()}, Name: {node.Name}, ByRef: {node.IsByRef}"); - } -} - -// Constant visitor: -public class ConstantVisitor : Visitor -{ - private readonly ConstantExpression node; - public ConstantVisitor(ConstantExpression node) : base(node) - { - this.node = node; - } - - public override void Visit(string prefix) - { - Console.WriteLine($"{prefix}This is an {NodeType} expression type"); - Console.WriteLine($"{prefix}The type of the constant value is {node.Type}"); - Console.WriteLine($"{prefix}The value of the constant value is {node.Value}"); - } -} -``` - -This algorithm is the basis of an algorithm that can visit -any arbitrary `LambdaExpression`. There are many holes, -namely that the code I created only looks for a very small -sample of the possible sets of expression tree nodes that -it may encounter. However, you can still learn quite a bit -from what it produces. (The default case in the `Visitor.CreateFromExpression` -method prints a message to the error console when a new node type -is encountered. That way, you know to add a new expression type.) - -When you run this visitor on the addition expression shown above, you get the -following output: - -```output -This expression is a/an Lambda expression type -The name of the lambda is <null> -The return type is System.Int32 -The expression has 2 argument(s). They are: - This is an Parameter expression type - Type: System.Int32, Name: a, ByRef: False - This is an Parameter expression type - Type: System.Int32, Name: b, ByRef: False -The expression body is: - This binary expression is a Add expression - The Left argument is: - This is an Parameter expression type - Type: System.Int32, Name: a, ByRef: False - The Right argument is: - This is an Parameter expression type - Type: System.Int32, Name: b, ByRef: False -``` - -Now that you've built a more general visitor implementation, you -can visit and process many more different types of expressions. - -## Examining an Addition Expression with Many Levels - -Let's try a more complicated example, -yet still limit the node types to addition only: - -```csharp -Expression<Func<int>> sum = () => 1 + 2 + 3 + 4; -``` - -Before you run this on the visitor algorithm, try a thought -exercise to work out what the output might be. Remember that -the `+` operator is a *binary operator*: it must have two -children, representing the left and right operands. There -are several possible ways to construct a tree that -could be correct: - -```csharp -Expression<Func<int>> sum1 = () => 1 + (2 + (3 + 4)); -Expression<Func<int>> sum2 = () => ((1 + 2) + 3) + 4; - -Expression<Func<int>> sum3 = () => (1 + 2) + (3 + 4); -Expression<Func<int>> sum4 = () => 1 + ((2 + 3) + 4); -Expression<Func<int>> sum5 = () => (1 + (2 + 3)) + 4; -``` - -You can see the separation into two possible answers to highlight the -most promising. The first represents *right associative* -expressions. The second represent *left associative* expressions. -The advantage of both of those two formats is that the format scales -to any arbitrary number of addition expressions. - -If you do run this expression through the visitor, you will see this output, verifying that the simple addition expression is -*left associative*. - -In order to run this sample, and see the full expression tree, I had to -make one change to the source expression tree. When the expression tree -contains all constants, the resulting tree simply contains the constant -value of `10`. The compiler performs all the addition and reduces the -expression to its simplest form. Simply adding one variable in the expression -is sufficient to see the original tree: - -```csharp -Expression<Func<int, int>> sum = (a) => 1 + a + 3 + 4; -``` - -Create a visitor for this sum and run the visitor you'll see this output: - -```output -This expression is a/an Lambda expression type -The name of the lambda is <null> -The return type is System.Int32 -The expression has 1 argument(s). They are: - This is an Parameter expression type - Type: System.Int32, Name: a, ByRef: False -The expression body is: - This binary expression is a Add expression - The Left argument is: - This binary expression is a Add expression - The Left argument is: - This binary expression is a Add expression - The Left argument is: - This is an Constant expression type - The type of the constant value is System.Int32 - The value of the constant value is 1 - The Right argument is: - This is an Parameter expression type - Type: System.Int32, Name: a, ByRef: False - The Right argument is: - This is an Constant expression type - The type of the constant value is System.Int32 - The value of the constant value is 3 - The Right argument is: - This is an Constant expression type - The type of the constant value is System.Int32 - The value of the constant value is 4 -``` - -You can also run any of the other samples through the visitor code -and see what tree it represents. Here's an example of the `sum3` -expression above (with an additional parameter to prevent the compiler from -computing the constant): - -```csharp -Expression<Func<int, int, int>> sum3 = (a, b) => (1 + a) + (3 + b); -``` - -Here's the output from the visitor: - -```output -This expression is a/an Lambda expression type -The name of the lambda is <null> -The return type is System.Int32 -The expression has 2 argument(s). They are: - This is an Parameter expression type - Type: System.Int32, Name: a, ByRef: False - This is an Parameter expression type - Type: System.Int32, Name: b, ByRef: False -The expression body is: - This binary expression is a Add expression - The Left argument is: - This binary expression is a Add expression - The Left argument is: - This is an Constant expression type - The type of the constant value is System.Int32 - The value of the constant value is 1 - The Right argument is: - This is an Parameter expression type - Type: System.Int32, Name: a, ByRef: False - The Right argument is: - This binary expression is a Add expression - The Left argument is: - This is an Constant expression type - The type of the constant value is System.Int32 - The value of the constant value is 3 - The Right argument is: - This is an Parameter expression type - Type: System.Int32, Name: b, ByRef: False -``` - -Notice that the parentheses are not part of the output. There are no -nodes in the expression tree that represent the parentheses in the -input expression. The structure of the expression tree contains all the -information necessary to communicate the precedence. - -## Extending from this sample - -The sample deals with only the most rudimentary expression trees. The code -you've seen in this section only handles constant integers and the binary -`+` operator. As a final sample, let's update the visitor to handle a more -complicated expression. Let's make it work for this: - -```csharp -Expression<Func<int, int>> factorial = (n) => - n == 0 ? - 1 : - Enumerable.Range(1, n).Aggregate((product, factor) => product * factor); -``` - -This code represents one possible implementation for the -mathematical *factorial* function. The way I've written this code highlights -two limitations of building expression trees by assigning lambda expressions -to Expressions. First, statement lambdas are not allowed. That means I can't use -loops, blocks, if / else statements, and other control structures common in C#. I'm -limited to using expressions. Second, I can't recursively call the same expression. -I could if it were already a delegate, but I can't call it in its expression tree -form. In the section on [building expression trees](expression-trees-building.md), -you'll learn techniques to overcome these limitations. - -In this expression, you'll encounter nodes of all these types: - -1. Equal (binary expression) -2. Multiply (binary expression) -3. Conditional (the ? : expression) -4. Method Call Expression (calling `Range()` and `Aggregate()`) - -One way to modify the visitor algorithm is to keep executing it, and write -the node type every time you reach your `default` clause. After a few -iterations, you'll have seen each of the potential nodes. Then, you have -all you need. The result would be something like this: - -```csharp -public static Visitor CreateFromExpression(Expression node) -{ - switch(node.NodeType) - { - case ExpressionType.Constant: - return new ConstantVisitor((ConstantExpression)node); - case ExpressionType.Lambda: - return new LambdaVisitor((LambdaExpression)node); - case ExpressionType.Parameter: - return new ParameterVisitor((ParameterExpression)node); - case ExpressionType.Add: - case ExpressionType.Equal: - case ExpressionType.Multiply: - return new BinaryVisitor((BinaryExpression)node); - case ExpressionType.Conditional: - return new ConditionalVisitor((ConditionalExpression)node); - case ExpressionType.Call: - return new MethodCallVisitor((MethodCallExpression)node); - default: - Console.Error.WriteLine($"Node not processed yet: {node.NodeType}"); - return default(Visitor); - } -} -``` - -The ConditionalVisitor and MethodCallVisitor process those two nodes: - -```csharp -public class ConditionalVisitor : Visitor -{ - private readonly ConditionalExpression node; - public ConditionalVisitor(ConditionalExpression node) : base(node) - { - this.node = node; - } - - public override void Visit(string prefix) - { - Console.WriteLine($"{prefix}This expression is a {NodeType} expression"); - var testVisitor = Visitor.CreateFromExpression(node.Test); - Console.WriteLine($"{prefix}The Test for this expression is:"); - testVisitor.Visit(prefix + "\t"); - var trueVisitor = Visitor.CreateFromExpression(node.IfTrue); - Console.WriteLine($"{prefix}The True clause for this expression is:"); - trueVisitor.Visit(prefix + "\t"); - var falseVisitor = Visitor.CreateFromExpression(node.IfFalse); - Console.WriteLine($"{prefix}The False clause for this expression is:"); - falseVisitor.Visit(prefix + "\t"); - } -} - -public class MethodCallVisitor : Visitor -{ - private readonly MethodCallExpression node; - public MethodCallVisitor(MethodCallExpression node) : base(node) - { - this.node = node; - } - - public override void Visit(string prefix) - { - Console.WriteLine($"{prefix}This expression is a {NodeType} expression"); - if (node.Object == null) - Console.WriteLine($"{prefix}This is a static method call"); - else - { - Console.WriteLine($"{prefix}The receiver (this) is:"); - var receiverVisitor = Visitor.CreateFromExpression(node.Object); - receiverVisitor.Visit(prefix + "\t"); - } - - var methodInfo = node.Method; - Console.WriteLine($"{prefix}The method name is {methodInfo.DeclaringType}.{methodInfo.Name}"); - // There is more here, like generic arguments, and so on. - Console.WriteLine($"{prefix}The Arguments are:"); - foreach(var arg in node.Arguments) - { - var argVisitor = Visitor.CreateFromExpression(arg); - argVisitor.Visit(prefix + "\t"); - } - } -} -``` - -And the output for the expression tree would be: - -```output -This expression is a/an Lambda expression type -The name of the lambda is <null> -The return type is System.Int32 -The expression has 1 argument(s). They are: - This is an Parameter expression type - Type: System.Int32, Name: n, ByRef: False -The expression body is: - This expression is a Conditional expression - The Test for this expression is: - This binary expression is a Equal expression - The Left argument is: - This is an Parameter expression type - Type: System.Int32, Name: n, ByRef: False - The Right argument is: - This is an Constant expression type - The type of the constant value is System.Int32 - The value of the constant value is 0 - The True clause for this expression is: - This is an Constant expression type - The type of the constant value is System.Int32 - The value of the constant value is 1 - The False clause for this expression is: - This expression is a Call expression - This is a static method call - The method name is System.Linq.Enumerable.Aggregate - The Arguments are: - This expression is a Call expression - This is a static method call - The method name is System.Linq.Enumerable.Range - The Arguments are: - This is an Constant expression type - The type of the constant value is System.Int32 - The value of the constant value is 1 - This is an Parameter expression type - Type: System.Int32, Name: n, ByRef: False - This expression is a Lambda expression type - The name of the lambda is <null> - The return type is System.Int32 - The expression has 2 arguments. They are: - This is an Parameter expression type - Type: System.Int32, Name: product, ByRef: False - This is an Parameter expression type - Type: System.Int32, Name: factor, ByRef: False - The expression body is: - This binary expression is a Multiply expression - The Left argument is: - This is an Parameter expression type - Type: System.Int32, Name: product, ByRef: False - The Right argument is: - This is an Parameter expression type - Type: System.Int32, Name: factor, ByRef: False -``` - -## Extending the Sample Library - -The samples in this section show the core techniques to visit and -examine nodes in an expression tree. I glossed over many actions -you might need in order to concentrate on the core tasks of -visiting and accessing nodes in an expression tree. - -First, the visitors only handle constants -that are integers. Constant values could be any other numeric type, -and the C# language supports conversions and promotions between those -types. A more robust version of this code would mirror all those -capabilities. - -Even the last example recognizes a subset of the possible node types. -You can still feed it many expressions that will cause it to fail. -A full implementation is included in .NET Standard -under the name <xref:System.Linq.Expressions.ExpressionVisitor> -and can handle all the possible node types. - -Finally, the library I used in this article was built for demonstration -and learning. It's not optimized. I wrote it to make the structures -used clear, and to highlight the techniques used to visit -the nodes and analyze what's there. A production implementation would -pay more attention to performance than I have. - -Even with those limitations, you should be well on your way to writing -algorithms that read and understand expression trees. - -[Next -- Building Expressions](expression-trees-building.md) diff --git a/docs/csharp/expression-trees-summary.md b/docs/csharp/expression-trees-summary.md deleted file mode 100644 index 543ebca18df2e..0000000000000 --- a/docs/csharp/expression-trees-summary.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Expression Trees Summary -description: Recaps how you can use expression trees to create dynamic programs that interpret code as data and build new functionality based on that code. -ms.date: 06/20/2016 -ms.technology: csharp-advanced-concepts -ms.assetid: eb687ebd-1149-4453-9fc1-12a084495a66 ---- - -# Expression Trees Summary - -[Previous -- Translating Expressions](expression-trees-translating.md) - -In this series, you've seen how you can use *expression trees* to -create dynamic programs that interpret code as data and build -new functionality based on that code. - -You can examine expression trees to understand the intent of -an algorithm. Not only can you examine the code, but you can build new -expression trees that represent modified versions of the original code. - -You can also use expression trees to look at an algorithm and -translate that algorithm into another language or environment. - -## Limitations - -There are some newer C# language elements that don't translate -well into expression trees. Expression trees can't contain -`await` expressions, or `async` lambda expressions. Many of the -features added in C# 6 and later don't appear exactly as written -in expression trees. Instead, newer features will be exposed -in expressions trees in the equivalent, earlier syntax. This -may not be as much of a limitation as you might think. In fact, -it means that your code that interprets expression trees will likely -still work the same when new language features are introduced. - -Even with these limitations, expression trees do enable you to -create dynamic algorithms that rely on interpreting and modifying -code that is represented as a data structure. It's a powerful -tool, and it's one of the features of the .NET ecosystem that -enables rich libraries such as Entity Framework to accomplish -what they do. diff --git a/docs/csharp/expression-trees-translating.md b/docs/csharp/expression-trees-translating.md deleted file mode 100644 index e0323744c576d..0000000000000 --- a/docs/csharp/expression-trees-translating.md +++ /dev/null @@ -1,251 +0,0 @@ ---- -title: Translating Expression Trees -description: Learn how to visit each node in an expression tree while building a modified copy of that expression tree. -ms.date: 06/20/2016 -ms.technology: csharp-advanced-concepts -ms.assetid: b453c591-acc6-4e08-8175-97e5bc65958e ---- - -# Translate expression trees - -[Previous -- Building Expressions](expression-trees-building.md) - -In this final section, you'll learn how to visit each node -in an expression tree while building a modified copy of that -expression tree. These are the techniques that you will use in two -important scenarios. The first is to understand the algorithms -expressed by an expression tree so that it can be translated -into another environment. The second is when you want to change -the algorithm that has been created. This might be to add logging, -intercept method calls and track them, or other purposes. - -## Translating is Visiting - -The code you build to translate an expression tree is an extension -of what you've already seen to visit all the nodes in a tree. When -you translate an expression tree, you visit all the nodes, and while -visiting them, build the new tree. The new tree may contain references -to the original nodes, or new nodes that you have placed in the tree. - -Let's see this in action by visiting an expression tree, and -creating a new tree with some replacement nodes. In this example, -let's replace any constant with a constant that is ten times larger. -Otherwise, we'll leave the expression tree intact. Rather than -reading the value of the constant, and replacing it with a new -constant, we'll make this replacement by replacing the constant -node with a new node that performs the multiplication. - -Here, once you find a constant node, you create a new multiplication -node whose children are the original constant, and the constant -`10`: - -```csharp -private static Expression ReplaceNodes(Expression original) -{ - if (original.NodeType == ExpressionType.Constant) - { - return Expression.Multiply(original, Expression.Constant(10)); - } - else if (original.NodeType == ExpressionType.Add) - { - var binaryExpression = (BinaryExpression)original; - return Expression.Add( - ReplaceNodes(binaryExpression.Left), - ReplaceNodes(binaryExpression.Right)); - } - return original; -} -``` - -By replacing the original node with the substitute, a new tree -is formed that contains our modifications. We can verify that by -compiling and executing the replaced tree. - -```csharp -var one = Expression.Constant(1, typeof(int)); -var two = Expression.Constant(2, typeof(int)); -var addition = Expression.Add(one, two); -var sum = ReplaceNodes(addition); -var executableFunc = Expression.Lambda(sum); - -var func = (Func<int>)executableFunc.Compile(); -var answer = func(); -Console.WriteLine(answer); -``` - -Building a new tree is a combination of visiting the nodes in -the existing tree, and creating new nodes and inserting them -into the tree. - -This example shows the importance of expression trees being -immutable. Notice that the new tree created above contains a -mixture of newly created nodes, and nodes from the existing -tree. That's safe, because the nodes in the existing tree cannot be -modified. This can result in significant memory efficiencies. -The same nodes can be used throughout a tree, or in multiple -expression trees. Since nodes can't be modified, the -same node can be reused whenever it's needed. - -## Traversing and Executing an Addition - -Let's verify this by building a second visitor that walks the tree -of addition nodes and computes the result. You can do this by -making a couple modifications to the visitor that you've seen so -far. In this new version, the visitor will return the partial sum -of the addition operation up to this point. For a constant expression, -that is simply the value of the constant expression. For an addition -expression, the result is the sum of the left and right operands, once -those trees have been traversed. - -```csharp -var one = Expression.Constant(1, typeof(int)); -var two = Expression.Constant(2, typeof(int)); -var three= Expression.Constant(3, typeof(int)); -var four = Expression.Constant(4, typeof(int)); -var addition = Expression.Add(one, two); -var add2 = Expression.Add(three, four); -var sum = Expression.Add(addition, add2); - -// Declare the delegate, so we can call it -// from itself recursively: -Func<Expression, int> aggregate = null; -// Aggregate, return constants, or the sum of the left and right operand. -// Major simplification: Assume every binary expression is an addition. -aggregate = (exp) => - exp.NodeType == ExpressionType.Constant ? - (int)((ConstantExpression)exp).Value : - aggregate(((BinaryExpression)exp).Left) + aggregate(((BinaryExpression)exp).Right); - -var theSum = aggregate(sum); -Console.WriteLine(theSum); -``` - -There's quite a bit of code here, but the concepts are very approachable. -This code visits children in a depth first search. When it encounters a -constant node, the visitor returns the value of the constant. After the -visitor has visited both children, those children will have computed the sum -computed for that subtree. The addition node can now compute its sum. -Once all the nodes in the expression tree have been visited, the sum -will have been computed. You can trace the execution by running the sample -in the debugger and tracing the execution. - -Let's make it easier to trace how the nodes are analyzed and how the sum -is computed by traversing the tree. Here's an updated version of the -Aggregate method that includes quite a bit of tracing information: - -```csharp -private static int Aggregate(Expression exp) -{ - if (exp.NodeType == ExpressionType.Constant) - { - var constantExp = (ConstantExpression)exp; - Console.Error.WriteLine($"Found Constant: {constantExp.Value}"); - return (int)constantExp.Value; - } - else if (exp.NodeType == ExpressionType.Add) - { - var addExp = (BinaryExpression)exp; - Console.Error.WriteLine("Found Addition Expression"); - Console.Error.WriteLine("Computing Left node"); - var leftOperand = Aggregate(addExp.Left); - Console.Error.WriteLine($"Left is: {leftOperand}"); - Console.Error.WriteLine("Computing Right node"); - var rightOperand = Aggregate(addExp.Right); - Console.Error.WriteLine($"Right is: {rightOperand}"); - var sum = leftOperand + rightOperand; - Console.Error.WriteLine($"Computed sum: {sum}"); - return sum; - } - else throw new NotSupportedException("Haven't written this yet"); -} -``` - -Running it on the same expression yields the following output: - -```output -10 -Found Addition Expression -Computing Left node -Found Addition Expression -Computing Left node -Found Constant: 1 -Left is: 1 -Computing Right node -Found Constant: 2 -Right is: 2 -Computed sum: 3 -Left is: 3 -Computing Right node -Found Addition Expression -Computing Left node -Found Constant: 3 -Left is: 3 -Computing Right node -Found Constant: 4 -Right is: 4 -Computed sum: 7 -Right is: 7 -Computed sum: 10 -10 -``` - -Trace the output and follow along in the code above. You should be able -to work out how the code visits each node and computes the sum as it goes -through the tree and finds the sum. - -Now, let's look at a different run, with the expression given by `sum1`: - -```csharp -Expression<Func<int> sum1 = () => 1 + (2 + (3 + 4)); -``` - -Here's the output from examining this expression: - -```output -Found Addition Expression -Computing Left node -Found Constant: 1 -Left is: 1 -Computing Right node -Found Addition Expression -Computing Left node -Found Constant: 2 -Left is: 2 -Computing Right node -Found Addition Expression -Computing Left node -Found Constant: 3 -Left is: 3 -Computing Right node -Found Constant: 4 -Right is: 4 -Computed sum: 7 -Right is: 7 -Computed sum: 9 -Right is: 9 -Computed sum: 10 -10 -``` - -While the final answer is the same, the tree traversal is completely -different. The nodes are traveled in a different order, because the -tree was constructed with different operations occurring first. - -## Learning More - -This sample shows a small subset of the code you would build to traverse -and interpret the algorithms represented by an expression tree. For a complete -discussion of all the work necessary to build a general purpose library that -translates expression trees into another language, please read -[this series](/archive/blogs/mattwar/linq-building-an-iqueryable-provider-series) -by Matt Warren. It goes into great detail on how to translate any of the code -you might find in an expression tree. - -I hope you've now seen the true power of expression trees. -You can examine a set of code, make any changes you'd like to -that code, and execute the changed version. Because the -expression trees are immutable, you can create new trees by -using the components of existing trees. This minimizes the -amount of memory needed to create modified expression trees. - -[Next -- Summing up](expression-trees-summary.md) diff --git a/docs/csharp/expression-trees.md b/docs/csharp/expression-trees.md deleted file mode 100644 index 6edbdd9fdfee5..0000000000000 --- a/docs/csharp/expression-trees.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Expression Trees -description: Learn about expression trees in .NET Core and how to use them to represent code as structures that you can examine, modify, and execute. -ms.date: 06/20/2016 -ms.technology: csharp-advanced-concepts -ms.assetid: aceb4719-0d5a-4b19-b01f-b51063bcc54f ---- - -# Expression Trees - -If you have used LINQ, you have experience with a rich library -where the `Func` types are part of the API set. (If you are not familiar -with LINQ, you probably want to read [the LINQ tutorial](linq/index.md) and -the article about [lambda expressions](language-reference/operators/lambda-expressions.md) before this one.) -*Expression Trees* provide richer interaction with the arguments that -are functions. - -You write function arguments, typically using Lambda Expressions, when -you create LINQ queries. In a typical LINQ query, those function arguments are -transformed into a delegate the compiler creates. - -When you want to have a richer interaction, you need to use *Expression Trees*. -Expression Trees represent code as a structure that you can examine, -modify, or execute. These tools give you the power to manipulate code during -run time. You can write code that examines running algorithms, or injects new -capabilities. In more advanced scenarios, you can modify running algorithms, -and even translate C# expressions into another form for execution in another -environment. - -You've likely already written code that uses Expression Trees. Entity Framework's -LINQ APIs accept Expression Trees as the arguments for the LINQ Query Expression Pattern. -That enables [Entity Framework](/ef/) to translate the query you wrote in C# into SQL -that executes in the database engine. Another example is [Moq](https://github.com/Moq/moq), -which is a popular mocking framework for .NET. - -The remaining sections of this tutorial will explore what Expression Trees are, -examine the framework classes that support expression trees, and show you how to work -with expression trees. You'll learn how to read expression trees, how to create -expression trees, how to create modified expression trees, and how to execute the -code represented by expression trees. After reading, you will be ready to use these -structures to create rich adaptive algorithms. - -1. [Expression Trees Explained](expression-trees-explained.md) - - Understand the structure and concepts behind *Expression Trees*. - -2. [Framework Types Supporting Expression Trees](expression-classes.md) - - Learn about the structures and classes that define and manipulate expression trees. - -3. [Executing Expressions](expression-trees-execution.md) - - Learn how to convert an expression tree represented as a Lambda Expression into a delegate and execute the resulting delegate. - -4. [Interpreting Expressions](expression-trees-interpreting.md) - - Learn how to traverse and examine *expression trees* to understand what code the expression tree represents. - -5. [Building Expressions](expression-trees-building.md) - - Learn how to construct the nodes for an expression tree and build expression trees. - -6. [Translating Expressions](expression-trees-translating.md) - - Learn how to build a modified copy of an expression tree, or translate an expression tree into a different format. - -7. [Summing up](expression-trees-summary.md) - - Review the information on expression trees. diff --git a/docs/csharp/fundamentals/coding-style/coding-conventions.md b/docs/csharp/fundamentals/coding-style/coding-conventions.md index 35f62d97b5c43..16db4b5a3ad27 100644 --- a/docs/csharp/fundamentals/coding-style/coding-conventions.md +++ b/docs/csharp/fundamentals/coding-style/coding-conventions.md @@ -153,6 +153,89 @@ Good layout uses formatting to emphasize the structure of your code and to make - Use parentheses to make clauses in an expression apparent, as shown in the following code. :::code language="csharp" source="./snippets/coding-conventions/program.cs" id="Snippet2"::: + +## Place the using directives outside the namespace declaration + +When a `using` directive is outside a namespace declaration, that imported namespace is its fully qualified name. That's more clear. When the `using` directive is inside the namespace, it could be either relative to that namespace or it's fully qualified name. That's ambiguous. + +```csharp +using Azure; + +namespace CoolStuff.AwesomeFeature +{ + public class Awesome + { + public void Stuff() + { + WaitUntil wait = WaitUntil.Completed; + … + } + } +} +``` + +Assuming there is a reference (direct, or indirect) to the <xref:Azure.WaitUntil> class. + +Now, let's change it slightly: + +```csharp +namespace CoolStuff.AwesomeFeature +{ + using Azure; + + public class Awesome + { + public void Stuff() + { + WaitUntil wait = WaitUntil.Completed; + … + } + } +} +``` + +And it compiles today. And tomorrow. But then sometime next week this (untouched) code fails with two errors: + +```console +- error CS0246: The type or namespace name 'WaitUntil' could not be found (are you missing a using directive or an assembly reference?) +- error CS0103: The name 'WaitUntil' does not exist in the current context +``` + +One of the dependencies has introduced this class in a namespace then ends with `.Azure`: + +```csharp +namespace CoolStuff.Azure +{ + public class SecretsManagement + { + public string FetchFromKeyVault(string vaultId, string secretId) { return null; } + } +} +``` + +A `using` directive placed inside a namespace is context-sensitive and complicates name resolution. In this example, it's the first namespace that it finds. + +- `CoolStuff.AwesomeFeature.Azure` +- `CoolStuff.Azure` +- `Azure` + +Adding a new namespace that matches either `CoolStuff.Azure` or `CoolStuff.AwesomeFeature.Azure` would match before the global `Azure` namespace. You could resolve it by adding the `global::` modifier to the `using` declaration. However, it's easier to place `using` declarations outside the namespace instead. + +```csharp +namespace CoolStuff.AwesomeFeature +{ + using global::Azure; + + public class Awesome + { + public void Stuff() + { + WaitUntil wait = WaitUntil.Completed; + … + } + } +} +``` ## Commenting conventions @@ -194,7 +277,7 @@ The following sections describe practices that the C# team follows to prepare co :::code language="csharp" source="./snippets/coding-conventions/program.cs" id="Snippet10"::: -- Avoid the use of `var` in place of [dynamic](../../language-reference/builtin-types/reference-types.md). Use `dynamic` when you want run-time type inference. For more information, see [Using type dynamic (C# Programming Guide)](../../programming-guide/types/using-type-dynamic.md). +- Avoid the use of `var` in place of [dynamic](../../language-reference/builtin-types/reference-types.md). Use `dynamic` when you want run-time type inference. For more information, see [Using type dynamic (C# Programming Guide)](../../advanced-topics/interop/using-type-dynamic.md). - Use implicit typing to determine the type of the loop variable in [`for`](../../language-reference/statements/iteration-statements.md#the-for-statement) loops. @@ -253,7 +336,7 @@ The following declaration uses the full syntax. :::code language="csharp" source="./snippets/coding-conventions/program.cs" id="Snippet16"::: -- Simplify your code by using the C# [using statement](../../language-reference/keywords/using-statement.md). If you have a [try-finally](../../language-reference/keywords/try-finally.md) statement in which the only code in the `finally` block is a call to the <xref:System.IDisposable.Dispose%2A> method, use a `using` statement instead. +- Simplify your code by using the C# [using statement](../../language-reference/statements/using.md). If you have a [try-finally](../../language-reference/keywords/try-finally.md) statement in which the only code in the `finally` block is a call to the <xref:System.IDisposable.Dispose%2A> method, use a `using` statement instead. In the following example, the `try`-`finally` statement only calls `Dispose` in the `finally` block. @@ -263,7 +346,7 @@ The following declaration uses the full syntax. :::code language="csharp" source="./snippets/coding-conventions/program.cs" id="Snippet17b"::: - Use the new [`using` syntax](../../language-reference/keywords/using-statement.md) that doesn't require braces: + Use the new [`using` syntax](../../language-reference/statements/using.md) that doesn't require braces: :::code language="csharp" source="./snippets/coding-conventions/program.cs" id="Snippet17c"::: diff --git a/docs/csharp/fundamentals/coding-style/snippets/coding-conventions/program.cs b/docs/csharp/fundamentals/coding-style/snippets/coding-conventions/program.cs index c7802f6fe5a6f..d4ce2806df652 100644 --- a/docs/csharp/fundamentals/coding-style/snippets/coding-conventions/program.cs +++ b/docs/csharp/fundamentals/coding-style/snippets/coding-conventions/program.cs @@ -7,7 +7,7 @@ class Program //<snippet14a> public static Action<string> ActionExample1 = x => Console.WriteLine($"x is: {x}"); - public static Action<string, string> ActionExample2 = (x, y) => + public static Action<string, string> ActionExample2 = (x, y) => Console.WriteLine($"x is: {x}, y is {y}"); public static Func<string, int> FuncExample1 = x => Convert.ToInt32(x); @@ -76,7 +76,7 @@ static void Main(string[] args) //</snippet8> //<snippet9> - int var3 = Convert.ToInt32(Console.ReadLine()); + int var3 = Convert.ToInt32(Console.ReadLine()); int var4 = ExampleClass.ResultSoFar(); //</snippet9> @@ -182,7 +182,7 @@ static void Main(string[] args) //<snippet19> var instance1 = new ExampleClass(); //</snippet19> - // Can't show `ExampleClass instance1 = new()` because this projet targets net48. + // Can't show `ExampleClass instance1 = new()` because this project targets net48. //<snippet20> ExampleClass instance2 = new ExampleClass(); diff --git a/docs/csharp/fundamentals/exceptions/creating-and-throwing-exceptions.md b/docs/csharp/fundamentals/exceptions/creating-and-throwing-exceptions.md index 293a40a3ddeb7..c48c715889a29 100644 --- a/docs/csharp/fundamentals/exceptions/creating-and-throwing-exceptions.md +++ b/docs/csharp/fundamentals/exceptions/creating-and-throwing-exceptions.md @@ -54,7 +54,7 @@ Add new properties to the exception class when the data they provide is useful t ## C# Language Specification -For more information, see [Exceptions](~/_csharpstandard/standard/exceptions.md) and [The throw statement](~/_csharpstandard/standard/statements.md#12106-the-throw-statement) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +For more information, see [Exceptions](~/_csharpstandard/standard/exceptions.md) and [The throw statement](~/_csharpstandard/standard/statements.md#13106-the-throw-statement) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. ## See also diff --git a/docs/csharp/fundamentals/exceptions/exception-handling.md b/docs/csharp/fundamentals/exceptions/exception-handling.md index eb191e5670c06..6a0c45b024a72 100644 --- a/docs/csharp/fundamentals/exceptions/exception-handling.md +++ b/docs/csharp/fundamentals/exceptions/exception-handling.md @@ -49,7 +49,7 @@ The `LogException` method always returns `false`, no `catch` clause using this e A `finally` block enables you to clean up actions that are performed in a `try` block. If present, the `finally` block executes last, after the `try` block and any matched `catch` block. A `finally` block always runs, whether an exception is thrown or a `catch` block matching the exception type is found. -The `finally` block can be used to release resources such as file streams, database connections, and graphics handles without waiting for the garbage collector in the runtime to finalize the objects. For more information See the [using Statement](../../language-reference/keywords/using-statement.md). +The `finally` block can be used to release resources such as file streams, database connections, and graphics handles without waiting for the garbage collector in the runtime to finalize the objects. In the following example, the `finally` block is used to close a file that is opened in the `try` block. Notice that the state of the file handle is checked before the file is closed. If the `try` block can't open the file, the file handle still has the value `null` and the `finally` block doesn't try to close it. Instead, if the file is opened successfully in the `try` block, the `finally` block closes the open file. @@ -57,7 +57,7 @@ In the following example, the `finally` block is used to close a file that is op ## C# Language Specification -For more information, see [Exceptions](~/_csharpstandard/standard/exceptions.md) and [The try statement](~/_csharpstandard/standard/statements.md#1211-the-try-statement) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +For more information, see [Exceptions](~/_csharpstandard/standard/exceptions.md) and [The try statement](~/_csharpstandard/standard/statements.md#1311-the-try-statement) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. ## See also @@ -65,4 +65,4 @@ For more information, see [Exceptions](~/_csharpstandard/standard/exceptions.md) - [try-catch](../../language-reference/keywords/try-catch.md) - [try-finally](../../language-reference/keywords/try-finally.md) - [try-catch-finally](../../language-reference/keywords/try-catch-finally.md) -- [using Statement](../../language-reference/keywords/using-statement.md) +- [using statement](../../language-reference/statements/using.md) diff --git a/docs/csharp/fundamentals/exceptions/how-to-execute-cleanup-code-using-finally.md b/docs/csharp/fundamentals/exceptions/how-to-execute-cleanup-code-using-finally.md index 43a4743c77b76..bfd60c1392f1f 100644 --- a/docs/csharp/fundamentals/exceptions/how-to-execute-cleanup-code-using-finally.md +++ b/docs/csharp/fundamentals/exceptions/how-to-execute-cleanup-code-using-finally.md @@ -26,7 +26,7 @@ A database connection is another good candidate for being closed in a `finally` ## See also -- [using Statement](../../language-reference/keywords/using-statement.md) +- [using statement](../../language-reference/statements/using.md) - [try-catch](../../language-reference/keywords/try-catch.md) - [try-finally](../../language-reference/keywords/try-finally.md) - [try-catch-finally](../../language-reference/keywords/try-catch-finally.md) diff --git a/docs/csharp/fundamentals/functional/discards.md b/docs/csharp/fundamentals/functional/discards.md index a9cc991d06787..9bdd6e2db68cd 100644 --- a/docs/csharp/fundamentals/functional/discards.md +++ b/docs/csharp/fundamentals/functional/discards.md @@ -19,7 +19,7 @@ You indicate that a variable is a discard by assigning it the underscore (`_`) a Beginning with C# 9.0, you can use discards to specify unused input parameters of a lambda expression. For more information, see the [Input parameters of a lambda expression](../../language-reference/operators/lambda-expressions.md#input-parameters-of-a-lambda-expression) section of the [Lambda expressions](../../language-reference/operators/lambda-expressions.md) article. -When `_` is a valid discard, attempting to retrieve its value or use it in an assignment operation generates compiler error CS0301, "The name '\_' doesn't exist in the current context". This error is because `_` isn't assigned a value, and may not even be assigned a storage location. If it were an actual variable, you couldn't discard more than one value, as the previous example did. +When `_` is a valid discard, attempting to retrieve its value or use it in an assignment operation generates compiler error CS0103, "The name '\_' doesn't exist in the current context". This error is because `_` isn't assigned a value, and may not even be assigned a storage location. If it were an actual variable, you couldn't discard more than one value, as the previous example did. ## Tuple and object deconstruction diff --git a/docs/csharp/fundamentals/object-oriented/polymorphism.md b/docs/csharp/fundamentals/object-oriented/polymorphism.md index 1c0c0ac78e520..bd2beb760df80 100644 --- a/docs/csharp/fundamentals/object-oriented/polymorphism.md +++ b/docs/csharp/fundamentals/object-oriented/polymorphism.md @@ -32,7 +32,7 @@ In C#, every type is polymorphic because all types, including user-defined types ### Virtual members -When a derived class inherits from a base class, it gains all the methods, fields, properties, and events of the base class. The designer of the derived class has different choices for the behavior of virtual methods: +When a derived class inherits from a base class, it includes all the members of the base class. All the behavior declared in the base class is part of the derived class. That enables objects of the derived class to be treated as objects of the base class. Access modifiers (`public`, `protected`, `private` and so on) determine if those members are accessible from the derived class implementation. Virtual methods gives the designer different choices for the behavior of the derived class: - The derived class may override virtual members in the base class, defining new behavior. - The derived class may inherit the closest base class method without overriding it, preserving the existing behavior but enabling further derived classes to override the method. diff --git a/docs/csharp/fundamentals/tutorials/inheritance.md b/docs/csharp/fundamentals/tutorials/inheritance.md index bd0bbec84c35c..6a86d6a4bb921 100644 --- a/docs/csharp/fundamentals/tutorials/inheritance.md +++ b/docs/csharp/fundamentals/tutorials/inheritance.md @@ -53,7 +53,7 @@ While all other members of a base class are inherited by derived classes, whethe [!code-csharp[Inheritance](./snippets/inheritance/basics.cs#1)] -Derived classes can also *override* inherited members by providing an alternate implementation. In order to be able to override a member, the member in the base class must be marked with the [virtual](../../language-reference/keywords/virtual.md) keyword. By default, base class members are not marked as `virtual` and cannot be overridden. Attempting to override a non-virtual member, as the following example does, generates compiler error CS0506: "\<member> cannot override inherited member \<member> because it is not marked virtual, abstract, or override. +Derived classes can also *override* inherited members by providing an alternate implementation. In order to be able to override a member, the member in the base class must be marked with the [virtual](../../language-reference/keywords/virtual.md) keyword. By default, base class members are not marked as `virtual` and cannot be overridden. Attempting to override a non-virtual member, as the following example does, generates compiler error CS0506: "\<member> cannot override inherited member \<member> because it is not marked virtual, abstract, or override." ```csharp public class A @@ -184,7 +184,7 @@ In designing your `Publication` class, you need to make several design decisions The `Publication` class does not have any `abstract` methods, but the class itself is `abstract`. -- Whether a derived class represents the final class in the inheritance hierarchy and cannot itself be used as a base class for additional derived classes. By default, any class can serve as a base class. You can apply the [sealed](../../language-reference/keywords/sealed.md) keyword to indicate that a class cannot serve as a base class for any additional classes. Attempting to derive from a sealed class generated compiler error CS0509, "cannot derive from sealed type \<typeName>". +- Whether a derived class represents the final class in the inheritance hierarchy and cannot itself be used as a base class for additional derived classes. By default, any class can serve as a base class. You can apply the [sealed](../../language-reference/keywords/sealed.md) keyword to indicate that a class cannot serve as a base class for any additional classes. Attempting to derive from a sealed class generated compiler error CS0509, "cannot derive from sealed type \<typeName>." For your example, you'll mark your derived class as `sealed`. diff --git a/docs/csharp/fundamentals/tutorials/pattern-matching.md b/docs/csharp/fundamentals/tutorials/pattern-matching.md index b2689b7db0535..4bd3e7a496fae 100644 --- a/docs/csharp/fundamentals/tutorials/pattern-matching.md +++ b/docs/csharp/fundamentals/tutorials/pattern-matching.md @@ -271,7 +271,7 @@ In the preceding sample, using a recursive expression means you don't repeat the ## Add peak pricing -For the final feature, the toll authority wants to add time sensitive peak pricing. During the morning and evening rush hours, the tolls are doubled. That rule only affects traffic in one direction: inbound to the city in the morning, and outbound in the evening rush hour. During other times during the workday, tolls increase by 50%. Late night and early morning, tolls are reduced by 25%. During the weekend, it's the normal rate, regardless of the time. You could use a series if `if` and `else` statements to express this using the following code: +For the final feature, the toll authority wants to add time sensitive peak pricing. During the morning and evening rush hours, the tolls are doubled. That rule only affects traffic in one direction: inbound to the city in the morning, and outbound in the evening rush hour. During other times during the workday, tolls increase by 50%. Late night and early morning, tolls are reduced by 25%. During the weekend, it's the normal rate, regardless of the time. You could use a series of `if` and `else` statements to express this using the following code: [!code-csharp[FullTuplePattern](./snippets/patterns/finished/toll-calculator/TollCalculator.cs#SnippetPremiumWithoutPattern)] diff --git a/docs/csharp/fundamentals/types/anonymous-types.md b/docs/csharp/fundamentals/types/anonymous-types.md index caf3f3f8e8022..c459b167ed122 100644 --- a/docs/csharp/fundamentals/types/anonymous-types.md +++ b/docs/csharp/fundamentals/types/anonymous-types.md @@ -37,6 +37,10 @@ If you don't specify member names in the anonymous type, the compiler gives the > [!TIP] > You can use .NET style rule [IDE0037](../../../fundamentals/code-analysis/style-rules/ide0037.md) to enforce whether inferred or explicit member names are preferred. +It is also possible to define a field by object of another type: class, struct or even another anonymous type. It is done by using the variable holding this object just like in the following example, where two anonymous types are created using already instantiated user-defined types. In both cases the `product` field in the anonymous type `shipment` and `shipmentWithBonus` will be of type `Product` containing it's default values of each field. And the `bonus` field will be of anonymous type created by the compiler. + +:::code language="csharp" source="snippets/anonymous-types/Program.cs" ID="snippet03"::: + Typically, when you use an anonymous type to initialize a variable, you declare the variable as an implicitly typed local variable by using [var](../../language-reference/statements/declarations.md#implicitly-typed-local-variables). The type name cannot be specified in the variable declaration because only the compiler has access to the underlying name of the anonymous type. For more information about `var`, see [Implicitly Typed Local Variables](../../programming-guide/classes-and-structs/implicitly-typed-local-variables.md). You can create an array of anonymously typed elements by combining an implicitly typed local variable and an implicitly typed array, as shown in the following example. diff --git a/docs/csharp/fundamentals/types/interfaces.md b/docs/csharp/fundamentals/types/interfaces.md index 2ea9c1cb3eb8c..0b937053a1d97 100644 --- a/docs/csharp/fundamentals/types/interfaces.md +++ b/docs/csharp/fundamentals/types/interfaces.md @@ -48,6 +48,6 @@ A base class can also implement interface members by using virtual members. In t An interface has the following properties: - In C# versions earlier than 8.0, an interface is like an abstract base class with only abstract members. A class or struct that implements the interface must implement all its members. -- Beginning with C# 8.0, an interface may define default implementations for some or all of its members. A class or struct that implements the interface doesn't have to implement members that have default implementations. For more information, see [default interface methods](../../tutorials/default-interface-methods-versions.md). +- Beginning with C# 8.0, an interface may define default implementations for some or all of its members. A class or struct that implements the interface doesn't have to implement members that have default implementations. For more information, see [default interface methods](../../advanced-topics/interface-implementation/default-interface-methods-versions.md). - An interface can't be instantiated directly. Its members are implemented by any class or struct that implements the interface. - A class or struct can implement multiple interfaces. A class can inherit a base class and also implement one or more interfaces. diff --git a/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs b/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs index d24fef4bb0b80..ec5a8576d3c23 100644 --- a/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs +++ b/docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs @@ -38,6 +38,13 @@ from prod in products Console.WriteLine(apple); Console.WriteLine(onSale); // </Snippet02> + + // <Snippet03> + var product = new Product(); + var bonus = new { note = "You won!" }; + var shipment = new { address = "Nowhere St.", product }; + var shipmentWithBonus = new { address = "Somewhere St.", product, bonus }; + // </Snippet03> } } } diff --git a/docs/csharp/how-to/compare-strings.md b/docs/csharp/how-to/compare-strings.md index 95875a146750c..67a6abebdb6c1 100644 --- a/docs/csharp/how-to/compare-strings.md +++ b/docs/csharp/how-to/compare-strings.md @@ -71,7 +71,7 @@ and "de-DE" cultures. On Windows, prior to .NET 5, the sort order of "cop", "coop", and "co-op" changes when you change from a linguistic comparison to an ordinal comparison. The two German sentences also compare differently using the different comparison types. -This is because prior to .NET 5, the .NET globalization APIs used [National Language Support (NLS)](/windows/win32/intl/national-language-support) libraries. In .NET 5 and later versions, the .NET globalization APIs use [International Components for Unicode (ICU)](http://site.icu-project.org/home) libraries, which unifies .NET's globalization behavior across all supported operating systems. +This is because prior to .NET 5, the .NET globalization APIs used [National Language Support (NLS)](/windows/win32/intl/national-language-support) libraries. In .NET 5 and later versions, the .NET globalization APIs use [International Components for Unicode (ICU)](https://icu.unicode.org/) libraries, which unifies .NET's globalization behavior across all supported operating systems. ## Comparisons using specific cultures diff --git a/docs/csharp/how-to/index.md b/docs/csharp/how-to/index.md index d54d78228d68e..e58b354d30b1b 100644 --- a/docs/csharp/how-to/index.md +++ b/docs/csharp/how-to/index.md @@ -121,8 +121,8 @@ and work with different data sources. Modern programs often use asynchronous operations. These articles will help you learn to use these techniques. -- [Improve async performance using `System.Threading.Tasks.Task.WhenAll`](../programming-guide/concepts/async/index.md). -- [Make multiple web requests in parallel using `async` and `await`](../programming-guide/concepts/async/index.md). +- [Improve async performance using `System.Threading.Tasks.Task.WhenAll`](../asynchronous-programming/async-scenarios.md). +- [Make multiple web requests in parallel using `async` and `await`](../asynchronous-programming/async-scenarios.md). - [Use a thread pool](../../standard/threading/the-managed-thread-pool.md#using-the-thread-pool). ## Command line args to your program diff --git a/docs/csharp/includes/vsto-framework.md b/docs/csharp/includes/vsto-framework.md new file mode 100644 index 0000000000000..5398628d77088 --- /dev/null +++ b/docs/csharp/includes/vsto-framework.md @@ -0,0 +1,9 @@ +--- +author: BillWagner +ms.author: wiwagn +ms.topic: include +ms.date: 02/28/2023 +--- + +> [!IMPORTANT] +> VSTO relies on the [.NET Framework](../../framework/get-started/overview.md). COM add-ins can also be written with the .NET Framework. Office Add-ins cannot be created with [.NET Core and .NET 5+](/dotnet/core/dotnet-five), the latest versions of .NET. This is because .NET Core/.NET 5+ cannot work together with .NET Framework in the same process and may lead to add-in load failures. You can continue to use .NET Framework to write VSTO and COM add-ins for Office. Microsoft will not be updating VSTO or the COM add-in platform to use .NET Core or .NET 5+. You can take advantage of .NET Core and .NET 5+, including ASP.NET Core, to create the server side of [Office Web Add-ins](/office/dev/add-ins/overview/office-add-ins). diff --git a/docs/csharp/index.yml b/docs/csharp/index.yml index d1b8ae340d633..def65be1c17d8 100644 --- a/docs/csharp/index.yml +++ b/docs/csharp/index.yml @@ -7,7 +7,7 @@ metadata: title: "C# docs - get started, tutorials, reference." description: "Learn C# programming - for beginning developers, developers new to C#, and experienced C# / .NET developers" ms.topic: landing-page # Required - ms.date: 11/19/2019 + ms.date: 04/05/2023 landingContent: - title: "Learn to program in C#" @@ -81,6 +81,8 @@ landingContent: linkLists: - linkListType: overview links: + - text: C# language strategy + url: ./tour-of-csharp/strategy.md - text: "Programming concepts" url: ./programming-guide/concepts/index.md - linkListType: quickstart @@ -112,14 +114,14 @@ landingContent: linkLists: - linkListType: whats-new links: + - text: "What's new in C# 12" + url: whats-new/csharp-12.md - text: "What's new in C# 11" url: whats-new/csharp-11.md - text: "What's new in C# 10" url: whats-new/csharp-10.md - text: "What's new in C# 9.0" url: whats-new/csharp-9.md - - text: "What's new in C# 8.0" - url: whats-new/csharp-8.md - linkListType: tutorial links: - text: Explore record types diff --git a/docs/csharp/language-reference/attributes/general.md b/docs/csharp/language-reference/attributes/general.md index 7d7e54514d5e5..19f5843ff0993 100644 --- a/docs/csharp/language-reference/attributes/general.md +++ b/docs/csharp/language-reference/attributes/general.md @@ -201,4 +201,4 @@ To try this code yourself, set the `AllowUnsafeBlocks` compiler option in your * - <xref:System.Attribute> - <xref:System.Reflection> - [Attributes](../../../standard/attributes/index.md) -- [Reflection](../../programming-guide/concepts/reflection.md) +- [Reflection](/dotnet/csharp/advanced-topics/reflection-and-attributes/) diff --git a/docs/csharp/language-reference/builtin-types/default-values.md b/docs/csharp/language-reference/builtin-types/default-values.md index 65b540f4c49ed..c723943032c5e 100644 --- a/docs/csharp/language-reference/builtin-types/default-values.md +++ b/docs/csharp/language-reference/builtin-types/default-values.md @@ -54,7 +54,7 @@ At run time, if the <xref:System.Type?displayProperty=nameWithType> instance rep For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): - [Default values](~/_csharpstandard/standard/variables.md#93-default-values) -- [Default constructors](~/_csharpstandard/standard/types.md#833-default-constructors)\ +- [Default constructors](~/_csharpstandard/standard/types.md#833-default-constructors) - [C# 10 - Parameterless struct constructors](~/_csharplang/proposals/csharp-10.0/parameterless-struct-constructors.md) - [C# 11 - Auto default structs](~/_csharplang/proposals/csharp-11.0/auto-default-structs.md) diff --git a/docs/csharp/language-reference/builtin-types/enum.md b/docs/csharp/language-reference/builtin-types/enum.md index 725037f25d4d5..8122a3e48efd5 100644 --- a/docs/csharp/language-reference/builtin-types/enum.md +++ b/docs/csharp/language-reference/builtin-types/enum.md @@ -73,9 +73,9 @@ For any enumeration type, there exist [boxing and unboxing](../../programming-gu For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): - [Enums](~/_csharpstandard/standard/enums.md) -- [Enum values and operations](~/_csharpstandard/standard/enums.md#186-enum-values-and-operations) -- [Enumeration logical operators](~/_csharpstandard/standard/expressions.md#11123-enumeration-logical-operators) -- [Enumeration comparison operators](~/_csharpstandard/standard/expressions.md#11116-enumeration-comparison-operators) +- [Enum values and operations](~/_csharpstandard/standard/enums.md#196-enum-values-and-operations) +- [Enumeration logical operators](~/_csharpstandard/standard/expressions.md#12133-enumeration-logical-operators) +- [Enumeration comparison operators](~/_csharpstandard/standard/expressions.md#12126-enumeration-comparison-operators) - [Explicit enumeration conversions](~/_csharpstandard/standard/conversions.md#1033-explicit-enumeration-conversions) - [Implicit enumeration conversions](~/_csharpstandard/standard/conversions.md#1024-implicit-enumeration-conversions) diff --git a/docs/csharp/language-reference/builtin-types/nullable-value-types.md b/docs/csharp/language-reference/builtin-types/nullable-value-types.md index 47d9ecf808442..246e927c6ff94 100644 --- a/docs/csharp/language-reference/builtin-types/nullable-value-types.md +++ b/docs/csharp/language-reference/builtin-types/nullable-value-types.md @@ -115,8 +115,8 @@ Instead use the <xref:System.Nullable.GetUnderlyingType%2A?displayProperty=nameW For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [Nullable types](~/_csharpstandard/standard/types.md#8311-nullable-value-types) -- [Lifted operators](~/_csharpstandard/standard/expressions.md#1148-lifted-operators) +- [Nullable types](~/_csharpstandard/standard/types.md#8312-nullable-value-types) +- [Lifted operators](~/_csharpstandard/standard/expressions.md#1248-lifted-operators) - [Implicit nullable conversions](~/_csharpstandard/standard/conversions.md#1026-implicit-nullable-conversions) - [Explicit nullable conversions](~/_csharpstandard/standard/conversions.md#1034-explicit-nullable-conversions) - [Lifted conversion operators](~/_csharpstandard/standard/conversions.md#1062-lifted-conversions) diff --git a/docs/csharp/language-reference/builtin-types/numeric-conversions.md b/docs/csharp/language-reference/builtin-types/numeric-conversions.md index bb94dc7bfd9df..133107524b6f2 100644 --- a/docs/csharp/language-reference/builtin-types/numeric-conversions.md +++ b/docs/csharp/language-reference/builtin-types/numeric-conversions.md @@ -1,7 +1,7 @@ --- description: Learn about the implicit and explicit conversions between the built-in numeric types in C# title: "Built-in numeric conversions - C# reference" -ms.date: 03/17/2021 +ms.date: 01/30/2023 helpviewer_keywords: - "implicit numeric conversions [C#]" - "explicit numeric conversion [C#]" @@ -63,7 +63,7 @@ The following table shows the predefined explicit conversions between the built- |[short](integral-numeric-types.md)|`sbyte`, `byte`, `ushort`, `uint`, `ulong`, or `nuint`| |[ushort](integral-numeric-types.md)|`sbyte`, `byte`, or `short`| |[int](integral-numeric-types.md)|`sbyte`, `byte`, `short`, `ushort`, `uint`, `ulong`, or `nuint`| -|[uint](integral-numeric-types.md)|`sbyte`, `byte`, `short`, `ushort`, or `int`| +|[uint](integral-numeric-types.md)|`sbyte`, `byte`, `short`, `ushort`, `int`, or `nint`| |[long](integral-numeric-types.md)|`sbyte`, `byte`, `short`, `ushort`, `int`, `uint`, `ulong`, `nint`, or `nuint`| |[ulong](integral-numeric-types.md)|`sbyte`, `byte`, `short`, `ushort`, `int`, `uint`, `long`, `nint`, or `nuint`| |[float](floating-point-numeric-types.md)|`sbyte`, `byte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `decimal`, `nint`, or `nuint`| diff --git a/docs/csharp/language-reference/builtin-types/record.md b/docs/csharp/language-reference/builtin-types/record.md index a30f97454954c..39a8e1dfaaee3 100644 --- a/docs/csharp/language-reference/builtin-types/record.md +++ b/docs/csharp/language-reference/builtin-types/record.md @@ -1,7 +1,7 @@ --- title: "Records - C# reference" description: Learn about the record type in C# -ms.date: 07/23/2022 +ms.date: 04/05/2023 f1_keywords: - "record_CSharpKeyword" helpviewer_keywords: @@ -77,7 +77,8 @@ A record type doesn't have to declare any positional properties. You can declare :::code language="csharp" source="snippets/shared/RecordType.cs" id="MixedSyntax"::: If you define properties by using standard property syntax but omit the access modifier, the properties are implicitly `private`. -<!-- Todo -- Explain issues surrounding use of attributes on positional properties. --> + +Beginning with C# 12, you can declare primary constructors in classes and structs, as well as records. The only difference is that positional parameters in records generate properties. Positional parameters in classes and structs don't. You can learn more in the article on [constructors](../../programming-guide/classes-and-structs/instance-constructors.md). ## Immutability diff --git a/docs/csharp/language-reference/builtin-types/ref-struct.md b/docs/csharp/language-reference/builtin-types/ref-struct.md index 4c34ca77acb6b..cddd5ae1bc522 100644 --- a/docs/csharp/language-reference/builtin-types/ref-struct.md +++ b/docs/csharp/language-reference/builtin-types/ref-struct.md @@ -16,7 +16,7 @@ You can use the `ref` modifier in the declaration of a [structure type](struct.m - A `ref struct` variable can't be used in an [`async`](../keywords/async.md) method. However, you can use `ref struct` variables in synchronous methods, for example, in methods that return <xref:System.Threading.Tasks.Task> or <xref:System.Threading.Tasks.Task%601>. - A `ref struct` variable can't be used in [iterators](../../iterators.md). -You can define a disposable `ref struct`. To do that, ensure that a `ref struct` fits the [disposable pattern](~/_csharplang/proposals/csharp-8.0/using.md#pattern-based-using). That is, it has an instance or extension `Dispose` method, which is accessible, parameterless and has a `void` return type. +You can define a disposable `ref struct`. To do that, ensure that a `ref struct` fits the [disposable pattern](~/_csharplang/proposals/csharp-8.0/using.md#pattern-based-using). That is, it has an instance `Dispose` method, which is accessible, parameterless and has a `void` return type. You can use the [using statement or declaration](../statements/using.md) with an instance of a disposable `ref struct`. Typically, you define a `ref struct` type when you need a type that also includes data members of `ref struct` types: diff --git a/docs/csharp/language-reference/builtin-types/reference-types.md b/docs/csharp/language-reference/builtin-types/reference-types.md index fad0138884251..5ec1c33d59530 100644 --- a/docs/csharp/language-reference/builtin-types/reference-types.md +++ b/docs/csharp/language-reference/builtin-types/reference-types.md @@ -287,13 +287,13 @@ For more information, see the following sections of the [C# language specificati - [C# Reference](../index.md) - [C# Keywords](../keywords/index.md) - [Events](../../programming-guide/events/index.md) -- [Using Type dynamic](../../programming-guide/types/using-type-dynamic.md) +- [Using Type dynamic](../../advanced-topics/interop/using-type-dynamic.md) - [Best Practices for Using Strings](../../../standard/base-types/best-practices-strings.md) - [Basic String Operations](../../../standard/base-types/basic-string-operations.md) - [Creating New Strings](../../../standard/base-types/creating-new.md) - [Type-testing and cast operators](../operators/type-testing-and-cast.md) - [How to safely cast using pattern matching and the as and is operators](../../fundamentals/tutorials/safely-cast-using-pattern-matching-is-and-as-operators.md) -- [Walkthrough: creating and using dynamic objects](../../programming-guide/types/walkthrough-creating-and-using-dynamic-objects.md) +- [Walkthrough: creating and using dynamic objects](../../advanced-topics/interop/walkthrough-creating-and-using-dynamic-objects.md) - <xref:System.Object?displayProperty=nameWithType> - <xref:System.String?displayProperty=nameWithType> - <xref:System.Dynamic.DynamicObject?displayProperty=nameWithType> diff --git a/docs/csharp/language-reference/builtin-types/snippets/shared/RecordType.cs b/docs/csharp/language-reference/builtin-types/snippets/shared/RecordType.cs index a521016866b0f..bc721bab1e274 100644 --- a/docs/csharp/language-reference/builtin-types/snippets/shared/RecordType.cs +++ b/docs/csharp/language-reference/builtin-types/snippets/shared/RecordType.cs @@ -41,17 +41,17 @@ public static class ImmutableRecordType // <ImmutableRecord> public record Person { - public string FirstName { get; init; } = default!; - public string LastName { get; init; } = default!; + public required string FirstName { get; init; } + public required string LastName { get; init; } }; // </ImmutableRecord> // <ImmutableRecordStruct> public record struct Point { - public double X { get; init; } - public double Y { get; init; } - public double Z { get; init; } + public double X { get; init; } + public double Y { get; init; } + public double Z { get; init; } } // </ImmutableRecordStruct> } @@ -61,8 +61,8 @@ public static class MutableRecordType // <MutableRecord> public record Person { - public string FirstName { get; set; } = default!; - public string LastName { get; set; } = default!; + public required string FirstName { get; set; } + public required string LastName { get; set; } }; // </MutableRecord> @@ -105,8 +105,8 @@ public static class PositionalAttributes /// map to the JSON elements "firstName" and "lastName" when /// serialized or deserialized. /// </remarks> - public record Person([property: JsonPropertyName("firstName")]string FirstName, - [property: JsonPropertyName("lastName")]string LastName); + public record Person([property: JsonPropertyName("firstName")] string FirstName, + [property: JsonPropertyName("lastName")] string LastName); // </PositionalAttributes> } diff --git a/docs/csharp/language-reference/builtin-types/snippets/shared/ValueTuples.cs b/docs/csharp/language-reference/builtin-types/snippets/shared/ValueTuples.cs index 42514ac4414b9..a247e2cbc1d29 100644 --- a/docs/csharp/language-reference/builtin-types/snippets/shared/ValueTuples.cs +++ b/docs/csharp/language-reference/builtin-types/snippets/shared/ValueTuples.cs @@ -53,7 +53,7 @@ private static void MethodsOnTuples() private static void LargeTuple() { // <SnippetLargeTuple> - var t = + var t = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26); @@ -83,7 +83,11 @@ private static void MultipleReturns() throw new ArgumentException("Cannot find minimum and maximum of a null or empty array."); } + // Initialize min to MaxValue so every value in the input + // is less than this initial value. var min = int.MaxValue; + // Initialize max to MinValue so every value in the input + // is greater than this initial value. var max = int.MinValue; foreach (var i in input) { @@ -182,7 +186,7 @@ private static void DeconstructExisting() // <SnippetDeconstructExisting> var destination = string.Empty; var distance = 0.0; - + var t = ("post office", 3.6); (destination, distance) = t; Console.WriteLine($"Distance to {destination} is {distance} kilometers."); diff --git a/docs/csharp/language-reference/builtin-types/struct.md b/docs/csharp/language-reference/builtin-types/struct.md index 826dd01dfd3ab..ada219a14ff5b 100644 --- a/docs/csharp/language-reference/builtin-types/struct.md +++ b/docs/csharp/language-reference/builtin-types/struct.md @@ -1,14 +1,13 @@ --- title: "Structure types - C# reference" description: Learn about the struct type in C# -ms.date: 09/15/2022 +ms.date: 04/05/2023 f1_keywords: - "struct_CSharpKeyword" helpviewer_keywords: - "struct keyword [C#]" - "struct type [C#]" - "structure type [C#]" -ms.assetid: ff3dd9b7-dc93-4720-8855-ef5558f65c7c --- # Structure types (C# reference) @@ -16,7 +15,7 @@ A *structure type* (or *struct type*) is a [value type](value-types.md) that can [!code-csharp[struct example](snippets/shared/StructType.cs#StructExample)] -`ref struct` types and `readonly ref struct` types are covered in the article on [ref struct types](ref-struct.md). +For information about `ref struct` and `readonly ref struct` types, see the [ref structure types](ref-struct.md) article. Structure types have *value semantics*. That is, a variable of a structure type contains an instance of the type. By default, variable values are copied on assignment, passing an argument to a method, and returning a method result. For structure-type variables, an instance of the type is copied. For more information, see [Value types](value-types.md). @@ -71,7 +70,7 @@ Typically, you apply the `readonly` modifier to the following kinds of instance You can apply the `readonly` modifier to static fields of a structure type, but not any other static members, such as properties or methods. -The compiler may make use of the `readonly` modifier for performance optimizations. For more information, see [Write safe and efficient C# code](../../write-safe-efficient-code.md). +The compiler may make use of the `readonly` modifier for performance optimizations. For more information, see [Avoiding allocations](../../advanced-topics/performance/index.md). ## Nondestructive mutation @@ -109,6 +108,8 @@ Beginning with C# 11, if you don't initialize all fields in a struct, the compil Every `struct` has a `public` parameterless constructor. If you write a parameterless constructor, it must be public. If a struct declares any field initializers, it must explicitly declare a constructor. That constructor need not be parameterless. If a struct declares a field initializer but no constructors, the compiler reports an error. Any explicitly declared constructor (with parameters, or parameterless) executes all field initializers for that struct. All fields without a field initializer or an assignment in a constructor are set to the [default value](default-values.md). For more information, see the [Parameterless struct constructors](~/_csharplang/proposals/csharp-10.0/parameterless-struct-constructors.md) feature proposal note. +Beginning with C# 12, `struct` types can define a [primary constructor](../../programming-guide/classes-and-structs/instance-constructors.md#primary-constructors) as part of its declaration. This provides a concise syntax for constructor parameters that can be used throughout the `struct` body, in any member declaration for that struct. + If all instance fields of a structure type are accessible, you can also instantiate it without the `new` operator. In that case you must initialize all instance fields before the first use of the instance. The following example shows how to do that: :::code language="csharp" source="snippets/shared/StructType.cs" id="SnippetWithoutNew"::: @@ -127,7 +128,7 @@ Structs have most of the capabilities of a [class](../keywords/class.md) type. T ## Passing structure-type variables by reference -When you pass a structure-type variable to a method as an argument or return a structure-type value from a method, the whole instance of a structure type is copied. Pass by value can affect the performance of your code in high-performance scenarios that involve large structure types. You can avoid value copying by passing a structure-type variable by reference. Use the [`ref`](../keywords/ref.md#passing-an-argument-by-reference), [`out`](../keywords/out-parameter-modifier.md), or [`in`](../keywords/in-parameter-modifier.md) method parameter modifiers to indicate that an argument must be passed by reference. Use [ref returns](../statements/jump-statements.md#the-return-statement) to return a method result by reference. For more information, see [Write safe and efficient C# code](../../write-safe-efficient-code.md). +When you pass a structure-type variable to a method as an argument or return a structure-type value from a method, the whole instance of a structure type is copied. Pass by value can affect the performance of your code in high-performance scenarios that involve large structure types. You can avoid value copying by passing a structure-type variable by reference. Use the [`ref`](../keywords/ref.md#passing-an-argument-by-reference), [`out`](../keywords/out-parameter-modifier.md), or [`in`](../keywords/in-parameter-modifier.md) method parameter modifiers to indicate that an argument must be passed by reference. Use [ref returns](../statements/jump-statements.md#the-return-statement) to return a method result by reference. For more information, see [Avoid allocations](../../advanced-topics/performance/index.md). ## struct constraint diff --git a/docs/csharp/language-reference/builtin-types/unmanaged-types.md b/docs/csharp/language-reference/builtin-types/unmanaged-types.md index 05097700eea54..f167aef55f907 100644 --- a/docs/csharp/language-reference/builtin-types/unmanaged-types.md +++ b/docs/csharp/language-reference/builtin-types/unmanaged-types.md @@ -9,7 +9,7 @@ helpviewer_keywords: A type is an **unmanaged type** if it's any of the following types: -- `sbyte`, `byte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `char`, `float`, `double`, `decimal`, or `bool` +- `sbyte`, `byte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `nint`, `nuint`, `char`, `float`, `double`, `decimal`, or `bool` - Any [enum](enum.md) type - Any [pointer](../unsafe-code.md#pointer-types) type - Any user-defined [struct](struct.md) type that contains fields of unmanaged types only. @@ -26,7 +26,7 @@ A generic struct may be the source of both unmanaged and managed constructed typ ## C# language specification -For more information, see the [Pointer types](~/_csharpstandard/standard/unsafe-code.md#223-pointer-types) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Pointer types](~/_csharpstandard/standard/unsafe-code.md#233-pointer-types) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/compiler-messages/cs0120.md b/docs/csharp/language-reference/compiler-messages/cs0120.md index c25fb1acc0d55..9cd1345554d36 100644 --- a/docs/csharp/language-reference/compiler-messages/cs0120.md +++ b/docs/csharp/language-reference/compiler-messages/cs0120.md @@ -99,7 +99,6 @@ public class MyClass ```csharp // CS0120_2.cs -// CS0120 expected using System; public class MyClass diff --git a/docs/csharp/language-reference/compiler-messages/cs0178.md b/docs/csharp/language-reference/compiler-messages/cs0178.md index f5ecd8589e85c..c4c32de0bb276 100644 --- a/docs/csharp/language-reference/compiler-messages/cs0178.md +++ b/docs/csharp/language-reference/compiler-messages/cs0178.md @@ -20,7 +20,7 @@ Invalid rank specifier: expected ',' or ']' - A comma enclosed in brackets - For more information, see [Arrays](../../programming-guide/arrays/index.md) and the C# specification ([C# Language Specification](~/_csharpstandard/standard/arrays.md#167-array-initializers)) section on array initializers. + For more information, see [Arrays](../../programming-guide/arrays/index.md) and the C# specification ([C# Language Specification](~/_csharpstandard/standard/arrays.md#177-array-initializers)) section on array initializers. ## Example diff --git a/docs/csharp/language-reference/compiler-messages/cs0592.md b/docs/csharp/language-reference/compiler-messages/cs0592.md index e5e5ef8e7359c..34238f23b0392 100644 --- a/docs/csharp/language-reference/compiler-messages/cs0592.md +++ b/docs/csharp/language-reference/compiler-messages/cs0592.md @@ -39,4 +39,4 @@ public class A ## See also -- [Attributes](../../programming-guide/concepts/attributes/index.md) +- [Attributes](/dotnet/csharp/advanced-topics/reflection-and-attributes) diff --git a/docs/csharp/language-reference/compiler-messages/cs1612.md b/docs/csharp/language-reference/compiler-messages/cs1612.md index d47efc6fc384c..459adf6c188ad 100644 --- a/docs/csharp/language-reference/compiler-messages/cs1612.md +++ b/docs/csharp/language-reference/compiler-messages/cs1612.md @@ -15,14 +15,14 @@ Cannot modify the return value of 'expression' because it is not a variable An attempt was made to modify a value type that is produced as the result of an intermediate expression but is not stored in a variable. This error can occur when you attempt to directly modify a struct in a generic collection, as shown in the following example: ```csharp -List<myStruct> list = {…}; +List<MyStruct> list = {…}; list[0].Name = "MyStruct42"; //CS1612 ``` To modify the struct, first assign it to a local variable, modify the variable, then assign the variable back to the item in the collection. ```csharp -List<myStruct> list = {…}; +List<MyStruct> list = {…}; MyStruct ms = list[0]; ms.Name = "MyStruct42"; list[0] = ms; @@ -49,12 +49,7 @@ public struct MyStruct public class ListView { - MyStruct ms; - public MyStruct Size - { - get { return ms; } - set { ms = value; } - } + public MyStruct Size { get; set; } } public class MyClass diff --git a/docs/csharp/language-reference/compiler-messages/cs1656.md b/docs/csharp/language-reference/compiler-messages/cs1656.md index 4e70de2275955..12912e08fe9dd 100644 --- a/docs/csharp/language-reference/compiler-messages/cs1656.md +++ b/docs/csharp/language-reference/compiler-messages/cs1656.md @@ -12,7 +12,7 @@ ms.assetid: b5463a12-d685-4dae-9f88-08383e271b7a Cannot assign to 'variable' because it is a 'read-only variable type' - This error occurs when an assignment to variable occurs in a read-only context. Read-only contexts include [foreach](../statements/iteration-statements.md#the-foreach-statement) iteration variables, [using](../keywords/using-statement.md) variables, and [fixed](../statements/fixed.md) variables. To resolve this error, avoid assignments to a statement variable in `using` blocks, `foreach` statements, and `fixed` statements. + This error occurs when an assignment to variable occurs in a read-only context. Read-only contexts include [foreach](../statements/iteration-statements.md#the-foreach-statement) iteration variables, [using](../statements/using.md) variables, and [fixed](../statements/fixed.md) variables. To resolve this error, avoid assignments to a statement variable in `using` blocks, `foreach` statements, and `fixed` statements. ## Example 1 diff --git a/docs/csharp/language-reference/compiler-messages/cs1674.md b/docs/csharp/language-reference/compiler-messages/cs1674.md index 6b7b1dd51ae16..50e0ac69d347b 100644 --- a/docs/csharp/language-reference/compiler-messages/cs1674.md +++ b/docs/csharp/language-reference/compiler-messages/cs1674.md @@ -12,7 +12,7 @@ ms.assetid: 7a018629-35f4-406a-8a5f-1cee7343da6d 'T': type used in a using statement must be implicitly convertible to 'System.IDisposable' - The [using Statement](../keywords/using-statement.md) is intended to be used to ensure the disposal of an object at the end of the `using` block, thus, only types which are disposable may be used in such a statement. For example, value types are not disposable, and type parameters which are not constrained to be classes may not be assumed to be disposable. + The [using statement](../statements/using.md) is intended to be used to ensure the disposal of an object at the end of the `using` block, thus, only types which are disposable may be used in such a statement. For example, value types are not disposable, and type parameters which are not constrained to be classes may not be assumed to be disposable. ## Example 1 diff --git a/docs/csharp/language-reference/compiler-messages/cs1919.md b/docs/csharp/language-reference/compiler-messages/cs1919.md index 4604718c2f073..6a51106991948 100644 --- a/docs/csharp/language-reference/compiler-messages/cs1919.md +++ b/docs/csharp/language-reference/compiler-messages/cs1919.md @@ -40,4 +40,4 @@ unsafe public class C ## See also -- [Interoperability](../../programming-guide/interop/index.md) +- [Interoperability](../../advanced-topics/interop/index.md) diff --git a/docs/csharp/language-reference/compiler-messages/cs1946.md b/docs/csharp/language-reference/compiler-messages/cs1946.md index 039897cf2cfd9..054efc40b5e30 100644 --- a/docs/csharp/language-reference/compiler-messages/cs1946.md +++ b/docs/csharp/language-reference/compiler-messages/cs1946.md @@ -40,4 +40,4 @@ using System; ## See also -- [Expression Trees](../../programming-guide/concepts/expression-trees/index.md) +- [Expression Trees](../../advanced-topics/expression-trees/index.md) diff --git a/docs/csharp/language-reference/compiler-messages/cs4014.md b/docs/csharp/language-reference/compiler-messages/cs4014.md index 4a8d06c04b7f1..4279ed95e5c76 100644 --- a/docs/csharp/language-reference/compiler-messages/cs4014.md +++ b/docs/csharp/language-reference/compiler-messages/cs4014.md @@ -170,4 +170,4 @@ The expected output appears at the end of the code. ## See also - [await](../operators/await.md) -- [Asynchronous programming with async and await](../../programming-guide/concepts/async/index.md) +- [Asynchronous programming with async and await](../../asynchronous-programming/index.md) diff --git a/docs/csharp/language-reference/compiler-messages/feature-version-errors.md b/docs/csharp/language-reference/compiler-messages/feature-version-errors.md index d99a840fe3078..760d9a37a2c19 100644 --- a/docs/csharp/language-reference/compiler-messages/feature-version-errors.md +++ b/docs/csharp/language-reference/compiler-messages/feature-version-errors.md @@ -83,7 +83,7 @@ helpviewer_keywords: - "CS9016" - "CS9017" - "CS8967" -ms.date: 11/22/2022 +ms.date: 01/30/2023 --- # Resolve warnings related to language features and versions @@ -140,6 +140,8 @@ You may have an older target framework selected in your project file. If you rem [!INCLUDE [langversion-table](../includes/langversion-table.md)] +You can learn more about the language versions supported for each framework version in the article on [Configure language version](../configure-language-version.md) in the language reference section. + ## Avoid the updated feature If you must support older libraries or runtimes, you may need to avoid using newer features. diff --git a/docs/csharp/language-reference/compiler-messages/nullable-warnings.md b/docs/csharp/language-reference/compiler-messages/nullable-warnings.md index 2587649842283..1916a80d8e503 100644 --- a/docs/csharp/language-reference/compiler-messages/nullable-warnings.md +++ b/docs/csharp/language-reference/compiler-messages/nullable-warnings.md @@ -12,7 +12,6 @@ f1_keywords: - "CS8607" # WRN_DisallowNullAttributeForbidsMaybeNullAssignment: A possible null value may not be used for a type marked with [NotNull] or [DisallowNull] - "CS8608" # WRN_NullabilityMismatchInTypeOnOverride: Nullability of reference types in type doesn't match overridden member. - "CS8609" # WRN_NullabilityMismatchInReturnTypeOnOverride: Nullability of reference types in return type doesn't match overridden member. - - "CS8819" # WRN_NullabilityMismatchInReturnTypeOnPartial: Nullability of reference types in return type doesn't match partial method declaration. - "CS8610" # WRN_NullabilityMismatchInParameterTypeOnOverride: Nullability of reference types in type of parameter '{0}' doesn't match overridden member. - "CS8611" # WRN_NullabilityMismatchInParameterTypeOnPartial: Nullability of reference types in type of parameter '{0}' doesn't match partial method declaration. - "CS8612" # WRN_NullabilityMismatchInTypeOnImplicitImplementation: Nullability of reference types in type of '{0}' doesn't match implicitly implemented member '{1}'. @@ -52,6 +51,7 @@ f1_keywords: - "CS8776" # WRN_MemberNotNullBadMember: Member '{0}' cannot be used in this attribute. - "CS8775" # WRN_MemberNotNullWhen: Member '{0}' must have a non-null value when exiting with '{1}'. - "CS8777" # WRN_ParameterDisallowsNull: Parameter '{0}' must have a non-null value when exiting. + - "CS8819" # WRN_NullabilityMismatchInReturnTypeOnPartial: Nullability of reference types in return type doesn't match partial method declaration. - "CS8824" # WRN_ParameterNotNullIfNotNull: Parameter '{0}' must have a non-null value when exiting because parameter '{1}' is non-null. - "CS8825" # WRN_ReturnNotNullIfNotNull: Return value must be non-null because parameter '{0}' is non-null. - "CS8847" # WRN_SwitchExpressionNotExhaustiveForNullWithWhen: The switch expression does not handle some null inputs (it is not exhaustive). For example, the pattern '{0}' is not covered. However, a pattern with a 'when' clause might successfully match this value. @@ -60,6 +60,7 @@ helpviewer_keywords: - "CS8600" - "CS8601" - "CS8602" + - "CS8603" - "CS8604" - "CS8605" - "CS8607" @@ -82,22 +83,22 @@ helpviewer_keywords: - "CS8625" - "CS8629" - "CS8631" - - "CS8634" - - "CS8655" - "CS8633" + - "CS8634" - "CS8643" - "CS8644" - "CS8645" + - "CS8655" + - "CS8667" + - "CS8670" + - "CS8714" - "CS8762" - "CS8763" - "CS8764" - "CS8765" - "CS8766" - - "CS8667" - - "CS8768" - - "CS8670" - - "CS8714" - "CS8767" + - "CS8768" - "CS8769" - "CS8770" - "CS8774" @@ -114,27 +115,16 @@ ms.date: 06/30/2022 This article covers the following compiler warnings: -- [**CS8602**](#possible-dereference-of-null) - *Dereference of a possibly null reference.* -- [**CS8670**](#possible-dereference-of-null) - *Object or collection initializer implicitly dereferences possibly null member.* +- [**CS8597**](#possible-null-assigned-to-a-nonnullable-reference) - *Thrown value may be null.* +- [**CS8600**](#possible-null-assigned-to-a-nonnullable-reference) - *Converting null literal or possible null value to non-nullable type.* - [**CS8601**](#possible-null-assigned-to-a-nonnullable-reference) - *Possible null reference assignment.* -- [**CS8605**](#possible-null-assigned-to-a-nonnullable-reference) - *Unboxing a possibly null value.* +- [**CS8602**](#possible-dereference-of-null) - *Dereference of a possibly null reference.* - [**CS8603**](#possible-null-assigned-to-a-nonnullable-reference) - *Possible null reference return.* - [**CS8604**](#possible-null-assigned-to-a-nonnullable-reference) - *Possible null reference argument for parameter.* -- [**CS8600**](#possible-null-assigned-to-a-nonnullable-reference) - *Converting null literal or possible null value to non-nullable type.* -- [**CS8597**](#possible-null-assigned-to-a-nonnullable-reference) - *Thrown value may be null.* -- [**CS8625**](#possible-null-assigned-to-a-nonnullable-reference) - *Cannot convert null literal to non-nullable reference type.* -- [**CS8629**](#possible-null-assigned-to-a-nonnullable-reference) - *Nullable value type may be null.* -- [**CS8618**](#nonnullable-reference-not-initialized) - *Non-nullable variable must contain a non-null value when exiting constructor. Consider declaring it as nullable.* -- [**CS8762**](#nonnullable-reference-not-initialized) - *Parameter must have a non-null value when exiting.* -- [**CS8619**](#mismatch-in-nullability-declaration) - *Nullability of reference types in value doesn't match target type.* -- [**CS8621**](#mismatch-in-nullability-declaration) - *Nullability of reference types in return type doesn't match the target delegate (possibly because of nullability attributes).* -- [**CS8622**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes).* -- [**CS8631**](#mismatch-in-nullability-declaration) - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match constraint type.* -- [**CS8634**](#mismatch-in-nullability-declaration) - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint.* -- [**CS8714**](#mismatch-in-nullability-declaration) - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.* +- [**CS8605**](#possible-null-assigned-to-a-nonnullable-reference) - *Unboxing a possibly null value.* +- [**CS8607**](#code-doesnt-match-attribute-declaration) - *A possible null value may not be used for a type marked with `[NotNull]` or `[DisallowNull]`* - [**CS8608**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type doesn't match overridden member.* - [**CS8609**](#mismatch-in-nullability-declaration) - *Nullability of reference types in return type doesn't match overridden member.* -- [**CS8819**](#mismatch-in-nullability-declaration) - *Nullability of reference types in return type doesn't match partial method declaration.* - [**CS8610**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type parameter doesn't match overridden member.* - [**CS8611**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type parameter doesn't match partial method declaration.* - [**CS8612**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type doesn't match implicitly implemented member.* @@ -143,29 +133,40 @@ This article covers the following compiler warnings: - [**CS8615**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type doesn't match implemented member.* - [**CS8616**](#mismatch-in-nullability-declaration) - *Nullability of reference types in return type doesn't match implemented member.* - [**CS8617**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type of parameter doesn't match implemented member.* +- [**CS8618**](#nonnullable-reference-not-initialized) - *Non-nullable variable must contain a non-null value when exiting constructor. Consider declaring it as nullable.* +- [**CS8619**](#mismatch-in-nullability-declaration) - *Nullability of reference types in value doesn't match target type.* +- [**CS8620**](#mismatch-in-nullability-declaration) - *Argument cannot be used for parameter due to differences in the nullability of reference types.* +- [**CS8621**](#mismatch-in-nullability-declaration) - *Nullability of reference types in return type doesn't match the target delegate (possibly because of nullability attributes).* +- [**CS8622**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes).* +- [**CS8624**](#mismatch-in-nullability-declaration) - *Argument cannot be used as an output due to differences in the nullability of reference types.* +- [**CS8625**](#possible-null-assigned-to-a-nonnullable-reference) - *Cannot convert null literal to non-nullable reference type.* +- [**CS8629**](#possible-null-assigned-to-a-nonnullable-reference) - *Nullable value type may be null.* +- [**CS8631**](#mismatch-in-nullability-declaration) - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match constraint type.* - [**CS8633**](#mismatch-in-nullability-declaration) - *Nullability in constraints for type parameter of method doesn't match the constraints for type parameter of interface method. Consider using an explicit interface implementation instead.* +- [**CS8634**](#mismatch-in-nullability-declaration) - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint.* - [**CS8643**](#mismatch-in-nullability-declaration) - *Nullability of reference types in explicit interface specifier doesn't match interface implemented by the type.* - [**CS8644**](#mismatch-in-nullability-declaration) - *Type does not implement interface member. Nullability of reference types in interface implemented by the base type doesn't match.* -- [**CS8620**](#mismatch-in-nullability-declaration) - *Argument cannot be used for parameter due to differences in the nullability of reference types.* -- [**CS8624**](#mismatch-in-nullability-declaration) - *Argument cannot be used as an output due to differences in the nullability of reference types.* - [**CS8645**](#mismatch-in-nullability-declaration) - *Member is already listed in the interface list on type with different nullability of reference types.* +- [**CS8655**](#exhaustive-switch-expression) - *The switch expression does not handle some null inputs (it is not exhaustive).* - [**CS8667**](#mismatch-in-nullability-declaration) - *Partial method declarations have inconsistent nullability in constraints for type parameter.* +- [**CS8670**](#possible-dereference-of-null) - *Object or collection initializer implicitly dereferences possibly null member.* +- [**CS8714**](#mismatch-in-nullability-declaration) - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.* +- [**CS8762**](#nonnullable-reference-not-initialized) - *Parameter must have a non-null value when exiting.* +- [**CS8763**](#code-doesnt-match-attribute-declaration) - *A method marked `[DoesNotReturn]` should not return.* - [**CS8764**](#mismatch-in-nullability-declaration) - *Nullability of return type doesn't match overridden member (possibly because of nullability attributes).* - [**CS8765**](#mismatch-in-nullability-declaration) - *Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes).* -- [**CS8768**](#mismatch-in-nullability-declaration) - *Nullability of reference types in return type doesn't match implemented member (possibly because of nullability attributes).* -- [**CS8767**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type of parameter of doesn't match implicitly implemented member (possibly because of nullability attributes).* - [**CS8766**](#mismatch-in-nullability-declaration) - *Nullability of reference types in return type of doesn't match implicitly implemented member (possibly because of nullability attributes).* +- [**CS8767**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type of parameter of doesn't match implicitly implemented member (possibly because of nullability attributes).* +- [**CS8768**](#mismatch-in-nullability-declaration) - *Nullability of reference types in return type doesn't match implemented member (possibly because of nullability attributes).* - [**CS8769**](#mismatch-in-nullability-declaration) - *Nullability of reference types in type of parameter doesn't match implemented member (possibly because of nullability attributes).* -- [**CS8607**](#code-doesnt-match-attribute-declaration) - *A possible null value may not be used for a type marked with `[NotNull]` or `[DisallowNull]`* -- [**CS8763**](#code-doesnt-match-attribute-declaration) - *A method marked `[DoesNotReturn]` should not return.* - [**CS8770**](#code-doesnt-match-attribute-declaration) - *Method lacks `[DoesNotReturn]` annotation to match implemented or overridden member.* - [**CS8774**](#code-doesnt-match-attribute-declaration) - *Member must have a non-null value when exiting.* - [**CS8776**](#code-doesnt-match-attribute-declaration) - *Member cannot be used in this attribute.* - [**CS8775**](#code-doesnt-match-attribute-declaration) - *Member must have a non-null value when exiting.* - [**CS8777**](#code-doesnt-match-attribute-declaration) - *Parameter must have a non-null value when exiting.* +- [**CS8819**](#mismatch-in-nullability-declaration) - *Nullability of reference types in return type doesn't match partial method declaration.* - [**CS8824**](#code-doesnt-match-attribute-declaration) - *Parameter must have a non-null value when exiting because parameter is non-null.* - [**CS8825**](#code-doesnt-match-attribute-declaration) - *Return value must be non-null because parameter is non-null.* -- [**CS8655**](#exhaustive-switch-expression) - *The switch expression does not handle some null inputs (it is not exhaustive).* - [**CS8847**](#exhaustive-switch-expression) - *The switch expression does not handle some null inputs (it is not exhaustive). However, a pattern with a 'when' clause might successfully match this value.* The purpose of nullable warnings is to minimize the chance that your application throws a <xref:System.NullReferenceException?displayProperty=nameWithType> when run. To achieve this goal, the compiler uses static analysis and issues warnings when your code has constructs that may lead to null reference exceptions. You provide the compiler with information for its static analysis by applying type annotations and attributes. These annotations and attributes describe the nullability of arguments, parameters, and members of your types. In this article, you'll learn different techniques to address the nullable warnings the compiler generates from its static analysis. The techniques described here are for general C# code. Learn to work with nullable reference types and Entity Framework core in [Working with nullable reference types](/ef/core/miscellaneous/nullable-reference-types). @@ -225,12 +226,12 @@ Fixing a warning for dereferencing a *maybe-null* variable involves one of three This set of warnings alerts you that you're assigning a variable whose type is nonnullable to an expression whose *null-state* is *maybe-null*. These warnings are: +- **CS8597** - *Thrown value may be null.* +- **CS8600** - *Converting null literal or possible null value to non-nullable type.* - **CS8601** - *Possible null reference assignment.* -- **CS8605** - *Unboxing a possibly null value.* - **CS8603** - *Possible null reference return.* - **CS8604** - *Possible null reference argument for parameter.* -- **CS8600** - *Converting null literal or possible null value to non-nullable type.* -- **CS8597** - *Thrown value may be null.* +- **CS8605** - *Unboxing a possibly null value.* - **CS8625** - *Cannot convert null literal to non-nullable reference type.* - **CS8629** - *Nullable value type may be null.* @@ -303,15 +304,8 @@ Fixing a warning for not initializing a nonnullable member involves one of four Many warnings indicate nullability mismatches between signatures for methods, delegates, or type parameters. -- **CS8619** - *Nullability of reference types in value doesn't match target type.* -- **CS8621** - *Nullability of reference types in return type doesn't match the target delegate (possibly because of nullability attributes).* -- **CS8622** - *Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes).* -- **CS8631** - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match constraint type.* -- **CS8634** - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint.* -- **CS8714** - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.* - **CS8608** - *Nullability of reference types in type doesn't match overridden member.* - **CS8609** - *Nullability of reference types in return type doesn't match overridden member.* -- **CS8819** - *Nullability of reference types in return type doesn't match partial method declaration.* - **CS8610** - *Nullability of reference types in type parameter doesn't match overridden member.* - **CS8611** - *Nullability of reference types in type parameter doesn't match partial method declaration.* - **CS8612** - *Nullability of reference types in type doesn't match implicitly implemented member.* @@ -320,19 +314,26 @@ Many warnings indicate nullability mismatches between signatures for methods, de - **CS8615** - *Nullability of reference types in type doesn't match implemented member.* - **CS8616** - *Nullability of reference types in return type doesn't match implemented member.* - **CS8617** - *Nullability of reference types in type of parameter doesn't match implemented member.* +- **CS8619** - *Nullability of reference types in value doesn't match target type.* +- **CS8620** - *Argument cannot be used for parameter due to differences in the nullability of reference types.* +- **CS8621** - *Nullability of reference types in return type doesn't match the target delegate (possibly because of nullability attributes).* +- **CS8622** - *Nullability of reference types in type of parameter doesn't match the target delegate (possibly because of nullability attributes).* +- **CS8624** - *Argument cannot be used as an output due to differences in the nullability of reference types.* +- **CS8631** - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match constraint type.* - **CS8633** - *Nullability in constraints for type parameter of method doesn't match the constraints for type parameter of interface method. Consider using an explicit interface implementation instead.* +- **CS8634** - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint.* - **CS8643** - *Nullability of reference types in explicit interface specifier doesn't match interface implemented by the type.* - **CS8644** - *Type does not implement interface member. Nullability of reference types in interface implemented by the base type doesn't match.* -- **CS8620** - *Argument cannot be used for parameter due to differences in the nullability of reference types.* -- **CS8624** - *Argument cannot be used as an output due to differences in the nullability of reference types.* - **CS8645** - *Member is already listed in the interface list on type with different nullability of reference types.* - **CS8667** - *Partial method declarations have inconsistent nullability in constraints for type parameter.* +- **CS8714** - *The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.* - **CS8764** - *Nullability of return type doesn't match overridden member (possibly because of nullability attributes).* - **CS8765** - *Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes).* -- **CS8768** - *Nullability of reference types in return type doesn't match implemented member (possibly because of nullability attributes).* -- **CS8767** - *Nullability of reference types in type of parameter of doesn't match implicitly implemented member (possibly because of nullability attributes).* - **CS8766** - *Nullability of reference types in return type of doesn't match implicitly implemented member (possibly because of nullability attributes).* +- **CS8767** - *Nullability of reference types in type of parameter of doesn't match implicitly implemented member (possibly because of nullability attributes).* +- **CS8768** - *Nullability of reference types in return type doesn't match implemented member (possibly because of nullability attributes).* - **CS8769** - *Nullability of reference types in type of parameter doesn't match implemented member (possibly because of nullability attributes).* +- **CS8819** - *Nullability of reference types in return type doesn't match partial method declaration.* The following code demonstrates *CS8764*: @@ -352,8 +353,8 @@ The preceding sections have discussed how you can use [Attributes for nullable s - **CS8763** - *A method marked `[DoesNotReturn]` should not return.* - **CS8770** - *Method lacks `[DoesNotReturn]` annotation to match implemented or overridden member.* - **CS8774** - *Member must have a non-null value when exiting.* -- **CS8776** - *Member cannot be used in this attribute.* - **CS8775** - *Member must have a non-null value when exiting.* +- **CS8776** - *Member cannot be used in this attribute.* - **CS8777** - *Parameter must have a non-null value when exiting.* - **CS8824** - *Parameter must have a non-null value when exiting because parameter is non-null.* - **CS8825** - *Return value must be non-null because parameter is non-null.* diff --git a/docs/csharp/language-reference/compiler-messages/snippets/null-warnings/null-warnings.csproj b/docs/csharp/language-reference/compiler-messages/snippets/null-warnings/null-warnings.csproj index 247db0e2c08e4..9c6f3a39db0fe 100644 --- a/docs/csharp/language-reference/compiler-messages/snippets/null-warnings/null-warnings.csproj +++ b/docs/csharp/language-reference/compiler-messages/snippets/null-warnings/null-warnings.csproj @@ -9,7 +9,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.2" /> + <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.4" /> </ItemGroup> </Project> diff --git a/docs/csharp/language-reference/compiler-options/code-generation.md b/docs/csharp/language-reference/compiler-options/code-generation.md index 05a43381e2794..52739538344e0 100644 --- a/docs/csharp/language-reference/compiler-options/code-generation.md +++ b/docs/csharp/language-reference/compiler-options/code-generation.md @@ -62,7 +62,7 @@ Causes the compiler to produce an assembly whose byte-for-byte output is identic <Deterministic>true</Deterministic> ``` -By default, compiler output from a given set of inputs is unique, since the compiler adds a timestamp and an MVID that is generated from random numbers. You use the `<Deterministic>` option to produce a *deterministic assembly*, one whose binary content is identical across compilations as long as the input remains the same. In such a build, the timestamp and MVID fields will be replaced with values derived from a hash of all the compilation inputs. The compiler considers the following inputs that affect determinism: +By default, compiler output from a given set of inputs is unique, since the compiler adds a timestamp and an MVID (a <xref:System.Reflection.Module.ModuleVersionId%2A?displayProperty=nameWithType>. Basically it is a GUID that uniquely identifies the module and version.) that is generated from random numbers. You use the `<Deterministic>` option to produce a *deterministic assembly*, one whose binary content is identical across compilations as long as the input remains the same. In such a build, the timestamp and MVID fields will be replaced with values derived from a hash of all the compilation inputs. The compiler considers the following inputs that affect determinism: - The sequence of command-line parameters. - The contents of the compiler's .rsp response file. diff --git a/docs/csharp/language-reference/index.md b/docs/csharp/language-reference/index.md index d79c768f3889c..f7c4f2c279e8e 100644 --- a/docs/csharp/language-reference/index.md +++ b/docs/csharp/language-reference/index.md @@ -51,7 +51,7 @@ The features that have been implemented in C# versions after 6.0, including thos [C# 7.2 Specification Proposals](~/_csharplang/proposals/csharp-7.2/readonly-ref.md) C# 7.2 added a number of small features. You can pass arguments by readonly reference using the `in` keyword. There are a number of low-level changes to support compile-time safety for `Span` and related types. You can use named arguments where later arguments are positional, in some situations. The `private protected` access modifier enables you to specify that callers are limited to derived types implemented in the same assembly. The `?:` operator can resolve to a reference to a variable. You can also format hexadecimal and binary numbers using a leading digit separator. - [C# 7.3 Specification Proposals](~/_csharplang/proposals/csharp-7.3/blittable.md) + [C# 7.3 Specification Proposals](~/_csharplang/proposals/csharp-7.3/indexing-movable-fixed-fields.md) C# 7.3 is another point release that includes several small updates. You can use new constraints on generic type parameters. Other changes make it easier to work with `fixed` fields, including using [`stackalloc`](./operators/stackalloc.md) allocations. Local variables declared with the `ref` keyword may be reassigned to refer to new storage. You can place attributes on auto-implemented properties that target the compiler-generated backing field. Expression variables can be used in initializers. Tuples can be compared for equality (or inequality). There have also been some improvements to overload resolution. [C# 8.0 Specification Proposals](~/_csharplang/proposals/csharp-8.0/nullable-reference-types.md) diff --git a/docs/csharp/language-reference/keywords/async.md b/docs/csharp/language-reference/keywords/async.md index b5f1c55b90e5e..9af9b5b29ae1c 100644 --- a/docs/csharp/language-reference/keywords/async.md +++ b/docs/csharp/language-reference/keywords/async.md @@ -22,7 +22,7 @@ public async Task<int> ExampleMethodAsync() } ``` -If you're new to asynchronous programming or do not understand how an async method uses the [`await` operator](../operators/await.md) to do potentially long-running work without blocking the caller's thread, read the introduction in [Asynchronous programming with async and await](../../programming-guide/concepts/async/index.md). The following code is found inside an async method and calls the <xref:System.Net.Http.HttpClient.GetStringAsync%2a?displayProperty=nameWithType> method: +If you're new to asynchronous programming or do not understand how an async method uses the [`await` operator](../operators/await.md) to do potentially long-running work without blocking the caller's thread, read the introduction in [Asynchronous programming with async and await](../../asynchronous-programming/index.md). The following code is found inside an async method and calls the <xref:System.Net.Http.HttpClient.GetStringAsync%2a?displayProperty=nameWithType> method: ```csharp string contents = await httpClient.GetStringAsync(requestUrl); @@ -61,7 +61,7 @@ To run the code as a Windows Store app: [!code-csharp[wpf-async](../../../../samples/snippets/csharp/language-reference/keywords/async/wpf/MainWindow.xaml.cs#1)] > [!IMPORTANT] -> For more information about tasks and the code that executes while waiting for a task, see [Asynchronous programming with async and await](../../programming-guide/concepts/async/index.md). For a full console example that uses similar elements, see [Process asynchronous tasks as they complete (C#)](../../programming-guide/concepts/async/start-multiple-async-tasks-and-process-them-as-they-complete.md). +> For more information about tasks and the code that executes while waiting for a task, see [Asynchronous programming with async and await](../../asynchronous-programming/index.md). For a full console example that uses similar elements, see [Process asynchronous tasks as they complete (C#)](../../asynchronous-programming/start-multiple-async-tasks-and-process-them-as-they-complete.md). ## Return Types @@ -80,11 +80,12 @@ You use the `void` return type primarily to define event handlers, which require You return another type, typically a value type, that has a `GetAwaiter` method to minimize memory allocations in performance-critical sections of code. -For more information and examples, see [Async Return Types](../../programming-guide/concepts/async/async-return-types.md). +For more information and examples, see [Async Return Types](../../asynchronous-programming/async-return-types.md). ## See also - <xref:System.Runtime.CompilerServices.AsyncStateMachineAttribute> - [await](../operators/await.md) -- [Asynchronous programming with async and await](../../programming-guide/concepts/async/index.md) -- [Process asynchronous tasks as they complete](../../programming-guide/concepts/async/start-multiple-async-tasks-and-process-them-as-they-complete.md) +- [Asynchronous programming with async and await](../../asynchronous-programming/index.md) +- [Process asynchronous tasks as they complete](../../asynchronous-programming/start-multiple-async-tasks-and-process-them-as-they-complete.md) +- [.NET blog: How async/await really works in C#](https://devblogs.microsoft.com/dotnet/how-async-await-really-works/) diff --git a/docs/csharp/language-reference/keywords/base.md b/docs/csharp/language-reference/keywords/base.md index 169055851afe8..3528d3ccd2a6d 100644 --- a/docs/csharp/language-reference/keywords/base.md +++ b/docs/csharp/language-reference/keywords/base.md @@ -26,7 +26,7 @@ The base class that is accessed is the base class specified in the class declara ## Example 1 -In this example, both the base class `Person` and the derived class `Employee` have a method named `Getinfo`. By using the `base` keyword, it is possible to call the `Getinfo` method of the base class from within the derived class. +In this example, both the base class `Person` and the derived class `Employee` have a method named `GetInfo`. By using the `base` keyword, it is possible to call the `GetInfo` method of the base class from within the derived class. [!code-csharp[csrefKeywordsAccess#1](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsAccess/CS/csrefKeywordsAccess.cs#1)] diff --git a/docs/csharp/language-reference/keywords/in-parameter-modifier.md b/docs/csharp/language-reference/keywords/in-parameter-modifier.md index 584567901255f..5d89ce503d3bb 100644 --- a/docs/csharp/language-reference/keywords/in-parameter-modifier.md +++ b/docs/csharp/language-reference/keywords/in-parameter-modifier.md @@ -113,7 +113,7 @@ You can't use the `in`, `ref`, and `out` keywords for the following kinds of met - The first argument of an extension method cannot have the `in` modifier unless that argument is a struct. - The first argument of an extension method where that argument is a generic type (even when that type is constrained to be a struct.) -You can learn more about the `in` modifier, how it differs from `ref` and `out` in the article on [Write safe efficient code](../../write-safe-efficient-code.md). +You can learn more about the `in` modifier, how it differs from `ref` and `out` in the article on [allocations](../../advanced-topics/performance/index.md). ## C# Language Specification diff --git a/docs/csharp/language-reference/keywords/method-parameters.md b/docs/csharp/language-reference/keywords/method-parameters.md index f1867a945c0f7..4bfbdad4e202b 100644 --- a/docs/csharp/language-reference/keywords/method-parameters.md +++ b/docs/csharp/language-reference/keywords/method-parameters.md @@ -107,4 +107,4 @@ This section describes the keywords you can use when declaring method parameters - [C# Reference](../index.md) - [C# Keywords](./index.md) -- [Argument lists](~/_csharpstandard/standard/expressions.md#1162-argument-lists) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +- [Argument lists](~/_csharpstandard/standard/expressions.md#1262-argument-lists) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. diff --git a/docs/csharp/language-reference/keywords/new-constraint.md b/docs/csharp/language-reference/keywords/new-constraint.md index 23b842ceec293..172d8eb1d558a 100644 --- a/docs/csharp/language-reference/keywords/new-constraint.md +++ b/docs/csharp/language-reference/keywords/new-constraint.md @@ -24,7 +24,7 @@ You can also use the `new` keyword to [create an instance of a type](../operator ## C# language specification -For more information, see the [Type parameter constraints](~/_csharpstandard/standard/classes.md#1425-type-parameter-constraints) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Type parameter constraints](~/_csharpstandard/standard/classes.md#1525-type-parameter-constraints) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/keywords/new-modifier.md b/docs/csharp/language-reference/keywords/new-modifier.md index b4fb54f716152..a6a1069dceb52 100644 --- a/docs/csharp/language-reference/keywords/new-modifier.md +++ b/docs/csharp/language-reference/keywords/new-modifier.md @@ -20,7 +20,7 @@ In this example, `BaseC.Invoke` is hidden by `DerivedC.Invoke`. The field `x` is Name hiding through inheritance takes one of the following forms: -- Generally, a constant, field, property, or type that is introduced in a class or struct hides all base class members that share its name. There are special cases. For example, if you declare a new field with name `N` to have a type that is not invocable, and a base type declares `N` to be a method, the new field does not hide the base declaration in invocation syntax. For more information, see the [Member lookup](~/_csharpstandard/standard/expressions.md#115-member-lookup) section of the [C# language specification](~/_csharpstandard/standard/README.md). +- Generally, a constant, field, property, or type that is introduced in a class or struct hides all base class members that share its name. There are special cases. For example, if you declare a new field with name `N` to have a type that is not invocable, and a base type declares `N` to be a method, the new field does not hide the base declaration in invocation syntax. For more information, see the [Member lookup](~/_csharpstandard/standard/expressions.md#125-member-lookup) section of the [C# language specification](~/_csharpstandard/standard/README.md). - A method introduced in a class or struct hides properties, fields, and types that share that name in the base class. It also hides all base class methods that have the same signature. @@ -48,7 +48,7 @@ The keyword new is required on 'MyDerivedC.x' because it hides inherited member ## C# language specification -For more information, see [The new modifier](~/_csharpstandard/standard/classes.md#1435-the-new-modifier) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see [The new modifier](~/_csharpstandard/standard/classes.md#1535-the-new-modifier) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/keywords/override.md b/docs/csharp/language-reference/keywords/override.md index d055e5a543566..4bdac94f489fc 100644 --- a/docs/csharp/language-reference/keywords/override.md +++ b/docs/csharp/language-reference/keywords/override.md @@ -37,7 +37,7 @@ This example defines a base class named `Employee`, and a derived class named `S ## C# language specification -For more information, see the [Override methods](~/_csharpstandard/standard/classes.md#1465-override-methods) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Override methods](~/_csharpstandard/standard/classes.md#1565-override-methods) section of the [C# language specification](~/_csharpstandard/standard/README.md). For more information about covariant return types, see the [feature proposal note](~/_csharplang/proposals/csharp-9.0/covariant-returns.md). diff --git a/docs/csharp/language-reference/keywords/ref.md b/docs/csharp/language-reference/keywords/ref.md index a77886ef39806..33b65c5a74bdd 100644 --- a/docs/csharp/language-reference/keywords/ref.md +++ b/docs/csharp/language-reference/keywords/ref.md @@ -161,7 +161,7 @@ The `Span<T>` type stores a reference through which it accesses the consecutive ## See also -- [Write safe efficient code](../../write-safe-efficient-code.md) +- [Avoid allocations](../../advanced-topics/performance/index.md) - [Ref locals](../statements/declarations.md#ref-locals) - [Conditional ref expression](../operators/conditional-operator.md#conditional-ref-expression) - [Method Parameters](method-parameters.md) diff --git a/docs/csharp/language-reference/keywords/required.md b/docs/csharp/language-reference/keywords/required.md index dd6c2c041782e..d0736c58270ae 100644 --- a/docs/csharp/language-reference/keywords/required.md +++ b/docs/csharp/language-reference/keywords/required.md @@ -1,7 +1,7 @@ --- description: "required modifier - C# Reference" title: "required modifier - C# Reference" -ms.date: 07/20/2022 +ms.date: 01/30/2023 f1_keywords: - "required_CSharpKeyword" helpviewer_keywords: @@ -9,7 +9,7 @@ helpviewer_keywords: --- # required modifier (C# Reference) -The `required` modifier indicates that the *field* or *property* it's applied to must be initialized by all constructors or by using an [object initializer](../../programming-guide/classes-and-structs/object-and-collection-initializers.md). Any expression that initializes a new instance of the type must initialize all *required members*. The `required` modifier is available beginning with C# 11. The `required` modifier enables developers to create types where properties or fields must be properly initialized, yet still allow initialization using object initializers. Several rules ensure this behavior: +The `required` modifier indicates that the *field* or *property* it's applied to must be initialized by an [object initializer](../../programming-guide/classes-and-structs/object-and-collection-initializers.md). Any expression that initializes a new instance of the type must initialize all *required members*. The `required` modifier is available beginning with C# 11. The `required` modifier enables developers to create types where properties or fields must be properly initialized, yet still allow initialization using object initializers. Several rules ensure this behavior: - The `required` modifier can be applied to *fields* and *properties* declared in `struct`, and `class` types, including `record` and `record struct` types. The `required` modifier can't be applied to members of an `interface`. - Explicit interface implementations can't be marked as `required`. They can't be set in object initializers. diff --git a/docs/csharp/language-reference/keywords/snippets/Program.cs b/docs/csharp/language-reference/keywords/snippets/Program.cs index e3c92d7f65c21..6a831f54c13e9 100644 --- a/docs/csharp/language-reference/keywords/snippets/Program.cs +++ b/docs/csharp/language-reference/keywords/snippets/Program.cs @@ -11,8 +11,6 @@ static async Task Main(string[] args) GenericWhereConstraints.Examples(); Console.WriteLine("================= readonly Keyword Examples ======================"); ReadonlyKeywordExamples.Examples(); - Console.WriteLine("================= using Keyword Examples ======================"); - UsingStatements.Examples(); Console.WriteLine("================= try-catch Keyword Examples ======================"); await AsyncExceptionExamples.Examples(); Console.WriteLine("================= pass by value / reference Keyword Examples ======================"); diff --git a/docs/csharp/language-reference/keywords/snippets/usings.cs b/docs/csharp/language-reference/keywords/snippets/usings.cs deleted file mode 100644 index 75ddcd8e9fbaa..0000000000000 --- a/docs/csharp/language-reference/keywords/snippets/usings.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using System.IO; - -namespace Keywords -{ - public static class UsingStatements - { - public static void Examples() - { - UsingExample(); - ModernUsing(); - TryFinallyExample(); - DeclareMultipleVariables(); - ModernMultipleVariables(); - DeclareBeforeUsing(); - } - - private static void UsingExample() - { - // <SnippetFirstExample> - string manyLines = @"This is line one - This is line two - Here is line three - The penultimate line is line four - This is the final, fifth line."; - - using (var reader = new StringReader(manyLines)) - { - string? item; - do - { - item = reader.ReadLine(); - Console.WriteLine(item); - } while (item != null); - } - // </SnippetFirstExample> - } - - private static void ModernUsing() - { - // <SnippetModernUsing> - string manyLines = @"This is line one - This is line two - Here is line three - The penultimate line is line four - This is the final, fifth line."; - - using var reader = new StringReader(manyLines); - string? item; - do - { - item = reader.ReadLine(); - Console.WriteLine(item); - } while (item != null); - // </SnippetModernUsing> - } - - private static void TryFinallyExample() - { - // The extra braces are necessary for the explanation. Do not remove them. - // <SnippetTryFinallyExample> - string manyLines = @"This is line one - This is line two - Here is line three - The penultimate line is line four - This is the final, fifth line."; - - { - var reader = new StringReader(manyLines); - try - { - string? item; - do - { - item = reader.ReadLine(); - Console.WriteLine(item); - } while (item != null); - } - finally - { - reader?.Dispose(); - } - } - // </SnippetTryFinallyExample> - } - - private static void DeclareMultipleVariables() - { - // <SnippetDeclareMultipleVariables> - string numbers = @"One - Two - Three - Four."; - string letters = @"A - B - C - D."; - - using (StringReader left = new StringReader(numbers), - right = new StringReader(letters)) - { - string? item; - do - { - item = left.ReadLine(); - Console.Write(item); - Console.Write(" "); - item = right.ReadLine(); - Console.WriteLine(item); - } while (item != null); - } - // </SnippetDeclareMultipleVariables> - } - - private static void ModernMultipleVariables() - { - // <SnippetModernMultipleVariables> - string numbers = @"One - Two - Three - Four."; - string letters = @"A - B - C - D."; - - using StringReader left = new StringReader(numbers), - right = new StringReader(letters); - string? item; - do - { - item = left.ReadLine(); - Console.Write(item); - Console.Write(" "); - item = right.ReadLine(); - Console.WriteLine(item); - } while (item != null); - // </SnippetModernMultipleVariables> - } - - private static void DeclareBeforeUsing() - { - // <SnippetDeclareBeforeUsing> - string manyLines = @"This is line one - This is line two - Here is line three - The penultimate line is line four - This is the final, fifth line."; - - var reader = new StringReader(manyLines); - using (reader) - { - string? item; - do - { - item = reader.ReadLine(); - Console.WriteLine(item); - } while (item != null); - } - // reader is in scope here, but has been disposed - // </SnippetDeclareBeforeUsing> - } - } -} diff --git a/docs/csharp/language-reference/keywords/try-catch-finally.md b/docs/csharp/language-reference/keywords/try-catch-finally.md index 2b77e09be55d7..acceab4fb77c8 100644 --- a/docs/csharp/language-reference/keywords/try-catch-finally.md +++ b/docs/csharp/language-reference/keywords/try-catch-finally.md @@ -22,7 +22,7 @@ A common usage of `catch` and `finally` together is to obtain and use resources ## C# language specification -For more information, see [The try statement](~/_csharpstandard/standard/statements.md#1211-the-try-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see [The try statement](~/_csharpstandard/standard/statements.md#1311-the-try-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also @@ -32,4 +32,3 @@ For more information, see [The try statement](~/_csharpstandard/standard/stateme - [try, throw, and catch Statements (C++)](/cpp/cpp/try-throw-and-catch-statements-cpp) - [throw](throw.md) - [How to: Explicitly Throw Exceptions](../../../standard/exceptions/how-to-explicitly-throw-exceptions.md) -- [using Statement](using-statement.md) diff --git a/docs/csharp/language-reference/keywords/try-catch.md b/docs/csharp/language-reference/keywords/try-catch.md index bad6840e1c292..cd1d469cf4f3a 100644 --- a/docs/csharp/language-reference/keywords/try-catch.md +++ b/docs/csharp/language-reference/keywords/try-catch.md @@ -128,7 +128,7 @@ For more information about catch, see [try-catch-finally](try-catch-finally.md). An async method is marked by an [async](async.md) modifier and usually contains one or more await expressions or statements. An await expression applies the [await](../operators/await.md) operator to a <xref:System.Threading.Tasks.Task> or <xref:System.Threading.Tasks.Task%601>. -When control reaches an `await` in the async method, progress in the method is suspended until the awaited task completes. When the task is complete, execution can resume in the method. For more information, see [Asynchronous programming with async and await](../../programming-guide/concepts/async/index.md). +When control reaches an `await` in the async method, progress in the method is suspended until the awaited task completes. When the task is complete, execution can resume in the method. For more information, see [Asynchronous programming with async and await](../../asynchronous-programming/index.md). The completed task to which `await` is applied might be in a faulted state because of an unhandled exception in the method that returns the task. Awaiting the task throws an exception. A task can also end up in a canceled state if the asynchronous process that returns it is canceled. Awaiting a canceled task throws an `OperationCanceledException`. @@ -172,7 +172,7 @@ Each of the three tasks causes an exception. The `catch` block iterates through ## C# language specification -For more information, see [The try statement](~/_csharpstandard/standard/statements.md#1211-the-try-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see [The try statement](~/_csharpstandard/standard/statements.md#1311-the-try-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/keywords/try-finally.md b/docs/csharp/language-reference/keywords/try-finally.md index 9cc84f0b74449..c1ad92d694fd7 100644 --- a/docs/csharp/language-reference/keywords/try-finally.md +++ b/docs/csharp/language-reference/keywords/try-finally.md @@ -30,11 +30,11 @@ In the following example, an exception from the `TryCast` method is caught in a For more information about `finally`, see [try-catch-finally](try-catch-finally.md). -C# also contains the [using statement](using-statement.md), which provides similar functionality for <xref:System.IDisposable> objects in a convenient syntax. +C# also contains the [using statement](../statements/using.md), which provides similar functionality for <xref:System.IDisposable> objects in a convenient syntax. ## C# language specification -For more information, see [The try statement](~/_csharpstandard/standard/statements.md#1211-the-try-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see [The try statement](~/_csharpstandard/standard/statements.md#1311-the-try-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/keywords/using-directive.md b/docs/csharp/language-reference/keywords/using-directive.md index e915043e6ea30..9efdbf9bd5418 100644 --- a/docs/csharp/language-reference/keywords/using-directive.md +++ b/docs/csharp/language-reference/keywords/using-directive.md @@ -32,7 +32,7 @@ using Project = PC.MyCompany.Project; You can use the `global` modifier on a *using alias directive*. > [!NOTE] -> The `using` keyword is also used to create *using statements*, which help ensure that <xref:System.IDisposable> objects such as files and fonts are handled correctly. For more information about the *using statement*, see [using Statement](using-statement.md). +> The `using` keyword is also used to create *using statements*, which help ensure that <xref:System.IDisposable> objects such as files and fonts are handled correctly. For more information about the *using statement*, see [using statement](../statements/using.md). The scope of a `using` directive without the `global` modifier is the file in which it appears. @@ -158,6 +158,8 @@ The following example shows how to define a `using` directive and a `using` alia :::code language="csharp" source="./snippets/csrefKeywordsNamespace2.cs" id="Snippet9"::: +Beginning with C# 12, you can create aliases for types that were previously restricted, including tuple types, pointer types, and other unsafe types. For more information on the udpated rules, see the [feature spec](~/_csharplang/proposals/using-alias-types.md). + ## How to use the Visual Basic `My` namespace The <xref:Microsoft.VisualBasic.MyServices> namespace (`My` in Visual Basic) provides easy and intuitive access to a number of .NET classes, enabling you to write code that interacts with the computer, application, settings, resources, and so on. Although originally designed for use with Visual Basic, the `MyServices` namespace can be used in C# applications. @@ -170,16 +172,15 @@ You need to add a reference to the *Microsoft.VisualBasic.dll* assembly in your ## C# language specification -For more information, see [Using directives](~/_csharpstandard/standard/namespaces.md#135-using-directives) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +For more information, see [Using directives](~/_csharpstandard/standard/namespaces.md#145-using-directives) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. For more information on the *global using* modifier, see the [global usings feature specification - C# 10](~/_csharplang/proposals/csharp-10.0/GlobalUsingDirective.md). ## See also +- [C# reference](../index.md) +- [C# keywords](index.md) +- [Namespaces](../../fundamentals/types/namespaces.md) - [Style rule IDE0005 - Remove unnecessary 'using' directives](../../../fundamentals/code-analysis/style-rules/ide0005.md) - [Style rule IDE0065 - 'using' directive placement](../../../fundamentals/code-analysis/style-rules/ide0065.md) -- [C# Reference](../index.md) -- [C# Programming Guide](../../programming-guide/index.md) -- [C# Keywords](index.md) -- [Namespaces](../../fundamentals/types/namespaces.md) -- [using Statement](using-statement.md) +- [`using` statement](../statements/using.md) diff --git a/docs/csharp/language-reference/keywords/using-statement.md b/docs/csharp/language-reference/keywords/using-statement.md deleted file mode 100644 index 5e3d030b13f11..0000000000000 --- a/docs/csharp/language-reference/keywords/using-statement.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -description: "using statement - C# Reference" -title: "using statement - C# Reference" -ms.date: 11/15/2021 -f1_keywords: - - "using-statement_CSharpKeyword" -helpviewer_keywords: - - "using statement [C#]" -ms.assetid: afc355e6-f0b9-4240-94dd-0d93f17d9fc3 ---- -# using statement (C# Reference) - -The `using` statement provides a convenient syntax that ensures the correct use of <xref:System.IDisposable> objects. The `await using` statement ensures the correct use of <xref:System.IAsyncDisposable> objects. The language supports asynchronous disposable types that implement the <xref:System.IAsyncDisposable?displayProperty=nameWithType> interface. - -## Example - -The following example shows how to use the `using` statement. - -:::code language="csharp" source="snippets/usings.cs" id="SnippetFirstExample"::: - -The *using declaration* doesn't require braces: - -:::code language="csharp" source="snippets/usings.cs" id="SnippetModernUsing"::: - -## Remarks - -<xref:System.IO.File> and <xref:System.Drawing.Font> are examples of managed types that access unmanaged resources (in this case file handles and device contexts). There are many other kinds of unmanaged resources and class library types that encapsulate them. All such types must implement the <xref:System.IDisposable> interface, or the <xref:System.IAsyncDisposable> interface. - -When the lifetime of an `IDisposable` object is limited to a single method, you should declare and instantiate it in the `using` statement or `using` declaration. The `using` declaration calls the <xref:System.IDisposable.Dispose%2A> method on the object in the correct way when it goes out of scope. The `using` statement causes the object itself to go out of scope as soon as <xref:System.IDisposable.Dispose%2A> is called. Within the `using` block, the object is read-only and can't be modified or reassigned. A variable declared with a `using` declaration is read-only. If the object implements `IAsyncDisposable` instead of `IDisposable`, either `using` form calls the <xref:System.IAsyncDisposable.DisposeAsync%2A> and `awaits` the returned <xref:System.Threading.Tasks.ValueTask>. For more information on <xref:System.IAsyncDisposable>, see [Implement a DisposeAsync method](../../../standard/garbage-collection/implementing-disposeasync.md). - -Both `using` forms ensure that <xref:System.IDisposable.Dispose%2A> (or <xref:System.IAsyncDisposable.DisposeAsync%2A>) is called even if an exception occurs within the `using` block. You can achieve the same result by putting the object inside a `try` block and then calling <xref:System.IDisposable.Dispose%2A> (or <xref:System.IAsyncDisposable.DisposeAsync%2A>) in a `finally` block; in fact, this is how the `using` statement and the `using` declaration are translated by the compiler. The code example earlier expands to the following code at compile time (note the extra curly braces to create the limited scope for the object): - -:::code language="csharp" source="snippets/usings.cs" id="SnippetTryFinallyExample"::: - -The newer `using` statement syntax translates to similar code. The `try` block opens where the variable is declared. The `finally` block is added at the close of the enclosing block, typically at the end of a method. - -For more information about the `try`-`finally` statement, see the [try-finally](try-finally.md) article. - -Multiple instances of a type can be declared in a single `using` statement, as shown in the following example. Notice that you can't use implicitly typed variables (`var`) when you declare multiple variables in a single statement: - -:::code language="csharp" source="snippets/usings.cs" id="SnippetDeclareMultipleVariables"::: - -You can combine multiple declarations of the same type using the declaration syntax as well, as shown in the following example: - -:::code language="csharp" source="snippets/usings.cs" id="SnippetModernMultipleVariables"::: - -You can instantiate the resource object and then pass the variable to the `using` statement, but this isn't a best practice. In this case, after control leaves the `using` block, the object remains in scope but probably has no access to its unmanaged resources. In other words, it's not fully initialized anymore. If you try to use the object outside the `using` block, you risk causing an exception to be thrown. For this reason, it's better to instantiate the object in the `using` statement and limit its scope to the `using` block. - -:::code language="csharp" source="snippets/usings.cs" id="SnippetDeclareBeforeUsing"::: - -For more information about disposing of `IDisposable` objects, see [Using objects that implement IDisposable](../../../standard/garbage-collection/using-objects.md). - -## C# language specification - -For more information, see [The using statement](~/_csharpstandard/standard/statements.md#1214-the-using-statement) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. - -## See also - -- [Use simple 'using' statement (style rule IDE0063)](../../../fundamentals/code-analysis/style-rules/ide0063.md) -- [C# Reference](../index.md) -- [C# Programming Guide](../../programming-guide/index.md) -- [C# Keywords](index.md) -- [using Directive](using-directive.md) -- [Garbage Collection](../../../standard/garbage-collection/index.md) -- [Using objects that implement IDisposable](../../../standard/garbage-collection/using-objects.md) -- [IDisposable interface](xref:System.IDisposable) -- [using statement in C# 8.0](~/_csharplang/proposals/csharp-8.0/using.md) -- [Implement a DisposeAsync method](../../../standard/garbage-collection/implementing-disposeasync.md) article. diff --git a/docs/csharp/language-reference/keywords/using.md b/docs/csharp/language-reference/keywords/using.md index 46887f3575929..fee046aa5f99b 100644 --- a/docs/csharp/language-reference/keywords/using.md +++ b/docs/csharp/language-reference/keywords/using.md @@ -1,6 +1,6 @@ --- -description: "using keyword - C# Reference" -title: "using keyword - C# Reference" +title: "using keyword - C# reference" +description: "using keyword - C# reference" ms.date: 04/05/2019 f1_keywords: - "using" @@ -8,17 +8,14 @@ helpviewer_keywords: - "using keyword [C#]" ms.assetid: 124e1a63-2a4b-4132-b269-3b6d8d3ef72d --- -# using (C# Reference) +# using (C# reference) The `using` keyword has two major uses: -- The [using statement](using-statement.md) defines a scope at the end of which an object will be disposed. +- The [using statement](../statements/using.md) defines a scope at the end of which an object is disposed. - The [using directive](using-directive.md) creates an alias for a namespace or imports types defined in other namespaces. ## See also -- [C# Reference](../index.md) -- [C# Programming Guide](../../programming-guide/index.md) -- [C# Keywords](index.md) -- [Namespaces](../../fundamentals/types/namespaces.md) -- [extern](extern.md) +- [C# reference](../index.md) +- [C# keywords](index.md) diff --git a/docs/csharp/language-reference/keywords/volatile.md b/docs/csharp/language-reference/keywords/volatile.md index 95d654b136cdf..223341bfe497e 100644 --- a/docs/csharp/language-reference/keywords/volatile.md +++ b/docs/csharp/language-reference/keywords/volatile.md @@ -47,7 +47,7 @@ With the `volatile` modifier added to the declaration of `_shouldStop` in place, ## See also -- [C# language specification: volatile keyword](~/_csharpstandard/standard/classes.md#1454-volatile-fields) +- [C# language specification: volatile keyword](~/_csharpstandard/standard/classes.md#1554-volatile-fields) - [C# Reference](../index.md) - [C# Programming Guide](../../programming-guide/index.md) - [C# Keywords](index.md) diff --git a/docs/csharp/language-reference/operators/addition-operator.md b/docs/csharp/language-reference/operators/addition-operator.md index b6a598430ff27..d87341e9f795e 100644 --- a/docs/csharp/language-reference/operators/addition-operator.md +++ b/docs/csharp/language-reference/operators/addition-operator.md @@ -72,7 +72,7 @@ A user-defined type can [overload](operator-overloading.md) the `+` operator. Wh ## C# language specification -For more information, see the [Unary plus operator](~/_csharpstandard/standard/expressions.md#1182-unary-plus-operator) and [Addition operator](~/_csharpstandard/standard/expressions.md#1195-addition-operator) sections of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Unary plus operator](~/_csharpstandard/standard/expressions.md#1292-unary-plus-operator) and [Addition operator](~/_csharpstandard/standard/expressions.md#12105-addition-operator) sections of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/arithmetic-operators.md b/docs/csharp/language-reference/operators/arithmetic-operators.md index 9b126a5198fcb..3cdb0eeb919b5 100644 --- a/docs/csharp/language-reference/operators/arithmetic-operators.md +++ b/docs/csharp/language-reference/operators/arithmetic-operators.md @@ -40,7 +40,7 @@ The following operators perform arithmetic operations with operands of numeric t Those operators are supported by all [integral](../builtin-types/integral-numeric-types.md) and [floating-point](../builtin-types/floating-point-numeric-types.md) numeric types. -In the case of integral types, those operators (except the `++` and `--` operators) are defined for the `int`, `uint`, `long`, and `ulong` types. When operands are of other integral types (`sbyte`, `byte`, `short`, `ushort`, or `char`), their values are converted to the `int` type, which is also the result type of an operation. When operands are of different integral or floating-point types, their values are converted to the closest containing type, if such a type exists. For more information, see the [Numeric promotions](~/_csharpstandard/standard/expressions.md#1147-numeric-promotions) section of the [C# language specification](~/_csharpstandard/standard/README.md). The `++` and `--` operators are defined for all integral and floating-point numeric types and the [char](../builtin-types/char.md) type. The result type of a [compound assignment expression](#compound-assignment) is the type of the left-hand operand. +In the case of integral types, those operators (except the `++` and `--` operators) are defined for the `int`, `uint`, `long`, and `ulong` types. When operands are of other integral types (`sbyte`, `byte`, `short`, `ushort`, or `char`), their values are converted to the `int` type, which is also the result type of an operation. When operands are of different integral or floating-point types, their values are converted to the closest containing type, if such a type exists. For more information, see the [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) section of the [C# language specification](~/_csharpstandard/standard/README.md). The `++` and `--` operators are defined for all integral and floating-point numeric types and the [char](../builtin-types/char.md) type. The result type of a [compound assignment expression](#compound-assignment) is the type of the left-hand operand. ## Increment operator ++ @@ -138,7 +138,7 @@ For the `float` and `double` operands, the result of `x % y` for the finite `x` > [!NOTE] > This method of computing the remainder is analogous to that used for integer operands, but different from the IEEE 754 specification. If you need the remainder operation that complies with the IEEE 754 specification, use the <xref:System.Math.IEEERemainder%2A?displayProperty=nameWithType> method. -For information about the behavior of the `%` operator with non-finite operands, see the [Remainder operator](~/_csharpstandard/standard/expressions.md#1194-remainder-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For information about the behavior of the `%` operator with non-finite operands, see the [Remainder operator](~/_csharpstandard/standard/expressions.md#12104-remainder-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). For the `decimal` operands, the remainder operator `%` is equivalent to the [remainder operator](<xref:System.Decimal.op_Modulus(System.Decimal,System.Decimal)>) of the <xref:System.Decimal?displayProperty=nameWithType> type. @@ -182,7 +182,7 @@ The following example demonstrates the usage of compound assignment with arithme :::code language="csharp" interactive="try-dotnet-method" source="snippets/shared/ArithmeticOperators.cs" id="CompoundAssignment"::: -Because of [numeric promotions](~/_csharpstandard/standard/expressions.md#1147-numeric-promotions), the result of the `op` operation might be not implicitly convertible to the type `T` of `x`. In such a case, if `op` is a predefined operator and the result of the operation is explicitly convertible to the type `T` of `x`, a compound assignment expression of the form `x op= y` is equivalent to `x = (T)(x op y)`, except that `x` is only evaluated once. The following example demonstrates that behavior: +Because of [numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions), the result of the `op` operation might be not implicitly convertible to the type `T` of `x`. In such a case, if `op` is a predefined operator and the result of the operation is explicitly convertible to the type `T` of `x`, a compound assignment expression of the form `x op= y` is equivalent to `x = (T)(x op y)`, except that `x` is only evaluated once. The following example demonstrates that behavior: :::code language="csharp" interactive="try-dotnet-method" source="snippets/shared/ArithmeticOperators.cs" id="CompoundAssignmentWithCast"::: @@ -272,18 +272,18 @@ You can use the `checked` modifier only when you overload any of the following o For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [Postfix increment and decrement operators](~/_csharpstandard/standard/expressions.md#11714-postfix-increment-and-decrement-operators) -- [Prefix increment and decrement operators](~/_csharpstandard/standard/expressions.md#1186-prefix-increment-and-decrement-operators) -- [Unary plus operator](~/_csharpstandard/standard/expressions.md#1182-unary-plus-operator) -- [Unary minus operator](~/_csharpstandard/standard/expressions.md#1183-unary-minus-operator) -- [Multiplication operator](~/_csharpstandard/standard/expressions.md#1192-multiplication-operator) -- [Division operator](~/_csharpstandard/standard/expressions.md#1193-division-operator) -- [Remainder operator](~/_csharpstandard/standard/expressions.md#1194-remainder-operator) -- [Addition operator](~/_csharpstandard/standard/expressions.md#1195-addition-operator) -- [Subtraction operator](~/_csharpstandard/standard/expressions.md#1196-subtraction-operator) -- [Compound assignment](~/_csharpstandard/standard/expressions.md#11193-compound-assignment) -- [The checked and unchecked operators](~/_csharpstandard/standard/expressions.md#11718-the-checked-and-unchecked-operators) -- [Numeric promotions](~/_csharpstandard/standard/expressions.md#1147-numeric-promotions) +- [Postfix increment and decrement operators](~/_csharpstandard/standard/expressions.md#12815-postfix-increment-and-decrement-operators) +- [Prefix increment and decrement operators](~/_csharpstandard/standard/expressions.md#1296-prefix-increment-and-decrement-operators) +- [Unary plus operator](~/_csharpstandard/standard/expressions.md#1292-unary-plus-operator) +- [Unary minus operator](~/_csharpstandard/standard/expressions.md#1293-unary-minus-operator) +- [Multiplication operator](~/_csharpstandard/standard/expressions.md#12102-multiplication-operator) +- [Division operator](~/_csharpstandard/standard/expressions.md#12103-division-operator) +- [Remainder operator](~/_csharpstandard/standard/expressions.md#12104-remainder-operator) +- [Addition operator](~/_csharpstandard/standard/expressions.md#12105-addition-operator) +- [Subtraction operator](~/_csharpstandard/standard/expressions.md#12106-subtraction-operator) +- [Compound assignment](~/_csharpstandard/standard/expressions.md#12213-compound-assignment) +- [The checked and unchecked operators](~/_csharpstandard/standard/expressions.md#12819-the-checked-and-unchecked-operators) +- [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) ## See also diff --git a/docs/csharp/language-reference/operators/assignment-operator.md b/docs/csharp/language-reference/operators/assignment-operator.md index 6cba0bb177df3..78c9671d460e3 100644 --- a/docs/csharp/language-reference/operators/assignment-operator.md +++ b/docs/csharp/language-reference/operators/assignment-operator.md @@ -72,7 +72,7 @@ A user-defined type can't explicitly overload a compound assignment operator. Ho ## C# language specification -For more information, see the [Assignment operators](~/_csharpstandard/standard/expressions.md#1119-assignment-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Assignment operators](~/_csharpstandard/standard/expressions.md#1221-assignment-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). For more information about the ref assignment operator `= ref`, see the [feature proposal note](~/_csharplang/proposals/csharp-7.3/ref-local-reassignment.md). diff --git a/docs/csharp/language-reference/operators/await.md b/docs/csharp/language-reference/operators/await.md index a271109fccdea..94acba707adf4 100644 --- a/docs/csharp/language-reference/operators/await.md +++ b/docs/csharp/language-reference/operators/await.md @@ -19,11 +19,11 @@ In the following example, the <xref:System.Net.Http.HttpClient.GetByteArrayAsync The preceding example uses the [async `Main` method](../../fundamentals/program-structure/main-command-line.md). For more information, see the [await operator in the Main method](#await-operator-in-the-main-method) section. > [!NOTE] -> For an introduction to asynchronous programming, see [Asynchronous programming with async and await](../../programming-guide/concepts/async/index.md). Asynchronous programming with `async` and `await` follows the [task-based asynchronous pattern](../../../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md). +> For an introduction to asynchronous programming, see [Asynchronous programming with async and await](../../asynchronous-programming/index.md). Asynchronous programming with `async` and `await` follows the [task-based asynchronous pattern](../../../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md). You can use the `await` operator only in a method, [lambda expression](lambda-expressions.md), or [anonymous method](delegate-operator.md) that is modified by the [async](../keywords/async.md) keyword. Within an async method, you can't use the `await` operator in the body of a synchronous function, inside the block of a [lock statement](../statements/lock.md), and in an [unsafe](../keywords/unsafe.md) context. -The operand of the `await` operator is usually of one of the following .NET types: <xref:System.Threading.Tasks.Task>, <xref:System.Threading.Tasks.Task%601>, <xref:System.Threading.Tasks.ValueTask>, or <xref:System.Threading.Tasks.ValueTask%601>. However, any awaitable expression can be the operand of the `await` operator. For more information, see the [Awaitable expressions](~/_csharpstandard/standard/expressions.md#11882-awaitable-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +The operand of the `await` operator is usually of one of the following .NET types: <xref:System.Threading.Tasks.Task>, <xref:System.Threading.Tasks.Task%601>, <xref:System.Threading.Tasks.ValueTask>, or <xref:System.Threading.Tasks.ValueTask%601>. However, any awaitable expression can be the operand of the `await` operator. For more information, see the [Awaitable expressions](~/_csharpstandard/standard/expressions.md#12982-awaitable-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). The type of expression `await t` is `TResult` if the type of expression `t` is <xref:System.Threading.Tasks.Task%601> or <xref:System.Threading.Tasks.ValueTask%601>. If the type of `t` is <xref:System.Threading.Tasks.Task> or <xref:System.Threading.Tasks.ValueTask>, the type of `await t` is `void`. In both cases, if `t` throws an exception, `await t` rethrows the exception. For more information about exception handling, see the [Exceptions in async methods](../keywords/try-catch.md#exceptions-in-async-methods) section of the [try-catch statement](../keywords/try-catch.md) article. @@ -39,14 +39,15 @@ The [`Main` method](../../fundamentals/program-structure/main-command-line.md), ## C# language specification -For more information, see the [Await expressions](~/_csharpstandard/standard/expressions.md#1188-await-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Await expressions](~/_csharpstandard/standard/expressions.md#1298-await-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also - [C# reference](../index.md) - [C# operators and expressions](index.md) - [async](../keywords/async.md) -- [Task asynchronous programming model](../../programming-guide/concepts/async/task-asynchronous-programming-model.md) -- [Asynchronous programming](../../async.md) -- [Walkthrough: accessing the Web by using async and await](../../programming-guide/concepts/async/index.md) -- [Tutorial: Generate and consume async streams](../../tutorials/generate-consume-asynchronous-stream.md) +- [Task asynchronous programming model](../../asynchronous-programming/task-asynchronous-programming-model.md) +- [Asynchronous programming](../../asynchronous-programming/index.md) +- [Walkthrough: accessing the Web by using async and await](../../asynchronous-programming/async-scenarios.md) +- [Tutorial: Generate and consume async streams](../../asynchronous-programming/generate-consume-asynchronous-stream.md) +- [.NET blog: How async/await really works in C#](https://devblogs.microsoft.com/dotnet/how-async-await-really-works/) diff --git a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md index 27a22037ba8db..3f13326bba0d1 100644 --- a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md +++ b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md @@ -38,13 +38,13 @@ helpviewer_keywords: --- # Bitwise and shift operators (C# reference) -The bitwise and shift operators include unary bitwise complement, binary left and right shift, unsigned right shift, amd the binary logical AND, OR, and exclusive OR operators. These operands take operands of the [integral numeric types](../builtin-types/integral-numeric-types.md) or the [char](../builtin-types/char.md) type. +The bitwise and shift operators include unary bitwise complement, binary left and right shift, unsigned right shift, and the binary logical AND, OR, and exclusive OR operators. These operands take operands of the [integral numeric types](../builtin-types/integral-numeric-types.md) or the [char](../builtin-types/char.md) type. - Unary [`~` (bitwise complement)](#bitwise-complement-operator-) operator - Binary [`<<` (left shift)](#left-shift-operator-), [`>>` (right shift)](#right-shift-operator-), and [`>>>` (unsigned right shift)](#unsigned-right-shift-operator-) operators - Binary [`&` (logical AND)](#logical-and-operator-), [`|` (logical OR)](#logical-or-operator-), and [`^` (logical exclusive OR)](#logical-exclusive-or-operator-) operators -Those operators are defined for the `int`, `uint`, `long`, and `ulong` types. When both operands are of other integral types (`sbyte`, `byte`, `short`, `ushort`, or `char`), their values are converted to the `int` type, which is also the result type of an operation. When operands are of different integral types, their values are converted to the closest containing integral type. For more information, see the [Numeric promotions](~/_csharpstandard/standard/expressions.md#1147-numeric-promotions) section of the [C# language specification](~/_csharpstandard/standard/README.md). The compound operators (such as `>>=`) don't convert their arguments to `int` or have the result type as `int`. +Those operators are defined for the `int`, `uint`, `long`, and `ulong` types. When both operands are of other integral types (`sbyte`, `byte`, `short`, `ushort`, or `char`), their values are converted to the `int` type, which is also the result type of an operation. When operands are of different integral types, their values are converted to the closest containing integral type. For more information, see the [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) section of the [C# language specification](~/_csharpstandard/standard/README.md). The compound operators (such as `>>=`) don't convert their arguments to `int` or have the result type as `int`. The `&`, `|`, and `^` operators are also defined for operands of the `bool` type. For more information, see [Boolean logical operators](boolean-logical-operators.md). @@ -143,7 +143,7 @@ The following example demonstrates the usage of compound assignment with bitwise :::code language="csharp" source="snippets/shared/BitwiseAndShiftOperators.cs" id="CompoundAssignment"::: -Because of [numeric promotions](~/_csharpstandard/standard/expressions.md#1147-numeric-promotions), the result of the `op` operation might be not implicitly convertible to the type `T` of `x`. In such a case, if `op` is a predefined operator and the result of the operation is explicitly convertible to the type `T` of `x`, a compound assignment expression of the form `x op= y` is equivalent to `x = (T)(x op y)`, except that `x` is only evaluated once. The following example demonstrates that behavior: +Because of [numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions), the result of the `op` operation might be not implicitly convertible to the type `T` of `x`. In such a case, if `op` is a predefined operator and the result of the operation is explicitly convertible to the type `T` of `x`, a compound assignment expression of the form `x op= y` is equivalent to `x = (T)(x op y)`, except that `x` is only evaluated once. The following example demonstrates that behavior: :::code language="csharp" interactive="try-dotnet-method" source="snippets/shared/BitwiseAndShiftOperators.cs" id="CompoundAssignmentWithCast"::: @@ -196,11 +196,11 @@ If a user-defined type `T` overloads the `<<`, `>>`, or `>>>` operator, the type For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [Bitwise complement operator](~/_csharpstandard/standard/expressions.md#1185-bitwise-complement-operator) -- [Shift operators](~/_csharpstandard/standard/expressions.md#1110-shift-operators) -- [Logical operators](~/_csharpstandard/standard/expressions.md#1112-logical-operators) -- [Compound assignment](~/_csharpstandard/standard/expressions.md#11193-compound-assignment) -- [Numeric promotions](~/_csharpstandard/standard/expressions.md#1147-numeric-promotions) +- [Bitwise complement operator](~/_csharpstandard/standard/expressions.md#1295-bitwise-complement-operator) +- [Shift operators](~/_csharpstandard/standard/expressions.md#1211-shift-operators) +- [Logical operators](~/_csharpstandard/standard/expressions.md#1213-logical-operators) +- [Compound assignment](~/_csharpstandard/standard/expressions.md#12213-compound-assignment) +- [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) - [C# 11 - Relaxed shift requirements](~/_csharplang/proposals/csharp-11.0/relaxing_shift_operator_requirements.md) - [C# 11 - Logical right-shift operator](~/_csharplang/proposals/csharp-11.0/unsigned-right-shift-operator.md) diff --git a/docs/csharp/language-reference/operators/boolean-logical-operators.md b/docs/csharp/language-reference/operators/boolean-logical-operators.md index 62f52abf99abe..d16c25c361cac 100644 --- a/docs/csharp/language-reference/operators/boolean-logical-operators.md +++ b/docs/csharp/language-reference/operators/boolean-logical-operators.md @@ -184,16 +184,16 @@ For the complete list of C# operators ordered by precedence level, see the [Oper A user-defined type can [overload](operator-overloading.md) the `!`, `&`, `|`, and `^` operators. When a binary operator is overloaded, the corresponding compound assignment operator is also implicitly overloaded. A user-defined type can't explicitly overload a compound assignment operator. -A user-defined type can't overload the conditional logical operators `&&` and `||`. However, if a user-defined type overloads the [true and false operators](true-false-operators.md) and the `&` or `|` operator in a certain way, the `&&` or `||` operation, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#11133-user-defined-conditional-logical-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). +A user-defined type can't overload the conditional logical operators `&&` and `||`. However, if a user-defined type overloads the [true and false operators](true-false-operators.md) and the `&` or `|` operator in a certain way, the `&&` or `||` operation, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12143-user-defined-conditional-logical-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## C# language specification For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [Logical negation operator](~/_csharpstandard/standard/expressions.md#1184-logical-negation-operator) -- [Logical operators](~/_csharpstandard/standard/expressions.md#1112-logical-operators) -- [Conditional logical operators](~/_csharpstandard/standard/expressions.md#1113-conditional-logical-operators) -- [Compound assignment](~/_csharpstandard/standard/expressions.md#11193-compound-assignment) +- [Logical negation operator](~/_csharpstandard/standard/expressions.md#1294-logical-negation-operator) +- [Logical operators](~/_csharpstandard/standard/expressions.md#1213-logical-operators) +- [Conditional logical operators](~/_csharpstandard/standard/expressions.md#1214-conditional-logical-operators) +- [Compound assignment](~/_csharpstandard/standard/expressions.md#12213-compound-assignment) ## See also diff --git a/docs/csharp/language-reference/operators/comparison-operators.md b/docs/csharp/language-reference/operators/comparison-operators.md index 66d0a42d1e6d8..0c18a701f3441 100644 --- a/docs/csharp/language-reference/operators/comparison-operators.md +++ b/docs/csharp/language-reference/operators/comparison-operators.md @@ -65,7 +65,7 @@ If a type overloads one of the `<` or `>` operators, it must overload both `<` a ## C# language specification -For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1111-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1212-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/conditional-operator.md b/docs/csharp/language-reference/operators/conditional-operator.md index 79adae63bb400..aa0b45840a7a9 100644 --- a/docs/csharp/language-reference/operators/conditional-operator.md +++ b/docs/csharp/language-reference/operators/conditional-operator.md @@ -81,7 +81,7 @@ A user-defined type can't overload the conditional operator. ## C# language specification -For more information, see the [Conditional operator](~/_csharpstandard/standard/expressions.md#1116-conditional-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Conditional operator](~/_csharpstandard/standard/expressions.md#1218-conditional-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). Specifications for newer features are: diff --git a/docs/csharp/language-reference/operators/default.md b/docs/csharp/language-reference/operators/default.md index cd09a2b262a67..ac8ea296a9685 100644 --- a/docs/csharp/language-reference/operators/default.md +++ b/docs/csharp/language-reference/operators/default.md @@ -37,7 +37,7 @@ The following example shows the usage of the `default` literal: ## C# language specification -For more information, see the [Default value expressions](~/_csharpstandard/standard/expressions.md#11719-default-value-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Default value expressions](~/_csharpstandard/standard/expressions.md#12820-default-value-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/delegate-operator.md b/docs/csharp/language-reference/operators/delegate-operator.md index 308d94be6bc39..5cd8ca9dc5326 100644 --- a/docs/csharp/language-reference/operators/delegate-operator.md +++ b/docs/csharp/language-reference/operators/delegate-operator.md @@ -59,7 +59,7 @@ Action a = () => StaticFunction(); ## C# language specification -For more information, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1117-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1219-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/equality-operators.md b/docs/csharp/language-reference/operators/equality-operators.md index 4130dcc0d82b1..6ac4a0ef07611 100644 --- a/docs/csharp/language-reference/operators/equality-operators.md +++ b/docs/csharp/language-reference/operators/equality-operators.md @@ -69,7 +69,7 @@ Two [delegate](../../programming-guide/delegates/index.md) operands of the same [!code-csharp-interactive[delegate equality](snippets/shared/EqualityOperators.cs#DelegateEquality)] -For more information, see the [Delegate equality operators](~/_csharpstandard/standard/expressions.md#11119-delegate-equality-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Delegate equality operators](~/_csharpstandard/standard/expressions.md#12129-delegate-equality-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). Delegates that are produced from evaluation of semantically identical [lambda expressions](lambda-expressions.md) aren't equal, as the following example shows: @@ -95,7 +95,7 @@ public virtual bool Equals(T? other); ## C# language specification -For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1111-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1212-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). For more information about equality of record types, see the [Equality members](~/_csharplang/proposals/csharp-9.0/records.md#equality-members) section of the [records feature proposal note](~/_csharplang/proposals/csharp-9.0/records.md). diff --git a/docs/csharp/language-reference/operators/index.md b/docs/csharp/language-reference/operators/index.md index dfee5486da43e..be51f27bcc78f 100644 --- a/docs/csharp/language-reference/operators/index.md +++ b/docs/csharp/language-reference/operators/index.md @@ -96,7 +96,7 @@ When operators have the same precedence, associativity of the operators determin - *Right-associative* operators are evaluated in order from right to left. The assignment operators, the null-coalescing operators, lambdas, and the [conditional operator `?:`](conditional-operator.md) are right-associative. For example, `x = y = z` is evaluated as `x = (y = z)`. > [!IMPORTANT] -> In an expression of the form `P?.A0?.A1`, if `P` is `null`, neither `A0` nor `A1` are evaluated. Similarly, in an expression of the form `P?.A0.A1`, because `A0` isn't evaluated when `P` is null, neither is `A0.A1`. See the [C# language specification](~/_csharpstandard/standard/expressions.md#1177-null-conditional-member-access) for more details. +> In an expression of the form `P?.A0?.A1`, if `P` is `null`, neither `A0` nor `A1` are evaluated. Similarly, in an expression of the form `P?.A0.A1`, because `A0` isn't evaluated when `P` is null, neither is `A0.A1`. See the [C# language specification](~/_csharpstandard/standard/expressions.md#1288-null-conditional-member-access) for more details. Use parentheses to change the order of evaluation imposed by operator associativity: @@ -124,10 +124,10 @@ Typically, all operator operands are evaluated. However, some operators evaluate For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): - [Expressions](~/_csharpstandard/standard/expressions.md) -- [Operators](~/_csharpstandard/standard/expressions.md#114-operators) +- [Operators](~/_csharpstandard/standard/expressions.md#124-operators) ## See also - [C# reference](../index.md) - [Operator overloading](operator-overloading.md) -- [Expression trees](../../programming-guide/concepts/expression-trees/index.md) +- [Expression trees](../../advanced-topics/expression-trees/index.md) diff --git a/docs/csharp/language-reference/operators/is.md b/docs/csharp/language-reference/operators/is.md index 121b587e6eaf1..8efd1bfc1cec1 100644 --- a/docs/csharp/language-reference/operators/is.md +++ b/docs/csharp/language-reference/operators/is.md @@ -43,7 +43,7 @@ The `is` operator can be useful in the following scenarios: ## C# language specification -For more information, see [The is operator](~/_csharpstandard/standard/expressions.md#111111-the-is-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the following C# language proposals: +For more information, see [The is operator](~/_csharpstandard/standard/expressions.md#121212-the-is-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the following C# language proposals: - [Pattern matching](~/_csharplang/proposals/csharp-7.0/pattern-matching.md) - [Pattern matching with generics](~/_csharplang/proposals/csharp-7.1/generics-pattern-match.md) diff --git a/docs/csharp/language-reference/operators/lambda-expressions.md b/docs/csharp/language-reference/operators/lambda-expressions.md index 510f01b6a8023..bddaded379e0d 100644 --- a/docs/csharp/language-reference/operators/lambda-expressions.md +++ b/docs/csharp/language-reference/operators/lambda-expressions.md @@ -31,7 +31,7 @@ Any lambda expression can be converted to a [delegate](../builtin-types/referenc [!code-csharp-interactive[lambda is delegate](snippets/lambda-expressions/Introduction.cs#Delegate)] -Expression lambdas can also be converted to the [expression tree](../../programming-guide/concepts/expression-trees/index.md) types, as the following example shows: +Expression lambdas can also be converted to the [expression tree](../../advanced-topics/expression-trees/index.md) types, as the following example shows: [!code-csharp-interactive[lambda is expression tree](snippets/lambda-expressions/Introduction.cs#ExpressionTree)] @@ -49,7 +49,7 @@ A lambda expression with an expression on the right side of the `=>` operator is (input-parameters) => expression ``` -The body of an expression lambda can consist of a method call. However, if you're creating [expression trees](../../programming-guide/concepts/expression-trees/index.md) that are evaluated outside the context of the .NET Common Language Runtime (CLR), such as in SQL Server, you shouldn't use method calls in lambda expressions. The methods will have no meaning outside the context of the .NET Common Language Runtime (CLR). +The body of an expression lambda can consist of a method call. However, if you're creating [expression trees](../../advanced-topics/expression-trees/index.md) that are evaluated outside the context of the .NET Common Language Runtime (CLR), such as in SQL Server, you shouldn't use method calls in lambda expressions. The methods have no meaning outside the context of the .NET Common Language Runtime (CLR). ## Statement lambdas @@ -94,6 +94,24 @@ Lambda discard parameters may be useful when you use a lambda expression to [pro > [!NOTE] > For backwards compatibility, if only a single input parameter is named `_`, then, within a lambda expression, `_` is treated as the name of that parameter. +Beginning with C# 12, you can provide *default values* for parameters on lambda expressions. The syntax and the restrictions on default parameter values are the same as for methods and local functions. The following example declares a lambda expression with a default parameter, then calls it once using the default and once with two explicit parameters: + +:::code language="csharp" source="snippets/lambda-expressions/GeneralExamples.cs" id="SnippetDefaultParameters"::: + +You can also declare lambda expressions with `params` arrays as parameters: + +:::code language="csharp" source="snippets/lambda-expressions/GeneralExamples.cs" id="SnippetParamsArray"::: + +As part of these updates, when a method group that has a default parameter is assigned to a lambda expression, that lambda expression also has the same default parameter. A method group with a `params` array parameter can also be assigned to a lambda expression. + +Lambda expressions with default parameters or `params` arrays as parameters don't have natural types that correspond to `Func<>` or `Action<>` types. However, you can define delegate types that include default parameter values: + +:::code language="csharp" source="snippets/lambda-expressions/GeneralExamples.cs" id="DelegateDeclarations"::: + +Or, you can use implicitly typed variables with `var` declarations to define the delegate type. The compile synthesizes the correct delegate type. + +For more information on see the feature spec for [default parameters on lambda expressions](~/_csharplang/proposals/lambda-method-group-defaults.md). + ## Async lambdas You can easily create lambda expressions and statements that incorporate asynchronous processing by using the [async](../keywords/async.md) and [await](await.md) keywords. For example, the following Windows Forms example contains an event handler that calls and awaits an async method, `ExampleMethodAsync`. @@ -144,7 +162,7 @@ public partial class Form1 : Form } ``` -For more information about how to create and use async methods, see [Asynchronous Programming with async and await](../../programming-guide/concepts/async/index.md). +For more information about how to create and use async methods, see [Asynchronous Programming with async and await](../../asynchronous-programming/index.md). ## Lambda expressions and tuples @@ -305,7 +323,7 @@ A static lambda can't capture local variables or instance state from enclosing s ## C# language specification -For more information, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1117-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1219-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). For more information about features added in C# 9.0 and later, see the following feature proposal notes: @@ -319,7 +337,7 @@ For more information about features added in C# 9.0 and later, see the following - [C# reference](../index.md) - [C# operators and expressions](index.md) - [LINQ (Language-Integrated Query)](../../programming-guide/concepts/linq/index.md) -- [Expression trees](../../programming-guide/concepts/expression-trees/index.md) +- [Expression trees](../../advanced-topics/expression-trees/index.md) - [Local functions vs. lambda expressions](../../programming-guide/classes-and-structs/local-functions.md#local-functions-vs-lambda-expressions) - [LINQ sample queries](https://github.com/microsoftarchive/msdn-code-gallery-microsoft/tree/master/Visual%20Studio%20Product%20Team/Official%20Visual%20Studio%202008%20C%23%20Samples/%5BC%23%5D-Official%20Visual%20Studio%202008%20C%23%20Samples/LINQ%20-%20Sample%20Queries/C%23) - [XQuery sample](https://github.com/microsoftarchive/msdn-code-gallery-microsoft/tree/master/Visual%20Studio%20Product%20Team/Official%20Visual%20Studio%202008%20C%23%20Samples/%5BC%23%5D-Official%20Visual%20Studio%202008%20C%23%20Samples/XQuery/C%23) diff --git a/docs/csharp/language-reference/operators/lambda-operator.md b/docs/csharp/language-reference/operators/lambda-operator.md index f1302ba99bf1b..4bcea29d76c36 100644 --- a/docs/csharp/language-reference/operators/lambda-operator.md +++ b/docs/csharp/language-reference/operators/lambda-operator.md @@ -47,7 +47,7 @@ where `expression` is a valid expression. The return type of `expression` must b - Finalizer - Property or indexer `set` accessor -`expression` must be a [*statement expression*](~/_csharpstandard/standard/statements.md#127-expression-statements). Because the expression's result is discarded, the return type of that expression can be any type. +`expression` must be a [*statement expression*](~/_csharpstandard/standard/statements.md#137-expression-statements). Because the expression's result is discarded, the return type of that expression can be any type. The following example shows an expression body definition for a `Person.ToString` method: @@ -72,7 +72,7 @@ The `=>` operator can't be overloaded. ## C# language specification -For more information about the lambda operator, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1117-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information about the lambda operator, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1219-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/member-access-operators.md b/docs/csharp/language-reference/operators/member-access-operators.md index a2605cefe816a..c49d918546c95 100644 --- a/docs/csharp/language-reference/operators/member-access-operators.md +++ b/docs/csharp/language-reference/operators/member-access-operators.md @@ -1,6 +1,6 @@ --- -title: "Member access operators and expressions" -description: "C# operators that you use to access type members. These operators include the dot operator - `.`, indexers - `[`, `]`, `^` and `..`, and invocation - `(`, `)`." +title: "Member access and null-conditional operators and expressions:" +description: "C# operators that you use to access type members or null-conditionally access type members. These operators include the dot operator - `.`, indexers - `[`, `]`, `^` and `..`, and invocation - `(`, `)`." ms.date: 11/28/2022 author: pkulikov f1_keywords: @@ -35,7 +35,7 @@ helpviewer_keywords: --- # Member access operators and expressions - the dot, indexer, and invocation operators. -You use several operators and expressions to access a type member. These operators include member access (`.`), array element or indexer access (`[]`), index-from-end (`^`), range (`..`), null-conditional operators (`?.` and `?[]`), and method invocation (`()`). +You use several operators and expressions to access a type member. These operators include member access (`.`), array element or indexer access (`[]`), index-from-end (`^`), range (`..`), null-conditional operators (`?.` and `?[]`), and method invocation (`()`). These include the *null-conditional* member access (`?.`), and indexer access (`?[]`) operators. - [`.` (member access)](#member-access-expression-): to access a member of a namespace or a type - [`[]` (array element or indexer access)](#indexer-operator-): to access an array element or a type indexer @@ -94,7 +94,7 @@ For more information about indexers, see [Indexers](../../programming-guide/inde For information about pointer element access, see the [Pointer element access operator []](pointer-related-operators.md#pointer-element-access-operator-) section of the [Pointer related operators](pointer-related-operators.md) article. -You also use square brackets to specify [attributes](../../programming-guide/concepts/attributes/index.md): +You also use square brackets to specify [attributes](/dotnet/csharp/advanced-topics/reflection-and-attributes): ```csharp [System.Diagnostics.Conditional("DEBUG")] @@ -236,10 +236,10 @@ The `.`, `()`, `^`, and `..` operators can't be overloaded. The `[]` operator is For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [Member access](~/_csharpstandard/standard/expressions.md#1176-member-access) -- [Element access](~/_csharpstandard/standard/expressions.md#11710-element-access) -- [Null-conditional member access](~/_csharpstandard/standard/expressions.md#1177-null-conditional-member-access) -- [Invocation expressions](~/_csharpstandard/standard/expressions.md#1178-invocation-expressions) +- [Member access](~/_csharpstandard/standard/expressions.md#1287-member-access) +- [Element access](~/_csharpstandard/standard/expressions.md#12811-element-access) +- [Null-conditional member access](~/_csharpstandard/standard/expressions.md#1288-null-conditional-member-access) +- [Invocation expressions](~/_csharpstandard/standard/expressions.md#1289-invocation-expressions) For more information about indices and ranges, see the [feature proposal note](~/_csharplang/proposals/csharp-8.0/ranges.md). diff --git a/docs/csharp/language-reference/operators/nameof.md b/docs/csharp/language-reference/operators/nameof.md index 43c16dd03bf79..3b60650c47fc8 100644 --- a/docs/csharp/language-reference/operators/nameof.md +++ b/docs/csharp/language-reference/operators/nameof.md @@ -16,23 +16,23 @@ A `nameof` expression produces the name of a variable, type, or member as the st [!code-csharp-interactive[nameof expression](snippets/shared/NameOfOperator.cs#Examples)] -When the operand is a [verbatim identifier](../tokens/verbatim.md), the `@` character isn't the part of a name, as the following example shows: - -[!code-csharp-interactive[nameof verbatim](snippets/shared/NameOfOperator.cs#Verbatim)] - You can use a `nameof` expression to make the argument-checking code more maintainable: [!code-csharp[nameof and argument check](snippets/shared/NameOfOperator.cs#ExceptionMessage)] -Beginning with C# 11, you can use a `nameof` expression with a method parameter inside an [attribute](../../programming-guide/concepts/attributes/index.md) on a method or its parameter. The following code shows how to do that for an attribute on a method, a local function, and the parameter of a lambda expression: +Beginning with C# 11, you can use a `nameof` expression with a method parameter inside an [attribute](../../advanced-topics/reflection-and-attributes/index.md) on a method or its parameter. The following code shows how to do that for an attribute on a method, a local function, and the parameter of a lambda expression: :::code language="csharp" source="snippets/shared/NameOfOperator.cs" id="SnippetNameOfParameter"::: A `nameof` expression with a parameter is useful when you use the [nullable analysis attributes](../attributes/nullable-analysis.md) or the [CallerArgumentExpression attribute](../attributes/caller-information.md#argument-expressions). +When the operand is a [verbatim identifier](../tokens/verbatim.md), the `@` character isn't the part of a name, as the following example shows: + +[!code-csharp-interactive[nameof verbatim](snippets/shared/NameOfOperator.cs#Verbatim)] + ## C# language specification -For more information, see the [Nameof expressions](~/_csharpstandard/standard/expressions.md#11720-nameof-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md), and the [C# 11 - Extended `nameof` scope](~/_csharplang/proposals/csharp-11.0/extended-nameof-scope.md) feature specification. +For more information, see the [Nameof expressions](~/_csharpstandard/standard/expressions.md#12821-nameof-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md), and the [C# 11 - Extended `nameof` scope](~/_csharplang/proposals/csharp-11.0/extended-nameof-scope.md) feature specification. ## See also diff --git a/docs/csharp/language-reference/operators/namespace-alias-qualifier.md b/docs/csharp/language-reference/operators/namespace-alias-qualifier.md index c414b84dd7e17..7b037d98beb0a 100644 --- a/docs/csharp/language-reference/operators/namespace-alias-qualifier.md +++ b/docs/csharp/language-reference/operators/namespace-alias-qualifier.md @@ -55,7 +55,7 @@ You can also use the [`.` token](member-access-operators.md#member-access-expres ## C# language specification -For more information, see the [Namespace alias qualifiers](~/_csharpstandard/standard/namespaces.md#138-qualified-alias-member) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Namespace alias qualifiers](~/_csharpstandard/standard/namespaces.md#148-qualified-alias-member) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/new-operator.md b/docs/csharp/language-reference/operators/new-operator.md index d464b0118d450..c5360c65ead6c 100644 --- a/docs/csharp/language-reference/operators/new-operator.md +++ b/docs/csharp/language-reference/operators/new-operator.md @@ -52,7 +52,7 @@ To create an instance of an [anonymous type](../../fundamentals/types/anonymous- You don't have to destroy earlier created type instances. Instances of both reference and value types are destroyed automatically. Instances of value types are destroyed as soon as the context that contains them is destroyed. Instances of reference types are destroyed by the [garbage collector](../../../standard/garbage-collection/index.md) at some unspecified time after the last reference to them is removed. -For type instances that contain unmanaged resources, for example, a file handle, it's recommended to employ deterministic clean-up to ensure that the resources they contain are released as soon as possible. For more information, see the <xref:System.IDisposable?displayProperty=nameWithType> API reference and the [using statement](../keywords/using-statement.md) article. +For type instances that contain unmanaged resources, for example, a file handle, it's recommended to employ deterministic clean-up to ensure that the resources they contain are released as soon as possible. For more information, see the <xref:System.IDisposable?displayProperty=nameWithType> API reference and the [using statement](../statements/using.md) article. ## Operator overloadability @@ -60,7 +60,7 @@ A user-defined type can't overload the `new` operator. ## C# language specification -For more information, see [The new operator](~/_csharpstandard/standard/expressions.md#11715-the-new-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see [The new operator](~/_csharpstandard/standard/expressions.md#12816-the-new-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). For more information about a target-typed `new` expression, see the [feature proposal note](~/_csharplang/proposals/csharp-9.0/target-typed-new.md). diff --git a/docs/csharp/language-reference/operators/null-coalescing-operator.md b/docs/csharp/language-reference/operators/null-coalescing-operator.md index ecad0e5ef9ec4..24c918f76bcb0 100644 --- a/docs/csharp/language-reference/operators/null-coalescing-operator.md +++ b/docs/csharp/language-reference/operators/null-coalescing-operator.md @@ -83,7 +83,7 @@ The operators `??` and `??=` can't be overloaded. ## C# language specification -For more information about the `??` operator, see [The null coalescing operator](~/_csharpstandard/standard/expressions.md#1114-the-null-coalescing-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information about the `??` operator, see [The null coalescing operator](~/_csharpstandard/standard/expressions.md#1215-the-null-coalescing-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). For more information about the `??=` operator, see the [feature proposal note](~/_csharplang/proposals/csharp-8.0/null-coalescing-assignment.md). diff --git a/docs/csharp/language-reference/operators/operator-overloading.md b/docs/csharp/language-reference/operators/operator-overloading.md index d9bf884689282..1373fd9e023a2 100644 --- a/docs/csharp/language-reference/operators/operator-overloading.md +++ b/docs/csharp/language-reference/operators/operator-overloading.md @@ -42,7 +42,7 @@ The following table shows the operators that can't be overloaded: | Operators | Alternatives | | :---------: | --------------- | -|[`x && y`](boolean-logical-operators.md#conditional-logical-and-operator-), [<code>x || y</code>](boolean-logical-operators.md#conditional-logical-or-operator-)| Overload both the [`true`](true-false-operators.md) and [`false`](true-false-operators.md) operators and the [`&`](boolean-logical-operators.md#logical-and-operator-) or [<code>|</code>](boolean-logical-operators.md#logical-or-operator-) operators. For more information, see [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#11133-user-defined-conditional-logical-operators).| +|[`x && y`](boolean-logical-operators.md#conditional-logical-and-operator-), [<code>x || y</code>](boolean-logical-operators.md#conditional-logical-or-operator-)| Overload both the [`true`](true-false-operators.md) and [`false`](true-false-operators.md) operators and the [`&`](boolean-logical-operators.md#logical-and-operator-) or [<code>|</code>](boolean-logical-operators.md#logical-or-operator-) operators. For more information, see [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12143-user-defined-conditional-logical-operators).| |[<code>a[i]</code>](member-access-operators.md#indexer-operator-), [`a?[i]`](member-access-operators.md#null-conditional-operators--and-)|Define an [indexer](../../programming-guide/indexers/index.md).| |[`(T)x`](type-testing-and-cast.md#cast-expression)|Define custom type conversions that can be performed by a cast expression. For more information, see [User-defined conversion operators](user-defined-conversion-operators.md).| |[`+=`](arithmetic-operators.md#compound-assignment), [`-=`](arithmetic-operators.md#compound-assignment), [`*=`](arithmetic-operators.md#compound-assignment), [`/=`](arithmetic-operators.md#compound-assignment), [`%=`](arithmetic-operators.md#compound-assignment), [`&=`](boolean-logical-operators.md#compound-assignment), [<code>|=</code>](boolean-logical-operators.md#compound-assignment), [`^=`](boolean-logical-operators.md#compound-assignment), [`<<=`](bitwise-and-shift-operators.md#compound-assignment), [`>>=`](bitwise-and-shift-operators.md#compound-assignment), [`>>>=`](bitwise-and-shift-operators.md#compound-assignment)|Overload the corresponding binary operator. For example, when you overload the binary `+` operator, `+=` is implicitly overloaded.| @@ -52,8 +52,8 @@ The following table shows the operators that can't be overloaded: For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [Operator overloading](~/_csharpstandard/standard/expressions.md#1143-operator-overloading) -- [Operators](~/_csharpstandard/standard/classes.md#1410-operators) +- [Operator overloading](~/_csharpstandard/standard/expressions.md#1243-operator-overloading) +- [Operators](~/_csharpstandard/standard/classes.md#1510-operators) ## See also diff --git a/docs/csharp/language-reference/operators/patterns.md b/docs/csharp/language-reference/operators/patterns.md index 93c8de6b0c744..3fecf6b8a75e8 100644 --- a/docs/csharp/language-reference/operators/patterns.md +++ b/docs/csharp/language-reference/operators/patterns.md @@ -1,7 +1,7 @@ --- title: "Patterns - Pattern matching using the is and switch expressions." description: "Learn about the patterns supported by the `is` and `switch` expressions. Combine multiple patterns using the `and`, `or`, and `not` operators." -ms.date: 11/28/2022 +ms.date: 01/30/2023 f1_keywords: - "and_CSharpKeyword" - "or_CSharpKeyword" @@ -267,11 +267,11 @@ As the preceding example shows, a list pattern is matched when each nested patte :::code language="csharp" source="snippets/patterns/ListPattern.cs" id="MatchAnyElement"::: -The preceding examples match a whole input sequence against a list pattern. To match elements only at the start or/and the end of an input sequence, use the *slice pattern* `..` within a list pattern, as the following example shows: +The preceding examples match a whole input sequence against a list pattern. To match elements only at the start or/and the end of an input sequence, use the *slice pattern* `..`, as the following example shows: :::code language="csharp" source="snippets/patterns/ListPattern.cs" id="UseSlice"::: -A slice pattern matches zero or more elements. You can use at most one slice pattern in a list pattern. +A slice pattern matches zero or more elements. You can use at most one slice pattern in a list pattern. The slice pattern can only appear in a list pattern. You can also nest a subpattern within a slice pattern, as the following example shows: diff --git a/docs/csharp/language-reference/operators/pointer-related-operators.md b/docs/csharp/language-reference/operators/pointer-related-operators.md index 1280f948cb89b..99b22050a5006 100644 --- a/docs/csharp/language-reference/operators/pointer-related-operators.md +++ b/docs/csharp/language-reference/operators/pointer-related-operators.md @@ -50,7 +50,7 @@ The operand of the `&` operator must be a fixed variable. *Fixed* variables are You can't get the address of a constant or a value. -For more information about fixed and movable variables, see the [Fixed and moveable variables](~/_csharpstandard/standard/unsafe-code.md#224-fixed-and-moveable-variables) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information about fixed and movable variables, see the [Fixed and moveable variables](~/_csharpstandard/standard/unsafe-code.md#234-fixed-and-moveable-variables) section of the [C# language specification](~/_csharpstandard/standard/README.md). The binary `&` operator computes the [logical AND](boolean-logical-operators.md#logical-and-operator-) of its Boolean operands or the [bitwise logical AND](bitwise-and-shift-operators.md#logical-and-operator-) of its integral operands. @@ -172,14 +172,14 @@ A user-defined type can't overload the pointer related operators `&`, `*`, `->`, For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [Fixed and moveable variables](~/_csharpstandard/standard/unsafe-code.md#224-fixed-and-moveable-variables) -- [The address-of operator](~/_csharpstandard/standard/unsafe-code.md#2265-the-address-of-operator) -- [Pointer indirection](~/_csharpstandard/standard/unsafe-code.md#2262-pointer-indirection) -- [Pointer member access](~/_csharpstandard/standard/unsafe-code.md#2263-pointer-member-access) -- [Pointer element access](~/_csharpstandard/standard/unsafe-code.md#2264-pointer-element-access) -- [Pointer arithmetic](~/_csharpstandard/standard/unsafe-code.md#2267-pointer-arithmetic) -- [Pointer increment and decrement](~/_csharpstandard/standard/unsafe-code.md#2266-pointer-increment-and-decrement) -- [Pointer comparison](~/_csharpstandard/standard/unsafe-code.md#2268-pointer-comparison) +- [Fixed and moveable variables](~/_csharpstandard/standard/unsafe-code.md#234-fixed-and-moveable-variables) +- [The address-of operator](~/_csharpstandard/standard/unsafe-code.md#2365-the-address-of-operator) +- [Pointer indirection](~/_csharpstandard/standard/unsafe-code.md#2362-pointer-indirection) +- [Pointer member access](~/_csharpstandard/standard/unsafe-code.md#2363-pointer-member-access) +- [Pointer element access](~/_csharpstandard/standard/unsafe-code.md#2364-pointer-element-access) +- [Pointer arithmetic](~/_csharpstandard/standard/unsafe-code.md#2367-pointer-arithmetic) +- [Pointer increment and decrement](~/_csharpstandard/standard/unsafe-code.md#2366-pointer-increment-and-decrement) +- [Pointer comparison](~/_csharpstandard/standard/unsafe-code.md#2368-pointer-comparison) ## See also diff --git a/docs/csharp/language-reference/operators/sizeof.md b/docs/csharp/language-reference/operators/sizeof.md index 77503ac894eaf..19f867786d3a1 100644 --- a/docs/csharp/language-reference/operators/sizeof.md +++ b/docs/csharp/language-reference/operators/sizeof.md @@ -40,7 +40,7 @@ The `sizeof` operator returns a number of bytes that would be allocated by the c ## C# language specification -For more information, see [The sizeof operator](~/_csharpstandard/standard/unsafe-code.md#2269-the-sizeof-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see [The sizeof operator](~/_csharpstandard/standard/unsafe-code.md#2369-the-sizeof-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/snippets/lambda-expressions/GeneralExamples.cs b/docs/csharp/language-reference/operators/snippets/lambda-expressions/GeneralExamples.cs index be1cf3d53e301..ff89bd2e4a0c8 100644 --- a/docs/csharp/language-reference/operators/snippets/lambda-expressions/GeneralExamples.cs +++ b/docs/csharp/language-reference/operators/snippets/lambda-expressions/GeneralExamples.cs @@ -41,5 +41,39 @@ public static void Examples() Func<double, double> square = static x => x * x; // </SnippetStatic> } + + public static void DefaultParmExamples() + { + // <SnippetDefaultParameters> + var IncrementBy = (int source, int increment = 1) => source + increment; + + Console.WriteLine(IncrementBy(5)); // 6 + Console.WriteLine(IncrementBy(5, 2)); // 7 + // </SnippetDefaultParameters> + + // <SnippetParamsArray> + var sum = (params int[] values) => + { + int sum = 0; + foreach (var value in values) + sum += value; + + return sum; + }; + + var empty = sum(); + Console.WriteLine(empty); // 0 + + var sequence = new[] { 1, 2, 3, 4, 5 }; + var total = sum(sequence); + Console.WriteLine(total); // 15 + // </SnippetParamsArray> + } + + // <DelegateDeclarations> + delegate int IncrementByDelegate(int source, int increment = 1); + delegate int SumDelegate(params int[] values); + // </DelegateDeclarations> + } } diff --git a/docs/csharp/language-reference/operators/snippets/lambda-expressions/Program.cs b/docs/csharp/language-reference/operators/snippets/lambda-expressions/Program.cs index e621029e42c82..f2664e88bae68 100644 --- a/docs/csharp/language-reference/operators/snippets/lambda-expressions/Program.cs +++ b/docs/csharp/language-reference/operators/snippets/lambda-expressions/Program.cs @@ -11,6 +11,7 @@ static void Main(string[] args) LambdasAndTuples.Examples(); LambdasWithQueryMethods.Examples(); VariableScopeWithLambdas.Main(); + GeneralExamples.DefaultParmExamples(); } } } diff --git a/docs/csharp/language-reference/operators/snippets/lambda-expressions/lambda-expressions.csproj b/docs/csharp/language-reference/operators/snippets/lambda-expressions/lambda-expressions.csproj index 3bad7a57a702c..053a9fa3d1c77 100644 --- a/docs/csharp/language-reference/operators/snippets/lambda-expressions/lambda-expressions.csproj +++ b/docs/csharp/language-reference/operators/snippets/lambda-expressions/lambda-expressions.csproj @@ -2,9 +2,10 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net8.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> + <LangVersion>preview</LangVersion> <RootNamespace>lambda_expressions</RootNamespace> <StartupObject>lambda_expressions.Program</StartupObject> </PropertyGroup> diff --git a/docs/csharp/language-reference/operators/snippets/shared/AwaitOperator.cs b/docs/csharp/language-reference/operators/snippets/shared/AwaitOperator.cs index 0ffb3a30f1c1e..f6050b8461905 100644 --- a/docs/csharp/language-reference/operators/snippets/shared/AwaitOperator.cs +++ b/docs/csharp/language-reference/operators/snippets/shared/AwaitOperator.cs @@ -18,7 +18,7 @@ private static async Task<int> DownloadDocsMainPageAsync() Console.WriteLine($"{nameof(DownloadDocsMainPageAsync)}: About to start downloading."); var client = new HttpClient(); - byte[] content = await client.GetByteArrayAsync("https://docs.microsoft.com/en-us/"); + byte[] content = await client.GetByteArrayAsync("https://learn.microsoft.com/en-us/"); Console.WriteLine($"{nameof(DownloadDocsMainPageAsync)}: Finished downloading."); return content.Length; diff --git a/docs/csharp/language-reference/operators/snippets/shared/BitwiseAndShiftOperators.cs b/docs/csharp/language-reference/operators/snippets/shared/BitwiseAndShiftOperators.cs index 2b5ae7c86e6eb..a68af2b9ef38e 100644 --- a/docs/csharp/language-reference/operators/snippets/shared/BitwiseAndShiftOperators.cs +++ b/docs/csharp/language-reference/operators/snippets/shared/BitwiseAndShiftOperators.cs @@ -163,6 +163,12 @@ private static void ShiftCount() Console.WriteLine($"{b} >> {count1} is {b >> count1}; {b} >> {count2} is {b >> count2}"); // Output: // 4 >> 1 is 2; 4 >> 225 is 2 + + int count = -31; + int c = 0b_0001; + Console.WriteLine($"{c} << {count} is {c << count}"); + // Output: + // 1 << -31 is 2 // </SnippetShiftCount> } diff --git a/docs/csharp/language-reference/operators/stackalloc.md b/docs/csharp/language-reference/operators/stackalloc.md index 01c4fd7a75e34..c68bb4a6eb96f 100644 --- a/docs/csharp/language-reference/operators/stackalloc.md +++ b/docs/csharp/language-reference/operators/stackalloc.md @@ -63,7 +63,7 @@ The use of `stackalloc` automatically enables buffer overrun detection features ## C# language specification -For more information, see the [Stack allocation](~/_csharpstandard/standard/unsafe-code.md#229-stack-allocation) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the [Permit `stackalloc` in nested contexts](~/_csharplang/proposals/csharp-8.0/nested-stackalloc.md) feature proposal note. +For more information, see the [Stack allocation](~/_csharpstandard/standard/unsafe-code.md#239-stack-allocation) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the [Permit `stackalloc` in nested contexts](~/_csharplang/proposals/csharp-8.0/nested-stackalloc.md) feature proposal note. ## See also diff --git a/docs/csharp/language-reference/operators/subtraction-operator.md b/docs/csharp/language-reference/operators/subtraction-operator.md index be4392a0ea381..e21c1855b471d 100644 --- a/docs/csharp/language-reference/operators/subtraction-operator.md +++ b/docs/csharp/language-reference/operators/subtraction-operator.md @@ -31,7 +31,7 @@ For operands of the same [delegate](../builtin-types/reference-types.md#the-dele [!code-csharp-interactive[delegate removal with no effect](snippets/shared/SubtractionOperator.cs#DelegateRemovalNoChange)] - The preceding example also demonstrates that during delegate removal delegate instances are compared. For example, delegates that are produced from evaluation of identical [lambda expressions](lambda-expressions.md) aren't equal. For more information about delegate equality, see the [Delegate equality operators](~/_csharpstandard/standard/expressions.md#11119-delegate-equality-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). + The preceding example also demonstrates that during delegate removal delegate instances are compared. For example, delegates that are produced from evaluation of identical [lambda expressions](lambda-expressions.md) aren't equal. For more information about delegate equality, see the [Delegate equality operators](~/_csharpstandard/standard/expressions.md#12129-delegate-equality-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). - If the left-hand operand is `null`, the result of the operation is `null`. If the right-hand operand is `null`, the result of the operation is the left-hand operand. @@ -69,7 +69,7 @@ A user-defined type can [overload](operator-overloading.md) the `-` operator. Wh ## C# language specification -For more information, see the [Unary minus operator](~/_csharpstandard/standard/expressions.md#1183-unary-minus-operator) and [Subtraction operator](~/_csharpstandard/standard/expressions.md#1196-subtraction-operator) sections of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Unary minus operator](~/_csharpstandard/standard/expressions.md#1293-unary-minus-operator) and [Subtraction operator](~/_csharpstandard/standard/expressions.md#12106-subtraction-operator) sections of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/operators/true-false-operators.md b/docs/csharp/language-reference/operators/true-false-operators.md index d3af18a2a5cab..c81d609f7104d 100644 --- a/docs/csharp/language-reference/operators/true-false-operators.md +++ b/docs/csharp/language-reference/operators/true-false-operators.md @@ -15,11 +15,11 @@ The `true` operator returns the [bool](../builtin-types/bool.md) value `true` to ## Boolean expressions -A type with the defined `true` operator can be the type of a result of a controlling conditional expression in the [if](../statements/selection-statements.md#the-if-statement), [do](../statements/iteration-statements.md#the-do-statement), [while](../statements/iteration-statements.md#the-while-statement), and [for](../statements/iteration-statements.md#the-for-statement) statements and in the [conditional operator `?:`](conditional-operator.md). For more information, see the [Boolean expressions](~/_csharpstandard/standard/expressions.md#1122-boolean-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). +A type with the defined `true` operator can be the type of a result of a controlling conditional expression in the [if](../statements/selection-statements.md#the-if-statement), [do](../statements/iteration-statements.md#the-do-statement), [while](../statements/iteration-statements.md#the-while-statement), and [for](../statements/iteration-statements.md#the-for-statement) statements and in the [conditional operator `?:`](conditional-operator.md). For more information, see the [Boolean expressions](~/_csharpstandard/standard/expressions.md#1224-boolean-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## User-defined conditional logical operators -If a type with the defined `true` and `false` operators [overloads](operator-overloading.md) the [logical OR operator](boolean-logical-operators.md#logical-or-operator-) `|` or the [logical AND operator](boolean-logical-operators.md#logical-and-operator-) `&` in a certain way, the [conditional logical OR operator](boolean-logical-operators.md#conditional-logical-or-operator-) `||` or [conditional logical AND operator](boolean-logical-operators.md#conditional-logical-and-operator-) `&&`, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#11133-user-defined-conditional-logical-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). +If a type with the defined `true` and `false` operators [overloads](operator-overloading.md) the [logical OR operator](boolean-logical-operators.md#logical-or-operator-) `|` or the [logical AND operator](boolean-logical-operators.md#logical-and-operator-) `&` in a certain way, the [conditional logical OR operator](boolean-logical-operators.md#conditional-logical-or-operator-) `||` or [conditional logical AND operator](boolean-logical-operators.md#conditional-logical-and-operator-) `&&`, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12143-user-defined-conditional-logical-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## Example diff --git a/docs/csharp/language-reference/operators/type-testing-and-cast.md b/docs/csharp/language-reference/operators/type-testing-and-cast.md index 5c7f1cbea4fd3..d3b0dbdb36150 100644 --- a/docs/csharp/language-reference/operators/type-testing-and-cast.md +++ b/docs/csharp/language-reference/operators/type-testing-and-cast.md @@ -145,10 +145,10 @@ A user-defined type can't overload the `()` operator, but can define custom type For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [The is operator](~/_csharpstandard/standard/expressions.md#111111-the-is-operator) -- [The as operator](~/_csharpstandard/standard/expressions.md#111112-the-as-operator) -- [Cast expressions](~/_csharpstandard/standard/expressions.md#1187-cast-expressions) -- [The typeof operator](~/_csharpstandard/standard/expressions.md#11716-the-typeof-operator) +- [The is operator](~/_csharpstandard/standard/expressions.md#121212-the-is-operator) +- [The as operator](~/_csharpstandard/standard/expressions.md#121213-the-as-operator) +- [Cast expressions](~/_csharpstandard/standard/expressions.md#1297-cast-expressions) +- [The typeof operator](~/_csharpstandard/standard/expressions.md#12817-the-typeof-operator) ## See also diff --git a/docs/csharp/language-reference/operators/user-defined-conversion-operators.md b/docs/csharp/language-reference/operators/user-defined-conversion-operators.md index c18f1b0b1a013..4cf0fbafdeaa3 100644 --- a/docs/csharp/language-reference/operators/user-defined-conversion-operators.md +++ b/docs/csharp/language-reference/operators/user-defined-conversion-operators.md @@ -33,7 +33,7 @@ You also use the `operator` keyword to overload a predefined C# operator. For mo For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [Conversion operators](~/_csharpstandard/standard/classes.md#14104-conversion-operators) +- [Conversion operators](~/_csharpstandard/standard/classes.md#15104-conversion-operators) - [User-defined conversions](~/_csharpstandard/standard/conversions.md#105-user-defined-conversions) - [Implicit conversions](~/_csharpstandard/standard/conversions.md#102-implicit-conversions) - [Explicit conversions](~/_csharpstandard/standard/conversions.md#103-explicit-conversions) diff --git a/docs/csharp/language-reference/operators/with-expression.md b/docs/csharp/language-reference/operators/with-expression.md index 19c401460585c..da03dc986e977 100644 --- a/docs/csharp/language-reference/operators/with-expression.md +++ b/docs/csharp/language-reference/operators/with-expression.md @@ -10,7 +10,7 @@ helpviewer_keywords: --- # with expression - Nondestructive mutation creates a new object with modified properties -Available in C# 9.0 and later, a `with` expression produces a copy of its operand with the specified properties and fields modified. you use [object initializer](../../programming-guide/classes-and-structs/object-and-collection-initializers.md) syntax to specify what members to modify and their new values: +Available in C# 9.0 and later, a `with` expression produces a copy of its operand with the specified properties and fields modified. You use the [object initializer](../../programming-guide/classes-and-structs/object-and-collection-initializers.md) syntax to specify what members to modify and their new values: :::code language="csharp" source="snippets/with-expression/BasicExample.cs" ::: diff --git a/docs/csharp/language-reference/preprocessor-directives.md b/docs/csharp/language-reference/preprocessor-directives.md index 71233f5bd00f7..a6028f039ca96 100644 --- a/docs/csharp/language-reference/preprocessor-directives.md +++ b/docs/csharp/language-reference/preprocessor-directives.md @@ -1,7 +1,7 @@ --- description: "Learn the different C# preprocessor directives that control conditional compilation, warnings, nullable analysis, and more" title: "C# preprocessor directives" -ms.date: 03/17/2021 +ms.date: 01/30/2023 f1_keywords: - "cs.preprocessor" - "#nullable" @@ -268,7 +268,7 @@ The `#line filename` directive specifies the file name you want to appear in the Beginning with C# 10, you can use a new form of the `#line` directive: ```csharp -#line (1, 1) - (5, 60) 10 "partial-class.g.cs" +#line (1, 1) - (5, 60) 10 "partial-class.cs" /*34567*/int b = 0; ``` @@ -277,17 +277,40 @@ The components of this form are: - `(1, 1)`: The start line and column for the first character on the line that follows the directive. In this example, the next line would be reported as line 1, column 1. - `(5, 60)`: The end line and column for the marked region. - `10`: The column offset for the `#line` directive to take effect. In this example, the 10th column would be reported as column one. That's where the declaration `int b = 0;` begins. This field is optional. If omitted, the directive takes effect on the first column. -- `"partial-class.g.cs"`: The name of the output file. +- `"partial-class.cs"`: The name of the output file. The preceding example would generate the following warning: ```dotnetcli -partial-class.g.cs(1,5,1,6): warning CS0219: The variable 'b' is assigned but its value is never used +partial-class.cs(1,5,1,6): warning CS0219: The variable 'b' is assigned but its value is never used ``` -After remapping, the variable, `b`, is on the first line, at character six. +After remapping, the variable, `b`, is on the first line, at character six, of the file `partial-class.cs`. -Domain-specific languages (DSLs) typically use this format to provide a better mapping from the source file to the generated C# output. To see more examples of this format, see the [feature specification](~/_csharplang/proposals/csharp-10.0/enhanced-line-directives.md#examples) in the section on examples. +Domain-specific languages (DSLs) typically use this format to provide a better mapping from the source file to the generated C# output. The most common use of this extended `#line` directive is to re-map warnings or errors that appear in a generated file to the original source. For example, consider this razor page: + +```razor +@page "/" +Time: @DateTime.NowAndThen +``` + +The property `DateTime.Now` was typed incorrectly as `DateTime.NowAndThen`. The generated C# for this razor snippet looks like the following, in `page.g.cs`: + +```csharp + _builder.Add("Time: "); +#line (2, 6) (2, 27) 15 "page.razor" + _builder.Add(DateTime.NowAndThen); +``` + +The compiler output for the preceding snippet is: + +```dotnetcli +page.razor(2, 2, 2, 27)error CS0117: 'DateTime' does not contain a definition for 'NowAndThen' +``` + +Line 2, column 6 in `page.razor` is where the text `@DateTime.NowAndThen` begins. That's noted by `(2, 6)` in the directive. That span of `@DateTime.NowAndThen` ends at line 2, column 27. That's noted by the `(2, 27)` in the directive. The text for `DateTime.NowAndThen` begins in column 15 of `page.g.cs`. That's noted by the `15` in the directive. Putting all the arguments together, and the compiler reports the error in its location in `page.razor`. The developer can navigate directly to the error in their source code, not the generated source. + +To see more examples of this format, see the [feature specification](~/_csharplang/proposals/csharp-10.0/enhanced-line-directives.md#examples) in the section on examples. ## Pragmas diff --git a/docs/csharp/language-reference/statements/checked-and-unchecked.md b/docs/csharp/language-reference/statements/checked-and-unchecked.md index 401812821663c..0a76381422a9c 100644 --- a/docs/csharp/language-reference/statements/checked-and-unchecked.md +++ b/docs/csharp/language-reference/statements/checked-and-unchecked.md @@ -54,8 +54,8 @@ Constant expressions are evaluated by default in a checked context and a compile For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [The checked and unchecked statements](~/_csharpstandard/standard/statements.md#1212-the-checked-and-unchecked-statements) -- [The checked and unchecked operators](~/_csharpstandard/standard/expressions.md#11718-the-checked-and-unchecked-operators) +- [The checked and unchecked statements](~/_csharpstandard/standard/statements.md#1312-the-checked-and-unchecked-statements) +- [The checked and unchecked operators](~/_csharpstandard/standard/expressions.md#12819-the-checked-and-unchecked-operators) - [User defined checked and unchecked operators - C# 11](~/_csharplang/proposals/csharp-11.0/checked-user-defined-operators.md) ## See also diff --git a/docs/csharp/language-reference/statements/declarations.md b/docs/csharp/language-reference/statements/declarations.md index f3142b11df197..1ff184c886637 100644 --- a/docs/csharp/language-reference/statements/declarations.md +++ b/docs/csharp/language-reference/statements/declarations.md @@ -1,7 +1,7 @@ --- title: "Declaration statements - var, ref local variables, and ref fields" description: "Declarations introduce a new variable. These statements include `var`, `ref` locals, and `ref` fields. In addition to declaring a new variable, these statements can initialize that variable's value." -ms.date: 11/22/2022 +ms.date: 01/30/2023 f1_keywords: - "var" - "var_CSharpKeyword" @@ -45,27 +45,22 @@ The following example shows two query expressions. In the first expression, the ## Ref locals -You add the `ref` keyword before the type of a variable to declare a `ref` local. Assume the `GetContactInformation` method is declared as a [ref return](jump-statements.md#ref-returns): +You add the `ref` keyword before the type of a variable to declare a `ref` local. A `ref` local is a variable that *refers to* other storage. Assume the `GetContactInformation` method is declared as a [ref return](jump-statements.md#ref-returns): ```csharp public ref Person GetContactInformation(string fname, string lname) ``` -A by-value assignment reads the value of a variable and assigns it to a new variable: +Let's contrast these two assignments: ```csharp Person p = contacts.GetContactInformation("Brandie", "Best"); +ref Person p2 = ref contacts.GetContactInformation("Brandie", "Best"); ``` -The preceding assignment declares `p` as a local variable. Its initial value is copied from reading the value returned by `GetContactInformation`. Any future assignments to `p` won't change the value of the variable returned by `GetContactInformation`. The variable `p` is no longer an alias to the variable returned. +The variable `p` holds a *copy* of the return value from `GetContactInformation`. It's a separate storage location from the `ref` return from `GetContactInformation`. If you change any property of `p`, you are changing a copy of the `Person`. -You declare a *ref* variable to copy the alias to the original value. In the following assignment, `p` is an alias to the variable returned from `GetContactInformation`. - -```csharp -ref Person p = ref contacts.GetContactInformation("Brandie", "Best"); -``` - -Subsequent usage of `p` is the same as using the variable returned by `GetContactInformation` because `p` is an alias for that variable. Changes to `p` also change the variable returned from `GetContactInformation`. +The variable `p2` *refers to* the storage location for the `ref` return from `GetContactInformation`. It's the same storage as the `ref` return from `GetContactInformation`. If you change any property of `p2`, you are changing that single instance of a `Person`. You can access a value by reference in the same way. In some cases, accessing a value by reference increases performance by avoiding a potentially expensive copy operation. For example, the following statement shows how one can define a ref local value that is used to reference a value. @@ -126,7 +121,7 @@ The `scoped` modifier is implicitly added to `this` in methods declared in a `st ## See also - [ref keyword](../keywords/ref.md) -- [Write safe efficient code](../../write-safe-efficient-code.md) +- [Avoid allocations](../../advanced-topics/performance/index.md) - ['var' preferences (style rules IDE0007 and IDE0008)](../../../fundamentals/code-analysis/style-rules/ide0007-ide0008.md) - [C# reference](../index.md) - [Type relationships in LINQ query operations](../../programming-guide/concepts/linq/type-relationships-in-linq-query-operations.md) diff --git a/docs/csharp/language-reference/statements/fixed.md b/docs/csharp/language-reference/statements/fixed.md index fe37070018c75..725cb63ebb0a2 100644 --- a/docs/csharp/language-reference/statements/fixed.md +++ b/docs/csharp/language-reference/statements/fixed.md @@ -49,10 +49,8 @@ You can also use the `fixed` keyword to declare a [fixed-size buffer](../unsafe- For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [The fixed statement](~/_csharpstandard/standard/unsafe-code.md#227-the-fixed-statement) -- [Fixed and moveable variables](~/_csharpstandard/standard/unsafe-code.md#224-fixed-and-moveable-variables) - -For information about the pattern-based `fixed` statement, see the [Pattern-based `fixed` statement](~/_csharplang/proposals/csharp-7.3/pattern-based-fixed.md) feature proposal note. +- [The fixed statement](~/_csharpstandard/standard/unsafe-code.md#237-the-fixed-statement) +- [Fixed and moveable variables](~/_csharpstandard/standard/unsafe-code.md#234-fixed-and-moveable-variables) ## See also diff --git a/docs/csharp/language-reference/statements/iteration-statements.md b/docs/csharp/language-reference/statements/iteration-statements.md index ae8acaa06d1b3..8f681a5f6a0f2 100644 --- a/docs/csharp/language-reference/statements/iteration-statements.md +++ b/docs/csharp/language-reference/statements/iteration-statements.md @@ -107,7 +107,7 @@ You can also use the `await foreach` statement with an instance of any type that - A type has the public parameterless `GetAsyncEnumerator` method. That method can be a type's [extension method](../../programming-guide/classes-and-structs/extension-methods.md). - The return type of the `GetAsyncEnumerator` method has the public `Current` property and the public parameterless `MoveNextAsync` method whose return type is [`Task<bool>`](xref:System.Threading.Tasks.Task%601), [`ValueTask<bool>`](xref:System.Threading.Tasks.ValueTask%601), or any other awaitable type whose awaiter's `GetResult` method returns a `bool` value. -By default, stream elements are processed in the captured context. If you want to disable capturing of the context, use the <xref:System.Threading.Tasks.TaskAsyncEnumerableExtensions.ConfigureAwait%2A?displayProperty=nameWithType> extension method. For more information about synchronization contexts and capturing the current context, see [Consuming the Task-based asynchronous pattern](../../../standard/asynchronous-programming-patterns/consuming-the-task-based-asynchronous-pattern.md). For more information about asynchronous streams, see the [Asynchronous streams tutorial](../../tutorials/generate-consume-asynchronous-stream.md). +By default, stream elements are processed in the captured context. If you want to disable capturing of the context, use the <xref:System.Threading.Tasks.TaskAsyncEnumerableExtensions.ConfigureAwait%2A?displayProperty=nameWithType> extension method. For more information about synchronization contexts and capturing the current context, see [Consuming the Task-based asynchronous pattern](../../../standard/asynchronous-programming-patterns/consuming-the-task-based-asynchronous-pattern.md). For more information about asynchronous streams, see the [Asynchronous streams tutorial](../../asynchronous-programming/generate-consume-asynchronous-stream.md). ### Type of an iteration variable @@ -146,10 +146,10 @@ The following example shows the usage of the `while` statement: For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [The `for` statement](~/_csharpstandard/standard/statements.md#1294-the-for-statement) -- [The `foreach` statement](~/_csharpstandard/standard/statements.md#1295-the-foreach-statement) -- [The `do` statement](~/_csharpstandard/standard/statements.md#1293-the-do-statement) -- [The `while` statement](~/_csharpstandard/standard/statements.md#1292-the-while-statement) +- [The `for` statement](~/_csharpstandard/standard/statements.md#1394-the-for-statement) +- [The `foreach` statement](~/_csharpstandard/standard/statements.md#1395-the-foreach-statement) +- [The `do` statement](~/_csharpstandard/standard/statements.md#1393-the-do-statement) +- [The `while` statement](~/_csharpstandard/standard/statements.md#1392-the-while-statement) For more information about features added in C# 8.0 and later, see the following feature proposal notes: diff --git a/docs/csharp/language-reference/statements/jump-statements.md b/docs/csharp/language-reference/statements/jump-statements.md index 5d84763a17b83..9bea8fc04d423 100644 --- a/docs/csharp/language-reference/statements/jump-statements.md +++ b/docs/csharp/language-reference/statements/jump-statements.md @@ -17,7 +17,7 @@ helpviewer_keywords: - "goto statement [C#]" - "goto keyword [C#]" --- -# Jump statements - `break`, `continue`, `return` and `goto` +# Jump statements - `break`, `continue`, `return`, and `goto` Four C# statements unconditionally transfer control. The `break` [statement](#the-break-statement), terminates the closest enclosing [iteration statement](iteration-statements.md) or `switch` [statement](selection-statements.md#the-switch-statement). The `continue` [statement](#the-continue-statement) starts a new iteration of the closest enclosing [iteration statement](iteration-statements.md). The `return` [statement](#the-return-statement): terminates execution of the function in which it appears and returns control to the caller. The `ref` modifier on a `return` statement indicates the returned expression is returned *by reference*, not *by value*. The `goto` [statement](#the-goto-statement): transfers control to a statement that is marked by a label. @@ -123,10 +123,10 @@ If a label with the given name doesn't exist in the current function member, or For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [The `break` statement](~/_csharpstandard/standard/statements.md#12102-the-break-statement) -- [The `continue` statement](~/_csharpstandard/standard/statements.md#12103-the-continue-statement) -- [The `return` statement](~/_csharpstandard/standard/statements.md#12105-the-return-statement) -- [The `goto` statement](~/_csharpstandard/standard/statements.md#12104-the-goto-statement) +- [The `break` statement](~/_csharpstandard/standard/statements.md#13102-the-break-statement) +- [The `continue` statement](~/_csharpstandard/standard/statements.md#13103-the-continue-statement) +- [The `return` statement](~/_csharpstandard/standard/statements.md#13105-the-return-statement) +- [The `goto` statement](~/_csharpstandard/standard/statements.md#13104-the-goto-statement) ## See also diff --git a/docs/csharp/language-reference/statements/lock.md b/docs/csharp/language-reference/statements/lock.md index afbb44a0ea3fb..ae1d8e85639c3 100644 --- a/docs/csharp/language-reference/statements/lock.md +++ b/docs/csharp/language-reference/statements/lock.md @@ -8,7 +8,7 @@ f1_keywords: helpviewer_keywords: - "lock keyword [C#]" --- -# lock statement - ensure exclusive access to a shared resource. +# lock statement - ensure exclusive access to a shared resource The `lock` statement acquires the mutual-exclusion lock for a given object, executes a statement block, and then releases the lock. While a lock is held, the thread that holds the lock can again acquire and release the lock. Any other thread is blocked from acquiring the lock and waits until the lock is released. The `lock` statement ensures that a single thread has exclusive access to that object. @@ -59,7 +59,7 @@ The following example defines an `Account` class that synchronizes access to its ## C# language specification -For more information, see [The lock statement](~/_csharpstandard/standard/statements.md#1213-the-lock-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see [The lock statement](~/_csharpstandard/standard/statements.md#1313-the-lock-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/statements/selection-statements.md b/docs/csharp/language-reference/statements/selection-statements.md index 56b8873ab9753..5e3d1a6279562 100644 --- a/docs/csharp/language-reference/statements/selection-statements.md +++ b/docs/csharp/language-reference/statements/selection-statements.md @@ -17,7 +17,7 @@ helpviewer_keywords: - "case keyword [C#]" - "default keyword [C#]" --- -# Selection statements - `if`, `else` and `switch` +# Selection statements - `if`, `else`, and `switch` The `if`, `else` and `switch` statements select statements to execute from many possible paths based on the value of an expression. The `if` [statement](#the-if-statement) selects a statement to execute based on the value of a Boolean expression. An `if` statement can be combined with `else` to choose two distinct paths based on the Boolean expression. The `switch` [statement](#the-switch-statement) selects a statement list to execute based on a pattern match with an expression. @@ -80,8 +80,8 @@ The preceding example uses [positional patterns](../operators/patterns.md#positi For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md): -- [The `if` statement](~/_csharpstandard/standard/statements.md#1282-the-if-statement) -- [The `switch` statement](~/_csharpstandard/standard/statements.md#1283-the-switch-statement) +- [The `if` statement](~/_csharpstandard/standard/statements.md#1382-the-if-statement) +- [The `switch` statement](~/_csharpstandard/standard/statements.md#1383-the-switch-statement) For more information about pattern matching `switch` statement, see the following feature proposal notes: diff --git a/docs/csharp/language-reference/statements/snippets/using/AsyncDisposableExample.cs b/docs/csharp/language-reference/statements/snippets/using/AsyncDisposableExample.cs new file mode 100644 index 0000000000000..9b74f6a1a60cc --- /dev/null +++ b/docs/csharp/language-reference/statements/snippets/using/AsyncDisposableExample.cs @@ -0,0 +1,4 @@ +public sealed class AsyncDisposableExample : IAsyncDisposable +{ + ValueTask IAsyncDisposable.DisposeAsync() => ValueTask.CompletedTask; +} \ No newline at end of file diff --git a/docs/csharp/language-reference/statements/snippets/using/Program.cs b/docs/csharp/language-reference/statements/snippets/using/Program.cs new file mode 100644 index 0000000000000..6a107420bf74c --- /dev/null +++ b/docs/csharp/language-reference/statements/snippets/using/Program.cs @@ -0,0 +1,70 @@ + +static void Using() +{ + // <Using> + var numbers = new List<int>(); + using (StreamReader reader = File.OpenText("numbers.txt")) + { + string line; + while ((line = reader.ReadLine()) is not null) + { + if (int.TryParse(line, out int number)) + { + numbers.Add(number); + } + } + } + // </Using> +} + +static async void AwaitUsing() +{ + // <AwaitUsing> + await using (var resource = new AsyncDisposableExample()) + { + // Use the resource + } + // </AwaitUsing> +} + +// <UsingDeclaration> +static IEnumerable<int> LoadNumbers(string filePath) +{ + using StreamReader reader = File.OpenText(filePath); + + var numbers = new List<int>(); + string line; + while ((line = reader.ReadLine()) is not null) + { + if (int.TryParse(line, out int number)) + { + numbers.Add(number); + } + } + return numbers; +} +// </UsingDeclaration> + +static void MultipleResources() +{ + // <MultipleResources> + using (StreamReader numbersFile = File.OpenText("numbers.txt"), wordsFile = File.OpenText("words.txt")) + { + // Process both files + } + // </MultipleResources> +} + +static IEnumerable<int> UsingWithExpression(string filePath) +{ + var result = new List<int>(); + // <UsingWithExpression> + StreamReader reader = File.OpenText(filePath); + + using (reader) + { + // Process file content + } + // </UsingWithExpression> + return result; +} diff --git a/docs/csharp/language-reference/statements/snippets/using/using.csproj b/docs/csharp/language-reference/statements/snippets/using/using.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/csharp/language-reference/statements/snippets/using/using.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/language-reference/statements/using.md b/docs/csharp/language-reference/statements/using.md new file mode 100644 index 0000000000000..3e204a0cc1c49 --- /dev/null +++ b/docs/csharp/language-reference/statements/using.md @@ -0,0 +1,69 @@ +--- +title: "using statement - ensure the correct use of disposable objects" +description: "Use the C# using statement or declaration to ensure the correct use of disposable objects" +ms.date: 03/13/2023 +f1_keywords: + - "using-statement_CSharpKeyword" +helpviewer_keywords: + - "using statement [C#]" +--- +# using statement - ensure the correct use of disposable objects + +The `using` statement ensures the correct use of an <xref:System.IDisposable> instance: + +:::code language="csharp" source="snippets/using/Program.cs" id="Using"::: + +When the control leaves the block of the `using` statement, an acquired <xref:System.IDisposable> instance is disposed. In particular, the `using` statement ensures that a disposable instance is disposed even if an exception occurs within the block of the `using` statement. In the preceding example, an opened file is closed after all lines are processed. + +Use the `await using` statement to correctly use an <xref:System.IAsyncDisposable> instance: + +:::code language="csharp" source="snippets/using/Program.cs" id="AwaitUsing"::: + +For more information about using of <xref:System.IAsyncDisposable> instances, see the [Using async disposable](../../../standard/garbage-collection/implementing-disposeasync.md#using-async-disposable) section of the [Implement a DisposeAsync method](../../../standard/garbage-collection/implementing-disposeasync.md) article. + +You can also use a `using` *declaration* that doesn't require braces: + +:::code language="csharp" source="snippets/using/Program.cs" id="UsingDeclaration"::: + +When declared in a `using` declaration, a local variable is disposed at the end of the scope in which it's declared. In the preceding example, disposal happens at the end of a method. + +A variable declared by the `using` statement or declaration is readonly. You cannot reassign it or pass it as a [`ref`](../keywords/ref.md) or [`out`](../keywords/out-parameter-modifier.md) parameter. + +You can declare several instances of the same type in one `using` statement, as the following example shows: + +:::code language="csharp" source="snippets/using/Program.cs" id="MultipleResources"::: + +When you declare several instances in one `using` statement, they are disposed in reverse order of declaration. + +You can also use the `using` statement and declaration with an instance of a [ref struct](../builtin-types/ref-struct.md) that fits the disposable pattern. That is, it has an instance `Dispose` method, which is accessible, parameterless and has a `void` return type. + +The `using` statement can also be of the following form: + +```csharp +using (expression) +{ + // ... +} +``` + +where `expression` produces a disposable instance. The following example demonstrates that: + +:::code language="csharp" source="snippets/using/Program.cs" id="UsingWithExpression"::: + +> [!WARNING] +> In the preceding example, after control leaves the `using` statement, a disposable instance remains in scope while it's already disposed. If you use that instance further, you might encounter an exception, for example, <xref:System.ObjectDisposedException>. That's why we recommend declaring a disposable variable within the `using` statement or with the `using` declaration. + +## C# language specification + +For more information, see [The using statement](~/_csharpstandard/standard/statements.md#1314-the-using-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the proposal note about ["pattern-based using" and "using declarations"](~/_csharplang/proposals/csharp-8.0/using.md). + +## See also + +- [C# reference](../index.md) +- <xref:System.IDisposable?displayProperty=nameWithType> +- <xref:System.IAsyncDisposable?displayProperty=nameWithType> +- [Using objects that implement IDisposable](../../../standard/garbage-collection/using-objects.md) +- [Implement a Dispose method](../../../standard/garbage-collection/implementing-dispose.md) +- [Implement a DisposeAsync method](../../../standard/garbage-collection/implementing-disposeasync.md) +- [Use simple 'using' statement (style rule IDE0063)](../../../fundamentals/code-analysis/style-rules/ide0063.md) +- [`using` directive](../keywords/using-directive.md) diff --git a/docs/csharp/language-reference/statements/yield.md b/docs/csharp/language-reference/statements/yield.md index e8d79c6e47ec4..76da5593fdbc4 100644 --- a/docs/csharp/language-reference/statements/yield.md +++ b/docs/csharp/language-reference/statements/yield.md @@ -49,7 +49,7 @@ As the preceding example shows, when you start to iterate over an iterator's res ## C# language specification -For more information, see [The yield statement](~/_csharpstandard/standard/statements.md#1215-the-yield-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see [The yield statement](~/_csharpstandard/standard/statements.md#1315-the-yield-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/tokens/interpolated.md b/docs/csharp/language-reference/tokens/interpolated.md index 176df98a20568..3826765576995 100644 --- a/docs/csharp/language-reference/tokens/interpolated.md +++ b/docs/csharp/language-reference/tokens/interpolated.md @@ -109,7 +109,7 @@ Beginning with C# 10, when an interpolated string is used, the compiler checks i ## C# language specification -For more information, see the [Interpolated strings](~/_csharpstandard/standard/expressions.md#1173-interpolated-string-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md), the [C# 11 - Raw string literals](~/_csharplang/proposals/csharp-11.0/raw-string-literal.md) feature specification and the [C# 11 - Newlines in string interpolations](~/_csharplang/proposals/csharp-11.0/new-line-in-interpolation.md) feature specification. +For more information, see the [Interpolated strings](~/_csharpstandard/standard/expressions.md#1283-interpolated-string-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md), the [C# 11 - Raw string literals](~/_csharplang/proposals/csharp-11.0/raw-string-literal.md) feature specification and the [C# 11 - Newlines in string interpolations](~/_csharplang/proposals/csharp-11.0/new-line-in-interpolation.md) feature specification. ## See also diff --git a/docs/csharp/language-reference/tokens/raw-string.md b/docs/csharp/language-reference/tokens/raw-string.md index 60d7caf7a5d38..9b5429f34a9e4 100644 --- a/docs/csharp/language-reference/tokens/raw-string.md +++ b/docs/csharp/language-reference/tokens/raw-string.md @@ -32,6 +32,8 @@ If you need to start or end a raw string literal with quote characters, use the Raw strings can also be combined with [interpolated strings](./interpolated.md#special-characters) to embed the `{` and `}` characters in the output string. You use multiple `$` characters in an interpolated raw string literal to embed `{` and `}` characters in the output string without escaping them. +Raw string literals were introduced in C# 11. + ## See also - [C# interpolated strings](./interpolated.md) diff --git a/docs/csharp/language-reference/tokens/verbatim.md b/docs/csharp/language-reference/tokens/verbatim.md index 26962eb066356..44de4f8247dcc 100644 --- a/docs/csharp/language-reference/tokens/verbatim.md +++ b/docs/csharp/language-reference/tokens/verbatim.md @@ -11,11 +11,7 @@ helpviewer_keywords: --- # Verbatim text - `@` in variables, attributes, and string literals -The `@` special character serves as a verbatim identifier. It can be used in the following ways: - -1. To enable C# keywords to be used as identifiers. The `@` character prefixes a code element that the compiler is to interpret as an identifier rather than a C# keyword. The following example uses the `@` character to define an identifier named `for` that it uses in a `for` loop. - - [!code-csharp[verbatim1](../../../../samples/snippets/csharp/language-reference/keywords/verbatim1.cs#1)] +The `@` special character serves as a verbatim identifier. You use it in the following ways: 1. To indicate that a string literal is to be interpreted verbatim. The `@` character in this instance defines a *verbatim string literal*. Simple escape sequences (such as `"\\"` for a backslash), hexadecimal escape sequences (such as `"\x0041"` for an uppercase A), and Unicode escape sequences (such as `"\u0041"` for an uppercase A) are interpreted literally. Only a quote escape sequence (`""`) isn't interpreted literally; it produces one double quotation mark. Additionally, in case of a verbatim [interpolated string](interpolated.md) brace escape sequences (`{{` and `}}`) aren't interpreted literally; they produce single brace characters. The following example defines two identical file paths, one by using a regular string literal and the other by using a verbatim string literal. This is one of the more common uses of verbatim string literals. @@ -25,6 +21,10 @@ The `@` special character serves as a verbatim identifier. It can be used in the [!code-csharp[verbatim3](../../../../samples/snippets/csharp/language-reference/keywords/verbatim1.cs#3)] +1. To use C# keywords as identifiers. The `@` character prefixes a code element that the compiler is to interpret as an identifier rather than a C# keyword. The following example uses the `@` character to define an identifier named `for` that it uses in a `for` loop. + + [!code-csharp[verbatim1](../../../../samples/snippets/csharp/language-reference/keywords/verbatim1.cs#1)] + 1. To enable the compiler to distinguish between attributes in cases of a naming conflict. An attribute is a class that derives from <xref:System.Attribute>. Its type name typically includes the suffix **Attribute**, although the compiler doesn't enforce this convention. The attribute can then be referenced in code either by its full type name (for example, `[InfoAttribute]` or its shortened name (for example, `[Info]`). However, a naming conflict occurs if two shortened attribute type names are identical, and one type name includes the **Attribute** suffix but the other doesn't. For example, the following code fails to compile because the compiler can't determine whether the `Info` or `InfoAttribute` attribute is applied to the `Example` class. For more information, see [CS1614](../compiler-messages/cs1614.md). [!code-csharp[verbatim4](../../../../samples/snippets/csharp/language-reference/keywords/verbatim2.cs#1)] diff --git a/docs/csharp/language-reference/xmldoc/snippets/xmldoc/DocComments.cs b/docs/csharp/language-reference/xmldoc/snippets/xmldoc/DocComments.cs index f5fb6ffaaa297..92b0558bbb0f3 100644 --- a/docs/csharp/language-reference/xmldoc/snippets/xmldoc/DocComments.cs +++ b/docs/csharp/language-reference/xmldoc/snippets/xmldoc/DocComments.cs @@ -10,7 +10,7 @@ namespace XmlTags /// </summary> /// <remarks> /// You can expand on that one sentence summary to - /// provide more information for readers. In this case, + /// provide more information for readers. In this case, /// the <c>ExampleClass</c> provides different C# /// elements to show how you would add documentation ///comments for most elements in a typical class. @@ -81,7 +81,7 @@ namespace XmlTags /// also use the "bullet" or "number" style. Neither /// would typically use the "term" element. /// <br/> - /// Note: paragraphs are double spaced. Use the *br* + /// Note: paragraphs are double spaced. Use the *br* /// tag for single spaced lines. /// </para> /// </remarks> @@ -127,11 +127,11 @@ public string? Label /// </code> /// </example> /// <exception cref="System.OverflowException"> - /// Thrown when one parameter is + /// Thrown when one parameter is /// <see cref="Int32.MaxValue">MaxValue</see> and the other is /// greater than 0. - /// Note that here you can also use - /// <see href="https://docs.microsoft.com/dotnet/api/system.int32.maxvalue"/> + /// Note that here you can also use + /// <see href="https://learn.microsoft.com/dotnet/api/system.int32.maxvalue"/> /// to point a web page instead. /// </exception> /// <see cref="ExampleClass"/> for a list of all @@ -175,7 +175,7 @@ namespace InheritDoc /// </summary> /// <remarks> /// These remarks would explain more about this class. - /// In this example, these comments also explain the + /// In this example, these comments also explain the /// general information about the derived class. /// </remarks> public class MainClass @@ -194,7 +194,7 @@ public class DerivedClass : MainClass /// <remarks> /// While elided for brevity, each method or property /// in this interface would contain docs that you want - /// to duplicate in each implementing class. + /// to duplicate in each implementing class. /// </remarks> public interface ITestInterface { @@ -202,8 +202,8 @@ public interface ITestInterface /// This method is part of the test interface. /// </summary> /// <remarks> - /// This content would be inherited by classes - /// that implement this interface when the + /// This content would be inherited by classes + /// that implement this interface when the /// implementing class uses "inheritdoc" /// </remarks> /// <returns>The value of <paramref name="arg" /> </returns> diff --git a/docs/csharp/linq/dynamically-specify-predicate-filters-at-runtime.md b/docs/csharp/linq/dynamically-specify-predicate-filters-at-runtime.md index 6cdae2bb8142a..2cc69f356db9a 100644 --- a/docs/csharp/linq/dynamically-specify-predicate-filters-at-runtime.md +++ b/docs/csharp/linq/dynamically-specify-predicate-filters-at-runtime.md @@ -20,4 +20,4 @@ You can use control flow statements, such as `if... else` or `switch`, to select - [Language Integrated Query (LINQ)](index.md) - [where clause](../language-reference/keywords/where-clause.md) -- [Querying based on runtime state](../../csharp/programming-guide/concepts/expression-trees/how-to-use-expression-trees-to-build-dynamic-queries.md) +- [Querying based on runtime state](../advanced-topics/expression-trees/debugview-syntax.md) diff --git a/docs/csharp/linq/index.md b/docs/csharp/linq/index.md index c5e1dc2de4c04..15749f81bfc03 100644 --- a/docs/csharp/linq/index.md +++ b/docs/csharp/linq/index.md @@ -9,7 +9,7 @@ ms.assetid: 007cc736-f5cf-4919-b99b-0c00ab2814ce Language-Integrated Query (LINQ) is the name for a set of technologies based on the integration of query capabilities directly into the C# language. Traditionally, queries against data are expressed as simple strings without type checking at compile time or IntelliSense support. Furthermore, you have to learn a different query language for each type of data source: SQL databases, XML documents, various Web services, and so on. With LINQ, a query is a first-class language construct, just like classes, methods, events. -For a developer who writes queries, the most visible "language-integrated" part of LINQ is the query expression. Query expressions are written in a declarative *query syntax*. By using query syntax, you can perform filtering, ordering, and grouping operations on data sources with a minimum of code. You use the same basic query expression patterns to query and transform data in SQL databases, ADO .NET Datasets, XML documents and streams, and .NET collections. +For a developer who writes queries, the most visible "language-integrated" part of LINQ is the query expression. Query expressions are written in a declarative *query syntax*. By using query syntax, you can perform filtering, ordering, and grouping operations on data sources with a minimum of code. You use the same basic query expression patterns to query and transform data in SQL databases, ADO.NET Datasets, XML documents and streams, and .NET collections. The following example shows the complete query operation. The complete operation includes creating a data source, defining the query expression, and executing the query in a `foreach` statement. @@ -25,13 +25,13 @@ The following example shows the complete query operation. The complete operation - A query is not executed until you iterate over the query variable, for example, in a `foreach` statement. For more information, see [Introduction to LINQ queries](../programming-guide/concepts/linq/introduction-to-linq-queries.md). -- At compile time, query expressions are converted to Standard Query Operator method calls according to the rules set forth in the C# specification. Any query that can be expressed by using query syntax can also be expressed by using method syntax. However, in most cases query syntax is more readable and concise. For more information, see [C# language specification](~/_csharpstandard/standard/expressions.md#1118-query-expressions) and [Standard query operators overview](../programming-guide/concepts/linq/standard-query-operators-overview.md). +- At compile time, query expressions are converted to Standard Query Operator method calls according to the rules set forth in the C# specification. Any query that can be expressed by using query syntax can also be expressed by using method syntax. However, in most cases query syntax is more readable and concise. For more information, see [C# language specification](~/_csharpstandard/standard/expressions.md#1220-query-expressions) and [Standard query operators overview](../programming-guide/concepts/linq/standard-query-operators-overview.md). - As a rule when you write LINQ queries, we recommend that you use query syntax whenever possible and method syntax whenever necessary. There is no semantic or performance difference between the two different forms. Query expressions are often more readable than equivalent expressions written in method syntax. - Some query operations, such as <xref:System.Linq.Enumerable.Count%2A> or <xref:System.Linq.Enumerable.Max%2A>, have no equivalent query expression clause and must therefore be expressed as a method call. Method syntax can be combined with query syntax in various ways. For more information, see [Query syntax and method syntax in LINQ](../programming-guide/concepts/linq/query-syntax-and-method-syntax-in-linq.md). -- Query expressions can be compiled to expression trees or to delegates, depending on the type that the query is applied to. <xref:System.Collections.Generic.IEnumerable%601> queries are compiled to delegates. <xref:System.Linq.IQueryable> and <xref:System.Linq.IQueryable%601> queries are compiled to expression trees. For more information, see [Expression trees](../expression-trees.md). +- Query expressions can be compiled to expression trees or to delegates, depending on the type that the query is applied to. <xref:System.Collections.Generic.IEnumerable%601> queries are compiled to delegates. <xref:System.Linq.IQueryable> and <xref:System.Linq.IQueryable%601> queries are compiled to expression trees. For more information, see [Expression trees](/dotnet/csharp/advanced-topics/expression-trees). ## Next steps diff --git a/docs/csharp/methods.md b/docs/csharp/methods.md index f6036e22dd7ac..d0c3be0bef3a3 100644 --- a/docs/csharp/methods.md +++ b/docs/csharp/methods.md @@ -252,7 +252,7 @@ In the following example, `DelayAsync` is an async method that has a return stat An async method can't declare any [in](language-reference/keywords/in-parameter-modifier.md), [ref](language-reference/keywords/ref.md), or [out](language-reference/keywords/out-parameter-modifier.md) parameters, but it can call methods that have such parameters. - For more information about async methods, see [Asynchronous programming with async and await](async.md) and [Async return types](programming-guide/concepts/async/async-return-types.md). + For more information about async methods, see [Asynchronous programming with async and await](asynchronous-programming/index.md) and [Async return types](asynchronous-programming/async-return-types.md). <a name="expr"></a> diff --git a/docs/csharp/misc/cs0067.md b/docs/csharp/misc/cs0067.md index 22c9f26a7746d..99d0992e3abfb 100644 --- a/docs/csharp/misc/cs0067.md +++ b/docs/csharp/misc/cs0067.md @@ -37,4 +37,21 @@ class MyClass { } } +``` + +If the event is unused intentionally, for example, when it's part of an interface implementation, then you can avoid emitting an unnecessary field as follows: + +```csharp +using System; + +public interface IThing +{ + event Action? E; +} + +public class Thing : IThing +{ + // no CS0067 though the event is left unused + public event Action? E { add { } remove { } } +} ``` diff --git a/docs/csharp/misc/cs0182.md b/docs/csharp/misc/cs0182.md index 7340e46a43af7..6ad21962308c1 100644 --- a/docs/csharp/misc/cs0182.md +++ b/docs/csharp/misc/cs0182.md @@ -24,7 +24,7 @@ Certain restrictions apply to what kinds of arguments may be used with attribute - [decimal](../language-reference/builtin-types/floating-point-numeric-types.md) -For more information, see [Attributes](../programming-guide/concepts/attributes/index.md). +For more information, see [Attributes](/dotnet/csharp/advanced-topics/reflection-and-attributes). ## Example diff --git a/docs/csharp/misc/cs0210.md b/docs/csharp/misc/cs0210.md index 588f049bb8bc0..a4de6bd30ce5a 100644 --- a/docs/csharp/misc/cs0210.md +++ b/docs/csharp/misc/cs0210.md @@ -47,7 +47,7 @@ public class MyClass } ``` - The following sample also generates CS0210 because the [using statement](../language-reference/keywords/using-statement.md) has no initializer. + The following sample also generates CS0210 because the [using statement](../language-reference/statements/using.md) has no initializer. ```csharp // CS0210b.cs diff --git a/docs/csharp/misc/cs0217.md b/docs/csharp/misc/cs0217.md index b56361de83bd3..ec8fff9d8acec 100644 --- a/docs/csharp/misc/cs0217.md +++ b/docs/csharp/misc/cs0217.md @@ -12,7 +12,7 @@ ms.assetid: ede61095-6e11-4f4a-8e7d-85e7a3f4fc3d In order to be applicable as a short circuit operator a user-defined logical operator ('operator') must have the same return type as the type of its 2 parameters. - If you define an operator for a user-defined type, and then try to use the operator as a short-circuit operator, the user-defined operator must have parameters and return values of the same type. For more information about short-circuit operators, see [`&&` operator](../language-reference/operators/boolean-logical-operators.md#conditional-logical-and-operator-) and [`||` operator](../language-reference/operators/boolean-logical-operators.md#conditional-logical-or-operator-). For more information about user-defined short-circuit, or conditional, operators, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#11133-user-defined-conditional-logical-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). + If you define an operator for a user-defined type, and then try to use the operator as a short-circuit operator, the user-defined operator must have parameters and return values of the same type. For more information about short-circuit operators, see [`&&` operator](../language-reference/operators/boolean-logical-operators.md#conditional-logical-and-operator-) and [`||` operator](../language-reference/operators/boolean-logical-operators.md#conditional-logical-or-operator-). For more information about user-defined short-circuit, or conditional, operators, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12143-user-defined-conditional-logical-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). The following sample generates CS0217: diff --git a/docs/csharp/misc/cs0643.md b/docs/csharp/misc/cs0643.md index c3496cf48cc3d..c360f7212d871 100644 --- a/docs/csharp/misc/cs0643.md +++ b/docs/csharp/misc/cs0643.md @@ -12,7 +12,7 @@ ms.assetid: beae30ff-15c2-413f-8f5c-504cdba2e57a 'arg' duplicate named attribute argument - A parameter, `arg`, on a user-defined attribute was specified twice. For more information, see [Attributes](../programming-guide/concepts/attributes/index.md). + A parameter, `arg`, on a user-defined attribute was specified twice. For more information, see [Attributes](/dotnet/csharp/advanced-topics/reflection-and-attributes). ## Example diff --git a/docs/csharp/misc/cs0655.md b/docs/csharp/misc/cs0655.md index 91239a802f61e..045c807c265ea 100644 --- a/docs/csharp/misc/cs0655.md +++ b/docs/csharp/misc/cs0655.md @@ -12,7 +12,7 @@ ms.assetid: 8ce340e2-eeeb-476a-8609-ab4bbaf10c44 'parameter' is not a valid named attribute argument because it is not a valid attribute parameter type - See [Attributes](../programming-guide/concepts/attributes/index.md) for a discussion of valid parameter types for an attribute. + See [Attributes](/dotnet/csharp/advanced-topics/reflection-and-attributes) for a discussion of valid parameter types for an attribute. ## Example diff --git a/docs/csharp/misc/cs0657.md b/docs/csharp/misc/cs0657.md index 5aa92a4aec402..5e8fa8db48d07 100644 --- a/docs/csharp/misc/cs0657.md +++ b/docs/csharp/misc/cs0657.md @@ -12,7 +12,7 @@ ms.assetid: d12d2efc-f44e-40e6-b825-5a66ead0c08e 'attribute modifier' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'locations'. All attributes in this block will be ignored. - The compiler found an attribute modifier in an invalid location. See [Attribute Targets](../programming-guide/concepts/attributes/index.md#attribute-targets) for more information. + The compiler found an attribute modifier in an invalid location. See [Attribute Targets](/dotnet/csharp/advanced-topics/reflection-and-attributes#attribute-targets) for more information. The following sample generates CS0657: diff --git a/docs/csharp/misc/cs0658.md b/docs/csharp/misc/cs0658.md index 7b7bca2667de2..ef34d72c2451c 100644 --- a/docs/csharp/misc/cs0658.md +++ b/docs/csharp/misc/cs0658.md @@ -12,7 +12,7 @@ ms.assetid: 0309074c-741a-492c-9370-73b4bbfd3c1a 'attribute modifier' is not a recognized attribute location. All attributes in this block will be ignored. - An invalid attribute modifier was specified. See [Attribute Targets](../programming-guide/concepts/attributes/index.md#attribute-targets) for more information. + An invalid attribute modifier was specified. See [Attribute Targets](/dotnet/csharp/advanced-topics/reflection-and-attributes#attribute-targets) for more information. The following sample generates CS0658: diff --git a/docs/csharp/misc/cs0765.md b/docs/csharp/misc/cs0765.md index 679648620154e..e9703a9875883 100644 --- a/docs/csharp/misc/cs0765.md +++ b/docs/csharp/misc/cs0765.md @@ -62,4 +62,4 @@ public partial class PartClass : IEnumerable ## See also - [Partial Classes and Methods](../programming-guide/classes-and-structs/partial-classes-and-methods.md) -- [Expression Trees (C#)](../programming-guide/concepts/expression-trees/index.md) +- [Expression Trees (C#)](../advanced-topics/expression-trees/index.md) diff --git a/docs/csharp/misc/cs0838.md b/docs/csharp/misc/cs0838.md index 18926e32ee1d4..c6937e7c9f7c1 100644 --- a/docs/csharp/misc/cs0838.md +++ b/docs/csharp/misc/cs0838.md @@ -50,4 +50,4 @@ namespace TestNamespace ## See also -- [Expression Trees (C#)](../programming-guide/concepts/expression-trees/index.md) +- [Expression Trees (C#)](../advanced-topics/expression-trees/index.md) diff --git a/docs/csharp/misc/cs1655.md b/docs/csharp/misc/cs1655.md index 81f15a4bde6b3..b580d2230b4ad 100644 --- a/docs/csharp/misc/cs1655.md +++ b/docs/csharp/misc/cs1655.md @@ -12,7 +12,7 @@ ms.assetid: 041e9daa-c026-494f-b086-0db9a23c969b Cannot pass fields of 'variable' as a ref or out argument because it is a 'readonly variable type' - This error occurs if you are attempting to pass a member of a [foreach](../language-reference/statements/iteration-statements.md#the-foreach-statement) variable, a [using](../language-reference/keywords/using-statement.md) variable, or a [fixed](../language-reference/statements/fixed.md) variable to a function as a ref or out argument. Because these variables are considered read-only in these contexts, this is not allowed. + This error occurs if you are attempting to pass a member of a [foreach](../language-reference/statements/iteration-statements.md#the-foreach-statement) variable, a [using](../language-reference/statements/using.md) variable, or a [fixed](../language-reference/statements/fixed.md) variable to a function as a ref or out argument. Because these variables are considered read-only in these contexts, this is not allowed. The following sample generates CS1655: diff --git a/docs/csharp/misc/cs1657.md b/docs/csharp/misc/cs1657.md index 32d9814e64895..d013086771270 100644 --- a/docs/csharp/misc/cs1657.md +++ b/docs/csharp/misc/cs1657.md @@ -12,7 +12,7 @@ ms.assetid: 6f0aeebe-5c90-4d5b-981c-1795d2e8fbb9 Cannot pass 'parameter' as a ref or out argument because 'reason'' - This error occurs when a variable is passed as a [ref](../language-reference/keywords/ref.md) or [out](../language-reference/keywords/out-parameter-modifier.md) argument in a context in which that variable is readonly. Readonly contexts include [foreach](../language-reference/statements/iteration-statements.md#the-foreach-statement) iteration variables, [using](../language-reference/keywords/using-statement.md) variables, and `fixed` variables. To resolve this error, do not call functions that take the `foreach`, `using` or `fixed` variable as a `ref` or `out` parameter in `using` blocks, `foreach` statements, and `fixed` statements. + This error occurs when a variable is passed as a [ref](../language-reference/keywords/ref.md) or [out](../language-reference/keywords/out-parameter-modifier.md) argument in a context in which that variable is readonly. Readonly contexts include [foreach](../language-reference/statements/iteration-statements.md#the-foreach-statement) iteration variables, [using](../language-reference/statements/using.md) variables, and `fixed` variables. To resolve this error, do not call functions that take the `foreach`, `using` or `fixed` variable as a `ref` or `out` parameter in `using` blocks, `foreach` statements, and `fixed` statements. ## Example 1 diff --git a/docs/csharp/misc/cs1723.md b/docs/csharp/misc/cs1723.md index e23d2c5085f82..5e110014dda4a 100644 --- a/docs/csharp/misc/cs1723.md +++ b/docs/csharp/misc/cs1723.md @@ -10,21 +10,42 @@ ms.assetid: d359be86-7daf-4b59-99a3-10b072336bca --- # Compiler Warning (level 1) CS1723 -XML comment on 'param' has cref attribute 'attribute' that refers to a type parameter +XML comment has cref attribute 'attribute' that refers to a type parameter - This error is generated by an XML comment that refers to a type parameter. +This error is generated for an XML comment in case of using a [\<see/>](../../csharp/language-reference/xmldoc/recommended-tags.md#see) tag with cross reference (cref) to a type parameter instead of the existing type (whether user-defined or built-in) in the code. It's impossible to link to 'attribute' of generic types because at the moment of creating the documentation the future type given as 'attribute' is not yet known. + +To solve this issue [\<typeparamref/>](../../csharp/language-reference/xmldoc/recommended-tags.md#typeparamref) tag should be used. ## Example - The following example generates CS1723. +The following example contains a comment generating CS1723 as well as a reference that can be linked correctly. ```csharp -// CS1723.cs -// compile with: /t:library /doc:filename.XML -///<summary>A generic list class.</summary> -///<see cref="T" /> // CS1723 -// To resolve comment the previous line. -public class List<T> -{ -} -``` +public class Point +{ +} + +// compile with: /t:library /doc:filename.XML +///<summary>A generic list class.</summary> +///uses <see cref="T" /> // CS1723 +///and <see cref="Point" /> // No warning +public class List<T, Point> +{ +} +``` + +This example shows how to correctly link both generic type `T` as well as already known user-defined `Point` + +```csharp +public class Point +{ +} + +// compile with: /t:library /doc:filename.XML +///<summary>A generic list class.</summary> +///uses <typeparamref name="T" /> // No warning +///and <see cref="Point" /> // No warning +public class List<T, Point> +{ +} +``` diff --git a/docs/csharp/misc/cs1730.md b/docs/csharp/misc/cs1730.md index e0e89c5700678..d206795dcf0a7 100644 --- a/docs/csharp/misc/cs1730.md +++ b/docs/csharp/misc/cs1730.md @@ -32,4 +32,4 @@ class Test ## See also -- [Attributes](../programming-guide/concepts/attributes/index.md) +- [Attributes](/dotnet/csharp/advanced-topics/reflection-and-attributes) diff --git a/docs/csharp/misc/cs1945.md b/docs/csharp/misc/cs1945.md index 30e9433a7575f..5fd7288a5d0c6 100644 --- a/docs/csharp/misc/cs1945.md +++ b/docs/csharp/misc/cs1945.md @@ -39,6 +39,6 @@ class Test ## See also -- [Expression Trees (C#)](../programming-guide/concepts/expression-trees/index.md) +- [Expression Trees (C#)](../advanced-topics/expression-trees/index.md) - [Operators and expressions](../language-reference/operators/index.md) - [Expression-bodied members](../programming-guide/statements-expressions-operators/expression-bodied-members.md) diff --git a/docs/csharp/misc/cs1951.md b/docs/csharp/misc/cs1951.md index b6146eec5f648..2e40d4b57a935 100644 --- a/docs/csharp/misc/cs1951.md +++ b/docs/csharp/misc/cs1951.md @@ -37,4 +37,4 @@ class Test ## See also -- [Expression Trees (C#)](../programming-guide/concepts/expression-trees/index.md) +- [Expression Trees (C#)](../advanced-topics/expression-trees/index.md) diff --git a/docs/csharp/modern-events.md b/docs/csharp/modern-events.md index b7659cd242193..d2120c24a1916 100644 --- a/docs/csharp/modern-events.md +++ b/docs/csharp/modern-events.md @@ -74,7 +74,7 @@ codebases. You have one final pattern to learn: How to correctly write event subscribers that call async code. The challenge is described in -the article on [async and await](async.md). Async methods can +the article on [async and await](asynchronous-programming/index.md). Async methods can have a void return type, but that is strongly discouraged. When your event subscriber code calls an async method, you have no choice but to create an `async void` method. The event handler signature requires diff --git a/docs/csharp/nullable-references.md b/docs/csharp/nullable-references.md index 2bbc3d7fa790e..50510c53fdf17 100644 --- a/docs/csharp/nullable-references.md +++ b/docs/csharp/nullable-references.md @@ -96,7 +96,7 @@ public void PrintMessage(string message) } ``` -Based on inspection, any developer would consider this code safe, and shouldn't generate warnings. The compiler doesn't know that `IsNullOrWhiteSpace` provides a null check. You apply attributes to inform the compiler that `message` is *not-null* if and only if `IsNullOrWhiteSpace` returns `false`. In the previous example, the signature includes the [`NotNullWhen`](xref:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute) to indicate the null state of `message`: +Based on inspection, any developer would consider this code safe, and shouldn't generate warnings. The compiler doesn't know that `IsNullOrWhiteSpace` provides a null check. When `IsNullOrWhitespace` returns `false,` the *null-state* of the string is *not-null*. When `IsNullOrWhitespace` returns `true`, the *null-state* isn't changed. In the previous example, the signature includes the [`NotNullWhen`](xref:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute) to indicate the null state of `message`: ```csharp public static bool IsNullOrWhiteSpace([NotNullWhen(false)] string message); diff --git a/docs/csharp/programming-guide/classes-and-structs/constructors.md b/docs/csharp/programming-guide/classes-and-structs/constructors.md index 3757b818b0f2c..e6df6bab024f2 100644 --- a/docs/csharp/programming-guide/classes-and-structs/constructors.md +++ b/docs/csharp/programming-guide/classes-and-structs/constructors.md @@ -1,26 +1,38 @@ --- title: "Constructors - C# programming guide" description: A constructor in C# is called when a class or struct is created. Use constructors to set defaults, limit instantiation, and write flexible, easy-to-read code. -ms.date: 09/27/2021 +ms.date: 04/06/2023 helpviewer_keywords: - "constructors [C#]" - "classes [C#], constructors" - "C# language, constructors" -ms.assetid: df2e2e9d-7998-418b-8e7d-890c17ff6c95 --- # Constructors (C# programming guide) -Whenever a [class](../../language-reference/keywords/class.md) or [struct](../../language-reference/builtin-types/struct.md) is created, its constructor is called. A class or struct may have multiple constructors that take different arguments. Constructors enable the programmer to set default values, limit instantiation, and write code that is flexible and easy to read. For more information and examples, see [Instance constructors](instance-constructors.md) and [Using constructors](using-constructors.md). +Whenever an instance of a [class](../../language-reference/keywords/class.md) or a [struct](../../language-reference/builtin-types/struct.md) is created, its constructor is called. A class or struct may have multiple constructors that take different arguments. Constructors enable the programmer to set default values, limit instantiation, and write code that is flexible and easy to read. For more information and examples, see [Instance constructors](instance-constructors.md) and [Using constructors](using-constructors.md). + +There are several actions that are part of initializing a new instance. Those actions take place in the following order: + +1. *Instance fields are set to 0*. This is typically done by the runtime. +1. *Field initializers run*. The field initializers in the most derived type run. +1. *Base type field initializers run*. Field initializers starting with the direct base through each base type to <xref:System.Object?displayProperty=fullName>. +1. *Base instance constructors run*. Any instance constructors, starting with <xref:System.Object.%23ctor%2A?displayProperty=nameWithType> through each base class to the direct base class. +1. *The instance constructor runs*. The instance constructor for the type runs. +1. *Object initializers run*. If the expression includes any object initializers, those run after the instance constructor runs. Object initializers run in the textual order. + +The preceding actions take place when a new instance is initialized. If a new instance of a `struct` is set to its `default` value, all instance fields are set to 0. + +If the [static constructor](static-constructors.md) hasn't run, the static constructor runs before any of the instance constructor actions take place. ## Constructor syntax A constructor is a method whose name is the same as the name of its type. Its method signature includes only an optional [access modifier](./access-modifiers.md), the method name and its parameter list; it does not include a return type. The following example shows the constructor for a class named `Person`. -[!code-csharp[constructors](../../../../samples/snippets/csharp/programming-guide/classes-and-structs/constructors1.cs#1)] +[!code-csharp[constructors](../../../../samples/snippets/csharp/programming-guide/classes-and-structs/constructors1.cs#1)] If a constructor can be implemented as a single statement, you can use an [expression body definition](../statements-expressions-operators/expression-bodied-members.md). The following example defines a `Location` class whose constructor has a single string parameter named *name*. The expression body definition assigns the argument to the `locationName` field. -[!code-csharp[expression-bodied-constructor](../../../../samples/snippets/csharp/programming-guide/classes-and-structs/expr-bodied-ctor.cs#1)] +[!code-csharp[expression-bodied-constructor](../../../../samples/snippets/csharp/programming-guide/classes-and-structs/expr-bodied-ctor.cs#1)] ## Static constructors @@ -28,26 +40,22 @@ The previous examples have all shown instance constructors, which create a new o The following example uses a static constructor to initialize a static field. -[!code-csharp[constructors](../../../../samples/snippets/csharp/programming-guide/classes-and-structs/constructors1.cs#2)] +[!code-csharp[constructors](../../../../samples/snippets/csharp/programming-guide/classes-and-structs/constructors1.cs#2)] You can also define a static constructor with an expression body definition, as the following example shows. -[!code-csharp[constructors](../../../../samples/snippets/csharp/programming-guide/classes-and-structs/constructors1.cs#3)] - -For more information and examples, see [Static Constructors](./static-constructors.md). - -## In This Section - - [Using Constructors](./using-constructors.md) - - [Instance Constructors](./instance-constructors.md) - - [Private Constructors](./private-constructors.md) - - [Static Constructors](./static-constructors.md) - - [How to write a copy constructor](./how-to-write-a-copy-constructor.md) - +[!code-csharp[constructors](../../../../samples/snippets/csharp/programming-guide/classes-and-structs/constructors1.cs#3)] + +For more information and examples, see [Static Constructors](./static-constructors.md). + +## In This Section + +- [Using constructors](./using-constructors.md) +- [Instance constructors](./instance-constructors.md) +- [Private constructors](./private-constructors.md) +- [Static constructors](./static-constructors.md) +- [How to write a copy constructor](./how-to-write-a-copy-constructor.md) + ## See also - [C# Programming Guide](../index.md) diff --git a/docs/csharp/programming-guide/classes-and-structs/finalizers.md b/docs/csharp/programming-guide/classes-and-structs/finalizers.md index e4a860fff004c..bba651c2fe3ad 100644 --- a/docs/csharp/programming-guide/classes-and-structs/finalizers.md +++ b/docs/csharp/programming-guide/classes-and-structs/finalizers.md @@ -68,7 +68,7 @@ For more information about cleaning up resources, see the following articles: - [Cleaning Up Unmanaged Resources](../../../standard/garbage-collection/unmanaged.md) - [Implementing a Dispose Method](../../../standard/garbage-collection/implementing-dispose.md) - [Implementing a DisposeAsync Method](../../../standard/garbage-collection/implementing-disposeasync.md) -- [using Statement](../../language-reference/keywords/using-statement.md) +- [using statement](../../language-reference/statements/using.md) ## Example @@ -81,7 +81,7 @@ The following example creates three classes that make a chain of inheritance. Th ## C# language specification -For more information, see the [Finalizers](~/_csharpstandard/standard/classes.md#1413-finalizers) section of the [C# Language Specification](~/_csharpstandard/standard/README.md). +For more information, see the [Finalizers](~/_csharpstandard/standard/classes.md#1513-finalizers) section of the [C# Language Specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/programming-guide/classes-and-structs/how-to-use-named-and-optional-arguments-in-office-programming.md b/docs/csharp/programming-guide/classes-and-structs/how-to-use-named-and-optional-arguments-in-office-programming.md deleted file mode 100644 index ddda792148891..0000000000000 --- a/docs/csharp/programming-guide/classes-and-structs/how-to-use-named-and-optional-arguments-in-office-programming.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "How to use named and optional arguments in Office programming - C# Programming Guide" -description: Learn how to use named arguments and optional arguments to facilitate access to COM interfaces such as the Microsoft Office automation APIs. -ms.date: 07/20/2015 -helpviewer_keywords: - - "named and optional arguments [C#], Office programming" - - "optional arguments [C#], Office programming" - - "named arguments [C#], Office programming" -ms.topic: how-to -ms.custom: contperf-fy21q2 -ms.assetid: 65b8a222-bcd8-454c-845f-84adff5a356f ---- -# How to use named and optional arguments in Office programming (C# Programming Guide) - -Named arguments and optional arguments enhance convenience, flexibility, and readability in C# programming. In addition, these features greatly facilitate access to COM interfaces such as the Microsoft Office automation APIs. - -In the following example, method [ConvertToTable](<xref:Microsoft.Office.Interop.Word.Range.ConvertToTable%2A>) has sixteen parameters that represent characteristics of a table, such as number of columns and rows, formatting, borders, fonts, and colors. All sixteen parameters are optional, because most of the time you do not want to specify particular values for all of them. However, without named and optional arguments, a value or a placeholder value has to be provided for each parameter. With named and optional arguments, you specify values only for the parameters that are required for your project. - -You must have Microsoft Office Word installed on your computer to complete these procedures. - -[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] - -## To create a new console application - -1. Start Visual Studio. - -2. On the **File** menu, point to **New**, and then click **Project**. - -3. In the **Templates Categories** pane, expand **Visual C#**, and then click **Windows**. - -4. Look in the top of the **Templates** pane to make sure that **.NET Framework 4** appears in the **Target Framework** box. - -5. In the **Templates** pane, click **Console Application**. - -6. Type a name for your project in the **Name** field. - -7. Click **OK**. - - The new project appears in **Solution Explorer**. - -## To add a reference - -1. In **Solution Explorer**, right-click your project's name and then click **Add Reference**. The **Add Reference** dialog box appears. - -2. On the **.NET** page, select **Microsoft.Office.Interop.Word** in the **Component Name** list. - -3. Click **OK**. - -## To add necessary using directives - -1. In **Solution Explorer**, right-click the *Program.cs* file and then click **View Code**. - -2. Add the following `using` directives to the top of the code file: - - [!code-csharp[csProgGuideNamedAndOptional#4](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs#4)] - -## To display text in a Word document - -1. In the `Program` class in *Program.cs*, add the following method to create a Word application and a Word document. The [Add](<xref:Microsoft.Office.Interop.Word.Documents.Add%2A>) method has four optional parameters. This example uses their default values. Therefore, no arguments are necessary in the calling statement. - - [!code-csharp[csProgGuideNamedAndOptional#6](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs#6)] - -2. Add the following code at the end of the method to define where to display text in the document, and what text to display: - - [!code-csharp[csProgGuideNamedAndOptional#7](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs#7)] - -## To run the application - -1. Add the following statement to Main: - - [!code-csharp[csProgGuideNamedAndOptional#8](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs#8)] - -2. Press <kbd>CTRL</kbd>+<kbd>F5</kbd> to run the project. A Word document appears that contains the specified text. - -## To change the text to a table - -1. Use the `ConvertToTable` method to enclose the text in a table. The method has sixteen optional parameters. IntelliSense encloses optional parameters in brackets, as shown in the following illustration. - - ![List of parameters for ConvertToTable method](./media/how-to-use-named-and-optional-arguments-in-office-programming/convert-table-parameters.png) - - Named and optional arguments enable you to specify values for only the parameters that you want to change. Add the following code to the end of method `DisplayInWord` to create a simple table. The argument specifies that the commas in the text string in `range` separate the cells of the table. - - [!code-csharp[csProgGuideNamedAndOptional#9](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs#9)] - - In earlier versions of C#, the call to `ConvertToTable` requires a reference argument for each parameter, as shown in the following code: - - [!code-csharp[csProgGuideNamedAndOptional#14](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs#14)] - -2. Press <kbd>CTRL</kbd>+<kbd>F5</kbd> to run the project. - -## To experiment with other parameters - -1. To change the table so that it has one column and three rows, replace the last line in `DisplayInWord` with the following statement and then type <kbd>CTRL</kbd>+<kbd>F5</kbd>. - - [!code-csharp[csProgGuideNamedAndOptional#10](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs#10)] - -2. To specify a predefined format for the table, replace the last line in `DisplayInWord` with the following statement and then type <kbd>CTRL</kbd>+<kbd>F5</kbd>. The format can be any of the [WdTableFormat](<xref:Microsoft.Office.Interop.Word.WdTableFormat>) constants. - - [!code-csharp[csProgGuideNamedAndOptional#11](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs#11)] - -## Example - -The following code includes the full example: - - [!code-csharp[csProgGuideNamedAndOptional#12](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/wordprogram.cs#12)] - -## See also - -- [Named and Optional Arguments](./named-and-optional-arguments.md) diff --git a/docs/csharp/programming-guide/classes-and-structs/implicitly-typed-local-variables.md b/docs/csharp/programming-guide/classes-and-structs/implicitly-typed-local-variables.md index 5765045591d26..960762ffeb804 100644 --- a/docs/csharp/programming-guide/classes-and-structs/implicitly-typed-local-variables.md +++ b/docs/csharp/programming-guide/classes-and-structs/implicitly-typed-local-variables.md @@ -33,7 +33,7 @@ The `var` keyword may be used in the following contexts: foreach (var item in list) {...} ``` -- In a [using](../../language-reference/keywords/using-statement.md) statement. +- In a [using](../../language-reference/statements/using.md) statement. ```csharp using (var file = new StreamReader("C:\\myfile.txt")) {...} @@ -96,4 +96,4 @@ The use of `var` helps simplify your code, but its use should be restricted to c - [LINQ in C#](../../linq/index.md) - [LINQ (Language-Integrated Query)](../../linq/index.md) - [Iteration statements](../../language-reference/statements/iteration-statements.md) -- [using Statement](../../language-reference/keywords/using-statement.md) +- [using statement](../../language-reference/statements/using.md) diff --git a/docs/csharp/programming-guide/classes-and-structs/instance-constructors.md b/docs/csharp/programming-guide/classes-and-structs/instance-constructors.md index 54d58488cc577..433010e0687c0 100644 --- a/docs/csharp/programming-guide/classes-and-structs/instance-constructors.md +++ b/docs/csharp/programming-guide/classes-and-structs/instance-constructors.md @@ -1,15 +1,14 @@ --- -title: "Instance constructors - C# programming guide" +title: "Instance constructors" description: Instance constructors in C# create and initialize any instance member variables when you use the new expression to create an instance of a type. -ms.date: 09/27/2021 +ms.date: 04/06/2023 helpviewer_keywords: - "constructors [C#], instance constructors" - "instance constructors [C#]" -ms.assetid: 24663779-c1e5-4af4-a942-ca554e4c542d --- # Instance constructors (C# programming guide) -You declare an instance constructor to specify the code that is executed when you create a new instance of a type with the [`new` expression](../../language-reference/operators/new-operator.md). To initialize a [static](../../language-reference/keywords/static.md) class or static variables in a non-static class, you can define a [static constructor](static-constructors.md). +You declare an instance constructor to specify the code that is executed when you create a new instance of a type with the [`new` expression](../../language-reference/operators/new-operator.md). To initialize a [static](../../language-reference/keywords/static.md) class or static variables in a nonstatic class, you can define a [static constructor](static-constructors.md). As the following example shows, you can declare several instance constructors in one type: @@ -34,6 +33,22 @@ A *structure* type always provides a parameterless constructor as follows: - In C# 9.0 and earlier, that is an implicit parameterless constructor that produces the [default value](../../language-reference/builtin-types/default-values.md) of a type. - In C# 10 and later, that is either an implicit parameterless constructor that produces the default value of a type or an explicitly declared parameterless constructor. For more information, see the [Struct initialization and default values](../../language-reference/builtin-types/struct.md#struct-initialization-and-default-values) section of the [Structure types](../../language-reference/builtin-types/struct.md) article. +## Primary constructors + +Beginning in C# 12, you can declare a *primary constructor* in classes and structs. You place any parameters in parentheses following the type name: + +:::code language="csharp" source="./snippets/instance-constructors/widgets/Program.cs" id="BasePrimaryConstructor"::: + +The parameters to a primary constructor are in scope in the entire body of the declaring type. They can initialize properties or fields. They can be used as variables in methods or local functions. They can be passed to a base constructor. + +A primary constructor indicates that these parameters are necessary for any instance of a type. Any explicitly written constructor must use the `this(...)` initializer syntax to invoke the primary constructor. That ensures that the primary constructor parameters are definitely assigned by all constructors. For any `class` type, including `record class` types, the implicit parameterless constructor isn't emitted when a primary constructor is present. For any `struct` type, including `record struct` types, the implicit parameterless constructor is always emitted, and always initializes all fields, including primary constructor parameters, to the 0-bit pattern. If you write an explicit parameterless constructor, it must invoke the primary constructor. In that case, you can specify a different value for the primary constructor parameters. The following code shows examples of primary constructors. + +:::code language="csharp" source="./snippets/instance-constructors/widgets/Program.cs" id="DerivedPrimaryConstructor"::: + +For non-`record` types, if a primary constructor is read or written in the body of the type, the compiler captures the parameter in a private field. This private field has a compiler-generated name that is different from the primary constructor parameter. That ensures the private field name doesn't conflict with other variable names. It's also harder to find using reflection. If a primary constructor parameter isn't used in the body of the type, no private field is captured. This prevents accidentally allocating two copies of a primary constructor parameter that is passed to a base constructor. + +For `record` types (`record class` and `record struct`), the compiler generates public properties for each of the positional parameters in the primary constructor. For `record class` types, if a primary constructor parameter uses the same name as a base primary constructor, that property is a public property of the base `record class` type. It is not duplicated in the derived `record class` type. These properties aren't generated for non-`record` types. + ## See also - [C# programming guide](../index.md) @@ -42,3 +57,4 @@ A *structure* type always provides a parameterless constructor as follows: - [Finalizers](finalizers.md) - [base](../../language-reference/keywords/base.md) - [this](../../language-reference/keywords/this.md) +- [Primary constructors feature spec](~/_csharplang/proposals/primary-constructors.md) diff --git a/docs/csharp/programming-guide/classes-and-structs/methods.md b/docs/csharp/programming-guide/classes-and-structs/methods.md index a2041597fba25..a5ca6e2319fee 100644 --- a/docs/csharp/programming-guide/classes-and-structs/methods.md +++ b/docs/csharp/programming-guide/classes-and-structs/methods.md @@ -129,7 +129,7 @@ The `Main` method is an example of an async method that has a return type of <xr An async method can't declare any [ref](../../language-reference/keywords/ref.md) or [out](../../language-reference/keywords/out-parameter-modifier.md) parameters, but it can call methods that have such parameters. -For more information about async methods, see [Asynchronous programming with async and await](../concepts/async/index.md) and [Async return types](../concepts/async/async-return-types.md). +For more information about async methods, see [Asynchronous programming with async and await](../../asynchronous-programming/index.md) and [Async return types](../../asynchronous-programming/async-return-types.md). ## Expression body definitions diff --git a/docs/csharp/programming-guide/classes-and-structs/named-and-optional-arguments.md b/docs/csharp/programming-guide/classes-and-structs/named-and-optional-arguments.md index ad97cb93470a7..3f2d89bcdc695 100644 --- a/docs/csharp/programming-guide/classes-and-structs/named-and-optional-arguments.md +++ b/docs/csharp/programming-guide/classes-and-structs/named-and-optional-arguments.md @@ -2,7 +2,6 @@ title: "Named and Optional Arguments - C# Programming Guide" description: Named arguments in C# specify arguments by name, not position. Optional arguments can be omitted. ms.date: 09/25/2020 -ms.custom: contperf-fy21q1 f1_keywords: - "namedParameter_CSharpKeyword" - "optionalParameter_CSharpKeyword" @@ -67,7 +66,7 @@ PrintOrderDetails(productName: "Red Mug", 31, "Gift Shop"); The following code implements the examples from this section along with some additional ones. -[!code-csharp[csProgGuideNamedAndOptional#1](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/program.cs#1)] +:::code language="csharp" source="./snippets/NamedAndOptional/program.cs" id="Snippet1"::: ## Optional arguments @@ -81,7 +80,7 @@ Each optional parameter has a default value as part of its definition. If no arg Optional parameters are defined at the end of the parameter list, after any required parameters. If the caller provides an argument for any one of a succession of optional parameters, it must provide arguments for all preceding optional parameters. Comma-separated gaps in the argument list aren't supported. For example, in the following code, instance method `ExampleMethod` is defined with one required and two optional parameters. -[!code-csharp[csProgGuideNamedAndOptional#15](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/optional.cs#15)] +:::code language="csharp" source="./snippets/NamedAndOptional/optional.cs" id="Snippet15"::: The following call to `ExampleMethod` causes a compiler error, because an argument is provided for the third parameter but not for the second. @@ -106,7 +105,7 @@ IntelliSense uses brackets to indicate optional parameters, as shown in the foll In the following example, the constructor for `ExampleClass` has one parameter, which is optional. Instance method `ExampleMethod` has one required parameter, `required`, and two optional parameters, `optionalstr` and `optionalint`. The code in `Main` shows the different ways in which the constructor and method can be invoked. -[!code-csharp[csProgGuideNamedAndOptional#2](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/optional.cs#2)] +:::code language="csharp" source="./snippets/NamedAndOptional/optional.cs" id="Snippet2"::: The preceding code shows a number of examples where optional parameters aren't applied correctly. The first illustrates that an argument must be supplied for the first parameter, which is required. @@ -120,9 +119,9 @@ For example, the <xref:Microsoft.Office.Interop.Excel.Range.AutoFormat%2A> metho However, you can greatly simplify the call to `AutoFormat` by using named and optional arguments. Named and optional arguments enable you to omit the argument for an optional parameter if you don't want to change the parameter's default value. In the following call, a value is specified for only one of the seven parameters. -[!code-csharp[csProgGuideNamedAndOptional#13](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/namedandoptcom.cs#13)] +:::code language="csharp" source="./snippets/NamedAndOptional/namedandoptcom.cs" id="Snippet13"::: -For more information and examples, see [How to use named and optional arguments in Office programming](./how-to-use-named-and-optional-arguments-in-office-programming.md) and [How to access Office interop objects by using C# features](../interop/how-to-access-office-onterop-objects.md). +For more information and examples, see [How to use named and optional arguments in Office programming](../../advanced-topics/interop/how-to-use-named-and-optional-arguments-in-office-programming.md) and [How to access Office interop objects by using C# features](../../advanced-topics/interop/how-to-access-office-interop-objects.md). ## Overload resolution diff --git a/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md b/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md index 4c8e1eacc507e..87bc515a1dc59 100644 --- a/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md +++ b/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md @@ -130,7 +130,7 @@ partial void OnNameChanged() ## C# Language Specification -For more information, see [Partial types](~/_csharpstandard/standard/classes.md#1427-partial-declarations) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +For more information, see [Partial types](~/_csharpstandard/standard/classes.md#1527-partial-declarations) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. ## See also diff --git a/docs/csharp/programming-guide/classes-and-structs/properties.md b/docs/csharp/programming-guide/classes-and-structs/properties.md index dc1573cc8c987..a07b3d45a2c6c 100644 --- a/docs/csharp/programming-guide/classes-and-structs/properties.md +++ b/docs/csharp/programming-guide/classes-and-structs/properties.md @@ -74,7 +74,7 @@ To create a `SaleItem`, you must set both the `Name` and `Price` properties usin ## C# Language Specification -For more information, see [Properties](~/_csharpstandard/standard/classes.md#147-properties) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +For more information, see [Properties](~/_csharpstandard/standard/classes.md#157-properties) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. ## See also diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/app.config b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/app.config similarity index 100% rename from samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/app.config rename to docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/app.config diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/namedandoptcom.cs b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/namedandoptcom.cs similarity index 87% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/namedandoptcom.cs rename to docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/namedandoptcom.cs index 7a9fcc0244ce1..e98b394dd16e1 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/namedandoptcom.cs +++ b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/namedandoptcom.cs @@ -1,8 +1,4 @@ // -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace NamedAndOptionalSnippets { diff --git a/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/namedandoptionalsnippets.csproj b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/namedandoptionalsnippets.csproj new file mode 100644 index 0000000000000..ae9dcbfe6c5a7 --- /dev/null +++ b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/namedandoptionalsnippets.csproj @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>10.0.20319</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{595F32EC-B330-4DA1-9D79-9E5E1EA6DDAB}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NamedAndOptionalSnippets</RootNamespace> + <AssemblyName>NamedAndOptionalSnippets</AssemblyName> + <TargetFrameworkVersion>v4.8</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup> + <StartupObject>OptionalNamespace.OptionalExample</StartupObject> + </PropertyGroup> + <ItemGroup> + <Compile Include="NamedAndOptCOM.cs" /> + <Compile Include="Optional.cs" /> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <COMReference Include="Microsoft.Office.Core"> + <Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid> + <VersionMajor>2</VersionMajor> + <VersionMinor>8</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>primary</WrapperTool> + <Isolated>False</Isolated> + <EmbedInteropTypes>True</EmbedInteropTypes> + </COMReference> + <COMReference Include="Microsoft.Office.Interop.Excel"> + <Guid>{00020813-0000-0000-C000-000000000046}</Guid> + <VersionMajor>1</VersionMajor> + <VersionMinor>9</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>primary</WrapperTool> + <Isolated>False</Isolated> + <EmbedInteropTypes>True</EmbedInteropTypes> + </COMReference> + <COMReference Include="Microsoft.Office.Interop.Word"> + <Guid>{00020905-0000-0000-C000-000000000046}</Guid> + <VersionMajor>8</VersionMajor> + <VersionMinor>7</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>primary</WrapperTool> + <Isolated>False</Isolated> + <EmbedInteropTypes>True</EmbedInteropTypes> + </COMReference> + <COMReference Include="VBIDE"> + <Guid>{0002E157-0000-0000-C000-000000000046}</Guid> + <VersionMajor>5</VersionMajor> + <VersionMinor>3</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>primary</WrapperTool> + <Isolated>False</Isolated> + <EmbedInteropTypes>True</EmbedInteropTypes> + </COMReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/optional.cs b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/optional.cs similarity index 96% rename from samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/optional.cs rename to docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/optional.cs index 4d71df39810ec..c8ea700f60530 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/optional.cs +++ b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/optional.cs @@ -1,8 +1,5 @@ // using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; //<Snippet2> namespace OptionalNamespace @@ -59,7 +56,7 @@ public ExampleClass(string name = "Default name") //<Snippet15> public void ExampleMethod(int required, string optionalstr = "default string", int optionalint = 10) - //</Snippet15> + //</Snippet15> { Console.WriteLine( $"{_name}: {required}, {optionalstr}, and {optionalint}."); diff --git a/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/program.cs b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/program.cs new file mode 100644 index 0000000000000..2de0cf042344a --- /dev/null +++ b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/program.cs @@ -0,0 +1,49 @@ +// Snippets 5000 Note: +// The container used for building our samples doesn't include the Office assemblies. +// This sample will generate a few errors in the CI build. Those are expected, +// so the build passes. +// +// If you update this sample, make sure to build it locally. +// Then, make sure no new errors are added. + +using System; + +namespace NamedAndOptionalSnippets +{ + //<Snippet1> + class NamedExample + { + static void Main(string[] args) + { + // The method can be called in the normal way, by using positional arguments. + PrintOrderDetails("Gift Shop", 31, "Red Mug"); + + // Named arguments can be supplied for the parameters in any order. + PrintOrderDetails(orderNum: 31, productName: "Red Mug", sellerName: "Gift Shop"); + PrintOrderDetails(productName: "Red Mug", sellerName: "Gift Shop", orderNum: 31); + + // Named arguments mixed with positional arguments are valid + // as long as they are used in their correct position. + PrintOrderDetails("Gift Shop", 31, productName: "Red Mug"); + PrintOrderDetails(sellerName: "Gift Shop", 31, productName: "Red Mug"); + PrintOrderDetails("Gift Shop", orderNum: 31, "Red Mug"); + + // However, mixed arguments are invalid if used out-of-order. + // The following statements will cause a compiler error. + // PrintOrderDetails(productName: "Red Mug", 31, "Gift Shop"); + // PrintOrderDetails(31, sellerName: "Gift Shop", "Red Mug"); + // PrintOrderDetails(31, "Red Mug", sellerName: "Gift Shop"); + } + + static void PrintOrderDetails(string sellerName, int orderNum, string productName) + { + if (string.IsNullOrWhiteSpace(sellerName)) + { + throw new ArgumentException(message: "Seller name cannot be null or empty.", paramName: nameof(sellerName)); + } + + Console.WriteLine($"Seller: {sellerName}, Order #: {orderNum}, Product: {productName}"); + } + } +//</Snippet1> +} diff --git a/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/properties/assemblyinfo.cs b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/properties/assemblyinfo.cs new file mode 100644 index 0000000000000..08d25b77fa98c --- /dev/null +++ b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/properties/assemblyinfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NamedAndOptionalSnippets")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft Corp.")] +[assembly: AssemblyProduct("NamedAndOptionalSnippets")] +[assembly: AssemblyCopyright("Copyright © Microsoft Corp. 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6803107a-bd5f-4a70-834b-0988088f89bb")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/snippets.5000.json b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/snippets.5000.json new file mode 100644 index 0000000000000..54fb11afcd45b --- /dev/null +++ b/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/snippets.5000.json @@ -0,0 +1,23 @@ +{ + "host": "visualstudio", + "expectederrors": [ + { + "file": "docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/Program.cs", + "line": 6, + "column": 25, + "error": "CS0234" + }, + { + "file": "docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/namedandoptcom.cs", + "line": 15, + "column": 42, + "error": "CS0234" + }, + { + "file": "docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/namedandoptcom.cs", + "line": 20, + "column": 17, + "error": "CS0234" + } + ] +} diff --git a/docs/csharp/programming-guide/classes-and-structs/snippets/instance-constructors/widgets/Program.cs b/docs/csharp/programming-guide/classes-and-structs/snippets/instance-constructors/widgets/Program.cs new file mode 100644 index 0000000000000..8e1778c479fab --- /dev/null +++ b/docs/csharp/programming-guide/classes-and-structs/snippets/instance-constructors/widgets/Program.cs @@ -0,0 +1,25 @@ +// See https://aka.ms/new-console-template for more information +Console.WriteLine("Hello, World!"); + + +// <BasePrimaryConstructor> +public class NamedItem(string name) +{ + public string Name => name; +} +// </BasePrimaryConstructor> + +// <DerivedPrimaryConstructor> +// name isn't captured in Widget. +// width, height, and depth are captured as private fields +public class Widget(string name, int width, int height, int depth) : NamedItem(name) +{ + public Widget() : this("N/A", 1,1,1) {} // unnamed unit cube + + public int WidthInCM => width; + public int HeightInCM => height; + public int DepthInCM => depth; + + public int Volume => width * height * depth; +} +// </DerivedPrimaryConstructor> diff --git a/docs/csharp/programming-guide/classes-and-structs/snippets/instance-constructors/widgets/widgets.csproj b/docs/csharp/programming-guide/classes-and-structs/snippets/instance-constructors/widgets/widgets.csproj new file mode 100644 index 0000000000000..e00bf30e3d7b0 --- /dev/null +++ b/docs/csharp/programming-guide/classes-and-structs/snippets/instance-constructors/widgets/widgets.csproj @@ -0,0 +1,11 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + <LangVersion>preview</LangVersion> + </PropertyGroup> + +</Project> diff --git a/docs/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members.md b/docs/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members.md index 57272780aee13..8d540a8897680 100644 --- a/docs/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members.md +++ b/docs/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members.md @@ -49,7 +49,7 @@ Console.WriteLine(Math.Round(Math.Abs(dub))); Creating a static class is therefore basically the same as creating a class that contains only static members and a private constructor. A private constructor prevents the class from being instantiated. The advantage of using a static class is that the compiler can check to make sure that no instance members are accidentally added. The compiler will guarantee that instances of this class cannot be created. - Static classes are sealed and therefore cannot be inherited. They cannot inherit from any class except <xref:System.Object>. Static classes cannot contain an instance constructor. However, they can contain a static constructor. Non-static classes should also define a static constructor if the class contains static members that require non-trivial initialization. For more information, see [Static Constructors](./static-constructors.md). + Static classes are sealed and therefore cannot be inherited. They cannot inherit from any class or interface except <xref:System.Object>. Static classes cannot contain an instance constructor. However, they can contain a static constructor. Non-static classes should also define a static constructor if the class contains static members that require non-trivial initialization. For more information, see [Static Constructors](./static-constructors.md). ## Example @@ -83,7 +83,7 @@ Console.WriteLine(Math.Round(Math.Abs(dub))); ## C# Language Specification -For more information, see [Static classes](~/_csharpstandard/standard/classes.md#14224-static-classes), [Static and instance members](~/_csharpstandard/standard/classes.md#1438-static-and-instance-members) and [Static constructors](~/_csharpstandard/standard/classes.md#1412-static-constructors) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +For more information, see [Static classes](~/_csharpstandard/standard/classes.md#15224-static-classes), [Static and instance members](~/_csharpstandard/standard/classes.md#1538-static-and-instance-members) and [Static constructors](~/_csharpstandard/standard/classes.md#1512-static-constructors) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. ## See also diff --git a/docs/csharp/programming-guide/classes-and-structs/static-constructors.md b/docs/csharp/programming-guide/classes-and-structs/static-constructors.md index c4ee090d7afdb..c9a5b9db5b52c 100644 --- a/docs/csharp/programming-guide/classes-and-structs/static-constructors.md +++ b/docs/csharp/programming-guide/classes-and-structs/static-constructors.md @@ -1,17 +1,25 @@ --- title: "Static Constructors - C# Programming Guide" description: A static constructor in C# initializes static data or performs an action done only once. It runs before the first instance is created or static members are referenced. -ms.date: 12/21/2021 +ms.date: 01/30/2023 helpviewer_keywords: - "static constructors [C#]" - "constructors [C#], static" --- # Static Constructors (C# Programming Guide) -A static constructor is used to initialize any [static](../../language-reference/keywords/static.md) data, or to perform a particular action that needs to be performed only once. It is called automatically before the first instance is created or any static members are referenced. +A static constructor is used to initialize any [static](../../language-reference/keywords/static.md) data, or to perform a particular action that needs to be performed only once. It is called automatically before the first instance is created or any static members are referenced. A static constructor will be called at most once. [!code-csharp[SimpleClass#1](snippets/static-constructors/Program.cs#1)] +There are several actions that are part of static initialization. Those actions take place in the following order: + +1. *Static fields are set to 0*. This is typically done by the runtime. +1. *Static field initializers run*. The static field initializers in the most derived type run. +1. *Base type static field initializers run*. Static field initializers starting with the direct base through each base type to <xref:System.Object?displayProperty=fullName>. +1. *Base static constructors run*. Any static constructors, starting with <xref:System.Object.%23ctor%2A?displayProperty=nameWithType> through each base class to the direct base class. +1. *The static constructor runs*. The static constructor for the type runs. + ## Remarks Static constructors have the following properties: @@ -21,7 +29,7 @@ Static constructors have the following properties: - Static constructors cannot be inherited or overloaded. - A static constructor cannot be called directly and is only meant to be called by the common language runtime (CLR). It is invoked automatically. - The user has no control on when the static constructor is executed in the program. -- A static constructor is called automatically. It initializes the [class](../../language-reference/keywords/class.md) before the first instance is created or any static members declared in that class (not its base classes) are referenced. A static constructor runs before an instance constructor. A type's static constructor is called when a static method assigned to an event or a delegate is invoked and not when it is assigned. If static field variable initializers are present in the class of the static constructor, they're executed in the textual order in which they appear in the class declaration. The initializers run immediately prior to the execution of the static constructor. +- A static constructor is called automatically. It initializes the [class](../../language-reference/keywords/class.md) before the first instance is created or any static members declared in that class (not its base classes) are referenced. A static constructor runs before an instance constructor. If static field variable initializers are present in the class of the static constructor, they're executed in the textual order in which they appear in the class declaration. The initializers run immediately prior to the execution of the static constructor. - If you don't provide a static constructor to initialize static fields, all static fields are initialized to their default value as listed in [Default values of C# types](../../language-reference/builtin-types/default-values.md). - If a static constructor throws an exception, the runtime doesn't invoke it a second time, and the type will remain uninitialized for the lifetime of the application domain. Most commonly, a <xref:System.TypeInitializationException> exception is thrown when a static constructor is unable to instantiate a type or for an unhandled exception occurring within a static constructor. For static constructors that aren't explicitly defined in source code, troubleshooting may require inspection of the intermediate language (IL) code. - The presence of a static constructor prevents the addition of the <xref:System.Reflection.TypeAttributes.BeforeFieldInit> type attribute. This limits runtime optimization. @@ -45,7 +53,7 @@ In this example, class `Bus` has a static constructor. When the first instance o ## C# language specification -For more information, see the [Static constructors](~/_csharpstandard/standard/classes.md#1412-static-constructors) section of the [C# language specification](~/_csharpstandard/standard/README.md). +For more information, see the [Static constructors](~/_csharpstandard/standard/classes.md#1512-static-constructors) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/programming-guide/classes-and-structs/using-constructors.md b/docs/csharp/programming-guide/classes-and-structs/using-constructors.md index 706a834ae3be1..e3559afff648e 100644 --- a/docs/csharp/programming-guide/classes-and-structs/using-constructors.md +++ b/docs/csharp/programming-guide/classes-and-structs/using-constructors.md @@ -88,7 +88,7 @@ Console.WriteLine("{0}, {1}", a, b); ## C# Language Specification -For more information, see [Instance constructors](~/_csharpstandard/standard/classes.md#1411-instance-constructors) and [Static constructors](~/_csharpstandard/standard/classes.md#1412-static-constructors) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +For more information, see [Instance constructors](~/_csharpstandard/standard/classes.md#1511-instance-constructors) and [Static constructors](~/_csharpstandard/standard/classes.md#1512-static-constructors) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. ## See also diff --git a/docs/csharp/programming-guide/concepts/async/index.md b/docs/csharp/programming-guide/concepts/async/index.md deleted file mode 100644 index b3d6d932e6458..0000000000000 --- a/docs/csharp/programming-guide/concepts/async/index.md +++ /dev/null @@ -1,262 +0,0 @@ ---- -title: Asynchronous programming in C# -description: An overview of the C# language support for asynchronous programming using async, await, Task, and Task<T> -ms.date: 05/17/2022 -recommendations: false ---- -# Asynchronous programming with async and await - -The [Task asynchronous programming model (TAP)](task-asynchronous-programming-model.md) provides an abstraction over asynchronous code. You write code as a sequence of statements, just like always. You can read that code as though each statement completes before the next begins. The compiler performs many transformations because some of those statements may start work and return a <xref:System.Threading.Tasks.Task> that represents the ongoing work. - -That's the goal of this syntax: enable code that reads like a sequence of statements, but executes in a much more complicated order based on external resource allocation and when tasks are complete. It's analogous to how people give instructions for processes that include asynchronous tasks. Throughout this article, you'll use an example of instructions for making breakfast to see how the `async` and `await` keywords make it easier to reason about code that includes a series of asynchronous instructions. You'd write the instructions something like the following list to explain how to make a breakfast: - -1. Pour a cup of coffee. -1. Heat a pan, then fry two eggs. -1. Fry three slices of bacon. -1. Toast two pieces of bread. -1. Add butter and jam to the toast. -1. Pour a glass of orange juice. - -If you have experience with cooking, you'd execute those instructions **asynchronously**. You'd start warming the pan for eggs, then start the bacon. You'd put the bread in the toaster, then start the eggs. At each step of the process, you'd start a task, then turn your attention to tasks that are ready for your attention. - -Cooking breakfast is a good example of asynchronous work that isn't parallel. One person (or thread) can handle all these tasks. Continuing the breakfast analogy, one person can make breakfast asynchronously by starting the next task before the first task completes. The cooking progresses whether or not someone is watching it. As soon as you start warming the pan for the eggs, you can begin frying the bacon. Once the bacon starts, you can put the bread into the toaster. - -For a parallel algorithm, you'd need multiple cooks (or threads). One would make the eggs, one the bacon, and so on. Each one would be focused on just that one task. Each cook (or thread) would be blocked synchronously waiting for the bacon to be ready to flip, or the toast to pop. - -Now, consider those same instructions written as C# statements: - -:::code language="csharp" source="snippets/index/AsyncBreakfast-starter/Program.cs" highlight="15-34"::: - -:::image type="content" source="media/synchronous-breakfast.png" alt-text="synchronous breakfast"::: - -The synchronously prepared breakfast took roughly 30 minutes because the total is the sum of each task. - -Computers don't interpret those instructions the same way people do. The computer will block on each statement until the work is complete before moving on to the next statement. That creates an unsatisfying breakfast. The later tasks wouldn't be started until the earlier tasks had been completed. It would take much longer to create the breakfast, and some items would have gotten cold before being served. - -If you want the computer to execute the above instructions asynchronously, you must write asynchronous code. - -These concerns are important for the programs you write today. When you write client programs, you want the UI to be responsive to user input. Your application shouldn't make a phone appear frozen while it's downloading data from the web. When you write server programs, you don't want threads blocked. Those threads could be serving other requests. Using synchronous code when asynchronous alternatives exist hurts your ability to scale out less expensively. You pay for those blocked threads. - -Successful modern applications require asynchronous code. Without language support, writing asynchronous code required callbacks, completion events, or other means that obscured the original intent of the code. The advantage of the synchronous code is that its step-by-step actions make it easy to scan and understand. Traditional asynchronous models forced you to focus on the asynchronous nature of the code, not on the fundamental actions of the code. - -## Don't block, await instead - -The preceding code demonstrates a bad practice: constructing synchronous code to perform asynchronous operations. As written, this code blocks the thread executing it from doing any other work. It won't be interrupted while any of the tasks are in progress. It would be as though you stared at the toaster after putting the bread in. You'd ignore anyone talking to you until the toast popped. - -Let's start by updating this code so that the thread doesn't block while tasks are running. The `await` keyword provides a non-blocking way to start a task, then continue execution when that task completes. A simple asynchronous version of the make a breakfast code would look like the following snippet: - -:::code language="csharp" source="snippets/index/AsyncBreakfast-V2/Program.cs" ID="SnippetMain"::: - -> [!IMPORTANT] -> The total elapsed time is roughly the same as the initial synchronous version. The code has yet to take advantage of some of the key features of asynchronous programming. - -> [!TIP] -> The method bodies of the `FryEggsAsync`, `FryBaconAsync`, and `ToastBreadAsync` have all been updated to return `Task<Egg>`, `Task<Bacon>`, and `Task<Toast>` respectively. The methods are renamed from their original version to include the "Async" suffix. Their implementations are shown as part of the [final version](#final-version) later in this article. - -> [!NOTE] -> The `Main` method returns `Task`, despite not having a `return` expression—this is by design. For more information, see [Evaluation of a void-returning async function](/dotnet/csharp/language-reference/language-specification/classes#14153-evaluation-of-a-void-returning-async-function). - -This code doesn't block while the eggs or the bacon are cooking. This code won't start any other tasks though. You'd still put the toast in the toaster and stare at it until it pops. But at least, you'd respond to anyone that wanted your attention. In a restaurant where multiple orders are placed, the cook could start another breakfast while the first is cooking. - -Now, the thread working on the breakfast isn't blocked while awaiting any started task that hasn't yet finished. For some applications, this change is all that's needed. A GUI application still responds to the user with just this change. However, for this scenario, you want more. You don't want each of the component tasks to be executed sequentially. It's better to start each of the component tasks before awaiting the previous task's completion. - -## Start tasks concurrently - -In many scenarios, you want to start several independent tasks immediately. Then, as each task finishes, you can continue other work that's ready. In the breakfast analogy, that's how you get breakfast done more quickly. You also get everything done close to the same time. You'll get a hot breakfast. - -The <xref:System.Threading.Tasks.Task?displayProperty=nameWithType> and related types are classes you can use to reason about tasks that are in progress. That enables you to write code that more closely resembles the way you'd create breakfast. You'd start cooking the eggs, bacon, and toast at the same time. As each requires action, you'd turn your attention to that task, take care of the next action, then wait for something else that requires your attention. - -You start a task and hold on to the <xref:System.Threading.Tasks.Task> object that represents the work. You'll `await` each task before working with its result. - -Let's make these changes to the breakfast code. The first step is to store the tasks for operations when they start, rather than awaiting them: - -```csharp -Coffee cup = PourCoffee(); -Console.WriteLine("Coffee is ready"); - -Task<Egg> eggsTask = FryEggsAsync(2); -Egg eggs = await eggsTask; -Console.WriteLine("Eggs are ready"); - -Task<Bacon> baconTask = FryBaconAsync(3); -Bacon bacon = await baconTask; -Console.WriteLine("Bacon is ready"); - -Task<Toast> toastTask = ToastBreadAsync(2); -Toast toast = await toastTask; -ApplyButter(toast); -ApplyJam(toast); -Console.WriteLine("Toast is ready"); - -Juice oj = PourOJ(); -Console.WriteLine("Oj is ready"); -Console.WriteLine("Breakfast is ready!"); -``` - -Next, you can move the `await` statements for the bacon and eggs to the end of the method, before serving breakfast: - -```csharp -Coffee cup = PourCoffee(); -Console.WriteLine("Coffee is ready"); - -Task<Egg> eggsTask = FryEggsAsync(2); -Task<Bacon> baconTask = FryBaconAsync(3); -Task<Toast> toastTask = ToastBreadAsync(2); - -Toast toast = await toastTask; -ApplyButter(toast); -ApplyJam(toast); -Console.WriteLine("Toast is ready"); -Juice oj = PourOJ(); -Console.WriteLine("Oj is ready"); - -Egg eggs = await eggsTask; -Console.WriteLine("Eggs are ready"); -Bacon bacon = await baconTask; -Console.WriteLine("Bacon is ready"); - -Console.WriteLine("Breakfast is ready!"); -``` - -:::image type="content" source="media/asynchronous-breakfast.png" alt-text="asynchronous breakfast"::: - -The asynchronously prepared breakfast took roughly 20 minutes, this time savings is because some tasks ran concurrently. - -The preceding code works better. You start all the asynchronous tasks at once. You await each task only when you need the results. The preceding code may be similar to code in a web application that makes requests to different microservices, then combines the results into a single page. You'll make all the requests immediately, then `await` all those tasks and compose the web page. - -## Composition with tasks - - You have everything ready for breakfast at the same time except the toast. Making the toast is the composition of an asynchronous operation (toasting the bread), and synchronous operations (adding the butter and the jam). Updating this code illustrates an important concept: - -> [!IMPORTANT] -> The composition of an asynchronous operation followed by synchronous work is an asynchronous operation. Stated another way, if any portion of an operation is asynchronous, the entire operation is asynchronous. - -The preceding code showed you that you can use <xref:System.Threading.Tasks.Task> or <xref:System.Threading.Tasks.Task%601> objects to hold running tasks. You `await` each task before using its result. The next step is to create methods that represent the combination of other work. Before serving breakfast, you want to await the task that represents toasting the bread before adding butter and jam. You can represent that work with the following code: - -:::code language="csharp" source="snippets/index/AsyncBreakfast-V3/Program.cs" ID="SnippetComposeToastTask"::: - -The preceding method has the `async` modifier in its signature. That signals to the compiler that this method contains an `await` statement; it contains asynchronous operations. This method represents the task that toasts the bread, then adds butter and jam. This method returns a <xref:System.Threading.Tasks.Task%601> that represents the composition of those three operations. The main block of code now becomes: - -:::code language="csharp" source="snippets/index/AsyncBreakfast-V3/Program.cs" ID="SnippetMain"::: - -The previous change illustrated an important technique for working with asynchronous code. You compose tasks by separating the operations into a new method that returns a task. You can choose when to await that task. You can start other tasks concurrently. - -## Asynchronous exceptions - -Up to this point, you've implicitly assumed that all these tasks complete successfully. Asynchronous methods throw exceptions, just like their synchronous counterparts. Asynchronous support for exceptions and error handling strives for the same goals as asynchronous support in general: You should write code that reads like a series of synchronous statements. Tasks throw exceptions when they can't complete successfully. The client code can catch those exceptions when a started task is `awaited`. For example, let's assume that the toaster catches fire while making the toast. You can simulate that by modifying the `ToastBreadAsync` method to match the following code: - -```csharp -private static async Task<Toast> ToastBreadAsync(int slices) -{ - for (int slice = 0; slice < slices; slice++) - { - Console.WriteLine("Putting a slice of bread in the toaster"); - } - Console.WriteLine("Start toasting..."); - await Task.Delay(2000); - Console.WriteLine("Fire! Toast is ruined!"); - throw new InvalidOperationException("The toaster is on fire"); - await Task.Delay(1000); - Console.WriteLine("Remove toast from toaster"); - - return new Toast(); -} -``` - -> [!NOTE] -> You'll get a warning when you compile the preceding code regarding unreachable code. That's intentional, because once the toaster catches fire, operations won't proceed normally. - -Run the application after making these changes, and you'll output similar to the following text: - -```console -Pouring coffee -Coffee is ready -Warming the egg pan... -putting 3 slices of bacon in the pan -Cooking first side of bacon... -Putting a slice of bread in the toaster -Putting a slice of bread in the toaster -Start toasting... -Fire! Toast is ruined! -Flipping a slice of bacon -Flipping a slice of bacon -Flipping a slice of bacon -Cooking the second side of bacon... -Cracking 2 eggs -Cooking the eggs ... -Put bacon on plate -Put eggs on plate -Eggs are ready -Bacon is ready -Unhandled exception. System.InvalidOperationException: The toaster is on fire - at AsyncBreakfast.Program.ToastBreadAsync(Int32 slices) in Program.cs:line 65 - at AsyncBreakfast.Program.MakeToastWithButterAndJamAsync(Int32 number) in Program.cs:line 36 - at AsyncBreakfast.Program.Main(String[] args) in Program.cs:line 24 - at AsyncBreakfast.Program.<Main>(String[] args) -``` - -You'll notice quite a few tasks are completed between when the toaster catches fire and the exception is observed. When a task that runs asynchronously throws an exception, that Task is ***faulted***. The Task object holds the exception thrown in the <xref:System.Threading.Tasks.Task.Exception?displayProperty=nameWithType> property. Faulted tasks throw an exception when they're awaited. - -There are two important mechanisms to understand: how an exception is stored in a faulted task, and how an exception is unpackaged and rethrown when code awaits a faulted task. - -When code running asynchronously throws an exception, that exception is stored in the `Task`. The <xref:System.Threading.Tasks.Task.Exception?displayProperty=nameWithType> property is a <xref:System.AggregateException?displayProperty=nameWithType> because more than one exception may be thrown during asynchronous work. Any exception thrown is added to the <xref:System.AggregateException.InnerExceptions?displayProperty=nameWithType> collection. If that `Exception` property is null, a new `AggregateException` is created and the thrown exception is the first item in the collection. - -The most common scenario for a faulted task is that the `Exception` property contains exactly one exception. When code `awaits` a faulted task, the first exception in the <xref:System.AggregateException.InnerExceptions?displayProperty=nameWithType> collection is rethrown. That's why the output from this example shows an `InvalidOperationException` instead of an `AggregateException`. Extracting the first inner exception makes working with asynchronous methods as similar as possible to working with their synchronous counterparts. You can examine the `Exception` property in your code when your scenario may generate multiple exceptions. - -Before going on, comment out these two lines in your `ToastBreadAsync` method. You don't want to start another fire: - -```csharp -Console.WriteLine("Fire! Toast is ruined!"); -throw new InvalidOperationException("The toaster is on fire"); -``` - -## Await tasks efficiently - -The series of `await` statements at the end of the preceding code can be improved by using methods of the `Task` class. One of those APIs is <xref:System.Threading.Tasks.Task.WhenAll%2A>, which returns a <xref:System.Threading.Tasks.Task> that completes when all the tasks in its argument list have completed, as shown in the following code: - -```csharp -await Task.WhenAll(eggsTask, baconTask, toastTask); -Console.WriteLine("Eggs are ready"); -Console.WriteLine("Bacon is ready"); -Console.WriteLine("Toast is ready"); -Console.WriteLine("Breakfast is ready!"); -``` - -Another option is to use <xref:System.Threading.Tasks.Task.WhenAny%2A>, which returns a `Task<Task>` that completes when any of its arguments complete. You can await the returned task, knowing that it has already finished. The following code shows how you could use <xref:System.Threading.Tasks.Task.WhenAny%2A> to await the first task to finish and then process its result. After processing the result from the completed task, you remove that completed task from the list of tasks passed to `WhenAny`. - -```csharp -var breakfastTasks = new List<Task> { eggsTask, baconTask, toastTask }; -while (breakfastTasks.Count > 0) -{ - Task finishedTask = await Task.WhenAny(breakfastTasks); - if (finishedTask == eggsTask) - { - Console.WriteLine("Eggs are ready"); - } - else if (finishedTask == baconTask) - { - Console.WriteLine("Bacon is ready"); - } - else if (finishedTask == toastTask) - { - Console.WriteLine("Toast is ready"); - } - await finishedTask; - breakfastTasks.Remove(finishedTask); -} -``` - -After all those changes, the final version of the code looks like this: -<a id="final-version"></a> -:::code language="csharp" source="snippets/index/AsyncBreakfast-final/Program.cs" highlight="16-47"::: - -:::image type="content" source="media/whenany-async-breakfast.png" alt-text="when any async breakfast"::: - -The final version of the asynchronously prepared breakfast took roughly 15 minutes because some tasks ran concurrently, and the code monitored multiple tasks at once and only took action when it was needed. - -This final code is asynchronous. It more accurately reflects how a person would cook a breakfast. Compare the preceding code with the first code sample in this article. The core actions are still clear from reading the code. You can read this code the same way you'd read those instructions for making a breakfast at the beginning of this article. The language features for `async` and `await` provide the translation every person makes to follow those written instructions: start tasks as you can and don't block waiting for tasks to complete. - -## Next steps - -> [!div class="nextstepaction"] -> [Explore real world scenarios for asynchronous programs](../../../async.md) diff --git a/docs/csharp/programming-guide/concepts/async/snippets/access-web/Program.cs b/docs/csharp/programming-guide/concepts/async/snippets/access-web/Program.cs deleted file mode 100644 index a67722a0e81f1..0000000000000 --- a/docs/csharp/programming-guide/concepts/async/snippets/access-web/Program.cs +++ /dev/null @@ -1,31 +0,0 @@ -class Program -{ - static async Task Main() => - Console.WriteLine($"docs.microsoft.com/dotnet content length = {await AccessWeb.Example.GetUrlContentLengthAsync()}"); -} - -class AccessWeb -{ - public static AccessWeb Example = new AccessWeb(); - - // <ControlFlow> - public async Task<int> GetUrlContentLengthAsync() - { - var client = new HttpClient(); - - Task<string> getStringTask = - client.GetStringAsync("https://docs.microsoft.com/dotnet"); - - DoIndependentWork(); - - string contents = await getStringTask; - - return contents.Length; - } - - void DoIndependentWork() - { - Console.WriteLine("Working..."); - } - // </ControlFlow> -} diff --git a/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-task-after-period-of-time/Program.cs b/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-task-after-period-of-time/Program.cs deleted file mode 100644 index d3781b3ab284b..0000000000000 --- a/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-task-after-period-of-time/Program.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System.Diagnostics; - -class Program -{ - static readonly CancellationTokenSource s_cts = new CancellationTokenSource(); - - static readonly HttpClient s_client = new HttpClient - { - MaxResponseContentBufferSize = 1_000_000 - }; - - static readonly IEnumerable<string> s_urlList = new string[] - { - "https://docs.microsoft.com", - "https://docs.microsoft.com/aspnet/core", - "https://docs.microsoft.com/azure", - "https://docs.microsoft.com/azure/devops", - "https://docs.microsoft.com/dotnet", - "https://docs.microsoft.com/dynamics365", - "https://docs.microsoft.com/education", - "https://docs.microsoft.com/enterprise-mobility-security", - "https://docs.microsoft.com/gaming", - "https://docs.microsoft.com/graph", - "https://docs.microsoft.com/microsoft-365", - "https://docs.microsoft.com/office", - "https://docs.microsoft.com/powershell", - "https://docs.microsoft.com/sql", - "https://docs.microsoft.com/surface", - "https://docs.microsoft.com/system-center", - "https://docs.microsoft.com/visualstudio", - "https://docs.microsoft.com/windows", - "https://docs.microsoft.com/xamarin" - }; - - static async Task Main() - { - Console.WriteLine("Application started."); - - try - { - s_cts.CancelAfter(3500); - - await SumPageSizesAsync(); - } - catch (OperationCanceledException) - { - Console.WriteLine("\nTasks cancelled: timed out.\n"); - } - finally - { - s_cts.Dispose(); - } - - Console.WriteLine("Application ending."); - } - - static async Task SumPageSizesAsync() - { - var stopwatch = Stopwatch.StartNew(); - - int total = 0; - foreach (string url in s_urlList) - { - int contentLength = await ProcessUrlAsync(url, s_client, s_cts.Token); - total += contentLength; - } - - stopwatch.Stop(); - - Console.WriteLine($"\nTotal bytes returned: {total:#,#}"); - Console.WriteLine($"Elapsed time: {stopwatch.Elapsed}\n"); - } - - static async Task<int> ProcessUrlAsync(string url, HttpClient client, CancellationToken token) - { - HttpResponseMessage response = await client.GetAsync(url, token); - byte[] content = await response.Content.ReadAsByteArrayAsync(token); - Console.WriteLine($"{url,-60} {content.Length,10:#,#}"); - - return content.Length; - } -} diff --git a/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-tasks/Program.cs b/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-tasks/Program.cs deleted file mode 100644 index b80d27ee61fcb..0000000000000 --- a/docs/csharp/programming-guide/concepts/async/snippets/cancel-tasks/cancel-tasks/Program.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System.Diagnostics; - -class Program -{ - static readonly CancellationTokenSource s_cts = new CancellationTokenSource(); - - static readonly HttpClient s_client = new HttpClient - { - MaxResponseContentBufferSize = 1_000_000 - }; - - static readonly IEnumerable<string> s_urlList = new string[] - { - "https://docs.microsoft.com", - "https://docs.microsoft.com/aspnet/core", - "https://docs.microsoft.com/azure", - "https://docs.microsoft.com/azure/devops", - "https://docs.microsoft.com/dotnet", - "https://docs.microsoft.com/dynamics365", - "https://docs.microsoft.com/education", - "https://docs.microsoft.com/enterprise-mobility-security", - "https://docs.microsoft.com/gaming", - "https://docs.microsoft.com/graph", - "https://docs.microsoft.com/microsoft-365", - "https://docs.microsoft.com/office", - "https://docs.microsoft.com/powershell", - "https://docs.microsoft.com/sql", - "https://docs.microsoft.com/surface", - "https://docs.microsoft.com/system-center", - "https://docs.microsoft.com/visualstudio", - "https://docs.microsoft.com/windows", - "https://docs.microsoft.com/xamarin" - }; - - static async Task Main() - { - Console.WriteLine("Application started."); - Console.WriteLine("Press the ENTER key to cancel...\n"); - - Task cancelTask = Task.Run(() => - { - while (Console.ReadKey().Key != ConsoleKey.Enter) - { - Console.WriteLine("Press the ENTER key to cancel..."); - } - - Console.WriteLine("\nENTER key pressed: cancelling downloads.\n"); - s_cts.Cancel(); - }); - - Task sumPageSizesTask = SumPageSizesAsync(); - - await Task.WhenAny(new[] { cancelTask, sumPageSizesTask }); - - Console.WriteLine("Application ending."); - } - - static async Task SumPageSizesAsync() - { - var stopwatch = Stopwatch.StartNew(); - - int total = 0; - foreach (string url in s_urlList) - { - int contentLength = await ProcessUrlAsync(url, s_client, s_cts.Token); - total += contentLength; - } - - stopwatch.Stop(); - - Console.WriteLine($"\nTotal bytes returned: {total:#,#}"); - Console.WriteLine($"Elapsed time: {stopwatch.Elapsed}\n"); - } - - static async Task<int> ProcessUrlAsync(string url, HttpClient client, CancellationToken token) - { - HttpResponseMessage response = await client.GetAsync(url, token); - byte[] content = await response.Content.ReadAsByteArrayAsync(token); - Console.WriteLine($"{url,-60} {content.Length,10:#,#}"); - - return content.Length; - } -} diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-V3/AsyncBreakfast.csproj b/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-V3/AsyncBreakfast.csproj deleted file mode 100644 index 3897747193834..0000000000000 --- a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-V3/AsyncBreakfast.csproj +++ /dev/null @@ -1,10 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> - <Nullable>enable</Nullable> - <ImplicitUsings>enable</ImplicitUsings> - </PropertyGroup> - -</Project> diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-final/AsyncBreakfast.csproj b/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-final/AsyncBreakfast.csproj deleted file mode 100644 index 3897747193834..0000000000000 --- a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-final/AsyncBreakfast.csproj +++ /dev/null @@ -1,10 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> - <Nullable>enable</Nullable> - <ImplicitUsings>enable</ImplicitUsings> - </PropertyGroup> - -</Project> diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-starter/AsyncBreakfast.csproj b/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-starter/AsyncBreakfast.csproj deleted file mode 100644 index 3897747193834..0000000000000 --- a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-starter/AsyncBreakfast.csproj +++ /dev/null @@ -1,10 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> - <Nullable>enable</Nullable> - <ImplicitUsings>enable</ImplicitUsings> - </PropertyGroup> - -</Project> diff --git a/docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks-6-0/Program.cs b/docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks-6-0/Program.cs deleted file mode 100644 index 48580f71b2923..0000000000000 --- a/docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks-6-0/Program.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System.Diagnostics; - -HttpClient s_client = new() -{ - MaxResponseContentBufferSize = 1_000_000 -}; - -IEnumerable<string> s_urlList = new string[] -{ - "https://docs.microsoft.com", - "https://docs.microsoft.com/aspnet/core", - "https://docs.microsoft.com/azure", - "https://docs.microsoft.com/azure/devops", - "https://docs.microsoft.com/dotnet", - "https://docs.microsoft.com/dynamics365", - "https://docs.microsoft.com/education", - "https://docs.microsoft.com/enterprise-mobility-security", - "https://docs.microsoft.com/gaming", - "https://docs.microsoft.com/graph", - "https://docs.microsoft.com/microsoft-365", - "https://docs.microsoft.com/office", - "https://docs.microsoft.com/powershell", - "https://docs.microsoft.com/sql", - "https://docs.microsoft.com/surface", - "https://docs.microsoft.com/system-center", - "https://docs.microsoft.com/visualstudio", - "https://docs.microsoft.com/windows", - "https://docs.microsoft.com/xamarin" -}; - -await SumPageSizesAsync(); - -async Task SumPageSizesAsync() -{ - var stopwatch = Stopwatch.StartNew(); - - IEnumerable<Task<int>> downloadTasksQuery = - from url in s_urlList - select ProcessUrlAsync(url, s_client); - - List<Task<int>> downloadTasks = downloadTasksQuery.ToList(); - - int total = 0; - while (downloadTasks.Any()) - { - Task<int> finishedTask = await Task.WhenAny(downloadTasks); - downloadTasks.Remove(finishedTask); - total += await finishedTask; - } - - stopwatch.Stop(); - - Console.WriteLine($"\nTotal bytes returned: {total:#,#}"); - Console.WriteLine($"Elapsed time: {stopwatch.Elapsed}\n"); -} - -static async Task<int> ProcessUrlAsync(string url, HttpClient client) -{ - byte[] content = await client.GetByteArrayAsync(url); - Console.WriteLine($"{url,-60} {content.Length,10:#,#}"); - - return content.Length; -} - -// Example output: -// https://docs.microsoft.com 132,517 -// https://docs.microsoft.com/powershell 57,375 -// https://docs.microsoft.com/gaming 33,549 -// https://docs.microsoft.com/aspnet/core 88,714 -// https://docs.microsoft.com/surface 39,840 -// https://docs.microsoft.com/enterprise-mobility-security 30,903 -// https://docs.microsoft.com/microsoft-365 67,867 -// https://docs.microsoft.com/windows 26,816 -// https://docs.microsoft.com/xamarin 57,958 -// https://docs.microsoft.com/dotnet 78,706 -// https://docs.microsoft.com/graph 48,277 -// https://docs.microsoft.com/dynamics365 49,042 -// https://docs.microsoft.com/office 67,867 -// https://docs.microsoft.com/system-center 42,887 -// https://docs.microsoft.com/education 38,636 -// https://docs.microsoft.com/azure 421,663 -// https://docs.microsoft.com/visualstudio 30,925 -// https://docs.microsoft.com/sql 54,608 -// https://docs.microsoft.com/azure/devops 86,034 - -// Total bytes returned: 1,454,184 -// Elapsed time: 00:00:01.1290403 diff --git a/docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks/Program.cs b/docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks/Program.cs deleted file mode 100644 index 3f3dc5b46c3be..0000000000000 --- a/docs/csharp/programming-guide/concepts/async/snippets/multiple-tasks/Program.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Net.Http; -using System.Threading.Tasks; - -namespace ProcessTasksAsTheyFinish -{ - class Program - { - static readonly HttpClient s_client = new HttpClient - { - MaxResponseContentBufferSize = 1_000_000 - }; - - static readonly IEnumerable<string> s_urlList = new string[] - { - "https://docs.microsoft.com", - "https://docs.microsoft.com/aspnet/core", - "https://docs.microsoft.com/azure", - "https://docs.microsoft.com/azure/devops", - "https://docs.microsoft.com/dotnet", - "https://docs.microsoft.com/dynamics365", - "https://docs.microsoft.com/education", - "https://docs.microsoft.com/enterprise-mobility-security", - "https://docs.microsoft.com/gaming", - "https://docs.microsoft.com/graph", - "https://docs.microsoft.com/microsoft-365", - "https://docs.microsoft.com/office", - "https://docs.microsoft.com/powershell", - "https://docs.microsoft.com/sql", - "https://docs.microsoft.com/surface", - "https://docs.microsoft.com/system-center", - "https://docs.microsoft.com/visualstudio", - "https://docs.microsoft.com/windows", - "https://docs.microsoft.com/xamarin" - }; - - static Task Main() => SumPageSizesAsync(); - - static async Task SumPageSizesAsync() - { - var stopwatch = Stopwatch.StartNew(); - - IEnumerable<Task<int>> downloadTasksQuery = - from url in s_urlList - select ProcessUrlAsync(url, s_client); - - List<Task<int>> downloadTasks = downloadTasksQuery.ToList(); - - int total = 0; - while (downloadTasks.Any()) - { - Task<int> finishedTask = await Task.WhenAny(downloadTasks); - downloadTasks.Remove(finishedTask); - total += await finishedTask; - } - - stopwatch.Stop(); - - Console.WriteLine($"\nTotal bytes returned: {total:#,#}"); - Console.WriteLine($"Elapsed time: {stopwatch.Elapsed}\n"); - } - - static async Task<int> ProcessUrlAsync(string url, HttpClient client) - { - byte[] content = await client.GetByteArrayAsync(url); - Console.WriteLine($"{url,-60} {content.Length,10:#,#}"); - - return content.Length; - } - } -} -// Example output: -// https://docs.microsoft.com/windows 25,513 -// https://docs.microsoft.com/gaming 30,705 -// https://docs.microsoft.com/dotnet 69,626 -// https://docs.microsoft.com/dynamics365 50,756 -// https://docs.microsoft.com/surface 35,519 -// https://docs.microsoft.com 39,531 -// https://docs.microsoft.com/azure/devops 75,837 -// https://docs.microsoft.com/xamarin 60,284 -// https://docs.microsoft.com/system-center 43,444 -// https://docs.microsoft.com/enterprise-mobility-security 28,946 -// https://docs.microsoft.com/microsoft-365 43,278 -// https://docs.microsoft.com/visualstudio 31,414 -// https://docs.microsoft.com/office 42,292 -// https://docs.microsoft.com/azure 401,113 -// https://docs.microsoft.com/graph 46,831 -// https://docs.microsoft.com/education 25,098 -// https://docs.microsoft.com/powershell 58,173 -// https://docs.microsoft.com/aspnet/core 87,763 -// https://docs.microsoft.com/sql 53,362 - -// Total bytes returned: 1,249,485 -// Elapsed time: 00:00:02.7068725 diff --git a/docs/csharp/programming-guide/concepts/attributes/accessing-attributes-by-using-reflection.md b/docs/csharp/programming-guide/concepts/attributes/accessing-attributes-by-using-reflection.md deleted file mode 100644 index 8f350fae646ee..0000000000000 --- a/docs/csharp/programming-guide/concepts/attributes/accessing-attributes-by-using-reflection.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: "Accessing Attributes by Using Reflection (C#)" -description: Use reflection to get information defined with custom attributes in C# by using the GetCustomAttributes method. -ms.date: 07/20/2015 -ms.assetid: dce3a696-4ceb-489a-b5e4-322a83052f18 ---- -# Accessing Attributes by Using Reflection (C#) - -The fact that you can define custom attributes and place them in your source code would be of little value without some way of retrieving that information and acting on it. By using reflection, you can retrieve the information that was defined with custom attributes. The key method is `GetCustomAttributes`, which returns an array of objects that are the run-time equivalents of the source code attributes. This method has several overloaded versions. For more information, see <xref:System.Attribute>. - - An attribute specification such as: - -```csharp -[Author("P. Ackerman", version = 1.1)] -class SampleClass -``` - - is conceptually equivalent to this: - -```csharp -Author anonymousAuthorObject = new Author("P. Ackerman"); -anonymousAuthorObject.version = 1.1; -``` - - However, the code is not executed until `SampleClass` is queried for attributes. Calling `GetCustomAttributes` on `SampleClass` causes an `Author` object to be constructed and initialized as above. If the class has other attributes, other attribute objects are constructed similarly. `GetCustomAttributes` then returns the `Author` object and any other attribute objects in an array. You can then iterate over this array, determine what attributes were applied based on the type of each array element, and extract information from the attribute objects. - -## Example - - Here is a complete example. A custom attribute is defined, applied to several entities, and retrieved via reflection. - -```csharp -// Multiuse attribute. -[System.AttributeUsage(System.AttributeTargets.Class | - System.AttributeTargets.Struct, - AllowMultiple = true) // Multiuse attribute. -] -public class Author : System.Attribute -{ - string name; - public double version; - - public Author(string name) - { - this.name = name; - - // Default value. - version = 1.0; - } - - public string GetName() - { - return name; - } -} - -// Class with the Author attribute. -[Author("P. Ackerman")] -public class FirstClass -{ - // ... -} - -// Class without the Author attribute. -public class SecondClass -{ - // ... -} - -// Class with multiple Author attributes. -[Author("P. Ackerman"), Author("R. Koch", version = 2.0)] -public class ThirdClass -{ - // ... -} - -class TestAuthorAttribute -{ - static void Test() - { - PrintAuthorInfo(typeof(FirstClass)); - PrintAuthorInfo(typeof(SecondClass)); - PrintAuthorInfo(typeof(ThirdClass)); - } - - private static void PrintAuthorInfo(System.Type t) - { - System.Console.WriteLine("Author information for {0}", t); - - // Using reflection. - System.Attribute[] attrs = System.Attribute.GetCustomAttributes(t); // Reflection. - - // Displaying output. - foreach (System.Attribute attr in attrs) - { - if (attr is Author) - { - Author a = (Author)attr; - System.Console.WriteLine(" {0}, version {1:f}", a.GetName(), a.version); - } - } - } -} -/* Output: - Author information for FirstClass - P. Ackerman, version 1.00 - Author information for SecondClass - Author information for ThirdClass - R. Koch, version 2.00 - P. Ackerman, version 1.00 -*/ -``` - -## See also - -- <xref:System.Reflection> -- <xref:System.Attribute> -- [C# Programming Guide](../../index.md) -- [Retrieving Information Stored in Attributes](../../../../standard/attributes/retrieving-information-stored-in-attributes.md) -- [Reflection (C#)](../reflection.md) -- [Attributes (C#)](./index.md) -- [Creating Custom Attributes (C#)](./creating-custom-attributes.md) diff --git a/docs/csharp/programming-guide/concepts/attributes/creating-custom-attributes.md b/docs/csharp/programming-guide/concepts/attributes/creating-custom-attributes.md deleted file mode 100644 index daaf06a76e415..0000000000000 --- a/docs/csharp/programming-guide/concepts/attributes/creating-custom-attributes.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "Creating Custom Attributes (C#)" -description: Learn how to create custom attributes in C# by defining an attribute class that derives from the Attribute class. -ms.date: 07/20/2015 -f1_keywords: - - "attributeNamedArgument_CSharpKeyword" ---- -# Creating Custom Attributes (C#) - -You can create your own custom attributes by defining an attribute class, a class that derives directly or indirectly from <xref:System.Attribute>, which makes identifying attribute definitions in metadata fast and easy. Suppose you want to tag types with the name of the programmer who wrote the type. You might define a custom `Author` attribute class: - -```csharp -[System.AttributeUsage(System.AttributeTargets.Class | - System.AttributeTargets.Struct) -] -public class AuthorAttribute : System.Attribute -{ - private string name; - public double version; - - public AuthorAttribute(string name) - { - this.name = name; - version = 1.0; - } -} -``` - - The class name `AuthorAttribute` is the attribute's name, `Author`, plus the `Attribute` suffix. It is derived from `System.Attribute`, so it is a custom attribute class. The constructor's parameters are the custom attribute's positional parameters. In this example, `name` is a positional parameter. Any public read-write fields or properties are named parameters. In this case, `version` is the only named parameter. Note the use of the `AttributeUsage` attribute to make the `Author` attribute valid only on class and `struct` declarations. - - You could use this new attribute as follows: - -```csharp -[Author("P. Ackerman", version = 1.1)] -class SampleClass -{ - // P. Ackerman's code goes here... -} -``` - - `AttributeUsage` has a named parameter, `AllowMultiple`, with which you can make a custom attribute single-use or multiuse. In the following code example, a multiuse attribute is created. - -```csharp -[System.AttributeUsage(System.AttributeTargets.Class | - System.AttributeTargets.Struct, - AllowMultiple = true) // multiuse attribute -] -public class AuthorAttribute : System.Attribute -``` - - In the following code example, multiple attributes of the same type are applied to a class. - -```csharp -[Author("P. Ackerman", version = 1.1)] -[Author("R. Koch", version = 1.2)] -class SampleClass -{ - // P. Ackerman's code goes here... - // R. Koch's code goes here... -} -``` - -## See also - -- <xref:System.Reflection> -- [C# Programming Guide](../../index.md) -- [Writing Custom Attributes](../../../../standard/attributes/writing-custom-attributes.md) -- [Reflection (C#)](../reflection.md) -- [Attributes (C#)](./index.md) -- [Accessing Attributes by Using Reflection (C#)](./accessing-attributes-by-using-reflection.md) -- [AttributeUsage (C#)](../../../language-reference/attributes/general.md) diff --git a/docs/csharp/programming-guide/concepts/attributes/how-to-create-a-c-cpp-union-by-using-attributes.md b/docs/csharp/programming-guide/concepts/attributes/how-to-create-a-c-cpp-union-by-using-attributes.md deleted file mode 100644 index 9b623a2db1c58..0000000000000 --- a/docs/csharp/programming-guide/concepts/attributes/how-to-create-a-c-cpp-union-by-using-attributes.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "How to create a C/C++ union by using attributes (C#)" -description: Learn how to use attributes to customize how structs are laid out in memory in C#. This example implements the equivalent of a union from C/C++. -ms.date: 07/20/2015 -ms.topic: how-to -ms.assetid: 85f35e56-26e0-4d31-9f3a-89bd4005e71a ---- -# How to create a C/C++ union by using attributes (C#) - -By using attributes, you can customize how structs are laid out in memory. For example, you can create what is known as a union in C/C++ by using the `StructLayout(LayoutKind.Explicit)` and `FieldOffset` attributes. - -## Examples - -In this code segment, all of the fields of `TestUnion` start at the same location in memory. - -```csharp -// Add a using directive for System.Runtime.InteropServices. - -[System.Runtime.InteropServices.StructLayout(LayoutKind.Explicit)] -struct TestUnion -{ - [System.Runtime.InteropServices.FieldOffset(0)] - public int i; - - [System.Runtime.InteropServices.FieldOffset(0)] - public double d; - - [System.Runtime.InteropServices.FieldOffset(0)] - public char c; - - [System.Runtime.InteropServices.FieldOffset(0)] - public byte b; -} -``` - -The following is another example where fields start at different explicitly set locations. - -```csharp -// Add a using directive for System.Runtime.InteropServices. - -[System.Runtime.InteropServices.StructLayout(LayoutKind.Explicit)] -struct TestExplicit -{ - [System.Runtime.InteropServices.FieldOffset(0)] - public long lg; - - [System.Runtime.InteropServices.FieldOffset(0)] - public int i1; - - [System.Runtime.InteropServices.FieldOffset(0)] - public int i2; - - [System.Runtime.InteropServices.FieldOffset(8)] - public double d; - - [System.Runtime.InteropServices.FieldOffset(12)] - public char c; - - [System.Runtime.InteropServices.FieldOffset(14)] - public byte b; -} -``` - -The two integer fields, `i1` and `i2`, share the same memory locations as `lg`. This sort of control over struct layout is useful when using platform invocation. - -## See also - -- <xref:System.Reflection> -- <xref:System.Attribute> -- [C# Programming Guide](../../index.md) -- [Attributes](../../../../standard/attributes/index.md) -- [Reflection (C#)](../reflection.md) -- [Attributes (C#)](index.md) -- [Creating Custom Attributes (C#)](creating-custom-attributes.md) -- [Accessing Attributes by Using Reflection (C#)](accessing-attributes-by-using-reflection.md) diff --git a/docs/csharp/programming-guide/concepts/attributes/index.md b/docs/csharp/programming-guide/concepts/attributes/index.md deleted file mode 100644 index 4d3b009573d07..0000000000000 --- a/docs/csharp/programming-guide/concepts/attributes/index.md +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: "Attributes (C#)" -description: Learn how to use attributes to associate metadata or declarative information with code in C#. An attribute can be queried at run time by using reflection. -ms.date: 04/26/2018 ---- -# Attributes (C#) - -Attributes provide a powerful method of associating metadata, or declarative information, with code (assemblies, types, methods, properties, and so forth). After an attribute is associated with a program entity, the attribute can be queried at run time by using a technique called *reflection*. For more information, see [Reflection (C#)](../reflection.md). - -Attributes have the following properties: - -- Attributes add metadata to your program. *Metadata* is information about the types defined in a program. All .NET assemblies contain a specified set of metadata that describes the types and type members defined in the assembly. You can add custom attributes to specify any additional information that is required. For more information, see, [Creating Custom Attributes (C#)](creating-custom-attributes.md). -- You can apply one or more attributes to entire assemblies, modules, or smaller program elements such as classes and properties. -- Attributes can accept arguments in the same way as methods and properties. -- Your program can examine its own metadata or the metadata in other programs by using reflection. For more information, see [Accessing Attributes by Using Reflection (C#)](accessing-attributes-by-using-reflection.md). - -## Using attributes - -Attributes can be placed on almost any declaration, though a specific attribute might restrict the types of declarations on which it is valid. In C#, you specify an attribute by placing the name of the attribute enclosed in square brackets (`[]`) above the declaration of the entity to which it applies. - -In this example, the <xref:System.SerializableAttribute> attribute is used to apply a specific characteristic to a class: - -[!code-csharp[Using the serializable attribute](~/samples/snippets/csharp/attributes/AttributesOverview.cs#1)] - -A method with the attribute <xref:System.Runtime.InteropServices.DllImportAttribute> is declared like the following example: - -[!code-csharp[Declaring a method to import from an external library](../../../../../samples/snippets/csharp/attributes/AttributesOverview.cs#2)] - -More than one attribute can be placed on a declaration as the following example shows: - -[!code-csharp[Including the interop namespace](~/samples/snippets/csharp/attributes/AttributesOverview.cs#3)] -[!code-csharp[Declaring two way marshalling for arguments](~/samples/snippets/csharp/attributes/AttributesOverview.cs#4)] - -Some attributes can be specified more than once for a given entity. An example of such a multiuse attribute is <xref:System.Diagnostics.ConditionalAttribute>: - -[!code-csharp[Using the conditional attribute](~/samples/snippets/csharp/attributes/AttributesOverview.cs#5)] - -> [!NOTE] -> By convention, all attribute names end with the word "Attribute" to distinguish them from other items in the .NET libraries. However, you do not need to specify the attribute suffix when using attributes in code. For example, `[DllImport]` is equivalent to `[DllImportAttribute]`, but `DllImportAttribute` is the attribute's actual name in the .NET Class Library. - -### Attribute parameters - -Many attributes have parameters, which can be positional, unnamed, or named. Any positional parameters must be specified in a certain order and cannot be omitted. Named parameters are optional and can be specified in any order. Positional parameters are specified first. For example, these three attributes are equivalent: - -```csharp -[DllImport("user32.dll")] -[DllImport("user32.dll", SetLastError=false, ExactSpelling=false)] -[DllImport("user32.dll", ExactSpelling=false, SetLastError=false)] -``` - -The first parameter, the DLL name, is positional and always comes first; the others are named. In this case, both named parameters default to false, so they can be omitted. Positional parameters correspond to the parameters of the attribute constructor. Named or optional parameters correspond to either properties or fields of the attribute. Refer to the individual attribute's documentation for information on default parameter values. - -For more information on allowed parameter types, see the [Attributes](~/_csharpstandard/standard/attributes.md#2124-attribute-parameter-types) section of the [C# language specification](~/_csharpstandard/standard/README.md) - -### Attribute targets - -The *target* of an attribute is the entity which the attribute applies to. For example, an attribute may apply to a class, a particular method, or an entire assembly. By default, an attribute applies to the element that follows it. But you can also explicitly identify, for example, whether an attribute is applied to a method, or to its parameter, or to its return value. - -To explicitly identify an attribute target, use the following syntax: - -```csharp -[target : attribute-list] -``` - -The list of possible `target` values is shown in the following table. - -|Target value|Applies to| -|------------------|----------------| -|`assembly`|Entire assembly| -|`module`|Current assembly module| -|`field`|Field in a class or a struct| -|`event`|Event| -|`method`|Method or `get` and `set` property accessors| -|`param`|Method parameters or `set` property accessor parameters| -|`property`|Property| -|`return`|Return value of a method, property indexer, or `get` property accessor| -|`type`|Struct, class, interface, enum, or delegate| - -You would specify the `field` target value to apply an attribute to the backing field created for an [auto-implemented property](../../../properties.md). - -The following example shows how to apply attributes to assemblies and modules. For more information, see [Common Attributes (C#)](../../../language-reference/attributes/global.md). - -```csharp -using System; -using System.Reflection; -[assembly: AssemblyTitleAttribute("Production assembly 4")] -[module: CLSCompliant(true)] -``` - -The following example shows how to apply attributes to methods, method parameters, and method return values in C#. - -[!code-csharp[Applying attributes to different code elements](../../../../../samples/snippets/csharp/attributes/AttributesOverview.cs#6)] - -> [!NOTE] -> Regardless of the targets on which `ValidatedContract` is defined to be valid, the `return` target has to be specified, even if `ValidatedContract` were defined to apply only to return values. In other words, the compiler will not use `AttributeUsage` information to resolve ambiguous attribute targets. For more information, see [AttributeUsage (C#)](../../../language-reference/attributes/general.md). - -## Common uses for attributes - -The following list includes a few of the common uses of attributes in code: - -- Marking methods using the `WebMethod` attribute in Web services to indicate that the method should be callable over the SOAP protocol. For more information, see <xref:System.Web.Services.WebMethodAttribute>. -- Describing how to marshal method parameters when interoperating with native code. For more information, see <xref:System.Runtime.InteropServices.MarshalAsAttribute>. -- Describing the COM properties for classes, methods, and interfaces. -- Calling unmanaged code using the <xref:System.Runtime.InteropServices.DllImportAttribute> class. -- Describing your assembly in terms of title, version, description, or trademark. -- Describing which members of a class to serialize for persistence. -- Describing how to map between class members and XML nodes for XML serialization. -- Describing the security requirements for methods. -- Specifying characteristics used to enforce security. -- Controlling optimizations by the just-in-time (JIT) compiler so the code remains easy to debug. -- Obtaining information about the caller to a method. - -## Related sections - -For more information, see: - -- [Creating Custom Attributes (C#)](creating-custom-attributes.md) -- [Accessing Attributes by Using Reflection (C#)](accessing-attributes-by-using-reflection.md) -- [How to create a C/C++ union by using attributes (C#)](how-to-create-a-c-cpp-union-by-using-attributes.md) -- [Common Attributes (C#)](../../../language-reference/attributes/global.md) -- [Caller Information (C#)](../../../language-reference/attributes/caller-information.md) - -## See also - -- [C# Programming Guide](../../index.md) -- [Reflection (C#)](../reflection.md) -- [Attributes](../../../../standard/attributes/index.md) -- [Using Attributes in C#](../../../tutorials/attributes.md) diff --git a/docs/csharp/programming-guide/concepts/expression-trees/debugging-expression-trees-in-visual-studio.md b/docs/csharp/programming-guide/concepts/expression-trees/debugging-expression-trees-in-visual-studio.md deleted file mode 100644 index 938f398f70833..0000000000000 --- a/docs/csharp/programming-guide/concepts/expression-trees/debugging-expression-trees-in-visual-studio.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "Debugging Expression Trees in Visual Studio (C#)" -description: Learn about the DebugView property in Visual Studio. See how to use this property to analyze the structure and content of expression trees. -ms.date: 07/20/2015 -ms.assetid: 1369fa25-0fbd-4b92-98d0-8df79c49c27a ---- -# Debugging Expression Trees in Visual Studio (C#) - -You can analyze the structure and content of expression trees when you debug your applications. To get a quick overview of the expression tree structure, you can use the `DebugView` property, which represents expression trees [using a special syntax](debugview-syntax.md). (Note that `DebugView` is available only in debug mode.) - -![Screenshot of the DebugView of an expression tree within VS debugger.](media/debugging-expression-trees-in-visual-studio/debugview-expression-tree.png) - -Since `DebugView` is a string, you can use the [built-in Text Visualizer](/visualstudio/debugger/view-strings-visualizer#open-a-string-visualizer) to view it across multiple lines, by selecting **Text Visualizer** from the magnifying glass icon next to the `DebugView` label. - - ![Screenshot of the Text Visualizer applied to results of DebugView.](media/debugging-expression-trees-in-visual-studio/string-visualizer-debugview.png) - -Alternatively, you can install and use [a custom visualizer](/visualstudio/debugger/create-custom-visualizers-of-data) for expression trees, such as: - -- [Readable Expressions](https://github.com/agileobjects/ReadableExpressions) ([MIT license](https://github.com/agileobjects/ReadableExpressions/blob/master/LICENCE.md), available at the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=vs-publisher-1232914.ReadableExpressionsVisualizers)), renders the expression tree as themeable C# code, with various rendering options: - - ![Screenshot of the Readable Expressions visualizer.](media/debugging-expression-trees-in-visual-studio/readable-expressions-visualizer.png) - -- [Expression Tree Visualizer](https://github.com/zspitz/ExpressionTreeVisualizer/blob/master/README.md) ([MIT license](https://github.com/zspitz/ExpressionTreeVisualizer/blob/master/LICENSE)) provides a tree view of the expression tree and its individual nodes: - - ![Screenshot of the Expression Tree Visualizer.](media/debugging-expression-trees-in-visual-studio/expression-tree-visualizer.png) - -### To open a visualizer for an expression tree - -1. Click the magnifying glass icon that appears next to the expression tree in **DataTips**, a **Watch** window, the **Autos** window, or the **Locals** window. - - A list of available visualizers is displayed.: - - ![Screenshot showing the Opening of visualizers from Visual Studio.](media/debugging-expression-trees-in-visual-studio/expression-tree-visualizers.png) - -2. Click the visualizer you want to use. - -## See also - -- [Expression Trees (C#)](./index.md) -- [Debugging in Visual Studio](/visualstudio/debugger/debugger-feature-tour) -- [Create Custom Visualizers](/visualstudio/debugger/create-custom-visualizers-of-data) -- [`DebugView` syntax](debugview-syntax.md) diff --git a/docs/csharp/programming-guide/concepts/expression-trees/debugview-syntax.md b/docs/csharp/programming-guide/concepts/expression-trees/debugview-syntax.md deleted file mode 100644 index ce3eeb8f9887f..0000000000000 --- a/docs/csharp/programming-guide/concepts/expression-trees/debugview-syntax.md +++ /dev/null @@ -1,171 +0,0 @@ ---- -title: Syntax used by DebugView property (C#) -description: Describes the special syntax used by the DebugView property to produce a string representation of expression trees -author: zspitz -ms.author: wiwagn -ms.date: 02/14/2021 -ms.topic: reference -helpviewer_keywords: -- "expression trees" -- "debugview" ---- - -# **DebugView** syntax - -The **DebugView** property (available only when debugging) provides a string rendering of expression trees. Most of the syntax is fairly straightforward to understand; the special cases are described in the following sections. - -Each example is followed by a block comment, containing the **DebugView**. - -## ParameterExpression - -<xref:System.Linq.Expressions.ParameterExpression> variable names are displayed with a `$` symbol at the beginning. - -If a parameter does not have a name, it is assigned an automatically generated name, such as `$var1` or `$var2`. - -### Examples - -```csharp -ParameterExpression numParam = Expression.Parameter(typeof(int), "num"); -/* - $num -*/ - -ParameterExpression numParam = Expression.Parameter(typeof(int)); -/* - $var1 -*/ -``` - -## ConstantExpression - -For <xref:System.Linq.Expressions.ConstantExpression> objects that represent integer values, strings, and `null`, the value of the constant is displayed. - -For numeric types that have standard suffixes as C# literals, the suffix is added to the value. The following table shows the suffixes associated with various numeric types. - -| Type | Keyword | Suffix | -|--|--|--| -| <xref:System.UInt32?displayProperty=nameWithType> | [uint](../../../language-reference/builtin-types/integral-numeric-types.md) | U | -| <xref:System.Int64?displayProperty=nameWithType> | [long](../../../language-reference/builtin-types/integral-numeric-types.md) | L | -| <xref:System.UInt64?displayProperty=nameWithType> | [ulong](../../../language-reference/builtin-types/integral-numeric-types.md) | UL | -| <xref:System.Double?displayProperty=nameWithType> | [double](../../../language-reference/builtin-types/floating-point-numeric-types.md) | D | -| <xref:System.Single?displayProperty=nameWithType> | [float](../../../language-reference/builtin-types/floating-point-numeric-types.md) | F | -| <xref:System.Decimal?displayProperty=nameWithType> | [decimal](../../../language-reference/builtin-types/floating-point-numeric-types.md) | M | - -### Examples - -```csharp -int num = 10; -ConstantExpression expr = Expression.Constant(num); -/* - 10 -*/ - -double num = 10; -ConstantExpression expr = Expression.Constant(num); -/* - 10D -*/ -``` - -## BlockExpression - -If the type of a <xref:System.Linq.Expressions.BlockExpression> object differs from the type of the last expression in the block, the type is displayed within angle brackets (`<` and `>`). Otherwise, the type of the <xref:System.Linq.Expressions.BlockExpression> object is not displayed. - -### Examples - -```csharp -BlockExpression block = Expression.Block(Expression.Constant("test")); -/* - .Block() { - "test" - } -*/ - -BlockExpression block = Expression.Block(typeof(Object), Expression.Constant("test")); -/* - .Block<System.Object>() { - "test" - } -*/ -``` - -## LambdaExpression - -<xref:System.Linq.Expressions.LambdaExpression> objects are displayed together with their delegate types. - -If a lambda expression does not have a name, it is assigned an automatically generated name, such as `#Lambda1` or `#Lambda2`. - -### Examples - -```csharp -LambdaExpression lambda = Expression.Lambda<Func<int>>(Expression.Constant(1)); -/* - .Lambda #Lambda1<System.Func'1[System.Int32]>() { - 1 - } -*/ - -LambdaExpression lambda = Expression.Lambda<Func<int>>(Expression.Constant(1), "SampleLambda", null); -/* - .Lambda #SampleLambda<System.Func'1[System.Int32]>() { - 1 - } -*/ -``` - -## LabelExpression - -If you specify a default value for the <xref:System.Linq.Expressions.LabelExpression> object, this value is displayed before the <xref:System.Linq.Expressions.LabelTarget> object. - -The `.Label` token indicates the start of the label. The `.LabelTarget` token indicates the destination of the target to jump to. - -If a label does not have a name, it is assigned an automatically generated name, such as `#Label1` or `#Label2`. - -### Examples - -```csharp -LabelTarget target = Expression.Label(typeof(int), "SampleLabel"); -BlockExpression block = Expression.Block( - Expression.Goto(target, Expression.Constant(0)), - Expression.Label(target, Expression.Constant(-1)) -); -/* - .Block() { - .Goto SampleLabel { 0 }; - .Label - -1 - .LabelTarget SampleLabel: - } -*/ - -LabelTarget target = Expression.Label(); -BlockExpression block = Expression.Block( - Expression.Goto(target), - Expression.Label(target) -); -/* - .Block() { - .Goto #Label1 { }; - .Label - .LabelTarget #Label1: - } -*/ -``` - -## Checked Operators - -Checked operators are displayed with the `#` symbol in front of the operator. For example, the checked addition operator is displayed as `#+`. - -### Examples - -```csharp -Expression expr = Expression.AddChecked( Expression.Constant(1), Expression.Constant(2)); -/* - 1 #+ 2 -*/ - -Expression expr = Expression.ConvertChecked( Expression.Constant(10.0), typeof(int)); -/* - #(System.Int32)10D -*/ -``` diff --git a/docs/csharp/programming-guide/concepts/expression-trees/how-to-execute-expression-trees.md b/docs/csharp/programming-guide/concepts/expression-trees/how-to-execute-expression-trees.md deleted file mode 100644 index 5a06e30e740dc..0000000000000 --- a/docs/csharp/programming-guide/concepts/expression-trees/how-to-execute-expression-trees.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "How to execute expression trees (C#)" -description: Learn how to execute an expression tree to return a value or perform an action like calling a method. -ms.date: 07/20/2015 -ms.topic: how-to -ms.assetid: b8c40db5-2464-4bb9-9001-8c2bc7f006c5 ---- -# How to execute expression trees (C#) - -This topic shows you how to execute an expression tree. Executing an expression tree may return a value, or it may just perform an action such as calling a method. - - Only expression trees that represent lambda expressions can be executed. Expression trees that represent lambda expressions are of type <xref:System.Linq.Expressions.LambdaExpression> or <xref:System.Linq.Expressions.Expression%601>. To execute these expression trees, call the <xref:System.Linq.Expressions.LambdaExpression.Compile%2A> method to create an executable delegate, and then invoke the delegate. - -> [!NOTE] -> If the type of the delegate is not known, that is, the lambda expression is of type <xref:System.Linq.Expressions.LambdaExpression> and not <xref:System.Linq.Expressions.Expression%601>, you must call the <xref:System.Delegate.DynamicInvoke%2A> method on the delegate instead of invoking it directly. - - If an expression tree does not represent a lambda expression, you can create a new lambda expression that has the original expression tree as its body, by calling the <xref:System.Linq.Expressions.Expression.Lambda%60%601%28System.Linq.Expressions.Expression%2CSystem.Collections.Generic.IEnumerable%7BSystem.Linq.Expressions.ParameterExpression%7D%29> method. Then, you can execute the lambda expression as described earlier in this section. - -## Example - - The following code example demonstrates how to execute an expression tree that represents raising a number to a power by creating a lambda expression and executing it. The result, which represents the number raised to the power, is displayed. - -```csharp -// The expression tree to execute. -BinaryExpression be = Expression.Power(Expression.Constant(2D), Expression.Constant(3D)); - -// Create a lambda expression. -Expression<Func<double>> le = Expression.Lambda<Func<double>>(be); - -// Compile the lambda expression. -Func<double> compiledExpression = le.Compile(); - -// Execute the lambda expression. -double result = compiledExpression(); - -// Display the result. -Console.WriteLine(result); - -// This code produces the following output: -// 8 -``` - -## Compiling the Code - -- Include the System.Linq.Expressions namespace. - -## See also - -- [Expression Trees (C#)](./index.md) -- [How to modify expression trees (C#)](./how-to-modify-expression-trees.md) diff --git a/docs/csharp/programming-guide/concepts/expression-trees/how-to-modify-expression-trees.md b/docs/csharp/programming-guide/concepts/expression-trees/how-to-modify-expression-trees.md deleted file mode 100644 index 61935292f188d..0000000000000 --- a/docs/csharp/programming-guide/concepts/expression-trees/how-to-modify-expression-trees.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "How to modify expression trees (C#)" -description: Learn how to modify an expression tree by creating a copy of an existing expression tree and making the required changes. -ms.date: 07/20/2015 -ms.topic: how-to -ms.assetid: 9b0cd8c2-457e-4833-9e36-31e79545f442 ---- -# How to modify expression trees (C#) - -This topic shows you how to modify an expression tree. Expression trees are immutable, which means that they cannot be modified directly. To change an expression tree, you must create a copy of an existing expression tree and when you create the copy, make the required changes. You can use the <xref:System.Linq.Expressions.ExpressionVisitor> class to traverse an existing expression tree and to copy each node that it visits. - -### To modify an expression tree - -1. Create a new **Console Application** project. - -2. Add a `using` directive to the file for the `System.Linq.Expressions` namespace. - -3. Add the `AndAlsoModifier` class to your project. - - ```csharp - public class AndAlsoModifier : ExpressionVisitor - { - public Expression Modify(Expression expression) - { - return Visit(expression); - } - - protected override Expression VisitBinary(BinaryExpression b) - { - if (b.NodeType == ExpressionType.AndAlso) - { - Expression left = this.Visit(b.Left); - Expression right = this.Visit(b.Right); - - // Make this binary expression an OrElse operation instead of an AndAlso operation. - return Expression.MakeBinary(ExpressionType.OrElse, left, right, b.IsLiftedToNull, b.Method); - } - - return base.VisitBinary(b); - } - } - ``` - - This class inherits the <xref:System.Linq.Expressions.ExpressionVisitor> class and is specialized to modify expressions that represent conditional `AND` operations. It changes these operations from a conditional `AND` to a conditional `OR`. To do this, the class overrides the <xref:System.Linq.Expressions.ExpressionVisitor.VisitBinary%2A> method of the base type, because conditional `AND` expressions are represented as binary expressions. In the `VisitBinary` method, if the expression that is passed to it represents a conditional `AND` operation, the code constructs a new expression that contains the conditional `OR` operator instead of the conditional `AND` operator. If the expression that is passed to `VisitBinary` does not represent a conditional `AND` operation, the method defers to the base class implementation. The base class methods construct nodes that are like the expression trees that are passed in, but the nodes have their sub trees replaced with the expression trees that are produced recursively by the visitor. - -4. Add a `using` directive to the file for the `System.Linq.Expressions` namespace. - -5. Add code to the `Main` method in the Program.cs file to create an expression tree and pass it to the method that will modify it. - - ```csharp - Expression<Func<string, bool>> expr = name => name.Length > 10 && name.StartsWith("G"); - Console.WriteLine(expr); - - AndAlsoModifier treeModifier = new AndAlsoModifier(); - Expression modifiedExpr = treeModifier.Modify((Expression) expr); - - Console.WriteLine(modifiedExpr); - - /* This code produces the following output: - - name => ((name.Length > 10) && name.StartsWith("G")) - name => ((name.Length > 10) || name.StartsWith("G")) - */ - ``` - - The code creates an expression that contains a conditional `AND` operation. It then creates an instance of the `AndAlsoModifier` class and passes the expression to the `Modify` method of this class. Both the original and the modified expression trees are outputted to show the change. - -6. Compile and run the application. - -## See also - -- [How to execute expression trees (C#)](./how-to-execute-expression-trees.md) -- [Expression Trees (C#)](./index.md) diff --git a/docs/csharp/programming-guide/concepts/expression-trees/index.md b/docs/csharp/programming-guide/concepts/expression-trees/index.md deleted file mode 100644 index 1252029631b33..0000000000000 --- a/docs/csharp/programming-guide/concepts/expression-trees/index.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: "Expression Trees (C#)" -description: Learn about expression trees. See how to compile and run code represented by these data structures, where each node is an expression. -ms.date: 07/20/2015 -ms.assetid: 7d0ac21a-6d90-4e2e-8903-528cb78615b7 ---- -# Expression Trees (C#) - -Expression trees represent code in a tree-like data structure, where each node is an expression, for example, a method call or a binary operation such as `x < y`. - - You can compile and run code represented by expression trees. This enables dynamic modification of executable code, the execution of LINQ queries in various databases, and the creation of dynamic queries. For more information about expression trees in LINQ, see [How to use expression trees to build dynamic queries (C#)](./how-to-use-expression-trees-to-build-dynamic-queries.md). - - Expression trees are also used in the dynamic language runtime (DLR) to provide interoperability between dynamic languages and .NET and to enable compiler writers to emit expression trees instead of Microsoft intermediate language (MSIL). For more information about the DLR, see [Dynamic Language Runtime Overview](../../../../framework/reflection-and-codedom/dynamic-language-runtime-overview.md). - - You can have the C# or Visual Basic compiler create an expression tree for you based on an anonymous lambda expression, or you can create expression trees manually by using the <xref:System.Linq.Expressions> namespace. - -## Creating Expression Trees from Lambda Expressions - - When a lambda expression is assigned to a variable of type <xref:System.Linq.Expressions.Expression%601>, the compiler emits code to build an expression tree that represents the lambda expression. - - The C# compiler can generate expression trees only from expression lambdas (or single-line lambdas). It cannot parse statement lambdas (or multi-line lambdas). For more information about lambda expressions in C#, see [Lambda Expressions](../../../language-reference/operators/lambda-expressions.md). - - The following code examples demonstrate how to have the C# compiler create an expression tree that represents the lambda expression `num => num < 5`. - -```csharp -Expression<Func<int, bool>> lambda = num => num < 5; -``` - -## Creating Expression Trees by Using the API - - To create expression trees by using the API, use the <xref:System.Linq.Expressions.Expression> class. This class contains static factory methods that create expression tree nodes of specific types, for example, <xref:System.Linq.Expressions.ParameterExpression>, which represents a variable or parameter, or <xref:System.Linq.Expressions.MethodCallExpression>, which represents a method call. <xref:System.Linq.Expressions.ParameterExpression>, <xref:System.Linq.Expressions.MethodCallExpression>, and the other expression-specific types are also defined in the <xref:System.Linq.Expressions> namespace. These types derive from the abstract type <xref:System.Linq.Expressions.Expression>. - - The following code example demonstrates how to create an expression tree that represents the lambda expression `num => num < 5` by using the API. - -```csharp -// Add the following using directive to your code file: -// using System.Linq.Expressions; - -// Manually build the expression tree for -// the lambda expression num => num < 5. -ParameterExpression numParam = Expression.Parameter(typeof(int), "num"); -ConstantExpression five = Expression.Constant(5, typeof(int)); -BinaryExpression numLessThanFive = Expression.LessThan(numParam, five); -Expression<Func<int, bool>> lambda1 = - Expression.Lambda<Func<int, bool>>( - numLessThanFive, - new ParameterExpression[] { numParam }); -``` - - In .NET Framework 4 or later, the expression trees API also supports assignments and control flow expressions such as loops, conditional blocks, and `try-catch` blocks. By using the API, you can create expression trees that are more complex than those that can be created from lambda expressions by the C# compiler. The following example demonstrates how to create an expression tree that calculates the factorial of a number. - -```csharp -// Creating a parameter expression. -ParameterExpression value = Expression.Parameter(typeof(int), "value"); - -// Creating an expression to hold a local variable. -ParameterExpression result = Expression.Parameter(typeof(int), "result"); - -// Creating a label to jump to from a loop. -LabelTarget label = Expression.Label(typeof(int)); - -// Creating a method body. -BlockExpression block = Expression.Block( - // Adding a local variable. - new[] { result }, - // Assigning a constant to a local variable: result = 1 - Expression.Assign(result, Expression.Constant(1)), - // Adding a loop. - Expression.Loop( - // Adding a conditional block into the loop. - Expression.IfThenElse( - // Condition: value > 1 - Expression.GreaterThan(value, Expression.Constant(1)), - // If true: result *= value -- - Expression.MultiplyAssign(result, - Expression.PostDecrementAssign(value)), - // If false, exit the loop and go to the label. - Expression.Break(label, result) - ), - // Label to jump to. - label - ) -); - -// Compile and execute an expression tree. -int factorial = Expression.Lambda<Func<int, int>>(block, value).Compile()(5); - -Console.WriteLine(factorial); -// Prints 120. -``` - -For more information, see [Generating Dynamic Methods with Expression Trees in Visual Studio 2010](https://devblogs.microsoft.com/csharpfaq/generating-dynamic-methods-with-expression-trees-in-visual-studio-2010/), which also applies to later versions of Visual Studio. - -## Parsing Expression Trees - - The following code example demonstrates how the expression tree that represents the lambda expression `num => num < 5` can be decomposed into its parts. - -```csharp -// Add the following using directive to your code file: -// using System.Linq.Expressions; - -// Create an expression tree. -Expression<Func<int, bool>> exprTree = num => num < 5; - -// Decompose the expression tree. -ParameterExpression param = (ParameterExpression)exprTree.Parameters[0]; -BinaryExpression operation = (BinaryExpression)exprTree.Body; -ParameterExpression left = (ParameterExpression)operation.Left; -ConstantExpression right = (ConstantExpression)operation.Right; - -Console.WriteLine("Decomposed expression: {0} => {1} {2} {3}", - param.Name, left.Name, operation.NodeType, right.Value); - -// This code produces the following output: - -// Decomposed expression: num => num LessThan 5 -``` - -## Immutability of Expression Trees - - Expression trees should be immutable. This means that if you want to modify an expression tree, you must construct a new expression tree by copying the existing one and replacing nodes in it. You can use an expression tree visitor to traverse the existing expression tree. For more information, see [How to modify expression trees (C#)](./how-to-modify-expression-trees.md). - -## Compiling Expression Trees - - The <xref:System.Linq.Expressions.Expression%601> type provides the <xref:System.Linq.Expressions.Expression%601.Compile%2A> method that compiles the code represented by an expression tree into an executable delegate. - - The following code example demonstrates how to compile an expression tree and run the resulting code. - -```csharp -// Creating an expression tree. -Expression<Func<int, bool>> expr = num => num < 5; - -// Compiling the expression tree into a delegate. -Func<int, bool> result = expr.Compile(); - -// Invoking the delegate and writing the result to the console. -Console.WriteLine(result(4)); - -// Prints True. - -// You can also use simplified syntax -// to compile and run an expression tree. -// The following line can replace two previous statements. -Console.WriteLine(expr.Compile()(4)); - -// Also prints True. -``` - - For more information, see [How to execute expression trees (C#)](./how-to-execute-expression-trees.md). - -## See also - -- <xref:System.Linq.Expressions> -- [How to execute expression trees (C#)](./how-to-execute-expression-trees.md) -- [How to modify expression trees (C#)](./how-to-modify-expression-trees.md) -- [Lambda Expressions](../../../language-reference/operators/lambda-expressions.md) -- [Dynamic Language Runtime Overview](../../../../framework/reflection-and-codedom/dynamic-language-runtime-overview.md) -- [Programming Concepts (C#)](../index.md) diff --git a/docs/csharp/programming-guide/concepts/index.md b/docs/csharp/programming-guide/concepts/index.md index c746c771266f4..10377e41e71d1 100644 --- a/docs/csharp/programming-guide/concepts/index.md +++ b/docs/csharp/programming-guide/concepts/index.md @@ -11,16 +11,11 @@ This section explains programming concepts in the C# language. |Title|Description| |-----------|-----------------| -|[Assemblies in .NET](../../../standard/assembly/index.md)|Describes how to create and use assemblies.| -|[Asynchronous Programming with async and await (C#)](./async/index.md)|Describes how to write asynchronous solutions by using the [async](../../language-reference/keywords/async.md) and [await](../../language-reference/operators/await.md) keywords in C#. Includes a walkthrough.| -|[Attributes (C#)](./attributes/index.md)|Discusses how to provide additional information about programming elements such as types, fields, methods, and properties by using attributes.| +methods, and properties by using attributes.| |[Collections (C#)](./collections.md)|Describes some of the types of collections provided by .NET. Demonstrates how to use simple collections and collections of key/value pairs.| |[Covariance and Contravariance (C#)](./covariance-contravariance/index.md)|Shows how to enable implicit conversion of generic type parameters in interfaces and delegates.| -|[Expression Trees (C#)](./expression-trees/index.md)|Explains how you can use expression trees to enable dynamic modification of executable code.| |[Iterators (C#)](./iterators.md)|Describes iterators, which are used to step through collections and return elements one at a time.| |[Language-Integrated Query (LINQ) (C#)](./linq/index.md)|Discusses the powerful query capabilities in the language syntax of C#, and the model for querying relational databases, XML documents, datasets, and in-memory collections.| -|[Reflection (C#)](./reflection.md)|Explains how to use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties.| -|[Serialization (C#)](./serialization/index.md)|Describes key concepts in binary, XML, and SOAP serialization.| ## Related Sections diff --git a/docs/csharp/programming-guide/concepts/iterators.md b/docs/csharp/programming-guide/concepts/iterators.md index b524ba5bc951c..b1a2fb0569afd 100644 --- a/docs/csharp/programming-guide/concepts/iterators.md +++ b/docs/csharp/programming-guide/concepts/iterators.md @@ -337,7 +337,7 @@ On each successive iteration of the `foreach` loop (or the direct call to `IEnum Iterators don't support the <xref:System.Collections.IEnumerator.Reset%2A?displayProperty=nameWithType> method. To reiterate from the start, you must obtain a new iterator. Calling <xref:System.Collections.IEnumerator.Reset%2A> on the iterator returned by an iterator method throws a <xref:System.NotSupportedException>. -For additional information, see the [C# Language Specification](~/_csharpstandard/standard/classes.md#1414-iterators). +For additional information, see the [C# Language Specification](~/_csharpstandard/standard/classes.md#1514-iterators). ## Use of Iterators diff --git a/docs/csharp/programming-guide/concepts/linq/features-that-support-linq.md b/docs/csharp/programming-guide/concepts/linq/features-that-support-linq.md index 48e006f107065..2a8aca1534dc6 100644 --- a/docs/csharp/programming-guide/concepts/linq/features-that-support-linq.md +++ b/docs/csharp/programming-guide/concepts/linq/features-that-support-linq.md @@ -91,7 +91,7 @@ For more information, see: - [Lambda Expressions](../../../language-reference/operators/lambda-expressions.md) -- [Expression Trees (C#)](../expression-trees/index.md) +- [Expression Trees (C#)](../../../advanced-topics/expression-trees/index.md) ## See also diff --git a/docs/csharp/programming-guide/concepts/linq/filtering-data.md b/docs/csharp/programming-guide/concepts/linq/filtering-data.md index a4b7e2be5eeb7..86e1f09c3e269 100644 --- a/docs/csharp/programming-guide/concepts/linq/filtering-data.md +++ b/docs/csharp/programming-guide/concepts/linq/filtering-data.md @@ -48,6 +48,6 @@ foreach (string str in query) - [Standard Query Operators Overview (C#)](./standard-query-operators-overview.md) - [where clause](../../../language-reference/keywords/where-clause.md) - [Dynamically specify predicate filters at run time](../../../linq/dynamically-specify-predicate-filters-at-runtime.md) -- [How to query an assembly's metadata with Reflection (LINQ) (C#)](./how-to-query-an-assembly-s-metadata-with-reflection-linq.md) +- [How to query an assembly's metadata with Reflection (LINQ) (C#)](../../../advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq.md) - [How to query for files with a specified attribute or name (C#)](./how-to-query-for-files-with-a-specified-attribute-or-name.md) - [How to sort or filter text data by any word or field (LINQ) (C#)](./how-to-sort-or-filter-text-data-by-any-word-or-field-linq.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-query-an-assembly-s-metadata-with-reflection-linq.md b/docs/csharp/programming-guide/concepts/linq/how-to-query-an-assembly-s-metadata-with-reflection-linq.md deleted file mode 100644 index 943a2c2f02906..0000000000000 --- a/docs/csharp/programming-guide/concepts/linq/how-to-query-an-assembly-s-metadata-with-reflection-linq.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "How to query an assembly's metadata with Reflection (LINQ) (C#)" -description: Learn how to use LINQ with .NET reflection APIs in C# to retrieve specific metadata about methods that match a search criterion. -ms.topic: how-to -ms.date: 07/20/2015 -ms.assetid: c4cdce49-b1c8-4420-b12a-9ff7e6671368 ---- -# How to query an assembly's metadata with Reflection (LINQ) (C#) - -The .NET reflection APIs can be used to examine the metadata in a .NET assembly and create collections of types, type members, parameters, and so on that are in that assembly. Because these collections support the generic <xref:System.Collections.Generic.IEnumerable%601> interface, they can be queried by using LINQ. - -The following example shows how LINQ can be used with reflection to retrieve specific metadata about methods that match a specified search criterion. In this case, the query will find the names of all the methods in the assembly that return enumerable types such as arrays. - -## Example - -```csharp -using System; -using System.Linq; -using System.Reflection; - -class ReflectionHowTO -{ - static void Main() - { - Assembly assembly = Assembly.Load("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken= b77a5c561934e089"); - var pubTypesQuery = from type in assembly.GetTypes() - where type.IsPublic - from method in type.GetMethods() - where method.ReturnType.IsArray == true - || ( method.ReturnType.GetInterface( - typeof(System.Collections.Generic.IEnumerable<>).FullName ) != null - && method.ReturnType.FullName != "System.String" ) - group method.ToString() by type.ToString(); - - foreach (var groupOfMethods in pubTypesQuery) - { - Console.WriteLine("Type: {0}", groupOfMethods.Key); - foreach (var method in groupOfMethods) - { - Console.WriteLine(" {0}", method); - } - } - - Console.WriteLine("Press any key to exit... "); - Console.ReadKey(); - } -} -``` - -The example uses the <xref:System.Reflection.Assembly.GetTypes%2A?displayProperty=nameWithType> method to return an array of types in the specified assembly. The [where](../../../language-reference/keywords/where-clause.md) filter is applied so that only public types are returned. For each public type, a subquery is generated by using the <xref:System.Reflection.MethodInfo> array that is returned from the <xref:System.Type.GetMethods%2A?displayProperty=nameWithType> call. These results are filtered to return only those methods whose return type is an array or else a type that implements <xref:System.Collections.Generic.IEnumerable%601>. Finally, these results are grouped by using the type name as a key. - -## See also - -- [LINQ to Objects (C#)](./linq-to-objects.md) diff --git a/docs/csharp/programming-guide/concepts/expression-trees/how-to-use-expression-trees-to-build-dynamic-queries.md b/docs/csharp/programming-guide/concepts/linq/how-to-use-expression-trees-to-build-dynamic-queries.md similarity index 99% rename from docs/csharp/programming-guide/concepts/expression-trees/how-to-use-expression-trees-to-build-dynamic-queries.md rename to docs/csharp/programming-guide/concepts/linq/how-to-use-expression-trees-to-build-dynamic-queries.md index ef5ada8838dc6..390b65d57085e 100644 --- a/docs/csharp/programming-guide/concepts/expression-trees/how-to-use-expression-trees-to-build-dynamic-queries.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-use-expression-trees-to-build-dynamic-queries.md @@ -153,5 +153,5 @@ For instance, the previous example could be rewritten as follows: ## See also - [Expression Trees (C#)](./index.md) -- [How to execute expression trees (C#)](./how-to-execute-expression-trees.md) +- [Execute expression trees](../../../advanced-topics/expression-trees/expression-trees-execution.md) - [Dynamically specify predicate filters at run time](../../../linq/dynamically-specify-predicate-filters-at-runtime.md) diff --git a/docs/csharp/programming-guide/concepts/linq/index.md b/docs/csharp/programming-guide/concepts/linq/index.md index d66b009979ed5..6d4cbd73877d7 100644 --- a/docs/csharp/programming-guide/concepts/linq/index.md +++ b/docs/csharp/programming-guide/concepts/linq/index.md @@ -27,10 +27,10 @@ The following illustration from Visual Studio shows a partially-completed LINQ q - Query expressions are easy to grasp because they use many familiar C# language constructs. - The variables in a query expression are all strongly typed, although in many cases you do not have to provide the type explicitly because the compiler can infer it. For more information, see [Type relationships in LINQ query operations](type-relationships-in-linq-query-operations.md). - A query is not executed until you iterate over the query variable, for example, in a `foreach` statement. For more information, see [Introduction to LINQ queries](introduction-to-linq-queries.md). -- At compile time, query expressions are converted to Standard Query Operator method calls according to the rules set forth in the C# specification. Any query that can be expressed by using query syntax can also be expressed by using method syntax. However, in most cases query syntax is more readable and concise. For more information, see [C# language specification](~/_csharpstandard/standard/expressions.md#1118-query-expressions) and [Standard query operators overview](standard-query-operators-overview.md). +- At compile time, query expressions are converted to Standard Query Operator method calls according to the rules set forth in the C# specification. Any query that can be expressed by using query syntax can also be expressed by using method syntax. However, in most cases query syntax is more readable and concise. For more information, see [C# language specification](~/_csharpstandard/standard/expressions.md#1220-query-expressions) and [Standard query operators overview](standard-query-operators-overview.md). - As a rule when you write LINQ queries, we recommend that you use query syntax whenever possible and method syntax whenever necessary. There is no semantic or performance difference between the two different forms. Query expressions are often more readable than equivalent expressions written in method syntax. - Some query operations, such as <xref:System.Linq.Enumerable.Count%2A> or <xref:System.Linq.Enumerable.Max%2A>, have no equivalent query expression clause and must therefore be expressed as a method call. Method syntax can be combined with query syntax in various ways. For more information, see [Query syntax and method syntax in LINQ](query-syntax-and-method-syntax-in-linq.md). -- Query expressions can be compiled to expression trees or to delegates, depending on the type that the query is applied to. <xref:System.Collections.Generic.IEnumerable%601> queries are compiled to delegates. <xref:System.Linq.IQueryable> and <xref:System.Linq.IQueryable%601> queries are compiled to expression trees. For more information, see [Expression trees](../../../expression-trees.md). +- Query expressions can be compiled to expression trees or to delegates, depending on the type that the query is applied to. <xref:System.Collections.Generic.IEnumerable%601> queries are compiled to delegates. <xref:System.Linq.IQueryable> and <xref:System.Linq.IQueryable%601> queries are compiled to expression trees. For more information, see [Expression trees](/dotnet/csharp/advanced-topics/expression-trees). ## Next steps diff --git a/docs/csharp/programming-guide/concepts/linq/linq-to-objects.md b/docs/csharp/programming-guide/concepts/linq/linq-to-objects.md index 0bf22cc23f77a..6ca8579b0ad36 100644 --- a/docs/csharp/programming-guide/concepts/linq/linq-to-objects.md +++ b/docs/csharp/programming-guide/concepts/linq/linq-to-objects.md @@ -27,7 +27,7 @@ The term "LINQ to Objects" refers to the use of LINQ queries with any <xref:Syst [LINQ and Strings (C#)](./linq-and-strings.md) Explains how LINQ can be used to query and transform strings and collections of strings. Also includes links to articles that demonstrate these principles. - [LINQ and Reflection (C#)](how-to-query-an-assembly-s-metadata-with-reflection-linq.md) + [LINQ and Reflection (C#)](../../../advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq.md) Links to a sample that demonstrates how LINQ uses reflection. [LINQ and File Directories (C#)](./linq-and-file-directories.md) diff --git a/docs/csharp/programming-guide/concepts/reflection.md b/docs/csharp/programming-guide/concepts/reflection.md deleted file mode 100644 index e6c7f0cc671cd..0000000000000 --- a/docs/csharp/programming-guide/concepts/reflection.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "Reflection (C#)" -description: Reflection provides objects that describe assemblies, modules, and types in C#. If your code includes attributes, reflection enables you to access them. -ms.date: 07/20/2015 -ms.assetid: f80a2362-953b-4e8e-9759-cd5f334190d4 ---- -# Reflection (C#) - -Reflection provides objects (of type <xref:System.Type>) that describe assemblies, modules, and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties. If you are using attributes in your code, reflection enables you to access them. For more information, see [Attributes](../../../standard/attributes/index.md). - -Here's a simple example of reflection using the <xref:System.Object.GetType> method - inherited by all types from the `Object` base class - to obtain the type of a variable: - -> [!NOTE] -> Make sure you add `using System;` and `using System.Reflection;` at the top of your *.cs* file. - -```csharp -// Using GetType to obtain type information: -int i = 42; -Type type = i.GetType(); -Console.WriteLine(type); -``` - -The output is: `System.Int32`. - -The following example uses reflection to obtain the full name of the loaded assembly. - -```csharp -// Using Reflection to get information of an Assembly: -Assembly info = typeof(int).Assembly; -Console.WriteLine(info); -``` - -The output is: `System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e`. - -> [!NOTE] -> The C# keywords `protected` and `internal` have no meaning in Intermediate Language (IL) and are not used in the reflection APIs. The corresponding terms in IL are *Family* and *Assembly*. To identify an `internal` method using reflection, use the <xref:System.Reflection.MethodBase.IsAssembly%2A> property. To identify a `protected internal` method, use the <xref:System.Reflection.MethodBase.IsFamilyOrAssembly%2A>. - -## Reflection overview - -Reflection is useful in the following situations: - -- When you have to access attributes in your program's metadata. For more information, see [Retrieving Information Stored in Attributes](../../../standard/attributes/retrieving-information-stored-in-attributes.md). -- For examining and instantiating types in an assembly. -- For building new types at run time. Use classes in <xref:System.Reflection.Emit>. -- For performing late binding, accessing methods on types created at run time. See the topic [Dynamically Loading and Using Types](../../../framework/reflection-and-codedom/dynamically-loading-and-using-types.md). - -## Related sections - -For more information: - -- [Reflection](../../../framework/reflection-and-codedom/reflection.md) -- [Viewing Type Information](../../../framework/reflection-and-codedom/viewing-type-information.md) -- [Reflection and Generic Types](../../../framework/reflection-and-codedom/reflection-and-generic-types.md) -- <xref:System.Reflection.Emit> -- [Retrieving Information Stored in Attributes](../../../standard/attributes/retrieving-information-stored-in-attributes.md) - -## See also - -- [C# Programming Guide](../index.md) -- [Assemblies in .NET](../../../standard/assembly/index.md) diff --git a/docs/csharp/programming-guide/concepts/serialization/how-to-read-object-data-from-an-xml-file.md b/docs/csharp/programming-guide/concepts/serialization/how-to-read-object-data-from-an-xml-file.md deleted file mode 100644 index 2377315a9c363..0000000000000 --- a/docs/csharp/programming-guide/concepts/serialization/how-to-read-object-data-from-an-xml-file.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: "How to read object data from an XML file (C#)" -description: This C# example reads object data that was previously written to an XML file using the XmlSerializer class. -ms.date: 07/20/2015 -ms.assetid: 6ad60d96-a4d9-48e6-a8b0-d7f6f803cafa ---- -# How to read object data from an XML file (C#) - -This example reads object data that was previously written to an XML file using the <xref:System.Xml.Serialization.XmlSerializer> class. - -## Example - -```csharp -public class Book -{ - public String title; -} - -public void ReadXML() -{ - // First write something so that there is something to read ... - var b = new Book { title = "Serialization Overview" }; - var writer = new System.Xml.Serialization.XmlSerializer(typeof(Book)); - var wfile = new System.IO.StreamWriter(@"c:\temp\SerializationOverview.xml"); - writer.Serialize(wfile, b); - wfile.Close(); - - // Now we can read the serialized book ... - System.Xml.Serialization.XmlSerializer reader = - new System.Xml.Serialization.XmlSerializer(typeof(Book)); - System.IO.StreamReader file = new System.IO.StreamReader( - @"c:\temp\SerializationOverview.xml"); - Book overview = (Book)reader.Deserialize(file); - file.Close(); - - Console.WriteLine(overview.title); - -} -``` - -## Compiling the Code - -Replace the file name "c:\temp\SerializationOverview.xml" with the name of the file containing the serialized data. For more information about serializing data, see [How to write object data to an XML file (C#)](./how-to-write-object-data-to-an-xml-file.md). - - The class must have a public constructor without parameters. - - Only public properties and fields are deserialized. - -## Robust Programming - - The following conditions may cause an exception: - -- The class being serialized does not have a public, parameterless constructor. - -- The data in the file does not represent data from the class to be deserialized. - -- The file does not exist (<xref:System.IO.IOException>). - -## .NET Security - - Always verify inputs, and never deserialize data from an untrusted source. The re-created object runs on a local computer with the permissions of the code that deserialized it. Verify all inputs before using the data in your application. - -## See also - -- <xref:System.IO.StreamWriter> -- [How to write object data to an XML file (C#)](./how-to-write-object-data-to-an-xml-file.md) -- [Serialization (C#)](./index.md) -- [C# Programming Guide](../../index.md) diff --git a/docs/csharp/programming-guide/concepts/serialization/how-to-write-object-data-to-an-xml-file.md b/docs/csharp/programming-guide/concepts/serialization/how-to-write-object-data-to-an-xml-file.md deleted file mode 100644 index 9433df98bb0e5..0000000000000 --- a/docs/csharp/programming-guide/concepts/serialization/how-to-write-object-data-to-an-xml-file.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "How to write object data to an XML file (C#)" -description: This C# example writes the object from a class to an XML file using the XmlSerializer class. Learn how to compile the code. -ms.date: 07/20/2015 -ms.assetid: 7681eb98-703d-4005-a369-26a7bca0f894 ---- -# How to write object data to an XML file (C#) - -This example writes the object from a class to an XML file using the <xref:System.Xml.Serialization.XmlSerializer> class. - -## Example - -```csharp -public class XMLWrite -{ - - static void Main(string[] args) - { - WriteXML(); - } - - public class Book - { - public String title; - } - - public static void WriteXML() - { - Book overview = new Book(); - overview.title = "Serialization Overview"; - System.Xml.Serialization.XmlSerializer writer = - new System.Xml.Serialization.XmlSerializer(typeof(Book)); - - var path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "//SerializationOverview.xml"; - System.IO.FileStream file = System.IO.File.Create(path); - - writer.Serialize(file, overview); - file.Close(); - } -} -``` - -## Compiling the Code - - The class being serialized must have a public constructor without parameters. - -## Robust Programming - - The following conditions may cause an exception: - -- The class being serialized does not have a public, parameterless constructor. - -- The file exists and is read-only (<xref:System.IO.IOException>). - -- The path is too long (<xref:System.IO.PathTooLongException>). - -- The disk is full (<xref:System.IO.IOException>). - -## .NET Security - - This example creates a new file, if the file does not already exist. If an application needs to create a file, that application needs `Create` access for the folder. If the file already exists, the application needs only `Write` access, a lesser privilege. Where possible, it is more secure to create the file during deployment, and only grant `Read` access to a single file, rather than `Create` access for a folder. - -## See also - -- <xref:System.IO.StreamWriter> -- [How to read object data from an XML file (C#)](./how-to-read-object-data-from-an-xml-file.md) -- [Serialization (C#)](./index.md) diff --git a/docs/csharp/programming-guide/concepts/serialization/index.md b/docs/csharp/programming-guide/concepts/serialization/index.md deleted file mode 100644 index 32451657eabf0..0000000000000 --- a/docs/csharp/programming-guide/concepts/serialization/index.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "Serialization (C#)" -description: Serialization converts an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. -ms.date: 01/02/2020 ---- -# Serialization (C#) - -Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization. - -## How serialization works - -This illustration shows the overall process of serialization: - -![Serialization graphic](./media/index/serialization-process.gif) - -The object is serialized to a stream that carries the data. The stream may also have information about the object's type, such as its version, culture, and assembly name. From that stream, the object can be stored in a database, a file, or memory. - -### Uses for serialization - -Serialization allows the developer to save the state of an object and re-create it as needed, providing storage of objects as well as data exchange. Through serialization, a developer can perform actions such as: - -* Sending the object to a remote application by using a web service -* Passing an object from one domain to another -* Passing an object through a firewall as a JSON or XML string -* Maintaining security or user-specific information across applications - -## JSON serialization - -The <xref:System.Text.Json> namespace contains classes for JavaScript Object Notation (JSON) serialization and deserialization. JSON is an open standard that is commonly used for sharing data across the web. - -JSON serialization serializes the public properties of an object into a string, byte array, or stream that conforms to [the RFC 8259 JSON specification](https://tools.ietf.org/html/rfc8259). To control the way <xref:System.Text.Json.JsonSerializer> serializes or deserializes an instance of the class, you can use one or more of the following approaches: - -* Use a <xref:System.Text.Json.JsonSerializerOptions> object -* Apply attributes from the <xref:System.Text.Json.Serialization> namespace to classes or properties -* [Customize the contract](../../../../standard/serialization/system-text-json/custom-contracts.md) -* [Implement custom converters](../../../../standard/serialization/system-text-json/converters-how-to.md) - -## Binary and XML serialization - -The <xref:System.Runtime.Serialization> namespace contains classes for binary and XML serialization and deserialization. - -Binary serialization uses binary encoding to produce compact serialization for uses such as storage or socket-based network streams. In binary serialization, all members, even members that are read-only, are serialized, and performance is enhanced. - -[!INCLUDE [binary-serialization-warning](~/includes/binary-serialization-warning.md)] - -XML serialization serializes the public fields and properties of an object, or the parameters and return values of methods, into an XML stream that conforms to a specific XML Schema definition language (XSD) document. XML serialization results in strongly typed classes with public properties and fields that are converted to XML. <xref:System.Xml.Serialization> contains classes for serializing and deserializing XML. You apply attributes to classes and class members to control the way the <xref:System.Xml.Serialization.XmlSerializer> serializes or deserializes an instance of the class. - -### Making an object serializable - -For binary or XML serialization, you need: - -* The object to serialize -* A stream to contain the serialized object -* A <xref:System.Runtime.Serialization.Formatter?displayProperty=fullName> instance - -Apply the <xref:System.SerializableAttribute> attribute to a type to indicate that instances of the type can be serialized. An exception is thrown if you attempt to serialize but the type doesn't have the <xref:System.SerializableAttribute> attribute. - -To prevent a field from being serialized, apply the <xref:System.NonSerializedAttribute> attribute. If a field of a serializable type contains a pointer, a handle, or some other data structure that is specific to a particular environment, and the field cannot be meaningfully reconstituted in a different environment, then you may want to make it nonserializable. - -If a serialized class contains references to objects of other classes that are marked <xref:System.SerializableAttribute>, those objects will also be serialized. - -### Basic and custom serialization - -Binary and XML serialization can be performed in two ways, basic and custom. - -Basic serialization uses .NET to automatically serialize the object. The only requirement is that the class has the <xref:System.SerializableAttribute> attribute applied. The <xref:System.NonSerializedAttribute> can be used to keep specific fields from being serialized. - -When you use basic serialization, the versioning of objects may create problems. You would use custom serialization when versioning issues are important. Basic serialization is the easiest way to perform serialization, but it does not provide much control over the process. - -In custom serialization, you can specify exactly which objects will be serialized and how it will be done. The class must be marked <xref:System.SerializableAttribute> and implement the <xref:System.Runtime.Serialization.ISerializable> interface. If you want your object to be deserialized in a custom manner as well, use a custom constructor. - -## Designer serialization - -Designer serialization is a special form of serialization that involves the kind of object persistence associated with development tools. Designer serialization is the process of converting an object graph into a source file that can later be used to recover the object graph. A source file can contain code, markup, or even SQL table information. - -## <a name="BKMK_RelatedTopics"></a> Related articles - -[System.Text.Json overview](../../../../standard/serialization/system-text-json/overview.md)\ -Shows how to get the `System.Text.Json` library. - -[How to serialize and deserialize JSON in .NET](../../../../standard/serialization/system-text-json/how-to.md)\ -Shows how to read and write object data to and from JSON using the <xref:System.Text.Json.JsonSerializer> class. - -[Walkthrough: Persisting an Object in Visual Studio (C#)](walkthrough-persisting-an-object-in-visual-studio.md)\ -Demonstrates how serialization can be used to persist an object's data between instances, allowing you to store values and retrieve them the next time the object is instantiated. - -[How to read object data from an XML file (C#)](how-to-read-object-data-from-an-xml-file.md)\ -Shows how to read object data that was previously written to an XML file using the <xref:System.Xml.Serialization.XmlSerializer> class. - -[How to write object data to an XML file (C#)](how-to-write-object-data-to-an-xml-file.md)\ -Shows how to write the object from a class to an XML file using the <xref:System.Xml.Serialization.XmlSerializer> class. diff --git a/docs/csharp/programming-guide/concepts/serialization/media/index/serialization-process.gif b/docs/csharp/programming-guide/concepts/serialization/media/index/serialization-process.gif deleted file mode 100644 index c7ac7c709b31a..0000000000000 Binary files a/docs/csharp/programming-guide/concepts/serialization/media/index/serialization-process.gif and /dev/null differ diff --git a/docs/csharp/programming-guide/concepts/serialization/walkthrough-persisting-an-object-in-visual-studio.md b/docs/csharp/programming-guide/concepts/serialization/walkthrough-persisting-an-object-in-visual-studio.md deleted file mode 100644 index 139da4810a25e..0000000000000 --- a/docs/csharp/programming-guide/concepts/serialization/walkthrough-persisting-an-object-in-visual-studio.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "Walkthrough: Persisting an Object using C#" -description: This example creates a basic Loan object in C# and persists its data to a file, then creates a new object with data from the file. -ms.date: 12/30/2022 ---- -# Walkthrough: Persist an object using C\# - -You can use JSON serialization to persist an object's data between instances, which enables you to store values and retrieve them the next time that the object is instantiated. - -In this walkthrough, you'll create a basic `Loan` object and persist its data to a JSON file. You'll then retrieve the data from the file when you re-create the object. - -> [!IMPORTANT] -> This example creates a new file if the file does not already exist. If an application must create a file, that application must have `Create` permission for the folder. Permissions are set by using access control lists. If the file already exists, the application needs only `Write` permission, a lesser permission. Where possible, it's more secure to create the file during deployment and only grant `Read` permissions to a single file (instead of `Create` permissions for a folder). Also, it's more secure to write data to user folders than to the root folder or the *Program Files* folder. - -> [!IMPORTANT] -> This example stores data in a JSON file. You should not store sensitive data, such as passwords or credit-card information, in a JSON file. - -## Prerequisites - -- To build and run, install the [.NET SDK](https://dotnet.microsoft.com/download). -- Install your favorite code editor, if you haven't already. - - > [!TIP] - > Need to install a code editor? Try [Visual Studio](https://visualstudio.com/downloads)! - -You can examine the sample code online [at the .NET samples GitHub repository](https://github.com/dotnet/samples/tree/main/csharp/serialization). - -## Define the loan type - -The first step is to create a `Loan` class and a console application that uses the class: - -1. Create a new application. At a command prompt, enter `dotnet new console -o serialization` to create a new console application in a subdirectory named `serialization`. -1. Open the application in your editor, and add a new class named `Loan.cs`. -1. Add the following code to your `Loan` class: - - [!code-csharp[Loan class definition](../../../../../samples/snippets/csharp/serialization/Loan.cs#1)] - -## Instantiate a loan object - -1. Open *Program.cs* and add the following code: - - [!code-csharp[Create a loan object](../../../../../samples/snippets/csharp/serialization/Program.cs#1)] - -2. Add an event handler for the `PropertyChanged` event, and a few lines to modify the `Loan` object and display the changes. You can see the additions in the following code: - - [!code-csharp[Listening for the PropertyChanged event](../../../../../samples/snippets/csharp/serialization/Program.cs#2)] - -At this point, you can run the code and see the current output: - -```console -New customer value: Henry Clay -7.5 -7.1 -``` - -Running this application repeatedly always writes the same values. A new `Loan` object is created every time you run the program. In the real world, interest rates change periodically, but not necessarily every time that the application is run. Serialization code means you preserve the most recent interest rate between instances of the application. In the next step, you'll do just that by adding serialization to the `Loan` class. - -## Use serialization to persist the object - -To serialize an object using <xref:System.Text.Json?displayProperty=fullName> serialization, you don't need to add any special attributes to the type. By default, all public properties are serialized and all fields are ignored. However, you can annotate properties to ignore or specify that fields should be included. - -The following code adds a `TimeLastLoaded` property and marks it with the <xref:System.Text.Json.Serialization.JsonIgnoreAttribute> attribute to exclude it from serialization: - -[!code-csharp[Disable serialization for an auto-implemented property](../../../../../samples/snippets/csharp/serialization/Loan.cs#2)] - -1. To serialize the class and write it to a file, you use the <xref:System.IO?displayProperty=fullName> and <xref:System.Text.Json?displayProperty=fullName> namespaces. To avoid typing the fully qualified names, you can add references to the necessary namespaces as shown in the following code: - - [!code-csharp[Adding namespaces for serialization](../../../../../samples/snippets/csharp/serialization/Program.cs#3)] - -2. Add code to deserialize the object from the file when the object is created. Add a constant to the class for the serialized data's file name as shown in the following code: - - [!code-csharp[Define the name of the saved file](../../../../../samples/snippets/csharp/serialization/Program.cs#4)] - - Next, add the following code after the line that creates the `TestLoan` object. This code first checks that the file exists. If it exists, it reads the text from the file, and then deserialize it using the <xref:System.Text.Json.JsonSerializer.Deserialize%60%601(System.String,System.Text.Json.JsonSerializerOptions)?displayProperty=nameWithType> method. - - [!code-csharp[Read from a file if it exists](../../../../../samples/snippets/csharp/serialization/Program.cs#5)] - -3. Next, add code to serialize the class to a file using the <xref:System.Text.Json.JsonSerializer.Serialize%60%601(%60%600,System.Text.Json.JsonSerializerOptions)?displayProperty=nameWithType> method. Add the following code to the end of the file: - - [!code-csharp[Save the existing Loan object](../../../../../samples/snippets/csharp/serialization/Program.cs#6)] - -At this point, you can again build and run the application. The first time it runs, notice that the interest rates starts at 7.5, and then changes to 7.1. Close the application and then run it again. Now, the application prints the message that it has read the saved file, and the interest rate is 7.1 even before the code that changes it. - -## See also - -- [Serialization (C#)](index.md) -- [C# Programming Guide](../../index.md) -- [How to serialize and deserialize JSON in .NET](../../../../standard/serialization/system-text-json/how-to.md) diff --git a/docs/csharp/programming-guide/events/index.md b/docs/csharp/programming-guide/events/index.md index acd30f889c461..0087cd5164596 100644 --- a/docs/csharp/programming-guide/events/index.md +++ b/docs/csharp/programming-guide/events/index.md @@ -46,7 +46,7 @@ In a typical C# Windows Forms or Web application, you subscribe to events raised ## C# Language Specification -For more information, see [Events](~/_csharpstandard/standard/classes.md#148-events) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +For more information, see [Events](~/_csharpstandard/standard/classes.md#158-events) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. ## See also diff --git a/docs/csharp/programming-guide/file-system/how-to-copy-delete-and-move-files-and-folders.md b/docs/csharp/programming-guide/file-system/how-to-copy-delete-and-move-files-and-folders.md deleted file mode 100644 index acfd53d8bb26b..0000000000000 --- a/docs/csharp/programming-guide/file-system/how-to-copy-delete-and-move-files-and-folders.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: "How to copy, delete, and move files and folders - C# Programming Guide" -description: Learn how to copy, delete, and move files and folders using the File, Directory, FileInfo, and DirectoryInfo classes. -ms.date: 07/20/2015 -ms.topic: how-to -helpviewer_keywords: - - "I/O [C#]" -ms.assetid: 62e52cd7-9597-4e4a-acf9-1315f5cdbf05 ---- -# How to copy, delete, and move files and folders (C# Programming Guide) - -The following examples show how to copy, move, and delete files and folders in a synchronous manner by using the <xref:System.IO.File?displayProperty=nameWithType>, <xref:System.IO.Directory?displayProperty=nameWithType>, <xref:System.IO.FileInfo?displayProperty=nameWithType>, and <xref:System.IO.DirectoryInfo?displayProperty=nameWithType> classes from the <xref:System.IO?displayProperty=nameWithType> namespace. These examples do not provide a progress bar or any other user interface. If you want to provide a standard progress dialog box, see [How to provide a progress dialog box for file operations](how-to-provide-a-progress-dialog-box-for-file-operations.md). - - Use <xref:System.IO.FileSystemWatcher?displayProperty=nameWithType> to provide events that will enable you to calculate the progress when operating on multiple files. Another approach is to use platform invoke to call the relevant file-related methods in the Windows Shell. For information about how to perform these file operations asynchronously, see [Asynchronous File I/O](../../../standard/io/asynchronous-file-i-o.md). - -## Examples - - The following example shows how to copy files and directories. - - [!code-csharp[csFilesandFolders#7](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs#7)] - - The following example shows how to move files and directories. - - [!code-csharp[csFilesandFolders#8](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs#8)] - - The following example shows how to delete files and directories. - - [!code-csharp[csFilesandFolders#9](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs#9)] - -## See also - -- <xref:System.IO?displayProperty=nameWithType> -- [C# Programming Guide](../index.md) -- [File System and the Registry (C# Programming Guide)](index.md) -- [How to provide a progress dialog box for file operations](how-to-provide-a-progress-dialog-box-for-file-operations.md) -- [File and Stream I/O](../../../standard/io/index.md) -- [Common I/O Tasks](../../../standard/io/common-i-o-tasks.md) diff --git a/docs/csharp/programming-guide/file-system/how-to-create-a-file-or-folder.md b/docs/csharp/programming-guide/file-system/how-to-create-a-file-or-folder.md deleted file mode 100644 index 55c90358a03d0..0000000000000 --- a/docs/csharp/programming-guide/file-system/how-to-create-a-file-or-folder.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "How to create a file or folder - C# Programming Guide" -description: Learn how to create a file or folder programmatically. You can create a folder, a subfolder, a file in the subfolder, and write data to that file. -ms.date: 07/20/2015 -ms.topic: how-to -helpviewer_keywords: - - "folders [C#]" - - "creating files [C#]" - - "files [C#]" - - "creating folders [C#]" -ms.assetid: 4582ee2d-d72d-4687-bcb9-08d336c62c25 ---- -# How to create a file or folder (C# Programming Guide) - -You can programmatically create a folder on your computer, create a subfolder, create a file in the subfolder, and write data to the file. - -## Example - - [!code-csharp[csFilesandFolders#10](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs#10)] - - If the folder already exists, <xref:System.IO.Directory.CreateDirectory%2A> does nothing, and no exception is thrown. However, <xref:System.IO.File.Create%2A?displayProperty=nameWithType> replaces an existing file with a new file. The example uses an `if`-`else` statement to prevent an existing file from being replaced. - - By making the following changes in the example, you can specify different outcomes based on whether a file with a certain name already exists. If such a file doesn't exist, the code creates one. If such a file exists, the code appends data to that file. - -- Specify a non-random file name. - - ```csharp - // Comment out the following line. - //string fileName = System.IO.Path.GetRandomFileName(); - - // Replace that line with the following assignment. - string fileName = "MyNewFile.txt"; - ``` - -- Replace the `if`-`else` statement with the `using` statement in the following code. - - ```csharp - using (System.IO.FileStream fs = new System.IO.FileStream(pathString, FileMode.Append)) - { - for (byte i = 0; i < 100; i++) - { - fs.WriteByte(i); - } - } - ``` - - Run the example several times to verify that data is added to the file each time. - - For more `FileMode` values that you can try, see <xref:System.IO.FileMode>. - - The following conditions may cause an exception: - -- The folder name is malformed. For example, it contains illegal characters or is only white space (<xref:System.ArgumentException> class). Use the <xref:System.IO.Path> class to create valid path names. - -- The parent folder of the folder to be created is read-only (<xref:System.IO.IOException> class). - -- The folder name is `null` (<xref:System.ArgumentNullException> class). - -- The folder name is too long (<xref:System.IO.PathTooLongException> class). - -- The folder name is only a colon, ":" (<xref:System.IO.PathTooLongException> class). - -## .NET Security - - An instance of the <xref:System.Security.SecurityException> class may be thrown in partial-trust situations. - - If you don't have permission to create the folder, the example throws an instance of the <xref:System.UnauthorizedAccessException> class. - -## See also - -- <xref:System.IO?displayProperty=nameWithType> -- [C# Programming Guide](../index.md) -- [File System and the Registry (C# Programming Guide)](./index.md) diff --git a/docs/csharp/programming-guide/file-system/how-to-create-a-key-in-the-registry.md b/docs/csharp/programming-guide/file-system/how-to-create-a-key-in-the-registry.md deleted file mode 100644 index 3807a79d4c9a6..0000000000000 --- a/docs/csharp/programming-guide/file-system/how-to-create-a-key-in-the-registry.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "How to create a key in the registry - C# Programming Guide" -description: Learn how to create a key in the registry. See a code example, compiling instructions, and additional available resources. -ms.topic: how-to -ms.date: 07/20/2015 -helpviewer_keywords: - - "registry, adding keys and values [C#]" - - "registry keys, creating [C#]" - - "keys, creating in registry" -ms.assetid: 8fa475b0-e01f-483a-9327-fd03488fdf5d ---- -# How to create a key in the registry (C# Programming Guide) - -This example adds the value pair, "Name" and "Isabella", to the current user's registry, under the key "Names". - -## Example - -```csharp -Microsoft.Win32.RegistryKey key; -key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Names"); -key.SetValue("Name", "Isabella"); -key.Close(); -``` - -## Compiling the Code - -- Copy the code and paste it into the `Main` method of a console application. - -- Replace the `Names` parameter with the name of a key that exists directly under the HKEY_CURRENT_USER node of the registry. - -- Replace the `Name` parameter with the name of a value that exists directly under the Names node. - -## Robust Programming - - Examine the registry structure to find a suitable location for your key. For example, you might want to open the Software key of the current user, and create a key with your company's name. Then add the registry values to your company's key. - - The following conditions might cause an exception: - -- The name of the key is null. - -- The user does not have permissions to create registry keys. - -- The key name exceeds the 255-character limit. - -- The key is closed. - -- The registry key is read-only. - -## .NET Security - - It is more secure to write data to the user folder — `Microsoft.Win32.Registry.CurrentUser` — rather than to the local computer — `Microsoft.Win32.Registry.LocalMachine`. - - When you create a registry value, you need to decide what to do if that value already exists. Another process, perhaps a malicious one, may have already created the value and have access to it. When you put data in the registry value, the data is available to the other process. To prevent this, use the.`Overload:Microsoft.Win32.RegistryKey.GetValue` method. It returns null if the key does not already exist. - - It is not secure to store secrets, such as passwords, in the registry as plain text, even if the registry key is protected by access control lists (ACL). - -## See also - -- <xref:System.IO?displayProperty=nameWithType> -- [C# Programming Guide](../index.md) -- [File System and the Registry (C# Programming Guide)](./index.md) -- [Read, write and delete from the registry with C#](https://www.codeproject.com/Articles/3389/Read-write-and-delete-from-registry-with-C) diff --git a/docs/csharp/programming-guide/file-system/how-to-get-information-about-files-folders-and-drives.md b/docs/csharp/programming-guide/file-system/how-to-get-information-about-files-folders-and-drives.md deleted file mode 100644 index b48251eca1fad..0000000000000 --- a/docs/csharp/programming-guide/file-system/how-to-get-information-about-files-folders-and-drives.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "How to get information about files, folders, and drives - C# Programming Guide" -description: Learn how to get information about files, folders, and drives. See a code example and additional available resources. -ms.date: 07/20/2015 -ms.topic: how-to -helpviewer_keywords: - - "files [C#], getting information about" -ms.assetid: 22fc2da6-5494-405b-995e-c0b99142a93e ---- -# How to get information about files, folders, and drives (C# Programming Guide) - -In .NET, you can access file system information by using the following classes: - -- <xref:System.IO.FileInfo?displayProperty=nameWithType> - -- <xref:System.IO.DirectoryInfo?displayProperty=nameWithType> - -- <xref:System.IO.DriveInfo?displayProperty=nameWithType> - -- <xref:System.IO.Directory?displayProperty=nameWithType> - -- <xref:System.IO.File?displayProperty=nameWithType> - - The <xref:System.IO.FileInfo> and <xref:System.IO.DirectoryInfo> classes represent a file or directory and contain properties that expose many of the file attributes that are supported by the NTFS file system. They also contain methods for opening, closing, moving, and deleting files and folders. You can create instances of these classes by passing a string that represents the name of the file, folder, or drive in to the constructor: - -```csharp -System.IO.DriveInfo di = new System.IO.DriveInfo(@"C:\"); -``` - - You can also obtain the names of files, folders, or drives by using calls to <xref:System.IO.DirectoryInfo.GetDirectories%2A?displayProperty=nameWithType>, <xref:System.IO.DirectoryInfo.GetFiles%2A?displayProperty=nameWithType>, and <xref:System.IO.DriveInfo.RootDirectory%2A?displayProperty=nameWithType>. - - The <xref:System.IO.Directory?displayProperty=nameWithType> and <xref:System.IO.File?displayProperty=nameWithType> classes provide static methods for retrieving information about directories and files. - -## Example - - The following example shows various ways to access information about files and folders. - - [!code-csharp[csFilesandFolders#6](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs#6)] - -## Robust Programming - - When you process user-specified path strings, you should also handle exceptions for the following conditions: - -- The file name is malformed. For example, it contains invalid characters or only white space. - -- The file name is null. - -- The file name is longer than the system-defined maximum length. - -- The file name contains a colon (:). - - If the application does not have sufficient permissions to read the specified file, the `Exists` method returns `false` regardless of whether a path exists; the method does not throw an exception. - -## See also - -- <xref:System.IO?displayProperty=nameWithType> -- [C# Programming Guide](../index.md) -- [File System and the Registry (C# Programming Guide)](./index.md) diff --git a/docs/csharp/programming-guide/file-system/how-to-iterate-through-a-directory-tree.md b/docs/csharp/programming-guide/file-system/how-to-iterate-through-a-directory-tree.md deleted file mode 100644 index 6fcb051a998e5..0000000000000 --- a/docs/csharp/programming-guide/file-system/how-to-iterate-through-a-directory-tree.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "How to iterate through a directory tree - C# Programming Guide" -description: Learn how to iterate through a directory tree. Access each file in each nested subdirectory under a specified root folder. -ms.date: 07/20/2015 -ms.topic: how-to -helpviewer_keywords: - - "iterating through folders [C#]" - - "file iteration [C#]" -ms.assetid: c4be4a75-6b1b-46a7-9d38-bab353091ed7 ---- -# How to iterate through a directory tree (C# Programming Guide) - -The phrase "iterate a directory tree" means to access each file in each nested subdirectory under a specified root folder, to any depth. You do not necessarily have to open each file. You can just retrieve the name of the file or subdirectory as a `string`, or you can retrieve additional information in the form of a <xref:System.IO.FileInfo?displayProperty=nameWithType> or <xref:System.IO.DirectoryInfo?displayProperty=nameWithType> object. - -> [!NOTE] -> In Windows, the terms "directory" and "folder" are used interchangeably. Most documentation and user interface text uses the term "folder," but .NET class libraries use the term "directory." - - In the simplest case, in which you know for certain that you have access permissions for all directories under a specified root, you can use the `System.IO.SearchOption.AllDirectories` flag. This flag returns all the nested subdirectories that match the specified pattern. The following example shows how to use this flag. - -```csharp -root.GetDirectories("*.*", System.IO.SearchOption.AllDirectories); -``` - - The weakness in this approach is that if any one of the subdirectories under the specified root causes a <xref:System.IO.DirectoryNotFoundException> or <xref:System.UnauthorizedAccessException>, the whole method fails and returns no directories. The same is true when you use the <xref:System.IO.DirectoryInfo.GetFiles%2A> method. If you have to handle these exceptions on specific subfolders, you must manually walk the directory tree, as shown in the following examples. - - When you manually walk a directory tree, you can handle the files first (*pre-order traversal*), or the subdirectories first (*post-order traversal*). If you perform a pre-order traversal, you visit files directly under that folder itself, and then walk the whole tree under the current folder. Post-order traversal is the other way around, walking the whole tree beneath before getting to the current folder's files. The examples later in this document perform pre-order traversal, but you can easily modify them to perform post-order traversal. - - Another option is whether to use recursion or a stack-based traversal. The examples later in this document show both approaches. - - If you have to perform a variety of operations on files and folders, you can modularize these examples by refactoring the operation into separate functions that you can invoke by using a single delegate. - -> [!NOTE] -> NTFS file systems can contain *reparse points* in the form of *junction points*, *symbolic links*, and *hard links*. .NET methods such as <xref:System.IO.DirectoryInfo.GetFiles%2A> and <xref:System.IO.DirectoryInfo.GetDirectories%2A> will not return any subdirectories under a reparse point. This behavior guards against the risk of entering into an infinite loop when two reparse points refer to each other. In general, you should use extreme caution when you deal with reparse points to ensure that you do not unintentionally modify or delete files. If you require precise control over reparse points, use platform invoke or native code to call the appropriate Win32 file system methods directly. - -## Examples - - The following example shows how to walk a directory tree by using recursion. The recursive approach is elegant but has the potential to cause a stack overflow exception if the directory tree is large and deeply nested. - - The particular exceptions that are handled, and the particular actions that are performed on each file or folder, are provided as examples only. You should modify this code to meet your specific requirements. See the comments in the code for more information. - - [!code-csharp[csFilesandFolders#1](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs#1)] - - The following example shows how to iterate through files and folders in a directory tree without using recursion. This technique uses the generic <xref:System.Collections.Generic.Stack%601> collection type, which is a last in first out (LIFO) stack. - - The particular exceptions that are handled, and the particular actions that are performed on each file or folder, are provided as examples only. You should modify this code to meet your specific requirements. See the comments in the code for more information. - - [!code-csharp[csFilesandFolders#2](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs#2)] - - It is generally too time-consuming to test every folder to determine whether your application has permission to open it. Therefore, the code example just encloses that part of the operation in a `try/catch` block. You can modify the `catch` block so that when you are denied access to a folder, you try to elevate your permissions and then access it again. As a rule, only catch those exceptions that you can handle without leaving your application in an unknown state. - - If you must store the contents of a directory tree, either in memory or on disk, the best option is to store only the <xref:System.IO.FileSystemInfo.FullName%2A> property (of type `string`) for each file. You can then use this string to create a new <xref:System.IO.FileInfo> or <xref:System.IO.DirectoryInfo> object as necessary, or open any file that requires additional processing. - -## Robust Programming - - Robust file iteration code must take into account many complexities of the file system. For more information on the Windows file system, see [NTFS overview](/windows-server/storage/file-server/ntfs-overview). - -## See also - -- <xref:System.IO> -- [LINQ and File Directories](../concepts/linq/linq-and-file-directories.md) -- [File System and the Registry (C# Programming Guide)](./index.md) diff --git a/docs/csharp/programming-guide/file-system/how-to-provide-a-progress-dialog-box-for-file-operations.md b/docs/csharp/programming-guide/file-system/how-to-provide-a-progress-dialog-box-for-file-operations.md deleted file mode 100644 index 04e86b7206b67..0000000000000 --- a/docs/csharp/programming-guide/file-system/how-to-provide-a-progress-dialog-box-for-file-operations.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "How to provide a progress dialog box for file operations - C# Programming Guide" -description: Learn how to provide a progress dialog box for file operations using the CopyFile (String, String, UIOption) method. -ms.date: 07/20/2015 -ms.topic: how-to -helpviewer_keywords: - - "progress dialog [C#]" -ms.assetid: 01b71fe7-8178-4dc8-aeb1-12053be7b51c ---- -# How to provide a progress dialog box for file operations (C# Programming Guide) - -You can provide a standard dialog box that shows progress on file operations in Windows if you use the <xref:Microsoft.VisualBasic.FileIO.FileSystem.CopyFile%28System.String%2CSystem.String%2CMicrosoft.VisualBasic.FileIO.UIOption%29> method in the <xref:Microsoft.VisualBasic?displayProperty=nameWithType> namespace. - -[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] - -### To add a reference in Visual Studio - -1. On the menu bar, choose **Project**, **Add Reference**. - - The **Reference Manager** dialog box appears. - -2. In the **Assemblies** area, choose **Framework** if it isn’t already chosen. - -3. In the list of names, select the **Microsoft.VisualBasic** check box, and then choose the **OK** button to close the dialog box. - -## Example - - The following code copies the directory that `sourcePath` specifies into the directory that `destinationPath` specifies. This code also provides a standard dialog box that shows the estimated amount of time remaining before the operation finishes. - - [!code-csharp[csFilesandFolders#11](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs#11)] - -## See also - -- [File System and the Registry (C# Programming Guide)](./index.md) diff --git a/docs/csharp/programming-guide/file-system/how-to-read-a-text-file-one-line-at-a-time.md b/docs/csharp/programming-guide/file-system/how-to-read-a-text-file-one-line-at-a-time.md deleted file mode 100644 index 8a53da10d9b5f..0000000000000 --- a/docs/csharp/programming-guide/file-system/how-to-read-a-text-file-one-line-at-a-time.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "How to read a text file one line at a time - C# Programming Guide" -description: Learn how to read a text file one line at a time. See a code example and view additional available resources. -ms.date: 07/20/2015 -ms.topic: how-to -helpviewer_keywords: - - "ReadLine method [C#]" - - "reading text files, line by line" - - "text files [C#]" -ms.assetid: d62e22c5-a13c-48db-af9b-f10c801b0cb1 ---- -# How to read a text file one line at a time (C# Programming Guide) - -This example reads the contents of a text file, one line at a time, into a string using the `ReadLines` method of the `File` class. Each text line is stored into the string `line` and displayed on the screen. - -## Example - -```csharp -int counter = 0; - -// Read the file and display it line by line. -foreach (string line in System.IO.File.ReadLines(@"c:\test.txt")) -{ - System.Console.WriteLine(line); - counter++; -} - -System.Console.WriteLine("There were {0} lines.", counter); -// Suspend the screen. -System.Console.ReadLine(); -``` - -## Compiling the Code - - Copy the code and paste it into the `Main` method of a console application. - - Replace `"c:\test.txt"` with the actual file name. - -## Robust Programming - - The following conditions may cause an exception: - -- The file may not exist. - -## .NET Security - - Do not make decisions about the contents of the file based on the name of the file. For example, the file `myFile.cs` may not be a C# source file. - -## See also - -- <xref:System.IO?displayProperty=nameWithType> -- [C# Programming Guide](../index.md) -- [File System and the Registry (C# Programming Guide)](./index.md) diff --git a/docs/csharp/programming-guide/file-system/how-to-read-from-a-text-file.md b/docs/csharp/programming-guide/file-system/how-to-read-from-a-text-file.md deleted file mode 100644 index a2afa277067ab..0000000000000 --- a/docs/csharp/programming-guide/file-system/how-to-read-from-a-text-file.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "How to read from a text file - C# Programming Guide" -description: Learn how to read from a text file using static methods from the File class. See a code example and view additional available resources. -ms.date: 07/20/2015 -ms.topic: how-to -f1_keywords: - - "StreamReader.ReadToEnd" -helpviewer_keywords: - - "text files, writing to" - - "reading text files" - - "reading data, text files" - - "text files, reading" -ms.assetid: 92246c5b-e819-4eea-9370-1a9460e12de3 ---- -# How to read from a text file (C# Programming Guide) - -This example reads the contents of a text file by using the static methods <xref:System.IO.File.ReadAllText%2A> and <xref:System.IO.File.ReadAllLines%2A> from the <xref:System.IO.File?displayProperty=nameWithType> class. - -For an example that uses <xref:System.IO.StreamReader>, see [How to read a text file one line at a time](./how-to-read-a-text-file-one-line-at-a-time.md). - -> [!NOTE] -> The files that are used in this example are created in the topic [How to write to a text file](./how-to-write-to-a-text-file.md). - -## Example - - [!code-csharp[csFilesandFolders#4](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs#4)] - -## Compiling the Code - - Copy the code and paste it into a C# console application. - -If you are not using the text files from [How to write to a text file](./how-to-write-to-a-text-file.md), replace the argument to `ReadAllText` and `ReadAllLines` with the appropriate path and file name on your computer. - -## Robust Programming - - The following conditions may cause an exception: - -- The file doesn't exist or doesn't exist at the specified location. Check the path and the spelling of the file name. - -## .NET Security - - Do not rely on the name of a file to determine the contents of the file. For example, the file `myFile.cs` might not be a C# source file. - -## See also - -- <xref:System.IO?displayProperty=nameWithType> -- [C# Programming Guide](../index.md) -- [File System and the Registry (C# Programming Guide)](./index.md) diff --git a/docs/csharp/programming-guide/file-system/how-to-write-to-a-text-file.md b/docs/csharp/programming-guide/file-system/how-to-write-to-a-text-file.md deleted file mode 100644 index 3825e0cba1bac..0000000000000 --- a/docs/csharp/programming-guide/file-system/how-to-write-to-a-text-file.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "How to write to a text file - C# Programming Guide" -description: Learn how to write a text file with C#. See several code examples and view additional available resources. -ms.date: 02/11/2021 -ms.topic: how-to -f1_keywords: - - "TextWriter.WriteLine" - - "StreamWriter.Close" -helpviewer_keywords: - - "files [C#], text files" - - "text, writing to files [C#]" -ms.assetid: 2e99f184-d88b-4719-a7f1-d9ec482aa809 -ms.custom: contperf-fy21q3 ---- - -# How to write to a text file (C# Programming Guide) - -In this article, there are several examples showing various ways to write text to a file. The first two examples use static convenience methods on the <xref:System.IO.File?displayProperty=nameWithType> class to write each element of any `IEnumerable<string>` and a `string` to a text file. The third example shows how to add text to a file when you have to process each line individually as you write to the file. In the first three examples, you overwrite all existing content in the file. The final example shows how to append text to an existing file. - - These examples all write string literals to files. If you want to format text written to a file, use the <xref:System.String.Format%2A> method or C# [string interpolation](../../language-reference/tokens/interpolated.md) feature. - -## Write a collection of strings to a file - -:::code language="csharp" source="snippets/write-text/WriteAllLines.cs"::: - -The preceding source code example: - -- Instantiates a string array with three values. -- Awaits a call to <xref:System.IO.File.WriteAllLinesAsync%2A?displayProperty=nameWithType> which: - - - Asynchronously creates a file name *WriteLines.txt*. If the file already exists, it is overwritten. - - Writes the given lines to the file. - - Closes the file, automatically flushing and disposing as needed. - -## Write one string to a file - -:::code language="csharp" source="snippets/write-text/WriteAllText.cs"::: - -The preceding source code example: - -- Instantiates a string given the assigned string literal. -- Awaits a call to <xref:System.IO.File.WriteAllTextAsync%2A?displayProperty=nameWithType> which: - - - Asynchronously creates a file name *WriteText.txt*. If the file already exists, it is overwritten. - - Writes the given text to the file. - - Closes the file, automatically flushing and disposing as needed. - -## Write selected strings from an array to a file - -:::code language="csharp" source="snippets/write-text/StreamWriterOne.cs"::: - -The preceding source code example: - -- Instantiates a string array with three values. -- Instantiates a <xref:System.IO.StreamWriter> with a file path of *WriteLines2.txt* as a [using declaration](../../language-reference/keywords/using-statement.md). -- Iterates through all the lines. -- Conditionally awaits a call to <xref:System.IO.StreamWriter.WriteLineAsync(System.String)?displayProperty=nameWithType>, which writes the line to the file when the line doesn't contain `"Second"`. - -## Append text to an existing file - -:::code language="csharp" source="snippets/write-text/StreamWriterTwo.cs"::: - -The preceding source code example: - -- Instantiates a string array with three values. -- Instantiates a <xref:System.IO.StreamWriter> with a file path of *WriteLines2.txt* as a [using declaration](../../language-reference/keywords/using-statement.md), passing in `true` to append. -- Awaits a call to <xref:System.IO.StreamWriter.WriteLineAsync(System.String)?displayProperty=nameWithType>, which writes the string to the file as an appended line. - -## Exceptions - -The following conditions may cause an exception: - -- <xref:System.InvalidOperationException>: The file exists and is read-only. -- <xref:System.IO.PathTooLongException>: The path name may be too long. -- <xref:System.IO.IOException>: The disk may be full. - -There are additional conditions that may cause exceptions when working with the file system, it is best to program defensively. - -## See also - -- [C# Programming Guide](../index.md) -- [File System and the Registry (C# Programming Guide)](./index.md) diff --git a/docs/csharp/programming-guide/file-system/index.md b/docs/csharp/programming-guide/file-system/index.md deleted file mode 100644 index caabec85953e1..0000000000000 --- a/docs/csharp/programming-guide/file-system/index.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "File system and the registry - C# Programming Guide" -description: View articles that show how to use C# and .NET to perform basic operations on files, folders, and the registry. -ms.date: 07/20/2015 -helpviewer_keywords: - - "file system [C#]" - - "registry [C#]" - - "files [C#]" -ms.assetid: 0f2511cf-2b02-4b41-b001-b1754677c38f ---- -# File system and the registry (C# Programming Guide) - -The following articles show how to use C# and .NET to perform various basic operations on files, folders, and the registry. - -## In this section - -|**Title**|**Description**| -|---------------|---------------------| -|[How to iterate through a directory tree](how-to-iterate-through-a-directory-tree.md)|Shows how to manually iterate through a directory tree.| -|[How to get information about files, folders, and drives](how-to-get-information-about-files-folders-and-drives.md)|Shows how to retrieve information such as creation times and size, about files, folders and drives.| -|[How to create a file or folder](how-to-create-a-file-or-folder.md)|Shows how to create a new file or folder.| -|[How to copy, delete, and move files and folders (C# Programming Guide)](how-to-copy-delete-and-move-files-and-folders.md)|Shows how to copy, delete and move files and folders.| -|[How to provide a progress dialog box for file operations](how-to-provide-a-progress-dialog-box-for-file-operations.md)|Shows how to display a standard Windows progress dialog for certain file operations.| -|[How to write to a text file](how-to-write-to-a-text-file.md)|Shows how to write to a text file.| -|[How to read from a text file](how-to-read-from-a-text-file.md)|Shows how to read from a text file.| -|[How to read a text file one line at a time](how-to-read-a-text-file-one-line-at-a-time.md)|Shows how to retrieve text from a file one line at a time.| -|[How to create a key in the registry](how-to-create-a-key-in-the-registry.md)|Shows how to write a key to the system registry.| - -## Related sections - -- [File and Stream I/O](../../../standard/io/index.md) -- [How to copy, delete, and move files and folders (C# Programming Guide)](how-to-copy-delete-and-move-files-and-folders.md) -- [C# Programming Guide](../index.md) -- <xref:System.IO?displayProperty=nameWithType> diff --git a/docs/csharp/programming-guide/file-system/snippets/write-text/Program.cs b/docs/csharp/programming-guide/file-system/snippets/write-text/Program.cs deleted file mode 100644 index 0ef3c9f8e07b1..0000000000000 --- a/docs/csharp/programming-guide/file-system/snippets/write-text/Program.cs +++ /dev/null @@ -1,21 +0,0 @@ -await WriteAllLines.ExampleAsync(); -await WriteAllText.ExampleAsync(); -await StreamWriterOne.ExampleAsync(); -await StreamWriterTwo.ExampleAsync(); - -//Output (to WriteLines.txt): -// First line -// Second line -// Third line - -//Output (to WriteText.txt): -// A class is the most powerful data type in C#. Like a structure, a class defines the data and behavior of the data type. - -//Output to WriteLines2.txt after Example #3: -// First line -// Third line - -//Output to WriteLines2.txt after Example #4: -// First line -// Third line -// Fourth line diff --git a/docs/csharp/programming-guide/file-system/snippets/write-text/StreamWriterOne.cs b/docs/csharp/programming-guide/file-system/snippets/write-text/StreamWriterOne.cs deleted file mode 100644 index 8caec099498ce..0000000000000 --- a/docs/csharp/programming-guide/file-system/snippets/write-text/StreamWriterOne.cs +++ /dev/null @@ -1,16 +0,0 @@ -class StreamWriterOne -{ - public static async Task ExampleAsync() - { - string[] lines = { "First line", "Second line", "Third line" }; - using StreamWriter file = new("WriteLines2.txt"); - - foreach (string line in lines) - { - if (!line.Contains("Second")) - { - await file.WriteLineAsync(line); - } - } - } -} diff --git a/docs/csharp/programming-guide/file-system/snippets/write-text/StreamWriterTwo.cs b/docs/csharp/programming-guide/file-system/snippets/write-text/StreamWriterTwo.cs deleted file mode 100644 index 8d07776a66bd3..0000000000000 --- a/docs/csharp/programming-guide/file-system/snippets/write-text/StreamWriterTwo.cs +++ /dev/null @@ -1,8 +0,0 @@ -class StreamWriterTwo -{ - public static async Task ExampleAsync() - { - using StreamWriter file = new("WriteLines2.txt", append: true); - await file.WriteLineAsync("Fourth line"); - } -} diff --git a/docs/csharp/programming-guide/file-system/snippets/write-text/WriteAllLines.cs b/docs/csharp/programming-guide/file-system/snippets/write-text/WriteAllLines.cs deleted file mode 100644 index c624284867f68..0000000000000 --- a/docs/csharp/programming-guide/file-system/snippets/write-text/WriteAllLines.cs +++ /dev/null @@ -1,12 +0,0 @@ -class WriteAllLines -{ - public static async Task ExampleAsync() - { - string[] lines = - { - "First line", "Second line", "Third line" - }; - - await File.WriteAllLinesAsync("WriteLines.txt", lines); - } -} diff --git a/docs/csharp/programming-guide/file-system/snippets/write-text/WriteAllText.cs b/docs/csharp/programming-guide/file-system/snippets/write-text/WriteAllText.cs deleted file mode 100644 index 5ffd2e83bad51..0000000000000 --- a/docs/csharp/programming-guide/file-system/snippets/write-text/WriteAllText.cs +++ /dev/null @@ -1,11 +0,0 @@ -class WriteAllText -{ - public static async Task ExampleAsync() - { - string text = - "A class is the most powerful data type in C#. Like a structure, " + - "a class defines the data and behavior of the data type. "; - - await File.WriteAllTextAsync("WriteText.txt", text); - } -} diff --git a/docs/csharp/programming-guide/file-system/snippets/write-text/write-text.csproj b/docs/csharp/programming-guide/file-system/snippets/write-text/write-text.csproj deleted file mode 100644 index 3897747193834..0000000000000 --- a/docs/csharp/programming-guide/file-system/snippets/write-text/write-text.csproj +++ /dev/null @@ -1,10 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>net6.0</TargetFramework> - <Nullable>enable</Nullable> - <ImplicitUsings>enable</ImplicitUsings> - </PropertyGroup> - -</Project> diff --git a/docs/csharp/programming-guide/generics/generic-methods.md b/docs/csharp/programming-guide/generics/generic-methods.md index 6fe97eded9f35..469340a1887ed 100644 --- a/docs/csharp/programming-guide/generics/generic-methods.md +++ b/docs/csharp/programming-guide/generics/generic-methods.md @@ -40,7 +40,7 @@ A generic method is a method that is declared with type parameters, as follows: ## C# Language Specification - For more information, see the [C# Language Specification](~/_csharpstandard/standard/classes.md#146-methods). + For more information, see the [C# Language Specification](~/_csharpstandard/standard/classes.md#156-methods). ## See also diff --git a/docs/csharp/programming-guide/generics/generics-and-attributes.md b/docs/csharp/programming-guide/generics/generics-and-attributes.md deleted file mode 100644 index 5eb158f834128..0000000000000 --- a/docs/csharp/programming-guide/generics/generics-and-attributes.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "Generics and Attributes - C# Programming Guide" -description: Learn about applying attributes to generic types. See code examples and view additional available resources. -ms.date: 03/11/2022 -helpviewer_keywords: - - "generics [C#], attributes" - - "attributes [C#], with generics" ---- -# Generics and Attributes (C# Programming Guide) - -Attributes can be applied to generic types in the same way as non-generic types. For more information on applying attributes, see [Attributes](../concepts/attributes/index.md). - -Custom attributes are only permitted to reference open generic types, which are generic types for which no type arguments are supplied, and closed constructed generic types, which supply arguments for all type parameters. - -The following examples use this custom attribute: - -:::code language="csharp" source="./snippets/GenericsAndAttributes.cs" id="CustomAttribute"::: - -An attribute can reference an open generic type: - -:::code language="csharp" source="./snippets/GenericsAndAttributes.cs" id="GenericClassAsAttribute"::: - -Specify multiple type parameters using the appropriate number of commas. In this example, `GenericClass2` has two type parameters: - -:::code language="csharp" source="./snippets/GenericsAndAttributes.cs" id="TypeParameters"::: - -An attribute can reference a closed constructed generic type: - -:::code language="csharp" source="./snippets/GenericsAndAttributes.cs" id="ClosedGeneric"::: - -An attribute that references a generic type parameter will cause a compile-time error: - -```csharp -[CustomAttribute(info = typeof(GenericClass3<int, T, string>))] //Error CS0416 -class ClassD<T> { } -``` - -Beginning with C# 11, a generic type can inherit from <xref:System.Attribute>: - -:::code language="csharp" source="./snippets/GenericsAndAttributes.cs" id="GenericAttribute"::: - -To obtain information about a generic type or type parameter at run time, you can use the methods of <xref:System.Reflection>. For more information, see [Generics and Reflection](./generics-and-reflection.md). - -## See also - -- [C# Programming Guide](../index.md) -- [Generics](../../fundamentals/types/generics.md) -- [Attributes](../../../standard/attributes/index.md) diff --git a/docs/csharp/programming-guide/generics/generics-and-reflection.md b/docs/csharp/programming-guide/generics/generics-and-reflection.md deleted file mode 100644 index e2e60ad427d7c..0000000000000 --- a/docs/csharp/programming-guide/generics/generics-and-reflection.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "Generics and Reflection - C# Programming Guide" -description: Learn about using reflection to obtain information about generic types. View lists of terms and conditions for generic reflection. -ms.date: 07/20/2015 -helpviewer_keywords: - - "generics [C#], reflection" - - "reflection [C#], generic types" -ms.assetid: 162fd9b4-dd5b-4abb-8c9b-e44e21e2f451 ---- -# Generics and Reflection (C# Programming Guide) - -Because the Common Language Runtime (CLR) has access to generic type information at run time, you can use reflection to obtain information about generic types in the same way as for non-generic types. For more information, see [Generics in the Run Time](./generics-in-the-run-time.md). - - In .NET Framework 2.0, several new members were added to the <xref:System.Type> class to enable run-time information for generic types. See the documentation on these classes for more information on how to use these methods and properties. The <xref:System.Reflection.Emit> namespace also contains new members that support generics. See [How to: Define a Generic Type with Reflection Emit](../../../framework/reflection-and-codedom/how-to-define-a-generic-type-with-reflection-emit.md). - - For a list of the invariant conditions for terms used in generic reflection, see the <xref:System.Type.IsGenericType%2A> property remarks. - -|System.Type Member Name|Description| -|-----------------------------|-----------------| -|<xref:System.Type.IsGenericType%2A>|Returns true if a type is generic.| -|<xref:System.Type.GetGenericArguments%2A>|Returns an array of `Type` objects that represent the type arguments supplied for a constructed type, or the type parameters of a generic type definition.| -|<xref:System.Type.GetGenericTypeDefinition%2A>|Returns the underlying generic type definition for the current constructed type.| -|<xref:System.Type.GetGenericParameterConstraints%2A>|Returns an array of `Type` objects that represent the constraints on the current generic type parameter.| -|<xref:System.Type.ContainsGenericParameters%2A>|Returns true if the type or any of its enclosing types or methods contain type parameters for which specific types have not been supplied.| -|<xref:System.Type.GenericParameterAttributes%2A>|Gets a combination of `GenericParameterAttributes` flags that describe the special constraints of the current generic type parameter.| -|<xref:System.Type.GenericParameterPosition%2A>|For a `Type` object that represents a type parameter, gets the position of the type parameter in the type parameter list of the generic type definition or generic method definition that declared the type parameter.| -|<xref:System.Type.IsGenericParameter%2A>|Gets a value that indicates whether the current `Type` represents a type parameter of a generic type or method definition.| -|<xref:System.Type.IsGenericTypeDefinition%2A>|Gets a value that indicates whether the current <xref:System.Type> represents a generic type definition, from which other generic types can be constructed. Returns true if the type represents the definition of a generic type.| -|<xref:System.Type.DeclaringMethod%2A>|Returns the generic method that defined the current generic type parameter, or null if the type parameter was not defined by a generic method.| -|<xref:System.Type.MakeGenericType%2A>|Substitutes the elements of an array of types for the type parameters of the current generic type definition, and returns a <xref:System.Type> object representing the resulting constructed type.| - - In addition, members of the <xref:System.Reflection.MethodInfo> class enable run-time information for generic methods. See the <xref:System.Reflection.MethodBase.IsGenericMethod%2A> property remarks for a list of invariant conditions for terms used to reflect on generic methods. - -|System.Reflection.MemberInfo Member Name|Description| -|----------------------------------------------|-----------------| -|<xref:System.Reflection.MethodBase.IsGenericMethod%2A>|Returns true if a method is generic.| -|<xref:System.Reflection.MethodInfo.GetGenericArguments%2A>|Returns an array of Type objects that represent the type arguments of a constructed generic method or the type parameters of a generic method definition.| -|<xref:System.Reflection.MethodInfo.GetGenericMethodDefinition%2A>|Returns the underlying generic method definition for the current constructed method.| -|<xref:System.Reflection.MethodBase.ContainsGenericParameters%2A>|Returns true if the method or any of its enclosing types contain any type parameters for which specific types have not been supplied.| -|<xref:System.Reflection.MethodBase.IsGenericMethodDefinition%2A>|Returns true if the current <xref:System.Reflection.MethodInfo> represents the definition of a generic method.| -|<xref:System.Reflection.MethodInfo.MakeGenericMethod%2A>|Substitutes the elements of an array of types for the type parameters of the current generic method definition, and returns a <xref:System.Reflection.MethodInfo> object representing the resulting constructed method.| - -## See also - -- [C# Programming Guide](../index.md) -- [Generics](../../fundamentals/types/generics.md) -- [Reflection and Generic Types](../../../framework/reflection-and-codedom/reflection-and-generic-types.md) -- [Generics](../../../standard/generics/index.md) diff --git a/docs/csharp/programming-guide/index.md b/docs/csharp/programming-guide/index.md index 821826e6e370c..faf8ce6da173a 100644 --- a/docs/csharp/programming-guide/index.md +++ b/docs/csharp/programming-guide/index.md @@ -19,17 +19,11 @@ This section provides detailed information on key C# language features and featu For information about specific keywords, operators, and preprocessor directives, see [C# Reference](../language-reference/index.md). For information about the C# Language Specification, see [C# Language Specification](~/_csharpstandard/standard/README.md). -## Program sections - -[Inside a C# Program](../fundamentals/program-structure/index.md) - -[Main() and Command-Line Arguments](../fundamentals/program-structure/main-command-line.md) - ## Language Sections - [Statements](statements-expressions-operators/statements.md) + [Programming concepts](concepts/index.md) - [Operators and expressions](../language-reference/operators/index.md) + [Statements](statements-expressions-operators/statements.md) [Expression-bodied members](statements-expressions-operators/expression-bodied-members.md) @@ -37,7 +31,7 @@ This section provides detailed information on key C# language features and featu [Types](../fundamentals/types/index.md) - [Object oriented programming](../fundamentals/object-oriented/index.md) + [Classes, structs, and records](../fundamentals/object-oriented/index.md) [Interfaces](../fundamentals/types/interfaces.md) @@ -57,32 +51,16 @@ This section provides detailed information on key C# language features and featu [Iterators](./concepts/iterators.md) - [LINQ Query Expressions](../linq/index.md) - - [Namespaces](../fundamentals/types/namespaces.md) - - [Unsafe Code and Pointers](../language-reference/unsafe-code.md) - - [XML Documentation Comments](../language-reference/xmldoc/index.md) - ## Platform Sections [Application Domains](../../framework/app-domains/application-domains.md) [Assemblies in .NET](../../standard/assembly/index.md) - [Attributes](./concepts/attributes/index.md) - [Collections](./concepts/collections.md) [Exceptions and Exception Handling](../fundamentals/exceptions/index.md) - [File System and the Registry (C# Programming Guide)](./file-system/index.md) - - [Interoperability](./interop/index.md) - - [Reflection](./concepts/reflection.md) - ## See also - [C# Reference](../language-reference/index.md) diff --git a/docs/csharp/programming-guide/indexers/index.md b/docs/csharp/programming-guide/indexers/index.md index ae83b360dc605..ee3cacc26e1b9 100644 --- a/docs/csharp/programming-guide/indexers/index.md +++ b/docs/csharp/programming-guide/indexers/index.md @@ -60,7 +60,7 @@ Both the get and set accessor can be implemented as expression-bodied members. I ## C# Language Specification -For more information, see [Indexers](~/_csharpstandard/standard/classes.md#149-indexers) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. +For more information, see [Indexers](~/_csharpstandard/standard/classes.md#159-indexers) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. ## See also diff --git a/docs/csharp/programming-guide/interop/example-com-class.md b/docs/csharp/programming-guide/interop/example-com-class.md deleted file mode 100644 index 7de7be104e655..0000000000000 --- a/docs/csharp/programming-guide/interop/example-com-class.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "Example COM Class - C# Programming Guide" -description: Learn how to expose a class as a COM object in C#. This example adds code in a .cs files to a project and sets the Register for COM Interop property. -ms.date: 07/20/2015 -ms.topic: how-to -helpviewer_keywords: - - "examples [C#], COM classes" - - "COM, exposing Visual C# objects to" -ms.assetid: 6504dea9-ad1c-4993-a794-830fec5270af ---- -# Example COM Class (C# Programming Guide) - -The following is an example of a class that you would expose as a COM object. After this code has been placed in a .cs file and added to your project, set the **Register for COM Interop** property to **True**. For more information, see [How to: Register a Component for COM Interop](/previous-versions/visualstudio/visual-studio-2010/w29wacsy(v=vs.100)). - - Exposing Visual C# objects to COM requires declaring a class interface, an events interface if it is required, and the class itself. Class members must follow these rules to be visible to COM: - -- The class must be public. - -- Properties, methods, and events must be public. - -- Properties and methods must be declared on the class interface. - -- Events must be declared in the event interface. - - Other public members in the class that are not declared in these interfaces will not be visible to COM, but they will be visible to other .NET objects. - - To expose properties and methods to COM, you must declare them on the class interface and mark them with a `DispId` attribute, and implement them in the class. The order in which the members are declared in the interface is the order used for the COM vtable. - - To expose events from your class, you must declare them on the events interface and mark them with a `DispId` attribute. The class should not implement this interface. - - The class implements the class interface; it can implement more than one interface, but the first implementation will be the default class interface. Implement the methods and properties exposed to COM here. They must be marked public and must match the declarations in the class interface. Also, declare the events raised by the class here. They must be marked public and must match the declarations in the events interface. - -## Example - - [!code-csharp[csProgGuideInterop#8](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/ExampleCOM.cs#8)] - -## See also - -- [C# Programming Guide](../index.md) -- [Interoperability](./index.md) -- [Build Page, Project Designer (C#)](/visualstudio/ide/reference/build-page-project-designer-csharp) diff --git a/docs/csharp/programming-guide/interop/how-to-access-office-onterop-objects.md b/docs/csharp/programming-guide/interop/how-to-access-office-onterop-objects.md deleted file mode 100644 index 153fb0aaa0a26..0000000000000 --- a/docs/csharp/programming-guide/interop/how-to-access-office-onterop-objects.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: "How to access Office interop objects - C# Programming Guide" -description: Learn about C# features that simplify access to Office API objects. Use the new features to write code that creates and displays an Excel worksheet. -ms.topic: how-to -ms.date: 07/20/2015 -helpviewer_keywords: - - "optional parameters [C#], Office programming" - - "named and optional arguments [C#], Office programming" - - "dynamic [C#], Office programming" - - "optional arguments [C#], Office programming" - - "named arguments [C#], Office programming" - - "Office programming [C#]" -ms.assetid: 041b25c2-3512-4e0f-a4ea-ceb2999e4d5e ---- -# How to access Office interop objects (C# Programming Guide) - -C# has features that simplify access to Office API objects. The new features include named and optional arguments, a new type called `dynamic`, and the ability to pass arguments to reference parameters in COM methods as if they were value parameters. - -In this topic you will use the new features to write code that creates and displays a Microsoft Office Excel worksheet. You will then write code to add an Office Word document that contains an icon that is linked to the Excel worksheet. - -To complete this walkthrough, you must have Microsoft Office Excel 2007 and Microsoft Office Word 2007, or later versions, installed on your computer. - -[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] - -## To create a new console application - -1. Start Visual Studio. - -2. On the **File** menu, point to **New**, and then click **Project**. The **New Project** dialog box appears. - -3. In the **Installed Templates** pane, expand **Visual C#**, and then click **Windows**. - -4. Look at the top of the **New Project** dialog box to make sure that **.NET Framework 4** (or later version) is selected as a target framework. - -5. In the **Templates** pane, click **Console Application**. - -6. Type a name for your project in the **Name** field. - -7. Click **OK**. - - The new project appears in **Solution Explorer**. - -## To add references - -1. In **Solution Explorer**, right-click your project's name and then click **Add Reference**. The **Add Reference** dialog box appears. - -2. On the **Assemblies** page, select **Microsoft.Office.Interop.Word** in the **Component Name** list, and then hold down the CTRL key and select **Microsoft.Office.Interop.Excel**. If you do not see the assemblies, you may need to ensure they are installed and displayed. See [How to: Install Office Primary Interop Assemblies](/visualstudio/vsto/how-to-install-office-primary-interop-assemblies). - -3. Click **OK**. - -## To add necessary using directives - -1. In **Solution Explorer**, right-click the *Program.cs* file and then click **View Code**. - -2. Add the following `using` directives to the top of the code file: - - [!code-csharp[csProgGuideOfficeHowTo#1](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#1)] - -## To create a list of bank accounts - -1. Paste the following class definition into **Program.cs**, under the `Program` class. - - [!code-csharp[csProgGuideOfficeHowTo#2](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#2)] - -2. Add the following code to the `Main` method to create a `bankAccounts` list that contains two accounts. - - [!code-csharp[csProgGuideOfficeHowTo#3](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#3)] - -## To declare a method that exports account information to Excel - -1. Add the following method to the `Program` class to set up an Excel worksheet. - - Method <xref:Microsoft.Office.Interop.Excel.Workbooks.Add%2A> has an optional parameter for specifying a particular template. Optional parameters enable you to omit the argument for that parameter if you want to use the parameter's default value. Because no argument is sent in the following code, `Add` uses the default template and creates a new workbook. The equivalent statement in earlier versions of C# requires a placeholder argument: `ExcelApp.Workbooks.Add(Type.Missing)`. - - [!code-csharp[csProgGuideOfficeHowTo#4](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#4)] - -2. Add the following code at the end of `DisplayInExcel`. The code inserts values into the first two columns of the first row of the worksheet. - - [!code-csharp[csProgGuideOfficeHowTo#5](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#5)] - -3. Add the following code at the end of `DisplayInExcel`. The `foreach` loop puts the information from the list of accounts into the first two columns of successive rows of the worksheet. - - [!code-csharp[csProgGuideOfficeHowTo#7](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#7)] - -4. Add the following code at the end of `DisplayInExcel` to adjust the column widths to fit the content. - - [!code-csharp[csProgGuideOfficeHowTo#13](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#13)] - - Earlier versions of C# require explicit casting for these operations because `ExcelApp.Columns[1]` returns an `Object`, and `AutoFit` is an Excel <xref:Microsoft.Office.Interop.Excel.Range> method. The following lines show the casting. - - [!code-csharp[csProgGuideOfficeHowTo#14](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#14)] - - C# converts the returned `Object` to `dynamic` automatically if the assembly is referenced by the [**EmbedInteropTypes**](../../language-reference/compiler-options/inputs.md#embedinteroptypes) compiler option or, equivalently, if the Excel **Embed Interop Types** property is set to true. True is the default value for this property. - -## To run the project - -1. Add the following line at the end of `Main`. - - [!code-csharp[csProgGuideOfficeHowTo#8](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#8)] - -2. Press CTRL+F5. - - An Excel worksheet appears that contains the data from the two accounts. - -## To add a Word document - -1. To illustrate additional ways in which C# enhances Office programming, the following code opens a Word application and creates an icon that links to the Excel worksheet. - - Paste method `CreateIconInWordDoc`, provided later in this step, into the `Program` class. `CreateIconInWordDoc` uses named and optional arguments to reduce the complexity of the method calls to <xref:Microsoft.Office.Interop.Word.Documents.Add%2A> and <xref:Microsoft.Office.Interop.Word.Selection.PasteSpecial%2A>. These calls incorporate two other features that simplify calls to COM methods that have reference parameters. First, you can send arguments to the reference parameters as if they were value parameters. That is, you can send values directly, without creating a variable for each reference parameter. The compiler generates temporary variables to hold the argument values, and discards the variables when you return from the call. Second, you can omit the `ref` keyword in the argument list. - - The `Add` method has four reference parameters, all of which are optional. You can omit arguments for any or all of the parameters if you want to use their default values. - - The `PasteSpecial` method inserts the contents of the Clipboard. The method has seven reference parameters, all of which are optional. The following code specifies arguments for two of them: `Link`, to create a link to the source of the Clipboard contents, and `DisplayAsIcon`, to display the link as an icon. You can use named arguments for those two and omit the others. Although these are reference parameters, you do not have to use the `ref` keyword, or to create variables to send in as arguments. You can send the values directly. - - [!code-csharp[csProgGuideOfficeHowTo#9](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#9)] - -2. Add the following statement at the end of `Main`. - - [!code-csharp[csProgGuideOfficeHowTo#11](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#11)] - -3. Add the following statement at the end of `DisplayInExcel`. The `Copy` method adds the worksheet to the Clipboard. - - [!code-csharp[csProgGuideOfficeHowTo#12](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#12)] - -4. Press CTRL+F5. - - A Word document appears that contains an icon. Double-click the icon to bring the worksheet to the foreground. - -## To set the Embed Interop Types property - -1. Additional enhancements are possible when you call a COM type that does not require a primary interop assembly (PIA) at run time. Removing the dependency on PIAs results in version independence and easier deployment. For more information about the advantages of programming without PIAs, see [Walkthrough: Embedding Types from Managed Assemblies](../../../standard/assembly/embed-types-visual-studio.md). - - In addition, programming is easier because the types that are required and returned by COM methods can be represented by using the type `dynamic` instead of `Object`. Variables that have type `dynamic` are not evaluated until run time, which eliminates the need for explicit casting. For more information, see [Using Type dynamic](../types/using-type-dynamic.md). - - Embedding type information instead of using PIAs is default behavior. Because of that default, several of the previous examples are simplified because explicit casting is not required. For example, the declaration of `worksheet` in `DisplayInExcel` is written as `Excel._Worksheet workSheet = excelApp.ActiveSheet` rather than `Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet`. The calls to `AutoFit` in the same method also would require explicit casting without the default, because `ExcelApp.Columns[1]` returns an `Object`, and `AutoFit` is an Excel method. The following code shows the casting. - - [!code-csharp[csProgGuideOfficeHowTo#14](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#14)] - -2. To change the default and use PIAs instead of embedding type information, expand the **References** node in **Solution Explorer** and then select **Microsoft.Office.Interop.Excel** or **Microsoft.Office.Interop.Word**. - -3. If you cannot see the **Properties** window, press **F4**. - -4. Find **Embed Interop Types** in the list of properties, and change its value to **False**. Equivalently, you can compile by using the [**References**](../../language-reference/compiler-options/inputs.md#references) compiler option instead of [**EmbedInteropTypes**](../../language-reference/compiler-options/inputs.md#embedinteroptypes) at a command prompt. - -## To add additional formatting to the table - -1. Replace the two calls to `AutoFit` in `DisplayInExcel` with the following statement. - - [!code-csharp[csProgGuideOfficeHowTo#15](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#15)] - - The <xref:Microsoft.Office.Interop.Excel.Range.AutoFormat%2A> method has seven value parameters, all of which are optional. Named and optional arguments enable you to provide arguments for none, some, or all of them. In the previous statement, an argument is supplied for only one of the parameters, `Format`. Because `Format` is the first parameter in the parameter list, you do not have to provide the parameter name. However, the statement might be easier to understand if the parameter name is included, as is shown in the following code. - - [!code-csharp[csProgGuideOfficeHowTo#16](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs#16)] - -2. Press CTRL+F5 to see the result. Other formats are listed in the <xref:Microsoft.Office.Interop.Excel.XlRangeAutoFormat> enumeration. - -## Example - -The following code shows the complete example. - -[!code-csharp[csProgGuideOfficeHowTo#18](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/walkthrough.cs#18)] - -## See also - -- <xref:System.Type.Missing?displayProperty=nameWithType> -- [dynamic](../../language-reference/builtin-types/reference-types.md) -- [Using Type dynamic](../types/using-type-dynamic.md) -- [Named and Optional Arguments](../classes-and-structs/named-and-optional-arguments.md) -- [How to use named and optional arguments in Office programming](../classes-and-structs/how-to-use-named-and-optional-arguments-in-office-programming.md) diff --git a/docs/csharp/programming-guide/interop/how-to-use-indexed-properties-in-com-interop-rogramming.md b/docs/csharp/programming-guide/interop/how-to-use-indexed-properties-in-com-interop-rogramming.md deleted file mode 100644 index e8e2bfed1fc33..0000000000000 --- a/docs/csharp/programming-guide/interop/how-to-use-indexed-properties-in-com-interop-rogramming.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: "How to use indexed properties in COM interop programming - C# Programming Guide" -description: Learn how indexed properties improve the way in which COM properties that have parameters are consumed in this C# example. -ms.date: 07/20/2015 -ms.topic: how-to -helpviewer_keywords: - - "indexed properties [C#]" - - "Office programming [C#], indexed properties" - - "properties [C#], indexed" -ms.assetid: 756bfc1e-7c28-4d4d-b114-ac9288c73882 ---- -# How to use indexed properties in COM interop programming (C# Programming Guide) - -*Indexed properties* improve the way in which COM properties that have parameters are consumed in C# programming. Indexed properties work together with other features in Visual C#, such as [named and optional arguments](../classes-and-structs/named-and-optional-arguments.md), a new type ([dynamic](../../language-reference/builtin-types/reference-types.md)), and [embedded type information](../../../standard/assembly/embed-types-visual-studio.md), to enhance Microsoft Office programming. - - In earlier versions of C#, methods are accessible as properties only if the `get` method has no parameters and the `set` method has one and only one value parameter. However, not all COM properties meet those restrictions. For example, the Excel <xref:Microsoft.Office.Interop.Excel.Range.Range%2A> property has a `get` accessor that requires a parameter for the name of the range. In the past, because you could not access the `Range` property directly, you had to use the `get_Range` method instead, as shown in the following example. - - [!code-csharp[csProgGuideIndexedProperties#1](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/program.cs#1)] - - Indexed properties enable you to write the following instead: - - [!code-csharp[csProgGuideIndexedProperties#2](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/program.cs#2)] - - The previous example also uses the [optional arguments](../classes-and-structs/named-and-optional-arguments.md) feature, which enables you to omit `Type.Missing`. - - Indexed properties enable you to write the following code. - - [!code-csharp[csProgGuideIndexedProperties#4](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/program.cs#4)] - - You cannot create indexed properties of your own. The feature only supports consumption of existing indexed properties. - -## Example - - The following code shows a complete example. For more information about how to set up a project that accesses the Office API, see [How to access Office interop objects by using C# features](./how-to-access-office-onterop-objects.md). - - [!code-csharp[csProgGuideIndexedProperties#5](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/program.cs#5)] - -## See also - -- [Named and Optional Arguments](../classes-and-structs/named-and-optional-arguments.md) -- [dynamic](../../language-reference/builtin-types/reference-types.md) -- [Using Type dynamic](../types/using-type-dynamic.md) -- [How to use named and optional arguments in Office programming](../classes-and-structs/how-to-use-named-and-optional-arguments-in-office-programming.md) -- [How to access Office interop objects by using C# features](./how-to-access-office-onterop-objects.md) -- [Walkthrough: Office Programming](./walkthrough-office-programming.md) diff --git a/docs/csharp/programming-guide/interop/how-to-use-platform-invoke-to-play-a-wave-file.md b/docs/csharp/programming-guide/interop/how-to-use-platform-invoke-to-play-a-wave-file.md deleted file mode 100644 index 9ade67944c015..0000000000000 --- a/docs/csharp/programming-guide/interop/how-to-use-platform-invoke-to-play-a-wave-file.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "How to use platform invoke to play a WAV file - C# Programming Guide" -description: This C# code example illustrates how to use platform invoke services to play a WAV sound file on the Windows operating system. -ms.topic: how-to -ms.date: 07/20/2015 -helpviewer_keywords: - - "platform invoke, sound files" - - "interoperability [C#], playing WAV files using pinvoke" - - "wav files" - - ".wav files" -ms.assetid: f7f62f53-e026-4c40-b221-3a26adb0c2c5 ---- -# How to use platform invoke to play a WAV file (C# Programming Guide) - -The following C# code example illustrates how to use platform invoke services to play a WAV sound file on the Windows operating system. - -## Example - -This example code uses <xref:System.Runtime.InteropServices.DllImportAttribute> to import `winmm.dll`'s `PlaySound` method entry point as `Form1 PlaySound()`. The example has a simple Windows Form with a button. Clicking the button opens a standard windows <xref:System.Windows.Forms.OpenFileDialog> dialog box so that you can open a file to play. When a wave file is selected, it is played by using the `PlaySound()` method of the *winmm.dll* library. For more information about this method, see [Using the PlaySound function with Waveform-Audio Files](/windows/desktop/multimedia/using-playsound-to-play-waveform-audio-files). Browse and select a file that has a .wav extension, and then click **Open** to play the wave file by using platform invoke. A text box shows the full path of the file selected. - -The **Open Files** dialog box is filtered to show only files that have a .wav extension through the filter settings: - -[!code-csharp[csProgGuideInterop#5](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/WinSound.cs#5)] - -[!code-csharp[csProgGuideInterop#3](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/WinSound.cs#3)] - -## Compiling the code - -1. Create a new C# Windows Forms Application project in Visual Studio and name it **WinSound**. - -2. Copy the code above, and paste it over the contents of the *Form1.cs* file. - -3. Copy the following code, and paste it in the *Form1.Designer.cs* file, in the `InitializeComponent()` method, after any existing code. - - [!code-csharp[csProgGuideInterop#4](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/WinSound.cs#4)] - -4. Compile and run the code. - -## See also - -- [C# Programming Guide](../index.md) -- [Interoperability Overview](interoperability-overview.md) -- [A Closer Look at Platform Invoke](../../../framework/interop/consuming-unmanaged-dll-functions.md#a-closer-look-at-platform-invoke) -- [Marshalling Data with Platform Invoke](../../../framework/interop/marshalling-data-with-platform-invoke.md) diff --git a/docs/csharp/programming-guide/interop/index.md b/docs/csharp/programming-guide/interop/index.md deleted file mode 100644 index 8ad65afb3c6ca..0000000000000 --- a/docs/csharp/programming-guide/interop/index.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "Interoperability - C# Programming Guide" -description: Interoperability supports unmanaged code beside the code that runs under the common language runtime. Use these resources to understand interop options. -ms.date: 07/20/2015 -helpviewer_keywords: - - "COM interop" - - "interoperability" - - "platform invoke, accessing APIs with C#" - - "C# language, interoperability" -ms.assetid: 238bb95a-e962-4026-bbd5-197055bdb8ee ---- -# Interoperability (C# Programming Guide) - -Interoperability enables you to preserve and take advantage of existing investments in unmanaged code. Code that runs under the control of the common language runtime (CLR) is called *managed code*, and code that runs outside the CLR is called *unmanaged code*. COM, COM+, C++ components, ActiveX components, and Microsoft Windows API are examples of unmanaged code. - -.NET enables interoperability with unmanaged code through platform invoke services, the <xref:System.Runtime.InteropServices> namespace, C++ interoperability, and COM interoperability (COM interop). - -## In This Section - - [Interoperability Overview](./interoperability-overview.md) - Describes methods to interoperate between C# managed code and unmanaged code. - - [How to access Office interop objects by using C# features](./how-to-access-office-onterop-objects.md) - Describes features that are introduced in Visual C# to facilitate Office programming. - - [How to use indexed properties in COM interop programming](./how-to-use-indexed-properties-in-com-interop-rogramming.md) - Describes how to use indexed properties to access COM properties that have parameters. - - [How to use platform invoke to play a WAV file](./how-to-use-platform-invoke-to-play-a-wave-file.md) - Describes how to use platform invoke services to play a .wav sound file on the Windows operating system. - - [Walkthrough: Office Programming](./walkthrough-office-programming.md) - Shows how to create an Excel workbook and a Word document that contains a link to the workbook. - - [Example COM Class](./example-com-class.md) - Demonstrates how to expose a C# class as a COM object. - -## C# Language Specification - -For more information, see [Unsafe code](~/_csharpstandard/standard/unsafe-code.md) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. - -## See also - -- <xref:System.Runtime.InteropServices.Marshal.ReleaseComObject%2A?displayProperty=nameWithType> -- [C# Programming Guide](../index.md) -- [Interoperating with Unmanaged Code](../../../framework/interop/index.md) -- [Walkthrough: Office Programming](./walkthrough-office-programming.md) diff --git a/docs/csharp/programming-guide/interop/interoperability-overview.md b/docs/csharp/programming-guide/interop/interoperability-overview.md deleted file mode 100644 index dd131edcbfe78..0000000000000 --- a/docs/csharp/programming-guide/interop/interoperability-overview.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "Interoperability Overview - C# Programming Guide" -description: Learn about interoperability between C# and unmanaged code, including platform invoke, C++ interop, exposing COM components to C#, and exposing C# to COM. -ms.date: 07/20/2015 -helpviewer_keywords: - - "COM interop" - - "C# language, interoperability" - - "C++ Interop" - - "interoperability, about interoperability" - - "platform invoke" -ms.assetid: c025b2e0-2357-4c27-8461-118f0090aeff ---- -# Interoperability Overview (C# Programming Guide) - -The topic describes methods to enable interoperability between C# managed code and unmanaged code. - -## Platform Invoke - - *Platform invoke* is a service that enables managed code to call unmanaged functions that are implemented in dynamic link libraries (DLLs), such as those in the Microsoft Windows API. It locates and invokes an exported function and marshals its arguments (integers, strings, arrays, structures, and so on) across the interoperation boundary as needed. - -For more information, see [Consuming Unmanaged DLL Functions](../../../framework/interop/consuming-unmanaged-dll-functions.md) and [How to use platform invoke to play a WAV file](./how-to-use-platform-invoke-to-play-a-wave-file.md). - -> [!NOTE] -> The [Common Language Runtime](../../../standard/clr.md) (CLR) manages access to system resources. Calling unmanaged code that is outside the CLR bypasses this security mechanism, and therefore presents a security risk. For example, unmanaged code might call resources in unmanaged code directly, bypassing CLR security mechanisms. For more information, see [Security in .NET](../../../standard/security/index.md). - -## C++ Interop - - You can use C++ interop, also known as It Just Works (IJW), to wrap a native C++ class so that it can be consumed by code that is authored in C# or another .NET language. To do this, you write C++ code to wrap a native DLL or COM component. Unlike other .NET languages, Visual C++ has interoperability support that enables managed and unmanaged code to be located in the same application and even in the same file. You then build the C++ code by using the **/clr** compiler switch to produce a managed assembly. Finally, you add a reference to the assembly in your C# project and use the wrapped objects just as you would use other managed classes. - -## Exposing COM Components to C\# - - You can consume a COM component from a C# project. The general steps are as follows: - -1. Locate a COM component to use and register it. Use regsvr32.exe to register or un–register a COM DLL. - -2. Add to the project a reference to the COM component or type library. - - When you add the reference, Visual Studio uses the [Tlbimp.exe (Type Library Importer)](../../../framework/tools/tlbimp-exe-type-library-importer.md), which takes a type library as input, to output a .NET interop assembly. The assembly, also named a runtime callable wrapper (RCW), contains managed classes and interfaces that wrap the COM classes and interfaces that are in the type library. Visual Studio adds to the project a reference to the generated assembly. - -3. Create an instance of a class that is defined in the RCW. This, in turn, creates an instance of the COM object. - -4. Use the object just as you use other managed objects. When the object is reclaimed by garbage collection, the instance of the COM object is also released from memory. - - For more information, see [Exposing COM Components to the .NET Framework](../../../framework/interop/exposing-com-components.md). - -## Exposing C# to COM - - COM clients can consume C# types that have been correctly exposed. The basic steps to expose C# types are as follows: - -1. Add interop attributes in the C# project. - - You can make an assembly COM visible by modifying Visual C# project properties. For more information, see [Assembly Information Dialog Box](/visualstudio/ide/reference/assembly-information-dialog-box). - -2. Generate a COM type library and register it for COM usage. - - You can modify Visual C# project properties to automatically register the C# assembly for COM interop. Visual Studio uses the [Regasm.exe (Assembly Registration Tool)](../../../framework/tools/regasm-exe-assembly-registration-tool.md), using the `/tlb` command-line switch, which takes a managed assembly as input, to generate a type library. This type library describes the `public` types in the assembly and adds registry entries so that COM clients can create managed classes. - - For more information, see [Exposing .NET Framework Components to COM](../../../framework/interop/exposing-dotnet-components-to-com.md) and [Example COM Class](./example-com-class.md). - -## See also - -- [Improving Interop Performance](/previous-versions/msp-n-p/ff647812(v=pandp.10)) -- [Introduction to Interoperability between COM and .NET](/office/client-developer/outlook/pia/introduction-to-interoperability-between-com-and-net) -- [Introduction to COM Interop in Visual Basic](../../../visual-basic/programming-guide/com-interop/introduction-to-com-interop.md) -- [Marshalling between Managed and Unmanaged Code](../../../framework/interop/interop-marshalling.md) -- [Interoperating with Unmanaged Code](../../../framework/interop/index.md) -- [C# Programming Guide](../index.md) diff --git a/docs/csharp/programming-guide/interop/walkthrough-office-programming.md b/docs/csharp/programming-guide/interop/walkthrough-office-programming.md deleted file mode 100644 index c8246f902651d..0000000000000 --- a/docs/csharp/programming-guide/interop/walkthrough-office-programming.md +++ /dev/null @@ -1,207 +0,0 @@ ---- -title: "Walkthrough: Office Programming (C# and Visual Basic)" -description: Learn about the features Visual Studio offers in C# and Visual Basic that improve Microsoft Office programming. -ms.date: 07/20/2015 -ms.topic: tutorial -dev_langs: - - "csharp" - - "vb" -helpviewer_keywords: - - "Office, programming in Visual Basic and C#" - - "Office programming [C#]" - - "Office programming [Visual Basic]" -ms.assetid: 519cff31-f80b-4f0e-a56b-26358d0f8c51 ---- -# Walkthrough: Office Programming (C# and Visual Basic) - -Visual Studio offers features in C# and Visual Basic that improve Microsoft Office programming. Helpful C# features include named and optional arguments and return values of type `dynamic`. In COM programming, you can omit the `ref` keyword and gain access to indexed properties. Features in Visual Basic include auto-implemented properties, statements in lambda expressions, and collection initializers. - -Both languages enable embedding of type information, which allows deployment of assemblies that interact with COM components without deploying primary interop assemblies (PIAs) to the user's computer. For more information, see [Walkthrough: Embedding Types from Managed Assemblies](../../../standard/assembly/embed-types-visual-studio.md). - -This walkthrough demonstrates these features in the context of Office programming, but many of these features are also useful in general programming. In the walkthrough, you use an Excel Add-in application to create an Excel workbook. Next, you create a Word document that contains a link to the workbook. Finally, you see how to enable and disable the PIA dependency. - -## Prerequisites - -You must have Microsoft Office Excel and Microsoft Office Word installed on your computer to complete this walkthrough. - -[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] - -### To set up an Excel Add-in application - -1. Start Visual Studio. - -2. On the **File** menu, point to **New**, and then click **Project**. - -3. In the **Installed Templates** pane, expand **Visual Basic** or **Visual C#**, expand **Office**, and then click the version year of the Office product. - -4. In the **Templates** pane, click **Excel \<version> Add-in**. - -5. Look at the top of the **Templates** pane to make sure that **.NET Framework 4**, or a later version, appears in the **Target Framework** box. - -6. Type a name for your project in the **Name** box, if you want to. - -7. Click **OK**. - -8. The new project appears in **Solution Explorer**. - -### To add references - -1. In **Solution Explorer**, right-click your project's name and then click **Add Reference**. The **Add Reference** dialog box appears. - -2. On the **Assemblies** tab, select **Microsoft.Office.Interop.Excel**, version `<version>.0.0.0` (for a key to the Office product version numbers, see [Microsoft Versions](https://en.wikipedia.org/wiki/Microsoft_Office#Versions)), in the **Component Name** list, and then hold down the CTRL key and select **Microsoft.Office.Interop.Word**, `version <version>.0.0.0`. If you do not see the assemblies, you may need to ensure they are installed and displayed (see [How to: Install Office Primary Interop Assemblies](/visualstudio/vsto/how-to-install-office-primary-interop-assemblies)). - -3. Click **OK**. - -### To add necessary Imports statements or using directives - -1. In **Solution Explorer**, right-click the **ThisAddIn.vb** or **ThisAddIn.cs** file and then click **View Code**. - -2. Add the following `Imports` statements (Visual Basic) or `using` directives (C#) to the top of the code file if they are not already present. - - [!code-csharp[csOfficeWalkthrough#1](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#1)] - - [!code-vb[csOfficeWalkthrough#1](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#1)] - -### To create a list of bank accounts - -1. In **Solution Explorer**, right-click your project's name, click **Add**, and then click **Class**. Name the class Account.vb if you are using Visual Basic or Account.cs if you are using C#. Click **Add**. - -2. Replace the definition of the `Account` class with the following code. The class definitions use *auto-implemented properties*. For more information, see [Auto-Implemented Properties](../../../visual-basic/programming-guide/language-features/procedures/auto-implemented-properties.md). - - [!code-csharp[csOfficeWalkthrough#2](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/account.cs#2)] - - [!code-vb[csOfficeWalkthrough#2](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/account.vb#2)] - -3. To create a `bankAccounts` list that contains two accounts, add the following code to the `ThisAddIn_Startup` method in *ThisAddIn.vb* or *ThisAddIn.cs*. The list declarations use *collection initializers*. For more information, see [Collection Initializers](../../../visual-basic/programming-guide/language-features/collection-initializers/index.md). - - [!code-csharp[csOfficeWalkthrough#3](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#3)] - - [!code-vb[csOfficeWalkthrough#3](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#3)] - -### To export data to Excel - -1. In the same file, add the following method to the `ThisAddIn` class. The method sets up an Excel workbook and exports data to it. - - [!code-csharp[csOfficeWalkthrough#4](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#4)] - - [!code-vb[csOfficeWalkthrough#4](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#4)] - - Two new C# features are used in this method. Both of these features already exist in Visual Basic. - - - Method [Add](<xref:Microsoft.Office.Interop.Excel.Workbooks.Add%2A>) has an *optional parameter* for specifying a particular template. Optional parameters enable you to omit the argument for that parameter if you want to use the parameter's default value. Because no argument is sent in the previous example, `Add` uses the default template and creates a new workbook. The equivalent statement in earlier versions of C# requires a placeholder argument: `excelApp.Workbooks.Add(Type.Missing)`. - - For more information, see [Named and Optional Arguments](../classes-and-structs/named-and-optional-arguments.md). - - - The `Range` and `Offset` properties of the [Range](<xref:Microsoft.Office.Interop.Excel.Range>) object use the *indexed properties* feature. This feature enables you to consume these properties from COM types by using the following typical C# syntax. Indexed properties also enable you to use the `Value` property of the `Range` object, eliminating the need to use the `Value2` property. The `Value` property is indexed, but the index is optional. Optional arguments and indexed properties work together in the following example. - - [!code-csharp[csOfficeWalkthrough#5](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#5)] - - In earlier versions of the language, the following special syntax is required. - - [!code-csharp[csOfficeWalkthrough#6](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#6)] - - You cannot create indexed properties of your own. The feature only supports consumption of existing indexed properties. - - For more information, see [How to use indexed properties in COM interop programming](./how-to-use-indexed-properties-in-com-interop-rogramming.md). - -2. Add the following code at the end of `DisplayInExcel` to adjust the column widths to fit the content. - - [!code-csharp[csOfficeWalkthrough#7](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#7)] - - [!code-vb[csOfficeWalkthrough#7](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#7)] - - These additions demonstrate another feature in C#: treating `Object` values returned from COM hosts such as Office as if they have type [dynamic](../../language-reference/builtin-types/reference-types.md). This happens automatically when **Embed Interop Types** is set to its default value, `True`, or, equivalently, when the assembly is referenced by the [**EmbedInteropTypes**](../../language-reference/compiler-options/inputs.md#embedinteroptypes) compiler option. - - For example, `excelApp.Columns[1]` returns an `Object`, and `AutoFit` is an Excel [Range](<xref:Microsoft.Office.Interop.Excel.Range>) method. Without `dynamic`, you must cast the object returned by `excelApp.Columns[1]` as an instance of `Range` before calling method `AutoFit`. - - [!code-csharp[csOfficeWalkthrough#8](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#8)] - - For more information about embedding interop types, see procedures "To find the PIA reference" and "To restore the PIA dependency" later in this topic. For more information about `dynamic`, see [dynamic](../../language-reference/builtin-types/reference-types.md) or [Using Type dynamic](../types/using-type-dynamic.md). - -### To invoke DisplayInExcel - -1. Add the following code at the end of the `ThisAddIn_StartUp` method. The call to `DisplayInExcel` contains two arguments. The first argument is the name of the list of accounts to be processed. The second argument is a multiline lambda expression that defines how the data is to be processed. The `ID` and `balance` values for each account are displayed in adjacent cells, and the row is displayed in red if the balance is less than zero. For more information, see [Lambda Expressions](../../language-reference/operators/lambda-expressions.md). - - [!code-csharp[csOfficeWalkthrough#9](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#9)] - - [!code-vb[csOfficeWalkthrough#9](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#9)] - -2. To run the program, press F5. An Excel worksheet appears that contains the data from the accounts. - -### To add a Word document - -1. Add the following code at the end of the `ThisAddIn_StartUp` method to create a Word document that contains a link to the Excel workbook. - - [!code-csharp[csOfficeWalkthrough#10](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#10)] - - [!code-vb[csOfficeWalkthrough#10](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#10)] - - This code demonstrates several of the new features in C#: the ability to omit the `ref` keyword in COM programming, named arguments, and optional arguments. These features already exist in Visual Basic. The [PasteSpecial](<xref:Microsoft.Office.Interop.Word.Selection.PasteSpecial%2A>) method has seven parameters, all of which are defined as optional reference parameters. Named and optional arguments enable you to designate the parameters you want to access by name and to send arguments to only those parameters. In this example, arguments are sent to indicate that a link to the workbook on the Clipboard should be created (parameter `Link`) and that the link is to be displayed in the Word document as an icon (parameter `DisplayAsIcon`). Visual C# also enables you to omit the `ref` keyword for these arguments. - -### To run the application - -1. Press F5 to run the application. Excel starts and displays a table that contains the information from the two accounts in `bankAccounts`. Then a Word document appears that contains a link to the Excel table. - -### To clean up the completed project - -1. In Visual Studio, click **Clean Solution** on the **Build** menu. Otherwise, the add-in will run every time that you open Excel on your computer. - -### To find the PIA reference - -1. Run the application again, but do not click **Clean Solution**. - -2. Select the **Start**. Locate **Microsoft Visual Studio \<version>** and open a developer command prompt. - -3. Type `ildasm` in the Developer Command Prompt for Visual Studio window, and then press ENTER. The IL DASM window appears. - -4. On the **File** menu in the IL DASM window, select **File** > **Open**. Double-click **Visual Studio \<version>**, and then double-click **Projects**. Open the folder for your project, and look in the bin/Debug folder for *your project name*.dll. Double-click *your project name*.dll. A new window displays your project's attributes, in addition to references to other modules and assemblies. Note that namespaces `Microsoft.Office.Interop.Excel` and `Microsoft.Office.Interop.Word` are included in the assembly. By default in Visual Studio, the compiler imports the types you need from a referenced PIA into your assembly. - - For more information, see [How to: View Assembly Contents](../../../standard/assembly/view-contents.md). - -5. Double-click the **MANIFEST** icon. A window appears that contains a list of assemblies that contain items referenced by the project. `Microsoft.Office.Interop.Excel` and `Microsoft.Office.Interop.Word` are not included in the list. Because the types your project needs have been imported into your assembly, references to a PIA are not required. This makes deployment easier. The PIAs do not have to be present on the user's computer, and because an application does not require deployment of a specific version of a PIA, applications can be designed to work with multiple versions of Office, provided that the necessary APIs exist in all versions. - - Because deployment of PIAs is no longer necessary, you can create an application in advanced scenarios that works with multiple versions of Office, including earlier versions. However, this works only if your code does not use any APIs that are not available in the version of Office you are working with. It is not always clear whether a particular API was available in an earlier version, and for that reason working with earlier versions of Office is not recommended. - - > [!NOTE] - > Office did not publish PIAs before Office 2003. Therefore, the only way to generate an interop assembly for Office 2002 or earlier versions is by importing the COM reference. - -6. Close the manifest window and the assembly window. - -### To restore the PIA dependency - -1. In **Solution Explorer**, click the **Show All Files** button. Expand the **References** folder and select **Microsoft.Office.Interop.Excel**. Press F4 to display the **Properties** window. - -2. In the **Properties** window, change the **Embed Interop Types** property from **True** to **False**. - -3. Repeat steps 1 and 2 in this procedure for `Microsoft.Office.Interop.Word`. - -4. In C#, comment out the two calls to `Autofit` at the end of the `DisplayInExcel` method. - -5. Press F5 to verify that the project still runs correctly. - -6. Repeat steps 1-3 from the previous procedure to open the assembly window. Notice that `Microsoft.Office.Interop.Word` and `Microsoft.Office.Interop.Excel` are no longer in the list of embedded assemblies. - -7. Double-click the **MANIFEST** icon and scroll through the list of referenced assemblies. Both `Microsoft.Office.Interop.Word` and `Microsoft.Office.Interop.Excel` are in the list. Because the application references the Excel and Word PIAs, and the **Embed Interop Types** property is set to **False**, both assemblies must exist on the end user's computer. - -8. In Visual Studio, click **Clean Solution** on the **Build** menu to clean up the completed project. - -## See also - -- [Auto-Implemented Properties (Visual Basic)](../../../visual-basic/programming-guide/language-features/procedures/auto-implemented-properties.md) -- [Auto-Implemented Properties (C#)](../classes-and-structs/auto-implemented-properties.md) -- [Collection Initializers](../../../visual-basic/programming-guide/language-features/collection-initializers/index.md) -- [Object and Collection Initializers](../classes-and-structs/object-and-collection-initializers.md) -- [Optional Parameters](../../../visual-basic/programming-guide/language-features/procedures/optional-parameters.md) -- [Passing Arguments by Position and by Name](../../../visual-basic/programming-guide/language-features/procedures/passing-arguments-by-position-and-by-name.md) -- [Named and Optional Arguments](../classes-and-structs/named-and-optional-arguments.md) -- [Early and Late Binding](../../../visual-basic/programming-guide/language-features/early-late-binding/index.md) -- [dynamic](../../language-reference/builtin-types/reference-types.md) -- [Using Type dynamic](../types/using-type-dynamic.md) -- [Lambda Expressions (Visual Basic)](../../../visual-basic/programming-guide/language-features/procedures/lambda-expressions.md) -- [Lambda Expressions (C#)](../../language-reference/operators/lambda-expressions.md) -- [How to use indexed properties in COM interop programming](./how-to-use-indexed-properties-in-com-interop-rogramming.md) -- [Walkthrough: Embedding Type Information from Microsoft Office Assemblies in Visual Studio](/previous-versions/visualstudio/visual-studio-2013/ee317478(v=vs.120)) -- [Walkthrough: Embedding Types from Managed Assemblies](../../../standard/assembly/embed-types-visual-studio.md) -- [Walkthrough: Creating Your First VSTO Add-in for Excel](/visualstudio/vsto/walkthrough-creating-your-first-vsto-add-in-for-excel) -- [COM Interop](../../../visual-basic/programming-guide/com-interop/index.md) -- [Interoperability](./index.md) diff --git a/docs/csharp/programming-guide/statements-expressions-operators/statements.md b/docs/csharp/programming-guide/statements-expressions-operators/statements.md index e97b74919980c..4d0842b798025 100644 --- a/docs/csharp/programming-guide/statements-expressions-operators/statements.md +++ b/docs/csharp/programming-guide/statements-expressions-operators/statements.md @@ -28,7 +28,7 @@ The following table lists the various types of statements in C# and their associ |Jump statements|Jump statements transfer control to another section of code. For more information, see the following topics: <ul><li>[break](../../language-reference/statements/jump-statements.md#the-break-statement)</li><li>[continue](../../language-reference/statements/jump-statements.md#the-continue-statement)</li><li>[goto](../../language-reference/statements/jump-statements.md#the-goto-statement)</li><li>[return](../../language-reference/statements/jump-statements.md#the-return-statement)</li><li>[yield](../../language-reference/statements/yield.md)</li></ul>| |Exception handling statements|Exception handling statements enable you to gracefully recover from exceptional conditions that occur at run time. For more information, see the following topics: <ul><li>[throw](../../language-reference/keywords/throw.md)</li><li>[try-catch](../../language-reference/keywords/try-catch.md)</li><li>[try-finally](../../language-reference/keywords/try-finally.md)</li><li>[try-catch-finally](../../language-reference/keywords/try-catch-finally.md)</li></ul>| |[`checked` and `unchecked`](../../language-reference/statements/checked-and-unchecked.md)|The `checked` and `unchecked` statements enable you to specify whether integral-type numerical operations are allowed to cause an overflow when the result is stored in a variable that is too small to hold the resulting value.| -|The `await` statement|If you mark a method with the [async](../../language-reference/keywords/async.md) modifier, you can use the [await](../../language-reference/operators/await.md) operator in the method. When control reaches an `await` expression in the async method, control returns to the caller, and progress in the method is suspended until the awaited task completes. When the task is complete, execution can resume in the method.<br /><br /> For a simple example, see the "Async Methods" section of [Methods](../classes-and-structs/methods.md). For more information, see [Asynchronous Programming with async and await](../concepts/async/index.md).| +|The `await` statement|If you mark a method with the [async](../../language-reference/keywords/async.md) modifier, you can use the [await](../../language-reference/operators/await.md) operator in the method. When control reaches an `await` expression in the async method, control returns to the caller, and progress in the method is suspended until the awaited task completes. When the task is complete, execution can resume in the method.<br /><br /> For a simple example, see the "Async Methods" section of [Methods](../classes-and-structs/methods.md). For more information, see [Asynchronous Programming with async and await](../../asynchronous-programming/index.md).| |The `yield return` statement|An iterator performs a custom iteration over a collection, such as a list or an array. An iterator uses the [yield return](../../language-reference/statements/yield.md) statement to return each element one at a time. When a `yield return` statement is reached, the current location in code is remembered. Execution is restarted from that location when the iterator is called the next time.<br /><br /> For more information, see [Iterators](../concepts/iterators.md).| |The `fixed` statement|The fixed statement prevents the garbage collector from relocating a movable variable. For more information, see [fixed](../../language-reference/statements/fixed.md).| |The `lock` statement|The lock statement enables you to limit access to blocks of code to only one thread at a time. For more information, see [lock](../../language-reference/statements/lock.md).| diff --git a/docs/csharp/programming-guide/types/using-type-dynamic.md b/docs/csharp/programming-guide/types/using-type-dynamic.md deleted file mode 100644 index 84abb6701099e..0000000000000 --- a/docs/csharp/programming-guide/types/using-type-dynamic.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: "Using type dynamic - C# Programming Guide" -description: Learn how to use the dynamic type. The dynamic type is a static type, but dynamic objects bypass static type checking. -ms.date: 07/20/2015 -helpviewer_keywords: - - "dynamic [C#], about dynamic type" - - "dynamic type [C#]" -ms.assetid: 3828989d-c967-4a51-b948-857ebc8fdf26 ---- -# Using type dynamic (C# Programming Guide) - -The `dynamic` type is a static type, but an object of type `dynamic` bypasses static type checking. In most cases, it functions like it has type `object`. At compile time, an element that is typed as `dynamic` is assumed to support any operation. Therefore, you do not have to be concerned about whether the object gets its value from a COM API, from a dynamic language such as IronPython, from the HTML Document Object Model (DOM), from reflection, or from somewhere else in the program. However, if the code is not valid, errors are caught at run time. - -For example, if instance method `exampleMethod1` in the following code has only one parameter, the compiler recognizes that the first call to the method, `ec.exampleMethod1(10, 4)`, is not valid because it contains two arguments. The call causes a compiler error. The second call to the method, `dynamic_ec.exampleMethod1(10, 4)`, is not checked by the compiler because the type of `dynamic_ec` is `dynamic`. Therefore, no compiler error is reported. However, the error does not escape notice indefinitely. It is caught at run time and causes a run-time exception. - -[!code-csharp[CsProgGuideTypes#50](~/samples/snippets/csharp/VS_Snippets_VBCSharp/CsProgGuideTypes/CS/usingdynamic.cs#50)] - -[!code-csharp[CsProgGuideTypes#56](~/samples/snippets/csharp/VS_Snippets_VBCSharp/CsProgGuideTypes/CS/usingdynamic.cs#56)] - -The role of the compiler in these examples is to package together information about what each statement is proposing to do to the object or expression that is typed as `dynamic`. At run time, the stored information is examined, and any statement that is not valid causes a run-time exception. - -The result of most dynamic operations is itself `dynamic`. For example, if you rest the mouse pointer over the use of `testSum` in the following example, IntelliSense displays the type **(local variable) dynamic testSum**. - -[!code-csharp[CsProgGuideTypes#51](~/samples/snippets/csharp/VS_Snippets_VBCSharp/CsProgGuideTypes/CS/usingdynamic.cs#51)] - -Operations in which the result is not `dynamic` include: - -* Conversions from `dynamic` to another type. -* Constructor calls that include arguments of type `dynamic`. - -For example, the type of `testInstance` in the following declaration is `ExampleClass`, not `dynamic`: - -[!code-csharp[CsProgGuideTypes#52](~/samples/snippets/csharp/VS_Snippets_VBCSharp/CsProgGuideTypes/CS/usingdynamic.cs#52)] - -Conversion examples are shown in the following section, "Conversions." - -## Conversions - -Conversions between dynamic objects and other types are easy. This enables the developer to switch between dynamic and non-dynamic behavior. - -Any object can be converted to dynamic type implicitly, as shown in the following examples. - -[!code-csharp[CsProgGuideTypes#53](~/samples/snippets/csharp/VS_Snippets_VBCSharp/CsProgGuideTypes/CS/usingdynamic.cs#53)] - -Conversely, an implicit conversion can be dynamically applied to any expression of type `dynamic`. - -[!code-csharp[CsProgGuideTypes#54](~/samples/snippets/csharp/VS_Snippets_VBCSharp/CsProgGuideTypes/CS/usingdynamic.cs#54)] - -## Overload resolution with arguments of type dynamic - -Overload resolution occurs at run time instead of at compile time if one or more of the arguments in a method call have the type `dynamic`, or if the receiver of the method call is of type `dynamic`. In the following example, if the only accessible `exampleMethod2` method is defined to take a string argument, sending `d1` as the argument does not cause a compiler error, but it does cause a run-time exception. Overload resolution fails at run time because the run-time type of `d1` is `int`, and `exampleMethod2` requires a string. - -[!code-csharp[CsProgGuideTypes#55](~/samples/snippets/csharp/VS_Snippets_VBCSharp/CsProgGuideTypes/CS/usingdynamic.cs#55)] - -## Dynamic language runtime - -The dynamic language runtime (DLR) is an API that was introduced in .NET Framework 4. It provides the infrastructure that supports the `dynamic` type in C#, and also the implementation of dynamic programming languages such as IronPython and IronRuby. For more information about the DLR, see [Dynamic Language Runtime Overview](../../../framework/reflection-and-codedom/dynamic-language-runtime-overview.md). - -## COM interop - -Many COM methods allow for variation in argument types and return type by designating the types as `object`. This has necessitated explicit casting of the values to coordinate with strongly typed variables in C#. If you compile by using the [**EmbedInteropTypes** (C# Compiler Options)](../../language-reference/compiler-options/inputs.md#embedinteroptypes) option, the introduction of the `dynamic` type enables you to treat the occurrences of `object` in COM signatures as if they were of type `dynamic`, and thereby to avoid much of the casting. For example, the following statements contrast how you access a cell in a Microsoft Office Excel spreadsheet with the `dynamic` type and without the `dynamic` type. - -[!code-csharp[csOfficeWalkthrough#12](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#12)] - -[!code-csharp[csOfficeWalkthrough#13](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs#13)] - -## Related topics - -|Title|Description| -|-----------|-----------------| -|[dynamic](../../language-reference/builtin-types/reference-types.md)|Describes the usage of the `dynamic` keyword.| -|[Dynamic Language Runtime Overview](../../../framework/reflection-and-codedom/dynamic-language-runtime-overview.md)|Provides an overview of the DLR, which is a runtime environment that adds a set of services for dynamic languages to the common language runtime (CLR).| -|[Walkthrough: Creating and Using Dynamic Objects](walkthrough-creating-and-using-dynamic-objects.md)|Provides step-by-step instructions for creating a custom dynamic object and for creating a project that accesses an `IronPython` library.| -|[How to access Office interop objects by using C# features](../interop/how-to-access-office-onterop-objects.md)|Demonstrates how to create a project that uses named and optional arguments, the `dynamic` type, and other enhancements that simplify access to Office API objects.| diff --git a/docs/csharp/programming-guide/types/walkthrough-creating-and-using-dynamic-objects.md b/docs/csharp/programming-guide/types/walkthrough-creating-and-using-dynamic-objects.md deleted file mode 100644 index d04075d202884..0000000000000 --- a/docs/csharp/programming-guide/types/walkthrough-creating-and-using-dynamic-objects.md +++ /dev/null @@ -1,178 +0,0 @@ ---- -title: "Walkthrough: Creating and Using Dynamic Objects (C# and Visual Basic)" -description: Learn how to create and use dynamic objects in this walkthrough. Create a custom dynamic object and a project that uses an 'IronPython' library. -ms.date: 03/24/2021 -dev_langs: - - "csharp" - - "vb" -helpviewer_keywords: - - "dynamic objects [Visual Basic]" - - "dynamic objects" - - "dynamic objects [C#]" ---- -# Walkthrough: Creating and Using Dynamic Objects (C# and Visual Basic) - -Dynamic objects expose members such as properties and methods at run time, instead of at compile time. This enables you to create objects to work with structures that do not match a static type or format. For example, you can use a dynamic object to reference the HTML Document Object Model (DOM), which can contain any combination of valid HTML markup elements and attributes. Because each HTML document is unique, the members for a particular HTML document are determined at run time. A common method to reference an attribute of an HTML element is to pass the name of the attribute to the `GetProperty` method of the element. To reference the `id` attribute of the HTML element `<div id="Div1">`, you first obtain a reference to the `<div>` element, and then use `divElement.GetProperty("id")`. If you use a dynamic object, you can reference the `id` attribute as `divElement.id`. - - Dynamic objects also provide convenient access to dynamic languages such as IronPython and IronRuby. You can use a dynamic object to refer to a dynamic script that is interpreted at run time. - - You reference a dynamic object by using late binding. In C#, you specify the type of a late-bound object as `dynamic`. In Visual Basic, you specify the type of a late-bound object as `Object`. For more information, see [dynamic](../../language-reference/builtin-types/reference-types.md) and [Early and Late Binding](../../../visual-basic/programming-guide/language-features/early-late-binding/index.md). - - You can create custom dynamic objects by using the classes in the <xref:System.Dynamic?displayProperty=nameWithType> namespace. For example, you can create an <xref:System.Dynamic.ExpandoObject> and specify the members of that object at run time. You can also create your own type that inherits the <xref:System.Dynamic.DynamicObject> class. You can then override the members of the <xref:System.Dynamic.DynamicObject> class to provide run-time dynamic functionality. - - This article contains two independent walkthroughs: - -- Create a custom object that dynamically exposes the contents of a text file as properties of an object. - -- Create a project that uses an `IronPython` library. - -You can do either one of these or both of them, and if you do both, the order doesn't matter. - -## Prerequisites - -* [Visual Studio 2019 version 16.9 or a later version](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019) with the **.NET desktop development** workload installed. The .NET 5 SDK is automatically installed when you select this workload. - -[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] - -* For the second walkthrough, install [IronPython](https://ironpython.net/) for .NET. Go to their [Download page](https://ironpython.net/download/) to obtain the latest version. - -## Create a Custom Dynamic Object - -The first walkthrough defines a custom dynamic object that searches the contents of a text file. A dynamic property specifies the text to search for. For example, if calling code specifies `dynamicFile.Sample`, the dynamic class returns a generic list of strings that contains all of the lines from the file that begin with "Sample". The search is case-insensitive. The dynamic class also supports two optional arguments. The first argument is a search option enum value that specifies that the dynamic class should search for matches at the start of the line, the end of the line, or anywhere in the line. The second argument specifies that the dynamic class should trim leading and trailing spaces from each line before searching. For example, if calling code specifies `dynamicFile.Sample(StringSearchOption.Contains)`, the dynamic class searches for "Sample" anywhere in a line. If calling code specifies `dynamicFile.Sample(StringSearchOption.StartsWith, false)`, the dynamic class searches for "Sample" at the start of each line, and does not remove leading and trailing spaces. The default behavior of the dynamic class is to search for a match at the start of each line and to remove leading and trailing spaces. - -### To create a custom dynamic class - -1. Start Visual Studio. - -1. Select **Create a new project**. - -1. In the **Create a new project** dialog, select C# or Visual Basic, select **Console Application**, and then select **Next**. - -1. In the **Configure your new project** dialog, enter `DynamicSample` for the **Project name**, and then select **Next**. - -1. In the **Additional information** dialog, select **.NET 5.0 (Current)** for the **Target Framework**, and then select **Create**. - - The new project is created. - -1. In **Solution Explorer**, right-click the DynamicSample project and select **Add** > **Class**. In the **Name** box, type `ReadOnlyFile`, and then select **Add**. - - A new file is added that contains the ReadOnlyFile class. - -1. At the top of the *ReadOnlyFile.cs* or *ReadOnlyFile.vb* file, add the following code to import the <xref:System.IO?displayProperty=nameWithType> and <xref:System.Dynamic?displayProperty=nameWithType> namespaces. - - [!code-csharp[VbDynamicWalkthrough#1](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs#1)] - [!code-vb[VbDynamicWalkthrough#1](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#1)] - -1. The custom dynamic object uses an enum to determine the search criteria. Before the class statement, add the following enum definition. - - [!code-csharp[VbDynamicWalkthrough#2](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs#2)] - [!code-vb[VbDynamicWalkthrough#2](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#2)] - -1. Update the class statement to inherit the `DynamicObject` class, as shown in the following code example. - - [!code-csharp[VbDynamicWalkthrough#3](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs#3)] - [!code-vb[VbDynamicWalkthrough#3](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#3)] - -1. Add the following code to the `ReadOnlyFile` class to define a private field for the file path and a constructor for the `ReadOnlyFile` class. - - [!code-csharp[VbDynamicWalkthrough#4](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs#4)] - [!code-vb[VbDynamicWalkthrough#4](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#4)] - -1. Add the following `GetPropertyValue` method to the `ReadOnlyFile` class. The `GetPropertyValue` method takes, as input, search criteria and returns the lines from a text file that match that search criteria. The dynamic methods provided by the `ReadOnlyFile` class call the `GetPropertyValue` method to retrieve their respective results. - - [!code-csharp[VbDynamicWalkthrough#5](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs#5)] - [!code-vb[VbDynamicWalkthrough#5](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#5)] - -1. After the `GetPropertyValue` method, add the following code to override the <xref:System.Dynamic.DynamicObject.TryGetMember%2A> method of the <xref:System.Dynamic.DynamicObject> class. The <xref:System.Dynamic.DynamicObject.TryGetMember%2A> method is called when a member of a dynamic class is requested and no arguments are specified. The `binder` argument contains information about the referenced member, and the `result` argument references the result returned for the specified member. The <xref:System.Dynamic.DynamicObject.TryGetMember%2A> method returns a Boolean value that returns `true` if the requested member exists; otherwise it returns `false`. - - [!code-csharp[VbDynamicWalkthrough#6](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs#6)] - [!code-vb[VbDynamicWalkthrough#6](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#6)] - -1. After the `TryGetMember` method, add the following code to override the <xref:System.Dynamic.DynamicObject.TryInvokeMember%2A> method of the <xref:System.Dynamic.DynamicObject> class. The <xref:System.Dynamic.DynamicObject.TryInvokeMember%2A> method is called when a member of a dynamic class is requested with arguments. The `binder` argument contains information about the referenced member, and the `result` argument references the result returned for the specified member. The `args` argument contains an array of the arguments that are passed to the member. The <xref:System.Dynamic.DynamicObject.TryInvokeMember%2A> method returns a Boolean value that returns `true` if the requested member exists; otherwise it returns `false`. - - The custom version of the `TryInvokeMember` method expects the first argument to be a value from the `StringSearchOption` enum that you defined in a previous step. The `TryInvokeMember` method expects the second argument to be a Boolean value. If one or both arguments are valid values, they are passed to the `GetPropertyValue` method to retrieve the results. - - [!code-csharp[VbDynamicWalkthrough#7](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/readonlyfile.cs#7)] - [!code-vb[VbDynamicWalkthrough#7](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#7)] - -1. Save and close the file. - -### To create a sample text file - -1. In **Solution Explorer**, right-click the DynamicSample project and select **Add** > **New Item**. In the **Installed Templates** pane, select **General**, and then select the **Text File** template. Leave the default name of *TextFile1.txt* in the **Name** box, and then click **Add**. A new text file is added to the project. - -1. Copy the following text to the *TextFile1.txt* file. - - ```text - List of customers and suppliers - - Supplier: Lucerne Publishing (https://www.lucernepublishing.com/) - Customer: Preston, Chris - Customer: Hines, Patrick - Customer: Cameron, Maria - Supplier: Graphic Design Institute (https://www.graphicdesigninstitute.com/) - Supplier: Fabrikam, Inc. (https://www.fabrikam.com/) - Customer: Seubert, Roxanne - Supplier: Proseware, Inc. (http://www.proseware.com/) - Customer: Adolphi, Stephan - Customer: Koch, Paul - ``` - -1. Save and close the file. - -### To create a sample application that uses the custom dynamic object - -1. In **Solution Explorer**, double-click the *Program.vb* file if you're using Visual Basic or the *Program.cs* file if you're using Visual C#. - -2. Add the following code to the `Main` procedure to create an instance of the `ReadOnlyFile` class for the *TextFile1.txt* file. The code uses late binding to call dynamic members and retrieve lines of text that contain the string "Customer". - - [!code-csharp[VbDynamicWalkthrough#8](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/program.cs#8)] - [!code-vb[VbDynamicWalkthrough#8](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/Program.vb#8)] - -3. Save the file and press <kbd>Ctrl</kdb>+<kbd>F5</kbd> to build and run the application. - -## Call a dynamic language library - -The following walkthrough creates a project that accesses a library that is written in the dynamic language IronPython. - -### To create a custom dynamic class - -1. In Visual Studio, select **File** > **New** > **Project**. - -1. In the **Create a new project** dialog, select C# or Visual Basic, select **Console Application**, and then select **Next**. - -1. In the **Configure your new project** dialog, enter `DynamicIronPythonSample` for the **Project name**, and then select **Next**. - -1. In the **Additional information** dialog, select **.NET 5.0 (Current)** for the **Target Framework**, and then select **Create**. - - The new project is created. - -1. Install the [IronPython](https://www.nuget.org/packages/IronPython) NuGet package. - -1. If you're using Visual Basic, edit the *Program.vb* file. If you're using Visual C#, edit the *Program.cs* file. - -1. At the top of the file, add the following code to import the `Microsoft.Scripting.Hosting` and `IronPython.Hosting` namespaces from the IronPython libraries and the `System.Linq` namespace. - - [!code-csharp[VbDynamicWalkthroughIronPython#1](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs/program.cs#1)] - [!code-vb[VbDynamicWalkthroughIronPython#1](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/vb/Program.vb#1)] - -1. In the Main method, add the following code to create a new `Microsoft.Scripting.Hosting.ScriptRuntime` object to host the IronPython libraries. The `ScriptRuntime` object loads the IronPython library module random.py. - - [!code-csharp[VbDynamicWalkthroughIronPython#2](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs/program.cs#2)] - [!code-vb[VbDynamicWalkthroughIronPython#2](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/vb/Program.vb#2)] - -1. After the code to load the random.py module, add the following code to create an array of integers. The array is passed to the `shuffle` method of the random.py module, which randomly sorts the values in the array. - - [!code-csharp[VbDynamicWalkthroughIronPython#3](~/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs/program.cs#3)] - [!code-vb[VbDynamicWalkthroughIronPython#3](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/vb/Program.vb#3)] - -1. Save the file and press <kbd>Ctrl</kdb>+<kbd>F5</kbd> to build and run the application. - -## See also - -- <xref:System.Dynamic?displayProperty=nameWithType> -- <xref:System.Dynamic.DynamicObject?displayProperty=nameWithType> -- [Using Type dynamic](./using-type-dynamic.md) -- [Early and Late Binding](../../../visual-basic/programming-guide/language-features/early-late-binding/index.md) -- [dynamic](../../language-reference/builtin-types/reference-types.md) -- [Implementing Dynamic Interfaces (downloadable PDF from Microsoft TechNet)](https://download.microsoft.com/download/5/4/B/54B83DFE-D7AA-4155-9687-B0CF58FF65D7/implementing-dynamic-interfaces.pdf) diff --git a/docs/csharp/roslyn-sdk/snippets/source-generators/SourceGenerator/SourceGenerator.csproj b/docs/csharp/roslyn-sdk/snippets/source-generators/SourceGenerator/SourceGenerator.csproj index 112d3d06270fe..f24ad59fbd0e2 100644 --- a/docs/csharp/roslyn-sdk/snippets/source-generators/SourceGenerator/SourceGenerator.csproj +++ b/docs/csharp/roslyn-sdk/snippets/source-generators/SourceGenerator/SourceGenerator.csproj @@ -5,7 +5,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" PrivateAssets="all" /> + <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" PrivateAssets="all" /> <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" /> </ItemGroup> diff --git a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.CodeFixes/MakeConst.CodeFixes.csproj b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.CodeFixes/MakeConst.CodeFixes.csproj index a37bf98229b42..149c48f8ebf4f 100644 --- a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.CodeFixes/MakeConst.CodeFixes.csproj +++ b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.CodeFixes/MakeConst.CodeFixes.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.0" /> + <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.5.0" /> </ItemGroup> <ItemGroup> diff --git a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test/MakeConst.Test.csproj b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test/MakeConst.Test.csproj index 3ee276acaf533..86843b583e93e 100644 --- a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test/MakeConst.Test.csproj +++ b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test/MakeConst.Test.csproj @@ -8,10 +8,10 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="MSTest.TestAdapter" Version="3.0.2" /> <PackageReference Include="MSTest.TestFramework" Version="3.0.2" /> - <PackageReference Include="Microsoft.CodeAnalysis" Version="4.4.0" /> + <PackageReference Include="Microsoft.CodeAnalysis" Version="4.5.0" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.MSTest" Version="1.1.1" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.MSTest" Version="1.1.1" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeRefactoring.Testing.MSTest" Version="1.1.1" /> diff --git a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Vsix/MakeConst.Vsix.csproj b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Vsix/MakeConst.Vsix.csproj index fdf5a18851e53..0f36eb0dc09e8 100644 --- a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Vsix/MakeConst.Vsix.csproj +++ b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Vsix/MakeConst.Vsix.csproj @@ -24,7 +24,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.4.2120" PrivateAssets="all" /> + <PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.5.4072" PrivateAssets="all" /> </ItemGroup> <PropertyGroup> diff --git a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/MakeConst.csproj b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/MakeConst.csproj index aa3520d30c0a7..528abebf1e3e5 100644 --- a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/MakeConst.csproj +++ b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/MakeConst.csproj @@ -10,7 +10,7 @@ <ItemGroup> <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" /> - <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" /> + <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" /> </ItemGroup> <ItemGroup> diff --git a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConstTestProject/MakeConstTestProject/MakeConstTestProject.csproj b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConstTestProject/MakeConstTestProject/MakeConstTestProject.csproj deleted file mode 100644 index c73e0d1692ab3..0000000000000 --- a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConstTestProject/MakeConstTestProject/MakeConstTestProject.csproj +++ /dev/null @@ -1,8 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>netcoreapp3.1</TargetFramework> - </PropertyGroup> - -</Project> diff --git a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConstTestProject/MakeConstTestProject/Program.cs b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConstTestProject/MakeConstTestProject/Program.cs deleted file mode 100644 index da093e8a2b621..0000000000000 --- a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConstTestProject/MakeConstTestProject/Program.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; - -namespace MakeConstTestProject -{ - class Program - { - static void Main(string[] args) - { - int i = 1; - int j = 2; - int k = i + j; - - // uncomment for analyzer test: - //int x = "abc"; - - object s = "abc"; - - string s2 = "abc"; - - var item = "xyz"; - } - } -} diff --git a/docs/csharp/toc.yml b/docs/csharp/toc.yml index 0fa6604a1c6ae..15ad7d7db9e9f 100644 --- a/docs/csharp/toc.yml +++ b/docs/csharp/toc.yml @@ -11,6 +11,8 @@ items: href: tour-of-csharp/program-building-blocks.md - name: Major language areas href: tour-of-csharp/features.md + - name: C# language strategy + href: tour-of-csharp/strategy.md - name: Tutorials items: - name: Choose your first lesson @@ -146,6 +148,9 @@ items: href: fundamentals/exceptions/how-to-execute-cleanup-code-using-finally.md - name: What's new in C# items: + - name: C# 12 + displayName: what's New + href: whats-new/csharp-12.md - name: C# 11 items: - name: New features @@ -179,16 +184,10 @@ items: href: whats-new/tutorials/interpolated-string-handler.md - name: Tutorials items: - - name: Safely update interfaces with default interface methods - href: tutorials/default-interface-methods-versions.md - - name: Create mixin functionality with default interface methods - href: tutorials/mixins-with-default-interface-methods.md - name: Explore indexes and ranges href: tutorials/ranges-indexes.md - name: Work with nullable reference types href: tutorials/nullable-reference-types.md - - name: Generate and consume asynchronous streams - href: tutorials/generate-consume-asynchronous-stream.md - name: Explore string interpolation - interactive href: tutorials/exploration/interpolated-strings.yml - name: Explore string interpolation - in your environment @@ -201,8 +200,28 @@ items: href: tutorials/console-webapiclient.md - name: Work with LINQ href: tutorials/working-with-linq.md - - name: Use Attributes - href: tutorials/attributes.md +- name: Asynchronous programming + items: + - name: Overview + displayName: asynchronous programming, async, await + href: asynchronous-programming/index.md + - name: Asynchronous programming scenarios + href: asynchronous-programming/async-scenarios.md + - name: Task asynchronous programming model + href: asynchronous-programming/task-asynchronous-programming-model.md + - name: Async return types + displayName: Task, Task<T>, ValueTask, ValueTask<T> + href: asynchronous-programming/async-return-types.md + - name: Process asynchronous tasks as they complete + href: asynchronous-programming/start-multiple-async-tasks-and-process-them-as-they-complete.md + - name: Asynchronous file access + href: asynchronous-programming/using-async-for-file-access.md + - name: Cancel a list of tasks + href: asynchronous-programming/cancel-an-async-task-or-a-list-of-tasks.md + - name: Cancel tasks after a period of time + href: asynchronous-programming/cancel-async-tasks-after-a-period-of-time.md + - name: Generate and consume asynchronous streams + href: asynchronous-programming/generate-consume-asynchronous-stream.md - name: C# concepts items: - name: Nullable reference types @@ -277,28 +296,6 @@ items: href: linq/handle-null-values-in-query-expressions.md - name: Handle exceptions in query expressions href: linq/handle-exceptions-in-query-expressions.md - - name: Write safe, efficient code - href: write-safe-efficient-code.md - - name: Expression trees - items: - - name: Introduction to expression trees - href: expression-trees.md - - name: Expression Trees Explained - href: expression-trees-explained.md - - name: Framework Types Supporting Expression Trees - href: expression-classes.md - - name: Executing Expressions - href: expression-trees-execution.md - - name: Interpreting Expressions - href: expression-trees-interpreting.md - - name: Building Expressions - href: expression-trees-building.md - - name: Translating Expressions - href: expression-trees-translating.md - - name: Summary - href: expression-trees-summary.md - - name: Native interoperability - href: programming-guide/interop/index.md - name: Versioning href: versioning.md - name: How-to C# articles @@ -318,6 +315,80 @@ items: href: how-to/compare-strings.md - name: "How to catch a non-CLS exception" href: how-to/how-to-catch-a-non-cls-exception.md +- name: Advanced topics + items: + - name: Reflection and Attributes + items: + - name: Overview + displayName: attributes, reflection + href: advanced-topics/reflection-and-attributes/index.md + - name: Create custom attributes + href: advanced-topics/reflection-and-attributes/creating-custom-attributes.md + - name: Access attributes using reflection + href: advanced-topics/reflection-and-attributes/accessing-attributes-by-using-reflection.md + - name: "How to create a C/C++ union by using attributes" + href: advanced-topics/reflection-and-attributes/how-to-create-a-c-cpp-union-by-using-attributes.md + - name: Generics and attributes + href: advanced-topics/reflection-and-attributes/generics-and-attributes.md + - name: "How to query an assembly's metadata with reflection and LINQ" + href: advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq.md + - name: Generics and reflection + href: advanced-topics/reflection-and-attributes/generics-and-reflection.md + - name: "Tutorial: Define and use attributes" + href: advanced-topics/reflection-and-attributes/attribute-tutorial.md + - name: Interface implementations + items: + - name: Safely update interfaces with default interface methods + href: advanced-topics/interface-implementation/default-interface-methods-versions.md + - name: Create mixin functionality with default interface methods + href: advanced-topics/interface-implementation/mixins-with-default-interface-methods.md + - name: Expression trees + items: + - name: Overview + displayName: expression trees + href: advanced-topics/expression-trees/index.md + - name: Expression Trees Explained + href: advanced-topics/expression-trees/expression-trees-explained.md + - name: Framework Types Supporting Expression Trees + href: advanced-topics/expression-trees/expression-classes.md + - name: Execute expressions + href: advanced-topics/expression-trees/expression-trees-execution.md + - name: Interpret expressions + href: advanced-topics/expression-trees/expression-trees-interpreting.md + - name: Build expressions + href: advanced-topics/expression-trees/expression-trees-building.md + - name: Translate expressions + href: advanced-topics/expression-trees/expression-trees-translating.md + - name: Debug expression trees in Visual Studio + href: advanced-topics/expression-trees/debugging-expression-trees-in-visual-studio.md + - name: DebugView Syntax + href: advanced-topics/expression-trees/debugview-syntax.md + - name: Native interoperability + items: + - name: Overview + href: advanced-topics/interop/index.md + - name: Example COM Class + href: advanced-topics/interop/example-com-class.md + - name: "Walkthrough: Office Programming" + href: advanced-topics/interop/walkthrough-office-programming.md + - name: "How to use platform invoke to play a WAV file" + href: advanced-topics/interop/how-to-use-platform-invoke-to-play-a-wave-file.md + - name: "How to use indexed properties in COM interop programming" + href: advanced-topics/interop/how-to-use-indexed-properties-in-com-interop-programming.md + - name: "How to access Office interop objects" + href: advanced-topics/interop/how-to-access-office-interop-objects.md + - name: "How to use named and optional arguments in Office programming" + href: advanced-topics/interop/how-to-use-named-and-optional-arguments-in-office-programming.md + - name: Using Type dynamic + href: advanced-topics/interop/using-type-dynamic.md + - name: "Walkthrough: Creating and Using Dynamic Objects" + href: advanced-topics/interop/walkthrough-creating-and-using-dynamic-objects.md + - name: Performance engineering + items: + - name: Overview + href: advanced-topics/performance/index.md + - name: Tutorial - reduce allocations + href: advanced-topics/performance/ref-tutorial.md - name: The .NET Compiler Platform SDK (Roslyn APIs) items: - name: The .NET Compiler Platform SDK (Roslyn APIs) overview @@ -375,39 +446,6 @@ items: - name: Overview displayName: programming concepts href: programming-guide/concepts/index.md - - name: Asynchronous programming - displayName: async, await, asynchronous programming, task, cancellation - items: - - name: Overview - displayName: asynchronous programming - href: programming-guide/concepts/async/index.md - - name: Asynchronous programming scenarios - href: async.md - - name: Task asynchronous programming model - href: programming-guide/concepts/async/task-asynchronous-programming-model.md - - name: Async return types - href: programming-guide/concepts/async/async-return-types.md - - name: Cancel tasks - items: - - name: Cancel a list of tasks - href: programming-guide/concepts/async/cancel-an-async-task-or-a-list-of-tasks.md - - name: Cancel tasks after a period of time - href: programming-guide/concepts/async/cancel-async-tasks-after-a-period-of-time.md - - name: Process asynchronous tasks as they complete - href: programming-guide/concepts/async/start-multiple-async-tasks-and-process-them-as-they-complete.md - - name: Asynchronous file access - href: programming-guide/concepts/async/using-async-for-file-access.md - - name: Attributes - items: - - name: Overview - displayName: attributes - href: programming-guide/concepts/attributes/index.md - - name: Creating Custom Attributes - href: programming-guide/concepts/attributes/creating-custom-attributes.md - - name: Accessing Attributes by Using Reflection - href: programming-guide/concepts/attributes/accessing-attributes-by-using-reflection.md - - name: "How to create a C/C++ union by using attributes" - href: programming-guide/concepts/attributes/how-to-create-a-c-cpp-union-by-using-attributes.md - name: Collections href: programming-guide/concepts/collections.md - name: Covariance and contravariance @@ -429,21 +467,6 @@ items: href: programming-guide/concepts/covariance-contravariance/using-variance-in-delegates.md - name: Use Variance for Func and Action Generic Delegates href: programming-guide/concepts/covariance-contravariance/using-variance-for-func-and-action-generic-delegates.md - - name: Expression trees - items: - - name: Overview - displayName: expression trees - href: programming-guide/concepts/expression-trees/index.md - - name: "How to execute expression trees" - href: programming-guide/concepts/expression-trees/how-to-execute-expression-trees.md - - name: "How to modify expression trees" - href: programming-guide/concepts/expression-trees/how-to-modify-expression-trees.md - - name: "How to use expression trees to build dynamic queries" - href: programming-guide/concepts/expression-trees/how-to-use-expression-trees-to-build-dynamic-queries.md - - name: Debugging Expression Trees in Visual Studio - href: programming-guide/concepts/expression-trees/debugging-expression-trees-in-visual-studio.md - - name: DebugView Syntax - href: programming-guide/concepts/expression-trees/debugview-syntax.md - name: Iterators href: programming-guide/concepts/iterators.md - name: Language-Integrated Query (LINQ) @@ -537,10 +560,8 @@ items: href: programming-guide/concepts/linq/how-to-join-content-from-dissimilar-files-linq.md - name: "How to compute column values in a CSV text file (LINQ)" href: programming-guide/concepts/linq/how-to-compute-column-values-in-a-csv-text-file-linq.md - - name: LINQ and Reflection - href: programming-guide/concepts/linq/how-to-query-an-assembly-s-metadata-with-reflection-linq.md - - name: "How to query an assembly's metadata with Reflection (LINQ)" - href: programming-guide/concepts/linq/how-to-query-an-assembly-s-metadata-with-reflection-linq.md + - name: "How to use expression trees to build dynamic queries" + href: programming-guide/concepts/linq/how-to-use-expression-trees-to-build-dynamic-queries.md - name: LINQ and File Directories items: - name: Overview @@ -569,19 +590,6 @@ items: href: programming-guide/concepts/linq/enabling-a-data-source-for-linq-querying1.md - name: Visual Studio IDE and Tools Support for LINQ href: programming-guide/concepts/linq/visual-studio-ide-and-tools-support-for-linq.md - - name: Reflection - href: programming-guide/concepts/reflection.md - - name: Serialization (C#) - items: - - name: Overview - displayName: serialization - href: programming-guide/concepts/serialization/index.md - - name: "How to write object data to an XML file" - href: programming-guide/concepts/serialization/how-to-write-object-data-to-an-xml-file.md - - name: "How to read object data from an XML file" - href: programming-guide/concepts/serialization/how-to-read-object-data-from-an-xml-file.md - - name: "Walkthrough: Persisting an Object in Visual Studio" - href: programming-guide/concepts/serialization/walkthrough-persisting-an-object-in-visual-studio.md - name: Statements, expressions, and equality items: - name: Statements @@ -608,10 +616,6 @@ items: href: programming-guide/types/how-to-convert-a-string-to-a-number.md - name: "How to convert between hexadecimal strings and numeric types" href: programming-guide/types/how-to-convert-between-hexadecimal-strings-and-numeric-types.md - - name: Using Type dynamic - href: programming-guide/types/using-type-dynamic.md - - name: "Walkthrough: Creating and Using Dynamic Objects (C# and Visual Basic)" - href: programming-guide/types/walkthrough-creating-and-using-dynamic-objects.md - name: Classes, Structs, and Records items: - name: Polymorphism @@ -674,19 +678,17 @@ items: href: programming-guide/classes-and-structs/how-to-create-a-new-method-for-an-enumeration.md - name: Named and Optional Arguments href: programming-guide/classes-and-structs/named-and-optional-arguments.md - - name: "How to use named and optional arguments in Office programming" - href: programming-guide/classes-and-structs/how-to-use-named-and-optional-arguments-in-office-programming.md - name: Constructors items: - name: Constructors overview href: programming-guide/classes-and-structs/constructors.md - - name: Using Constructors + - name: Using constructors href: programming-guide/classes-and-structs/using-constructors.md - - name: Instance Constructors + - name: Instance constructors href: programming-guide/classes-and-structs/instance-constructors.md - - name: Private Constructors + - name: Private constructors href: programming-guide/classes-and-structs/private-constructors.md - - name: Static Constructors + - name: Static constructors href: programming-guide/classes-and-structs/static-constructors.md - name: "How to write a copy constructor" href: programming-guide/classes-and-structs/how-to-write-a-copy-constructor.md @@ -794,49 +796,6 @@ items: href: programming-guide/generics/differences-between-cpp-templates-and-csharp-generics.md - name: Generics in the Run Time href: programming-guide/generics/generics-in-the-run-time.md - - name: Generics and Reflection - href: programming-guide/generics/generics-and-reflection.md - - name: Generics and Attributes - href: programming-guide/generics/generics-and-attributes.md - - name: File System and the Registry - items: - - name: Overview - displayName: file system registry - href: programming-guide/file-system/index.md - - name: "How to iterate through a directory tree" - href: programming-guide/file-system/how-to-iterate-through-a-directory-tree.md - - name: "How to get information about files, folders, and drives" - href: programming-guide/file-system/how-to-get-information-about-files-folders-and-drives.md - - name: "How to create a file or folder" - href: programming-guide/file-system/how-to-create-a-file-or-folder.md - - name: "How to copy, delete, and move files and folders" - href: programming-guide/file-system/how-to-copy-delete-and-move-files-and-folders.md - - name: "How to provide a progress dialog box for file operations" - href: programming-guide/file-system/how-to-provide-a-progress-dialog-box-for-file-operations.md - - name: "How to write to a text file" - href: programming-guide/file-system/how-to-write-to-a-text-file.md - - name: "How to read From a text file" - href: programming-guide/file-system/how-to-read-from-a-text-file.md - - name: "How to read a text file one line at a time" - href: programming-guide/file-system/how-to-read-a-text-file-one-line-at-a-time.md - - name: "How to create a key in the registry" - href: programming-guide/file-system/how-to-create-a-key-in-the-registry.md - - name: Interoperability - items: - - name: .NET Interoperability - href: programming-guide/interop/index.md - - name: Interoperability Overview - href: programming-guide/interop/interoperability-overview.md - - name: "How to access Office interop objects by using C# features" - href: programming-guide/interop/how-to-access-office-onterop-objects.md - - name: "How to use indexed properties in COM interop programming" - href: programming-guide/interop/how-to-use-indexed-properties-in-com-interop-rogramming.md - - name: "How to use platform invoke to play a WAV file" - href: programming-guide/interop/how-to-use-platform-invoke-to-play-a-wave-file.md - - name: "Walkthrough: Office Programming (C# and Visual Basic)" - href: programming-guide/interop/walkthrough-office-programming.md - - name: Example COM Class - href: programming-guide/interop/example-com-class.md - name: Language reference items: - name: Overview @@ -996,14 +955,8 @@ items: items: - name: namespace href: language-reference/keywords/namespace.md - - name: using - items: - - name: Contexts for using - href: language-reference/keywords/using.md - - name: using Directive - href: language-reference/keywords/using-directive.md - - name: using Statement - href: language-reference/keywords/using-statement.md + - name: using directive + href: language-reference/keywords/using-directive.md - name: extern alias href: language-reference/keywords/extern-alias.md - name: Generic Type Constraint Keywords @@ -1101,7 +1054,7 @@ items: - name: Comparison operators href: language-reference/operators/comparison-operators.md displayName: ">, <, >=, <=, greater, less" - - name: Member access operators and expressions + - name: Member access and null-conditional operators and expressions href: language-reference/operators/member-access-operators.md displayName: "., [], ?., ?[], (), indexer, null-conditional, Elvis, invocation, ^, index from end, hat, .., range" - name: Type-testing operators and cast expression @@ -1199,6 +1152,9 @@ items: - name: lock statement displayName: thread synchronization, monitor href: language-reference/statements/lock.md + - name: using statement + displayName: dispose, disposable, await using, using declaration + href: language-reference/statements/using.md - name: yield statement displayName: iterator, yield break, yield return href: language-reference/statements/yield.md @@ -1307,6 +1263,8 @@ items: href: ../../_csharpstandard/standard/variables.md - name: Conversions href: ../../_csharpstandard/standard/conversions.md + - name: patterns + href: ../../_csharpstandard/standard/patterns.md - name: Expressions href: ../../_csharpstandard/standard/expressions.md - name: Statements @@ -1341,46 +1299,22 @@ items: href: ../../_csharpstandard/standard/documentation-comments.md - name: Bibliography href: ../../_csharpstandard/standard/bibliography.md - - name: C# 7.0 - 11.0 features + - name: C# 7.0 - 12 features items: - - name: C# 7.0 features + - name: C# 7.n features items: - - name: Pattern matching - href: ../../_csharplang/proposals/csharp-7.0/pattern-matching.md - - name: Out variable declarations - href: ../../_csharplang/proposals/csharp-7.0/out-var.md - name: Async task types href: ../../_csharplang/proposals/csharp-7.0/task-types.md - - name: C# 7.1 features - items: - - name: Infer tuple names - href: ../../_csharplang/proposals/csharp-7.1/infer-tuple-names.md - - name: Pattern matching with generics - href: ../../_csharplang/proposals/csharp-7.1/generics-pattern-match.md - - name: C# 7.2 features - items: - name: Readonly references href: ../../_csharplang/proposals/csharp-7.2/readonly-ref.md - name: Compile-time safety for ref-like types href: ../../_csharplang/proposals/csharp-7.2/span-safety.md - name: Conditional ref href: ../../_csharplang/proposals/csharp-7.2/conditional-ref.md - - name: C# 7.3 features - items: - - name: Unmanaged generic type constraints - href: ../../_csharplang/proposals/csharp-7.3/blittable.md - - name: Indexing `fixed` fields should not require pinning regardless of the movable/unmovable context - href: ../../_csharplang/proposals/csharp-7.3/indexing-movable-fixed-fields.md - - name: Pattern-based `fixed` statement - href: ../../_csharplang/proposals/csharp-7.3/pattern-based-fixed.md - name: Ref local reassignment href: ../../_csharplang/proposals/csharp-7.3/ref-local-reassignment.md - name: Stackalloc array initializers href: ../../_csharplang/proposals/csharp-7.3/stackalloc-array-initializers.md - - name: Expression variables in initializers - href: ../../_csharplang/proposals/csharp-7.3/expression-variables-in-initializers.md - - name: Tuple equality (==) and inequality (!=) - href: ../../_csharplang/proposals/csharp-7.3/tuple-equality.md - name: C# 8.0 features items: - name: Nullable reference types - proposal @@ -1501,3 +1435,11 @@ items: href: ../../_csharplang/proposals/csharp-11.0/file-local-types.md - name: Generic attributes href: ../../_csharplang/proposals/csharp-11.0/generic-attributes.md + - name: C# Preview features + items: + - name: Primary constructors + href: ../../_csharplang/proposals/primary-constructors.md + - name: Alias any type + href: ../../_csharplang/proposals/using-alias-types.md + - name: Optional Lambda expression parameters + href: ../../_csharplang/proposals/lambda-method-group-defaults.md diff --git a/docs/csharp/tour-of-csharp/features.md b/docs/csharp/tour-of-csharp/features.md index 428aefd003b94..3048c067398c5 100644 --- a/docs/csharp/tour-of-csharp/features.md +++ b/docs/csharp/tour-of-csharp/features.md @@ -94,7 +94,7 @@ This small sample shows the major features for asynchronous programming: ## Attributes -Types, members, and other entities in a C# program support modifiers that control certain aspects of their behavior. For example, the accessibility of a method is controlled using the `public`, `protected`, `internal`, and `private` modifiers. C# generalizes this capability such that user-defined types of declarative information can be attached to program entities and retrieved at run-time. Programs specify this declarative information by defining and using [***attributes***](../programming-guide/concepts/attributes/index.md). +Types, members, and other entities in a C# program support modifiers that control certain aspects of their behavior. For example, the accessibility of a method is controlled using the `public`, `protected`, `internal`, and `private` modifiers. C# generalizes this capability such that user-defined types of declarative information can be attached to program entities and retrieved at run-time. Programs specify this declarative information by defining and using [***attributes***](/dotnet/csharp/advanced-topics/reflection-and-attributes). The following example declares a `HelpAttribute` attribute that can be placed on program entities to provide links to their associated documentation. diff --git a/docs/csharp/tour-of-csharp/index.md b/docs/csharp/tour-of-csharp/index.md index 883e8668b43c1..188b17dd6f0d7 100644 --- a/docs/csharp/tour-of-csharp/index.md +++ b/docs/csharp/tour-of-csharp/index.md @@ -10,7 +10,7 @@ C# (pronounced "See Sharp") is a modern, object-oriented, and type-safe programm C# is an object-oriented, ***component-oriented*** programming language. C# provides language constructs to directly support these concepts, making C# a natural language in which to create and use software components. Since its origin, C# has added features to support new workloads and emerging software design practices. At its core, C# is an ***object-oriented*** language. You define types and their behavior. -Several C# features help create robust and durable applications. [***Garbage collection***](../../standard/garbage-collection/index.md) automatically reclaims memory occupied by unreachable unused objects. [***Nullable types***](../nullable-references.md) guard against variables that don't refer to allocated objects. [***Exception handling***](../fundamentals/exceptions/index.md) provides a structured and extensible approach to error detection and recovery. [***Lambda expressions***](../language-reference/operators/lambda-expressions.md) support functional programming techniques. [***Language Integrated Query (LINQ)***](../linq/index.md) syntax creates a common pattern for working with data from any source. Language support for [***asynchronous operations***](../programming-guide/concepts/async/index.md) provides syntax for building distributed systems. C# has a [***unified type system***](../fundamentals/types/index.md). All C# types, including primitive types such as `int` and `double`, inherit from a single root `object` type. All types share a set of common operations. Values of any type can be stored, transported, and operated upon in a consistent manner. Furthermore, C# supports both user-defined [reference types](../language-reference/builtin-types/reference-types.md) and [value types](../language-reference/builtin-types/value-types.md). C# allows dynamic allocation of objects and in-line storage of lightweight structures. C# supports generic methods and types, which provide increased type safety and performance. C# provides iterators, which enable implementers of collection classes to define custom behaviors for client code. +Several C# features help create robust and durable applications. [***Garbage collection***](../../standard/garbage-collection/index.md) automatically reclaims memory occupied by unreachable unused objects. [***Nullable types***](../nullable-references.md) guard against variables that don't refer to allocated objects. [***Exception handling***](../fundamentals/exceptions/index.md) provides a structured and extensible approach to error detection and recovery. [***Lambda expressions***](../language-reference/operators/lambda-expressions.md) support functional programming techniques. [***Language Integrated Query (LINQ)***](../linq/index.md) syntax creates a common pattern for working with data from any source. Language support for [***asynchronous operations***](../asynchronous-programming/index.md) provides syntax for building distributed systems. C# has a [***unified type system***](../fundamentals/types/index.md). All C# types, including primitive types such as `int` and `double`, inherit from a single root `object` type. All types share a set of common operations. Values of any type can be stored, transported, and operated upon in a consistent manner. Furthermore, C# supports both user-defined [reference types](../language-reference/builtin-types/reference-types.md) and [value types](../language-reference/builtin-types/value-types.md). C# allows dynamic allocation of objects and in-line storage of lightweight structures. C# supports generic methods and types, which provide increased type safety and performance. C# provides iterators, which enable implementers of collection classes to define custom behaviors for client code. C# emphasizes ***versioning*** to ensure programs and libraries can evolve over time in a compatible manner. Aspects of C#'s design that were directly influenced by versioning considerations include the separate `virtual` and `override` modifiers, the rules for method overload resolution, and support for explicit interface member declarations. diff --git a/docs/csharp/tour-of-csharp/snippets/shared/Features.cs b/docs/csharp/tour-of-csharp/snippets/shared/Features.cs index 2979d33c94c06..6255fc601ef86 100644 --- a/docs/csharp/tour-of-csharp/snippets/shared/Features.cs +++ b/docs/csharp/tour-of-csharp/snippets/shared/Features.cs @@ -51,10 +51,10 @@ public string Topic // </DefineAttribute> // <UseAttributes> -[Help("https://docs.microsoft.com/dotnet/csharp/tour-of-csharp/features")] +[Help("https://learn.microsoft.com/dotnet/csharp/tour-of-csharp/features")] public class Widget { - [Help("https://docs.microsoft.com/dotnet/csharp/tour-of-csharp/features", + [Help("https://learn.microsoft.com/dotnet/csharp/tour-of-csharp/features", Topic = "Display")] public void Display(string text) { } } @@ -88,7 +88,7 @@ public static void Examples() public async Task<int> RetrieveDocsHomePage() { var client = new HttpClient(); - byte[] content = await client.GetByteArrayAsync("https://docs.microsoft.com/"); + byte[] content = await client.GetByteArrayAsync("https://learn.microsoft.com/"); Console.WriteLine($"{nameof(RetrieveDocsHomePage)}: Finished downloading."); return content.Length; diff --git a/docs/csharp/tour-of-csharp/strategy.md b/docs/csharp/tour-of-csharp/strategy.md new file mode 100644 index 0000000000000..02efff61700d1 --- /dev/null +++ b/docs/csharp/tour-of-csharp/strategy.md @@ -0,0 +1,33 @@ +--- +title: C# language strategy +description: We will keep evolving C# to meet the changing needs of developers and remain a state-of-the-art programming language. We will innovate eagerly and broadly in collaboration with C# developers +ms.date: 02/06/2023 +ms.custom: UpdateFrequency5 +--- +# Annotated C# strategy + +[!INCLUDE [csharp](../../../includes/csharp-strategy.md)] + +## How strategy guides C\# + +The C# strategy guides our decisions about C# evolution, and these annotations provide insight into how we think about key statements. + +> "we will innovate eagerly and broadly" + +The C# community continues to grow, and the C# language continues to evolve to meet the community's needs and expectations. We draw inspiration from a variety of sources to select features that benefit a large segment of C# developers, and that provide consistent improvements in productivity, readability, and performance. + +> "being careful to stay within the spirit of the language" + +We evaluate new ideas in the spirit and history of the C# language. We prioritize innovations that make sense to the majority of existing C# developers. + +> "improvements that benefit all or most developers" + +Developers use C# in all .NET workloads, such as web front and back ends, cloud native development, desktop development and building cross platform applications. We focus on new features that have the most impact either directly, or by empowering improvements to common libraries. Language feature development includes integration into our developer tools and learning resources. + +> "high commitment to backwards compatibility" + +We respect that there is a massive amount of C# code in use today. Any potential breaking change is carefully considered against the scale and impact of disruption to the C# community. + +> "maintaining stewardship" + +[C# language design](https://github.com/dotnet/csharplang/tree/main/meetings) takes place in the open with community participation. Anyone can propose new C# features in our [GitHub repos](https://github.com/dotnet/csharplang). The [Language Design Team](https://github.com/dotnet/csharplang/tree/main/meetings) makes the final decisions after weighing community input. diff --git a/docs/csharp/tour-of-csharp/tutorials/arrays-and-collections.md b/docs/csharp/tour-of-csharp/tutorials/arrays-and-collections.md index 628ee587ac36c..53a97f1d81595 100644 --- a/docs/csharp/tour-of-csharp/tutorials/arrays-and-collections.md +++ b/docs/csharp/tour-of-csharp/tutorials/arrays-and-collections.md @@ -113,9 +113,9 @@ Save the file and type `dotnet run` to try this latest version. Before you start the next section, let's move the current code into a separate method. That makes it easier to start working with a new example. Place all the code you've written in a new method called `WorkWithStrings()`. Call that method at the top of your program. When you finish, your code should look like this: ```csharp -WorkWithString(); +WorkWithStrings(); -void WorkWithString() +void WorkWithStrings() { var names = new List<string> { "<name>", "Ana", "Felipe" }; foreach (var name in names) @@ -185,13 +185,15 @@ var previous2 = fibonacciNumbers[fibonacciNumbers.Count - 2]; fibonacciNumbers.Add(previous + previous2); foreach (var item in fibonacciNumbers) +{ Console.WriteLine(item); +} ``` Save the file and type `dotnet run` to see the results. > [!TIP] -> To concentrate on just this section, you can comment out the code that calls `WorkingWithStrings();`. Just put two `/` characters in front of the call like this: `// WorkingWithStrings();`. +> To concentrate on just this section, you can comment out the code that calls `WorkWithStrings();`. Just put two `/` characters in front of the call like this: `// WorkWithStrings();`. ## Challenge diff --git a/docs/csharp/tour-of-csharp/tutorials/branches-and-loops.yml b/docs/csharp/tour-of-csharp/tutorials/branches-and-loops.yml index 5a96e427ceeb6..99333ea7af2e6 100644 --- a/docs/csharp/tour-of-csharp/tutorials/branches-and-loops.yml +++ b/docs/csharp/tour-of-csharp/tutorials/branches-and-loops.yml @@ -201,7 +201,7 @@ items: `for` loop. Try this code in the interactive window: ```csharp - for(int counter = 0; counter < 10; counter++) + for (int counter = 0; counter < 10; counter++) { Console.WriteLine($"Hello World! The counter is {counter}"); } diff --git a/docs/csharp/tour-of-csharp/tutorials/hello-world.yml b/docs/csharp/tour-of-csharp/tutorials/hello-world.yml index 4fa0003c23a5e..fc770b87d238e 100644 --- a/docs/csharp/tour-of-csharp/tutorials/hello-world.yml +++ b/docs/csharp/tour-of-csharp/tutorials/hello-world.yml @@ -130,6 +130,8 @@ items: content: | You've been using a *method*, <xref:System.Console.WriteLine%2A?displayProperty=nameWithType>, to print messages. A *method* is a block of code that implements some action. It has a name, so you can access it. + ## Trim + Suppose your strings have leading or trailing spaces that you don't want to display. You want to **trim** the spaces from the strings. The <xref:System.String.Trim%2A> method and related methods <xref:System.String.TrimStart%2A> and <xref:System.String.TrimEnd%2A> do that work. You can just use those methods to remove leading and trailing spaces. Try the following code: @@ -151,6 +153,8 @@ items: This sample reinforces a couple of important concepts for working with strings. The methods that manipulate strings return new string objects rather than making modifications in place. You can see that each call to any of the `Trim` methods returns a new string but doesn't change the original message. + ## Replace + There are other methods available to work with a string. For example, you've probably used a search and replace command in an editor or word processor before. The <xref:System.String.Replace%2A> method does something similar in a string. It searches for a substring and replaces it with different text. The <xref:System.String.Replace%2A> method takes two **parameters**. These are the strings between the parentheses. The first string is the text to search for. The second string is the text to replace it with. Try it for yourself. Add this code. Type it in to see the hints as you start typing `.Re` after the `sayHello` variable: ```csharp diff --git a/docs/csharp/tour-of-csharp/tutorials/list-collection.yml b/docs/csharp/tour-of-csharp/tutorials/list-collection.yml index 53ca17d0bd5d1..4d62662851ff4 100644 --- a/docs/csharp/tour-of-csharp/tutorials/list-collection.yml +++ b/docs/csharp/tour-of-csharp/tutorials/list-collection.yml @@ -82,8 +82,9 @@ items: ```csharp var index = names.IndexOf("Felipe"); if (index != -1) + { Console.WriteLine($"The name {names[index]} is at index {index}"); - + } var notFound = names.IndexOf("Not Found"); Console.WriteLine($"When an item is not found, IndexOf returns {notFound}"); ``` @@ -118,7 +119,9 @@ items: fibonacciNumbers.Add(previous + previous2); foreach(var item in fibonacciNumbers) + { Console.WriteLine(item); + } ``` Press **Run** to see the results; @@ -144,7 +147,9 @@ items: fibonacciNumbers.Add(previous + previous2); } foreach(var item in fibonacciNumbers) + { Console.WriteLine(item); + } ``` With each iteration of the loop, you're taking the last two integers in the list, summing them, and adding that value to the list. The loop repeats until you've added 20 items to the list. diff --git a/docs/csharp/tutorials/attributes.md b/docs/csharp/tutorials/attributes.md deleted file mode 100644 index ac52f1f28e6ed..0000000000000 --- a/docs/csharp/tutorials/attributes.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: "Tutorial: Use attributes - C#" -description: Learn how attributes work in C#. -author: mgroves -ms.technology: csharp-fundamentals -ms.date: 03/06/2017 -ms.assetid: b152cf36-76e4-43a5-b805-1a1952e53b79 ---- - -# Use Attributes in C\# - -Attributes provide a way of associating information with code in a declarative way. They can also provide a reusable element that can be applied to a variety of targets. - -Consider the `[Obsolete]` attribute. It can be applied to classes, structs, methods, constructors, and more. It _declares_ that the element is obsolete. It's then up to the C# -compiler to look for this attribute, and do some action in response. - -In this tutorial, you'll be introduced to how to add attributes to your code, how to create and use your own attributes, and how to use some -attributes that are built into .NET Core. - -## Prerequisites - -You’ll need to set up your machine to run .NET core. You can find the -installation instructions on the [.NET Core Downloads](https://dotnet.microsoft.com/download) page. -You can run this application on Windows, Ubuntu Linux, macOS or in a Docker container. -You’ll need to install your favorite code editor. The descriptions below -use [Visual Studio Code](https://code.visualstudio.com/) which is an open -source, cross platform editor. However, you can use whatever tools you are -comfortable with. - -## Create the Application - -Now that you've installed all the tools, create a new .NET Core application. To use the command line generator, execute the following command in your favorite shell: - -`dotnet new console` - -This command will create bare-bones .NET core project files. You will need to execute `dotnet restore` to restore the dependencies needed to compile this project. - -[!INCLUDE[DotNet Restore Note](~/includes/dotnet-restore-note.md)] - -To execute the program, use `dotnet run`. You should see "Hello, World" output to the console. - -## How to add attributes to code - -In C#, attributes are classes that inherit from the `Attribute` base class. Any class that inherits from `Attribute` can be used as a sort of "tag" on other pieces of code. -For instance, there is an attribute called `ObsoleteAttribute`. This is used to signal that code is obsolete and shouldn't be used anymore. You can place this attribute on a class, -for instance, by using square brackets. - -[!code-csharp[Obsolete attribute example](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#ObsoleteExample1)] - -Note that while the class is called `ObsoleteAttribute`, it's only necessary to use `[Obsolete]` in the code. This is a convention that C# follows. -You can use the full name `[ObsoleteAttribute]` if you choose. - -When marking a class obsolete, it's a good idea to provide some information as to *why* it's obsolete, and/or *what* to use instead. Do this by passing a string -parameter to the Obsolete attribute. - -[!code-csharp[Obsolete attribute example with parameters](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#ObsoleteExample2)] - -The string is being passed as an argument to an `ObsoleteAttribute` constructor, just as if you were writing `var attr = new ObsoleteAttribute("some string")`. - -Parameters to an attribute constructor are limited to simple types/literals: `bool, int, double, string, Type, enums, etc` and arrays of those types. -You can not use an expression or a variable. You are free to use positional or named parameters. - -## How to create your own attribute - -Creating an attribute is as simple as inheriting from the `Attribute` base class. - -[!code-csharp[Create your own attribute](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#CreateAttributeExample1)] - -With the above, I can now use `[MySpecial]` (or `[MySpecialAttribute]`) as an attribute elsewhere in the code base. - -[!code-csharp[Using your own attribute](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#CreateAttributeExample2)] - -Attributes in the .NET base class library like `ObsoleteAttribute` trigger certain behaviors within the compiler. However, any attribute you create acts -only as metadata, and doesn't result in any code within the attribute class being executed. It's up to you to act -on that metadata elsewhere in your code (more on that later in the tutorial). - -There is a 'gotcha' here to watch out for. As mentioned above, only certain types are allowed to be passed as arguments when using attributes. However, when creating an attribute type, -the C# compiler won't stop you from creating those parameters. In the below example, I've created an attribute with a constructor that compiles just fine. - -[!code-csharp[Valid constructor used in an attribute](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#AttributeGothca1)] - -However, you will be unable to use this constructor with attribute syntax. - -[!code-csharp[Invalid attempt to use the attribute constructor](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#AttributeGotcha2)] - -The above will cause a compiler error like `Attribute constructor parameter 'myClass' has type 'Foo', which is not a valid attribute parameter type` - -## How to restrict attribute usage - -Attributes can be used on a number of "targets". The above examples show them on classes, but they can also be used on: - -* Assembly -* Class -* Constructor -* Delegate -* Enum -* Event -* Field -* GenericParameter -* Interface -* Method -* Module -* Parameter -* Property -* ReturnValue -* Struct - -When you create an attribute class, by default, C# will allow you to use that attribute on any of the possible attribute targets. If you want to restrict your attribute -to certain targets, you can do so by using the `AttributeUsageAttribute` on your attribute class. That's right, an attribute on an attribute! - -[!code-csharp[Using your own attribute](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#AttributeUsageExample1)] - -If you attempt to put the above attribute on something that's not a class or a struct, you will get a compiler error -like `Attribute 'MyAttributeForClassAndStructOnly' is not valid on this declaration type. It is only valid on 'class, struct' declarations` - -[!code-csharp[Using your own attribute](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#AttributeUsageExample2)] - -## How to use attributes attached to a code element - -Attributes act as metadata. Without some outward force, they won't actually do anything. - -To find and act on attributes, [Reflection](../programming-guide/concepts/reflection.md) is generally needed. I won't cover Reflection in-depth in this tutorial, but the basic -idea is that Reflection allows you to write code in C# that examines other code. - -For instance, you can use Reflection to get information about a class(add `using System.Reflection;` at the head of your code): - -[!code-csharp[Getting type information with Reflection](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#ReflectionExample1)] - -That will print out something like: `The assembly qualified name of MyClass is ConsoleApplication.MyClass, attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null` - -Once you have a `TypeInfo` object (or a `MemberInfo`, `FieldInfo`, etc), you can use the `GetCustomAttributes` method. This will return a collection of `Attribute` objects. -You can also use `GetCustomAttribute` and specify an Attribute type. - -Here's an example of using `GetCustomAttributes` on a `MemberInfo` instance for `MyClass` (which we saw earlier has an `[Obsolete]` attribute on it). - -[!code-csharp[Getting type information with Reflection](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#ReflectionExample2)] - -That will print to console: `Attribute on MyClass: ObsoleteAttribute`. Try adding other attributes to `MyClass`. - -It's important to note that these `Attribute` objects are instantiated lazily. That is, they won't be instantiated until you use `GetCustomAttribute` or `GetCustomAttributes`. -They are also instantiated each time. Calling `GetCustomAttributes` twice in a row will return two different instances of `ObsoleteAttribute`. - -## Common attributes in the base class library (BCL) - -Attributes are used by many tools and frameworks. NUnit uses attributes like `[Test]` and `[TestFixture]` that are used by the NUnit test runner. ASP.NET MVC uses attributes like `[Authorize]` -and provides an action filter framework to perform cross-cutting concerns on MVC actions. [PostSharp](https://www.postsharp.net) uses the attribute syntax to allow aspect-oriented programming in C#. - -Here are a few notable attributes built into the .NET Core base class libraries: - -* `[Obsolete]`. This one was used in the above examples, and it lives in the `System` namespace. It is useful to provide declarative documentation about a changing code base. A message can be provided in the form of a string, -and another boolean parameter can be used to escalate from a compiler warning to a compiler error. - -* `[Conditional]`. This attribute is in the `System.Diagnostics` namespace. This attribute can be applied to methods (or attribute classes). You must pass a string to the constructor. -If that string doesn't match a `#define` directive, then any calls to that method (but not the method itself) will be removed by the C# compiler. Typically this is used for debugging (diagnostics) purposes. - -* `[CallerMemberName]`. This attribute can be used on parameters, and lives in the `System.Runtime.CompilerServices` namespace. This is an attribute that is used to inject the name -of the method that is calling another method. This is typically used as a way to eliminate 'magic strings' when implementing INotifyPropertyChanged in various UI frameworks. As an -example: - -[!code-csharp[Using CallerMemberName when implementing INotifyPropertyChanged](../../../samples/snippets/csharp/tutorials/attributes/Program.cs#CallerMemberName1)] - -In the above code, you don't have to have a literal `"Name"` string. This can help prevent typo-related bugs and also makes for smoother refactoring/renaming. - -## Summary - -Attributes bring declarative power to C#, but they are a meta-data form of code and don't act by themselves. diff --git a/docs/csharp/tutorials/console-teleprompter.md b/docs/csharp/tutorials/console-teleprompter.md index ef7816b5d710a..4de646ca4aa92 100644 --- a/docs/csharp/tutorials/console-teleprompter.md +++ b/docs/csharp/tutorials/console-teleprompter.md @@ -70,7 +70,7 @@ This method is a special type of C# method called an *iterator method*. Iterator each item in the sequence is generated as it is requested by the code consuming the sequence. Iterator methods are methods that contain one or more [`yield return`](../language-reference/statements/yield.md) statements. The object returned by the `ReadFrom` method contains the code to generate each item in the sequence. In this example, that involves reading the next line of text from the source file, and returning that string. Each time the calling code requests the next item from the sequence, the code reads the next line of text from the file and returns it. When the file is completely read, the sequence indicates that there are no more items. -There are two C# syntax elements that may be new to you. The [`using`](../language-reference/keywords/using-statement.md) statement in this method manages resource cleanup. The variable that is initialized in the `using` statement (`reader`, in this example) must implement the <xref:System.IDisposable> interface. That interface defines a single method, `Dispose`, that should be called when the resource should be released. The compiler generates that call when execution reaches the closing brace of the `using` statement. The compiler-generated code ensures that the resource is released even if an exception is thrown from the code in the block defined by the using statement. +There are two C# syntax elements that may be new to you. The [`using`](../language-reference/statements/using.md) statement in this method manages resource cleanup. The variable that is initialized in the `using` statement (`reader`, in this example) must implement the <xref:System.IDisposable> interface. That interface defines a single method, `Dispose`, that should be called when the resource should be released. The compiler generates that call when execution reaches the closing brace of the `using` statement. The compiler-generated code ensures that the resource is released even if an exception is thrown from the code in the block defined by the using statement. The `reader` variable is defined using the `var` keyword. [`var`](../language-reference/statements/declarations.md#implicitly-typed-local-variables) defines an *implicitly typed local variable*. That means the type of the variable is determined by the compile-time type of the object assigned to the variable. Here, that is the return value from the <xref:System.IO.File.OpenText(System.String)> method, which is a <xref:System.IO.StreamReader> object. @@ -296,4 +296,4 @@ await RunTeleprompter(); This tutorial showed you a number of the features around the C# language and the .NET Core libraries related to working in Console applications. You can build on this knowledge to explore more about the language, and the classes introduced here. You've seen the basics of File and Console I/O, blocking and non-blocking use of the Task-based asynchronous programming, a tour of the C# language and how C# programs are organized, and the .NET CLI. -For more information about File I/O, see [File and Stream I/O](../../standard/io/index.md). For more information about asynchronous programming model used in this tutorial, see [Task-based Asynchronous Programming](../../standard/parallel-programming/task-based-asynchronous-programming.md) and [Asynchronous programming](../async.md). +For more information about File I/O, see [File and Stream I/O](../../standard/io/index.md). For more information about asynchronous programming model used in this tutorial, see [Task-based Asynchronous Programming](../../standard/parallel-programming/task-based-asynchronous-programming.md) and [Asynchronous programming](../asynchronous-programming/index.md). diff --git a/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/finished/IssuePRreport.csproj b/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/finished/IssuePRreport.csproj deleted file mode 100644 index 325a07d004bd8..0000000000000 --- a/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/finished/IssuePRreport.csproj +++ /dev/null @@ -1,15 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>net7.0</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> - <PackageReference Include="Octokit" Version="4.0.4" /> - </ItemGroup> - -</Project> diff --git a/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/start/IssuePRreport.csproj b/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/start/IssuePRreport.csproj deleted file mode 100644 index 325a07d004bd8..0000000000000 --- a/docs/csharp/tutorials/snippets/generate-consume-asynchronous-streams/start/IssuePRreport.csproj +++ /dev/null @@ -1,15 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>net7.0</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> - <PackageReference Include="Octokit" Version="4.0.4" /> - </ItemGroup> - -</Project> diff --git a/docs/csharp/versioning.md b/docs/csharp/versioning.md index 0738462066909..ef51c2adb0a7b 100644 --- a/docs/csharp/versioning.md +++ b/docs/csharp/versioning.md @@ -25,7 +25,7 @@ The most basic approach to SemVer is the 3 component format `MAJOR.MINOR.PATCH`, - `MINOR` is incremented when you add functionality in a backwards-compatible manner - `PATCH` is incremented when you make backwards-compatible bug fixes -There are also ways to specify other scenarios like pre-release versions etc. when applying version information to your .NET library. +There are also ways to specify other scenarios, for example, pre-release versions, when applying version information to your .NET library. ### Backwards Compatibility diff --git a/docs/csharp/whats-new/csharp-10.md b/docs/csharp/whats-new/csharp-10.md index 3f04e29f88cf9..796e3cec82db8 100644 --- a/docs/csharp/whats-new/csharp-10.md +++ b/docs/csharp/whats-new/csharp-10.md @@ -2,6 +2,7 @@ title: What's new in C# 10 - C# Guide description: Get an overview of the new features available in C# 10. ms.date: 11/08/2021 +ms.custom: UpdateFrequency1 --- # What's new in C# 10 diff --git a/docs/csharp/whats-new/csharp-11.md b/docs/csharp/whats-new/csharp-11.md index 405e24ef2023a..d7a9e78d30415 100644 --- a/docs/csharp/whats-new/csharp-11.md +++ b/docs/csharp/whats-new/csharp-11.md @@ -1,7 +1,8 @@ --- title: What's new in C# 11 - C# Guide -description: Get an overview of the new features coming in C# 11. +description: Get an overview of the new features added in C# 11. ms.date: 11/21/2022 +ms.custom: UpdateFrequency1 --- # What's new in C# 11 @@ -165,7 +166,7 @@ You've been able to test if a `string` had a specific constant value using patte ## Extended nameof scope -Type parameter names and parameter names are now in scope when used in a `nameof` expression in an [attribute declaration](../programming-guide/concepts/attributes/index.md#using-attributes) on that method. This feature means you can use the `nameof` operator to specify the name of a method parameter in an attribute on the method or parameter declaration. This feature is most often useful to add attributes for [nullable analysis](../language-reference/attributes/nullable-analysis.md). +Type parameter names and parameter names are now in scope when used in a `nameof` expression in an [attribute declaration](/dotnet/csharp/advanced-topics/reflection-and-attributes#using-attributes) on that method. This feature means you can use the `nameof` operator to specify the name of a method parameter in an attribute on the method or parameter declaration. This feature is most often useful to add attributes for [nullable analysis](../language-reference/attributes/nullable-analysis.md). ## UTF-8 string literals diff --git a/docs/csharp/whats-new/csharp-12.md b/docs/csharp/whats-new/csharp-12.md new file mode 100644 index 0000000000000..f0b3866580cc9 --- /dev/null +++ b/docs/csharp/whats-new/csharp-12.md @@ -0,0 +1,34 @@ +--- +title: What's new in C# 12 - C# Guide +description: Get an overview of the new features in C# 12. +ms.date: 04/04/2023 +--- +# What's new in C# 12 + +Some C# 12 features have been introduced in previews. The You can try these features using the latest [Visual Studio preview](https://visualstudio.microsoft.com/vs/preview/) or the latest [.NET 8 preview SDK](https://dotnet.microsoft.com/download/dotnet). + +- [Primary constructors](#primary-constructors) - Introduced in Visual Studio 17.6 preview 2. +- [Optional parameters in lambda expressions](#default-lambda-parameters) - Introduced in Visual Studio 17.5 preview 2. +- [Alias any type](#alias-any-type) - Introduced in Visual Studio 17.6 preview 3. + +## Primary constructors + +You can now create primary constructors in any `class` and `struct`. Primary constructors are no longer restricted to `record` types. Primary constructor parameters are in scope for the entire body of the class. To ensure that all primary constructor parameters are definitely assigned, all explicitly declared constructors must call the primary constructor using `this()` syntax. Adding a primary constructor to a `class` prevents the compiler from declaring an implicit parameterless constructor. In a `struct`, The implicit parameterless constructor initializes all fields, including primary constructor parameters to the 0-bit pattern. + +The compiler generates public properties for primary constructor parameters only in `record` types, either `record class` or `record struct` types. Non-record classes and structs may not always want this behavior for primary constructor parameters. + +You can learn more about primary constructors in the article on [instance constructors](../programming-guide/classes-and-structs/instance-constructors.md#primary-constructors). + +## Default lambda parameters + +You can now define default values for parameters on lambda expressions. The syntax and rules are the same as adding default values for arguments to any method or local function. + +You can learn more about default parameters on lambda expressions in the article on [lambda expressions](../language-reference/operators/lambda-expressions.md#input-parameters-of-a-lambda-expression). + +## Alias any type + +You can use the `using` alias directive to alias any type, not just named types. That means you can create semantic aliases for tuple types, array types, pointer types, or other unsafe types. For more information, see the [feature specification](~/_csharplang/proposals/using-alias-types.md) + +## See also + +- [What's new in .NET 8](../../core/whats-new/dotnet-8.md) diff --git a/docs/csharp/whats-new/csharp-9.md b/docs/csharp/whats-new/csharp-9.md index 22410be9e2ff0..cc5693f8d4907 100644 --- a/docs/csharp/whats-new/csharp-9.md +++ b/docs/csharp/whats-new/csharp-9.md @@ -2,6 +2,7 @@ title: What's new in C# 9.0 - C# Guide description: Get an overview of the new features available in C# 9.0. ms.date: 04/07/2021 +ms.custom: UpdateFrequency1 --- # What's new in C# 9.0 diff --git a/docs/csharp/whats-new/csharp-version-history.md b/docs/csharp/whats-new/csharp-version-history.md index 333715da8e729..bbfd897e9ac5d 100644 --- a/docs/csharp/whats-new/csharp-version-history.md +++ b/docs/csharp/whats-new/csharp-version-history.md @@ -3,7 +3,7 @@ title: The history of C# - C# Guide description: What did the language look like in its earliest versions, and how has it evolved since? author: erikdietrich ms.date: 06/18/2021 -ms.custom: updateeachrelease +ms.custom: "updateeachrelease, UpdateFrequency1" --- # The history of C\# @@ -276,7 +276,7 @@ They did one other thing along with this version, though it's not a traditional C# version 5.0, released with Visual Studio 2012, was a focused version of the language. Nearly all of the effort for that version went into another groundbreaking language concept: the `async` and `await` model for asynchronous programming. Here's the major features list: -- [Asynchronous members](../async.md) +- [Asynchronous members](../asynchronous-programming/index.md) - [Caller info attributes](../language-reference/attributes/caller-information.md) - [Code Project: Caller Info Attributes in C# 5.0](https://www.codeproject.com/Tips/606379/Caller-Info-Attributes-in-Csharp) @@ -311,7 +311,7 @@ C# version 3.0 came in late 2007, along with Visual Studio 2008, though the full - [Anonymous types](../fundamentals/types/anonymous-types.md) - [Query expressions](../linq/query-expression-basics.md) - [Lambda expressions](../language-reference/operators/lambda-expressions.md) -- [Expression trees](../expression-trees.md) +- [Expression trees](/dotnet/csharp/advanced-topics/expression-trees) - [Extension methods](../programming-guide/classes-and-structs/extension-methods.md) - [Implicitly typed local variables](../language-reference/statements/declarations.md#implicitly-typed-local-variables) - [Partial methods](../language-reference/keywords/partial-method.md) @@ -375,6 +375,6 @@ The major features of C# 1.0 included: - [Delegates](../delegates-overview.md) - [Operators and expressions](../language-reference/operators/index.md) - [Statements](../programming-guide/statements-expressions-operators/statements.md) -- [Attributes](../programming-guide/concepts/attributes/index.md) +- [Attributes](/dotnet/csharp/advanced-topics/reflection-and-attributes) _Article_ [_originally published on the NDepend blog_](https://blog.ndepend.com/c-versions-look-language-history/)_, courtesy of Erik Dietrich and Patrick Smacchia._ diff --git a/docs/csharp/whats-new/tutorials/interpolated-string-handler.md b/docs/csharp/whats-new/tutorials/interpolated-string-handler.md index 30f11eae2998d..792260922d204 100644 --- a/docs/csharp/whats-new/tutorials/interpolated-string-handler.md +++ b/docs/csharp/whats-new/tutorials/interpolated-string-handler.md @@ -22,7 +22,7 @@ This tutorial assumes you're familiar with C# and .NET, including either Visual ## New outline -C# 10 adds support for a custom [*interpolated string handler*](~/_csharplang/proposals/csharp-10.0/improved-interpolated-strings.md#the-handler-pattern). An interpolated string handler is a type that processes the placeholder expression in an interpolated string. Without a custom handler, placeholders are processed similar to <xref:System.String.Format%2A?displayProperty=nameWithType>. Each placeholder is formatted as text, and then the components are concatenated to form the resulting string. +C# 10 adds support for a custom [*interpolated string handler*](#implement-the-handler-pattern). An interpolated string handler is a type that processes the placeholder expression in an interpolated string. Without a custom handler, placeholders are processed similar to <xref:System.String.Format%2A?displayProperty=nameWithType>. Each placeholder is formatted as text, and then the components are concatenated to form the resulting string. You can write a handler for any scenario where you use information about the resulting string. Will it be used? What constraints are on the format? Some examples include: @@ -197,7 +197,7 @@ The only output when `LogLevel.Trace` was specified is the output from the const This example illustrates an important point for interpolated string handlers, especially when logging libraries are used. Any side-effects in the placeholders may not occur. Add the following code to your main program and see this behavior in action: -:::code language="csharp" source="./snippets/interpolated-string-handler/Version_4_Examples.cs" id="TestSideeffects"::: +:::code language="csharp" source="./snippets/interpolated-string-handler/Version_4_Examples.cs" id="TestSideEffects"::: You can see the `index` variable is incremented five times each iteration of the loop. Because the placeholders are evaluated only for `Critical`, `Error` and `Warning` levels, not for `Information` and `Trace`, the final value of `index` doesn't match the expectation: diff --git a/docs/csharp/whats-new/tutorials/snippets/interpolated-string-handler/Version_4_Examples.cs b/docs/csharp/whats-new/tutorials/snippets/interpolated-string-handler/Version_4_Examples.cs index dab4efa8b31f2..8fb8b7827483a 100644 --- a/docs/csharp/whats-new/tutorials/snippets/interpolated-string-handler/Version_4_Examples.cs +++ b/docs/csharp/whats-new/tutorials/snippets/interpolated-string-handler/Version_4_Examples.cs @@ -18,7 +18,7 @@ public static void Example() logger.LogMessage(LogLevel.Warning, "Warning Level. This warning is a string, not an interpolated string expression."); - // <TestSideeffects> + // <TestSideEffects> int index = 0; int numberOfIncrements = 0; for (var level = LogLevel.Critical; level <= LogLevel.Trace; level++) @@ -29,6 +29,6 @@ public static void Example() } Console.WriteLine($"Value of index {index}, value of numberOfIncrements: {numberOfIncrements}"); - // </TestSideeffects> + // </TestSideEffects> } } diff --git a/docs/csharp/whats-new/version-update-considerations.md b/docs/csharp/whats-new/version-update-considerations.md index 85fdb39b0f2c9..900e586e7a6d1 100644 --- a/docs/csharp/whats-new/version-update-considerations.md +++ b/docs/csharp/whats-new/version-update-considerations.md @@ -1,7 +1,7 @@ --- title: Version and update considerations for C# developers description: Introducing new languages features in your library can impact the code that uses it. -ms.topic: reference +ms.topic: language-reference ms.date: 09/19/2018 --- diff --git a/docs/csharp/write-safe-efficient-code.md b/docs/csharp/write-safe-efficient-code.md deleted file mode 100644 index 4d60e571fabd8..0000000000000 --- a/docs/csharp/write-safe-efficient-code.md +++ /dev/null @@ -1,299 +0,0 @@ ---- -title: Write safe and efficient C# code -description: Learn about C# language features that enable you to write safe code that performs as efficiently as unsafe code. -ms.date: 05/25/2021 -ms.technology: csharp-advanced-concepts -ms.custom: mvc ---- -# Write safe and efficient C# code - -C# provides features that enable you to write verifiable safe code with better performance. If you carefully apply these techniques, fewer scenarios require unsafe code. These features make it easier to use references to value types as method arguments and method returns. When done safely, these techniques minimize copying value types. By using value types, you can minimize the number of allocations and garbage collection passes. - -One advantage to using value types is that they often avoid heap allocations. The disadvantage is that they're copied by value. This trade-off makes it harder to optimize algorithms that operate on large amounts of data. The language features highlighted in this article provide mechanisms that enable safe efficient code using references to value types. Use these features wisely to minimize both allocations and copy operations. - -Some of the guidance in this article refers to coding practices that are always advisable, not only for the performance benefit. Use the `readonly` keyword when it accurately expresses design intent: - -- [Declare immutable structs as `readonly`](#declare-immutable-structs-as-readonly). -- [Declare `readonly` members for mutable structs](#declare-readonly-members-for-mutable-structs). - -The article also explains some low-level optimizations that are advisable when you've run a profiler and have identified bottlenecks: - -- [Use the `in` parameter modifier](#use-the-in-parameter-modifier). -- [Use `ref readonly return` statements](#use-ref-readonly-return-statements). -- [Use `ref struct` types](#use-ref-struct-types). -- [Use `nint` and `nuint` types](#use-nint-and-nuint-types). - -These techniques balance two competing goals: - -- Minimize allocations on the heap. - - Variables that are [reference types](./fundamentals/types/index.md#reference-types) hold a reference to a location in memory and are allocated on the managed heap. Only the reference is copied when a reference type is passed as an argument to a method or returned from a method. Each new object requires a new allocation, and later must be reclaimed. Garbage collection takes time. - -- Minimize the copying of values. - - Variables that are [value types](./fundamentals/types/index.md#value-types) directly contain their value, and the value is typically copied when passed to a method or returned from a method. This behavior includes copying the value of `this` when calling iterators and async instance methods of structs. The copy operation takes time, depending on the size of the type. - -This article uses the following example concept of the 3D-point structure to explain its recommendations: - -```csharp -public struct Point3D -{ - public double X; - public double Y; - public double Z; -} -``` - -Different examples use different implementations of this concept. - -## Declare immutable structs as `readonly` - -Declare a [`readonly struct`](language-reference/builtin-types/struct.md#readonly-struct) to indicate that a type is **immutable**. The `readonly` modifier informs the compiler that your intent is to create an immutable type. The compiler enforces that design decision with the following rules: - -- All field members must be read-only. -- All properties must be read-only, including auto-implemented properties. - -These two rules are sufficient to ensure that no member of a `readonly struct` modifies the state of that struct. The `struct` is immutable. The `Point3D` structure could be defined as an immutable struct as shown in the following example: - -```csharp -readonly public struct ReadonlyPoint3D -{ - public ReadonlyPoint3D(double x, double y, double z) - { - this.X = x; - this.Y = y; - this.Z = z; - } - - public double X { get; } - public double Y { get; } - public double Z { get; } -} -``` - -Follow this recommendation whenever your design intent is to create an immutable value type. Any performance improvements are an added benefit. The `readonly struct` keywords clearly express your design intent. - -## Declare `readonly` members for mutable structs - -When a struct type is mutable, declare members that don't modify state as [`readonly` members](language-reference/builtin-types/struct.md#readonly-instance-members). - -Consider a different application that needs a 3D point structure, but must support mutability. The following version of the 3D point structure adds the `readonly` modifier only to those members that don't modify the structure. Follow this example when your design must support modifications to the struct by some members, but you still want the benefits of enforcing `readonly` on some members: - -```csharp -public struct Point3D -{ - public Point3D(double x, double y, double z) - { - _x = x; - _y = y; - _z = z; - } - - private double _x; - public double X - { - readonly get => _x; - set => _x = value; - } - - private double _y; - public double Y - { - readonly get => _y; - set => _y = value; - } - - private double _z; - public double Z - { - readonly get => _z; - set => _z = value; - } - - public readonly double Distance => Math.Sqrt(X * X + Y * Y + Z * Z); - - public readonly override string ToString() => $"{X}, {Y}, {Z}"; -} -``` - -The preceding sample shows many of the locations where you can apply the `readonly` modifier: methods, properties, and property accessors. If you use auto-implemented properties, the compiler adds the `readonly` modifier to the `get` accessor for read-write properties. The compiler adds the `readonly` modifier to the auto-implemented property declarations for properties with only a `get` accessor. - -Adding the `readonly` modifier to members that don't mutate state provides two related benefits. First, the compiler enforces your intent. That member can't mutate the struct's state. Second, the compiler won't create [defensive copies](#avoid-defensive-copies) of `in` parameters when accessing a `readonly` member. The compiler can make this optimization safely because it guarantees that the `struct` is not modified by a `readonly` member. - -## Use `ref readonly return` statements - -Use a [`ref readonly`](language-reference/keywords/ref.md#reference-return-values) return when both of the following conditions are true: - -- The return value is a `struct` larger than <xref:System.IntPtr.Size%2A?displayProperty=nameWithType>. -- The storage lifetime is greater than the method returning the value. - -You can return values by reference when the value being returned isn't local to the returning method. Returning by reference means that only the reference is copied, not the structure. In the following example, the `Origin` property can't use a `ref` return because the value being returned is a local variable: - -```csharp -public Point3D Origin => new Point3D(0,0,0); -``` - -However, the following property definition can be returned by reference because the returned value is a static member: - -```csharp -public struct Point3D -{ - private static Point3D origin = new Point3D(0,0,0); - - // Dangerous! returning a mutable reference to internal storage - public ref Point3D Origin => ref origin; - - // other members removed for space -} -``` - -You don't want callers modifying the origin, so you should return the value by `ref readonly`: - -```csharp -public struct Point3D -{ - private static Point3D origin = new Point3D(0,0,0); - - public static ref readonly Point3D Origin => ref origin; - - // other members removed for space -} -``` - -Returning `ref readonly` enables you to save copying larger structures and preserve the immutability of your internal data members. - -At the call site, callers make the choice to use the `Origin` property as a `ref readonly` or as a value: - -[!code-csharp[AssignRefReadonly](../../samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs#AssignRefReadonly "Assigning a ref readonly")] - -The first assignment in the preceding code makes a copy of the `Origin` constant and assigns that copy. The second assigns a reference. Notice that the `readonly` modifier must be part of the declaration of the variable. The reference to which it refers can't be modified. Attempts to do so result in a compile-time error. - -The `readonly` modifier is required on the declaration of `originReference`. - -The compiler enforces that the caller can't modify the reference. Attempts to assign the value directly generate a compile-time error. In other cases, the compiler allocates a [defensive copy](#avoid-defensive-copies) unless it can safely use the readonly reference. Static analysis rules determine if the struct could be modified. The compiler doesn't create a defensive copy when the struct is a `readonly struct` or the member is a `readonly` member of the struct. Defensive copies aren't needed to pass the struct as an `in` argument. - -## Use the `in` parameter modifier - -The following sections explain what the `in` modifier does, how to use it, and when to use it for performance optimization: - -- [The `out`, `ref`, and `in` keywords](#the-out-ref-and-in-keywords) -- [Use `in` parameters for large structs](#use-in-parameters-for-large-structs) -- [Optional use of `in` at call site](#optional-use-of-in-at-call-site) -- [Avoid defensive copies](#avoid-defensive-copies) - -### The `out`, `ref`, and `in` keywords - -The `in` keyword complements the `ref` and `out` keywords to pass arguments by reference. The `in` keyword specifies that the argument is passed by reference, but the called method doesn't modify the value. The `in` modifier can be applied to any member that takes parameters, such as methods, delegates, lambdas, local functions, indexers, and operators. - -With the addition of the `in` keyword, C# provides a full vocabulary to express your design intent. Value types are copied when passed to a called method when you don't specify any of the following modifiers in the method signature. Each of these modifiers specifies that a variable is passed by reference, avoiding the copy. Each modifier expresses a different intent: - -- `out`: This method sets the value of the argument used as this parameter. -- `ref`: This method may modify the value of the argument used as this parameter. -- `in`: This method doesn't modify the value of the argument used as this parameter. - -Add the `in` modifier to pass an argument by reference and declare your design intent to pass arguments by reference to avoid unnecessary copying. You don't intend to modify the object used as that argument. - -The `in` modifier complements `out` and `ref` in other ways as well. You can't create overloads of a method that differ only in the presence of -`in`, `out`, or `ref`. These new rules extend the same behavior that had always been defined for `out` and `ref` parameters. Like the `out` and `ref` modifiers, value types aren't boxed because the `in` modifier is applied. Another feature of `in` parameters is that you can use literal values or constants for the argument to an `in` parameter. - -The `in` modifier can also be used with reference types or numeric values. However, the benefits in those cases are minimal, if any. - -There are several ways in which the compiler enforces the read-only nature of an `in` argument. First of all, the called method can't directly assign to an `in` parameter. It can't directly assign to any field of an `in` parameter when that value is a `struct` type. In addition, you can't pass an `in` parameter to any method using the `ref` or `out` modifier. These rules apply to any field of an `in` parameter, provided the -field is a `struct` type and the parameter is also a `struct` type. In fact, these rules apply for multiple layers of member access provided the types at all levels of member access are `structs`. The compiler enforces that `struct` types passed as `in` arguments and their `struct` members are read-only variables when used as arguments to other methods. - -### Use `in` parameters for large structs - -You can apply the `in` modifier to any `readonly struct` parameter, but this practice is likely to improve performance only for value types that are substantially larger than <xref:System.IntPtr.Size%2A?displayProperty=nameWithType>. For simple types (such as `sbyte`, `byte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `char`, `float`, `double`, `decimal` and `bool`, and `enum` types), any potential performance gains are minimal. Some simple types, such as `decimal` at 16 bytes in size, are larger than either 4-byte or 8-byte references but not by enough to make a measurable difference in performance in most scenarios. And performance may degrade by using pass-by-reference for types smaller than <xref:System.IntPtr.Size?displayProperty=nameWithType>. - -The following code shows an example of a method that calculates the distance between two points in 3D space. - -[!code-csharp[InArgument](../../samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs#InArgument "Specifying an in argument")] - -The arguments are two structures that each contain three doubles. A double is 8 bytes, so each argument is 24 bytes. By specifying the `in` modifier, you pass a 4-byte or 8-byte reference to those arguments, depending on the architecture of the machine. The difference in size is small, but it can add up when your application calls this method in a tight loop using many different values. - -However, the impact of any low-level optimizations like using the `in` modifier should be measured to validate a performance benefit. For example, you might think that using `in` on a [Guid](xref:System.Guid) parameter would be beneficial. The `Guid` type is 16 bytes in size, twice the size of an 8-byte reference. But such a small difference isn't likely to result in a measurable performance benefit unless it's in a method that's in a time critical hot path for your application. - -### Optional use of `in` at call site - -Unlike a `ref` or `out` parameter, you don't need to apply the `in` modifier at the call site. The following code shows two examples of calling the `CalculateDistance` method. The first uses two local variables passed by reference. The second includes a temporary variable created as part of the method call. - -[!code-csharp[UseInArgument](../../samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs#UseInArgument "Specifying an In argument")] - -Omitting the `in` modifier at the call site informs the compiler that it's allowed to make a copy of the argument for any of the following reasons: - -- There exists an implicit conversion but not an identity conversion from the argument type to the parameter type. -- The argument is an expression but doesn't have a known storage variable. -- An overload exists that differs by the presence or absence of `in`. In that case, the by value overload is a better match. - -These rules are useful as you update existing code to use read-only reference arguments. Inside the called method, you can call any instance -method that uses by-value parameters. In those instances, a copy of the `in` parameter is created. - -Because the compiler may create a temporary variable for any `in` parameter, you can also specify default values for any `in` parameter. The following code specifies the origin (point 0,0,0) as the default value for the second point: - -[!code-csharp[InArgumentDefault](../../samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs#InArgumentDefault "Specifying defaults for an in parameter")] - -To force the compiler to pass read-only arguments by reference, specify the `in` modifier on the arguments at the call site, as shown in the following code: - -[!code-csharp[UseInArgument](../../samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs#ExplicitInArgument "Specifying an In argument")] - -This behavior makes it easier to adopt `in` parameters over time in large codebases where performance gains are possible. You add the `in` modifier to method signatures first. Then you can add the `in` modifier at call sites and create `readonly struct` types to enable the compiler to avoid creating defensive copies of `in` parameters in more locations. - -### Avoid defensive copies - -Pass a `struct` as the argument for an `in` parameter only if it's declared with the `readonly` modifier or the method accesses only `readonly` members of the struct. Otherwise, the compiler must create *defensive copies* in many situations to ensure that arguments are not mutated. Consider the following example that calculates the distance of a 3D point from the origin: - -[!code-csharp[InArgument](../../samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs#InArgument "Specifying an in argument")] - -The `Point3D` structure is *not* a read-only struct. There are six different property access calls in the body of this method. On first examination, you may think these accesses are safe. After all, a `get` accessor shouldn't modify the state of the object. But there's no language rule that enforces that. It's only a common convention. Any type could implement a `get` accessor that modified the internal state. - -Without some language guarantee, the compiler must create a temporary copy of the argument before calling any member not marked with the `readonly` modifier. The temporary storage is created on the stack, the values of the argument are copied to the temporary storage, and the value is copied to the stack for each member access as the `this` argument. In many situations, these copies harm performance enough that pass-by-value is faster than pass-by-read-only-reference when the argument type isn't a `readonly struct` and the method calls members that aren't marked `readonly`. If you mark all methods that don't modify the struct state as `readonly`, the compiler can safely determine that the struct state isn't modified, and a defensive copy is not needed. - -If the distance calculation uses the immutable struct, `ReadonlyPoint3D`, temporary objects aren't needed: - -[!code-csharp[readonlyInArgument](../../samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs#ReadOnlyInArgument "Specifying a readonly in argument")] - -The compiler generates more efficient code when you call members of a `readonly struct`. The `this` reference, instead of a copy of the receiver, -is always an `in` parameter passed by reference to the member method. This optimization saves copying when you use a `readonly struct` as an `in` argument. - -Don't pass a nullable value type as an `in` argument. The <xref:System.Nullable%601> type isn't declared as a read-only struct. That means the compiler must generate defensive copies for any nullable value type argument passed to a method using the `in` modifier on the parameter declaration. - -You can see an example program that demonstrates the performance differences using [BenchmarkDotNet](https://www.nuget.org/packages/BenchmarkDotNet/) in our [samples repository](https://github.com/dotnet/samples/tree/main/csharp/safe-efficient-code/benchmark) on GitHub. It compares passing a mutable struct by value and by reference with passing an immutable struct by value and by reference. The use of the immutable struct and pass by reference is fastest. - -## Use `ref struct` types - -Use a [`ref struct`](language-reference/builtin-types/ref-struct.md) or a `readonly ref struct`, such as <xref:System.Span%601> or <xref:System.ReadOnlySpan%601>, to work with blocks of memory as a sequence of bytes. The memory used by the span is constrained to a single stack frame. This restriction enables the compiler to make several optimizations. The primary motivation for this feature was <xref:System.Span%601> and related structures. You'll achieve performance improvements from these enhancements by using new and updated .NET APIs that make use of the <xref:System.Span%601> type. - -Declaring a struct as `readonly ref` combines the benefits and restrictions of `ref struct` and `readonly struct` declarations. The memory used by the readonly span is restricted to a single stack frame, and the memory used by the readonly span can't be modified. - -You may have similar requirements working with memory created using [`stackalloc`](language-reference/operators/stackalloc.md) or when using memory from interop APIs. You can define your own `ref struct` types for those needs. - -## Use `nint` and `nuint` types - -[Native-sized integer types](language-reference/builtin-types/integral-numeric-types.md#native-sized-integers) are 32-bit integers in a 32-bit process or 64-bit integers in a 64-bit process. Use them for interop scenarios, low-level libraries, and to optimize performance in scenarios where integer math is used extensively. - -## Conclusions - -Using value types minimizes the number of allocation operations: - -- Storage for value types is stack-allocated for local variables and method arguments. -- Storage for value types that are members of other objects is allocated as part of that object, not as a separate allocation. -- Storage for value type return values is stack allocated. - -Contrast that with reference types in those same situations: - -- Storage for reference types is heap allocated for local variables and method arguments. The reference is stored on the stack. -- Storage for reference types that are members of other objects are separately allocated on the heap. The containing object stores the reference. -- Storage for reference type return values is heap allocated. The reference to that storage is stored on the stack. - -Minimizing allocations comes with tradeoffs. You copy more memory when the size of the `struct` is larger than the size of a reference. A reference is typically 64 bits or 32 bits, and depends on the target machine CPU. - -These tradeoffs generally have minimal performance impact. However, for large structs or larger collections, the performance impact increases. The impact can be large in tight loops and hot paths for programs. - -These enhancements to the C# language are designed for performance critical algorithms where minimizing memory allocations is a major factor in achieving the necessary performance. You may find that you don't often use these features in the code you write. However, these enhancements have been adopted throughout .NET. As more APIs make use of these features, you'll see the performance of your applications improve. - -## See also - -- [in parameter modifier (C# Reference)](language-reference/keywords/in-parameter-modifier.md) -- [ref keyword](language-reference/keywords/ref.md) -- [Ref returns](language-reference/statements/jump-statements.md#ref-returns) -- [Ref locals](language-reference/statements/declarations.md#ref-locals) diff --git a/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/DotNet.GitHubAction.csproj b/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/DotNet.GitHubAction.csproj index 8586b4fb3caeb..4a6974d56660b 100644 --- a/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/DotNet.GitHubAction.csproj +++ b/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/DotNet.GitHubAction.csproj @@ -10,7 +10,7 @@ <ItemGroup> <PackageReference Include="CommandLineParser" Version="2.9.1" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" /> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> </ItemGroup> </Project> diff --git a/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/Program.cs b/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/Program.cs index 14b319094a00a..d9a8f1877a336 100644 --- a/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/Program.cs +++ b/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/Program.cs @@ -34,7 +34,7 @@ await parser.WithParsedAsync( static async ValueTask StartAnalysisAsync(ActionInputs inputs, IHost host) { - // Omitted for brevity, here is the preudo code: + // Omitted for brevity, here is the pseudo code: // - Read projects // - Calculate code metric analytics // - Write the CODE_METRICS.md file diff --git a/docs/framework/additional-apis/pos-for-net/adding-plug-and-play-support.md b/docs/framework/additional-apis/pos-for-net/adding-plug-and-play-support.md index 6ab68178c0979..e9353a8cc38c9 100644 --- a/docs/framework/additional-apis/pos-for-net/adding-plug-and-play-support.md +++ b/docs/framework/additional-apis/pos-for-net/adding-plug-and-play-support.md @@ -3,7 +3,7 @@ title: Adding Plug and Play Support description: Adding Plug and Play Support (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Adding Plug and Play Support (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/asynchronous-output-sample.md b/docs/framework/additional-apis/pos-for-net/asynchronous-output-sample.md index c8e5b118ec145..3851871ba8446 100644 --- a/docs/framework/additional-apis/pos-for-net/asynchronous-output-sample.md +++ b/docs/framework/additional-apis/pos-for-net/asynchronous-output-sample.md @@ -3,7 +3,7 @@ title: Asynchronous Output Sample description: Asynchronous Output Sample (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Asynchronous Output Sample (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/attributes-for-identifying-service-objects-and-assigning-hardware.md b/docs/framework/additional-apis/pos-for-net/attributes-for-identifying-service-objects-and-assigning-hardware.md index fea7f5975f92f..9d0626a4b2ed5 100644 --- a/docs/framework/additional-apis/pos-for-net/attributes-for-identifying-service-objects-and-assigning-hardware.md +++ b/docs/framework/additional-apis/pos-for-net/attributes-for-identifying-service-objects-and-assigning-hardware.md @@ -3,7 +3,7 @@ title: Attributes for Identifying Service Objects and Assigning Hardware description: Attributes for Identifying Service Objects and Assigning Hardware (POS for .NET v1.14 SDK Documentation) ms.date: 02/27/2008 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Attributes for Identifying Service Objects and Assigning Hardware (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/base-class-directio-method.md b/docs/framework/additional-apis/pos-for-net/base-class-directio-method.md index 68b53374f6222..2ba273c64ae0d 100644 --- a/docs/framework/additional-apis/pos-for-net/base-class-directio-method.md +++ b/docs/framework/additional-apis/pos-for-net/base-class-directio-method.md @@ -3,7 +3,7 @@ title: Base Class DirectIO Method description: Base Class DirectIO Method (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Base Class DirectIO Method (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/capability-properties.md b/docs/framework/additional-apis/pos-for-net/capability-properties.md index 6e47bf8b64525..dc0dc694c1723 100644 --- a/docs/framework/additional-apis/pos-for-net/capability-properties.md +++ b/docs/framework/additional-apis/pos-for-net/capability-properties.md @@ -3,7 +3,7 @@ title: Capability Properties description: Capability Properties (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Capability Properties (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/cashdrawer-implementation.md b/docs/framework/additional-apis/pos-for-net/cashdrawer-implementation.md index f0a9c09a70cb4..7224e90e6f2df 100644 --- a/docs/framework/additional-apis/pos-for-net/cashdrawer-implementation.md +++ b/docs/framework/additional-apis/pos-for-net/cashdrawer-implementation.md @@ -3,7 +3,7 @@ title: CashDrawer Implementation description: CashDrawer Implementation (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # CashDrawer Implementation (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/command-line-help-for-posdm.md b/docs/framework/additional-apis/pos-for-net/command-line-help-for-posdm.md index ab1a8e4299036..59b5ad1a06367 100644 --- a/docs/framework/additional-apis/pos-for-net/command-line-help-for-posdm.md +++ b/docs/framework/additional-apis/pos-for-net/command-line-help-for-posdm.md @@ -3,7 +3,7 @@ title: Command-Line Help for POSDM description: Command-Line Help for POSDM (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Command-Line Help for POSDM (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/configure-a-device-for-remote-management.md b/docs/framework/additional-apis/pos-for-net/configure-a-device-for-remote-management.md index 0549f8b0aeace..427de2836dfd2 100644 --- a/docs/framework/additional-apis/pos-for-net/configure-a-device-for-remote-management.md +++ b/docs/framework/additional-apis/pos-for-net/configure-a-device-for-remote-management.md @@ -3,7 +3,7 @@ title: Configure a device for remote management description: Configure a device for remote management (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Configure a device for remote management (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/copyright-information-for-pos-for-net-v1141.md b/docs/framework/additional-apis/pos-for-net/copyright-information-for-pos-for-net-v1141.md index af04c16e39a43..18dc9c7bc826d 100644 --- a/docs/framework/additional-apis/pos-for-net/copyright-information-for-pos-for-net-v1141.md +++ b/docs/framework/additional-apis/pos-for-net/copyright-information-for-pos-for-net-v1141.md @@ -3,7 +3,7 @@ title: Copyright Information for POS for .NET v1.14.1 (Microsoft Point of Servic description: Copyright Information for POS for .NET v1.14.1 (Microsoft Point of Service for .NET) (POS for .NET v1.14 SDK Documentation) ms.date: 04/21/2017 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Copyright Information for POS for .NET v1.14.1 (Microsoft Point of Service for .NET) diff --git a/docs/framework/additional-apis/pos-for-net/creating-a-basic-service-object-code-template.md b/docs/framework/additional-apis/pos-for-net/creating-a-basic-service-object-code-template.md index 0ce42ed69eafb..a8a2765c7fa48 100644 --- a/docs/framework/additional-apis/pos-for-net/creating-a-basic-service-object-code-template.md +++ b/docs/framework/additional-apis/pos-for-net/creating-a-basic-service-object-code-template.md @@ -3,7 +3,7 @@ title: Creating a Basic Service Object Code Template description: Creating a Basic Service Object Code Template (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Creating a Basic Service Object Code Template (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/creating-a-service-object-sample.md b/docs/framework/additional-apis/pos-for-net/creating-a-service-object-sample.md index 089a59d8464b4..126d890cb8a44 100644 --- a/docs/framework/additional-apis/pos-for-net/creating-a-service-object-sample.md +++ b/docs/framework/additional-apis/pos-for-net/creating-a-service-object-sample.md @@ -3,7 +3,7 @@ title: Creating a Service Object Sample description: Creating a Service Object Sample (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Creating a Service Object Sample (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/creating-a-working-multithreaded-service-object.md b/docs/framework/additional-apis/pos-for-net/creating-a-working-multithreaded-service-object.md index 414b1009f396f..90a0b2331e6d5 100644 --- a/docs/framework/additional-apis/pos-for-net/creating-a-working-multithreaded-service-object.md +++ b/docs/framework/additional-apis/pos-for-net/creating-a-working-multithreaded-service-object.md @@ -3,7 +3,7 @@ title: Creating a Working, Multithreaded Service Object description: Creating a Working, Multithreaded Service Object (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Creating a Working, Multithreaded Service Object (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/data-decoding.md b/docs/framework/additional-apis/pos-for-net/data-decoding.md index 124f5e7d4fcd5..c1ddc9eb78fe1 100644 --- a/docs/framework/additional-apis/pos-for-net/data-decoding.md +++ b/docs/framework/additional-apis/pos-for-net/data-decoding.md @@ -3,7 +3,7 @@ title: Data Decoding description: Data Decoding (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Data Decoding (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/developing-a-custom-service-object.md b/docs/framework/additional-apis/pos-for-net/developing-a-custom-service-object.md index 9b642b885a2b1..244f6d07da69c 100644 --- a/docs/framework/additional-apis/pos-for-net/developing-a-custom-service-object.md +++ b/docs/framework/additional-apis/pos-for-net/developing-a-custom-service-object.md @@ -3,7 +3,7 @@ title: Developing a Custom Service Object description: Developing a Custom Service Object (POS for .NET v1.14 SDK Documentation) ms.date: 02/27/2008 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Developing a Custom Service Object (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/developing-a-pos-application.md b/docs/framework/additional-apis/pos-for-net/developing-a-pos-application.md index 754b1f616261d..e73253b66608f 100644 --- a/docs/framework/additional-apis/pos-for-net/developing-a-pos-application.md +++ b/docs/framework/additional-apis/pos-for-net/developing-a-pos-application.md @@ -3,7 +3,7 @@ title: Developing a POS Application description: Developing a POS Application (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Developing a POS Application (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/developing-service-objects-using-base-classes.md b/docs/framework/additional-apis/pos-for-net/developing-service-objects-using-base-classes.md index 597dd1ac58726..3defd20ec473a 100644 --- a/docs/framework/additional-apis/pos-for-net/developing-service-objects-using-base-classes.md +++ b/docs/framework/additional-apis/pos-for-net/developing-service-objects-using-base-classes.md @@ -3,7 +3,7 @@ title: Developing Service Objects Using Base Classes description: Developing Service Objects Using Base Classes (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Developing Service Objects Using Base Classes (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/device-input-and-events.md b/docs/framework/additional-apis/pos-for-net/device-input-and-events.md index dfa3360f753f6..72c5da5c0632d 100644 --- a/docs/framework/additional-apis/pos-for-net/device-input-and-events.md +++ b/docs/framework/additional-apis/pos-for-net/device-input-and-events.md @@ -3,7 +3,7 @@ title: Device Input and Events description: Device Input and Events (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Device Input and Events (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/device-output-models.md b/docs/framework/additional-apis/pos-for-net/device-output-models.md index a2bba7a6bef0e..046baadad16c6 100644 --- a/docs/framework/additional-apis/pos-for-net/device-output-models.md +++ b/docs/framework/additional-apis/pos-for-net/device-output-models.md @@ -3,7 +3,7 @@ title: Device Output Models description: Device Output Models (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Device Output Models (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/deviceinfo-class.md b/docs/framework/additional-apis/pos-for-net/deviceinfo-class.md index 75bbf720e4837..39025f4f641af 100644 --- a/docs/framework/additional-apis/pos-for-net/deviceinfo-class.md +++ b/docs/framework/additional-apis/pos-for-net/deviceinfo-class.md @@ -3,7 +3,7 @@ title: DeviceInfo Class description: DeviceInfo Class (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # DeviceInfo Class (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/deviceproperty-class.md b/docs/framework/additional-apis/pos-for-net/deviceproperty-class.md index 1a1790818b192..906960573dc02 100644 --- a/docs/framework/additional-apis/pos-for-net/deviceproperty-class.md +++ b/docs/framework/additional-apis/pos-for-net/deviceproperty-class.md @@ -3,7 +3,7 @@ title: DeviceProperty Class description: DeviceProperty Class (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # DeviceProperty Class (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/event-handler-sample.md b/docs/framework/additional-apis/pos-for-net/event-handler-sample.md index dc4edd1d7c674..64a8a257d3755 100644 --- a/docs/framework/additional-apis/pos-for-net/event-handler-sample.md +++ b/docs/framework/additional-apis/pos-for-net/event-handler-sample.md @@ -3,7 +3,7 @@ title: Event Handler Sample description: Event Handler Sample (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Event Handler Sample (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/event-management.md b/docs/framework/additional-apis/pos-for-net/event-management.md index 630946448a8a4..2601385cdb339 100644 --- a/docs/framework/additional-apis/pos-for-net/event-management.md +++ b/docs/framework/additional-apis/pos-for-net/event-management.md @@ -3,7 +3,7 @@ title: Event Management description: Event Management (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Event Management (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/exception-classes.md b/docs/framework/additional-apis/pos-for-net/exception-classes.md index 932d2be4f3383..5af2df7fe5556 100644 --- a/docs/framework/additional-apis/pos-for-net/exception-classes.md +++ b/docs/framework/additional-apis/pos-for-net/exception-classes.md @@ -3,7 +3,7 @@ title: Exception Classes description: Exception Classes (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Exception Classes (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/general-posdm-switches.md b/docs/framework/additional-apis/pos-for-net/general-posdm-switches.md index 4346c039e33e5..68f1c31bb2a48 100644 --- a/docs/framework/additional-apis/pos-for-net/general-posdm-switches.md +++ b/docs/framework/additional-apis/pos-for-net/general-posdm-switches.md @@ -3,7 +3,7 @@ title: General POSDM Switches description: General POSDM Switches (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # General POSDM Switches (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/hydra-devices.md b/docs/framework/additional-apis/pos-for-net/hydra-devices.md index 45bb08011af49..595fe199ff17a 100644 --- a/docs/framework/additional-apis/pos-for-net/hydra-devices.md +++ b/docs/framework/additional-apis/pos-for-net/hydra-devices.md @@ -3,7 +3,7 @@ title: Hydra Devices description: Hydra Devices (POS for .NET v1.14 SDK Documentation) ms.date: 02/27/2008 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Hydra Devices (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/index.md b/docs/framework/additional-apis/pos-for-net/index.md index e8684cc109539..a3e4269968e3d 100644 --- a/docs/framework/additional-apis/pos-for-net/index.md +++ b/docs/framework/additional-apis/pos-for-net/index.md @@ -3,7 +3,7 @@ title: POS for .NET v1.14.1 SDK Documentation description: POS for .NET v1.14.1 SDK Documentation (POS for .NET v1.14 SDK Documentation) ms.date: 04/21/2017 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET v1.14.1 SDK Documentation diff --git a/docs/framework/additional-apis/pos-for-net/integration-of-legacy-service-objects.md b/docs/framework/additional-apis/pos-for-net/integration-of-legacy-service-objects.md index b7ffca1253ac6..39c099a4e0644 100644 --- a/docs/framework/additional-apis/pos-for-net/integration-of-legacy-service-objects.md +++ b/docs/framework/additional-apis/pos-for-net/integration-of-legacy-service-objects.md @@ -3,7 +3,7 @@ title: Integration of Legacy Service Objects description: Integration of Legacy Service Objects (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Integration of Legacy Service Objects (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/introducing-service-object-reader-threads.md b/docs/framework/additional-apis/pos-for-net/introducing-service-object-reader-threads.md index afe9f891ee295..5ac825135990a 100644 --- a/docs/framework/additional-apis/pos-for-net/introducing-service-object-reader-threads.md +++ b/docs/framework/additional-apis/pos-for-net/introducing-service-object-reader-threads.md @@ -3,7 +3,7 @@ title: Introducing Service Object Reader Threads description: Introducing Service Object Reader Threads (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Introducing Service Object Reader Threads (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/linedisplay-capabilities.md b/docs/framework/additional-apis/pos-for-net/linedisplay-capabilities.md index 89cbc78eb1c9c..75d54b66a2f91 100644 --- a/docs/framework/additional-apis/pos-for-net/linedisplay-capabilities.md +++ b/docs/framework/additional-apis/pos-for-net/linedisplay-capabilities.md @@ -3,7 +3,7 @@ title: LineDisplay Capabilities description: LineDisplay Capabilities (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # LineDisplay Capabilities (POS for .NET v1.14 SDK Documentation) @@ -28,7 +28,7 @@ The Service Object may support either horizontal or vertical marquees. If horizo Thereafter, applications and Service Objects may use the following to set or get the marquee type: -`DisplayMarqueeType MaqueeType {get, set; }` +`DisplayMarqueeType MarqueeType {get, set; }` ## Inter-Character Wait diff --git a/docs/framework/additional-apis/pos-for-net/linedisplay-implementation.md b/docs/framework/additional-apis/pos-for-net/linedisplay-implementation.md index 412d4eecb2ac9..d3925868a7747 100644 --- a/docs/framework/additional-apis/pos-for-net/linedisplay-implementation.md +++ b/docs/framework/additional-apis/pos-for-net/linedisplay-implementation.md @@ -3,7 +3,7 @@ title: LineDisplay Implementation description: LineDisplay Implementation (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # LineDisplay Implementation (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/linedisplay-sample.md b/docs/framework/additional-apis/pos-for-net/linedisplay-sample.md index 45ffe49b8b19a..4b0187998703b 100644 --- a/docs/framework/additional-apis/pos-for-net/linedisplay-sample.md +++ b/docs/framework/additional-apis/pos-for-net/linedisplay-sample.md @@ -3,7 +3,7 @@ title: LineDisplay Sample description: LineDisplay Sample (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # LineDisplay Sample (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/log-files.md b/docs/framework/additional-apis/pos-for-net/log-files.md index fc36f7b099f5b..dbb8144fc9106 100644 --- a/docs/framework/additional-apis/pos-for-net/log-files.md +++ b/docs/framework/additional-apis/pos-for-net/log-files.md @@ -3,7 +3,7 @@ title: Log Files description: Log Files (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Log Files (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/logicaldevice-class.md b/docs/framework/additional-apis/pos-for-net/logicaldevice-class.md index bf685a65171fb..ee031ce7b834b 100644 --- a/docs/framework/additional-apis/pos-for-net/logicaldevice-class.md +++ b/docs/framework/additional-apis/pos-for-net/logicaldevice-class.md @@ -3,7 +3,7 @@ title: LogicalDevice Class description: LogicalDevice Class (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # LogicalDevice Class (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/manually-manage-your-pos-for-net-devices.md b/docs/framework/additional-apis/pos-for-net/manually-manage-your-pos-for-net-devices.md index 339e4f8d1f331..106a5ba3d16e3 100644 --- a/docs/framework/additional-apis/pos-for-net/manually-manage-your-pos-for-net-devices.md +++ b/docs/framework/additional-apis/pos-for-net/manually-manage-your-pos-for-net-devices.md @@ -3,7 +3,7 @@ title: Manually manage your POS for .NET devices (POS for .NET v1.14 SDK Documen description: Manually manage your POS for .NET devices (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Manually manage your POS for .NET devices (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pinpad-capabilities.md b/docs/framework/additional-apis/pos-for-net/pinpad-capabilities.md index 550bece1c9c3b..f7cbf3ed3d4d5 100644 --- a/docs/framework/additional-apis/pos-for-net/pinpad-capabilities.md +++ b/docs/framework/additional-apis/pos-for-net/pinpad-capabilities.md @@ -3,7 +3,7 @@ title: PinPad Capabilities description: PinPad Capabilities (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # PinPad Capabilities (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pinpad-implementation.md b/docs/framework/additional-apis/pos-for-net/pinpad-implementation.md index 03eae1461c199..2e1feef88402a 100644 --- a/docs/framework/additional-apis/pos-for-net/pinpad-implementation.md +++ b/docs/framework/additional-apis/pos-for-net/pinpad-implementation.md @@ -3,7 +3,7 @@ title: PinPad Implementation description: PinPad Implementation (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # PinPad Implementation (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pinpad-sample.md b/docs/framework/additional-apis/pos-for-net/pinpad-sample.md index ad9742e0682e2..ad1284d60de46 100644 --- a/docs/framework/additional-apis/pos-for-net/pinpad-sample.md +++ b/docs/framework/additional-apis/pos-for-net/pinpad-sample.md @@ -3,7 +3,7 @@ title: PinPad Sample description: PinPad Sample (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # PinPad Sample (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/plug-and-play-support.md b/docs/framework/additional-apis/pos-for-net/plug-and-play-support.md index 50df54d026142..33fc13eb11184 100644 --- a/docs/framework/additional-apis/pos-for-net/plug-and-play-support.md +++ b/docs/framework/additional-apis/pos-for-net/plug-and-play-support.md @@ -3,7 +3,7 @@ title: Plug and Play Support description: Plug and Play Support (POS for .NET v1.14 SDK Documentation) ms.date: 02/27/2008 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Plug and Play Support (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/plug-and-play-xml-configuration.md b/docs/framework/additional-apis/pos-for-net/plug-and-play-xml-configuration.md index 90f20f1f5e035..77a33e643655f 100644 --- a/docs/framework/additional-apis/pos-for-net/plug-and-play-xml-configuration.md +++ b/docs/framework/additional-apis/pos-for-net/plug-and-play-xml-configuration.md @@ -3,7 +3,7 @@ title: Plug and Play XML Configuration description: Plug and Play XML Configuration (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Plug and Play XML Configuration (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/point-of-service-performance-counters.md b/docs/framework/additional-apis/pos-for-net/point-of-service-performance-counters.md index ecb995e0d9d6b..0fd045b2380a8 100644 --- a/docs/framework/additional-apis/pos-for-net/point-of-service-performance-counters.md +++ b/docs/framework/additional-apis/pos-for-net/point-of-service-performance-counters.md @@ -3,7 +3,7 @@ title: Point of Service Performance Counters description: Point of Service Performance Counters (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Point of Service Performance Counters (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-device-manager-output.md b/docs/framework/additional-apis/pos-for-net/pos-device-manager-output.md index 94274d8bc1104..4f4d03b370aae 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-device-manager-output.md +++ b/docs/framework/additional-apis/pos-for-net/pos-device-manager-output.md @@ -3,7 +3,7 @@ title: POS Device Manager Output description: POS Device Manager Output (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS Device Manager Output (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-device-manager.md b/docs/framework/additional-apis/pos-for-net/pos-device-manager.md index 89e826ac7a0fc..2c7a8dc90f937 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-device-manager.md +++ b/docs/framework/additional-apis/pos-for-net/pos-device-manager.md @@ -3,7 +3,7 @@ title: POS Device Manager description: POS Device Manager (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS Device Manager (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-exception-handling.md b/docs/framework/additional-apis/pos-for-net/pos-exception-handling.md index aa0309acc0189..db7ee08e14367 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-exception-handling.md +++ b/docs/framework/additional-apis/pos-for-net/pos-exception-handling.md @@ -3,7 +3,7 @@ title: POS Exception Handling description: POS Exception Handling (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS Exception Handling (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-api-support.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-api-support.md index b39d1ad4b2725..e2b3425d55941 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-api-support.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-api-support.md @@ -3,7 +3,7 @@ title: POS for .NET API Support (POS for .NET v1.14 SDK Documentation) description: POS for .NET API Support (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET API Support (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md index d454a8909bde1..54631c02460b6 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-application-compatibility-with-32-bit-opos-service-objects.md @@ -3,7 +3,7 @@ title: POS for .NET Application Compatibility with 32-bit OPOS Service Objects ( description: POS for .NET Application Compatibility with 32-bit OPOS Service Objects (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET Application Compatibility with 32-bit OPOS Service Objects (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-architecture.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-architecture.md index b30d241486ac5..3715e42f686f1 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-architecture.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-architecture.md @@ -3,7 +3,7 @@ title: POS for .NET Architecture (POS for .NET v1.14 SDK Documentation) description: POS for .NET Architecture (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET Architecture (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-class-tree.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-class-tree.md index 0e2ff52ece78b..caf7189871379 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-class-tree.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-class-tree.md @@ -3,7 +3,7 @@ title: POS for .NET Class Tree description: POS for .NET Class Tree (POS for .NET v1.14 SDK Documentation) ms.date: 02/27/2008 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET Class Tree (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-device-basic-classes.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-device-basic-classes.md index 26fb64d6722eb..cefc71b6ae070 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-device-basic-classes.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-device-basic-classes.md @@ -3,7 +3,7 @@ title: POS for .NET Device Basic Classes description: POS for .NET Device Basic Classes (POS for .NET v1.14 SDK Documentation) ms.date: 02/27/2008 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET Device Basic Classes (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-faq.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-faq.md index 68f247a9cdf33..5e55389774121 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-faq.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-faq.md @@ -3,7 +3,7 @@ title: POS for .NET FAQ (POS for .NET v1.14 SDK Documentation) description: POS for .NET FAQ (POS for .NET v1.14 SDK Documentation) ms.date: 04/01/2017 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET FAQ (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-integration-with-plug-and-play.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-integration-with-plug-and-play.md index 9439dfe2f671f..90b9d8d18e63b 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-integration-with-plug-and-play.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-integration-with-plug-and-play.md @@ -3,7 +3,7 @@ title: POS for .NET Integration with Plug and Play description: POS for .NET Integration with Plug and Play (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET Integration with Plug and Play (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-registry-settings.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-registry-settings.md index 0df50396ecb85..4adcd6d96aead 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-registry-settings.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-registry-settings.md @@ -3,7 +3,7 @@ title: POS for .NET Registry Settings description: POS for .NET Registry Settings (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET Registry Settings (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-service-object-architecture.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-service-object-architecture.md index 7709fd0bc1e23..2904c1f21cd45 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-service-object-architecture.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-service-object-architecture.md @@ -3,7 +3,7 @@ title: POS for .NET Service Object Architecture description: POS for .NET Service Object Architecture (POS for .NET v1.14 SDK Documentation) ms.date: 02/27/2008 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET Service Object Architecture (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/pos-for-net-v1141-features.md b/docs/framework/additional-apis/pos-for-net/pos-for-net-v1141-features.md index 27ceabad37280..3514eb40a7a4a 100644 --- a/docs/framework/additional-apis/pos-for-net/pos-for-net-v1141-features.md +++ b/docs/framework/additional-apis/pos-for-net/pos-for-net-v1141-features.md @@ -3,7 +3,7 @@ title: POS for .NET v1.14.1 Features description: POS for .NET v1.14.1 Features (POS for .NET v1.14 SDK Documentation) ms.date: 04/21/2017 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POS for .NET v1.14.1 Features (Microsoft Point of Service for .NET) diff --git a/docs/framework/additional-apis/pos-for-net/poscommon-class.md b/docs/framework/additional-apis/pos-for-net/poscommon-class.md index 5d4b929cad103..766930a13a714 100644 --- a/docs/framework/additional-apis/pos-for-net/poscommon-class.md +++ b/docs/framework/additional-apis/pos-for-net/poscommon-class.md @@ -3,7 +3,7 @@ title: PosCommon Class (POS for .NET v1.14 SDK Documentation) description: PosCommon Class (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # PosCommon Class (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/poscommon-information-for-service-object-developers.md b/docs/framework/additional-apis/pos-for-net/poscommon-information-for-service-object-developers.md index b6df1f2fb7fb8..71e179a73161b 100644 --- a/docs/framework/additional-apis/pos-for-net/poscommon-information-for-service-object-developers.md +++ b/docs/framework/additional-apis/pos-for-net/poscommon-information-for-service-object-developers.md @@ -3,7 +3,7 @@ title: PosCommon Information for Service Object Developers description: PosCommon Information for Service Object Developers (POS for .NET v1.14 SDK Documentation) ms.date: 02/27/2008 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # PosCommon Information for Service Object Developers (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/posdevice-class.md b/docs/framework/additional-apis/pos-for-net/posdevice-class.md index b5c79868a84ac..8850717120202 100644 --- a/docs/framework/additional-apis/pos-for-net/posdevice-class.md +++ b/docs/framework/additional-apis/pos-for-net/posdevice-class.md @@ -3,7 +3,7 @@ title: PosDevice Class description: PosDevice Class (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # PosDevice Class (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/posdm-command-arguments.md b/docs/framework/additional-apis/pos-for-net/posdm-command-arguments.md index 3c263588a9ac5..358c7c00732dd 100644 --- a/docs/framework/additional-apis/pos-for-net/posdm-command-arguments.md +++ b/docs/framework/additional-apis/pos-for-net/posdm-command-arguments.md @@ -3,7 +3,7 @@ title: POSDM Command Arguments description: POSDM Command Arguments (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POSDM Command Arguments (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/posdm-commands.md b/docs/framework/additional-apis/pos-for-net/posdm-commands.md index de78e04e3b177..e727144e6e8c3 100644 --- a/docs/framework/additional-apis/pos-for-net/posdm-commands.md +++ b/docs/framework/additional-apis/pos-for-net/posdm-commands.md @@ -3,7 +3,7 @@ title: POSDM Commands description: POSDM Commands (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # POSDM Commands (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/posexplorer-class.md b/docs/framework/additional-apis/pos-for-net/posexplorer-class.md index 3c5df0ce03cec..eddee1045c6c7 100644 --- a/docs/framework/additional-apis/pos-for-net/posexplorer-class.md +++ b/docs/framework/additional-apis/pos-for-net/posexplorer-class.md @@ -3,7 +3,7 @@ title: PosExplorer Class (POS for .NET v1.14 SDK Documentation) description: PosExplorer Class (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # PosExplorer Class (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/poskeyboard-implementation.md b/docs/framework/additional-apis/pos-for-net/poskeyboard-implementation.md index 2b153eb04507c..414298f2a36b5 100644 --- a/docs/framework/additional-apis/pos-for-net/poskeyboard-implementation.md +++ b/docs/framework/additional-apis/pos-for-net/poskeyboard-implementation.md @@ -3,7 +3,7 @@ title: PosKeyboard Implementation description: PosKeyboard Implementation (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # PosKeyboard Implementation (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/scanner-events.md b/docs/framework/additional-apis/pos-for-net/scanner-events.md index 8eefbd7086b35..9102d15e26d7e 100644 --- a/docs/framework/additional-apis/pos-for-net/scanner-events.md +++ b/docs/framework/additional-apis/pos-for-net/scanner-events.md @@ -3,7 +3,7 @@ title: Scanner Events description: Scanner Events (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Scanner Events (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/scanner-implementation.md b/docs/framework/additional-apis/pos-for-net/scanner-implementation.md index e4049d839a182..5fb13dd51297f 100644 --- a/docs/framework/additional-apis/pos-for-net/scanner-implementation.md +++ b/docs/framework/additional-apis/pos-for-net/scanner-implementation.md @@ -3,7 +3,7 @@ title: Scanner Implementation description: Scanner Implementation (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Scanner Implementation (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/service-object-overview.md b/docs/framework/additional-apis/pos-for-net/service-object-overview.md index 9386384929c8f..63f2b39338e8f 100644 --- a/docs/framework/additional-apis/pos-for-net/service-object-overview.md +++ b/docs/framework/additional-apis/pos-for-net/service-object-overview.md @@ -3,7 +3,7 @@ title: Service Object Overview description: Service Object Overview (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Service Object Overview (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/service-object-samples-getting-started.md b/docs/framework/additional-apis/pos-for-net/service-object-samples-getting-started.md index b2c09ab4f9c6b..c6e065d6aa843 100644 --- a/docs/framework/additional-apis/pos-for-net/service-object-samples-getting-started.md +++ b/docs/framework/additional-apis/pos-for-net/service-object-samples-getting-started.md @@ -3,7 +3,7 @@ title: "Service Object Samples: Getting Started" description: "Service Object Samples: Getting Started (POS for .NET v1.14 SDK Documentation)" ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Service Object Samples: Getting Started (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/serviceobject-class.md b/docs/framework/additional-apis/pos-for-net/serviceobject-class.md index 2d5bd1326d6d7..89fcc71bc1f80 100644 --- a/docs/framework/additional-apis/pos-for-net/serviceobject-class.md +++ b/docs/framework/additional-apis/pos-for-net/serviceobject-class.md @@ -3,7 +3,7 @@ title: ServiceObject Class description: ServiceObject Class (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # ServiceObject Class (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/setting-up-a-service-object-project.md b/docs/framework/additional-apis/pos-for-net/setting-up-a-service-object-project.md index db0bf1c981669..54b88cc7de8ed 100644 --- a/docs/framework/additional-apis/pos-for-net/setting-up-a-service-object-project.md +++ b/docs/framework/additional-apis/pos-for-net/setting-up-a-service-object-project.md @@ -3,7 +3,7 @@ title: Setting up a Service Object Project description: Setting up a Service Object Project (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Setting up a Service Object Project (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/statistics-sample.md b/docs/framework/additional-apis/pos-for-net/statistics-sample.md index e71268f5f9e70..ccf9bea7be2e1 100644 --- a/docs/framework/additional-apis/pos-for-net/statistics-sample.md +++ b/docs/framework/additional-apis/pos-for-net/statistics-sample.md @@ -3,7 +3,7 @@ title: Statistics Sample description: Statistics Sample (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Statistics Sample (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/supported-device-classes.md b/docs/framework/additional-apis/pos-for-net/supported-device-classes.md index 0163ff01dfac5..eee0986cfff49 100644 --- a/docs/framework/additional-apis/pos-for-net/supported-device-classes.md +++ b/docs/framework/additional-apis/pos-for-net/supported-device-classes.md @@ -3,7 +3,7 @@ title: Supported Device Classes (POS for .NET v1.14 SDK Documentation) description: Supported Device Classes (POS for .NET v1.14 SDK Documentation) (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Supported Device Classes (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/system-configuration.md b/docs/framework/additional-apis/pos-for-net/system-configuration.md index fc807e633c184..66b4bc26df789 100644 --- a/docs/framework/additional-apis/pos-for-net/system-configuration.md +++ b/docs/framework/additional-apis/pos-for-net/system-configuration.md @@ -3,7 +3,7 @@ title: System Configuration description: System Configuration (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # System Configuration (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/typical-pos-application-architecture.md b/docs/framework/additional-apis/pos-for-net/typical-pos-application-architecture.md index 472f203d33f4d..a0671a0a46b5f 100644 --- a/docs/framework/additional-apis/pos-for-net/typical-pos-application-architecture.md +++ b/docs/framework/additional-apis/pos-for-net/typical-pos-application-architecture.md @@ -3,7 +3,7 @@ title: Typical POS Application Architecture description: Typical POS Application Architecture (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Typical POS Application Architecture (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/using-impl-methods-for-synchronous-or-asynchronous-output.md b/docs/framework/additional-apis/pos-for-net/using-impl-methods-for-synchronous-or-asynchronous-output.md index 17d05db3f1059..7e68f0522ac73 100644 --- a/docs/framework/additional-apis/pos-for-net/using-impl-methods-for-synchronous-or-asynchronous-output.md +++ b/docs/framework/additional-apis/pos-for-net/using-impl-methods-for-synchronous-or-asynchronous-output.md @@ -3,7 +3,7 @@ title: Using Impl Methods for Synchronous or Asynchronous Output description: Using Impl Methods for Synchronous or Asynchronous Output (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Using Impl Methods for Synchronous or Asynchronous Output (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/using-the-pos-device-manager-command-line-tool.md b/docs/framework/additional-apis/pos-for-net/using-the-pos-device-manager-command-line-tool.md index b1749316c9a0f..99ae3aae10a66 100644 --- a/docs/framework/additional-apis/pos-for-net/using-the-pos-device-manager-command-line-tool.md +++ b/docs/framework/additional-apis/pos-for-net/using-the-pos-device-manager-command-line-tool.md @@ -3,7 +3,7 @@ title: Using the POS Device Manager Command-Line Tool description: Using the POS Device Manager Command-Line Tool (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Using the POS Device Manager Command-Line Tool (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/using-the-wmi-api-to-manage-devices.md b/docs/framework/additional-apis/pos-for-net/using-the-wmi-api-to-manage-devices.md index ac067e7395446..d53811cc6a692 100644 --- a/docs/framework/additional-apis/pos-for-net/using-the-wmi-api-to-manage-devices.md +++ b/docs/framework/additional-apis/pos-for-net/using-the-wmi-api-to-manage-devices.md @@ -3,7 +3,7 @@ title: Using the WMI API to Manage Devices description: Using the WMI API to Manage Devices (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Using the WMI API to Manage Devices (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/using-vbscript-to-manage-devices.md b/docs/framework/additional-apis/pos-for-net/using-vbscript-to-manage-devices.md index 106f2b93e88ea..8f907d9fefe11 100644 --- a/docs/framework/additional-apis/pos-for-net/using-vbscript-to-manage-devices.md +++ b/docs/framework/additional-apis/pos-for-net/using-vbscript-to-manage-devices.md @@ -3,7 +3,7 @@ title: Using VBScript to Manage Devices description: Using VBScript to Manage Devices (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Using VBScript to Manage Devices (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md b/docs/framework/additional-apis/pos-for-net/using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md index 950502dacd107..682082970bfc8 100644 --- a/docs/framework/additional-apis/pos-for-net/using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md +++ b/docs/framework/additional-apis/pos-for-net/using-visual-studio-net-management-extensions-and-the-pos-for-net-wmi-management-classes.md @@ -3,7 +3,7 @@ title: Using Visual Studio .NET Management Extensions and the POS for .NET WMI M description: Using Visual Studio .NET Management Extensions and the POS for .NET WMI Management Classes (POS for .NET v1.14 SDK Documentation) ms.date: 03/03/2014 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # Using Visual Studio .NET Management Extensions and the POS for .NET WMI Management Classes (POS for .NET v1.14 SDK Documentation) diff --git a/docs/framework/additional-apis/pos-for-net/whats-new-in-pos-for-net-v114-and-v1141.md b/docs/framework/additional-apis/pos-for-net/whats-new-in-pos-for-net-v114-and-v1141.md index 4485e3735e6bb..8da5bba214b97 100644 --- a/docs/framework/additional-apis/pos-for-net/whats-new-in-pos-for-net-v114-and-v1141.md +++ b/docs/framework/additional-apis/pos-for-net/whats-new-in-pos-for-net-v114-and-v1141.md @@ -3,7 +3,7 @@ title: What's New in POS for .NET v1.14 and v1.14.1 description: What's New in POS for .NET v1.14 and v1.14.1 (POS for .NET v1.14 SDK Documentation) ms.date: 04/12/2017 ms.topic: how-to -ms.custom: pos-restored-from-archive +ms.custom: "pos-restored-from-archive,UpdateFrequency5" --- # What's New in POS for .NET v1.14 and v1.14.1 (Microsoft Point of Service for .NET) diff --git a/docs/framework/app-domains/index.md b/docs/framework/app-domains/index.md index 72ce1e93efadf..cd8a3ac7c2cf7 100644 --- a/docs/framework/app-domains/index.md +++ b/docs/framework/app-domains/index.md @@ -11,9 +11,9 @@ ms.assetid: 96d3b8e3-bef8-4da0-9a81-9841e23a94e9 --- # Programming with Application Domains and Assemblies -Hosts such as Microsoft Internet Explorer, ASP.NET, and the Windows shell load the common language runtime into a process, create an [application domain](application-domains.md) in that process, and then load and execute user code in that application domain when running a .NET Framework application. In most cases, you do not have to worry about creating application domains and loading assemblies into them because the runtime host performs those tasks. +Hosts such as ASP.NET and the Windows shell load the common language runtime into a process, create an [application domain](application-domains.md) in that process, and then load and execute user code in that application domain when running a .NET Framework application. In most cases, you do not have to worry about creating application domains and loading assemblies into them because the runtime host performs those tasks. -However, if you are creating an application that will host the common language runtime, creating tools or code you want to unload programmatically, or creating pluggable components that can be unloaded and reloaded on the fly, you will be creating your own application domains. Even if you are not creating a runtime host, this section provides important information on how to work with application domains and assemblies loaded in these application domains. +However, if you're creating an application that will host the common language runtime, creating tools or code you want to unload programmatically, or creating pluggable components that can be unloaded and reloaded on the fly, you will be creating your own application domains. Even if you are not creating a runtime host, this section provides important information on how to work with application domains and assemblies loaded in these application domains. ## In This Section diff --git a/docs/framework/app-domains/multifile-assemblies.md b/docs/framework/app-domains/multifile-assemblies.md index 1d77091c122db..e7e623284153f 100644 --- a/docs/framework/app-domains/multifile-assemblies.md +++ b/docs/framework/app-domains/multifile-assemblies.md @@ -25,10 +25,7 @@ There are several reasons you might want to create a multifile assembly: - To combine modules written in different languages. This is the most common reason for creating a multifile assembly. -- To optimize downloading an application by putting seldom-used types in a module that is downloaded only when needed. - - > [!NOTE] - > If you are creating applications that will be downloaded using the `<object>` tag with Microsoft Internet Explorer, it is important that you create multifile assemblies. In this scenario, you create a file separate from your code modules that contains only the assembly manifest. Internet Explorer downloads the assembly manifest first, and then creates worker threads to download any additional modules or assemblies required. While the file containing the assembly manifest is being downloaded, Internet Explorer will be unresponsive to user input. The smaller the file containing the assembly manifest, the less time Internet Explorer will be unresponsive. +- To optimize downloading an application by putting seldom-used types in a module that's downloaded only when needed. - To combine code modules written by several developers. Although each developer can compile each code module into an assembly, this can force some types to be exposed publicly that are not exposed if all modules are put into a multifile assembly. diff --git a/docs/framework/app-domains/use.md b/docs/framework/app-domains/use.md index 77e0cfcfdfc72..806b64e2adbbd 100644 --- a/docs/framework/app-domains/use.md +++ b/docs/framework/app-domains/use.md @@ -10,7 +10,7 @@ ms.assetid: c6d99815-e022-4d2c-9420-1d7ab5b9d504 --- # Using Application Domains -Application domains provide a unit of isolation for the common language runtime. They are created and run inside a process. Application domains are usually created by a runtime host, which is an application responsible for loading the runtime into a process and executing user code within an application domain. The runtime host creates a process and a default application domain, and runs managed code inside it. Runtime hosts include ASP.NET, Microsoft Internet Explorer, and the Windows shell. +Application domains provide a unit of isolation for the common language runtime. They are created and run inside a process. Application domains are usually created by a runtime host, which is an application responsible for loading the runtime into a process and executing user code within an application domain. The runtime host creates a process and a default application domain, and runs managed code inside it. Runtime hosts include ASP.NET and the Windows shell. For most applications, you do not need to create your own application domain; the runtime host creates any necessary application domains for you. However, you can create and configure additional application domains if your application needs to isolate code or to use and unload DLLs. diff --git a/docs/framework/configure-apps/file-schema/network/defaultproxy-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/defaultproxy-element-network-settings.md index ade2f4995d581..dce2c60f205f2 100644 --- a/docs/framework/configure-apps/file-schema/network/defaultproxy-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/defaultproxy-element-network-settings.md @@ -53,11 +53,11 @@ Configures the Hypertext Transfer Protocol (HTTP) proxy server. |**Element**|**Description**| |-----------------|---------------------| -|[system.net](system-net-element-network-settings.md)|Contains settings that specify how the .NET Framework connects to the network.| +|[system.net](system-net-element-network-settings.md)|Contains settings that specify how .NET Framework connects to the network.| ## Remarks - If the defaultProxy element is empty, the proxy settings from Internet Explorer will be used. This behavior is different from version 1.1 of the .NET Framework. + If the defaultProxy element is empty, the system proxy settings are used. An exception is thrown if the [module](module-element-network-settings.md) element specifies a non-public type, the type is not deriving from the <xref:System.Net.IWebProxy> class, an exception from the parameterless constructor of this object occurred, or an exception occurred while retrieving the system-specified default proxy. The <xref:System.Exception.InnerException%2A> property on the exception should have more information about the root cause of the error. @@ -67,7 +67,7 @@ Configures the Hypertext Transfer Protocol (HTTP) proxy server. ## Example - The following example uses the defaults from the Internet Explorer proxy, specifies the proxy address, and bypasses the proxy for local access and contoso.com. + The following example uses the defaults from the system proxy, specifies the proxy address, and bypasses the proxy for local access and contoso.com. ```xml <configuration> diff --git a/docs/framework/configure-apps/file-schema/network/proxy-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/proxy-element-network-settings.md index f998303b76886..e9d36e3d0afb1 100644 --- a/docs/framework/configure-apps/file-schema/network/proxy-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/proxy-element-network-settings.md @@ -43,7 +43,7 @@ Defines a proxy server. |`bypassonlocal`|Specifies whether the proxy is bypassed for local resources. Local resources include the local server (`http://localhost`, `http://loopback`, or `http://127.0.0.1`) and a URI without a period (`http://webserver`). The default value is `Unspecified`.| |`proxyaddress`|Specifies the proxy URI to use.| |`scriptLocation`|Specifies the location of the configuration script. Do not use the `bypassonlocal` attribute with this attribute. | -|`usesystemdefault`|Specifies whether to use Internet Explorer proxy settings. If set to `True`, subsequent attributes will override Internet Explorer proxy settings. The default value is `Unspecified`.| +|`usesystemdefault`|Specifies whether to use system proxy settings. If set to `True`, subsequent attributes will override system proxy settings. The default value is `Unspecified`.| ### Child Elements @@ -59,13 +59,11 @@ Defines a proxy server. ## Remarks - The `proxy` element defines a proxy server for an application. If this element is missing from the configuration file, then the .NET Framework will use the proxy settings in Internet Explorer. + The `proxy` element defines a proxy server for an application. If this element is missing from the configuration file, then .NET Framework will use the system proxy settings. The value for the `proxyaddress` attribute should be a well-formed Uniform Resource Indicator (URI). - The `scriptLocation` attribute refers to the automatic detection of proxy configuration scripts. The <xref:System.Net.WebProxy> class will attempt to locate a configuration script (usually named Wpad.dat) when the **Use automatic configuration script** option is selected in Internet Explorer. If `bypassonlocal` is set to any value, `scriptLocation` is ignored. - - Use the `usesystemdefault` attribute for .NET Framework version 1.1 applications that are migrating to version 2.0. + The `scriptLocation` attribute refers to the automatic detection of proxy configuration scripts. The <xref:System.Net.WebProxy> class will attempt to locate a configuration script (usually named Wpad.dat) when the **Use automatic configuration script** option is selected for the connection in Internet properties. If `bypassonlocal` is set to any value, `scriptLocation` is ignored. An exception is thrown if the `proxyaddress` attribute specifies an invalid default proxy. The <xref:System.Exception.InnerException%2A> property on the exception should have more information about the root cause of the error. @@ -75,7 +73,7 @@ Defines a proxy server. ## Example - The following example uses the defaults from the Internet Explorer proxy, specifies the proxy address, and bypasses the proxy for local access. + The following example uses the defaults from the system proxy, specifies the proxy address, and bypasses the proxy for local access. ```xml <configuration> diff --git a/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md b/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md index 7a825019889b4..0076697875551 100644 --- a/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md @@ -2,7 +2,7 @@ description: "Learn more about: <loadFromRemoteSources> element" title: "<loadFromRemoteSources> Element" ms.date: "05/24/2018" -helpviewer_keywords: +helpviewer_keywords: - "loadFromRemoteSources element" - "<loadFromRemoteSources> element" ms.assetid: 006d1280-2ac3-4db6-a984-a3d4e275046a @@ -10,49 +10,49 @@ ms.assetid: 006d1280-2ac3-4db6-a984-a3d4e275046a # \<loadFromRemoteSources> element Specifies whether assemblies loaded from remote sources should be granted full trust in .NET Framework 4 and later. - + > [!NOTE] -> If you were directed to this article because of an error message in the Visual Studio project error list or a build error, see [How to: Use an Assembly from the Web in Visual Studio](/previous-versions/visualstudio/visual-studio-2010/ee890038(v=vs.100)). - +> If you were directed to this article because of an error message in the Visual Studio project error list or a build error, see [How to: Use an Assembly from the Web in Visual Studio](/previous-versions/visualstudio/visual-studio-2010/ee890038(v=vs.100)). + [**\<configuration>**](../configuration-element.md)\   [**\<runtime>**](runtime-element.md)\ -    **\<loadFromRemoteSources>** - -## Syntax - -```xml +    **\<loadFromRemoteSources>** + +## Syntax + +```xml <loadFromRemoteSources - enabled="true|false"/> -``` - + enabled="true|false"/> +``` + ## Attributes and elements - The following sections describe attributes, child elements, and parent elements. - -### Attributes - -|Attribute|Description| -|---------------|-----------------| -|`enabled`|Required attribute.<br /><br /> Specifies whether an assembly that is loaded from a remote source should be granted full trust.| - -## enabled attribute - -|Value|Description| -|-----------|-----------------| -|`false`|Do not grant full trust to applications from remote sources. This is the default.| -|`true`|Grant full trust to applications from remote sources.| - -### Child elements - - None. - -### Parent elements - -|Element|Description| -|-------------|-----------------| -|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| -|`runtime`|Contains information about runtime initialization options.| - + The following sections describe attributes, child elements, and parent elements. + +### Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.<br /><br /> Specifies whether an assembly that is loaded from a remote source should be granted full trust.| + +## enabled attribute + +|Value|Description| +|-----------|-----------------| +|`false`|Do not grant full trust to applications from remote sources. This is the default.| +|`true`|Grant full trust to applications from remote sources.| + +### Child elements + + None. + +### Parent elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about runtime initialization options.| + ## Remarks In the .NET Framework 3.5 and earlier versions, if you load an assembly from a remote location, code in the assembly runs in partial trust with a grant set that depends on the zone from which it is loaded. For example, if you load an assembly from a website, it is loaded into the Internet zone and granted the Internet permission set. In other words, it executes in an Internet sandbox. @@ -89,7 +89,7 @@ Setting the `<loadFromRemoteSources>` element to `true` prevents this exception ## Notes -- In the .NET Framework 4.5 and later versions, assemblies on local network shares run in full trust by default; you do not have to enable the `<loadFromRemoteSources>` element. +- In .NET Framework 4.5 and later versions, assemblies on local network shares (that is, the [Local Intranet security zone](/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms537183(v=vs.85)#default-url-security-zones)) run in full trust by default; you don't have to enable the `<loadFromRemoteSources>` element. For security zones other than Local Machine or Local Intranet, set the value to `true`. - If an application has been copied from the web, it is flagged by Windows as being a web application, even if it resides on the local computer. You can change that designation by changing its file properties, or you can use the `<loadFromRemoteSources>` element to grant the assembly full trust. As an alternative, you can use the <xref:System.Reflection.Assembly.UnsafeLoadFrom%2A> method to load a local assembly that the operating system has flagged as having been loaded from the web. @@ -97,18 +97,18 @@ Setting the `<loadFromRemoteSources>` element to `true` prevents this exception ## Configuration file -This element is typically used in the application configuration file, but can be used in other configuration files depending upon the context. For more information, see the article [More Implicit Uses of CAS Policy: loadFromRemoteSources](/archive/blogs/shawnfa/more-implicit-uses-of-cas-policy-loadfromremotesources) in the .NET Security blog. +This element is typically used in the application configuration file, but can be used in other configuration files depending upon the context. For more information, see the article [More Implicit Uses of CAS Policy: loadFromRemoteSources](/archive/blogs/shawnfa/more-implicit-uses-of-cas-policy-loadfromremotesources) in the .NET Security blog. ## Example The following example shows how to grant full trust to assemblies loaded from remote sources. ```xml -<configuration> - <runtime> - <loadFromRemoteSources enabled="true"/> - </runtime> -</configuration> +<configuration> + <runtime> + <loadFromRemoteSources enabled="true"/> + </runtime> +</configuration> ``` ## See also diff --git a/docs/framework/configure-apps/file-schema/startup/requiredruntime-element.md b/docs/framework/configure-apps/file-schema/startup/requiredruntime-element.md index 0514a9ac70294..e095fca5e626f 100644 --- a/docs/framework/configure-apps/file-schema/startup/requiredruntime-element.md +++ b/docs/framework/configure-apps/file-schema/startup/requiredruntime-element.md @@ -65,9 +65,6 @@ None. The `version` attribute string must match the installation folder name for the specified version of the .NET Framework. This string is not interpreted. If the runtime startup code does not find a matching folder, the runtime is not loaded; the startup code shows an error message and quits. -> [!NOTE] -> The startup code for an application that is hosted in Microsoft Internet Explorer ignores the `<requiredRuntime>` element. - ## Example The following example shows how to specify the runtime version in a configuration file. diff --git a/docs/framework/configure-apps/file-schema/startup/startup-element.md b/docs/framework/configure-apps/file-schema/startup/startup-element.md index 7a9dada33d2cd..96e3a6ba7f122 100644 --- a/docs/framework/configure-apps/file-schema/startup/startup-element.md +++ b/docs/framework/configure-apps/file-schema/startup/startup-element.md @@ -59,8 +59,6 @@ Specifies common language runtime startup information. The **\<supportedRuntime>** element should be used by all applications built using version 1.1 or later of the runtime. Applications built to support only version 1.0 of the runtime must use the **\<requiredRuntime>** element. - The startup code for an application hosted in Microsoft Internet Explorer ignores the **\<startup>** element and its child elements. - ## The useLegacyV2RuntimeActivationPolicy attribute This attribute is useful if your application uses legacy activation paths, such as the [CorBindToRuntimeEx function](../../../unmanaged-api/hosting/corbindtoruntimeex-function.md), and you want those paths to activate version 4 of the CLR instead of an earlier version, or if your application is built with the .NET Framework 4 but has a dependency on a mixed-mode assembly built with an earlier version of the .NET Framework. In those scenarios, set the attribute to `true`. diff --git a/docs/framework/configure-apps/index.md b/docs/framework/configure-apps/index.md index e3b2338d87aad..e5285a66987fa 100644 --- a/docs/framework/configure-apps/index.md +++ b/docs/framework/configure-apps/index.md @@ -67,7 +67,7 @@ This article describes the syntax of configuration files and provides informatio - Executable–hosted app. - These apps have two configuration files: a source configuration file, which is modified by the developer during development, and an output file that is distributed with the app. + These apps have two configuration files: a source configuration file, which is modified by the developer during development, and an output file that's distributed with the app. When you develop in Visual Studio, place the source configuration file for your app in the project directory and set its **Copy To Output Directory** property to **Copy always** or **Copy if newer**. By default, the name of the configuration file is *App.config*. @@ -79,12 +79,6 @@ This article describes the syntax of configuration files and provides informatio For more information about ASP.NET configuration files, see [ASP.NET Configuration Settings](/previous-versions/dotnet/netframework-4.0/b5ysx397(v=vs.100)). -- Internet Explorer-hosted app. - - If an app hosted in Internet Explorer has a configuration file, the location of this file is specified in a `<link>` tag with the following syntax: `<link rel="*ConfigurationFileName*" href="*location*">` - - In this tag, `location` is a URL to the configuration file. This sets the app base. The configuration file must be located on the same website as the app. - ## Security configuration files Security configuration files contain information about the code group hierarchy and permission sets associated with a policy level. We strongly recommend that you use the [Code Access Security Policy tool (Caspol.exe)](../tools/caspol-exe-code-access-security-policy-tool.md) to modify security policy to ensure that policy changes do not corrupt the security configuration files. diff --git a/docs/framework/data/adonet/asynchronous-programming.md b/docs/framework/data/adonet/asynchronous-programming.md index 2213d6906bb27..8e00d925c0e36 100644 --- a/docs/framework/data/adonet/asynchronous-programming.md +++ b/docs/framework/data/adonet/asynchronous-programming.md @@ -30,7 +30,7 @@ The new asynchronous programming feature provides a simple technique to make cod For more information about the asynchronous programming feature that was introduced in .NET Framework 4.5, see: -- [Asynchronous programming in C#](../../../csharp/async.md) +- [Asynchronous programming in C#](../../../csharp/asynchronous-programming/index.md) - [Asynchronous Programming with Async and Await (Visual Basic)](../../../visual-basic/programming-guide/concepts/async/index.md) diff --git a/docs/framework/data/adonet/common-schema-collections.md b/docs/framework/data/adonet/common-schema-collections.md index ae5da98182feb..a76e558b06d64 100644 --- a/docs/framework/data/adonet/common-schema-collections.md +++ b/docs/framework/data/adonet/common-schema-collections.md @@ -28,7 +28,7 @@ The common schema collections are the schema collections that are implemented by |ColumnName|DataType|Description| |----------------|--------------|-----------------| -|CompositeIdentifierSeparatorPattern|string|The regular expression to match the composite separators in a composite identifier. For example, "\\." (for SQL Server) or "\@|\\." (for Oracle).<br /><br /> A composite identifier is typically what is used for a database object name, for example: pubs.dbo.authors or pubs\@dbo.authors.<br /><br /> For SQL Server, use the regular expression "\\.". For OracleClient, use "\@|\\.".<br /><br /> For ODBC use the Catalog_name_seperator.<br /><br /> For OLE DB use DBLITERAL_CATALOG_SEPARATOR or DBLITERAL_SCHEMA_SEPARATOR.| +|CompositeIdentifierSeparatorPattern|string|The regular expression to match the composite separators in a composite identifier. For example, "\\." (for SQL Server) or "\@|\\." (for Oracle).<br /><br /> A composite identifier is typically what is used for a database object name, for example: pubs.dbo.authors or pubs\@dbo.authors.<br /><br /> For SQL Server, use the regular expression "\\.". For OracleClient, use "\@|\\.".<br /><br /> For ODBC use the Catalog_name_separator.<br /><br /> For OLE DB use DBLITERAL_CATALOG_SEPARATOR or DBLITERAL_SCHEMA_SEPARATOR.| |DataSourceProductName|string|The name of the product accessed by the provider, such as "Oracle" or "SQLServer".| |DataSourceProductVersion|string|Indicates the version of the product accessed by the provider, in the data sources native format and not in Microsoft format.<br /><br /> In some cases DataSourceProductVersion and DataSourceProductVersionNormalized will be the same value. In the case of OLE DB and ODBC, these will always be the same as they are mapped to the same function call in the underlying native API.| |DataSourceProductVersionNormalized|string|A normalized version for the data source, such that it can be compared with `String.Compare()`. The format of this is consistent for all versions of the provider to prevent version 10 from sorting between version 1 and version 2.<br /><br /> For example, the Oracle provider uses a format of "nn.nn.nn.nn.nn" for its normalized version, which causes an Oracle 8i data source to return "08.01.07.04.01". SQL Server uses the typical Microsoft "nn.nn.nnnn" format.<br /><br /> In some cases, DataSourceProductVersion and DataSourceProductVersionNormalized will be the same value. In the case of OLE DB and ODBC these will always be the same as they are mapped to the same function call in the underlying native API.| diff --git a/docs/framework/data/adonet/ef/language-reference/how-to-call-model-defined-functions-as-object-methods.md b/docs/framework/data/adonet/ef/language-reference/how-to-call-model-defined-functions-as-object-methods.md index a11e0e39b10a0..52a40e7096071 100644 --- a/docs/framework/data/adonet/ef/language-reference/how-to-call-model-defined-functions-as-object-methods.md +++ b/docs/framework/data/adonet/ef/language-reference/how-to-call-model-defined-functions-as-object-methods.md @@ -47,7 +47,16 @@ This topic describes how to call a model-defined function as a method on an <xre Consider the conceptual model function below that returns product revenue for a specified product. (For information about adding the function to your conceptual model, see [How to: Define Custom Functions in the Conceptual Model](/previous-versions/dotnet/netframework-4.0/dd456812(v=vs.100)).) - [!code-xml[DP L2E Methods on ObjectContext#4](../../../../../../samples/snippets/xml/VS_Snippets_Data/dp l2e methods on objectcontext/xml/adventureworks.edmx#4)] +```xml +<Function Name="GetProductRevenue" ReturnType="Edm.Decimal"> + <Parameter Name="productID" Type="Edm.Int32" /> + <DefiningExpression> + SUM( SELECT VALUE((s.UnitPrice - s.UnitPriceDiscount) * s.OrderQty) + FROM AdventureWorksEntities.SalesOrderDetails as s + WHERE s.ProductID = productID) + </DefiningExpression> +</Function> +``` ## Example 2 @@ -67,7 +76,17 @@ This topic describes how to call a model-defined function as a method on an <xre The following example demonstrates how to call a model-defined function that returns a collection (as an <xref:System.Linq.IQueryable%601> object). Consider the conceptual model function below that returns all the `SalesOrderDetails` for a given product ID. - [!code-xml[DP L2E Methods on ObjectContext#7](../../../../../../samples/snippets/xml/VS_Snippets_Data/dp l2e methods on objectcontext/xml/adventureworks.edmx#7)] +```xml +<Function Name="GetDetailsById" + ReturnType="Collection(AdventureWorksModel.SalesOrderDetail)"> + <Parameter Name="productID" Type="Edm.Int32" /> + <DefiningExpression> + SELECT VALUE s + FROM AdventureWorksEntities.SalesOrderDetails AS s + WHERE s.ProductID = productID + </DefiningExpression> +</Function> +``` ## Example 5 @@ -92,9 +111,17 @@ This topic describes how to call a model-defined function as a method on an <xre > [!NOTE] > When you call a model-defined function as a static method on a custom class, the model-defined function must accept a collection and return an aggregation of values in the collection. - Consider the conceptual model function below that returns product revenue for a SalesOrderDetail collection. (For information about adding the function to your conceptual model, see [How to: Define Custom Functions in the Conceptual Model](/previous-versions/dotnet/netframework-4.0/dd456812(v=vs.100)).). - - [!code-xml[DP L2E Methods on ObjectContext#1](../../../../../../samples/snippets/xml/VS_Snippets_Data/dp l2e methods on objectcontext/xml/adventureworks.edmx#1)] + Consider the conceptual model function below that returns product revenue for a SalesOrderDetail collection. (For information about adding the function to your conceptual model, see [How to: Define Custom Functions in the Conceptual Model](/previous-versions/dotnet/netframework-4.0/dd456812(v=vs.100)).) + +```xml +<Function Name="GetProductRevenue" ReturnType="Edm.Decimal"> + <Parameter Name="details" Type="Collection(AdventureWorksModel.SalesOrderDetail)" /> + <DefiningExpression> + SUM( SELECT VALUE((s.UnitPrice - s.UnitPriceDiscount) * s.OrderQty) + FROM details as s) + </DefiningExpression> +</Function> +``` ## Example 8 diff --git a/docs/framework/data/adonet/ef/language-reference/how-to-call-model-defined-functions-in-queries.md b/docs/framework/data/adonet/ef/language-reference/how-to-call-model-defined-functions-in-queries.md index c07c65a9771d8..0e96e23238920 100644 --- a/docs/framework/data/adonet/ef/language-reference/how-to-call-model-defined-functions-in-queries.md +++ b/docs/framework/data/adonet/ef/language-reference/how-to-call-model-defined-functions-in-queries.md @@ -7,7 +7,7 @@ dev_langs: - "vb" ms.assetid: 6c804e4d-f348-4afd-9f63-d3f0f24bc6a9 --- -# How to: Call Model-Defined Functions in Queries +# How to: Call model-defined functions in queries This topic describes how to call functions that are defined in the conceptual model from within LINQ to Entities queries. @@ -23,9 +23,16 @@ This topic describes how to call functions that are defined in the conceptual mo The following example demonstrates how to call a function that is defined in the conceptual model from within a LINQ to Entities query. The example uses the School model. For information about the School model, see [Creating the School Sample Database](/previous-versions/dotnet/netframework-4.0/bb399731(v=vs.100)) and [Generating the School .edmx File](/previous-versions/dotnet/netframework-4.0/bb399739(v=vs.100)). - The following conceptual model function returns the number of years since an instructor was hired. For information about adding the function to a conceptual model, see [How to: Define Custom Functions in the Conceptual Model](/previous-versions/dotnet/netframework-4.0/dd456812(v=vs.100)).) + The following conceptual model function returns the number of years since an instructor was hired. For information about adding the function to a conceptual model, see [How to: Define Custom Functions in the Conceptual Model](/previous-versions/dotnet/netframework-4.0/dd456812(v=vs.100)). - [!code-xml[DP ConceptualModelFunctions#1](../../../../../../samples/snippets/xml/VS_Snippets_Data/dp conceptualmodelfunctions/xml/school.edmx#1)] +```xml +<Function Name="YearsSince" ReturnType="Edm.Int32"> + <Parameter Name="date" Type="Edm.DateTime" /> + <DefiningExpression> + Year(CurrentDateTime()) - Year(date) + </DefiningExpression> +</Function> +``` ## Example 2 diff --git a/docs/framework/data/adonet/establishing-the-connection.md b/docs/framework/data/adonet/establishing-the-connection.md index 1fe15c0a05ebb..9ad71993648ca 100644 --- a/docs/framework/data/adonet/establishing-the-connection.md +++ b/docs/framework/data/adonet/establishing-the-connection.md @@ -13,7 +13,7 @@ To connect to Microsoft SQL Server, use the <xref:System.Data.SqlClient.SqlConne ## Closing Connections - We recommend that you always close the connection when you are finished using it, so that the connection can be returned to the pool. The `Using` block in Visual Basic or C# automatically disposes of the connection when the code exits the block, even in the case of an unhandled exception. See [using Statement](../../../csharp/language-reference/keywords/using-statement.md) and [Using Statement](../../../visual-basic/language-reference/statements/using-statement.md) for more information. + We recommend that you always close the connection when you are finished using it, so that the connection can be returned to the pool. The `Using` block in Visual Basic or C# automatically disposes of the connection when the code exits the block, even in the case of an unhandled exception. See [using statement](../../../csharp/language-reference/statements/using.md) and [Using Statement](../../../visual-basic/language-reference/statements/using-statement.md) for more information. You can also use the `Close` or `Dispose` methods of the connection object for the provider that you are using. Connections that are not explicitly closed might not be added or returned to the pool. For example, a connection that has gone out of scope but that has not been explicitly closed will only be returned to the connection pool if the maximum pool size has been reached and the connection is still valid. For more information, see [OLE DB, ODBC, and Oracle Connection Pooling](ole-db-odbc-and-oracle-connection-pooling.md). diff --git a/docs/framework/data/adonet/oracle-lobs.md b/docs/framework/data/adonet/oracle-lobs.md index d183d2d993072..3475848380ca5 100644 --- a/docs/framework/data/adonet/oracle-lobs.md +++ b/docs/framework/data/adonet/oracle-lobs.md @@ -88,7 +88,7 @@ public class LobExample // (using OracleLob.Read as in the above example). // However, because the OracleLob object inherits directly // from the .NET stream object, - // all the existing classes that manipluate streams can + // all the existing classes that manipulate streams can // also be used. For example, the // .NET StreamReader makes it easier to convert the raw bytes // into actual characters. diff --git a/docs/framework/data/adonet/sql-server-connection-pooling.md b/docs/framework/data/adonet/sql-server-connection-pooling.md index f5999262f8b8a..f4f110464e36b 100644 --- a/docs/framework/data/adonet/sql-server-connection-pooling.md +++ b/docs/framework/data/adonet/sql-server-connection-pooling.md @@ -65,7 +65,7 @@ using (SqlConnection connection = new SqlConnection( The connection pooler satisfies requests for connections by reallocating connections as they are released back into the pool. If the maximum pool size has been reached and no usable connection is available, the request is queued. The pooler then tries to reclaim any connections until the time-out is reached (the default is 15 seconds). If the pooler cannot satisfy the request before the connection times out, an exception is thrown. > [!CAUTION] -> We strongly recommend that you always close the connection when you are finished using it so that the connection will be returned to the pool. You can do this using either the `Close` or `Dispose` methods of the `Connection` object, or by opening all connections inside a `using` statement in C#, or a `Using` statement in Visual Basic. Connections that are not explicitly closed might not be added or returned to the pool. For more information, see [using Statement](../../../csharp/language-reference/keywords/using-statement.md) or [How to: Dispose of a System Resource](../../../visual-basic/programming-guide/language-features/control-flow/how-to-dispose-of-a-system-resource.md) for Visual Basic. +> We strongly recommend that you always close the connection when you are finished using it so that the connection will be returned to the pool. You can do this using either the `Close` or `Dispose` methods of the `Connection` object, or by opening all connections inside a `using` statement in C#, or a `Using` statement in Visual Basic. Connections that are not explicitly closed might not be added or returned to the pool. For more information, see [using statement](../../../csharp/language-reference/statements/using.md) or [How to: Dispose of a System Resource](../../../visual-basic/programming-guide/language-features/control-flow/how-to-dispose-of-a-system-resource.md) for Visual Basic. > [!NOTE] > Do not call `Close` or `Dispose` on a `Connection`, a `DataReader`, or any other managed object in the `Finalize` method of your class. In a finalizer, only release unmanaged resources that your class owns directly. If your class does not own any unmanaged resources, do not include a `Finalize` method in your class definition. For more information, see [Garbage Collection](../../../standard/garbage-collection/index.md). diff --git a/docs/framework/data/adonet/sql/linq/sql-clr-type-mapping.md b/docs/framework/data/adonet/sql/linq/sql-clr-type-mapping.md index 8312776e64506..441220be42d6e 100644 --- a/docs/framework/data/adonet/sql/linq/sql-clr-type-mapping.md +++ b/docs/framework/data/adonet/sql/linq/sql-clr-type-mapping.md @@ -257,7 +257,7 @@ In LINQ to SQL, the data model of a relational database maps to an object model ### Binary Serialization - If a class implements the <xref:System.Runtime.Serialization.ISerializable> interface, you can serialize an object to any SQL binary field (`BINARY`, `VARBINARY`, `IMAGE`). The object is serialized and deserialized according to how the <xref:System.Runtime.Serialization.ISerializable> interface is implemented. For more information, see [Binary Serialization](../../../../../standard/serialization/binary-serialization.md). + If a class implements the <xref:System.Runtime.Serialization.ISerializable> interface, you can serialize an object to any SQL binary field (`BINARY`, `VARBINARY`, `IMAGE`). The object is serialized and deserialized according to how the <xref:System.Runtime.Serialization.ISerializable> interface is implemented. For more information, see [Binary Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization). <a name="MiscMapping"></a> diff --git a/docs/framework/data/adonet/sql/sqlcommand-execution-with-a-sqlnotificationrequest.md b/docs/framework/data/adonet/sql/sqlcommand-execution-with-a-sqlnotificationrequest.md index ae7dcfba8ddcb..fffbdf8720a26 100644 --- a/docs/framework/data/adonet/sql/sqlcommand-execution-with-a-sqlnotificationrequest.md +++ b/docs/framework/data/adonet/sql/sqlcommand-execution-with-a-sqlnotificationrequest.md @@ -36,7 +36,7 @@ Dim command As New SqlCommand( _ "SELECT ShipperID, CompanyName, Phone FROM dbo.Shippers", connection) ' Create a SqlNotificationRequest object. -Dim notifcationRequest As New SqlNotificationRequest() +Dim notificationRequest As New SqlNotificationRequest() notificationRequest.id = "NotificationID" notificationRequest.Service = "mySSBQueue" diff --git a/docs/framework/debug-trace-profile/enabling-jit-attach-debugging.md b/docs/framework/debug-trace-profile/enabling-jit-attach-debugging.md index 39f9a5de20233..4ce87013d2b20 100644 --- a/docs/framework/debug-trace-profile/enabling-jit-attach-debugging.md +++ b/docs/framework/debug-trace-profile/enabling-jit-attach-debugging.md @@ -27,7 +27,7 @@ JIT-attach debugging is the phrase used to describe attaching a debugger to a pr - [DebugBreak](/windows/win32/api/debugapi/nf-debugapi-debugbreak) function (Win32). - Before the .NET Framework 4, the .NET Framework provided separate registry keys to control the behavior of native and managed debuggers. Starting with the .NET Framework 4, control is consolidated under a single registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Current Version\AeDebug. The values you can set for that key determine whether a debugger is invoked, and, if so, whether it is invoked with a dialog box that requires user interaction. For information about setting this registry key, see [Configuring Automatic Debugging](/windows/win32/debug/configuring-automatic-debugging). + Before the .NET Framework 4, the .NET Framework provided separate registry keys to control the behavior of native and managed debuggers. Starting with the .NET Framework 4, control is consolidated under a single registry key: `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug`. The values you can set for that key determine whether a debugger is invoked, and, if so, whether it is invoked with a dialog box that requires user interaction. For information about setting this registry key, see [Configuring Automatic Debugging](/windows/win32/debug/configuring-automatic-debugging). ## See also diff --git a/docs/framework/debug-trace-profile/index.md b/docs/framework/debug-trace-profile/index.md index 4a297cabab167..ffb77c4711a62 100644 --- a/docs/framework/debug-trace-profile/index.md +++ b/docs/framework/debug-trace-profile/index.md @@ -15,36 +15,39 @@ helpviewer_keywords: - "application development [.NET Framework], profiling" ms.assetid: 4a04863e-2475-46f4-bc3f-3c11510c2a4b --- -# Debugging, Tracing, and Profiling +# Debugging, tracing, and profiling To debug a .NET Framework application, the compiler and runtime environment must be configured to enable a debugger to attach to the application and to produce both symbols and line maps, if possible, for the application and its corresponding Microsoft intermediate language (MSIL). After a managed application has been debugged, it can be profiled to boost performance. Profiling evaluates and describes the lines of source code that generate the most frequently executed code, and how much time it takes to execute them. .NET Framework applications are easily debugged by using Visual Studio, which handles many of the configuration details. If Visual Studio is not installed, you can examine and improve the performance of .NET Framework applications by using the debugging classes in the .NET Framework <xref:System.Diagnostics> namespace. This namespace includes the <xref:System.Diagnostics.Trace>, <xref:System.Diagnostics.Debug>, and <xref:System.Diagnostics.TraceSource> classes for tracing execution flow, and the <xref:System.Diagnostics.Process>, <xref:System.Diagnostics.EventLog>, and <xref:System.Diagnostics.PerformanceCounter> classes for profiling code. -## In This Section +## In this section - [Enabling JIT-Attach Debugging](enabling-jit-attach-debugging.md) - Shows how to configure the registry to JIT-attach a debug engine to a .NET Framework application. +[Enabling JIT-Attach Debugging](enabling-jit-attach-debugging.md)\ +Shows how to configure the registry to JIT-attach a debug engine to a .NET Framework application. - [Making an Image Easier to Debug](making-an-image-easier-to-debug.md) - Shows how to turn JIT tracking on and optimization off to make an assembly easier to debug. +[Making an Image Easier to Debug](making-an-image-easier-to-debug.md)\ +Shows how to turn JIT tracking on and optimization off to make an assembly easier to debug. - [Tracing and Instrumenting Applications](tracing-and-instrumenting-applications.md) - Describes how to monitor the execution of your application while it is running, and how to instrument it to display how well it is performing or whether something has gone wrong. +[Tracing and Instrumenting Applications](tracing-and-instrumenting-applications.md)\ +Describes how to monitor the execution of your application while it is running, and how to instrument it to display how well it is performing or whether something has gone wrong. - [Diagnosing Errors with Managed Debugging Assistants](diagnosing-errors-with-managed-debugging-assistants.md) - Describes managed debugging assistants (MDAs), which are debugging aids that work in conjunction with the common language runtime (CLR) to provide information on runtime state. +[Diagnosing Errors with Managed Debugging Assistants](diagnosing-errors-with-managed-debugging-assistants.md)\ +Describes managed debugging assistants (MDAs), which are debugging aids that work in conjunction with the common language runtime (CLR) to provide information on runtime state. - [Enhancing Debugging with the Debugger Display Attributes](enhancing-debugging-with-the-debugger-display-attributes.md) - Describes how the developer of a type can specify what that type will look like when it is displayed in a debugger. - - [Performance Counters](performance-counters.md) - Describes the counters that you can use to track the performance of an application. +[Enhancing Debugging with the Debugger Display Attributes](enhancing-debugging-with-the-debugger-display-attributes.md)\ +Describes how the developer of a type can specify what that type will look like when it is displayed in a debugger. + +[Runtime Profiling](runtime-profiling.md)\ +Learn how to gather information about application performance. + +[Performance Counters](performance-counters.md)\ +Describes the counters that you can use to track the performance of an application. -## Related Sections +## Related sections - [Debug ASP.NET or ASP.NET Core apps in Visual Studio](/visualstudio/debugger/how-to-enable-debugging-for-aspnet-applications) - Provides prerequisites and instructions for how to debug an ASP.NET application during development or after deployment. +[Debug ASP.NET or ASP.NET Core apps in Visual Studio](/visualstudio/debugger/how-to-enable-debugging-for-aspnet-applications) +Provides prerequisites and instructions for how to debug an ASP.NET application during development or after deployment. - [Development Guide](../development-guide.md) - Provides a guide to all key technology areas and tasks for application development, including creating, configuring, debugging, securing, and deploying your application, and information about dynamic programming, interoperability, extensibility, memory management, and threading. +[Development Guide](../development-guide.md) +Provides a guide to all key technology areas and tasks for application development, including creating, configuring, debugging, securing, and deploying your application, and information about dynamic programming, interoperability, extensibility, memory management, and threading. diff --git a/docs/framework/deployment/how-the-runtime-locates-assemblies.md b/docs/framework/deployment/how-the-runtime-locates-assemblies.md index 6d37f92a54aa5..e86056eaefe3e 100644 --- a/docs/framework/deployment/how-the-runtime-locates-assemblies.md +++ b/docs/framework/deployment/how-the-runtime-locates-assemblies.md @@ -74,7 +74,7 @@ These files follow the same syntax and provide information such as binding redir ### Application Configuration File -First, the common language runtime checks the application configuration file for information that overrides the version information stored in the calling assembly's manifest. The application configuration file can be deployed with an application, but is not required for application execution. Usually the retrieval of this file is almost instantaneous, but in situations where the application base is on a remote computer, such as in an Internet Explorer Web-based scenario, the configuration file must be downloaded. +First, the common language runtime checks the application configuration file for information that overrides the version information stored in the calling assembly's manifest. The application configuration file can be deployed with an application, but is not required for application execution. Usually the retrieval of this file is almost instantaneous, but in situations where the application base is on a remote computer, such as in a Web-based scenario, the configuration file must be downloaded. For client executables, the application configuration file resides in the same directory as the application's executable and has the same base name as the executable with a .config extension. For example, the configuration file for C:\Program Files\Myapp\Myapp.exe is C:\Program Files\Myapp\Myapp.exe.config. In a browser-based scenario, the HTML file must use the **\<link>** element to explicitly point to the configuration file. diff --git a/docs/framework/get-started/overview.md b/docs/framework/get-started/overview.md index 8d0cf6a10af39..75d5db6a7254f 100644 --- a/docs/framework/get-started/overview.md +++ b/docs/framework/get-started/overview.md @@ -35,8 +35,6 @@ ms.assetid: 29848c96-fc36-462d-8072-ba223a40b697 For example, ASP.NET hosts the runtime to provide a scalable, server-side environment for managed code. ASP.NET works directly with the runtime to enable ASP.NET apps and XML web services, both of which are discussed later in this article. -Internet Explorer is an example of an unmanaged app that hosts the runtime (in the form of a MIME type extension). Using Internet Explorer to host the runtime enables you to embed managed components or Windows Forms controls in HTML documents. Hosting the runtime in this way makes managed mobile code possible, but with significant improvements that only managed code offers, such as semi-trusted execution and isolated file storage. - The following illustration shows the relationship of the common language runtime and the class library to your apps and to the overall system. The illustration also shows how managed code operates within a larger architecture. ![Screenshot that shows how managed code operates within a larger architecture.](./media/overview/language-runtime-class-library-relationship.gif) diff --git a/docs/framework/install/application-not-started.md b/docs/framework/install/application-not-started.md index 86f0c224b6f1e..c7b9a01858a4b 100644 --- a/docs/framework/install/application-not-started.md +++ b/docs/framework/install/application-not-started.md @@ -1,21 +1,15 @@ --- -title: Troubleshooting 'This application could not be started' -description: Learn what to do if you see a 'This application could not be started' dialog box. -ms.date: 10/06/2021 +title: Fix .NET Framework 'This application could not be started' +description: Learn what to do if you see a 'This application could not be started' dialog box when running a .NET Framework application. +ms.date: 02/13/2023 --- -# Troubleshooting a 'This application could not be started' error message +# "This application could not be started" error when running a .NET Framework application -Applications that are developed for .NET Framework typically require that a specific version of .NET Framework be installed on your system. In some cases, you may attempt to run an application without either an installed version or the expected version of .NET Framework present. This often produces an error dialog box like the following: +When you attempt to run a .NET Framework application, you may receive the "This application could not be started" error message. When this error is caused by an installed version of .NET Framework not being detected, or by .NET Framework being corrupted, use this article to try to solve that problem. -![This application could not be started](media/application-not-started/app-could-not-be-started.png) +:::image type="content" source="media/application-not-started/app-could-not-be-started.png" alt-text="This application could not be started dialog box."::: -## Error causes - -This error typically indicates one of the following conditions: - -- A .NET Framework installation on your system has become corrupted. - -- The version of .NET Framework needed by your application cannot be detected. +If you still can't run the application after completing all the steps in this article, then the issue may be caused by some other reason, like a corrupted file system, missing dependencies, or a problem with the application. In that case, you can try contacting the app publisher or post a question to [Microsoft Support Community](https://answers.microsoft.com/) or [Microsoft Q&A](/answers/tags/97/dotnet) for more help. ## How to fix the error @@ -25,17 +19,17 @@ To address this issue so that you can run your application, do the following: 1. If the .NET Framework Repair Tool recommends any additional action, such as those shown in the following figure, select **Next**. - ![Repair tool recommended changes](media/application-not-started/repair-tool-recommended-changes.png) + :::image type="content" source="media/application-not-started/repair-tool-recommended-changes.png" alt-text="Repair tool recommended changes."::: 1. The .NET Framework Repair Tools displays a dialog box shown in the following figure to indicate that changes are complete. Leave the dialog box open while you to try rerun your application. This should succeed if the .NET Framework Repair Tool has identified and corrected a corrupted .NET Framework installation. - ![Repair tool changes complete](media/application-not-started/repair-tool-changes-complete.png) + :::image type="content" source="media/application-not-started/repair-tool-changes-complete.png" alt-text="Repair tool changes complete."::: 1. If your application runs successfully, select the **Finish** button. Otherwise, select the **Next** button. 1. If you selected the **Next** button, the .NET Framework Repair Tool displays a dialog box like the following. Select the **Finish** button to send diagnostic information to Microsoft. - ![Unable to resolve the problem](media/application-not-started/repair-tool-no-resolution.png) + :::image type="content" source="media/application-not-started/repair-tool-no-resolution.png" alt-text="Unable to resolve the problem with the repair tool."::: 1. If you still cannot run the application, install the latest version of .NET Framework that's supported by your version of Windows, as shown in the following table. @@ -55,7 +49,7 @@ To address this issue so that you can run your application, do the following: 1. In some cases, you may see a dialog box like the following, which asks you to install .NET Framework 3.5. Select **Download and install this feature** to install .NET Framework 3.5, then launch the application again. - ![Windows Features dialog box suggesting to install .NET Framework 3.5](media/application-not-started/install-3-5.png) + :::image type="content" source="media/application-not-started/install-3-5.png" alt-text="Windows Features dialog box suggesting to install .NET Framework 3.5."::: ## See also diff --git a/docs/framework/interop/marshalling-different-types-of-arrays.md b/docs/framework/interop/marshalling-different-types-of-arrays.md index 36cafe05276d4..fca49b99634b6 100644 --- a/docs/framework/interop/marshalling-different-types-of-arrays.md +++ b/docs/framework/interop/marshalling-different-types-of-arrays.md @@ -12,7 +12,7 @@ ms.assetid: c5ac9920-5b6e-4dc9-bf2d-1f6f8ad3b0bf --- # Marshalling Different Types of Arrays -An array is a reference type in managed code that contains one or more elements of the same type. Although arrays are reference types, they are passed as In parameters to unmanaged functions. This behavior is inconsistent with way managed arrays are passed to managed objects, which is as In/Out parameters. For additional details, see [Copying and Pinning](copying-and-pinning.md). +An array is a reference type in managed code that contains one or more elements of the same type. Although arrays are reference types, they are passed as In parameters to unmanaged functions. This behavior is inconsistent with the way managed arrays are passed to managed objects, which is as In/Out parameters. For additional details, see [Copying and Pinning](copying-and-pinning.md). The following table lists marshalling options for arrays and describes their usage. diff --git a/docs/framework/migration-guide/application-compatibility.md b/docs/framework/migration-guide/application-compatibility.md index ada04b1e165f2..2da5fe8c04a38 100644 --- a/docs/framework/migration-guide/application-compatibility.md +++ b/docs/framework/migration-guide/application-compatibility.md @@ -8,9 +8,9 @@ helpviewer_keywords: - ".NET Framework changes" ms.assetid: c4ba3ff2-fe59-4c5d-9e0b-86bba3cd865c --- -# Application compatibility in the .NET Framework +# Application compatibility in .NET Framework -Compatibility is an important goal of each .NET release. Compatibility ensures that each version is additive, so previous versions will continue to work. On the other hand, changes to previous functionality (for example, to improve performance, address security issues, or fix bugs) can cause compatibility problems in existing code or existing applications that run under a later version. +Compatibility is an important goal of each .NET Framework release. Compatibility ensures that each version is additive, so previous versions will continue to work. On the other hand, changes to previous functionality (for example, to improve performance, address security issues, or fix bugs) can cause compatibility problems in existing code or existing applications that run under a later version. Each app targets a specific version of the .NET Framework by: diff --git a/docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md b/docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md index a037994816399..b645ca5ec74a3 100644 --- a/docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md +++ b/docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md @@ -1,7 +1,7 @@ --- title: Determine which .NET Framework versions are installed description: Use code, regedit.exe, or PowerShell to detect which versions of .NET Framework are installed on a machine by querying the Windows registry. -ms.date: 09/29/2022 +ms.date: 03/06/2023 dev_langs: - "csharp" - "vb" @@ -112,7 +112,7 @@ Use PowerShell commands to check the value of the **Release** entry of the **HKE The following examples check the value of the **Release** entry to determine whether .NET Framework 4.6.2 or later is installed. This code returns `True` if it's installed and `False` otherwise. ```powershell -(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").Release -ge 394802 +(Get-ItemPropertyValue -LiteralPath 'HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -Name Release) -ge 394802 ``` ### Query the registry using code @@ -124,7 +124,7 @@ The following examples check the value of the **Release** entry to determine whe 01. Check the **Release** REG_DWORD value to determine the installed version. To be forward-compatible, check for a value greater than or equal to the value listed in the [.NET Framework version table](#version_table). -The following example checks the value of the **Release** entry in the registry to find the versions of .NET Framework 4.5-4.8 that are installed. +The following example checks the value of the **Release** entry in the registry to find the versions of .NET Framework 4.5-4.8.1 that are installed. > [!TIP] > Add the directive `using Microsoft.Win32` or `Imports Microsoft.Win32` at the top of your code file if you haven't already done so. @@ -139,6 +139,34 @@ The example displays output like the following: .NET Framework Version: 4.6.1 ``` +### Query the registry using code PowerShell + +The following example uses PowerShell to check the value of the **Release** entry in the registry to find the versions of .NET Framework 4.5-4.8.1 that are installed: + +```powershell +$release = Get-ItemPropertyValue -LiteralPath 'HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -Name Release +switch ($release) { + { $_ -ge 533320 } { $version = '4.8.1 or later'; break } + { $_ -ge 528040 } { $version = '4.8'; break } + { $_ -ge 461808 } { $version = '4.7.2'; break } + { $_ -ge 461308 } { $version = '4.7.1'; break } + { $_ -ge 460798 } { $version = '4.7'; break } + { $_ -ge 394802 } { $version = '4.6.2'; break } + { $_ -ge 394254 } { $version = '4.6.1'; break } + { $_ -ge 393295 } { $version = '4.6'; break } + { $_ -ge 379893 } { $version = '4.5.2'; break } + { $_ -ge 378675 } { $version = '4.5.1'; break } + { $_ -ge 378389 } { $version = '4.5'; break } + default { $version = $null; break } +} + +if ($version) { + Write-Host -Object ".NET Framework Version: $version" +} else { + Write-Host -Object '.NET Framework Version 4.5 or later is not detected.' +} +``` + This example follows the recommended practice for version checking: - It checks whether the value of the **Release** entry is *greater than or equal to* the value of the known release keys. @@ -201,6 +229,51 @@ v4.0 Client 4.0.0.0 ``` +### Query the registry using PowerShell (older framework versions) + +The following example uses PowerShell to check the value of the **Release** entry in the registry to find the versions of .NET Framework 1-4 that are installed: + +```powershell +Get-ChildItem -Path 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' | +Where-Object { ($_.PSChildName -ne "v4") -and ($_.PSChildName -like 'v*') } | +ForEach-Object { + $name = $_.Version + $sp = $_.SP + $install = $_.Install + if (-not $install) { + Write-Host -Object "$($_.PSChildName) $($name)" + } + elseif ($install -eq '1') { + if (-not $sp) { + Write-Host -Object "$($_.PSChildName) $($name)" + } + else { + Write-Host -Object "$($_.PSChildName) $($name) SP$($sp)" + } +} + if (-not $name) { + $parentName = $_.PSChildName + Get-ChildItem -LiteralPath $_.PSPath | + Where-Object { + if ($_.Property -contains 'Version') { $name = Get-ItemPropertyValue -Path $_.PSPath -Name Version } + if ($name -and ($_.Property -contains 'SP')) { $sp = Get-ItemPropertyValue -Path $_.PSPath -Name SP } + if ($_.Property -contains 'Install') { $install = Get-ItemPropertyValue -Path $_.PSPath -Name Install } + if (-not $install) { + Write-Host -Object " $($parentName) $($name)" + } + elseif ($install -eq '1') { + if (-not $sp) { + Write-Host -Object " $($_.PSChildName) $($name)" + } + else { + Write-Host -Object " $($_.PSChildName) $($name) SP$($sp)" + } + } + } + } +} +``` + ## Find CLR versions The .NET Framework CLR installed with .NET Framework is versioned separately. There are two ways to detect the version of the .NET Framework CLR: diff --git a/docs/framework/migration-guide/net-framework-4-migration-issues.md b/docs/framework/migration-guide/net-framework-4-migration-issues.md index a7864808c729a..604e4a1358079 100644 --- a/docs/framework/migration-guide/net-framework-4-migration-issues.md +++ b/docs/framework/migration-guide/net-framework-4-migration-issues.md @@ -31,7 +31,7 @@ Assembly: System.Web (in System.Web.dll) | **Control rendering** | In previous versions of ASP.NET, some controls emitted markup that you could not disable. By default, this type of markup is no longer generated in ASP.NET 4. The rendering changes affect the following controls:<br><br>\* The `Image` and `ImageButton` controls no longer render a `border="0"` attribute.<br>\* The `BaseValidator` class and validation controls that derive from it no longer render red text by default.<br>\* The `HtmlForm` control does not render a `name` attribute.<br>\* The `Table` control no longer renders a `border="0"` attribute.<br><br>Controls that are not designed for user input (for example, the `Label` control) no longer render the `disabled="disabled"` attribute if their `Enabled` property is set to `false` (or if they inherit this setting from a container control). | If you use Visual Studio to upgrade your application from ASP.NET 2.0 or ASP.NET 3.5, the tool automatically adds a setting to the Web.config file that preserves legacy rendering. However, if you upgrade an application by changing the application pool in IIS to target .NET Framework 4, ASP.NET uses the new rendering mode by default. To disable the new rendering mode, add the following setting to the Web.config file:<br><br>`<pages controlRenderingCompatibilityVersion="3.5" />` | | **Event handlers in default documents** | ASP.NET 4 renders the HTML `form` element's `action` attribute value as an empty string when a request is made to an extensionless URL that has a default document mapped to it. In earlier releases of ASP.NET, a request to `http://contoso.com` would result in a request to Default.aspx. In that document, the opening `form` tag would be rendered as in the following example:<br><br>`<form action="Default.aspx" />`<br><br>In ASP.NET 4, a request to `http://contoso.com` also results in a request to Default.aspx, but ASP.NET now renders the HTML opening `form` tag as in the following example:<br><br>`<form action="" />`<br><br>When the `action` attribute is an empty string, the IIS `DefaultDocumentModule` object creates a child request to Default.aspx. Under most conditions, this child request is transparent to application code, and the Default.aspx page runs normally. However, a potential interaction between managed code and IIS 7 or IIS 7.5 Integrated mode can cause managed .aspx pages to stop working properly during the child request. If the following conditions occur, the child request to a default .aspx document will result in an error or in unexpected behavior:<br><br>\* An .aspx page is sent to the browser with the `form` element's `action` attribute set to "".<br>\* The form is posted back to ASP.NET.<br>\* A managed HTTP module reads some part of the entity body, such as `Request.Form` or `Request.Params`. This causes the entity body of the POST request to be read into managed memory. As a result, the entity body is no longer available to any native code modules that are running in IIS 7 or IIS 7.5 Integrated mode.<br>\* The IIS `DefaultDocumentModule` object eventually runs and creates a child request to the Default.aspx document. However, because the entity body has already been read by a piece of managed code, there is no entity body available to send to the child request.<br>\* When the HTTP pipeline runs for the child request, the handler for .aspx files runs during the handler-execute phase.<br><br>Because there is no entity body, there are no form variables and no view state. Therefore there is no information available for the .aspx page handler to determine what event (if any) should be raised. As a result, none of the postback event handlers for the affected .aspx page run. | For information about ways to work around problems that might arise as a result of this change, see "Event Handlers Might Not Be Not Raised in a Default Document in IIS 7 or IIS 7.5 Integrated Mode" in the document [ASP.NET 4 Breaking Changes](/aspnet/whitepapers/aspnet4/breaking-changes) on the ASP.NET Web site. | | **Hashing algorithm** | ASP.NET uses both encryption and hashing algorithms to help secure data such as forms authentication cookies and view state. By default, ASP.NET 4 uses the <xref:System.Security.Cryptography.HMACSHA256> algorithm for hash operations on cookies and view state. Earlier versions of ASP.NET used the older <xref:System.Security.Cryptography.HMACSHA1> algorithm. | If you run applications that mix ASP.NET 2.0 and ASP.NET 4, where data such as forms authentication cookies must work across .NET Framework versions, configure an ASP.NET 4 Web application to use the older <xref:System.Security.Cryptography.HMACSHA1> algorithm by adding the following setting in the Web.config file:<br><br>`<machineKey validation="SHA1" />` | -| **Hosting controls in Internet Explorer** | You can no longer host Windows Forms controls in the Internet Explorer, because there are better solutions for hosting controls on the Web. Therefore, the IEHost.dll and IEExec.exe assemblies have been removed from .NET Framework. | You can use the following technologies for custom control development in Web applications:<br><br>\* You can create a Silverlight application and configure it to run outside the browser. For more information, see [Out-of-Browser Support](/previous-versions/windows/silverlight/dotnet-windows-silverlight/dd550721(v=vs.95)).<br>\* You can build a XAML browser application (XBAP) to take advantage of WPF capabilities (requires .NET Framework on client machines). For more information, see [WPF XAML Browser Applications Overview](/dotnet/desktop/wpf/app-development/wpf-xaml-browser-applications-overview). | +| **Hosting controls in Internet Explorer** | You can no longer host Windows Forms controls in Internet Explorer, because there are better solutions for hosting controls on the Web. Therefore, the IEHost.dll and IEExec.exe assemblies have been removed from .NET Framework. | You can use the following technologies for custom control development in Web applications:<br><br>\* You can create a Silverlight application and configure it to run outside the browser. For more information, see [Out-of-Browser Support](/previous-versions/windows/silverlight/dotnet-windows-silverlight/dd550721(v=vs.95)).<br>\* You can build a XAML browser application (XBAP) to take advantage of WPF capabilities (requires .NET Framework on client machines). For more information, see [WPF XAML Browser Applications Overview](/dotnet/desktop/wpf/app-development/wpf-xaml-browser-applications-overview). | | **HtmlEncode and UrlEncode methods** | The `HtmlEncode` and `UrlEncode` methods of the <xref:System.Web.HttpUtility> and <xref:System.Web.HttpServerUtility> classes have been updated to encode the single quotation mark character (') as follows:<br><br>\* The `HtmlEncode` method encodes instances of the single quotation mark as `'`<br>\* The `UrlEncode` method encodes instances of the single quotation mark as `%27` | Examine your code for places where you use the `HtmlEncode` and `UrlEncode` methods, and make sure that the change in encoding does not result in a change that would affect your application. | | **HttpException errors in ASP.NET 2.0 applications** | After ASP.NET 4 has been enabled on IIS 6, ASP.NET 2.0 applications that run on IIS 6 (in either Windows Server 2003 or Windows Server 2003 R2) might generate errors such as the following: `System.Web.HttpException: Path '/[yourApplicationRoot]/eurl.axd/[Value]' was not found.` | * If ASP.NET 4 is not required in order to run the Web site, remap the site to use ASP.NET 2.0 instead.<br><br>-or-<br><br>\* If ASP.NET 4 is required in order to run the Web site, move any child ASP.NET 2.0 virtual directories to a different Web site that is mapped to ASP.NET 2.0.<br><br>-or-<br><br>\* Disable extensionless URLs. For more information, see "ASP.NET 2.0 Applications Might Generate HttpException Errors That Reference eurl.axd" in the document [ASP.NET 4 Breaking Changes](/aspnet/whitepapers/aspnet4/breaking-changes) on the ASP.NET Web site. | | **Membership types** | Some types (for example, <xref:System.Web.Security.MembershipProvider>) that are used in ASP.NET membership have been moved from System.Web.dll to the System.Web.ApplicationServices.dll assembly. The types were moved in order to resolve architectural layering dependencies between types in the client and in extended .NET Framework SKUs. | Class libraries that have been upgraded from earlier versions of ASP.NET and that use membership types that have been moved might fail to compile when used in an ASP.NET 4 project. If so, add a reference in the class library project to System.Web.ApplicationServices.dll. | @@ -214,7 +214,7 @@ Assemblies: PresentationFramework (in PresentationFramework.dll) | ------- | ------------------------ | ------------------- | | **Exception handling** | To enable errors to be detected earlier, WPF throws a <xref:System.Reflection.TargetInvocationException> and sets the <xref:System.Exception.InnerException> property to critical exceptions, such as <xref:System.NullReferenceException>, <xref:System.OutOfMemoryException>, <xref:System.StackOverflowException>, and <xref:System.Security.SecurityException>, instead of catching the original exception. | None. | | **Linked resources** | To make linking easier, resource files (such as images) that are located in a location other than the project's folder structure use the resource file's full path instead of just its file name as the resource ID when the application is built. The application will be able to locate the files at run time. | None. | -| **Partial-trust applications** | For security considerations, Windows-based applications that run in partial trust and contain a <xref:System.Windows.Controls.WebBrowser> control or a <xref:System.Windows.Controls.Frame> control that contains HTML will throw a <xref:System.Security.SecurityException> when the control is created.<br><br>Browser applications will throw an exception and display a message if all of the following conditions are met:<br><br>\* The application is running in Firefox.<br>\* The application is running in partial trust in the Internet zone from non-trusted sites.<br>\* The application contains a <xref:System.Windows.Controls.WebBrowser> control or a <xref:System.Windows.Controls.Frame> control that contains HTML.<br><br>Applications that run from trusted sites or from the intranet zone will not be affected. | In your browser applications, you can ease this change by doing one of the following:<br><br>\* Run the browser application in full trust.<br>\* Have customers add the application's site to the trusted sites zone.<br>\* Have customers run the application in Internet Explorer. | +| **Partial-trust applications** | For security considerations, Windows-based applications that run in partial trust and contain a <xref:System.Windows.Controls.WebBrowser> control or a <xref:System.Windows.Controls.Frame> control that contains HTML will throw a <xref:System.Security.SecurityException> when the control is created.<br><br>Browser applications will throw an exception and display a message if all of the following conditions are met:<br><br>\* The application is running in Firefox.<br>\* The application is running in partial trust in the Internet zone from non-trusted sites.<br>\* The application contains a <xref:System.Windows.Controls.WebBrowser> control or a <xref:System.Windows.Controls.Frame> control that contains HTML.<br><br>Applications that run from trusted sites or from the intranet zone will not be affected. | In your browser applications, you can ease this change by doing one of the following:<br><br>\* Run the browser application in full trust.<br>\* Have customers add the application's site to the trusted sites zone. | | **Resource dictionaries** | To improve theme-level resource dictionaries and prevent them from changing, freezable resources that are defined in a resource dictionary and merged into a theme-level dictionary are now always marked as frozen and are immutable. This is the expected behavior for freezable resources. | Applications that modify a resource that is defined in a theme-level merged dictionary should clone the resource and modify the cloned copy. Alternatively, the resource can be marked `x:Shared="false"` so that the <xref:System.Windows.ResourceDictionary> creates a new copy every time the resource is queried. | | **Windows 7** | To make WPF applications work better on Windows 7, the following improvements were made to correct the behavior of a window:<br><br>\* Dock and gesture states now work as expected based on user interactions.<br>\* The taskbar commands **Cascade windows, Show windows stacked**, and **Show windows side-by-side** now have the correct behavior and update the appropriate properties.<br>\* The `Top`, `Left`, `Width`, and `Height` properties for a maximized or minimized window now contain the correct restore location of the window instead of other values, depending on the monitor. | None. | | **Windows style and transparency** | An <xref:System.InvalidOperationException> is thrown if you try to set <xref:System.Windows.Window.WindowStyle> to a value other than <xref:System.Windows.WindowStyle> when <xref:System.Windows.Window.AllowsTransparency> is `true` and <xref:System.Windows.WindowState> is <xref:System.Windows.WindowState>. | If you must change the <xref:System.Windows.Window.WindowStyle> when <xref:System.Windows.Window.AllowsTransparency> is `true`, you can call the Win32 `SetWindowLongPtr` function. | diff --git a/docs/framework/migration-guide/reference-assemblies.md b/docs/framework/migration-guide/reference-assemblies.md new file mode 100644 index 0000000000000..64689ec37d7a0 --- /dev/null +++ b/docs/framework/migration-guide/reference-assemblies.md @@ -0,0 +1,56 @@ +--- +title: "Build apps against Microsoft.NETFramework.ReferenceAssemblies" +description: "Learn how to reference the .NET Framework Reference Assemblies in your project, when you can't install a matching developer pack." +ms.date: 01/19/2023 +helpviewer_keywords: + - ".NET Framework, targeting" +--- +# Build apps against Microsoft.NETFramework.ReferenceAssemblies + +When you target a particular version of .NET Framework, by default your application is built by using the reference assemblies that are included with that version's developer pack. In scenarios where the matching developer pack cannot be installed on the computer, you can alternatively build against reference assemblies distributed via a NuGet package. + +## Update project files + +Each project that should build against the reference assemblies NuGet package needs to include a reference to _Microsoft.NETFramework.ReferenceAssemblies_. + +Projects using [_packages.config_](/nuget/reference/packages-config) should include the following in _packages.config_. + +```xml +<packages> + <package id="Microsoft.NETFramework.ReferenceAssemblies" version="1.0.3" developmentDependency="true" /> +</packages> +``` + +Projects using [`<PackageReference>`](/nuget/consume-packages/package-references-in-project-files) should include the following in the project file. + +```xml +<ItemGroup> + <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" /> +</ItemGroup> +``` + +SDK-style projects include this reference by default. For typical .NET Framework projects that were created with Visual Studio, the reference can be added with the NuGet Package Manager UI in Visual Studio. The package contains reference assemblies for many versions of .NET Framework. The version to be actually used is determined by the `TargetFrameworkVersion` or `TargetFramework` (`TargetFrameworks`) property, as already defined in the project file. + +## Restore the project + +Projects that contain a package reference must be restored before they can be built. + +After adding the **Microsoft.NETFramework.ReferenceAssemblies** NuGet package to your project, you must explicitly run the restore action in one of the following ways: + +- If your project is a non SDK-style project and uses the _packages.config_ file to reference NuGet packages: + + 01. Install the [NuGet CLI tool](/nuget/install-nuget-client-tools#nugetexe-cli), making sure _nuget.exe_ is in the PATH variable. + 01. Open a command prompt. + 01. Navigate to the directory that contains your project file. + 01. Run _nuget.exe restore_. + +- If your project is a non SDK-style project and uses `<PackageReference>` settings in the project file to reference NuGet packages: + + 01. Open **Developer Command Prompt for VS 2022**. The name of this app may be different based on which version of Visual Studio you've installed. + 01. Navigate to the directory that contains your project file. + 01. Run _msbuild /t:restore_. + +- If your project is an SDK-style project, you don't need to do anything. The NuGet restore action is automatically run when the project is built. + +> [!IMPORTANT] +> Using reference assemblies makes it possible to build projects that target unsupported versions of .NET Framework from the command line. However, you still can't load these projects in newer versions of Visual Studio. To continue building these apps in Visual Studio, the only workaround is to use [an older version of Visual Studio](https://visualstudio.microsoft.com/vs/older-downloads/). diff --git a/docs/framework/migration-guide/snippets/csharp/FrameworkVersions.csproj b/docs/framework/migration-guide/snippets/csharp/FrameworkVersions.csproj index 536221d393066..f2217a78a7de8 100644 --- a/docs/framework/migration-guide/snippets/csharp/FrameworkVersions.csproj +++ b/docs/framework/migration-guide/snippets/csharp/FrameworkVersions.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>net5.0</TargetFramework> + <TargetFramework>net7.0-windows</TargetFramework> </PropertyGroup> <ItemGroup> diff --git a/docs/framework/migration-guide/snippets/csharp/versions-installed.cs b/docs/framework/migration-guide/snippets/csharp/versions-installed.cs index f6e02c6650fe8..9439b53d070f1 100644 --- a/docs/framework/migration-guide/snippets/csharp/versions-installed.cs +++ b/docs/framework/migration-guide/snippets/csharp/versions-installed.cs @@ -6,7 +6,7 @@ public static class VersionTest public static void Main() { GetVersionFromRegistry(); - Get45PlusFromRegistry(); + //Get45PlusFromRegistry(); } private static void GetVersionFromRegistry() @@ -73,13 +73,13 @@ private static void GetVersionFromRegistry() if (string.IsNullOrEmpty(install)) { // No install info; it must be later. - Console.WriteLine($"{versionKeyName} {name}"); + Console.WriteLine($" {versionKeyName} {name}"); } else if (install == "1") { if (!string.IsNullOrEmpty(sp)) { - Console.WriteLine($"{subKeyName} {name} SP{sp}"); + Console.WriteLine($" {subKeyName} {name} SP{sp}"); } else { @@ -113,8 +113,10 @@ private static void Get45PlusFromRegistry() // Checking the version using >= enables forward compatibility. string CheckFor45PlusVersion(int releaseKey) { + if (releaseKey >= 533320) + return "4.8.1 or later"; if (releaseKey >= 528040) - return "4.8 or later"; + return "4.8"; if (releaseKey >= 461808) return "4.7.2"; if (releaseKey >= 461308) diff --git a/docs/framework/migration-guide/snippets/visual-basic/FrameworkVersions.vbproj b/docs/framework/migration-guide/snippets/visual-basic/FrameworkVersions.vbproj index 806f57ea0451b..07a9b28389fef 100644 --- a/docs/framework/migration-guide/snippets/visual-basic/FrameworkVersions.vbproj +++ b/docs/framework/migration-guide/snippets/visual-basic/FrameworkVersions.vbproj @@ -3,7 +3,7 @@ <PropertyGroup> <OutputType>Exe</OutputType> <RootNamespace>FrameworkVersions</RootNamespace> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0-windows</TargetFramework> </PropertyGroup> <ItemGroup> diff --git a/docs/framework/migration-guide/snippets/visual-basic/versions-installed.vb b/docs/framework/migration-guide/snippets/visual-basic/versions-installed.vb index 5d0bc78fb198f..f2a882f6db09e 100644 --- a/docs/framework/migration-guide/snippets/visual-basic/versions-installed.vb +++ b/docs/framework/migration-guide/snippets/visual-basic/versions-installed.vb @@ -51,11 +51,11 @@ Module Program install = subKey.GetValue("Install", "").ToString() If String.IsNullOrEmpty(install) Then ' No install info; it must be later. - Console.WriteLine($"{versionKeyName} {name}") + Console.WriteLine($" {versionKeyName} {name}") ElseIf install = "1" Then If Not String.IsNullOrEmpty(sp) Then - Console.WriteLine($"{subKeyName} {name} SP{sp}") + Console.WriteLine($" {subKeyName} {name} SP{sp}") Else Console.WriteLine($" {subKeyName} {name}") End If @@ -83,8 +83,10 @@ Module Program ' Checking the version using >= enables forward compatibility. Private Function CheckFor45PlusVersion(releaseKey As Integer) As String - If releaseKey >= 528040 Then - Return "4.8 or later" + If releaseKey >= 533320 Then + Return "4.8.1 or later" + ElseIf releaseKey >= 528040 Then + Return "4.8" ElseIf releaseKey >= 461808 Then Return "4.7.2" ElseIf releaseKey >= 461308 Then diff --git a/docs/framework/migration-guide/versions-and-dependencies.md b/docs/framework/migration-guide/versions-and-dependencies.md index b2b62b14ae393..963aaf0aeac41 100644 --- a/docs/framework/migration-guide/versions-and-dependencies.md +++ b/docs/framework/migration-guide/versions-and-dependencies.md @@ -59,7 +59,7 @@ Jump to: | | Versions | |-|-| |**CLR**|4| -|**Windows**|➕ 11<br/>➕ 10 November 2021 Update<br/>➕ 10 May 2021 Update<br/>➕ 10 October 2020 Update<br/>| +|**Windows**|✔️ September 2022 Release (Version 22621)<br/> ➕ 11 October 2021 Release (Version 22000)<br/>➕ 10 November 2021 Update<br/>➕ 10 May 2021 Update<br/>➕ 10 October 2020 Update<br/>| |**Windows Server**|➕ Windows Server 2022<br/>| To determine the installed .NET version, use the following `Release` DWORD: @@ -77,7 +77,7 @@ For more information, see [instructions](how-to-determine-which-versions-are-ins | | Versions | |-|-| |**CLR**|4| -|**Windows**|✔️ 11<br/>✔️ 10 November 2021 Update<br/>✔️ 10 May 2021 Update<br/>✔️ 10 October 2020 Update<br/>✔️ 10 May 2020 Update<br/>✔️ 10 November 2019 Update<br/>✔️ 10 May 2019 Update<br/>➕ 10 October 2018 Update (Version 1809)<br/>➕ 10 April 2018 Update (Version 1803)<br/>➕ 10 Fall Creators Update (Version 1709)<br/>➕ 10 Creators Update (Version 1703)<br/>➕ 10 Anniversary Update (Version 1607)<br/>➕ 8.1<br/>➕7| +|**Windows**|✔️ 11 October 2021 Release (Version 22000)<br/>✔️ 10 November 2021 Update<br/>✔️ 10 May 2021 Update<br/>✔️ 10 October 2020 Update<br/>✔️ 10 May 2020 Update<br/>✔️ 10 November 2019 Update<br/>✔️ 10 May 2019 Update<br/>➕ 10 October 2018 Update (Version 1809)<br/>➕ 10 April 2018 Update (Version 1803)<br/>➕ 10 Fall Creators Update (Version 1709)<br/>➕ 10 Creators Update (Version 1703)<br/>➕ 10 Anniversary Update (Version 1607)<br/>➕ 8.1<br/>➕7| |**Windows Server**|✔️ Windows Server 2022<br/>➕ Windows Server 2019<br/>➕ Windows Server, version 1809<br/>➕ Windows Server, version 1803<br/>➕ 2016<br/>➕ 2012 R2<br/>➕ 2012<br/>➕ 2008 R2 SP1| To determine the installed .NET version, use the following `Release` DWORD: diff --git a/docs/framework/network-programming/configuring-internet-applications.md b/docs/framework/network-programming/configuring-internet-applications.md index 7effbb7c7a6e0..e39da3335b2b1 100644 --- a/docs/framework/network-programming/configuring-internet-applications.md +++ b/docs/framework/network-programming/configuring-internet-applications.md @@ -29,7 +29,7 @@ The [\<system.Net> Element (Network Settings)](../configure-apps/file-schema/net The [\<defaultProxy> Element (Network Settings)](../configure-apps/file-schema/network/defaultproxy-element-network-settings.md) element defines the proxy server returned by the `GlobalProxySelection` class. Any <xref:System.Net.HttpWebRequest> that does not have its own <xref:System.Net.HttpWebRequest.Proxy%2A> property set to a specific value uses the default proxy. In addition to setting the proxy address, you can create a list of server addresses that will not use the proxy, and you can indicate that the proxy should not be used for local addresses. - It is important to note that the Microsoft Internet Explorer settings are combined with the configuration settings, with the latter taking precedence. + It is important to note that system's Internet settings are combined with the configuration settings, with the latter taking precedence. The following example sets the default proxy server address to `http://proxyserver`, indicates that the proxy should not be used for local addresses, and specifies that all requests to servers located in the contoso.com domain should bypass the proxy. diff --git a/docs/framework/performance/writing-large-responsive-apps.md b/docs/framework/performance/writing-large-responsive-apps.md index 529bfff872c00..4b16312a21aed 100644 --- a/docs/framework/performance/writing-large-responsive-apps.md +++ b/docs/framework/performance/writing-large-responsive-apps.md @@ -368,7 +368,7 @@ public Symbol FindMatchingSymbol(string name) ### Async method caching -The next example shows a common problem when you try to use cached results in an [async](../../csharp/programming-guide/concepts/async/index.md) method. +The next example shows a common problem when you try to use cached results in an [async](../../csharp/asynchronous-programming/index.md) method. **Example 6: caching in async methods** diff --git a/docs/framework/reflection-and-codedom/dynamic-language-runtime-overview.md b/docs/framework/reflection-and-codedom/dynamic-language-runtime-overview.md index 7a43b58adb776..6674ff246d446 100644 --- a/docs/framework/reflection-and-codedom/dynamic-language-runtime-overview.md +++ b/docs/framework/reflection-and-codedom/dynamic-language-runtime-overview.md @@ -81,7 +81,7 @@ DLR architecture The DLR adds a set of services to the CLR for better supporting dynamic languages. These services include the following: -- Expression trees. The DLR uses expression trees to represent language semantics. For this purpose, the DLR has extended LINQ expression trees to include control flow, assignment, and other language-modeling nodes. For more information, see [Expression Trees (C#)](../../csharp/programming-guide/concepts/expression-trees/index.md) or [Expression Trees (Visual Basic)](../../visual-basic/programming-guide/concepts/expression-trees/index.md). +- Expression trees. The DLR uses expression trees to represent language semantics. For this purpose, the DLR has extended LINQ expression trees to include control flow, assignment, and other language-modeling nodes. For more information, see [Expression Trees (C#)](../../csharp/advanced-topics/expression-trees/index.md) or [Expression Trees (Visual Basic)](../../visual-basic/programming-guide/concepts/expression-trees/index.md). - Call site caching. A *dynamic call site* is a place in the code where you perform an operation like `a + b` or `a.b()` on dynamic objects. The DLR caches the characteristics of `a` and `b` (usually the types of these objects) and information about the operation. If such an operation has been performed previously, the DLR retrieves all the necessary information from the cache for fast dispatch. @@ -98,6 +98,6 @@ The DLR uses binders in call sites to communicate not only with the .NET Framewo - <xref:System.Dynamic.ExpandoObject> - <xref:System.Dynamic.DynamicObject> - [Common Language Runtime](../../standard/clr.md) -- [Expression Trees (C#)](../../csharp/programming-guide/concepts/expression-trees/index.md) +- [Expression Trees (C#)](../../csharp/advanced-topics/expression-trees/index.md) - [Expression Trees (Visual Basic)](../../visual-basic/programming-guide/concepts/expression-trees/index.md) -- [Walkthrough: Creating and Using Dynamic Objects](../../csharp/programming-guide/types/walkthrough-creating-and-using-dynamic-objects.md) +- [Walkthrough: Creating and Using Dynamic Objects](../../csharp/advanced-topics/interop/walkthrough-creating-and-using-dynamic-objects.md) diff --git a/docs/framework/toc.yml b/docs/framework/toc.yml index 5188c23bd4ab6..3545af3b2c400 100644 --- a/docs/framework/toc.yml +++ b/docs/framework/toc.yml @@ -334,6 +334,8 @@ items: href: migration-guide/migrating-from-the-net-framework-1-1.md - name: .NET Framework 4 migration issues href: migration-guide/net-framework-4-migration-issues.md + - name: Build apps against reference assemblies + href: migration-guide/reference-assemblies.md - name: Development guide href: development-guide.md items: diff --git a/docs/framework/tools/aximp-exe-windows-forms-activex-control-importer.md b/docs/framework/tools/aximp-exe-windows-forms-activex-control-importer.md index b0e300c26ff3e..276a8c6e9e9b5 100644 --- a/docs/framework/tools/aximp-exe-windows-forms-activex-control-importer.md +++ b/docs/framework/tools/aximp-exe-windows-forms-activex-control-importer.md @@ -51,7 +51,7 @@ aximp [options]{file.dll | file.ocx} Aximp.exe converts an entire ActiveX Control type library at one time and produces a set of assemblies that contain the common language runtime metadata and control implementation for the types defined in the original type library. The generated files are named according to the following pattern: - common language runtime proxy for COM types: *progid*.dll + Common language runtime proxy for COM types: *progid*.dll Windows Forms proxy for ActiveX controls (where Ax signifies ActiveX): Ax*progid*.dll @@ -62,9 +62,7 @@ aximp [options]{file.dll | file.ocx} Using Aximp.exe to generate a .NET assembly for the ActiveX WebBrowser control (shdocvw.dll) is not supported. - When you run Aximp.exe over shdocvw.dll, it will always create another file named shdocvw.dll in the directory from which the tool is run. If this generated file is placed in the Documents and Settings directory, it causes problems for Microsoft Internet Explorer and Windows Explorer. When the computer is rebooted, Windows looks in the Documents and Settings directory before the system32 directory to find a copy of shdocvw.dll. It will use the copy it finds in Documents and Settings and attempt to load the managed wrappers. Internet Explorer and Windows Explorer will not function properly because they rely on the rendering engine in the version of shdocvw.dll located in the system32 directory. If this problem occurs, delete the copy of shdocvw.dll in the Documents and Settings directory and reboot the computer. - - Using Aximp.exe with shdocvw.dll to create a .NET assembly for use in application development can also cause problems. In this case, your application will load both the system version of shdocvw.dll and the generated version, and may give the system version priority. In this case, when you attempt to load a Web page inside the WebBrowser ActiveX control, users may be prompted with an Open/Save dialog box. When the user clicks **Open**, the Web page will be opened in Internet Explorer. This occurs only with computers that are running Internet Explorer version 6 or earlier. To prevent this problem, use the managed <xref:System.Windows.Forms.WebBrowser> control or use Visual Studio to generate the managed shdocvw.dll as described in [How to: Add References to Type Libraries](../interop/how-to-add-references-to-type-libraries.md). + When you run Aximp.exe over shdocvw.dll, it will always create another file named shdocvw.dll in the directory from which the tool is run. If you place this generated file in the Documents directory, it can cause problems for Windows Explorer. When the computer is rebooted, Windows looks in the Documents directory before the system32 directory to find a copy of shdocvw.dll. It will use the copy it finds in Documents and attempt to load the managed wrappers. Windows Explorer won't function properly because it relies on the rendering engine in the version of shdocvw.dll located in the system32 directory. If this problem occurs, delete the copy of shdocvw.dll in the Documents directory and reboot the computer. ## Example diff --git a/docs/framework/tools/fuslogvw-exe-assembly-binding-log-viewer.md b/docs/framework/tools/fuslogvw-exe-assembly-binding-log-viewer.md index 25abb4fbe6790..8829aebb873aa 100644 --- a/docs/framework/tools/fuslogvw-exe-assembly-binding-log-viewer.md +++ b/docs/framework/tools/fuslogvw-exe-assembly-binding-log-viewer.md @@ -226,7 +226,7 @@ You can use the **Log Settings** dialog to perform the following actions. 2. Enter the path into the **Custom log path** text box. > [!NOTE] -> The [Assembly Binding Log Viewer (Fuslogvw.exe)](fuslogvw-exe-assembly-binding-log-viewer.md) uses the Internet Explorer (IE) cache to store its binding log. Due to occasional corruption in the IE cache, the [Assembly Binding Log Viewer (Fuslogvw.exe)](fuslogvw-exe-assembly-binding-log-viewer.md) can sometimes stop showing new binding logs in the viewing window. As a result of this corruption, the .NET binding infrastructure (fusion) cannot write to or read from the binding log. (This issue is not encountered if you use a custom log path.) To fix the corruption and allow fusion to show binding logs again, clear the IE cache by deleting temporary internet files from within the IE Internet Options dialog. +> The [Assembly Binding Log Viewer (Fuslogvw.exe)](fuslogvw-exe-assembly-binding-log-viewer.md) uses the internet file cache to store its binding log. Due to occasional corruption in the cache, the [Assembly Binding Log Viewer (Fuslogvw.exe)](fuslogvw-exe-assembly-binding-log-viewer.md) can sometimes stop showing new binding logs in the viewing window. As a result of this corruption, the .NET binding infrastructure (fusion) cannot write to or read from the binding log. (This issue is not encountered if you use a custom log path.) To fix the corruption and allow fusion to show binding logs again, clear the internet file cache by deleting temporary internet files from the **Browsing history** section under Internet properties. > > If your unmanaged application hosts the common language runtime by implementing the `IHostAssemblyManager` and `IHostAssemblyStore` interfaces, log entries can't be stored in the wininet cache. To view log entries for custom hosts that implement these interfaces, you must specify an alternate log path. diff --git a/docs/framework/tools/mage-exe-manifest-generation-and-editing-tool.md b/docs/framework/tools/mage-exe-manifest-generation-and-editing-tool.md index 4a77cddc988d4..47eaac6fa416e 100644 --- a/docs/framework/tools/mage-exe-manifest-generation-and-editing-tool.md +++ b/docs/framework/tools/mage-exe-manifest-generation-and-editing-tool.md @@ -65,7 +65,7 @@ The following table shows the options supported by the `-New` and `-Update` comm |**-tr, -TrustLevel** `level`|Based on the zone in which the application URL resides.|Application manifests.|The level of trust to grant the application on client computers. Values include "Internet", "Intranet", and "FullTrust".| |**-um, -UseManifestForTrust** `willUseForTrust`|False|Application manifests.|Specifies whether the digital signature of the application manifest will be used for making trust decisions when the application runs on the client. Specifying "true" or "t" indicates that the application manifest will be used for trust decisions. Specifying "false" or "f" indicates that the signature of the deployment manifest will be used.| |**-v, -Version** `versionNumber`|1.0.0.0|Application manifests.<br /><br /> Deployment manifests.|The version of the deployment. The argument must be a valid version string of the format "*N.N.N.N*", where "*N*" is an unsigned 32-bit integer.| -|**-wpf, -WPFBrowserApp** `isWPFApp`|false|Application manifests.<br /><br /> Deployment manifests.|Use this flag only if the application is a Windows Presentation Foundation (WPF) application that will be hosted inside of Internet Explorer, and is not a stand-alone executable. Valid values are "true" or "t", and "false" or "f".<br /><br /> For application manifests, inserts the `hostInBrowser` attribute under the `entryPoint` element of the application manifest.<br /><br /> For deployment manifests, sets the `install` attribute on the `deployment` element to false, and saves the deployment manifest with a .xbap extension. Specifying this argument along with the **-Install** argument produces an error, because a browser-hosted application cannot be an installed, offline application.| +|**-wpf, -WPFBrowserApp** `isWPFApp`|false|Application manifests.<br /><br /> Deployment manifests.|Use this flag only if the application is a Windows Presentation Foundation (WPF) application that will be hosted inside a browser, and is not a stand-alone executable. Valid values are "true" or "t", and "false" or "f".<br /><br /> For application manifests, inserts the `hostInBrowser` attribute under the `entryPoint` element of the application manifest.<br /><br /> For deployment manifests, sets the `install` attribute on the `deployment` element to false, and saves the deployment manifest with a .xbap extension. Specifying this argument along with the **-Install** argument produces an error, because a browser-hosted application cannot be an installed, offline application.| ## Sign command options @@ -169,7 +169,7 @@ The following example continues the previous example by specifying the deploymen mage -New Application -FromDirectory . -Name "Hello, World! Application" -Version 1.0.0.0 -Processor "x86" -ProviderUrl http://internalserver/HelloWorld/ ``` -The following example demonstrates how to create a pair of manifests for deploying a WPF application that will be hosted in Internet Explorer. +The following example demonstrates how to create a pair of manifests for deploying a WPF application that will be hosted in a browser. ```console mage -New Application -FromDirectory . -Version 1.0.0.0 -WPFBrowserApp true diff --git a/docs/framework/tools/signtool-exe.md b/docs/framework/tools/signtool-exe.md index 44578f28cddf0..bec1936dbf8fa 100644 --- a/docs/framework/tools/signtool-exe.md +++ b/docs/framework/tools/signtool-exe.md @@ -14,7 +14,7 @@ Sign Tool is a command-line tool that digitally signs files, verifies signatures This tool is automatically installed with Visual Studio. To run the tool, use [Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell](/visualstudio/ide/reference/command-prompt-powershell). > [!Note] -> The Windows 10 SDK, Windows 10 HLK, Windows 10 WDK and Windows 10 ADK **builds 20236 and later** require specifying the digest algorithm. The SignTool `sign` command requires the `/fd` **file digest algorithm** and the `/td` **timestamp digest algorithm** option to be specified during signing and timestamping, respectively. A warning (error code 0, initially) will be thrown if `/fd` is not specified during signing and if `/td` is not specified during timestamping. In later versions of SignTool, the warning will become an error. SHA256 is recommended and considered to be more secure than SHA1 by the industry. +> The Windows 10 SDK, Windows 10 HLK, Windows 10 WDK and Windows 10 ADK **builds 20236 and later** require specifying the digest algorithm. The SignTool `sign` command requires the `/fd` **file digest algorithm** and the `/td` **timestamp digest algorithm** option to be specified during signing and timestamping, respectively. An error (error code 1) will be thrown if `/fd` is not specified during signing and if `/td` is not specified during timestamping. At the command prompt, type the following: @@ -78,8 +78,8 @@ signtool [command] [options] [file_name | ...] |`/d` *Desc*|Specifies a description of the signed content.| |`/du` *URL*|Specifies a Uniform Resource Locator (URL) for the expanded description of the signed content.| |`/f` *SignCertFile*|Specifies the signing certificate in a file. If the file is in Personal Information Exchange (PFX) format and protected by a password, use the `/p` option to specify the password. If the file does not contain private keys, use the `/csp` and `/kc` options to specify the CSP and private key container name.| -|`/fd`|Specifies the file digest algorithm to use for creating file signatures. </br> **Note:** A warning is generated if the`/fd` switch is not provided while signing. The default algorithm is SHA1 but SHA256 is recommended.| -|`/fd` *certHash*|Specifying the string *certHash* will default to the algorithm used on the signing certificate. </br> **Note:** Only available in Windows 10 kit builds 20236 and later.| +|`/fd`|Specifies the file digest algorithm to use for creating file signatures. </br> **Note:** An error is generated if the `/fd` switch is not provided while signing.| +|`/fd` *certHash*|Specifying the string *certHash* will default to the algorithm used on the signing certificate. </br> **Note:** An error is generated if the `/fd` switch is not provided while signing.| |`/i` *IssuerName*|Specifies the name of the issuer of the signing certificate. This value can be a substring of the entire issuer name.| |`/kc` *PrivKeyContainerName*|Specifies the private key container name.| |`/n` *SubjectName*|Specifies the name of the subject of the signing certificate. This value can be a substring of the entire subject name.| @@ -94,7 +94,7 @@ signtool [command] [options] [file_name | ...] |`/sha1` *Hash*|Specifies the SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches.| |`/sm`|Specifies that a machine store, instead of a user store, is used.| |`/t` *URL*|Specifies the URL of the time stamp server. If this option (or `/tr`) is not present, the signed file will not be time stamped. A warning is generated if time stamping fails. This option cannot be used with the `/tr` option.| -|`/td` *alg*|Used with the `/tr` option to request a digest algorithm used by the RFC 3161 time stamp server. </br> **Note:** A warning is generated if the `/td` switch is not provided while timestamping. The default algorithm is SHA1, but SHA256 is recommended. <br/> The `/td` switch must be declared after the `/tr` switch, not before. If the `/td` switch is declared before the `/tr` switch, the timestamp that is returned is from the SHA1 algorithm instead of the intended SHA256 algorithm. | +|`/td` *alg*|Used with the `/tr` option to request a digest algorithm used by the RFC 3161 time stamp server. </br> **Note:** An error is generated if `/td` is not provided while timestamping.| |`/tr` *URL*|Specifies the URL of the RFC 3161 time stamp server. If this option (or `/t`) is not present, the signed file will not be time stamped. A warning is generated if time stamping fails. This option cannot be used with the `/t` option.| |`/u` *Usage*|Specifies the enhanced key usage (EKU) that must be present in the signing certificate. The usage value can be specified by OID or string. The default usage is "Code Signing" (1.3.6.1.5.5.7.3.3).| |`/uw`|Specifies usage of "Windows System Component Verification" (1.3.6.1.4.1.311.10.3.6).| @@ -111,7 +111,7 @@ signtool [command] [options] [file_name | ...] |----------------------|-----------------| |`/p7`|Time stamps PKCS #7 files.| |`/t` *URL*|Specifies the URL of the time stamp server. The file being time stamped must have previously been signed. Either the `/t` or the `/tr` option is required.| -|`/td` *alg*|Used with the `/tr` option to request a digest algorithm used by the RFC 3161 time stamp server. </br> **Note:** A warning is generated if the `/td` switch is not provided while timestamping. The default algorithm is SHA1, but SHA256 is recommended. <br/> The `/td` switch must be declared after the `/tr` switch, not before. If the `/td` switch is declared before the `/tr` switch, the timestamp that is returned is from the SHA1 algorithm instead of the intended SHA256 algorithm. | +|`/td` *alg*|Used with the `/tr` option to request a digest algorithm used by the RFC 3161 time stamp server. </br> **Note:** An error is generated if `/td` is not provided while timestamping.| |`/tp` *index*|Time stamps the signature at *index*.| |`/tr` *URL*|Specifies the URL of the RFC 3161 time stamp server. The file being time stamped must have previously been signed. Either the `/tr` or the `/t` option is required.| @@ -186,7 +186,7 @@ signtool sign /f MyCert.pfx /t http://timestamp.digicert.com /fd SHA256 MyFile.e signtool sign /n "My Company Certificate" /fd SHA256 MyFile.exe ``` - The following command signs an ActiveX control and provides information that is displayed by Internet Explorer when the user is prompted to install the control. + The following command signs an ActiveX control and provides information that's displayed in the browser when the user is prompted to install the control. ```console Signtool sign /f MyCert.pfx /d: "MyControl" /du http://www.example.com/MyControl/info.html /fd SHA256 MyControl.exe diff --git a/docs/framework/tools/sqlmetal-exe-code-generation-tool.md b/docs/framework/tools/sqlmetal-exe-code-generation-tool.md index 6f7ac102ca729..7a6fe0ef993dc 100644 --- a/docs/framework/tools/sqlmetal-exe-code-generation-tool.md +++ b/docs/framework/tools/sqlmetal-exe-code-generation-tool.md @@ -21,7 +21,7 @@ The SqlMetal command-line tool generates code and mapping for the [!INCLUDE[vbte - From a .dbml file, generate code and mapping attributes or a mapping file. -This tool is automatically installed with Visual Studio. By default, the file is located at `drive`:\Program Files\Microsoft SDKs\Windows\v`n.nn`\bin. If you do not install Visual Studio, you can also get the SQLMetal file by downloading the [Windows SDK](https://go.microsoft.com/fwlink/?LinkId=142225). +This tool is automatically installed with Visual Studio 2019 and earlier versions. By default, the file is located at *%ProgramFiles%\Microsoft SDKs\Windows\[version]\bin*. If you don't install Visual Studio, you can also get the SQLMetal file by downloading the [Windows SDK](https://www.microsoft.com/download/details.aspx?id=8279). > [!NOTE] > Developers who use Visual Studio can also use the Object Relational Designer to generate entity classes. The command-line approach scales well for large databases. Because SqlMetal is a command-line tool, you can use it in a build process. diff --git a/docs/framework/unmanaged-api/debugging/icordebug-setunmanagedhandler-method.md b/docs/framework/unmanaged-api/debugging/icordebug-setunmanagedhandler-method.md index d946414938dd2..36b18f07b5897 100644 --- a/docs/framework/unmanaged-api/debugging/icordebug-setunmanagedhandler-method.md +++ b/docs/framework/unmanaged-api/debugging/icordebug-setunmanagedhandler-method.md @@ -9,7 +9,7 @@ api_location: api_type: - "COM" f1_keywords: - - "ICorDebug::SetUnmanagerHandler" + - "ICorDebug::SetUnmanagedHandler" helpviewer_keywords: - "SetUnmanagedHandler method [.NET Framework debugging]" - "ICorDebug::SetUnmanagedHandler method [.NET Framework debugging]" diff --git a/docs/framework/wcf/accessing-services-using-a-wcf-client.md b/docs/framework/wcf/accessing-services-using-a-wcf-client.md index d80869491f4e0..3dfaf5b1b4833 100644 --- a/docs/framework/wcf/accessing-services-using-a-wcf-client.md +++ b/docs/framework/wcf/accessing-services-using-a-wcf-client.md @@ -152,7 +152,7 @@ End Class ```csharp // Create a client object with the given client endpoint configuration. -CalculatorClient calcClient = new CalculatorClient("CalculatorEndpoint")); +CalculatorClient calcClient = new CalculatorClient("CalculatorEndpoint"); // Call the Add service operation. double value1 = 100.00D; double value2 = 15.99D; diff --git a/docs/framework/wcf/diagnostics/exceptions-reference/identitymodel-exceptions.md b/docs/framework/wcf/diagnostics/exceptions-reference/identitymodel-exceptions.md index 48adcd7e22da5..09173a1ca3882 100644 --- a/docs/framework/wcf/diagnostics/exceptions-reference/identitymodel-exceptions.md +++ b/docs/framework/wcf/diagnostics/exceptions-reference/identitymodel-exceptions.md @@ -239,7 +239,7 @@ This topic lists all exceptions generated by IdentityModel. |TraceCodeSecurityPendingServerSessionRemoved|A pending security session was made active by the server.| |TraceCodeImportSecurityChannelBindingExit|Finished Security ImportChannelBinding.| |X509CertStoreLocationNotValid|The StoreLocation must be either LocalMachine or CurrentUser.| -|SettingdMayBeModifiedOnlyWhenTheWriterIsInStartState|The writer settings may be modified only when the writer is in the Start state.| +|SettingsMayBeModifiedOnlyWhenTheWriterIsInStartState|The writer settings may be modified only when the writer is in the Start state.| |ArgumentInvalidCertificate|The certificate is invalid.| |DigestVerificationFailedForReference|Digest verification failed for the specified Reference.| |SAMLAuthorityBindingRequiresBinding|The 'Binding' attribute specified on the SamlAuthorityBinding cannot be null or of length 0.| diff --git a/docs/framework/wcf/feature-details/best-practices-for-queued-communication.md b/docs/framework/wcf/feature-details/best-practices-for-queued-communication.md index 98d4966161802..91a97e2a1a83b 100644 --- a/docs/framework/wcf/feature-details/best-practices-for-queued-communication.md +++ b/docs/framework/wcf/feature-details/best-practices-for-queued-communication.md @@ -63,7 +63,7 @@ This topic provides recommended practices for queued communication in Windows Co When using farms, be aware that MSMQ 3.0 does not support remote transacted reads. MSMQ 4.0 does support remote transacted reads. - For more information, see [Batching Messages in a Transaction](batching-messages-in-a-transaction.md) and [Differences in Queuing Features in Windows Vista, Windows Server 2003, and Windows XP](diff-in-queue-in-vista-server-2003-windows-xp.md). + For more information, see [Batching Messages in a Transaction](batching-messages-in-a-transaction.md). ## Queuing with Unit of Work Semantics @@ -96,7 +96,6 @@ This topic provides recommended practices for queued communication in Windows Co - [Batching Messages in a Transaction](batching-messages-in-a-transaction.md) - [Using Dead-Letter Queues to Handle Message Transfer Failures](using-dead-letter-queues-to-handle-message-transfer-failures.md) - [Poison Message Handling](poison-message-handling.md) -- [Differences in Queuing Features in Windows Vista, Windows Server 2003, and Windows XP](diff-in-queue-in-vista-server-2003-windows-xp.md) - [Securing Messages Using Transport Security](securing-messages-using-transport-security.md) - [Securing Messages Using Message Security](securing-messages-using-message-security.md) - [Troubleshooting Queued Messaging](troubleshooting-queued-messaging.md) diff --git a/docs/framework/wcf/feature-details/channel-factory-and-caching.md b/docs/framework/wcf/feature-details/channel-factory-and-caching.md index 3c432f8cac671..cf3053dfd8f0a 100644 --- a/docs/framework/wcf/feature-details/channel-factory-and-caching.md +++ b/docs/framework/wcf/feature-details/channel-factory-and-caching.md @@ -63,7 +63,7 @@ class Program { static void Main(string[] args) { - ClientBase.CacheSettings = CacheSettings.Default; + ClientBase<ITest>.CacheSettings = CacheSettings.Default; int i = 1; foreach (string msg in messages) { @@ -91,7 +91,7 @@ class Program { static void Main(string[] args) { - ClientBase.CacheSettings = CacheSettings.AlwaysOff; + ClientBase<ITest>.CacheSettings = CacheSettings.AlwaysOff; foreach (string msg in messages) { using (TestClient proxy = new TestClient ("MyEndpoint", new EndpointAddress(address))) diff --git a/docs/framework/wcf/feature-details/diff-in-queue-in-vista-server-2003-windows-xp.md b/docs/framework/wcf/feature-details/diff-in-queue-in-vista-server-2003-windows-xp.md deleted file mode 100644 index 712825ed136a8..0000000000000 --- a/docs/framework/wcf/feature-details/diff-in-queue-in-vista-server-2003-windows-xp.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -description: "Learn more about: Differences in Queuing Features in Windows Vista, Windows Server 2003, and Windows XP" -title: "Differences in Queuing Features in Windows Vista, Windows Server 2003, and Windows XP" -ms.date: "03/30/2017" -helpviewer_keywords: - - "queues [WCF], differences in operating systems" -ms.assetid: aa809d93-d0a3-4ae6-a726-d015cca37c04 ---- -# Differences in Queuing Features in Windows Vista, Windows Server 2003, and Windows XP - -This topic summarizes the differences in the Windows Communication Foundation (WCF) queues feature between Windows Vista, Windows Server 2003, and Windows XP. - -## Application-Specific Dead-Letter Queue - - Queued messages can remain in the queue indefinitely if the receiving application does not read them in a timely fashion. This behavior is not advisable if the messages are time-sensitive. Time-sensitive messages have a `TimeToLive` property set in the queued binding. This property indicates how long the messages can be in the queue before they expire. Expired messages are sent to a special queue called the dead-letter queue. A message can also end up in a dead-letter queue for other reasons, such as exceeding a queue quota or experiencing an authentication failure. - - Typically, a single system-wide dead-letter queue exists for all queued applications that share a queue manager. A dead-letter queue for each application enables better isolation between queued applications that share a queue manager by allowing these applications to specify their own application-specific dead-letter queue. An application that shares a dead-letter queue with other applications has to browse the queue to find messages that are applicable to it. With an application-specific dead-letter queue, the application can be assured that all messages in its dead-letter queue are applicable to it. - - Windows Vista provides for application-specific dead-letter queues. Application-specific dead-letter queues are not available in Windows Server 2003 and Windows XP, and applications must use the system-wide dead-letter queue. - -## Poison-Message Handling - - A poison message is a message that has exceeded the maximum number of delivery attempts to the receiving application. This situation can arise when an application that reads a message from a transactional queue cannot process the message immediately because of errors. If the application aborts the transaction in which the queued message was received, it returns the message to the queue. The application then tries to retrieve the message again in a new transaction. If the problem that causes the error is not corrected, the receiving application can get stuck in a loop receiving and aborting the same message until it exceeds the maximum number of delivery attempts, and a poison message results. - - The key differences between Message Queuing (MSMQ) on Windows Vista, Windows Server 2003, and Windows XP that are relevant to poison handling include the following: - -- MSMQ in Windows Vista supports subqueues, while Windows Server 2003 and Windows XP do not support subqueues. Subqueues are used in poison-message handling. The retry queues and the poison queue are subqueues to the application queue that is created based on the poison-message handling settings. The `MaxRetryCycles` dictates how many retry subqueues to create. Therefore, when running on Windows Server 2003 or Windows XP, `MaxRetryCycles` are ignored and `ReceiveErrorHandling.Move` is not allowed. - -- MSMQ in Windows Vista supports negative acknowledgment, while Windows Server 2003 and Windows XP do not. A negative acknowledgment from the receiving queue manager causes the sending queue manager to place the rejected message in the dead-letter queue. As such, `ReceiveErrorHandling.Reject` is not allowed with Windows Server 2003 and Windows XP. - -- MSMQ in Windows Vista supports a message property that keeps count of the number of times message delivery is attempted. This abort count property is not available on Windows Server 2003 and Windows XP. WCF maintains the abort count in memory, so it is possible that this property may not contain an accurate value when the same message is read by more than one WCF service in a Web farm. - -## Remote Transactional Read - - MSMQ on Windows Vista supports remote transactional reads. This allows an application that is reading from a queue to be hosted on a computer that is different from the computer on which the queue is hosted. This ensures the ability to have a farm of services reading from a central queue, which increases the overall throughput of the system. It also ensures that if a failure occurs when reading and processing the message, the transaction rolls back and the message remains in the queue for later processing. - -## See also - -- [Using Dead-Letter Queues to Handle Message Transfer Failures](using-dead-letter-queues-to-handle-message-transfer-failures.md) -- [Poison Message Handling](poison-message-handling.md) diff --git a/docs/framework/wcf/feature-details/diff-service-certificate-validation-ie-and-wcf.md b/docs/framework/wcf/feature-details/diff-service-certificate-validation-ie-and-wcf.md deleted file mode 100644 index 47f66671d9d03..0000000000000 --- a/docs/framework/wcf/feature-details/diff-service-certificate-validation-ie-and-wcf.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -description: "Learn more about: Differences Between Service Certificate Validation Done by Internet Explorer and WCF" -title: "Differences Between Service Certificate Validation Done by Internet Explorer and WCF" -ms.date: "03/30/2017" -helpviewer_keywords: - - "service certificate validation [WCF]" - - "certificates [WCF], service certificate validation" -ms.assetid: 9dffcab2-70a9-40f0-99fd-d3a0b296028f ---- -# Differences Between Service Certificate Validation Done by Internet Explorer and WCF - -Because of difference between the way Internet Explorer and Windows Communication Foundation (WCF) validate service certificates when HTTPS is used, it is possible that Internet Explorer will not be able to access the Help page or Web Services Description Language (WSDL) of a service even though a WCF client is able to successfully send messages to the service endpoints. This is because Internet Explorer checks whether the service certificate has the `ServerAuthentication` object identifiers (OID) in the enhanced usage flags, whereas WCF does not enforce such a constraint. If Internet Explorer is unable to access the service Help page or the WSDL for the service, use the [ServiceModel Metadata Utility Tool (Svcutil.exe)](../servicemodel-metadata-utility-tool-svcutil-exe.md) to access the service metadata. - -## See also - -- [Certificate Validation Differences Between HTTPS, SSL over TCP, and SOAP Security](cert-val-diff-https-ssl-over-tcp-and-soap.md) -- [How to: Retrieve Metadata and Implement a Compliant Service](how-to-retrieve-metadata-and-implement-a-compliant-service.md) diff --git a/docs/framework/wcf/feature-details/how-to-access-a-service-from-a-workflow-application.md b/docs/framework/wcf/feature-details/how-to-access-a-service-from-a-workflow-application.md index 8ae7ed0473ca1..fb802a19a7d7d 100644 --- a/docs/framework/wcf/feature-details/how-to-access-a-service-from-a-workflow-application.md +++ b/docs/framework/wcf/feature-details/how-to-access-a-service-from-a-workflow-application.md @@ -22,9 +22,9 @@ This topic describes how to call a workflow service from a workflow console appl 4. After the project is created, the Workflow1.xaml file is opened in the designer. Click the **Toolbox** tab to open the toolbox if it is not already open and click the pushpin to keep the toolbox window open. -5. Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> to build and launch the service. As before, the ASP.NET Development Server is launched and Internet Explorer displays the WCF Help Page. Notice the URI for this page as you must use it in the next step. +5. Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> to build and launch the service. As before, the ASP.NET Development Server is launched and the browser displays the WCF Help Page. Notice the URI for this page as you must use it in the next step. - ![IE displaying WCF help page and URI](./media/how-to-access-a-service-from-a-workflow-application/ie-wcf-help-page-uri.jpg) + ![Browser displaying WCF help page and URI](./media/how-to-access-a-service-from-a-workflow-application/ie-wcf-help-page-uri.jpg) 6. Right click the **MyWFClient** project in the **Solution Explorer** and select **Add** > **Service Reference**. Click the **Discover** button to search the current solution for any services. Click the triangle next to Service1.xamlx in the Services list. Click the triangle next to Service1 to list the contracts implemented by the Service1 service. Expand the **Service1** node in the **Services** list. The Echo operation is displayed in the **Operations** list as shown in the following illustration. @@ -52,11 +52,11 @@ This topic describes how to call a workflow service from a workflow console appl ![The complete client workflow](./media/how-to-access-a-service-from-a-workflow-application/complete-client-workflow.jpg) -11. Right-click the MyWFService solution and select **Set Startup Projects ...**. Select the **Multiple startup projects** radio button and select **Start** for each project in the **Action** column as shown in the following illustration. +11. Right-click the MyWFService solution and select **Set Startup Projects**. Select the **Multiple startup projects** radio button and select **Start** for each project in the **Action** column as shown in the following illustration. ![Startup projects options](./media/how-to-access-a-service-from-a-workflow-application/startup-project-options.jpg) -12. Press Ctrl + F5 to launch both the service and the client. The ASP.NET Development Server hosts the service, Internet Explorer displays the WCF help page, and the client workflow application is launched in a console window and displays the string returned from the service ("Hello, world"). +12. Press <kbd>Ctrl+F5</kbd> to launch both the service and the client. The ASP.NET Development Server hosts the service, the browser displays the WCF help page, and the client workflow application is launched in a console window and displays the string returned from the service ("Hello, world"). ## See also diff --git a/docs/framework/wcf/feature-details/how-to-create-a-basic-atom-feed.md b/docs/framework/wcf/feature-details/how-to-create-a-basic-atom-feed.md index b68b2ac2b67a7..f48a519111c6e 100644 --- a/docs/framework/wcf/feature-details/how-to-create-a-basic-atom-feed.md +++ b/docs/framework/wcf/feature-details/how-to-create-a-basic-atom-feed.md @@ -60,9 +60,9 @@ Windows Communication Foundation (WCF) allows you to create a service that expos ### To call GetBlog() with an HTTP GET -1. Open Internet Explorer, type the following URL, and press ENTER: `http://localhost:8000/BlogService/GetBlog` +1. In a web browser, browse to the following URL: `http://localhost:8000/BlogService/GetBlog` - The URL contains the base address of the service (`http://localhost:8000/BlogService`), the relative address of the endpoint, and the service operation to call. + The URL contains the base address of the service (`http://localhost:8000/BlogService`), the relative address of the endpoint, and the service operation to call. ### To call GetBlog() from code diff --git a/docs/framework/wcf/feature-details/how-to-create-a-basic-rss-feed.md b/docs/framework/wcf/feature-details/how-to-create-a-basic-rss-feed.md index 27fb8f05b6187..3353291003371 100644 --- a/docs/framework/wcf/feature-details/how-to-create-a-basic-rss-feed.md +++ b/docs/framework/wcf/feature-details/how-to-create-a-basic-rss-feed.md @@ -60,7 +60,7 @@ Windows Communication Foundation (WCF) allows you to create a service that expos ### To call GetBlog() with an HTTP GET -1. Open Internet Explorer, type the following URL, and press ENTER: `http://localhost:8000/BlogService/GetBlog`. The URL contains the base address of the service (`http://localhost:8000/BlogService`), the relative address of the endpoint, and the service operation to call. +1. In a web browser, browse to the following URL: `http://localhost:8000/BlogService/GetBlog`. The URL contains the base address of the service (`http://localhost:8000/BlogService`), the relative address of the endpoint, and the service operation to call. ### To call GetBlog() from code diff --git a/docs/framework/wcf/feature-details/how-to-create-a-workflow-service-with-messaging-activities.md b/docs/framework/wcf/feature-details/how-to-create-a-workflow-service-with-messaging-activities.md index 5311baa4ad280..75721df8ab769 100644 --- a/docs/framework/wcf/feature-details/how-to-create-a-workflow-service-with-messaging-activities.md +++ b/docs/framework/wcf/feature-details/how-to-create-a-workflow-service-with-messaging-activities.md @@ -76,11 +76,11 @@ This topic describes how to create a simple workflow service using messaging act This hosts the service defined in Service1.xamlx in the ASP.NET Development Server. -3. Press Ctrl + F5 to launch the service. The ASP.NET Development Server icon is displayed in the lower right side of the desktop as shown in the following image. +3. Press <kbd>Ctrl+F5</kbd> to launch the service. The ASP.NET Development Server icon is displayed in the lower right side of the desktop as shown in the following image. ![Screenshot that shows the ASP.NET Developer Server icon.](./media/how-to-create-a-workflow-service-with-messaging-activities/asp-net-dev-server-icon.jpg) - In addition, Internet Explorer displays the WCF Service Help Page for the service. + In addition, the browser displays the WCF Service Help Page for the service. ![Screenshot that shows the WCF Service Help Page.](./media/how-to-create-a-workflow-service-with-messaging-activities/wcf-service-help-page.jpg) diff --git a/docs/framework/wcf/feature-details/how-to-expose-a-contract-to-soap-and-web-clients.md b/docs/framework/wcf/feature-details/how-to-expose-a-contract-to-soap-and-web-clients.md index 4c829003cc923..382d8f5fbdac8 100644 --- a/docs/framework/wcf/feature-details/how-to-expose-a-contract-to-soap-and-web-clients.md +++ b/docs/framework/wcf/feature-details/how-to-expose-a-contract-to-soap-and-web-clients.md @@ -48,9 +48,9 @@ By default, Windows Communication Foundation (WCF) makes endpoints available onl [!code-csharp[htSoapWeb#5](../../../../samples/snippets/csharp/VS_Snippets_CFX/htsoapweb/cs/program.cs#5)] [!code-vb[htSoapWeb#5](../../../../samples/snippets/visualbasic/VS_Snippets_CFX/htsoapweb/vb/program.vb#5)] -## To call service operations mapped to GET in Internet Explorer +## To call service operations mapped to GET in a browser -1. Open Internet Explorer and type "`http://localhost:8000/Web/EchoWithGet?s=Hello, world!`" and press ENTER. The URL contains the base address of the service (`http://localhost:8000/`), the relative address of the endpoint (""), the service operation to call ("EchoWithGet"), and a question mark followed by a list of named parameters separated by an ampersand (&). +1. In a web browser, browse to "`http://localhost:8000/Web/EchoWithGet?s=Hello, world!`". The URL contains the base address of the service (`http://localhost:8000/`), the relative address of the endpoint (""), the service operation to call ("EchoWithGet"), and a question mark followed by a list of named parameters separated by an ampersand (&). ## To call service operations on the Web endpoint in code diff --git a/docs/framework/wcf/feature-details/how-to-expose-a-feed-as-both-atom-and-rss.md b/docs/framework/wcf/feature-details/how-to-expose-a-feed-as-both-atom-and-rss.md index 30dd76f741fb6..cd779835b5164 100644 --- a/docs/framework/wcf/feature-details/how-to-expose-a-feed-as-both-atom-and-rss.md +++ b/docs/framework/wcf/feature-details/how-to-expose-a-feed-as-both-atom-and-rss.md @@ -60,9 +60,9 @@ Windows Communication Foundation (WCF) allows you to create a service that expos ### To call GetBlog with an HTTP GET -1. Open Internet Explorer, type the following URL, and press ENTER: `http://localhost:8000/BlogService/GetBlog`. +1. Open a browser, enter the following URL, and press <kbd>Enter</kbd>: `http://localhost:8000/BlogService/GetBlog`. - The URL contains the base address of the service (`http://localhost:8000/BlogService`), the relative address of the endpoint, and the service operation to call. + The URL contains the base address of the service (`http://localhost:8000/BlogService`), the relative address of the endpoint, and the service operation to call. ### To call GetBlog() from code diff --git a/docs/framework/wcf/feature-details/how-to-host-a-wcf-service-in-iis.md b/docs/framework/wcf/feature-details/how-to-host-a-wcf-service-in-iis.md index af7e130ac57a1..ab8c43654f37b 100644 --- a/docs/framework/wcf/feature-details/how-to-host-a-wcf-service-in-iis.md +++ b/docs/framework/wcf/feature-details/how-to-host-a-wcf-service-in-iis.md @@ -62,7 +62,7 @@ This topic outlines the basic steps required to create a Windows Communication F This example explicitly specifies endpoints in the configuration file. If you do not add any endpoints to the service, the runtime adds default endpoints for you. For more information about default endpoints, bindings, and behaviors see [Simplified Configuration](../simplified-configuration.md) and [Simplified Configuration for WCF Services](../samples/simplified-configuration-for-wcf-services.md). -11. To make sure the service is hosted correctly, open an instance of Internet Explorer and browse to the service's URL: `http://localhost/IISHostedCalc/Service.svc` +11. To make sure the service is hosted correctly, open a browser and browse to the service's URL: `http://localhost/IISHostedCalc/Service.svc` ## Example diff --git a/docs/framework/wcf/feature-details/how-to-publish-metadata-for-a-service-using-a-configuration-file.md b/docs/framework/wcf/feature-details/how-to-publish-metadata-for-a-service-using-a-configuration-file.md index 753dac854014f..c71fdaff0279e 100644 --- a/docs/framework/wcf/feature-details/how-to-publish-metadata-for-a-service-using-a-configuration-file.md +++ b/docs/framework/wcf/feature-details/how-to-publish-metadata-for-a-service-using-a-configuration-file.md @@ -154,7 +154,7 @@ namespace Metadata.Samples 9. Build and run the console application. -10. Use Internet Explorer to browse to the base address of the service (`http://localhost:8001/MetadataSample` in this sample) and verify that the metadata publishing is turned on. If not, a message at the top of the resulting page displays: "Metadata publishing for this service is currently disabled." +10. Browse to the base address of the service (`http://localhost:8001/MetadataSample` in this sample) and verify that the metadata publishing is turned on. If not, a message at the top of the resulting page displays: "Metadata publishing for this service is currently disabled." ### To use default endpoints diff --git a/docs/framework/wcf/feature-details/how-to-publish-metadata-for-a-service-using-code.md b/docs/framework/wcf/feature-details/how-to-publish-metadata-for-a-service-using-code.md index 31b217ccd4e40..13ead1c4d9351 100644 --- a/docs/framework/wcf/feature-details/how-to-publish-metadata-for-a-service-using-code.md +++ b/docs/framework/wcf/feature-details/how-to-publish-metadata-for-a-service-using-code.md @@ -74,7 +74,7 @@ This is one of two how-to topics that discuss publishing metadata for a Windows 10. Build and run the console application. -11. Use Internet Explorer to browse to the base address of the service (`http://localhost:8001/MetadataSample` in this sample) and verify that the metadata publishing is turned on. You should see a Web page displayed that says "Simple Service" at the top and immediately below "You have created a service." If not, a message at the top of the resulting page displays: "Metadata publishing for this service is currently disabled." +11. Browse to the base address of the service (`http://localhost:8001/MetadataSample` in this sample) and verify that the metadata publishing is turned on. You should see a Web page displayed that says "Simple Service" at the top and immediately below "You have created a service." If not, a message at the top of the resulting page displays: "Metadata publishing for this service is currently disabled." ## Example diff --git a/docs/framework/wcf/feature-details/how-to-specify-channel-security-credentials.md b/docs/framework/wcf/feature-details/how-to-specify-channel-security-credentials.md index 339dbbf874ac7..3c583714bda56 100644 --- a/docs/framework/wcf/feature-details/how-to-specify-channel-security-credentials.md +++ b/docs/framework/wcf/feature-details/how-to-specify-channel-security-credentials.md @@ -23,7 +23,7 @@ The Windows Communication Foundation (WCF) Service Moniker allows COM applicatio 4. Add `bindingNamespace="http://Microsoft.ServiceModel.Samples"` to the endpoint tag in the App.config for the service. -5. Build the Message Security Sample and run Service.exe. Use Internet Explorer and browse to the service's URI (`http://localhost:8000/ServiceModelSamples/Service`) to ensure that the service is working. +5. Build the Message Security Sample and run Service.exe. Browse to the service's URI (`http://localhost:8000/ServiceModelSamples/Service`) to ensure that the service is working. 6. Open Visual Basic 6.0 and create a new Standard .exe file. Add a button to the form and double-click the button to add the following code to the Click handler: diff --git a/docs/framework/wcf/feature-details/how-to-use-a-service-moniker-with-metadata-exchange-contracts.md b/docs/framework/wcf/feature-details/how-to-use-a-service-moniker-with-metadata-exchange-contracts.md index 6732607c27412..bb55e98ab90c4 100644 --- a/docs/framework/wcf/feature-details/how-to-use-a-service-moniker-with-metadata-exchange-contracts.md +++ b/docs/framework/wcf/feature-details/how-to-use-a-service-moniker-with-metadata-exchange-contracts.md @@ -11,9 +11,9 @@ After developing some new WCF services, you may decide that you want to be able > [!NOTE] > The types defined by the WCF client assembly are never actually instantiated. The assembly is used only for metadata. -### Using the service moniker with a Mex address +## Using the service moniker with a Mex address -1. Build the Getting Started sample and use Internet Explorer to browse to its URL (`http://localhost/ServiceModelSamples/Service.svc`) to ensure that the service is working. +1. Build the Getting Started sample and use a browser to browse to its URL (`http://localhost/ServiceModelSamples/Service.svc`) to ensure that the service is working. 2. Create a Visual Basic script or Visual Basic application that contains the following code: diff --git a/docs/framework/wcf/feature-details/how-to-use-a-service-moniker-with-wsdl-contracts.md b/docs/framework/wcf/feature-details/how-to-use-a-service-moniker-with-wsdl-contracts.md index 22764e20c57b0..a159da4cae012 100644 --- a/docs/framework/wcf/feature-details/how-to-use-a-service-moniker-with-wsdl-contracts.md +++ b/docs/framework/wcf/feature-details/how-to-use-a-service-moniker-with-wsdl-contracts.md @@ -8,11 +8,11 @@ ms.assetid: a88d9650-bb50-4f48-8c85-12f5ce98a83a There are situations when you may want to have a completely self-contained COM Interop client. The service you want to call may not expose a MEX endpoint, and the WCF client DLL may not be registered for COM interop. In these cases, you can create a WSDL file that describes the service and pass it into the WCF service moniker. This topic describes how to call the Getting Started WCF sample using a WCF WSDL moniker. -### Using the WSDL service moniker +## Use the WSDL service moniker 1. Open and build the GettingStarted sample solution. -2. Open Internet Explorer and browse to `http://localhost/ServiceModelSamples/Service.svc` to make sure that the service is working. +2. Open a browser and browse to `http://localhost/ServiceModelSamples/Service.svc` to make sure that the service is working. 3. In the Service.cs file, add the following attribute on the CalculatorService class: @@ -20,7 +20,7 @@ There are situations when you may want to have a completely self-contained COM I 4. Add a binding namespace to the service App.config: -5. Create a WSDL file for the application to read. Because the namespaces were added in steps 3 and 4, you can use IE to query for the entire WSDL description of the service by browsing to `http://localhost/ServiceModelSamples/Service.svc?wsdl`. You can then save the file from Internet Explorer as serviceWSDL.xml. If you do not specify the namespaces in steps 3 and 4, the WSDL document returned from querying the above URL will not be the complete WSDL. The WSDL document returned will include several import statements that import other WSDL documents. You will have to go through each import statement and build the complete WSDL document, combining the WSDL returned from the service with the WSDL imported. +5. Create a WSDL file for the application to read. Because the namespaces were added in steps 3 and 4, you can use a browser to query for the entire WSDL description of the service by browsing to `http://localhost/ServiceModelSamples/Service.svc?wsdl`. You can then save the file as *serviceWSDL.xml*. If you do not specify the namespaces in steps 3 and 4, the WSDL document returned from querying the above URL will not be the complete WSDL. The WSDL document returned will include several import statements that import other WSDL documents. You will have to go through each import statement and build the complete WSDL document, combining the WSDL returned from the service with the WSDL imported. 6. Open Visual Basic 6.0 and create a new Standard .exe file. Add a button to the form and double-click the button to add the following code to the Click handler: diff --git a/docs/framework/wcf/feature-details/http-transport-security.md b/docs/framework/wcf/feature-details/http-transport-security.md index b47350ff88447..43f3bd3f28377 100644 --- a/docs/framework/wcf/feature-details/http-transport-security.md +++ b/docs/framework/wcf/feature-details/http-transport-security.md @@ -6,13 +6,13 @@ ms.assetid: d3439262-c58e-4d30-9f2b-a160170582bb --- # HTTP Transport Security -When using HTTP as the transport, security is provided by a Secure Sockets Layer (SSL) implementation. SSL is widely used on the Internet to authenticate a service to a client, and then to provide confidentiality (encryption) to the channel. This topic explains how SSL works and how it is implemented in Windows Communication Foundation (WCF). +When using HTTP as the transport, security is provided by a Secure Sockets Layer (SSL) implementation. SSL is widely used on the Internet to authenticate a service to a client, and then to provide confidentiality (encryption) to the channel. This article explains how SSL works and how it's implemented in Windows Communication Foundation (WCF). ## Basic SSL How SSL works is best explained through a typical scenario, in this case, a bank's Web site. The site allows a customer to log on with a user name and password. After being authenticated, the user can perform transactions, such as view account balances, pay bills, and move money from one account to another. - When a user first visits the site, the SSL mechanism begins a series of negotiations, called a *handshake*, with the user's client (in this case, Internet Explorer). SSL first authenticates the bank site to the customer. This is an essential step because customers must first know that they are communicating with the actual site, and not a spoof that tries to lure them into typing in their user name and password. SSL does this authentication by using an SSL certificate provided by a trusted authority, such as VeriSign. The logic goes like this: VeriSign vouches for the identity of the bank site. Because Internet Explorer trusts VeriSign, the site is trusted. If you want to check with VeriSign, you can do so as well by clicking on the VeriSign logo. That presents a statement of authenticity with its expiration date and who it is issued to (the bank site). + When a user first visits the site, the SSL mechanism begins a series of negotiations, called a *handshake*, with the user's client (in this case, the web browser). SSL first authenticates the bank site to the customer. This is an essential step because customers must first know that they are communicating with the actual site, and not a spoof that tries to lure them into typing in their user name and password. SSL does this authentication by using an SSL certificate provided by a trusted authority, such as VeriSign. The logic goes like this: VeriSign vouches for the identity of the bank site. Because the browser trusts VeriSign, the site is trusted. If you want to check with VeriSign, you can do so as well by clicking on the VeriSign logo. That presents a statement of authenticity with its expiration date and who it is issued to (the bank site). To initiate a secure session, the client sends the equivalent of a "hello" to the server along with a list of cryptographic algorithms it can use to sign, generate hashes, and encrypt and decrypt with. In response, the site sends back an acknowledgment and its choice of one of the algorithms suites. During this initial handshake, both parties send and receive nonces. A *nonce* is a randomly generated piece of data that is used, in combination with the site's public key, to create a hash. A *hash* is a new number that is derived from the two numbers using a standard algorithm, such as SHA1. (The client and the site also exchange messages to agree which hash algorithm to use.) The hash is unique and is used only for the session between the client and the site to encrypt and decrypt messages. Both client and service have the original nonce and the certificate's public key, so both sides can generate the same hash. Therefore, the client validates the hash sent by the service by (a) using the agreed upon algorithm to calculate the hash from the data, and (b) comparing it to the hash sent by the service; if the two match, then the client has assurance that the hash has not been tampered with. The client can then use this hash as a key to encrypt a message that contains yet another new hash. The service can decrypt the message using the hash, and recover this second-to-final hash. The accumulated information (nonces, public key, and other data) is now known to both sides, and a final hash (or master key) can be created. This final key is sent encrypted using the next-to-last hash. The master key is then used to encrypt and decrypt messages for the rest of the session. Because both client and service use the same key, this is also called a *session key*. diff --git a/docs/framework/wcf/feature-details/poison-message-handling.md b/docs/framework/wcf/feature-details/poison-message-handling.md index e41dcfafab4db..6f1dfe4a5566a 100644 --- a/docs/framework/wcf/feature-details/poison-message-handling.md +++ b/docs/framework/wcf/feature-details/poison-message-handling.md @@ -109,5 +109,4 @@ The following are the maximum number of delivery attempts made for a message: ## See also - [Queues Overview](queues-overview.md) -- [Differences in Queuing Features in Windows Vista, Windows Server 2003, and Windows XP](diff-in-queue-in-vista-server-2003-windows-xp.md) - [Specifying and Handling Faults in Contracts and Services](../specifying-and-handling-faults-in-contracts-and-services.md) diff --git a/docs/framework/wcf/feature-details/queues-in-wcf.md b/docs/framework/wcf/feature-details/queues-in-wcf.md index 844caaf6bf0e1..01ec93d088618 100644 --- a/docs/framework/wcf/feature-details/queues-in-wcf.md +++ b/docs/framework/wcf/feature-details/queues-in-wcf.md @@ -44,10 +44,7 @@ The topics in this section discuss Windows Communication Foundation (WCF) suppor Explains how to handle message transfer and delivery failures using dead letter queues and how to process messages from the dead letter queue. [Poison Message Handling](poison-message-handling.md) - Explains how to handle poison messages (messages that have exceeded the maximum number of delivery attempts to the receiving application). - - [Differences in Queuing Features in Windows Vista, Windows Server 2003, and Windows XP](diff-in-queue-in-vista-server-2003-windows-xp.md) - Summarizes the differences in the WCF queues feature between Windows Vista, Windows Server 2003, and Windows XP. + Explains how to handle poison messages (messages that have exceeded the maximum number of delivery attempts to the receiving application). [Securing Messages Using Transport Security](securing-messages-using-transport-security.md) Describes how to use transport security to secure queued messages. diff --git a/docs/framework/wcf/feature-details/readme-for-extended-protection-authentication-sample.md b/docs/framework/wcf/feature-details/readme-for-extended-protection-authentication-sample.md index 8d62f957159d5..c5deab3b356a9 100644 --- a/docs/framework/wcf/feature-details/readme-for-extended-protection-authentication-sample.md +++ b/docs/framework/wcf/feature-details/readme-for-extended-protection-authentication-sample.md @@ -25,7 +25,7 @@ For more information, see [Extended Protection for Authentication Overview](exte 1. Open the IIS manager -> Server certificates (from the feature view tab). - 2. For the purpose of testing this sample, you can create a self-signed certificate. (If you don’t want Internet Explorer to prompt you about the certificate not being secure, you can install it in the Trusted Certificate Root authority store). + 2. For the purpose of testing this sample, you can create a self-signed certificate. (If you don’t want the web browser to prompt you about the certificate not being secure, you can install it in the Trusted Certificate Root authority store). 5. Go to the Actions pane for the Default Web site. Click Edit Site -> Bindings. Add HTTPS as a type if it is not already present, with port number 443, and assign the SSL certificate created in the above step. diff --git a/docs/framework/wcf/feature-details/serialization-and-deserialization.md b/docs/framework/wcf/feature-details/serialization-and-deserialization.md index beb9817f40a52..6ff26173493b0 100644 --- a/docs/framework/wcf/feature-details/serialization-and-deserialization.md +++ b/docs/framework/wcf/feature-details/serialization-and-deserialization.md @@ -271,7 +271,7 @@ Windows Communication Foundation (WCF) includes a new serialization engine, the - The <xref:System.Runtime.Serialization.NetDataContractSerializer.Serialize%2A> and <xref:System.Runtime.Serialization.NetDataContractSerializer.Deserialize%2A> methods are aliases for the <xref:System.Runtime.Serialization.XmlObjectSerializer.WriteObject%2A> and <xref:System.Runtime.Serialization.XmlObjectSerializer.ReadObject%2A> methods. These exist to provide a more consistent programming model with binary or SOAP serialization. - For more information about these features, see [Binary Serialization](../../../standard/serialization/binary-serialization.md). + For more information about these features, see [Binary Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization). The XML formats that the `NetDataContractSerializer` and the `DataContractSerializer` use are normally not compatible. That is, attempting to serialize with one of these serializers and deserialize with the other is not a supported scenario. @@ -282,5 +282,5 @@ Windows Communication Foundation (WCF) includes a new serialization engine, the - <xref:System.Runtime.Serialization.DataContractSerializer> - <xref:System.Runtime.Serialization.NetDataContractSerializer> - <xref:System.Runtime.Serialization.XmlObjectSerializer> -- [Binary Serialization](../../../standard/serialization/binary-serialization.md) +- [Binary Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization) - [Types Supported by the Data Contract Serializer](types-supported-by-the-data-contract-serializer.md) diff --git a/docs/framework/wcf/feature-details/service-returns-arbitrary-data-using-the-wcf-web.md b/docs/framework/wcf/feature-details/service-returns-arbitrary-data-using-the-wcf-web.md index b10053a72f21d..38ccc85e7db0c 100644 --- a/docs/framework/wcf/feature-details/service-returns-arbitrary-data-using-the-wcf-web.md +++ b/docs/framework/wcf/feature-details/service-returns-arbitrary-data-using-the-wcf-web.md @@ -9,7 +9,7 @@ ms.assetid: 0283955a-b4ae-458d-ad9e-6fbb6f529e3d Sometimes developers must have full control of how data is returned from a service operation. This is the case when a service operation must return data in a format not supported by WCF. This topic discusses using the WCF WEB HTTP Programming Model to create such a service. This service has one operation that returns a stream. -### To implement the service contract +## To implement the service contract 1. Define the service contract. The contract is called `IImageServer` and has one method called `GetImage` that returns a <xref:System.IO.Stream>. @@ -52,7 +52,7 @@ Sometimes developers must have full control of how data is returned from a servi This sets the content type header to `"image/jpeg"`. Although this sample shows how to return a .jpg file, it can be modified to return any type of data that is required, in any format. The operation must retrieve or generate the data and then write it to a stream. -### To host the service +## To host the service 1. Create a console application to host the service. @@ -89,7 +89,7 @@ Sometimes developers must have full control of how data is returned from a servi host.Open(); ``` -6. Wait until the user presses ENTER to terminate the service. +6. Wait until the user presses <kbd>Enter</kbd> to terminate the service. ```csharp Console.WriteLine("Service is running"); @@ -98,11 +98,11 @@ Sometimes developers must have full control of how data is returned from a servi host.Close(); ``` -### To call the raw service using Internet Explorer +## To call the raw service using a browser -1. Run the service, you should see the following output from the service. `Service is running Press ENTER to close the host` +1. Run the service, you should see the following output from the service: `Service is running Press ENTER to close the host` -2. Open Internet Explorer and type in `http://localhost:8000/Service/GetImage?width=50&height=40` you should see a yellow rectangle with a blue diagonal line through the center. +2. Open a web browser and enter `http://localhost:8000/Service/GetImage?width=50&height=40`. You should see a yellow rectangle with a blue diagonal line through the center. ## Example @@ -171,7 +171,7 @@ namespace RawImageService ## Compiling the Code -- When compiling the sample code reference System.ServiceModel.dll and System.ServiceModel.Web.dll. +When compiling the sample code, reference System.ServiceModel.dll and System.ServiceModel.Web.dll. ## See also diff --git a/docs/framework/wcf/feature-details/toc.yml b/docs/framework/wcf/feature-details/toc.yml index bce872cdf7695..beead144c42f2 100644 --- a/docs/framework/wcf/feature-details/toc.yml +++ b/docs/framework/wcf/feature-details/toc.yml @@ -261,8 +261,6 @@ items: href: using-dead-letter-queues-to-handle-message-transfer-failures.md - name: Poison Message Handling href: poison-message-handling.md - - name: Differences in Queuing Features in Windows Vista, Windows Server 2003, and Windows XP - href: diff-in-queue-in-vista-server-2003-windows-xp.md - name: Securing Messages Using Transport Security href: securing-messages-using-transport-security.md - name: Securing Messages Using Message Security @@ -433,8 +431,6 @@ items: href: specify-the-certificate-authority-chain-verify-signatures-wcf.md - name: Certificate Validation Differences Between HTTPS, SSL over TCP, and SOAP Security href: cert-val-diff-https-ssl-over-tcp-and-soap.md - - name: Differences Between Service Certificate Validation Done by Internet Explorer and WCF - href: diff-service-certificate-validation-ie-and-wcf.md - name: "How to: Consistently Reference X.509 Certificates" href: how-to-consistently-reference-x-509-certificates.md - name: Authentication diff --git a/docs/framework/wcf/feature-details/troubleshooting-queued-messaging.md b/docs/framework/wcf/feature-details/troubleshooting-queued-messaging.md index 95916a16df53b..c00861260f0bd 100644 --- a/docs/framework/wcf/feature-details/troubleshooting-queued-messaging.md +++ b/docs/framework/wcf/feature-details/troubleshooting-queued-messaging.md @@ -32,8 +32,6 @@ This section contains common questions and troubleshooting help for using queues - Only MSMQ 4.0 supports remote transacted read. -For more information, see [Differences in Queuing Features in Windows Vista, Windows Server 2003, and Windows XP](diff-in-queue-in-vista-server-2003-windows-xp.md). - **Q:** Can I use MSMQ 3.0 on one side of a queued communication and MSMQ 4.0 on the other side? **A:** Yes. diff --git a/docs/framework/wcf/feature-details/understanding-http-authentication.md b/docs/framework/wcf/feature-details/understanding-http-authentication.md index 7b549ad112193..19f185337d866 100644 --- a/docs/framework/wcf/feature-details/understanding-http-authentication.md +++ b/docs/framework/wcf/feature-details/understanding-http-authentication.md @@ -6,32 +6,32 @@ ms.assetid: 9376309a-39e3-4819-b47b-a73982b57620 --- # Understanding HTTP Authentication -Authentication is the process of identifying whether a client is eligible to access a resource. The HTTP protocol supports authentication as a means of negotiating access to a secure resource. +Authentication is the process of identifying who the client is, typically to determine if the client is eligible to access a resource. The HTTP protocol supports authentication as a means of negotiating access to a secure resource. - The initial request from a client is typically an anonymous request, not containing any authentication information. HTTP server applications can deny the anonymous request while indicating that authentication is required. The server application sends WWW-Authentication headers to indicate the supported authentication schemes. This document describes several authentication schemes for HTTP and discusses their support in Windows Communication Foundation (WCF). + The initial request from a client is typically an anonymous request, not containing any authentication information. HTTP server apps can deny the anonymous request while indicating that authentication is required. The server app sends WWW-Authentication headers to indicate the supported authentication schemes. This article describes several authentication schemes for HTTP and discusses their support in Windows Communication Foundation (WCF). ## HTTP Authentication Schemes - The server can specify multiple authentication schemes for the client to choose from. The following table describes some of the authentication schemes commonly found in Windows applications. + The server can specify multiple authentication schemes for the client to choose from. The following table describes some of the authentication schemes commonly found in Windows applications: |Authentication Scheme|Description| |---------------------------|-----------------| -|Anonymous|An anonymous request does not contain any authentication information. This is equivalent to granting everyone access to the resource.| -|Basic|Basic authentication sends a Base64-encoded string that contains a user name and password for the client. Base64 is not a form of encryption and should be considered the same as sending the user name and password in clear text. If a resource needs to be protected, strongly consider using an authentication scheme other than basic authentication.| -|Digest|Digest authentication is a challenge-response scheme that is intended to replace Basic authentication. The server sends a string of random data called a *nonce* to the client as a challenge. The client responds with a hash that includes the user name, password, and nonce, among additional information. The complexity this exchange introduces and the data hashing make it more difficult to steal and reuse the user's credentials with this authentication scheme.<br /><br /> Digest authentication requires the use of Windows domain accounts. The digest *realm* is the Windows domain name. Therefore, you cannot use a server running on an operating system that does not support Windows domains, such as Windows XP Home Edition, with Digest authentication. Conversely, when the client runs on an operating system that does not support Windows domains, a domain account must be explicitly specified during the authentication.| -|NTLM|NT LAN Manager (NTLM) authentication is a challenge-response scheme that is a securer variation of Digest authentication. NTLM uses Windows credentials to transform the challenge data instead of the unencoded user name and password. NTLM authentication requires multiple exchanges between the client and server. The server and any intervening proxies must support persistent connections to successfully complete the authentication.| -|Negotiate|Negotiate authentication automatically selects between the Kerberos protocol and NTLM authentication, depending on availability. The Kerberos protocol is used if it is available; otherwise, NTLM is tried. Kerberos authentication significantly improves upon NTLM. Kerberos authentication is both faster than NTLM and allows the use of mutual authentication and delegation of credentials to remote machines.| -|Windows Live ID|The underlying Windows HTTP service includes authentication using federated protocols. However, the standard HTTP transports in WCF do not support the use of federated authentication schemes, such as Microsoft Windows Live ID. Support for this feature is currently available through the use of message security. For more information, see [Federation and Issued Tokens](federation-and-issued-tokens.md).| - -## Choosing an Authentication Scheme +|Anonymous|An anonymous request doesn't contain any authentication information. Anonymous is equivalent to granting everyone access to the resource.| +|Basic|Basic authentication sends a Base64-encoded string that contains a user name and password for the client. Base64 isn't a form of encryption and should be considered the same as sending the user name and password in clear text. If a resource needs to be protected, strongly consider using an authentication scheme other than basic authentication.| +|Digest|Digest authentication is a challenge-response scheme that is intended to replace Basic authentication. The server sends a string of random data called a *nonce* to the client as a challenge. The client responds with a hash that includes the user name, password, and nonce, among additional information. The complexity this exchange introduces and the data hashing make it more difficult to steal and reuse the user's credentials with this authentication scheme.<br /><br /> Digest authentication requires the use of Windows domain accounts. The digest *realm* is the Windows domain name. Therefore, you can't use a server running on an operating system that doesn't support Windows domains, such as Windows XP Home Edition, with Digest authentication. Conversely, when the client runs on an operating system that doesn't support Windows domains, a domain account must be explicitly specified during the authentication.| +|NTLM|NT LAN Manager (NTLM) authentication is a challenge-response scheme that is a more secure variation of Digest authentication. NTLM uses Windows credentials to transform the challenge data instead of the unencoded user name and password. NTLM authentication requires multiple exchanges between the client and server. The server and any intervening proxies must support persistent connections to successfully complete the authentication.| +|Negotiate|Negotiate authentication automatically selects between the Kerberos protocol and NTLM authentication, depending on availability. The Kerberos protocol is used if it's available; otherwise, NTLM is tried. Kerberos authentication significantly improves upon NTLM. Kerberos authentication is both faster than NTLM and allows the use of mutual authentication and delegation of credentials to remote machines.| +|Windows Live ID|The underlying Windows HTTP service includes authentication using federated protocols. However, the standard HTTP transports in WCF doesn't support the use of federated authentication schemes, such as Microsoft Windows Live ID. Support for this feature is currently available by using message security. For more information, see [Federation and Issued Tokens](federation-and-issued-tokens.md).| + +## Choose an Authentication Scheme When selecting the potential authentication schemes for an HTTP server, a few items to consider include the following: -- Consider whether the resource needs to be protected. Using HTTP authentication requires transmitting more data and can limit interoperability with clients. Allow anonymous access to resources that do not need to be protected. +- Consider whether the resource needs to be protected. Using HTTP authentication requires transmitting more data and can limit interoperability with clients. Allow anonymous access to resources that don't need to be protected. -- If the resource needs to be protected, consider which authentication schemes provide the required level of security. The weakest standard authentication scheme discussed here is Basic authentication. Basic authentication does not protect the user's credentials. The strongest standard authentication scheme is Negotiate authentication, resulting in the Kerberos protocol. +- If the resource needs to be protected, consider which authentication schemes provide the required level of security. The weakest standard authentication scheme discussed here's Basic authentication. Basic authentication doesn't protect the user's credentials. The strongest standard authentication scheme is Negotiate authentication, resulting in the Kerberos protocol. -- A server should not present (in the WWW-Authentication headers) any scheme that it is not prepared to accept or that does not adequately secure the protected resource. Clients are free to choose between any of the authentication schemes the server presents. Some clients default to a weak authentication scheme or the first authentication scheme in the server's list. +- A server shouldn't present, for example, in the WWW-Authentication headers), any scheme that it isn't prepared to accept or that doesn't adequately secure the protected resource. Clients are free to choose between any of the authentication schemes the server presents. Some clients default to a weak authentication scheme or the first authentication scheme in the server's list. ## See also diff --git a/docs/framework/wcf/feature-details/version-tolerant-serialization-callbacks.md b/docs/framework/wcf/feature-details/version-tolerant-serialization-callbacks.md index fa6af7c59faf5..2c3eba28bdb8a 100644 --- a/docs/framework/wcf/feature-details/version-tolerant-serialization-callbacks.md +++ b/docs/framework/wcf/feature-details/version-tolerant-serialization-callbacks.md @@ -46,4 +46,4 @@ The data contract programming model fully supports the version-tolerant serializ - <xref:System.Runtime.Serialization.OnDeserializingAttribute> - <xref:System.Runtime.Serialization.OnDeserializedAttribute> - <xref:System.Runtime.Serialization.StreamingContext> -- [Version Tolerant Serialization](../../../standard/serialization/version-tolerant-serialization.md) +- [Version Tolerant Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/version-tolerant-serialization) diff --git a/docs/framework/wcf/feature-details/working-with-nats-and-firewalls.md b/docs/framework/wcf/feature-details/working-with-nats-and-firewalls.md index 072df8030b84e..4b27e2a9fc8ea 100644 --- a/docs/framework/wcf/feature-details/working-with-nats-and-firewalls.md +++ b/docs/framework/wcf/feature-details/working-with-nats-and-firewalls.md @@ -23,7 +23,7 @@ The client and server of a network connection frequently do not have a direct an ## How Firewalls Affect Communication - A *firewall* is a software or hardware device that applies rules to the traffic passing through to decide whether to allow or deny passage. You can configure firewalls to examine incoming and/or outgoing streams of traffic. The firewall provides a security boundary for the network at either the edge of the network or on the endpoint host. Business users have traditionally kept their servers behind a firewall to prevent malicious attacks. Since the introduction of the personal firewall in Windows XP SP2, the number of home users behind a firewall has greatly increased as well. This makes it likely that one or both ends of a connection have a firewall examining packets. + A *firewall* is a software or hardware device that applies rules to the traffic passing through to decide whether to allow or deny passage. You can configure firewalls to examine incoming and/or outgoing streams of traffic. The firewall provides a security boundary for the network at either the edge of the network or on the endpoint host. Business users have traditionally kept their servers behind a firewall to prevent malicious attacks. Since the introduction of the personal firewall in Windows XP, the number of home users behind a firewall has greatly increased as well. This makes it likely that one or both ends of a connection have a firewall examining packets. Firewalls vary greatly in terms of their complexity and capability for examining packets. Simple firewalls apply rules based on the source and destination addresses and ports in packets. Intelligent firewalls can also examine the contents of packets to make decisions. These firewalls come in many different configurations and are often used for specialized applications. diff --git a/docs/framework/wcf/generating-data-type-classes-from-xml.md b/docs/framework/wcf/generating-data-type-classes-from-xml.md index 99f2fa77b6074..3ff5d78df494e 100644 --- a/docs/framework/wcf/generating-data-type-classes-from-xml.md +++ b/docs/framework/wcf/generating-data-type-classes-from-xml.md @@ -1,40 +1,38 @@ --- description: "Learn more about: Generating Data Type Classes from XML" title: "Generating Data Type Classes from XML" -ms.date: "03/30/2017" +ms.date: 03/24/2023 ms.topic: how-to --- -# Generating Data Type Classes from XML +# Generate data type classes from XML -.NET Framework 4.5 includes a new feature to generate data type classes from XML. This topic describes how to automatically generate data types for the .NET Blog RSS feed. +.NET Framework 4.5 includes a new feature to generate data type classes from XML. This article describes how to automatically generate data types for the .NET Blog RSS feed. -### Obtaining the XML from the .NET Blog RSS feed +## Obtain the XML from the .NET Blog RSS feed -1. In Internet Explorer, navigate to the [.NET Blog RSS feed](https://devblogs.microsoft.com/dotnet/feed/). +1. In a browser, navigate to the [.NET Blog RSS feed](https://devblogs.microsoft.com/dotnet/feed/). -2. Right-click the page and select **View Source**. +2. Copy the text of the feed by pressing <kbd>Ctrl+A</kbd> to select all text, and <kbd>Ctrl+C</kbd> to copy. -3. Copy the text of the feed by pressing **Ctrl+A** to select all text, and **Ctrl+C** to copy. +## Create the data types -### Creating the data types - -1. Open a code file where the proxy is to be used. This file should be part of a .NET Framework 4.5 project. +1. Open a code file where the proxy is to be used. This file should be part of a .NET Framework 4.5 or later project. 2. Place the cursor in a location in the file outside any existing classes. -3. Select **Edit**, **Paste Special**, **Paste XML as Classes**. +3. Select **Edit** > **Paste Special** > **Paste XML as Classes**. -4. Classes called `link`, `rss`, `rssChannel`, `rssChannelImage`, `rssChannelItem` and `rssChannelItemGuid` are created with the necessary members for accessing the elements in the RSS feed. +4. Classes called `link`, `rss`, `rssChannel`, `rssChannelImage`, `rssChannelItem`, and `rssChannelItemGuid` are created with the necessary members for accessing the elements in the RSS feed. -### Using the generated classes +## Use the generated classes -1. Once the classes are generated, they can be used in code like any other classes. The following code example returns a new instance of the `rssChannelImage` class. +Once the classes are generated, you can use them in code like any other classes. The following code example returns a new instance of the `rssChannelImage` class. - ```csharp - var channelImage = new rssChannelImage() - { - title = "MyImage", - link = "http://www.contoso.com/images/channelImage.jpg", - url = "http://www.contoso.com/entries/myEntry.html" - }; - ``` +```csharp +var channelImage = new rssChannelImage() +{ + title = "MyImage", + link = "http://www.contoso.com/images/channelImage.jpg", + url = "http://www.contoso.com/entries/myEntry.html" +}; +``` diff --git a/docs/framework/wcf/samples/basicbinding-with-transport-security.md b/docs/framework/wcf/samples/basicbinding-with-transport-security.md index cf73a95d0e448..0a2fe725811b1 100644 --- a/docs/framework/wcf/samples/basicbinding-with-transport-security.md +++ b/docs/framework/wcf/samples/basicbinding-with-transport-security.md @@ -6,7 +6,7 @@ ms.assetid: f49b1de6-0254-4362-8ef2-fccd8ff9688b --- # BasicBinding with Transport Security -The [TransportSecurity sample](https://github.com/dotnet/samples/tree/main/framework/wcf) demonstrates the use of SSL transport security with the basic binding. This sample is based on the [Getting Started](getting-started-sample.md) that implements a calculator service. +The [TransportSecurity sample](https://github.com/dotnet/samples/tree/main/framework/wcf/Basic/Binding/Basic/TransportSecurity/CS) demonstrates the use of SSL transport security with the basic binding. This sample is based on the [Getting Started](getting-started-sample.md) that implements a calculator service. ## Sample Details diff --git a/docs/framework/wcf/samples/extended-protection-policy.md b/docs/framework/wcf/samples/extended-protection-policy.md index 2b5f2e86713b0..bea281c7016f2 100644 --- a/docs/framework/wcf/samples/extended-protection-policy.md +++ b/docs/framework/wcf/samples/extended-protection-policy.md @@ -15,12 +15,12 @@ Extended Protection is a security initiative for protecting against man-in-the-m When applications authenticate using Kerberos, Digest or NTLM using HTTPS, a Transport Level Security (TLS) channel is first established and then authentication takes place using the secure channel. However, there is no binding between the session key generated by SSL and the session key generated during authentication. Any MITM can establish itself between the client and the server and start forwarding the requests from the client, even when the transport channel itself is secure, because the server has no way of knowing whether the secure channel has been established from the client or a MITM. The solution in this scenario is to bind the outer TLS channel with the inner authentication channel such that the server can detect if there is a MITM. > [!NOTE] -> This sample only works when hosted on IIS and cannot work on Cassini – Visual Studio Development Server because Cassini does not support HTTPS. +> This sample only works when hosted on IIS. > [!NOTE] -> This feature is currently only available on Windows 7. The following steps are specific to Windows 7. +> The following steps are specific to Windows 7. -#### To set up, build, and run the sample +## To set up, build, and run the sample 1. Install Internet Information Services from **Control Panel**, **Add/Remove Programs**, **Windows Features**. @@ -32,7 +32,7 @@ When applications authenticate using Kerberos, Digest or NTLM using HTTPS, a Tra 1. Open IIS Manager. Open **Server certificates**, which appears in the **Feature View** tab when the root node (machine name) is selected. - 2. For the purpose of testing this sample, create a self-signed certificate. If you do not want Internet Explorer to prompt you about the certificate not being secure, install the certificate in the Trusted Certificate Root authority store. + 2. For the purpose of testing this sample, create a self-signed certificate. If you do not want the browser to prompt you about the certificate not being secure, install the certificate in the Trusted Certificate Root authority store. 5. Open the **Actions** pane for the default Web site. Click **Edit Site**, **Bindings**. Add HTTPS as a type if not already present, with port number 443. Assign the SSL certificate created in the preceding step. diff --git a/docs/framework/wcf/samples/iis-server-certificate-installation-instructions.md b/docs/framework/wcf/samples/iis-server-certificate-installation-instructions.md index 1b27e9312e1f6..3c21ee37d355c 100644 --- a/docs/framework/wcf/samples/iis-server-certificate-installation-instructions.md +++ b/docs/framework/wcf/samples/iis-server-certificate-installation-instructions.md @@ -66,7 +66,7 @@ PermissiveCertificatePolicy.Enact("CN=ServiceModelSamples-HTTPS-Server"); 6. Test access to the service in a browser by using the HTTPS address `https://localhost/servicemodelsamples/service.svc`. > [!NOTE] -> Because the test certificate you have just installed is not a trusted certificate, you may encounter additional Internet Explorer security warnings when browsing to local Web addresses secured with this certificate. +> Because the test certificate you have just installed is not a trusted certificate, you may encounter additional security warnings when browsing to local web addresses secured with this certificate. ## Removing Certificates diff --git a/docs/framework/wcf/samples/one-way.md b/docs/framework/wcf/samples/one-way.md index f0543d08293c9..a91030a14e8ba 100644 --- a/docs/framework/wcf/samples/one-way.md +++ b/docs/framework/wcf/samples/one-way.md @@ -6,7 +6,7 @@ ms.assetid: 74e3e03d-cd15-4191-a6a5-1efa2dcb9e73 --- # One-Way -The [Oneway sample](https://github.com/dotnet/samples/tree/main/framework/wcf) demonstrates a service contact with one-way service operations. The client does not wait for service operations to complete as is the case with two-way service operations. This sample is based on the [Getting Started](getting-started-sample.md) and uses the `wsHttpBinding` binding. The service in this sample is a self-hosted console application to enable you to observe the service that receives and processes requests. The client is also a console application. +The [Oneway sample](https://github.com/dotnet/samples/tree/main/framework/wcf/Basic/Contract/Service/Oneway/CS) demonstrates a service contact with one-way service operations. The client does not wait for service operations to complete as is the case with two-way service operations. This sample is based on the [Getting Started](getting-started-sample.md) and uses the `wsHttpBinding` binding. The service in this sample is a self-hosted console application to enable you to observe the service that receives and processes requests. The client is also a console application. > [!NOTE] > The setup procedure and build instructions for this sample are located at the end of this topic. diff --git a/docs/framework/wcf/samples/virtual-directory-setup-instructions.md b/docs/framework/wcf/samples/virtual-directory-setup-instructions.md index ce4f02b1d45f3..0fa3430b4505f 100644 --- a/docs/framework/wcf/samples/virtual-directory-setup-instructions.md +++ b/docs/framework/wcf/samples/virtual-directory-setup-instructions.md @@ -6,7 +6,7 @@ ms.assetid: 3c62cab5-81a4-48b6-ac8c-9ce33a85a157 --- # Virtual Directory Setup Instructions -The Windows Communication Foundation (WCF) samples are intended to share a common virtual directory named servicemodelsamples that is mapped to the %SystemDrive%\inetpub\wwwroot\servicemodelsamples folder. +The Windows Communication Foundation (WCF) samples are intended to share a common virtual directory named servicemodelsamples that's mapped to the *%SystemDrive%\inetpub\wwwroot\servicemodelsamples* folder. > [!NOTE] > %SystemDrive% is usually C: or D:, depending on the drive location where Internet Information Services (IIS) is installed. @@ -15,7 +15,7 @@ You can run the Setupvroot.bat and Cleanupvroot.bat files from the [One-Time Set ## Procedures -#### To create a virtual directory in IIS 7.0 or 7.5 +### To create a virtual directory in IIS 7.0 or 7.5 1. From the **Start** menu, click **Run**, then type **inetmgr** to open the Internet Information Services (IIS) MMC snap-in. @@ -39,7 +39,7 @@ You can run the Setupvroot.bat and Cleanupvroot.bat files from the [One-Time Set In addition to creating the virtual directory, you must also set its properties to enable WCF services to run. See below for details. -#### To create a virtual directory in IIS 5.1 or 6.0 +### To create a virtual directory in IIS 5.1 or 6.0 1. Open a command prompt window and type `start inetmgr` to open the Internet Information Services (IIS) MMC snap-in. @@ -64,17 +64,17 @@ You can run the Setupvroot.bat and Cleanupvroot.bat files from the [One-Time Set > [!NOTE] > This task must be performed only once because all of the WCF samples use the same servicemodelsamples virtual directory. -#### To set additional virtual directory properties in IIS 7.0 or 7.5 +### To set additional virtual directory properties in IIS 7.0 or 7.5 1. Click the servicemodelsamples node. Along the bottom of the window, two views are listed. Select **Features View** if it isn't already selected. 2. Double-click the entry for **Directory Browsing**. -3. In the Actions pane, select the **Enable** option. This enables you to access the directory of the directory by using Internet Explorer, which helps when debugging a service. +3. In the Actions pane, select the **Enable** option. This enables you to access the directory by using a browser, which helps when debugging a service. Finally, you must set the security properties of the servicemodelsamples folder to allow it to be accessed by others. See below for details. -#### To set additional virtual directory properties in IIS 5.1 or 6.0 +### To set additional virtual directory properties in IIS 5.1 or 6.0 1. Right-click the servicemodelsamples node and then click **Properties**. @@ -86,9 +86,9 @@ Finally, you must set the security properties of the servicemodelsamples folder - **Index this resource** -3. Select the **Directory browsing** check box. This enables you to access the directory of the directory by using Internet Explorer, which helps when debugging a service. +3. Select the **Directory browsing** check box. This enables you to access the directory by using a browser, which helps when debugging a service. -#### To set security properties of the folder in IIS 7.0 or 7.5 +### To set security properties of the folder in IIS 7.0 or 7.5 1. Navigate to %SystemDrive%\inetpub\wwwroot\servicemodelsamples. @@ -114,7 +114,7 @@ Finally, you must set the security properties of the servicemodelsamples folder 12. After the changes to enable sharing are complete, click **Done** to close the **File Sharing** window. -#### To set security properties of the folder in IIS 5.1 or 6.0 +### To set security properties of the folder in IIS 5.1 or 6.0 1. Navigate to %SystemDrive%\inetpub\wwwroot\servicemodelsamples. diff --git a/docs/framework/wcf/samples/xmlserializer-faults.md b/docs/framework/wcf/samples/xmlserializer-faults.md index 44349ecf38a79..2ab4789cc89d7 100644 --- a/docs/framework/wcf/samples/xmlserializer-faults.md +++ b/docs/framework/wcf/samples/xmlserializer-faults.md @@ -6,7 +6,7 @@ ms.assetid: c6b80f14-64f4-4162-ae76-71664cf42fd3 --- # XmlSerializer Faults -The [XmlSerializerFaults sample](https://github.com/dotnet/samples/tree/main/framework/wcf) demonstrates how to communicate error information from a service to a client using the <xref:System.Xml.Serialization.XmlSerializer>. The sample is based on the [Getting Started](getting-started-sample.md), with some additional code added to the service to convert an internal exception to a fault. The client attempts to perform division by zero to force an error condition on the service. +The [XmlSerializerFaults sample](https://github.com/dotnet/samples/tree/main/framework/wcf/Basic/Contract/Service/XmlSerializerFaults/CS) demonstrates how to communicate error information from a service to a client using the <xref:System.Xml.Serialization.XmlSerializer>. The sample is based on the [Getting Started](getting-started-sample.md), with some additional code added to the service to convert an internal exception to a fault. The client attempts to perform division by zero to force an error condition on the service. > [!NOTE] > The setup procedure and build instructions for this sample are located at the end of this topic. diff --git a/docs/framework/wcf/securing-services.md b/docs/framework/wcf/securing-services.md index 7b46075cd9e19..53b0c3ff30f31 100644 --- a/docs/framework/wcf/securing-services.md +++ b/docs/framework/wcf/securing-services.md @@ -12,10 +12,7 @@ ms.assetid: f0ecc6f7-f4b5-42a4-9cb1-b02e28e26620 Security of a Windows Communication Foundation (WCF) service consists of two primary requirements: transfer security and authorization. (A third requirement, auditing of security events, is described in [Auditing](./feature-details/auditing-security-events.md).) In brief, transfer security includes authentication (verifying the identity of both the service and the client), confidentiality (message encryption), and integrity (digital signing to detect tampering). Authorization is the control of access to resources, for example, allowing only privileged users to read a file. Using features of WCF, the two primary requirements are easily implemented. - With the exception of the <xref:System.ServiceModel.BasicHttpBinding> class (or the [\<basicHttpBinding>](../configure-apps/file-schema/wcf/basichttpbinding.md) element in configuration), transfer security is enabled by default for all of the predefined bindings. The topics in this section cover two basic scenarios: implementing transfer security and authorization on an intranet service hosted on Internet Information Services (IIS), and implementing transfer security and authorization on a service hosted on IIS. - -> [!NOTE] -> Windows XP Home does not support Windows authentication. Therefore, you should not run a service on that system. + With the exception of the <xref:System.ServiceModel.BasicHttpBinding> class (or the [\<basicHttpBinding>](../configure-apps/file-schema/wcf/basichttpbinding.md) element in configuration), transfer security is enabled by default for all of the predefined bindings. The topics in this section cover two basic scenarios: implementing transfer security and authorization on an intranet service hosted on Internet Information Services (IIS), and implementing transfer security and authorization on a service hosted on IIS. ## Security Basics diff --git a/docs/framework/wcf/wcf-vs-templates.md b/docs/framework/wcf/wcf-vs-templates.md index 1bda3e958201f..dbbbc31440506 100644 --- a/docs/framework/wcf/wcf-vs-templates.md +++ b/docs/framework/wcf/wcf-vs-templates.md @@ -4,7 +4,7 @@ title: "WCF Visual Studio Templates" ms.date: "03/30/2017" ms.assetid: 6a608575-3535-4190-89da-911e24c8374f --- -# WCF Visual Studio Templates +# WCF Visual Studio templates Windows Communication Foundation (WCF) Visual Studio templates are predefined project and item templates you can use in Visual Studio to quickly build WCF services and surrounding applications. @@ -71,9 +71,9 @@ Windows Communication Foundation (WCF) Visual Studio templates are predefined pr #### Changing the Address of the Feed - The syndication template uses Internet Explorer during execution. When you right-click your project in **Solutions Explorer** in Visual Studio, select **Properties**, then select the **Debug** tab and you can see the default address of the template. Internet Explorer attempts to open the feed at this address. + The syndication template uses a web browser during execution. When you right-click your project in **Solution Explorer** in Visual Studio, select **Properties**, then select the **Debug** tab and you can see the default address of the template. The browser attempts to open the feed at this address. - If you change the address of your feed, you must also change the address in the **Debug** tab. If you do not do this, Internet Explorer attempts to open the feed at the default address and fail. + If you change the address of your feed, you must also change the address in the **Debug** tab. If you do not do this, the browser attempts to open the feed at the default address and fails. ### AJAX enabled WCF Service Item Template diff --git a/docs/framework/whats-new/obsolete-members.md b/docs/framework/whats-new/obsolete-members.md index ecbf2e4dbb2a8..f967c9f2ca6f9 100644 --- a/docs/framework/whats-new/obsolete-members.md +++ b/docs/framework/whats-new/obsolete-members.md @@ -722,7 +722,7 @@ The IEHost.dll and IEExec.exe assemblies have been removed from .NET Framework. > |<xref:Microsoft.VisualBasic.CompilerServices.NewLateBinding?displayProperty=nameWithType>|<xref:Microsoft.VisualBasic.CompilerServices.NewLateBinding.FallbackSet%2A>|Use of this member generates a compiler error.<br /><br /> Don't use this method.| > |<xref:Microsoft.VisualBasic.CompilerServices.NewLateBinding?displayProperty=nameWithType>|<xref:Microsoft.VisualBasic.CompilerServices.NewLateBinding.FallbackSetComplex%2A>|Use of this member generates a compiler error.<br /><br /> Don't use this method.| > |<xref:Microsoft.VisualBasic.CompilerServices.Operators?displayProperty=nameWithType>|<xref:Microsoft.VisualBasic.CompilerServices.Operators.FallbackInvokeUserDefinedOperator%2A>|Use of this member generates a compiler error.<br /><br /> Don't use this method.| -> |<xref:Microsoft.VisualBasic.MyServices.RegistryProxy?displayProperty=nameWithType>|<xref:Microsoft.VisualBasic.MyServices.RegistryProxy.DynData%2A>|The `DynData` registry key works only on Win9x, which isn't supported by this version of the .NET Framework. Use the `PerformanceData` registry key instead. This property will be removed from a future version of the Framework.| +> |<xref:Microsoft.VisualBasic.MyServices.RegistryProxy?displayProperty=nameWithType>|<xref:Microsoft.VisualBasic.MyServices.RegistryProxy.DynData%2A>|The `DynData` registry key works only on Win9x, which isn't supported by this version of .NET Framework. Use the `PerformanceData` registry key instead. This property will be removed from a future version of .NET Framework.| ## See also diff --git a/docs/framework/whats-new/obsolete-types.md b/docs/framework/whats-new/obsolete-types.md index b56567e48f6c3..8d98460fd8445 100644 --- a/docs/framework/whats-new/obsolete-types.md +++ b/docs/framework/whats-new/obsolete-types.md @@ -8,67 +8,45 @@ helpviewer_keywords: - "obsolete types [.NET Framework]" ms.assetid: e636d024-0fac-45eb-b721-25a8c0ceca8f --- -# Obsolete Types in the .NET Framework +# Obsolete types in .NET Framework <a name="introduction"></a> The tables in this article list the types that are obsolete in the .NET Framework 4.5 and .NET Framework 4.6, organized by assembly. Use the following links to see a list of the obsolete types and the recommended alternatives in each assembly. Because these types are obsolete, all their members are also obsolete. For a list of additional obsolete members in the .NET Framework class library, see [Obsolete Members](obsolete-members.md). - [Obsolete types in system assemblies](#obsolete_types_in_system_assemblies) - [mscorlib.dll](#mscorlib) - - [System.Core.dll](#Core) - - [System.Data.dll](#data) - - [System.Data.OracleClient.dll](#oracleclient) - - [System.Design.dll](#design) - - [System.dll](#system) - - [System.EnterpriseServices.dll](#enterpriseservices) - - [System.Net.dll](#net) - - [System.ServiceModel.dll](#servicemodel) - - [System.Web.dll](#web) - - [System.Web.Mobile.dll](#mobile) - - [System.Workflow.Activities.dll](#workflow_activities) - - [System.Workflow.ComponentModel.dll](#workflow_componentmodel) - - [System.Workflow.Runtime.dll](#workflow_runtime) - - [System.WorkflowServices.dll](#workflowservices) - - [System.Xaml.dll](#xaml) - - [System.Xml.dll](#xml) - - [WindowsBase.dll](#WindowsBase) - [Obsolete types in Microsoft assemblies](#obsolete_types_in_microsoft_assemblies) - [IEHost.dll and IEExec.exe](#IEHost) - - [Microsoft.Build.Engine.dll](#Engine) - - [Microsoft.JScript.dll](#jscript) - - [Microsoft.VisualBasic.Compatibility.dll](#VBCompat) - - [Microsoft.VisualBasic.Compatibility.Data.dll](#VBCompatData) - - [Microsoft.VisualC.dll](#visualc) <a name="obsolete_types_in_system_assemblies"></a> -## Obsolete Types in System Assemblies +## Obsolete types in system assemblies -The following tables list the types that have been declared obsolete in system assemblies. These assemblies are used for general\-purpose application development that targets the .NET Framework. +The following tables list the types that have been declared obsolete in system assemblies. These assemblies are used for general-purpose application development that targets .NET Framework. <a name="mscorlib"></a> @@ -598,15 +576,15 @@ The following tables list the types that have been declared obsolete in system a <a name="obsolete_types_in_microsoft_assemblies"></a> -## Obsolete Types in Microsoft Assemblies +## Obsolete types in Microsoft assemblies -The following sections list the obsolete types in Microsoft assemblies. These assemblies are special-purpose assemblies such as assemblies that target an individual language (for example, Microsoft.JScript.dll or Microsoft.VisualC.dll). +The following sections list the obsolete types in Microsoft assemblies. These assemblies are special-purpose assemblies, such as assemblies that target an individual language (for example, Microsoft.JScript.dll or Microsoft.VisualC.dll). <a name="IEHost"></a> ### Assembly: IEHost.dll and IEExec.exe -The IEHost.dll and IEExec.exe assemblies have been removed from the .NET Framework. All of their types and their members are obsolete and are not supported as of the .NET Framework 4. These assemblies were used to host Windows Forms controls and to run executables in Internet Explorer. Recommended alternatives include ClickOnce, XAML browser applications (XBAP), and Microsoft Silverlight. +The IEHost.dll and IEExec.exe assemblies have been removed from .NET Framework. All of their types and their members are obsolete and are not supported as of .NET Framework 4. These assemblies were used to host Windows Forms controls and to run executables in Internet Explorer. Recommended alternatives include ClickOnce, XAML browser applications (XBAP), and Microsoft Silverlight. [Back to top](#introduction) diff --git a/docs/framework/windows-workflow-foundation/architecture.md b/docs/framework/windows-workflow-foundation/architecture.md index 1377810aa06c2..addd09e4bb9be 100644 --- a/docs/framework/windows-workflow-foundation/architecture.md +++ b/docs/framework/windows-workflow-foundation/architecture.md @@ -22,7 +22,7 @@ xmlns:my='clr-namespace:XAMLActivityDefinition;assembly=XAMLActivityDefinition' xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns="http://schemas.microsoft.com/2009/workflow"> <z:SchemaType.Members> - <z:SchemaType.SchemaProperty Name='Text' Type=' InArgument(s:String)' /> + <z:SchemaType.SchemaProperty Name='Text' Type='InArgument(s:String)' /> <z:SchemaType.SchemaProperty Name='Response' Type='OutArgument(s:String)' /> </z:SchemaType.Members> <Sequence> diff --git a/docs/framework/windows-workflow-foundation/toc.yml b/docs/framework/windows-workflow-foundation/toc.yml index 86ab77d968d36..f5da15f73a64d 100644 --- a/docs/framework/windows-workflow-foundation/toc.yml +++ b/docs/framework/windows-workflow-foundation/toc.yml @@ -1,3 +1,4 @@ +items: - name: Windows Workflow Foundation href: index.md items: diff --git a/docs/fsharp/index.yml b/docs/fsharp/index.yml index fb0b69a3dd58e..f2b41eee5bf1d 100644 --- a/docs/fsharp/index.yml +++ b/docs/fsharp/index.yml @@ -18,6 +18,8 @@ landingContent: links: - text: "What is F#?" url: what-is-fsharp.md + - text: "F# strategy" + url: strategy.md - text: "First steps in F#" url: /training/modules/fsharp-first-steps/ - text: "Install F#" diff --git a/docs/fsharp/language-reference/fsharp-collection-types.md b/docs/fsharp/language-reference/fsharp-collection-types.md index e888d526656dc..df65ed2649665 100644 --- a/docs/fsharp/language-reference/fsharp-collection-types.md +++ b/docs/fsharp/language-reference/fsharp-collection-types.md @@ -15,7 +15,7 @@ The following table shows F# collection types. |Type|Description|Related Links| |----|-----------|-------------| -|[List](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-fsharplist-1.html)|An ordered, immutable series of elements of the same type. Implemented as a linked list.|[Lists](lists.md)<br /><br />[List Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-listmodule.html)| +|[List](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-list-1.html)|An ordered, immutable series of elements of the same type. Implemented as a linked list.|[Lists](lists.md)<br /><br />[List Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-listmodule.html)| |[Array](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-array-1.html)|A fixed-size, zero-based, mutable collection of consecutive data elements that are all of the same type.|[Arrays](arrays.md)<br /><br />[Array Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-arraymodule.html)<br /><br />[Array2D Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-array2dmodule.html)<br /><br />[Array3D Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-array3dmodule.html)| |[seq](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-seq-1.html)|A logical series of elements that are all of one type. Sequences are particularly useful when you have a large, ordered collection of data but don't necessarily expect to use all the elements. Individual sequence elements are computed only as required, so a sequence can perform better than a list if not all the elements are used. Sequences are represented by the `seq<'T>` type, which is an alias for `IEnumerable<T>`. Therefore, any .NET Framework type that implements `System.Collections.Generic.IEnumerable<'T>` can be used as a sequence.|[Sequences](sequences.md)<br /><br />[Seq Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-seqmodule.html)| |[Map](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-fsharpmap-2.html)|An immutable dictionary of elements. Elements are accessed by key.|[Map Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-mapmodule.html)| diff --git a/docs/fsharp/language-reference/generics/constraints.md b/docs/fsharp/language-reference/generics/constraints.md index c2fbd8d311251..474fc7bdbe34d 100644 --- a/docs/fsharp/language-reference/generics/constraints.md +++ b/docs/fsharp/language-reference/generics/constraints.md @@ -44,65 +44,65 @@ The following code illustrates some constraint declarations: ```fsharp // Base Type Constraint type Class1<'T when 'T :> System.Exception> = -class end + class end // Interface Type Constraint type Class2<'T when 'T :> System.IComparable> = -class end + class end // Null constraint type Class3<'T when 'T : null> = -class end + class end // Member constraint with instance member type Class5<'T when 'T : (member Method1 : 'T -> int)> = -class end + class end // Member constraint with property type Class6<'T when 'T : (member Property1 : int)> = -class end + class end // Constructor constraint type Class7<'T when 'T : (new : unit -> 'T)>() = -member val Field = new 'T() + member val Field = new 'T() // Reference type constraint type Class8<'T when 'T : not struct> = -class end + class end // Enumeration constraint with underlying value specified type Class9<'T when 'T : enum<uint32>> = -class end + class end // 'T must implement IComparable, or be an array type with comparable // elements, or be System.IntPtr or System.UIntPtr. Also, 'T must not have // the NoComparison attribute. type Class10<'T when 'T : comparison> = -class end + class end // 'T must support equality. This is true for any type that does not // have the NoEquality attribute. type Class11<'T when 'T : equality> = -class end + class end type Class12<'T when 'T : delegate<obj * System.EventArgs, unit>> = -class end + class end type Class13<'T when 'T : unmanaged> = -class end + class end // Member constraints with two type parameters // Most often used with static type parameters in inline functions let inline add(value1 : ^T when ^T : (static member (+) : ^T * ^T -> ^T), value2: ^T) = -value1 + value2 + value1 + value2 // ^T and ^U must support operator + let inline heterogenousAdd(value1 : ^T when (^T or ^U) : (static member (+) : ^T * ^U -> ^T), value2 : ^U) = -value1 + value2 + value1 + value2 // If there are multiple constraints, use the and keyword to separate them. type Class14<'T,'U when 'T : equality and 'U : equality> = -class end + class end ``` ## See also diff --git a/docs/fsharp/language-reference/generics/statically-resolved-type-parameters.md b/docs/fsharp/language-reference/generics/statically-resolved-type-parameters.md index be868fb502b9a..2a025f3143064 100644 --- a/docs/fsharp/language-reference/generics/statically-resolved-type-parameters.md +++ b/docs/fsharp/language-reference/generics/statically-resolved-type-parameters.md @@ -5,17 +5,23 @@ ms.date: 05/16/2016 --- # Statically Resolved Type Parameters -A *statically resolved type parameter* is a type parameter that is replaced with an actual type at compile time instead of at run time. They are preceded by a caret (^) symbol. +A *statically resolved type parameter* is a type parameter that is replaced with an actual type at compile time instead of at run time. ## Syntax +```fsharp +'type-parameter +``` + +Up to version 7.0 of F#, one had to use the following syntax + ```fsharp ^type-parameter ``` ## Remarks -In F#, there are two distinct kinds of type parameters. The first kind is the standard generic type parameter. These are indicated by an apostrophe ('), as in `'T` and `'U`. They are equivalent to generic type parameters in other .NET Framework languages. The other kind is statically resolved and is indicated by a caret symbol, as in `^T` and `^U`. +In F#, there are two distinct kinds of type parameters. The first kind is the standard generic type parameter. They are equivalent to generic type parameters in other .Net languages. The other kind is statically resolved and can only be used in inlined functions. Statically resolved type parameters are primarily useful in conjunction with member constraints, which are constraints that allow you to specify that a type argument must have a particular member or members in order to be used. There is no way to create this kind of constraint by using a regular generic type parameter. @@ -23,7 +29,6 @@ The following table summarizes the similarities and differences between the two |Feature|Generic|Statically resolved| |-------|-------|-------------------| -|Syntax|`'T`, `'U`|`^T`, `^U`| |Resolution time|Run time|Compile time| |Member constraints|Cannot be used with member constraints.|Can be used with member constraints.| |Code generation|A type (or method) with standard generic type parameters results in the generation of a single generic type or method.|Multiple instantiations of types and methods are generated, one for each type that is needed.| @@ -39,9 +44,9 @@ Inline methods and functions that use operators, or use other functions that hav The resolved type of `(+@)` is based on the use of both `(+)` and `(*)`, both of which cause type inference to infer member constraints on the statically resolved type parameters. The resolved type, as shown in the F# interpreter, is as follows. ```fsharp -^a -> ^c -> ^d -when (^a or ^b) : (static member ( + ) : ^a * ^b -> ^d) and -(^a or ^c) : (static member ( * ) : ^a * ^c -> ^b) +'a -> 'c -> 'd +when ('a or 'b) : (static member ( + ) : 'a * 'b -> 'd) and +('a or 'c) : (static member ( * ) : 'a * 'c -> 'b) ``` The output is as follows. @@ -51,7 +56,24 @@ The output is as follows. 1.500000 ``` -Starting with F# 4.1, you can also specify concrete type names in statically resolved type parameter signatures. In previous versions of the language, the type name was inferred by the compiler, but could not be specified in the signature. As of F# 4.1, you may also specify concrete type names in statically resolved type parameter signatures. Here's an example: +The following example illustrates the usage of SRTPs with methods and static methods: + +```fsharp +type Record = + { Number: int } + member this.Double() = { Number = this.Number * 2 } + static member Zero() = { Number = 0 } + +let inline double<'a when 'a:(member Double: unit -> 'a)> (x: 'a) = x.Double() +let inline zero<'a when 'a:(static member Zero: unit -> 'a)> () = 'a.Zero() + +let r: Record = zero () +let doubleR = double r +``` + +Starting with F# 7.0, you can use `'a.Zero()` instead of having to repeat the constraint as in the example below. + +Starting with F# 4.1, you can also specify concrete type names in statically resolved type parameter signatures. In previous versions of the language, the type name was inferred by the compiler, but could not be specified in the signature. As of F# 4.1, you may also specify concrete type names in statically resolved type parameter signatures. Here's an example (please not that in this example, `^` must still be used because the simplification to use `'` is not supported): ```fsharp let inline konst x _ = x diff --git a/docs/fsharp/language-reference/options.md b/docs/fsharp/language-reference/options.md index 63772ba6713d8..b7184b5223c80 100644 --- a/docs/fsharp/language-reference/options.md +++ b/docs/fsharp/language-reference/options.md @@ -43,11 +43,11 @@ The option type supports the following properties and methods. |Property or method|Type|Description| |------------------|----|-----------| -|[None](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-fsharpoption-1.html#None)|`'T option`|A static property that enables you to create an option value that has the `None` value.| -|[IsNone](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-fsharpoption-1.html#IsNone)|`bool`|Returns `true` if the option has the `None` value.| -|[IsSome](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-fsharpoption-1.html#IsSome)|`bool`|Returns `true` if the option has a value that is not `None`.| -|[Some](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-fsharpoption-1.html#Some)|`'T option`|A static member that creates an option that has a value that is not `None`.| -|[Value](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-fsharpoption-1.html#Value)|`'T`|Returns the underlying value, or throws a `System.NullReferenceException` if the value is `None`.| +|`None`|`'T option`|A static member that creates an option value that has the `None` value.| +|[IsNone](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-option-1.html#IsNone)|`bool`|Returns `true` if the option has the `None` value.| +|[IsSome](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-option-1.html#IsSome)|`bool`|Returns `true` if the option has a value that is not `None`.| +|`Some`|`'T option`|A static member that creates an option that has a value that is not `None`.| +|[Value](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-option-1.html#Value)|`'T`|Returns the underlying value, or throws a `System.NullReferenceException` if the value is `None`.| ## Option Module diff --git a/docs/fsharp/language-reference/reference-cells.md b/docs/fsharp/language-reference/reference-cells.md index bfa458cc93b1b..aba1f6897689b 100644 --- a/docs/fsharp/language-reference/reference-cells.md +++ b/docs/fsharp/language-reference/reference-cells.md @@ -15,23 +15,24 @@ ref expression ## Remarks -You use the `ref` operator before a value to create a new reference cell that encapsulates the value. You can then change the underlying value because it is mutable. - -A reference cell holds an actual value; it is not just an address. When you create a reference cell by using the `ref` operator, you create a copy of the underlying value as an encapsulated mutable value. - -You can dereference a reference cell by using the `!` (bang) operator. +You use the `ref` function to create a new reference cell with an initial value. You can then change the underlying value because it is mutable. A reference cell holds an actual value; it is not just an address. The following code example illustrates the declaration and use of reference cells. -[!code-fsharp[Main](~/samples/snippets/fsharp/lang-ref-1/snippet2201.fs)] +[!code-fsharp[Main](~/samples/snippets/fsharp/lang-ref-1/snippet2203.fs)] -The output is `50`. +The output is as follows. + +```console +10 +11 +``` Reference cells are instances of the `Ref` generic record type, which is declared as follows. ```fsharp type Ref<'a> = -{ mutable contents: 'a } + { mutable contents: 'a } ``` The type `'a ref` is a synonym for `Ref<'a>`. The compiler and IntelliSense in the IDE display the former for this type, but the underlying definition is the latter. @@ -46,32 +47,26 @@ The following table shows the features that are available on the reference cell. |Operator, member, or field|Description|Type|Definition| |--------------------------|-----------|----|----------| -|`!` (dereference operator)|Returns the underlying value.|`'a ref -> 'a`|`let (!) r = r.contents`| -|`:=` (assignment operator)|Changes the underlying value.|`'a ref -> 'a -> unit`|`let (:=) r x = r.contents <- x`| |`ref` (operator)|Encapsulates a value into a new reference cell.|`'a -> 'a ref`|`let ref x = { contents = x }`| |`Value` (property)|Gets or sets the underlying value.|`unit -> 'a`|`member x.Value = x.contents`| -|`contents` (record field)|Gets or sets the underlying value.|`'a`|`let ref x = { contents = x }`| -There are several ways to access the underlying value. The value returned by the dereference operator (`!`) is not an assignable value. Therefore, if you are modifying the underlying value, you must use the assignment operator (`:=`) instead. +C# programmers should know that `ref` in C# is not the same thing as `ref` in F#. The equivalent constructs in F# are [byrefs](byrefs.md), which are a different concept from reference cells. -Both the `Value` property and the `contents` field are assignable values. Therefore, you can use these to either access or change the underlying value, as shown in the following code. +Values marked as `mutable` may be automatically promoted to `'a ref` if captured by a closure; see [Values](./values/index.md). -[!code-fsharp[Main](~/samples/snippets/fsharp/lang-ref-1/snippet2203.fs)] +## Deprecated constructs -The output is as follows. +Since F# 6.0, the following operators are deprecated and their use gives informational warnings: -```console -10 -10 -11 -12 -``` - -The field `contents` is provided for compatibility with other versions of ML and will produce a warning during compilation. To disable the warning, use the `--mlcompatibility` compiler option. For more information, see [Compiler Options](compiler-options.md). +|Operator, member, or field|Description|Type|Definition| +|--------------------------|-----------|----|----------| +|`!` (dereference operator, deprecated)|Returns the underlying value.|`'a ref -> 'a`|`let (!) r = r.contents`| +|`:=` (assignment operator, deprecated)|Changes the underlying value.|`'a ref -> 'a -> unit`|`let (:=) r x = r.contents <- x`| +|`contents` (record field)|Gets or sets the underlying value.|`'a`|`let ref x = { contents = x }`| -C# programmers should know that `ref` in C# is not the same thing as `ref` in F#. The equivalent constructs in F# are [byrefs](byrefs.md), which are a different concept from reference cells. +Instead, the direct use of `.Value` is preferred; see [F# RFC FS-1111](https://aka.ms/fsharp-refcell-ops). -Values marked as `mutable`may be automatically promoted to `'a ref` if captured by a closure; see [Values](./values/index.md). +The field `contents` is provided for compatibility with other versions of ML and will produce a warning during compilation. To disable the warning, use the `--mlcompatibility` compiler option. For more information, see [Compiler Options](compiler-options.md). ## See also @@ -79,3 +74,4 @@ Values marked as `mutable`may be automatically promoted to `'a ref` if captured - [Parameters and Arguments](parameters-and-arguments.md) - [Symbol and Operator Reference](./symbol-and-operator-reference/index.md) - [Values](./values/index.md) +- [F# RFC FS-1111](https://aka.ms/fsharp-refcell-ops) diff --git a/docs/fsharp/language-reference/xml-documentation.md b/docs/fsharp/language-reference/xml-documentation.md index 8a828ed3b970c..dd67082d24876 100644 --- a/docs/fsharp/language-reference/xml-documentation.md +++ b/docs/fsharp/language-reference/xml-documentation.md @@ -47,7 +47,7 @@ The following example shows the alternative method, without XML tags. In this ex ## Comments with XML tags If a comment body begins with `<` (normally `<summary>`), then it is treated as an XML formatted comment -body using XML tags. This second enables you to specify separate notes +body using XML tags. This second way enables you to specify separate notes for a short summary, additional remarks, documentation for each parameter and type parameter and exceptions thrown, and a description of the return value. The following is a typical XML documentation comment in a signature file: diff --git a/docs/fsharp/strategy.md b/docs/fsharp/strategy.md new file mode 100644 index 0000000000000..b6a548c34a88e --- /dev/null +++ b/docs/fsharp/strategy.md @@ -0,0 +1,28 @@ +--- +title: F# language strategy +description: We will drive F# evolution and support the F# ecosystem with language leadership and governance. We will encourage community contributions to improve the F# language and developer experience. +ms.date: 02/06/2023 +--- +# Annotated F# strategy + +[!INCLUDE [Fsharp](../../includes/fsharp-strategy.md)] + +## How strategy guides F\# + +The F# strategy guides our decisions about F# evolution, and these annotations provide insight into how we think about key statements. + +> "support the F# ecosystem with language leadership and governance" + +The F# community makes significant contributions to F#. We support this by doing almost all technical decision making via GitHub and holding public compiler design sessions. We also provide architectural direction and aid users wishing to contribute. F# is delivered as part of the .NET SDK. + +> "rely on community to provide important libraries, developer tools and workload support" + +The F# community provides many libraries and tools that solve a variety of developer challenges. Offerings include libraries for .NET front end applications and JavaScript transpilers that enable you to write full stack applications in F#. The community also provides developer tools for editing, code formatting, and linting. + +> "F# will support .NET platform improvements and maintain interoperability with new C# features" + +We know F# developers want to use the latest .NET features and that many projects and programmers embrace both F# and C#. We evolve F# to work well with C# and take advantage of new .NET runtime and library improvements. + +> "lower the barrier to entry into F# for new developers and organizations" + +Simplifying F# makes it easier for new developers to learn and for experienced programmers to get their job done. Improving the approachability of F# includes ongoing efforts to rephrase error messages and simplifying language features. diff --git a/docs/fsharp/style-guide/formatting.md b/docs/fsharp/style-guide/formatting.md index 30974644b2962..2ba67d1779198 100644 --- a/docs/fsharp/style-guide/formatting.md +++ b/docs/fsharp/style-guide/formatting.md @@ -626,8 +626,8 @@ list[..^1] Indentation of conditionals depends on the size and complexity of the expressions that make them up. Write them on one line when: -- `cond`, `e1`, and `e2` are short -- `e1` and `e2` are not `if/then/else` expressions themselves. +* `cond`, `e1`, and `e2` are short. +* `e1` and `e2` are not `if/then/else` expressions themselves. ```fsharp // ✔️ OK @@ -646,14 +646,21 @@ if a then if a then () ``` -If any of the expressions are multi-line or `if/then/else` expressions. +If any of the expressions are multi-line, each conditional branch should be multi-line. ```fsharp // ✔️ OK if cond then + let e1 = something() e1 else e2 + +// ❌ Not OK +if cond then + let e1 = something() + e1 +else e2 ``` Multiple conditionals with `elif` and `else` are indented at the same scope as the `if` when they follow the rules of the one line `if/then/else` expressions. @@ -671,6 +678,7 @@ If any of the conditions or expressions is multi-line, the entire `if/then/else` ```fsharp // ✔️ OK if cond1 then + let e1 = something() e1 elif cond2 then e2 @@ -678,6 +686,14 @@ elif cond3 then e3 else e4 + +// ❌ Not OK +if cond1 then + let e1 = something() + e1 +elif cond2 then e2 +elif cond3 then e3 +else e4 ``` If a condition is multiline or exceeds the default tolerance of the single-line, the condition expression should use one indentation and a new line. @@ -808,7 +824,90 @@ let pascalsTriangle = [| 1; 8; 28; 56; 70; 56; 28; 8; 1 |] |] ``` -And as with records, declaring the opening and closing brackets on their own line will make moving code around and piping into functions easier. +As with records, declaring the opening and closing brackets on their own line will make moving code around and piping into functions easier: + +```fsharp +// ✔️ OK +let pascalsTriangle = + [| + [| 1 |] + [| 1; 1 |] + [| 1; 2; 1 |] + [| 1; 3; 3; 1 |] + [| 1; 4; 6; 4; 1 |] + [| 1; 5; 10; 10; 5; 1 |] + [| 1; 6; 15; 20; 15; 6; 1 |] + [| 1; 7; 21; 35; 35; 21; 7; 1 |] + [| 1; 8; 28; 56; 70; 56; 28; 8; 1 |] + |] +``` + +If a list or array expression is the right-hand side of a binding, you may prefer to use `Stroustrup` style: + +```fsharp +// ✔️ OK +let pascalsTriangle = [| + [| 1 |] + [| 1; 1 |] + [| 1; 2; 1 |] + [| 1; 3; 3; 1 |] + [| 1; 4; 6; 4; 1 |] + [| 1; 5; 10; 10; 5; 1 |] + [| 1; 6; 15; 20; 15; 6; 1 |] + [| 1; 7; 21; 35; 35; 21; 7; 1 |] + [| 1; 8; 28; 56; 70; 56; 28; 8; 1 |] +|] +``` + +However, when a list or array expression is *not* the right-hand side of a binding, such as when it's inside of another list or array, if that inner expression needs to span multiple lines, the brackets should go on their own lines: + +```fsharp +// ✔️ OK - The outer list follows `Stroustrup` style, while the inner lists place their brackets on separate lines +let fn a b = [ + [ + someReallyLongValueThatWouldForceThisListToSpanMultipleLines + a + ] + [ + b + someReallyLongValueThatWouldForceThisListToSpanMultipleLines + ] +] + +// ❌ Not okay +let fn a b = [ [ + someReallyLongValueThatWouldForceThisListToSpanMultipleLines + a +]; [ + b + someReallyLongValueThatWouldForceThisListToSpanMultipleLines +] ] +``` + +The same rule applies for record types inside of arrays/lists: + +```fsharp +// ✔️ OK - The outer list follows `Stroustrup` style, while the inner lists place their brackets on separate lines +let fn a b = [ + { + Foo = someReallyLongValueThatWouldForceThisListToSpanMultipleLines + Bar = a + } + { + Foo = b + Bar = someReallyLongValueThatWouldForceThisListToSpanMultipleLines + } +] + +// ❌ Not okay +let fn a b = [ { + Foo = someReallyLongValueThatWouldForceThisListToSpanMultipleLines + Bar = a +}; { + Foo = b + Bar = someReallyLongValueThatWouldForceThisListToSpanMultipleLines +} ] +``` When generating arrays and lists programmatically, prefer `->` over `do ... yield` when a value is always generated: @@ -870,40 +969,45 @@ let rainbow = Lackeys = ["Zippy"; "George"; "Bungle"] } ``` -Long record field expressions should use a new line and have one indent from the opening `{`: +#### Multiline bracket formatting styles -```fsharp -{ A = a - B = - someFunctionCall - arg1 - arg2 - // ... - argX - C = c } -``` +For records that span multiple lines, there are three commonly used formatting styles: `Cramped`, `Aligned`, and `Stroustrup`. The `Cramped` style has been the default style for F# code, as it tends to favor styles that allow the compiler to easily parse code. Both `Aligned` and `Stroustrup` styles allow for easier reordering of members, leading to code that may be easier to refactor, with the drawback that certain situations may require slightly more verbose code. -Placing the `{` and `}` on new lines with contents indented is possible, however code formatters may reformat this by default: +* `Cramped`: +The historical standard, and default F# record format. Opening brackets go on the same line as the first member, closing bracket on the same line as the last member. -```fsharp -// ✔️ OK -let rainbow = - { Boss1 = "Jeffrey" - Boss2 = "Jeffrey" - Boss3 = "Jeffrey" - Lackeys = ["Zippy"; "George"; "Bungle"] } + ```fsharp + let rainbow = + { Boss1 = "Jeffrey" + Boss2 = "Jeffrey" + Boss3 = "Jeffrey" + Lackeys = [ "Zippy"; "George"; "Bungle" ] } + ``` -// ❌ Not preferred, code formatters will reformat to the above by default -let rainbow = - { +* `Aligned`: Brackets each get their own line, aligned on the same column. + + ```fsharp + let rainbow = + { + Boss1 = "Jeffrey" + Boss2 = "Jeffrey" + Boss3 = "Jeffrey" + Lackeys = ["Zippy"; "George"; "Bungle"] + } + ``` + +* `Stroustrup`: Opening bracket goes on the same line as the binding, closing bracket gets its own line. + + ```fsharp + let rainbow = { Boss1 = "Jeffrey" Boss2 = "Jeffrey" Boss3 = "Jeffrey" - Lackeys = ["Zippy"; "George"; "Bungle"] + Lackeys = [ "Zippy"; "George"; "Bungle" ] } -``` + ``` -The same rules apply for list and array elements. +The same formatting style rules apply for list and array elements. ### Formatting copy-and-update record expressions @@ -916,35 +1020,58 @@ Short expressions can fit on one line: let point2 = { point with X = 1; Y = 2 } ``` -Longer expressions should use new lines: - -```fsharp -// ✔️ OK -let rainbow2 = - { rainbow with - Boss = "Jeffrey" - Lackeys = [ "Zippy"; "George"; "Bungle" ] } -``` - -You may want to dedicate separate lines for the braces and indent one scope to the right with the expression, however -code formatters may reformat it. In some special cases, such as wrapping a value with an optional without parentheses, you may need to keep a brace on one line: +Longer expressions should use new lines, and format based on one of the above-named conventions: ```fsharp -// ✔️ OK +// ✔️ OK - Cramped let newState = { state with - Foo = Some { F1 = 0; F2 = "" } } - -// ❌ Not OK, code formatters will reformat to the above by default -let newState = + Foo = + Some + { F1 = 0 + F2 = "" } } + +// ✔️ OK - Aligned +let newState = { state with Foo = - Some { - F1 = 0 - F2 = "" - } + Some + { + F1 = 0 + F2 = "" + } } + +// ✔️ OK - Stroustrup +let newState = { + state with + Foo = + Some { + F1 = 0 + F2 = "" + } +} +``` + +**Note**: If using `Stroustrup` style for copy-and-update expressions, you *must* indent members further than the copied record name: + +```fsharp +// ✔️ OK +let bilbo = { + hobbit with + Name = "Bilbo" + Age = 111 + Region = "The Shire" +} + +// ❌ Not OK - Results in compiler error: "Possible incorrect indentation: this token is offside of context started at position" +let bilbo = { + hobbit with + Name = "Bilbo" + Age = 111 + Region = "The Shire" +} ``` ### Formatting pattern matching @@ -1161,6 +1288,18 @@ let comparer = reversed.CompareTo (rev s2) } ``` +You may also prefer to use `Stroustrup` style: + +```fsharp +let comparer = { + new IComparer<string> with + member x.Compare(s1, s2) = + let rev (s: String) = new String(Array.rev (s.ToCharArray())) + let reversed = rev s1 + reversed.CompareTo(rev s2) +} +``` + ### Formatting index/slice expressions Index expressions shouldn't contain any spaces around the opening and closing brackets. @@ -1352,9 +1491,9 @@ let thisFunction() = ### Formatting let and member declarations -When formatting `let` and `member` declarations, the right-hand side of a binding either goes on one line, or (if it's too long) goes on a new line indented one level. +When formatting `let` and `member` declarations, typically the right-hand side of a binding either goes on one line, or (if it's too long) goes on a new line indented one level. -For example, the following are compliant: +For example, the following examples are compliant: ```fsharp // ✔️ OK @@ -1383,7 +1522,7 @@ let d = printfn "%A" x ``` -The following are non-compliant: +These are non-compliant: ```fsharp // ❌ Not OK, code formatters will reformat to the above by default @@ -1391,20 +1530,31 @@ let a = """ foobar, long string """ -type File = - member this.SaveAsync(path: string) : Async<unit> = async { - // IO operation - return () +let d = while f do + printfn "%A" x +``` + +Record type instantiations may also place the brackets on their own lines: + +```fsharp +// ✔️ OK +let bilbo = + { + Name = "Bilbo" + Age = 111 + Region = "The Shire" } +``` + +You may also prefer to use `Stroustrup` style, with the opening `{` on the same line as the binding name: -let c = { +```fsharp +// ✔️ OK +let bilbo = { Name = "Bilbo" Age = 111 Region = "The Shire" } - -let d = while f do - printfn "%A" x ``` Separate members with a single blank line and document and add a documentation comment: @@ -1533,7 +1683,7 @@ For any custom operator that starts with `*` and that has more than one characte ### Formatting record declarations -For record declarations, indent `{` in type definition by four spaces, start the field list on the same line and align any members with the `{` token: +For record declarations, by default you should indent the `{` in the type definition by four spaces, start the label list on the same line, and align members, if any, with the `{` token: ```fsharp // ✔️ OK @@ -1541,26 +1691,108 @@ type PostalAddress = { Address: string City: string Zip: string } - member x.ZipAndCity = $"{x.Zip} {x.City}" ``` -Don't place the `{` at the end of the type declaration line, and don't use `with`/`end` for members, which are redundant. +It is also common to prefer putting brackets on their own line, with labels indented by an additional four spaces: ```fsharp -// ❌ Not OK, code formatters will reformat to the above by default +// ✔️ OK +type PostalAddress = + { + Address: string + City: string + Zip: string + } +``` + +You can also put the `{` at the end of the first line of the type definition (`Stroustrup` style): + +```fsharp +// ✔️ OK type PostalAddress = { Address: string City: string Zip: string - } +} +``` + +If additional members are needed, don't use `with`/`end` whenever possible: + +```fsharp +// ✔️ OK +type PostalAddress = + { Address: string + City: string + Zip: string } + member x.ZipAndCity = $"{x.Zip} {x.City}" + +// ❌ Not OK, code formatters will reformat to the above by default +type PostalAddress = + { Address: string + City: string + Zip: string } with member x.ZipAndCity = $"{x.Zip} {x.City}" end + +// ✔️ OK +type PostalAddress = + { + Address: string + City: string + Zip: string + } + member x.ZipAndCity = $"{x.Zip} {x.City}" + +// ❌ Not OK, code formatters will reformat to the above by default +type PostalAddress = + { + Address: string + City: string + Zip: string + } + with + member x.ZipAndCity = $"{x.Zip} {x.City}" + end +``` + +The exception to this style rule is if you format records according to the `Stroustrup` style. In this situation, due to compiler rules, the `with` keyword is required if you want to implement an interface or add additional members: + +```fsharp +// ✔️ OK +type PostalAddress = { + Address: string + City: string + Zip: string +} with + member x.ZipAndCity = $"{x.Zip} {x.City}" + +// ❌ Not OK, this is currently invalid F# code +type PostalAddress = { + Address: string + City: string + Zip: string +} +member x.ZipAndCity = $"{x.Zip} {x.City}" ``` -When XML documentation is added for record fields, it becomes normal to indent and add whitespace: +When XML documentation is added for record fields, `Aligned` or `Stroustrup` style is preferred, and additional whitespace should be added between members: ```fsharp +// ❌ Not OK - putting { and comments on the same line should be avoided +type PostalAddress = + { /// The address + Address: string + + /// The city + City: string + + /// The zip code + Zip: string } + + /// Format the zip code and the city + member x.ZipAndCity = $"{x.Zip} {x.City}" + // ✔️ OK type PostalAddress = { @@ -1576,6 +1808,20 @@ type PostalAddress = /// Format the zip code and the city member x.ZipAndCity = $"{x.Zip} {x.City}" + +// ✔️ OK - Stroustrup Style +type PostalAddress = { + /// The address + Address: string + + /// The city + City: string + + /// The zip code + Zip: string +} with + /// Format the zip code and the city + member x.ZipAndCity = $"{x.Zip} {x.City}" ``` Placing the opening token on a new line and the closing token on a new line is preferable if you're declaring interface implementations or members on the record: @@ -1597,6 +1843,7 @@ type PostalAddress = member x.ZipAndCity = $"{x.Zip} {x.City}" +// ✔️ OK type MyRecord = { /// The record field @@ -1605,6 +1852,8 @@ type MyRecord = interface IMyInterface ``` +These same rules apply for anonymous record type aliases. + ### Formatting discriminated union declarations For discriminated union declarations, indent `|` in type definition by four spaces: @@ -1803,6 +2052,31 @@ let myNumber = The domain that's being modeled should ultimately drive the naming convention. If it's idiomatic to use a different convention, that convention should be used instead. +If the return value of an expression is a computation expression, prefer putting the computation expression keyword name on its own line: + +```fsharp +// ✔️ OK +let foo () = + async { + let! value = getValue() + do! somethingElse() + return! anotherOperation value + } +``` + +You may also prefer to put the computation expression on the same line as the binding name: + +```fsharp +// ✔️ OK +let foo () = async { + let! value = getValue() + do! somethingElse() + return! anotherOperation value +} +``` + +Whichever your preference, you should aim to remain consistent throughout your codebase. Formatters may allow you to specify this preference to remain consistent. + ## Formatting types and type annotations This section discusses formatting types and type annotations. This includes formatting signature files with the `.fsi` extension. @@ -1900,6 +2174,18 @@ type Sample end ``` +For inline anonymous record types, you may also use `Stroustrup` style: + +```fsharp +let f + (x: {| + x: int + y: AReallyLongTypeThatIsMuchLongerThan40Characters + |}) + = + x +``` + ### Formatting return type annotations In function or member return type annotations, use white space before and after the `:` symbol: @@ -2021,7 +2307,7 @@ If both generic type arguments/constraints and function parameters don’t fit, ```fsharp // ✔️ OK -let f<'T1, 'T2 when 'T1 : equality and 'T2 : comparison> +let f<'T1, 'T2 when 'T1: equality and 'T2: comparison> param = // function body @@ -2032,9 +2318,9 @@ If the type parameters or constraints are too long, break and align them as show ```fsharp // ✔️ OK let inline f< ^T1, ^T2 - when ^T1 : (static member Foo1: unit -> ^T2) - and ^T2 : (member Foo2: unit -> int) - and ^T2 : (member Foo3: string -> ^T1 option)> + when ^T1: (static member Foo1: unit -> ^T2) + and ^T2: (member Foo2: unit -> int) + and ^T2: (member Foo3: string -> ^T1 option)> arg1 arg2 = @@ -2045,10 +2331,10 @@ If the type parameters/constraints are broken up, but there are no normal functi ```f# // ✔️ OK -let inline f<^T1, ^T2 - when ^T1 : (static member Foo1: unit -> ^T2) - and ^T2 : (member Foo2: unit -> int) - and ^T2 : (member Foo3: string -> ^T1 option)> +let inline f< ^T1, ^T2 + when ^T1: (static member Foo1: unit -> ^T2) + and ^T2: (member Foo2: unit -> int) + and ^T2: (member Foo3: string -> ^T1 option)> = // function body ``` @@ -2123,14 +2409,14 @@ And put it on the next line, indented by one level, if it is long or multiline. ```fsharp type BaseClass = - val string1 : string + val string1: string new () = { string1 = "" } new (str) = { string1 = str } type DerivedClass = inherit BaseClass - val string2 : string + val string2: string new (str1, str2) = { inherit BaseClass(str1); string2 = str2 } new () = { inherit diff --git a/docs/fsharp/toc.yml b/docs/fsharp/toc.yml index 0205dda5080ae..b122094e4a429 100644 --- a/docs/fsharp/toc.yml +++ b/docs/fsharp/toc.yml @@ -3,6 +3,8 @@ items: href: index.yml - name: What is F# href: what-is-fsharp.md +- name: F# language strategy + href: strategy.md - name: Get started href: get-started/index.md items: diff --git a/docs/fsharp/tutorials/async.md b/docs/fsharp/tutorials/async.md index c4a8d5d0dad65..624dc75e58a54 100644 --- a/docs/fsharp/tutorials/async.md +++ b/docs/fsharp/tutorials/async.md @@ -330,7 +330,7 @@ What to watch out for: ### Interoperate with .NET -If using `async { }` programming, you may need to interoperate with a .NET library or C# codebase that uses [async/await](../../csharp/programming-guide/concepts/async/index.md)-style asynchronous programming. Because C# and the majority of .NET libraries use the <xref:System.Threading.Tasks.Task%601> and <xref:System.Threading.Tasks.Task> types as their core abstractions this may change how you write your F# asynchronous code. +If using `async { }` programming, you may need to interoperate with a .NET library or C# codebase that uses [async/await](../../csharp/language-reference/keywords/async.md)-style asynchronous programming. Because C# and the majority of .NET libraries use the <xref:System.Threading.Tasks.Task%601> and <xref:System.Threading.Tasks.Task> types as their core abstractions this may change how you write your F# asynchronous code. One option is to switch to writing .NET tasks directly using `task { }`. Alternatively, you can use the `Async.AwaitTask` function to await a .NET asynchronous computation: diff --git a/docs/fsharp/tutorials/type-providers/troubleshooting-type-providers.md b/docs/fsharp/tutorials/type-providers/troubleshooting-type-providers.md index decf29ba56e3e..b1caa39a608bd 100644 --- a/docs/fsharp/tutorials/type-providers/troubleshooting-type-providers.md +++ b/docs/fsharp/tutorials/type-providers/troubleshooting-type-providers.md @@ -14,7 +14,7 @@ If you encounter a problem when you work with type providers, you can review the |Problem|Suggested Actions| |-------|-----------------| |**Schema Changes**. Type providers work best when the data source schema is stable. If you add a data table or column or make another change to that schema, the type provider doesn’t automatically recognize these changes.|Clean or rebuild the project. To clean the project, choose **Build**, **Clean** *ProjectName* on the menu bar. To rebuild the project, choose **Build**, **Rebuild** *ProjectName* on the menu bar. These actions reset all type provider state and force the provider to reconnect to the data source and obtain updated schema information.| -|**Connection Failure**. The URL or connection string is incorrect, the network is down, or the data source or service is unavailable.|For a web service or OData service, you can try the URL in Internet Explorer to verify whether the URL is correct and the service is available. For a database connection string, you can use the data connection tools in **Server Explorer** to verify whether the connection string is valid and the database is available. After you restore your connection, you should then clean or rebuild the project so that the type provider will reconnect to the network.| +|**Connection Failure**. The URL or connection string is incorrect, the network is down, or the data source or service is unavailable.|For a web service or OData service, you can try the URL in a browser to verify whether the URL is correct and the service is available. For a database connection string, you can use the data connection tools in **Server Explorer** to verify whether the connection string is valid and the database is available. After you restore your connection, you should then clean or rebuild the project so that the type provider will reconnect to the network.| |**Not Valid Credentials**. You must have valid permissions for the data source or web service.|For a SQL connection, the username and the password that are specified in the connection string or configuration file must be valid for the database. If you are using Windows Authentication, you must have access to the database. The database administrator can identify what permissions you need for access to each database and each element within a database.<br /><br />For a web service or a data service, you must have appropriate credentials. Most type providers provide a DataContext object, which contains a Credentials property that you can set with the appropriate username and access key.| |**Not Valid Path**. A path to a file was not valid.|Verify whether the path is correct and the file exists. In addition, you must either quote any backslashes in the path appropriately or use a verbatim string or triple-quoted string.| diff --git a/docs/fsharp/whats-new/fsharp-50.md b/docs/fsharp/whats-new/fsharp-50.md index 53a9b0838967c..397b5600c052f 100644 --- a/docs/fsharp/whats-new/fsharp-50.md +++ b/docs/fsharp/whats-new/fsharp-50.md @@ -362,7 +362,7 @@ This feature implements [F# RFC FS-1031](https://github.com/fsharp/fslang-design ## Default interface member consumption -F# 5 lets you consume [interfaces with default implementations](../../csharp/tutorials/default-interface-methods-versions.md). +F# 5 lets you consume [interfaces with default implementations](../../csharp/advanced-topics/interface-implementation/default-interface-methods-versions.md). Consider an interface defined in C# like this: diff --git a/docs/fsharp/whats-new/fsharp-6.md b/docs/fsharp/whats-new/fsharp-6.md index fec6ba8f2e0cb..d34803512befe 100644 --- a/docs/fsharp/whats-new/fsharp-6.md +++ b/docs/fsharp/whats-new/fsharp-6.md @@ -86,7 +86,7 @@ This feature implements [F# RFC FS-1039](https://github.com/fsharp/fslang-design ## Overloaded custom operations in computation expressions -F# 6 lets you consume [interfaces with default implementations](../../csharp/tutorials/default-interface-methods-versions.md). +F# 6 lets you use [CustomOperationAttribute](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-customoperationattribute.html) on the overloaded methods. Consider the following use of a computation expression builder `content`: @@ -354,10 +354,10 @@ Then after inlining and other optimizations, the code becomes: ```fsharp let arr = [| 1.. 100 |] let mutable sum = 0 -for j = 0 to array.Length-1 do - sum <- array[i] + x -for j = 0 to array.Length-1 do - sum <- array[i] + x +for j = 0 to arr.Length-1 do + sum <- sum + arr[j] +for j = 0 to arr.Length-1 do + sum <- sum + arr[j] ``` Unlike previous versions of F#, this optimization is applied regardless of the size of the lambda expression involved. This feature can also be used to implement loop unrolling and similar transformations more reliably. diff --git a/docs/fundamentals/code-analysis/overview.md b/docs/fundamentals/code-analysis/overview.md index fab0800d2db39..27846822674fd 100644 --- a/docs/fundamentals/code-analysis/overview.md +++ b/docs/fundamentals/code-analysis/overview.md @@ -176,9 +176,6 @@ Follow these steps to enable code-style analysis on build: dotnet_diagnostic.IDE0040.severity = silent ``` -> [!NOTE] -> The code-style analysis feature is experimental and may change between the .NET 5 and .NET 6 releases. - ## Suppress a warning One way to suppress a rule violation is to set the severity option for that rule ID to `none` in an EditorConfig file. For example: diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1501.md b/docs/fundamentals/code-analysis/quality-rules/ca1501.md index 25b47f798bc2a..52a860fbcdba1 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1501.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1501.md @@ -22,24 +22,28 @@ dev_langs: | **Rule ID** | CA1501 | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | +| **Default threshold** | 5 | ## Cause -A type is more than four levels deep in its inheritance hierarchy. - -By default, the rule only excludes types from the `System` namespace, but this is [configurable](#configure-code-to-analyze). +A type is five or more levels deep in its inheritance hierarchy. ## Rule description Deeply nested type hierarchies can be difficult to follow, understand, and maintain. This rule limits analysis to hierarchies in the same module. +You can configure this rule in the following ways: + +- By default, the rule excludes types from the `System` namespace. You can configure the rule to [exclude other types or namespaces](#configure-code-to-analyze) as well. +- You can [configure the inheritance tree depth](#configure-threshold) at which this rule fires. + ## How to fix violations To fix a violation of this rule, derive the type from a base type that is less deep in the inheritance hierarchy or eliminate some of the intermediate base types. ## When to suppress warnings -It is safe to suppress a warning from this rule. However, the code might be more difficult to maintain. Depending on the visibility of base types, resolving violations of this rule might create breaking changes. For example, removing public base types is a breaking change. +It's safe to suppress a warning from this rule. However, the code might be more difficult to maintain. Depending on the visibility of base types, resolving violations of this rule might create breaking changes. For example, removing public base types is a breaking change. > [!NOTE] > You might see false positive warnings from this rule if all of the following apply: @@ -75,6 +79,28 @@ dotnet_analyzer_diagnostic.category-Maintainability.severity = none For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). +## Configure threshold + +You can configure the threshold at which this rule fires. + +1. Create a text file named *CodeMetricsConfig.txt*. + +2. Add the desired threshold to the text file in the following format: + + ```txt + CA1501: 8 + ``` + + In this example, the rule is configured to fire when a type is eight or more levels deep in its inheritance hierarchy. + +3. In the project file, mark the build action of the configuration file as [**AdditionalFiles**](/visualstudio/ide/build-actions#build-action-values). For example: + + ```xml + <ItemGroup> + <AdditionalFiles Include="CodeMetricsConfig.txt" /> + </ItemGroup> + ``` + ## Configure code to analyze Use the following option to configure which parts of your codebase to run this rule on. diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1502.md b/docs/fundamentals/code-analysis/quality-rules/ca1502.md index d5b416c2d85d4..7e9a8109adaa5 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1502.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1502.md @@ -22,6 +22,7 @@ dev_langs: | **Rule ID** | CA1502 | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | +| **Default threshold** | 25 | ## Cause @@ -35,7 +36,7 @@ cyclomatic complexity = the number of edges - the number of nodes + 1 A *node* represents a logic branch point and an *edge* represents a line between nodes. -The rule reports a violation when the cyclomatic complexity is more than 25. +The rule reports a violation when the cyclomatic complexity of a method is more than 25. However, you can [configure the threshold](#configure-threshold) and also specify other kinds of symbols that the rule should analyze. You can learn more about code metrics at [Measure complexity of managed code](/visualstudio/code-quality/code-metrics-values). @@ -81,13 +82,48 @@ dotnet_analyzer_diagnostic.category-Maintainability.severity = none For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). +## Configure threshold + +You can configure the threshold at which this rule fires and the kinds of symbols to analyze. The allowable symbol kinds are: + +- `Assembly` +- `Namespace` +- `Type` +- `Method` +- `Field` +- `Event` +- `Property` + +1. Create a text file named *CodeMetricsConfig.txt*. + +2. Add the desired threshold to the text file in the following format: + + ```txt + CA1502: 10 + ``` + + In this example, the rule is configured to fire when a method's cyclomatic complexity is greater than 10. + + ```txt + CA1502(Type): 4 + ``` + + In this example, the rule is configured to fire when a type's cyclomatic complexity is greater than 4. With this configuration file, the rule would continue to report methods with a cyclomatic complexity greater than the default (25). + +3. In the project file, mark the build action of the configuration file as [**AdditionalFiles**](/visualstudio/ide/build-actions#build-action-values). For example: + + ```xml + <ItemGroup> + <AdditionalFiles Include="CodeMetricsConfig.txt" /> + </ItemGroup> + ``` + ## How cyclomatic complexity is calculated The cyclomatic complexity is calculated by adding 1 to the following: -- Number of branches (such as `if`, `while`, and `do`) - -- Number of `case` statements in a `switch` +- The number of branches (such as `if`, `while`, and `do`). +- The number of `case` statements in a `switch`. ## Examples diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1505.md b/docs/fundamentals/code-analysis/quality-rules/ca1505.md index d33d4c42dbeeb..a4cdfd3dd06e4 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1505.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1505.md @@ -19,14 +19,17 @@ ms.author: gewarren | **Rule ID** | CA1505 | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | +| **Default threshold** | 10 | ## Cause -A type or method has a low maintainability index value. +A type, method, field, property, or event has a low maintainability index value. ## Rule description -The maintainability index is calculated by using the following metrics: lines of code, program volume, and cyclomatic complexity. Program volume is a measure of the difficulty of understanding of a type or method that's based on the number of operators and operands in the code. Cyclomatic complexity is a measure of the structural complexity of the type or method. You can learn more about code metrics at [Measure complexity and maintainability of managed code](/visualstudio/code-quality/code-metrics-values). +The rule reports a violation when the maintainability index of a type, method, field, property, or event is less than 10. However, you can [configure the threshold](#configure-threshold). + +The maintainability index is calculated by using the following metrics: lines of code, program volume, and cyclomatic complexity. (*Program volume* is a measure of the difficulty of understanding of a type or method that's based on the number of operators and operands in the code. *Cyclomatic complexity* is a measure of the structural complexity of the type or method. You can learn more about code metrics at [Measure complexity and maintainability of managed code](/visualstudio/code-quality/code-metrics-values). A low maintainability index indicates that a type or method is probably difficult to maintain and would be a good candidate to redesign. @@ -72,6 +75,43 @@ dotnet_analyzer_diagnostic.category-Maintainability.severity = none For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). +## Configure threshold + +You can configure the threshold at which this rule fires and the kinds of symbols to analyze. The allowable symbol kinds are: + +- `Assembly` +- `Namespace` +- `Type` +- `Method` +- `Field` +- `Event` +- `Property` + +1. Create a text file named *CodeMetricsConfig.txt*. + +2. Add the desired threshold to the text file in the following format: + + ```txt + CA1505: 20 + ``` + + In this example, the rule is configured to fire when the maintainability index of a type, method, field, property, or event is less than 20. + + ```txt + CA1505(Method): 5 + CA1505(Type): 15 + ``` + + In this example, the rule is configured to fire when the maintainability index of a method is less than 5 or the maintainability index of a type is less than 15. With this configuration file, the rule will continue to flag fields, properties, and events whose maintainability index is less than the default threshold (10). + +3. In the project file, mark the build action of the configuration file as [**AdditionalFiles**](/visualstudio/ide/build-actions#build-action-values). For example: + + ```xml + <ItemGroup> + <AdditionalFiles Include="CodeMetricsConfig.txt" /> + </ItemGroup> + ``` + ## See also - [Maintainability rules](maintainability-warnings.md) diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1506.md b/docs/fundamentals/code-analysis/quality-rules/ca1506.md index 15a4146d083ae..a5feb4a91de42 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1506.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1506.md @@ -16,16 +16,17 @@ helpviewer_keywords: | **Rule ID** | CA1506 | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | +| **Default threshold** | Types: 95  Other symbols: 40 | ## Cause -A type or method is coupled with many other types. Compiler-generated types are excluded from this metric. +A type, method, field, property, or event is coupled with many other types. Compiler-generated types are excluded from this metric. ## Rule description -This rule measures class coupling by counting the number of unique type references that a type or method contains. The default coupling threshold is 95 for types and 40 for methods. +This rule measures class coupling by counting the number of unique type references that a type, method, field, property, or event contains. The default coupling threshold is 95 for types and 40 for other symbol kinds, and the [thresholds are configurable](#configure-threshold). -Types and methods that have a high degree of class coupling can be difficult to maintain. It's a good practice to have types and methods that exhibit low coupling and high cohesion. +Types, methods, and other symbols that have a high degree of class coupling can be difficult to maintain. It's a good practice to have types, methods, and other symbols that exhibit low coupling and high cohesion. ## How to fix violations @@ -69,6 +70,37 @@ dotnet_analyzer_diagnostic.category-Maintainability.severity = none For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). +## Configure threshold + +You can configure the threshold at which this rule fires and the kinds of symbols to analyze. The allowable symbol kinds are: + +- `Assembly` +- `Namespace` +- `Type` +- `Method` +- `Field` +- `Event` +- `Property` + +1. Create a text file named *CodeMetricsConfig.txt*. + +2. Add the desired threshold to the text file in the following format: + + ```txt + CA1506(Method): 60 + CA1506(Type): 120 + ``` + + In this example, the rule is configured to fire when a method has more than 60 unique type references or a type has more than 120 unique type references. With this configuration file, the rule will continue to flag fields, properties, and events whose class coupling is greater than the default threshold (40). + +3. In the project file, mark the build action of the configuration file as [**AdditionalFiles**](/visualstudio/ide/build-actions#build-action-values). For example: + + ```xml + <ItemGroup> + <AdditionalFiles Include="CodeMetricsConfig.txt" /> + </ItemGroup> + ``` + ## See also - [Maintainability rules](maintainability-warnings.md) diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1509.md b/docs/fundamentals/code-analysis/quality-rules/ca1509.md index 5b39308ebc762..9af935b7524bd 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1509.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1509.md @@ -1,7 +1,7 @@ --- title: "CA1509: Invalid entry in code metrics configuration file (code analysis)" description: "Learn about code analysis rule CA1509: Invalid entry in code metrics configuration file" -ms.date: 04/28/2020 +ms.date: 02/13/2023 ms.topic: reference f1_keywords: - CA1509 @@ -14,19 +14,19 @@ ms.author: mavasani --- # CA1509: Invalid entry in code metrics configuration file -| | Value | -|-|-| -| **Rule ID** |CA1509| -| **Category** |[Maintainability](maintainability-warnings.md)| -| **Fix is breaking or non-breaking** |Non-Breaking| +| | Value | +| ----------------------------------- | ---------------------------------------------- | +| **Rule ID** | CA1509 | +| **Category** | [Maintainability](maintainability-warnings.md) | +| **Fix is breaking or non-breaking** | Non-Breaking | ## Cause -Code metrics rules, such as [CA1501](ca1501.md), [CA1502](ca1502.md), [CA1505](ca1505.md) and [CA1506](ca1506.md), supplied a configuration file named `CodeMetricsConfig.txt` that has an invalid entry. +A configuration file named *CodeMetricsConfig.txt* has an invalid entry. ## Rule description -.NET code-quality analyzers implementation of [code metrics](/visualstudio/code-quality/code-metrics-values) analysis rules allow end users to supply an [additional file](https://github.com/dotnet/roslyn/blob/main/docs/analyzers/Using%20Additional%20Files.md) named `CodeMetricsConfig.txt`. This file contains entries to configure code metric thresholds for analysis. Following rules are configurable in this file: +The analysis rules for [code metrics](/visualstudio/code-quality/code-metrics-values) allow you to supply an [additional file](https://github.com/dotnet/roslyn/blob/main/docs/analyzers/Using%20Additional%20Files.md) in your project named *CodeMetricsConfig.txt*. This file contains entries to configure code-metric thresholds for analysis. The following rules are configurable in this file: - [CA1501: Avoid excessive inheritance](ca1501.md) - [CA1502: Avoid excessive complexity](ca1502.md) @@ -39,10 +39,10 @@ This configuration file expects each entry to be in following format: 'RuleId'(Optional 'SymbolKind'): 'Threshold' ``` -- Valid values for 'RuleId' are `CA1501`, `CA1502`, `CA1505`, and `CA1506`. -- Valid values for optional 'SymbolKind' are `Assembly`, `Namespace`, `Type`, `Method`, `Field`, `Event`, and `Property`. -- Valid values for 'Threshold' are non-negative integers. -- Lines starting with '#' are treated as comment lines +- Valid values for `RuleId` are `CA1501`, `CA1502`, `CA1505`, and `CA1506`. +- Valid values for the optional `SymbolKind` are `Assembly`, `Namespace`, `Type`, `Method`, `Field`, `Event`, and `Property`. +- Valid values for `Threshold` are non-negative integers. +- Lines starting with '#' are treated as comment lines. For example, the following is a valid configuration file: diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1801.md b/docs/fundamentals/code-analysis/quality-rules/ca1801.md index 58873b548b1db..10be2353c45bb 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1801.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1801.md @@ -31,7 +31,7 @@ This rule does not examine the following kinds of methods: - Methods used as event handlers. -- Serialization constructors (see [guidelines](../../../standard/serialization/serialization-guidelines.md#runtime-serialization)). +- Serialization constructors (see [guidelines](/previous-versions/dotnet/fundamentals/serialization/serialization-guidelines#runtime-serialization)). - Serialization <xref:System.Runtime.Serialization.ISerializable.GetObjectData%2A> methods. diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1858.md b/docs/fundamentals/code-analysis/quality-rules/ca1858.md index f185dabb0b352..e643851f711be 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1858.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1858.md @@ -37,7 +37,7 @@ Replace the call to <xref:System.String.IndexOf%2A?displayProperty=nameWithType> ## Example -The following code snippet shows a violation of CA1855: +The following code snippet shows a violation of CA1858: ```csharp bool M(string s) diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1860.md b/docs/fundamentals/code-analysis/quality-rules/ca1860.md new file mode 100644 index 0000000000000..0a02ce09e7f10 --- /dev/null +++ b/docs/fundamentals/code-analysis/quality-rules/ca1860.md @@ -0,0 +1,98 @@ +--- +title: "CA1860: Avoid using 'Enumerable.Any()' extension method" +description: "Learn about code analyzer rule CA1860 - Avoid using 'Enumerable.Any()' extension method" +ms.date: 03/01/2023 +ms.topic: reference +f1_keywords: + - CA1860 + - PreferLengthCountIsEmptyOverAnyAnalyzer +helpviewer_keywords: + - CA1860 +dev_langs: + - CSharp + - VB +--- + +# CA1860: Avoid using 'Enumerable.Any()' extension method + +| | Value | +| ----------------------------------- |----------------------------------------| +| **Rule ID** | CA1860 | +| **Category** | [Performance](performance-warnings.md) | +| **Fix is breaking or non-breaking** | Non-breaking | + +## Cause + +<xref:System.Linq.Enumerable.Any%2A?displayProperty=nameWithType> is called on a type that has a `Length`, `Count`, or `IsEmpty` property. + +## Rule description + +It's more efficient and clearer to use `Length`, `Count`, or `IsEmpty` (if possible) than to call <xref:System.Linq.Enumerable.Any%2A?displayProperty=nameWithType> to determine whether a collection type has any elements. + +`Any()`, which is an extension method, uses language integrated query (LINQ). It's more efficient to rely on the collection's own properties, and it also clarifies intent. + +## How to fix violations + +Replace a call to <xref:System.Linq.Enumerable.Any%2A?displayProperty=nameWithType> with a call to the collection's `Length`, `Count`, or `IsEmpty` property. + +## Example + +The following code snippet shows a violation of CA1860: + +```csharp +bool HasElements(string[] strings) +{ + return strings.Any(); +} +``` + +```vb +Function HasElements(strings As String()) As Boolean + Return strings.Any() +End Function +``` + +The following code snippet fixes the violation: + +```csharp +bool HasElements(string[] strings) +{ + return strings.Length > 0; +} +``` + +```vb +Function HasElements(strings As String()) As Boolean + Return strings.Length > 0 +End Function +``` + +## When to suppress warnings + +It's safe to suppress this warning if performance isn't a concern. + +## Suppress a warning + +If you just want to suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule. + +```csharp +#pragma warning disable CA1860 +// The code that's violating the rule is on this line. +#pragma warning restore CA1860 +``` + +To disable the rule for a file, folder, or project, set its severity to `none` in the [configuration file](../configuration-files.md). + +```ini +[*.{cs,vb}] +dotnet_diagnostic.CA1860.severity = none +``` + +To disable this entire category of rules, set the severity for the category to `none` in the [configuration file](../configuration-files.md). + +```ini +[*.{cs,vb}] +dotnet_analyzer_diagnostic.category-Performance.severity = none +``` + +For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2000.md b/docs/fundamentals/code-analysis/quality-rules/ca2000.md index 5fa6fa95865b3..c71561abd8d87 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2000.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2000.md @@ -50,13 +50,13 @@ Passing an object of one of these types to a constructor and then assigning it t To fix a violation of this rule, call <xref:System.IDisposable.Dispose%2A> on the object before all references to it are out of scope. -You can use the [`using` statement](../../../csharp/language-reference/keywords/using-statement.md) ([`Using`](../../../visual-basic/language-reference/statements/using-statement.md) in Visual Basic) to wrap objects that implement <xref:System.IDisposable>. Objects that are wrapped in this manner are automatically disposed at the end of the `using` block. However, the following situations should not or cannot be handled with a `using` statement: +You can use the [`using` statement](../../../csharp/language-reference/statements/using.md) ([`Using`](../../../visual-basic/language-reference/statements/using-statement.md) in Visual Basic) to wrap objects that implement <xref:System.IDisposable>. Objects that are wrapped in this manner are automatically disposed at the end of the `using` block. However, the following situations should not or cannot be handled with a `using` statement: - To return a disposable object, the object must be constructed in a `try/finally` block outside of a `using` block. - Do not initialize members of a disposable object in the constructor of a `using` statement. -- When constructors that are protected by only one exception handler are nested in the [acquisition part of a `using` statement](../../../csharp/language-reference/keywords/using-statement.md), a failure in the outer constructor can result in the object created by the nested constructor never being closed. In the following example, a failure in the <xref:System.IO.StreamReader> constructor can result in the <xref:System.IO.FileStream> object never being closed. CA2000 flags a violation of the rule in this case. +- When constructors that are protected by only one exception handler are nested in the [acquisition part of a `using` statement](../../../csharp/language-reference/statements/using.md), a failure in the outer constructor can result in the object created by the nested constructor never being closed. In the following example, a failure in the <xref:System.IO.StreamReader> constructor can result in the <xref:System.IO.FileStream> object never being closed. CA2000 flags a violation of the rule in this case. ```csharp using (StreamReader sr = new StreamReader(new FileStream("C:/myfile.txt", FileMode.Create))) diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2109.md b/docs/fundamentals/code-analysis/quality-rules/ca2109.md index cb94d249700d6..fadf7e94dc5cb 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2109.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2109.md @@ -24,6 +24,11 @@ ms.author: gewarren A public or protected event-handling method was detected. +> [!NOTE] +> This rule has been deprecated. It last shipped with Microsoft.CodeAnalysis.NetAnalyzers 7.0.0 NuGet package and the .NET 7 SDK. +> +> The rule was removed because the threat that the analyzer warned about (an untrusted intermediary hooking a privileged event handler to a privileged event invoker) hasn't existed since .NET Framework 4.5. + ## Rule description An externally visible event-handling method presents a security issue that requires review. diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2200.md b/docs/fundamentals/code-analysis/quality-rules/ca2200.md index 5ae39910d2dea..a595f426e7600 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2200.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2200.md @@ -1,7 +1,7 @@ --- title: "CA2200: Rethrow to preserve stack details (code analysis)" description: "Learn about code analysis rule CA2200: Rethrow to preserve stack details" -ms.date: 11/04/2016 +ms.date: 02/15/2023 ms.topic: reference f1_keywords: - RethrowToPreserveStackDetails @@ -17,11 +17,11 @@ dev_langs: --- # CA2200: Rethrow to preserve stack details -| | Value | -|-|-| -| **Rule ID** |CA2200| -| **Category** |[Usage](usage-warnings.md)| -| **Fix is breaking or non-breaking** |Non-breaking| +| | Value | +| ----------------------------------- | -------------------------- | +| **Rule ID** | CA2200 | +| **Category** | [Usage](usage-warnings.md) | +| **Fix is breaking or non-breaking** | Non-breaking | ## Cause @@ -29,7 +29,9 @@ An exception is rethrown and the exception is explicitly specified in the `throw ## Rule description -Once an exception is thrown, part of the information it carries is the stack trace. The stack trace is a list of the method call hierarchy that starts with the method that throws the exception and ends with the method that catches the exception. If an exception is re-thrown by specifying the exception in the `throw` statement, the stack trace is restarted at the current method and the list of method calls between the original method that threw the exception and the current method is lost. To keep the original stack trace information with the exception, use the `throw` statement without specifying the exception. +Once an exception is thrown, part of the information it carries is the stack trace. The stack trace is a list of the method call hierarchy that starts with the method that throws the exception and ends with the method that catches the exception. If an exception is rethrown by specifying the exception in the `throw` statement, the stack trace is restarted at the current method and the list of method calls between the original method that threw the exception and the current method is lost. To keep the original stack trace information with the exception, use the `throw` statement without specifying the exception. + +If you're rethrowing the exception from somewhere other than the handler (`catch` block), use <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(System.Exception)?displayProperty=nameWithType> to capture the exception in the handler and <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw?displayProperty=nameWithType> when you want to rethrow it. For more information, see [Capture exceptions to rethrow later](../../../standard/exceptions/best-practices-for-exceptions.md#capture-exceptions-to-rethrow-later). ## How to fix violations diff --git a/docs/fundamentals/code-analysis/quality-rules/index.md b/docs/fundamentals/code-analysis/quality-rules/index.md index f9c7f49fb7c06..d88684ca34783 100644 --- a/docs/fundamentals/code-analysis/quality-rules/index.md +++ b/docs/fundamentals/code-analysis/quality-rules/index.md @@ -154,6 +154,7 @@ The following table lists code quality analysis rules. > | [CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method](ca1854.md) | Prefer 'TryGetValue' over a Dictionary indexer access guarded by a 'ContainsKey' check. 'ContainsKey' and the indexer both look up the key, so using 'TryGetValue' avoids the extra lookup. | > | [CA1855: Use Span\<T>.Clear() instead of Span\<T>.Fill()](ca1855.md) | It's more efficient to call <xref:System.Span%601.Clear?displayProperty=nameWithType> than to call <xref:System.Span%601.Fill(%600)?displayProperty=nameWithType> to fill the elements of the span with a default value. | > | [CA1858: Use StartsWith instead of IndexOf](ca1858.md) | It's more efficient to call <xref:System.String.StartsWith%2A?displayProperty=nameWithType> than to call <xref:System.String.IndexOf%2A?displayProperty=nameWithType> to check whether a string starts with a given prefix. | +> | [CA1860: Avoid using 'Enumerable.Any()' extension method](ca1860.md) | It's more efficient and clearer to use `Length`, `Count`, or `IsEmpty` (if possible) than to call <xref:System.Linq.Enumerable.Any%2A?displayProperty=nameWithType> to determine whether a collection type has any elements. | > | [CA2000: Dispose objects before losing scope](ca2000.md) | Because an exceptional event might occur that will prevent the finalizer of an object from running, the object should be explicitly disposed before all references to it are out of scope. | > | [CA2002: Do not lock on objects with weak identity](ca2002.md) |An object is said to have a weak identity when it can be directly accessed across application domain boundaries. A thread that tries to acquire a lock on an object that has a weak identity can be blocked by a second thread in a different application domain that has a lock on the same object. | > | [CA2007: Do not directly await a Task](ca2007.md) | An asynchronous method [awaits](../../../csharp/language-reference/operators/await.md) a <xref:System.Threading.Tasks.Task> directly. When an asynchronous method awaits a <xref:System.Threading.Tasks.Task> directly, continuation occurs in the same thread that created the task. This behavior can be costly in terms of performance and can result in a deadlock on the UI thread. Consider calling <xref:System.Threading.Tasks.Task.ConfigureAwait(System.Boolean)?displayProperty=nameWithType> to signal your intention for continuation. | diff --git a/docs/fundamentals/code-analysis/quality-rules/performance-warnings.md b/docs/fundamentals/code-analysis/quality-rules/performance-warnings.md index 2f6f878bfd3a1..8612bdca33646 100644 --- a/docs/fundamentals/code-analysis/quality-rules/performance-warnings.md +++ b/docs/fundamentals/code-analysis/quality-rules/performance-warnings.md @@ -49,8 +49,8 @@ Performance rules support high-performance libraries and applications. | [CA1836: Prefer `IsEmpty` over `Count` when available](ca1836.md) | Prefer `IsEmpty` property that is more efficient than `Count`, `Length`, <xref:System.Linq.Enumerable.Count%60%601%28System.Collections.Generic.IEnumerable%7B%60%600%7D%29> or <xref:System.Linq.Enumerable.LongCount%60%601%28System.Collections.Generic.IEnumerable%7B%60%600%7D%29> to determine whether the object contains or not any items. | | [CA1837: Use `Environment.ProcessId` instead of `Process.GetCurrentProcess().Id`](ca1837.md) | `Environment.ProcessId` is simpler and faster than `Process.GetCurrentProcess().Id`. | | [CA1838: Avoid `StringBuilder` parameters for P/Invokes](ca1838.md) | Marshalling of `StringBuilder` always creates a native buffer copy, resulting in multiple allocations for one marshalling operation. | -| [CA1839: Use Environment.ProcessPath instead of Process.GetCurrentProcess().MainModule.FileName](ca1837.md) | `Environment.ProcessPath` is simpler and faster than `Process.GetCurrentProcess().MainModule.FileName`. | -| [CA1840: Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId](ca1837.md) | `Environment.CurrentManagedThreadId` is more compact and efficient than `Thread.CurrentThread.ManagedThreadId`. | +| [CA1839: Use Environment.ProcessPath instead of Process.GetCurrentProcess().MainModule.FileName](ca1839.md) | `Environment.ProcessPath` is simpler and faster than `Process.GetCurrentProcess().MainModule.FileName`. | +| [CA1840: Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId](ca1840.md) | `Environment.CurrentManagedThreadId` is more compact and efficient than `Thread.CurrentThread.ManagedThreadId`. | | [CA1841: Prefer Dictionary Contains methods](ca1841.md) | Calling `Contains` on the `Keys` or `Values` collection may often be more expensive than calling `ContainsKey` or `ContainsValue` on the dictionary itself. | | [CA1842: Do not use 'WhenAll' with a single task](ca1842.md) | Using `WhenAll` with a single task may result in performance loss. Await or return the task instead. | | [CA1843: Do not use 'WaitAll' with a single task](ca1843.md) | Using `WaitAll` with a single task may result in performance loss. Await or return the task instead. | @@ -67,3 +67,4 @@ Performance rules support high-performance libraries and applications. | [CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method](ca1854.md) | Prefer 'TryGetValue' over a Dictionary indexer access guarded by a 'ContainsKey' check. 'ContainsKey' and the indexer both look up the key, so using 'TryGetValue' avoids the extra lookup. | | [CA1855: Use Span\<T>.Clear() instead of Span\<T>.Fill()](ca1855.md) | It's more efficient to call <xref:System.Span%601.Clear?displayProperty=nameWithType> than to call <xref:System.Span%601.Fill(%600)?displayProperty=nameWithType> to fill the elements of the span with a default value. | | [CA1858: Use StartsWith instead of IndexOf](ca1858.md) | It's more efficient to call <xref:System.String.StartsWith%2A?displayProperty=nameWithType> than to call <xref:System.String.IndexOf%2A?displayProperty=nameWithType> to check whether a string starts with a given prefix. | +| [CA1860: Avoid using 'Enumerable.Any()' extension method](ca1860.md) | It's more efficient and clearer to use `Length`, `Count`, or `IsEmpty` (if possible) than to call <xref:System.Linq.Enumerable.Any%2A?displayProperty=nameWithType> to determine whether a collection type has any elements. | diff --git a/docs/fundamentals/code-analysis/style-rules/dotnet-formatting-options.md b/docs/fundamentals/code-analysis/style-rules/dotnet-formatting-options.md index 88b458e4df114..0fb82e25d56aa 100644 --- a/docs/fundamentals/code-analysis/style-rules/dotnet-formatting-options.md +++ b/docs/fundamentals/code-analysis/style-rules/dotnet-formatting-options.md @@ -81,67 +81,6 @@ using System.Threading.Tasks; using Octokit; ``` -## Dotnet namespace options - -This category contains one formatting option that concerns how namespaces are named in both C# and Visual Basic. - -- [dotnet\_style\_namespace\_match\_folder](#dotnet_style_namespace_match_folder) - -Example *.editorconfig* file: - -```ini -# .NET namespace rules -[*.{cs,vb}] -dotnet_style_namespace_match_folder = true -``` - -### dotnet\_style\_namespace\_match\_folder - -| Property | Value | Description | -|--------------------------|-------------------------------------|----------------------------------------------------------------| -| **Option name** | dotnet_style_namespace_match_folder | | -| **Applicable languages** | C# and Visual Basic | | -| **Introduced version** | Visual Studio 2019 version 16.10 | | -| **Option values** | `true` | Match namespaces to folder structure | -| | `false` | Do not report on namespaces that do not match folder structure | -| **Default value** | `true` | | - -Code examples: - -```csharp -// dotnet_style_namespace_match_folder = true -// file path: Example/Convention/C.cs -using System; - -namespace Example.Convention -{ - class C - { - } -} - -// dotnet_style_namespace_match_folder = false -// file path: Example/Convention/C.cs -using System; - -namespace Example -{ - class C - { - } -} -``` - -> [!NOTE] -> `dotnet_style_namespace_match_folder` requires the analyzer to have access to project properties to function correctly. For projects that target .NET Core 3.1 or an earlier version, you must manually add the following items to your project file. (They're added automatically for .NET 5 and later.) -> -> ```xml -> <ItemGroup> -> <CompilerVisibleProperty Include="RootNamespace" /> -> <CompilerVisibleProperty Include="ProjectDir" /> -> </ItemGroup> -> ``` - ## See also - [Formatting rule (IDE0055)](ide0055.md) diff --git a/docs/fundamentals/code-analysis/style-rules/ide0011.md b/docs/fundamentals/code-analysis/style-rules/ide0011.md index ffb5a892dc0e9..909bce2fe716a 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0011.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0011.md @@ -51,6 +51,10 @@ if (test) { this.Display(); } // csharp_prefer_braces = false if (test) this.Display(); + +// csharp_prefer_braces = when_multiline +if (test) this.Display(); +else { this.Display(); Console.WriteLine("Multiline"); } ``` ## Suppress a warning diff --git a/docs/fundamentals/code-analysis/style-rules/ide0018.md b/docs/fundamentals/code-analysis/style-rules/ide0018.md index df372da833f66..8b97e7ef43db3 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0018.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0018.md @@ -46,11 +46,11 @@ For more information about configuring options, see [Option format](language-rul ```csharp // csharp_style_inlined_variable_declaration = true -if (int.TryParse(value, out int i) {...} +if (int.TryParse(value, out int i)) {...} // csharp_style_inlined_variable_declaration = false int i; -if (int.TryParse(value, out i) {...} +if (int.TryParse(value, out i)) {...} ``` ## Suppress a warning diff --git a/docs/fundamentals/code-analysis/style-rules/ide0032.md b/docs/fundamentals/code-analysis/style-rules/ide0032.md index 04a5a84f039e6..db5a9dee434c4 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0032.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0032.md @@ -46,7 +46,7 @@ Options specify the behavior that you want the rule to enforce. For information ```csharp // dotnet_style_prefer_auto_properties = true -private int Age { get; } +public int Age { get; } // dotnet_style_prefer_auto_properties = false private int age; diff --git a/docs/fundamentals/code-analysis/style-rules/ide0041.md b/docs/fundamentals/code-analysis/style-rules/ide0041.md index 939d871cccf30..2707a700e4c5a 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0041.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0041.md @@ -1,7 +1,7 @@ --- title: "IDE0041: Use 'is null' check" description: "Learn about code analysis rule IDE0041: Use is null check" -ms.date: 09/30/2020 +ms.date: 02/13/2023 ms.topic: reference f1_keywords: - IDE0041 @@ -29,7 +29,7 @@ dev_langs: ## Overview -This style rule concerns the use of a null check with pattern-matching versus calling the reference-equality method <xref:System.Object.ReferenceEquals(System.Object,System.Object)?displayProperty=nameWithType>. +This style rule concerns the use of a null check with pattern matching versus the use of the equality operator (`==`) or calling <xref:System.Object.ReferenceEquals(System.Object,System.Object)?displayProperty=nameWithType>. ## Options @@ -52,6 +52,10 @@ if (value is null) // dotnet_style_prefer_is_null_check_over_reference_equality_method = false if (object.ReferenceEquals(value, null)) return; + +// dotnet_style_prefer_is_null_check_over_reference_equality_method = false +if ((object)o == null) + return; ``` ```vb @@ -64,6 +68,11 @@ End If If Object.ReferenceEquals(value, Nothing) Return End If + +' dotnet_style_prefer_is_null_check_over_reference_equality_method = false +If CType(value, Object) = Nothing + Return +End If ``` ## Suppress a warning diff --git a/docs/fundamentals/code-analysis/style-rules/ide0063.md b/docs/fundamentals/code-analysis/style-rules/ide0063.md index 792f3022ece9e..d4853242c567b 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0063.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0063.md @@ -27,7 +27,7 @@ dev_langs: ## Overview -This style rule concerns the use of [`using` statements](../../../csharp/language-reference/keywords/using-statement.md) without curly braces, also known as `using` declarations. This [alternative syntax](~/_csharplang/proposals/csharp-8.0/using.md) was introduced in C# 8.0. +This style rule concerns the use of [`using` statements](../../../csharp/language-reference/statements/using.md) without curly braces, also known as `using` declarations. This [alternative syntax](~/_csharplang/proposals/csharp-8.0/using.md) was introduced in C# 8.0. ## Options @@ -78,7 +78,7 @@ For more information, see [How to suppress code analysis warnings](../suppress-w ## See also -- [using statement](../../../csharp/language-reference/keywords/using-statement.md) +- [using statement](../../../csharp/language-reference/statements/using.md) - [Code block preferences](code-block-preferences.md) - [Code style language rules](language-rules.md) - [Code style rules reference](index.md) diff --git a/docs/fundamentals/code-analysis/style-rules/ide0079.md b/docs/fundamentals/code-analysis/style-rules/ide0079.md index cae68b4111474..db018fb7a7a4d 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0079.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0079.md @@ -1,7 +1,7 @@ --- title: "IDE0079: Remove unnecessary suppression" description: "Learn about code analysis rule IDE0079: Remove unnecessary suppression" -ms.date: 09/30/2020 +ms.date: 03/23/2023 ms.topic: reference f1_keywords: - IDE0079 @@ -28,7 +28,12 @@ dev_langs: ## Overview -This rule flags unnecessary [pragma](../../../csharp/language-reference/preprocessor-directives.md#pragmas) and <xref:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute> attribute suppressions in source. Source suppressions are meant to suppress violations of compiler and analyzer rules for specific parts of source code, without disabling the rules in the other parts of the code. They are generally added to suppress false positives or less important violations that user does not intend to fix. Suppressions can frequently become stale, either due to the rules getting fixed to prevent false positives or user code being refactored to render the suppressions redundant. This rule helps identify such redundant suppressions, which can be removed. +This rule flags unnecessary [pragma](../../../csharp/language-reference/preprocessor-directives.md#pragmas) and <xref:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute> attribute suppressions in source. + +Source suppressions suppress violations of compiler and analyzer rules in specific places but not in other parts of the source code. You generally use them to suppress false positives or less important violations that you don't intend to fix. However, suppressions often become stale. This can happen if a rule is fixed to prevent false positives or you refactor your code and, in doing so, render the suppressions redundant. This rule helps to identify redundant suppressions, which can be removed. + +> [!NOTE] +> Rule IDE0079 only flags violations in files that are open in the Visual Studio editor. It's not available for command-line builds. ## Example diff --git a/docs/fundamentals/code-analysis/style-rules/ide0130.md b/docs/fundamentals/code-analysis/style-rules/ide0130.md index f57010fff24dc..1ab515c05149d 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0130.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0130.md @@ -44,12 +44,13 @@ Options specify the behavior that you want the rule to enforce. For information | **Default option value** | `true` | | > [!NOTE] -> The `dotnet_style_namespace_match_folder` option depends on knowing the current project and root namespace properties. This information is provided by Visual Studio but is not available for command-line builds, such as `dotnet build`. For command-line builds to work, you must add the following properties to your *.editorconfig* file and replace the root directory and namespace placeholders with your values: +> The `dotnet_style_namespace_match_folder` option depends on knowing the current project and root namespace properties. This information is provided by Visual Studio but is not available for command-line builds, such as `dotnet build`. For command-line builds to work, you must add the following properties to your project file: > -> ```ini -> is_global=true -> build_property.ProjectDir = <root directory> -> build_property.RootNamespace = <root namespace> +> ```xml +> <ItemGroup> +> <CompilerVisibleProperty Include="RootNamespace" /> +> <CompilerVisibleProperty Include="ProjectDir" /> +> </ItemGroup> > ``` ## Example diff --git a/docs/fundamentals/code-analysis/style-rules/language-rules.md b/docs/fundamentals/code-analysis/style-rules/language-rules.md index 4ab16718b1d9b..f01e5422a3d05 100644 --- a/docs/fundamentals/code-analysis/style-rules/language-rules.md +++ b/docs/fundamentals/code-analysis/style-rules/language-rules.md @@ -76,7 +76,7 @@ The style rules in this section are applicable to both C# and Visual Basic. - [Use null propagation (IDE0031)](ide0031.md) - [Use 'is null' check (IDE0041)](ide0041.md) - [File header preferences](ide0073.md) -- [Namespace naming preferences](ide0130.md) +- [Namespace naming preferences (IDE0130)](ide0130.md) ## C# style rules diff --git a/docs/fundamentals/code-analysis/style-rules/naming-rules.md b/docs/fundamentals/code-analysis/style-rules/naming-rules.md index 02d46af493002..c6e2d84e914d2 100644 --- a/docs/fundamentals/code-analysis/style-rules/naming-rules.md +++ b/docs/fundamentals/code-analysis/style-rules/naming-rules.md @@ -167,7 +167,7 @@ The severity value must be `warning` or `error` to be [enforced on build](../ove ## Example: Public member capitalization -The following *.editorconfig* file contains a naming convention that specifies that public properties, methods, fields, events, and delegates must be capitalized. Notice that this naming convention specifies multiple kinds of symbol to apply the rule to, using a comma to separate the values. +The following *.editorconfig* file contains a naming convention that specifies that public properties, methods, fields, events, and delegates that are marked `readonly` must be capitalized. This naming convention specifies multiple kinds of symbol to apply the rule to, using a comma to separate the values. ```ini [*.{cs,vb}] diff --git a/docs/fundamentals/index.yml b/docs/fundamentals/index.yml index 615794b37f61c..7c0eb02e3f892 100644 --- a/docs/fundamentals/index.yml +++ b/docs/fundamentals/index.yml @@ -1,55 +1,44 @@ ### YamlMime:Landing -title: .NET documentation -summary: Learn about .NET, an open-source developer platform for building many different types of applications. +title: .NET fundamentals documentation +summary: Learn the fundamentals of .NET, an open-source developer platform for building many different types of applications. metadata: title: .NET documentation description: Learn about .NET, an open-source developer platform for building many different types of applications. ms.topic: landing-page - ms.date: 02/17/2022 + ms.date: 02/02/2023 # linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | sample | tutorial | video | whats-new landingContent: - # Card - title: Learn about .NET linkLists: - linkListType: download links: - - text: Download .NET - url: https://dotnet.microsoft.com/download + - text: Download .NET + url: https://dotnet.microsoft.com/download - linkListType: overview links: - text: What is .NET? url: https://dotnet.microsoft.com/learn/dotnet/what-is-dotnet - text: Introduction to .NET url: ../core/introduction.md - - text: .NET SDK overview - url: ../core/sdk.md - - linkListType: get-started - links: - - text: Get started with .NET Core - url: ../core/get-started.md - - text: Get started with ASP.NET Core - url: /aspnet/core/ - - text: .NET on Q&A - url: /answers/products/dotnet - - text: .NET tech community forums - url: https://techcommunity.microsoft.com/t5/net/ct-p/dotnet + - text: .NET languages + url: ../fundamentals/languages.md - linkListType: concept links: - text: .NET Standard url: ../standard/net-standard.md - - text: Target frameworks - url: ../standard/frameworks.md - text: Common Language Runtime (CLR) url: ../standard/clr.md - text: .NET Core support policy url: https://dotnet.microsoft.com/platform/support/policy/dotnet-core - linkListType: whats-new links: + - text: What's new in .NET 8 + url: ../core/whats-new/dotnet-8.md - text: What's new in .NET 7 url: ../core/whats-new/dotnet-7.md - text: What's new in .NET 6 @@ -66,11 +55,11 @@ landingContent: linkLists: - linkListType: overview links: - - text: Select which .NET version to use + - text: Select which .NET version to use url: ../core/versions/selection.md - linkListType: how-to-guide links: - - text: Install .NET SDK + - text: Install .NET SDK url: ../core/install/windows.md - text: Install .NET runtime url: ../core/install/windows.md @@ -84,26 +73,34 @@ landingContent: url: ../core/install/windows.md # Card - - title: Get started with .NET Core + - title: Get started with .NET linkLists: - - linkListType: overview + - linkListType: get-started links: - - text: Port from .NET Framework to .NET Core - url: ../core/porting/index.md - - text: Upgrade Assistant - url: ../core/porting/upgrade-assistant-overview.md + - text: Get started with .NET + url: ../core/get-started.md + - text: Get started with ASP.NET Core + url: /aspnet/core/ + - text: .NET on Q&A + url: /answers/products/dotnet + - text: .NET tech community forums + url: https://techcommunity.microsoft.com/t5/net/ct-p/dotnet - linkListType: video links: - text: "Tutorial: Hello World in 10 minutes" - url: https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/intro + url: https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/intro - linkListType: tutorial links: - text: Create a Hello World app in Visual Studio Code url: ../core/tutorials/with-visual-studio-code.md - - text: Create a Hello World app in Visual Studio + - text: Create a Hello World app in Visual Studio url: ../core/tutorials/with-visual-studio.md - text: Containerize a .NET Core app url: ../core/docker/build-container.md + - linkListType: concept + links: + - text: Port from .NET Framework to .NET + url: ../core/porting/index.md - linkListType: deploy links: - text: App publishing @@ -112,26 +109,24 @@ landingContent: url: ../devops/dotnet-publish-github-action.md # Card - - title: Use .NET from the command line + - title: Serialize data linkLists: - - linkListType: overview - links: - - text: .NET CLI - url: ../core/tools/index.md - - linkListType: tutorial + - linkListType: concept links: - - text: Get started using the CLI - url: ../core/tutorials/with-visual-studio-code.md - - linkListType: deploy + - text: Serialize and deserialize JSON + url: ../standard/serialization/system-text-json/overview.md + - linkListType: how-to-guide links: - - text: Publish apps - url: ../core/deploying/deploy-with-cli.md - - linkListType: reference + - text: Serialize and deserialize JSON using C# + url: ../standard/serialization/system-text-json/how-to.md + - text: Migrate from Newtonsoft.Json to System.Text.Json + url: ../standard/serialization/system-text-json/migrate-from-newtonsoft.md + - text: Write custom converters for JSON serialization + url: ../standard/serialization/system-text-json/converters-how-to.md + - linkListType: sample links: - - text: dotnet new - url: ../core/tools/dotnet-new.md - - text: dotnet publish - url: ../core/tools/dotnet-publish.md + - text: Examples of XML serialization + url: ../standard/serialization/examples-of-xml-serialization.md # Card - title: Runtime libraries @@ -169,46 +164,6 @@ landingContent: - text: Create a Windows Service using BackgroundService url: ../core/extensions/windows-service.md - # Card - - title: Unit test with .NET Core - linkLists: - - linkListType: overview - links: - - text: Unit testing in .NET Core and .NET Standard - url: ../core/testing/index.md - - linkListType: tutorial - links: - - text: Test C# code using dotnet test and xUnit - url: ../core/testing/unit-testing-with-dotnet-test.md - - text: Unit test with NUnit - url: ../core/testing/unit-testing-with-nunit.md - - text: Unit test with MSTest - url: ../core/testing/unit-testing-with-mstest.md - - linkListType: concept - links: - - text: Best practices for writing unit tests - url: ../core/testing/unit-testing-best-practices.md - - # Card - - title: Serialize data - linkLists: - - linkListType: concept - links: - - text: Serialize and deserialize JSON - url: ../standard/serialization/system-text-json/overview.md - - linkListType: how-to-guide - links: - - text: Serialize and deserialize JSON using C# - url: ../standard/serialization/system-text-json/how-to.md - - text: Migrate from Newtonsoft.Json to System.Text.Json - url: ../standard/serialization/system-text-json/migrate-from-newtonsoft.md - - text: Write custom converters for JSON serialization - url: ../standard/serialization/system-text-json/converters-how-to.md - - linkListType: sample - links: - - text: Examples of XML serialization - url: ../standard/serialization/examples-of-xml-serialization.md - # Card - title: Format and convert dates, numbers, and strings linkLists: @@ -274,37 +229,3 @@ landingContent: url: ../standard/io/how-to-compress-and-extract-files.md - text: Open and append to a log file url: ../standard/io/how-to-open-and-append-to-a-log-file.md - - # Card - - title: Manage memory use - linkLists: - - linkListType: concept - links: - - text: Garbage collection fundamentals - url: ../standard/garbage-collection/fundamentals.md - - text: Implement a Dispose method - url: ../standard/garbage-collection/implementing-dispose.md - - text: Implement a DisposeAsync method - url: ../standard/garbage-collection/implementing-disposeasync.md - - # Card - - title: Learn about parallel programming - linkLists: - - linkListType: overview - links: - - text: Parallel Programming in .NET - url: ../standard/parallel-programming/index.md - - linkListType: concept - links: - - text: Task Parallel Library (TPL) - url: ../standard/parallel-programming/task-parallel-library-tpl.md - - text: Task-based asynchronous programming - url: ../standard/parallel-programming/task-based-asynchronous-programming.md - - text: Task cancellation - url: ../standard/parallel-programming/task-cancellation.md - - linkListType: how-to-guide - links: - - text: Write a simple parallel program using Parallel.ForEach - url: ../standard/parallel-programming/how-to-write-a-simple-parallel-foreach-loop.md - - text: Return a value from a task - url: ../standard/parallel-programming/how-to-return-a-value-from-a-task.md diff --git a/docs/fundamentals/languages.md b/docs/fundamentals/languages.md new file mode 100644 index 0000000000000..36a0dd0782b00 --- /dev/null +++ b/docs/fundamentals/languages.md @@ -0,0 +1,41 @@ +--- +title: .NET Managed languages strategy +description: Each .NET language is unique. C# is the most widely used language and the language most of .NET is written in. F# explores new language possibilities and the community provides a rich experience across platforms. We remain committed to Visual Basic and continue to invest in maintaining C# interop and Visual Studio features for folks that love Visual Basic or want a stable language. +author: billwagner +ms.author: wiwagn +ms.date: 02/06/2023 +ms.topic: conceptual +--- +# Microsoft .NET language strategy + +Microsoft offers 3 languages on the .NET platform – C#, F# and Visual Basic. In this article, you’ll learn about our strategy for each language. Look for links to additional articles on how these strategies guide us and ways to learn more about each language. + +## C\# + +C# is a cross-platform general purpose language that makes developers productive while writing highly performant code. With millions of developers, C# is the most popular .NET language. C# has broad support in the ecosystem and all .NET [workloads](../standard/glossary.md#workload). Based on object-oriented principles, it incorporates many features from other paradigms, not least functional programming. Low-level features support high-efficiency scenarios without writing unsafe code. Most of the .NET runtime and libraries are written in C#, and advances in C# often benefit all .NET developers. + +### Our strategy for C\# + +[!INCLUDE [csharp](../../includes/csharp-strategy.md)] + +You can read more about how this strategy guides us in the [C# guide](../csharp/tour-of-csharp/strategy.md). + +## F\# + +F# is a succinct, robust and performant language that is expression-based and immutable by default. It focuses on expressive power, simplicity and elegance and is used by many thousands of developers that appreciate its pragmatic function-first approach to .NET. F# offers the full power of .NET and works well with C# for mixed language solutions. The community makes significant contributions to the compiler and runtime, as well as a broad array of F# tools and frameworks. + +### Our strategy for F\# + +[!INCLUDE [fsharp](../../includes/fsharp-strategy.md)] + +You can read more about how this strategy guides us in the [F# guide](../fsharp/strategy.md). + +## Visual Basic + +Visual Basic (VB) has a long history as an approachable language favoring clarity over brevity. Its hundreds of thousands of developers are concentrated around the traditional Windows-based client [workloads](../standard/glossary.md#workload) where VB has long pioneered great tooling and ease of use. Today’s VB developers benefit from a stable and mature object-oriented language paired with a growing .NET ecosystem and ongoing tooling improvements. Some .NET workloads are not supported in VB, and it is common for VB developers to use C# for those scenarios. + +### Our strategy for Visual Basic + +[!INCLUDE [visual-basic](../../includes/vb-strategy.md)] + +You can read more about how this strategy guides us in the [Visual Basic guide](../visual-basic/getting-started/strategy.md). diff --git a/docs/fundamentals/networking/quic/quic-overview.md b/docs/fundamentals/networking/quic/quic-overview.md new file mode 100644 index 0000000000000..74790df284c3b --- /dev/null +++ b/docs/fundamentals/networking/quic/quic-overview.md @@ -0,0 +1,321 @@ +--- +title: QUIC support in .NET +description: Learn about the support for QUIC protocol in .NET. +ms.date: 03/15/2023 +helpviewer_keywords: + - "protocols, QUIC" + - "sending data, QUIC" + - "QUIC" + - "receiving data, QUIC" + - "application protocols, QUIC" + - "Internet, QUIC" +--- +# QUIC protocol + +QUIC is a network transport layer protocol standardized in [RFC 9000](https://www.rfc-editor.org/rfc/rfc9000). It uses UDP as an underlying protocol and it's inherently secure as it mandates TLS 1.3 usage. For more information, see [RFC 9001](https://www.rfc-editor.org/rfc/rfc9001). Another interesting difference from well-known transport protocols such as TCP and UDP is that it has stream multiplexing built-in on the transport layer. This allows having multiple, concurrent, independent data streams that don't affect each other. + +QUIC itself doesn't define any semantics for the exchanged data as it's a transport protocol. It's rather used in application layer protocols, for example in [HTTP/3](https://www.rfc-editor.org/rfc/rfc9114) or in [SMB over QUIC](/windows-server/storage/file-server/smb-over-quic). It can also be used for any custom-defined protocol. + +The protocol offers many advantages over TCP with TLS, here are a few: + +- Faster connection establishment as it doesn't require as many round trips as TCP with TLS on top. +- Avoidance of head-of-line blocking problem where one lost packet doesn't block data of all the other streams. + +On the other hand, there are potential disadvantages to consider when using QUIC. As a newer protocol, its adoption is still growing and limited. Apart from that, QUIC traffic may be even blocked by some networking components. + +## QUIC in .NET + +The QUIC implementation was introduced in .NET 5 as the `System.Net.Quic` library. However, up until .NET 7.0 the library was strictly internal and served only as an implementation of HTTP/3. With .NET 7, the library was made public thus exposing its APIs. + +> [!NOTE] +> In .NET 7.0, the APIs are published as [preview features](https://github.com/dotnet/designs/blob/main/accepted/2021/preview-features/preview-features.md). + +From the implementation perspective, `System.Net.Quic` depends on [MsQuic](https://github.com/microsoft/msquic), the native implementation of QUIC protocol. As a result, `System.Net.Quic` platform support and dependencies are inherited from `MsQuic` and documented in [HTTP/3 Platform dependencies](../../../core/extensions/httpclient-http3.md#platform-dependencies). In short, the `MsQuic` library is shipped as part of .NET for Windows. But for Linux, `libmsquic` must be manually installed via an appropriate package manager. For the other platforms, it's still possible to build `MsQuic` manually, whether against SChannel or OpenSSL, and use it with `System.Net.Quic`. However, these scenarios are not part of our testing matrix and unforeseen problems might occur. + +## API overview + +<xref:System.Net.Quic> brings three major classes that enable the usage of QUIC protocol: + +- <xref:System.Net.Quic.QuicListener> - server side class for accepting incoming connections. +- <xref:System.Net.Quic.QuicConnection> - QUIC connection, corresponding to [RFC 9000 Section 5](https://www.rfc-editor.org/rfc/rfc9000#section-5). +- <xref:System.Net.Quic.QuicStream> - QUIC stream, corresponding to [RFC 9000 Section 2](https://www.rfc-editor.org/rfc/rfc9000#section-2). + +But before using these classes, your code should check whether QUIC is currently supported, as `libmsquic` might be missing, or TLS 1.3 might not be supported. For that, both `QuicListener` and `QuicConnection` expose a static property `IsSupported`: + +```csharp +if (QuicListener.IsSupported) +{ + // Use QuicListener +} +else +{ + // Fallback/Error +} + +if (QuicConnection.IsSupported) +{ + // Use QuicConnection +} +else +{ + // Fallback/Error +} +``` + +These properties will report the same value, but that might change in the future. It's recommended to check <xref:System.Net.Quic.QuicListener.IsSupported> for server-scenarios and <xref:System.Net.Quic.QuicConnection.IsSupported> for the client ones. + +### `QuicListener` + +<xref:System.Net.Quic.QuicListener> represents a server side class that accepts incoming connections from the clients. The listener is constructed and started with a static method <xref:System.Net.Quic.QuicListener.ListenAsync(System.Net.Quic.QuicListenerOptions,System.Threading.CancellationToken)>. The method accepts an instance of <xref:System.Net.Quic.QuicListenerOptions> class with all the settings necessary to start the listener and accept incoming connections. After that, listener is ready to hand out connections via <xref:System.Net.Quic.QuicListener.AcceptConnectionAsync(System.Threading.CancellationToken)>. Connections returned by this method are always fully connected, meaning that the TLS handshake is finished and the connection is ready to be used. Finally, to stop listening and release all resources, <xref:System.Net.Quic.QuicListener.DisposeAsync> must be called. + +Consider the following `QuicListener` example code: + +```csharp +using System.Net.Quic; + +// First, check if QUIC is supported. +if (!QuicListener.IsSupported) +{ + Console.WriteLine("QUIC is not supported, check for presence of libmsquic and support of TLS 1.3."); + return; +} + +// Share configuration for each incoming connection. +// This represents the minimal configuration necessary. +var serverConnectionOptions = new QuicServerConnectionOptions +{ + // Used to abort stream if it's not properly closed by the user. + // See https://www.rfc-editor.org/rfc/rfc9000#section-20.2 + DefaultStreamErrorCode = 0x0A, // Protocol-dependent error code. + + // Used to close the connection if it's not done by the user. + // See https://www.rfc-editor.org/rfc/rfc9000#section-20.2 + DefaultCloseErrorCode = 0x0B, // Protocol-dependent error code. + + // Same options as for server side SslStream. + ServerAuthenticationOptions = new SslServerAuthenticationOptions + { + // List of supported application protocols, must be the same or subset of QuicListenerOptions.ApplicationProtocols. + ApplicationProtocols = new List<SslApplicationProtocol>() { "protocol-name" }, + // Server certificate, it can also be provided via ServerCertificateContext or ServerCertificateSelectionCallback. + ServerCertificate = serverCertificate + } +}; + +// Initialize, configure the listener and start listening. +var listener = await QuicListener.ListenAsync(new QuicListenerOptions +{ + // Listening endpoint, port 0 means any port. + ListenEndPoint = new IPEndPoint(IPAddress.Loopback, 0), + // List of all supported application protocols by this listener. + ApplicationProtocols = new List<SslApplicationProtocol>() { "protocol-name" }, + // Callback to provide options for the incoming connections, it gets called once per each connection. + ConnectionOptionsCallback = (_, _, _) => ValueTask.FromResult(serverConnectionOptions) +}); + +// Accept and process the connections. +while (isRunning) +{ + // Accept will propagate any exceptions that occurred during the connection establishment, + // including exceptions thrown from ConnectionOptionsCallback, caused by invalid QuicServerConnectionOptions or TLS handshake failures. + var connection = await listener.AcceptConnectionAsync(); + + // Process the connection... +} + +// When finished, dispose the listener. +await listener.DisposeAsync(); +``` + +For more information about how the `QuicListener` was designed, see the [API proposal](https://github.com/dotnet/runtime/issues/67560). + +### `QuicConnection` + +<xref:System.Net.Quic.QuicConnection> is a class used for both server and client side QUIC connections. Server side connections are created internally by the listener and handed out via <xref:System.Net.Quic.QuicListener.AcceptConnectionAsync(System.Threading.CancellationToken)>. Client side connections must be opened and connected to the server. As with the listener, there's a static method <xref:System.Net.Quic.QuicConnection.ConnectAsync(System.Net.Quic.QuicClientConnectionOptions,System.Threading.CancellationToken)> that instantiates and connects the connection. It accepts an instance of <xref:System.Net.Quic.QuicClientConnectionOptions>, an analogous class to <xref:System.Net.Quic.QuicServerConnectionOptions>. After that, the work with the connection doesn't differ between client and server. It can open outgoing streams and accept incoming ones. It also provides properties with information about the connection, like <xref:System.Net.Quic.QuicConnection.LocalEndPoint>, <xref:System.Net.Quic.QuicConnection.RemoteEndPoint>, or <xref:System.Net.Quic.QuicConnection.RemoteCertificate>. + +When the work with the connection is done, it needs to be closed and disposed. QUIC protocol mandates using an application layer code for immediate closure, see [RFC 9000 Section 10.2](https://www.rfc-editor.org/rfc/rfc9000#section-10.2). For that, <xref:System.Net.Quic.QuicConnection.CloseAsync(System.Int64,System.Threading.CancellationToken)> with application layer code can be called or if not, <xref:System.Net.Quic.QuicConnection.DisposeAsync> will use the code provided in <xref:System.Net.Quic.QuicConnectionOptions.DefaultCloseErrorCode>. Either way, <xref:System.Net.Quic.QuicConnection.DisposeAsync> must be called at the end of the work with the connection to fully release all the associated resources. + +Consider the following `QuicConnection` example code: + +```csharp +using System.Net.Quic; + +// First, check if QUIC is supported. +if (!QuicConnection.IsSupported) +{ + Console.WriteLine("QUIC is not supported, check for presence of libmsquic and support of TLS 1.3."); + return; +} + +// This represents the minimal configuration necessary to open a connection. +var clientConnectionOptions = new QuicClientConnectionOptions +{ + // End point of the server to connect to. + RemoteEndPoint = listener.LocalEndPoint, + + // Used to abort stream if it's not properly closed by the user. + // See https://www.rfc-editor.org/rfc/rfc9000#section-20.2 + DefaultStreamErrorCode = 0x0A, // Protocol-dependent error code. + + // Used to close the connection if it's not done by the user. + // See https://www.rfc-editor.org/rfc/rfc9000#section-20.2 + DefaultCloseErrorCode = 0x0B, // Protocol-dependent error code. + + // Optionally set limits for inbound streams. + MaxInboundUnidirectionalStreams = 10, + MaxInboundBidirectionalStreams = 100, + + // Same options as for client side SslStream. + ClientAuthenticationOptions = new SslClientAuthenticationOptions + { + // List of supported application protocols. + ApplicationProtocols = new List<SslApplicationProtocol>() { "protocol-name" } + } +}; + +// Initialize, configure and connect to the server. +var connection = await QuicConnection.ConnectAsync(clientConnectionOptions); + +Console.WriteLine($"Connected {connection.LocalEndPoint} --> {connection.RemoteEndPoint}"); + +// Open a bidirectional (can both read and write) outbound stream. +var outgoingStream = await connection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + +// Work with the outgoing stream ... + +// To accept any stream on a client connection, at least one of MaxInboundBidirectionalStreams or MaxInboundUnidirectionalStreams of QuicConnectionOptions must be set. +while (isRunning) +{ + // Accept an inbound stream. + var incomingStream = await connection.AcceptInboundStreamAsync(); + + // Work with the incoming stream ... +} + +// Close the connection with the custom code. +await connection.CloseAsync(0x0C); + +// Dispose the connection. +await connection.DisposeAsync(); +``` + +or more information about how the `QuicConnection` was designed, see the [API proposal](https://github.com/dotnet/runtime/issues/68902). + +### `QuicStream` + +<xref:System.Net.Quic.QuicStream> is the actual type that is used to send and receive data in QUIC protocol. It derives from ordinary <xref:System.IO.Stream> and can be used as such, but it also offers several features that are specific to QUIC protocol. Firstly, a QUIC stream can either be unidirectional or bidirectional, see [RFC 9000 Section 2.1](https://www.rfc-editor.org/rfc/rfc9000#section-2.1). A bidirectional stream is able to send and receive data on both sides, whereas unidirectional stream can only write from the initiating side and read on the accepting one. Each peer can limit how many concurrent stream of each type is willing to accept, see <xref:System.Net.Quic.QuicConnectionOptions.MaxInboundBidirectionalStreams> and <xref:System.Net.Quic.QuicConnectionOptions.MaxInboundUnidirectionalStreams>. + +Another particularity of QUIC stream is ability to explicitly close the writing side in the middle of work with the stream, see <xref:System.Net.Quic.QuicStream.CompleteWrites> or <xref:System.Net.Quic.QuicStream.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Boolean,System.Threading.CancellationToken)> overload with `completeWrites` argument. Closing of the writing side lets the peer know that no more data will arrive, yet the peer still can continue sending (in case of a bidirectional stream). This is useful in scenarios like HTTP request/response exchange when the client sends the request and closes the writing side to let the server know that this is the end of the request content. Server is still able to send the response after that, but knows that no more data will arrive from the client. And for erroneous cases, either writing or reading side of the stream can be aborted, see <xref:System.Net.Quic.QuicStream.Abort(System.Net.Quic.QuicAbortDirection,System.Int64)>. The behavior of the individual methods for each stream type is summarized in the following table (note that both client and server can open and accept streams): + +| Method | Peer opening stream | Peer accepting stream | +| --- | --- | --- | +| `CanRead` | _bidirectional_: `true`<br/> _unidirectional_: `false` | `true` | +| `CanWrite` | `true` | _bidirectional_: `true`<br/> _unidirectional_: `false` | +| `ReadAsync` | _bidirectional_: reads data<br/> _unidirectional_: `InvalidOperationException` | reads data | +| `WriteAsync` | sends data => peer read returns the data | _bidirectional_: sends data => peer read returns the data<br/> _unidirectional_: `InvalidOperationException` | +| `CompleteWrites` | closes writing side => peer read returns 0 | _bidirectional_: closes writing side => peer read returns 0<br/> _unidirectional_: no-op | +| `Abort(QuicAbortDirection.Read)` | _bidirectional_: [STOP_SENDING](https://www.rfc-editor.org/rfc/rfc9000#section-19.5) => peer write throws `QuicException(QuicError.OperationAborted)`<br/> _unidirectional_: no-op | [STOP_SENDING](https://www.rfc-editor.org/rfc/rfc9000#section-19.5) => peer write throws `QuicException(QuicError.OperationAborted)`| +| `Abort(QuicAbortDirection.Write)` | [RESET_STREAM](https://www.rfc-editor.org/rfc/rfc9000#section-19.4) => peer read throws `QuicException(QuicError.OperationAborted)` | _bidirectional_: [RESET_STREAM](https://www.rfc-editor.org/rfc/rfc9000#section-19.4) => peer read throws `QuicException(QuicError.OperationAborted)`<br/> _unidirectional_: no-op | + +On top of these methods, `QuicStream` offers two specialized properties to get notified whenever either reading or writing side of the stream has been closed: <xref:System.Net.Quic.QuicStream.ReadsClosed> and <xref:System.Net.Quic.QuicStream.WritesClosed>. Both return a `Task` that completes with its corresponding side getting closed, whether it be success or abort, in which case the `Task` will contain appropriate exception. These properties are useful when the user code needs to know about stream side getting closed without issuing call to `ReadAsync` or `WriteAsync`. + +Finally, when the work with the stream is done, it needs to be disposed with <xref:System.Net.Quic.QuicStream.DisposeAsync>. The dispose will make sure that both reading and/or writing side - depending on the stream type - is closed. If stream hasn't been properly read till the end, dispose will issue an equivalent of `Abort(QuicAbortDirection.Read)`. However, if stream writing side hasn't been closed, it will be gracefully closed as it would be with `CompleteWrites`. The reason for this difference is to make sure that scenarios working with an ordinary `Stream` behave as expected and lead to a successful path. Consider the following example: + +```csharp +// Work done with all different types of streams. +async Task WorkWithStreamAsync(Stream stream) +{ + // This will dispose the stream at the end of the scope. + await using (stream) + { + // Simple echo, read data and send them back. + byte[] buffer = new byte[1024]; + int count = 0; + // The loop stops when read returns 0 bytes as is common for all streams. + while ((count = await stream.ReadAsync(buffer)) > 0) + { + await stream.WriteAsync(buffer.AsMemory(0, count)); + } + } +} + +// Open a QuicStream and pass to the common method. +var quicStream = await connection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); +await WorkWithStreamAsync(quicStream); +``` + +The sample usage of `QuicStream` in client scenario: + +```csharp +// Consider connection from the connection example, open a bidirectional stream. +await using var stream = await connection.OpenStreamAsync(QuicStreamType.Bidirectional, cancellationToken); + +// Send some data. +await stream.WriteAsync(data, cancellationToken); +await stream.WriteAsync(data, cancellationToken); + +// End the writing-side together with the last data. +await stream.WriteAsync(data, endStream: true, cancellationToken); +// Or separately. +stream.CompleteWrites(); + +// Read data until the end of stream. +while (await stream.ReadAsync(buffer, cancellationToken) > 0) +{ + // Handle buffer data... +} + +// DisposeAsync called by await using at the top. +``` + +And the sample usage of `QuicStream` in server scenario: + +```csharp +// Consider connection from the connection example, accept a stream. +await using var stream = await connection.AcceptStreamAsync(cancellationToken); + +if (stream.Type != QuicStreamType.Bidirectional) +{ + Console.WriteLine($"Expected bidirectional stream, got {stream.Type}"); + return; +} + +// Read the data. +while (stream.ReadAsync(buffer, cancellationToken) > 0) +{ + // Handle buffer data... + + // Client completed the writes, the loop might be exited now without another ReadAsync. + if (stream.ReadsCompleted.IsCompleted) + { + break; + } +} + +// Listen for Abort(QuicAbortDirection.Read) from the client. +var writesClosedTask = WritesClosedAsync(stream); +async ValueTask WritesClosedAsync(QuicStream stream) +{ + try + { + await stream.WritesClosed; + } + catch (Exception ex) + { + // Handle peer aborting our writing side ... + } +} + +// DisposeAsync called by await using at the top. +``` + +For more information about how the `QuicStream` was designed, see the [API proposal](https://github.com/dotnet/runtime/issues/69675). + +## See also + +- [Networking in .NET](../overview.md) +- [HTTP/3 with HttpClient](../../../core/extensions/httpclient-http3.md) +- <xref:System.Net.Quic> +- <xref:System.Net.Quic.QuicListener> +- <xref:System.Net.Quic.QuicConnection> +- <xref:System.Net.Quic.QuicStream> diff --git a/docs/fundamentals/networking/snippets/misc/Program.Uri.cs b/docs/fundamentals/networking/snippets/misc/Program.Uri.cs index c88199c317e41..94bdadd97bedd 100644 --- a/docs/fundamentals/networking/snippets/misc/Program.Uri.cs +++ b/docs/fundamentals/networking/snippets/misc/Program.Uri.cs @@ -4,14 +4,14 @@ static void CanonicalUri() { // <canonicaluri> const string uriString = - "https://docs.microsoft.com/en-us/dotnet/path?key=value#bookmark"; + "https://learn.microsoft.com/en-us/dotnet/path?key=value#bookmark"; Uri canonicalUri = new(uriString); Console.WriteLine(canonicalUri.Host); Console.WriteLine(canonicalUri.PathAndQuery); Console.WriteLine(canonicalUri.Fragment); // Sample output: - // docs.microsoft.com + // learn.microsoft.com // /en-us/dotnet/path?key=value // #bookmark // </canonicaluri> diff --git a/docs/fundamentals/networking/websockets.md b/docs/fundamentals/networking/websockets.md index 48e1592b565f9..ab97617044680 100644 --- a/docs/fundamentals/networking/websockets.md +++ b/docs/fundamentals/networking/websockets.md @@ -2,7 +2,6 @@ title: WebSockets support in .NET description: Learn how to web sockets with the ClientWebSockets in .NET. author: greenEkatherine -ms.author: esokolov ms.date: 10/27/2022 --- diff --git a/docs/fundamentals/syslib-diagnostics/obsoletions-overview.md b/docs/fundamentals/syslib-diagnostics/obsoletions-overview.md index 7ddc69e274751..8b4dfbe9de595 100644 --- a/docs/fundamentals/syslib-diagnostics/obsoletions-overview.md +++ b/docs/fundamentals/syslib-diagnostics/obsoletions-overview.md @@ -2,7 +2,7 @@ title: Obsolete features in .NET 5+ titleSuffix: "" description: Learn about APIs that are marked as obsolete in .NET 5 and later versions that produce SYSLIB compiler warnings. -ms.date: 11/07/2022 +ms.date: 01/24/2023 --- # Obsolete features in .NET 5+ @@ -68,6 +68,7 @@ The following table provides an index to the `SYSLIB0XXX` obsoletions in .NET 5+ | [SYSLIB0045](syslib0045.md) | Warning | Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless `Create` factory method on the algorithm type instead. | | [SYSLIB0046](syslib0046.md) | Warning | The <xref:System.Runtime.ControlledExecution.Run(System.Action,System.Threading.CancellationToken)?displayProperty=nameWithType> method might corrupt the process and should not be used in production code. | | [SYSLIB0047](syslib0047.md) | Warning | <xref:System.Xml.XmlSecureResolver> is obsolete. Use `XmlResolver.ThrowingResolver` instead when attempting to forbid XML external entity resolution. | +| [SYSLIB0048](syslib0048.md) | Warning | <xref:System.Security.Cryptography.RSA.EncryptValue(System.Byte[])?displayProperty=nameWithType> and <xref:System.Security.Cryptography.RSA.DecryptValue(System.Byte[])?displayProperty=nameWithType> are obsolete. Use <xref:System.Security.Cryptography.RSA.Encrypt%2A?displayProperty=nameWithType> and <xref:System.Security.Cryptography.RSA.Decrypt%2A?displayProperty=nameWithType> instead. | ## Suppress warnings diff --git a/docs/fundamentals/syslib-diagnostics/syslib0036.md b/docs/fundamentals/syslib-diagnostics/syslib0036.md index 99f03da4dac3f..e44c775d8308a 100644 --- a/docs/fundamentals/syslib-diagnostics/syslib0036.md +++ b/docs/fundamentals/syslib-diagnostics/syslib0036.md @@ -11,7 +11,19 @@ In .NET 5, .NET 6, and all versions of .NET Core, <xref:System.Text.RegularExpre ## Workaround -Use the `RegexGeneratorAttribute` feature, which invokes a regular expression source generator. At compile time, the source generator produces an API specific to a regular expression pattern and its options. +Use the <xref:System.Text.RegularExpressions.GeneratedRegexAttribute> attribute, which invokes a regular expression source generator. At compile time, the source generator produces an API specific to a regular expression pattern and its options. + + ```csharp + // This attribute causes the regular expression pattern to be compiled into your assembly, + // which enables it to start up and run more quickly. + [GeneratedRegex("abc|def", RegexOptions.IgnoreCase)] + private static partial Regex MyRegex(); + + // ... + + // Use the regular expression + if (MyRegex().IsMatch(text) { ... } + ``` ## Suppress a warning diff --git a/docs/fundamentals/syslib-diagnostics/syslib0048.md b/docs/fundamentals/syslib-diagnostics/syslib0048.md new file mode 100644 index 0000000000000..527b31c645e80 --- /dev/null +++ b/docs/fundamentals/syslib-diagnostics/syslib0048.md @@ -0,0 +1,51 @@ +--- +title: SYSLIB0048 warning - RSA.EncryptValue and DecryptValue are obsolete +description: Learn about the obsoletion of the RSA.EncryptValue and RSA.DecryptValue methods that generates compile-time warning SYSLIB0048. +ms.date: 04/08/2022 +--- +# SYSLIB0048: RSA.EncryptValue and DecryptValue are obsolete + +The following methods are obsolete, starting in .NET 8. Calling them in code generates warning `SYSLIB0048` at compile time. + +- <xref:System.Security.Cryptography.RSA.EncryptValue(System.Byte[])?displayProperty=fullName> +- <xref:System.Security.Cryptography.RSA.DecryptValue(System.Byte[])?displayProperty=fullName> +- <xref:System.Security.Cryptography.RSACryptoServiceProvider.EncryptValue(System.Byte[])?displayProperty=fullName> +- <xref:System.Security.Cryptography.RSACryptoServiceProvider.DecryptValue(System.Byte[])?displayProperty=fullName> + +## Workaround + +Use <xref:System.Security.Cryptography.RSA.Encrypt%2A?displayProperty=nameWithType> and <xref:System.Security.Cryptography.RSA.Decrypt%2A?displayProperty=nameWithType> instead. + +## Suppress a warning + +If you must use the obsolete APIs, you can suppress the warning in code or in your project file. + +To suppress only a single violation, add preprocessor directives to your source file to disable and then re-enable the warning. + +```csharp +// Disable the warning. +#pragma warning disable SYSLIB0048 + +// Code that uses obsolete API. +// ... + +// Re-enable the warning. +#pragma warning restore SYSLIB0048 +``` + +To suppress all the `SYSLIB0048` warnings in your project, add a `<NoWarn>` property to your project file. + +```xml +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + ... + <NoWarn>$(NoWarn);SYSLIB0048</NoWarn> + </PropertyGroup> +</Project> +``` + +For more information, see [Suppress warnings](obsoletions-overview.md#suppress-warnings). + +## See also + +- [RSA.EncryptValue and RSA.DecryptValue are obsolete](../../core/compatibility/cryptography/8.0/rsa-encrypt-decrypt-value-obsolete.md) diff --git a/docs/fundamentals/toc.yml b/docs/fundamentals/toc.yml index 8e9c876a96272..5b34c025e0aec 100644 --- a/docs/fundamentals/toc.yml +++ b/docs/fundamentals/toc.yml @@ -1,5 +1,5 @@ items: -- name: .NET documentation +- name: .NET fundamentals documentation href: index.yml - name: Get started items: @@ -22,7 +22,19 @@ items: - name: Overview href: ../core/install/linux.md - name: Ubuntu - href: ../core/install/linux-ubuntu.md + items: + - name: Overview + href: ../core/install/linux-ubuntu.md + - name: "22.10" + href: ../core/install/linux-ubuntu-2210.md + - name: "22.04" + href: ../core/install/linux-ubuntu-2204.md + - name: "20.04" + href: ../core/install/linux-ubuntu-2004.md + - name: "18.04" + href: ../core/install/linux-ubuntu-1804.md + - name: "16.04" + href: ../core/install/linux-ubuntu-1604.md - name: Alpine href: ../core/install/linux-alpine.md - name: CentOS @@ -59,6 +71,8 @@ items: items: - name: Introduction to .NET href: ../core/introduction.md + - name: .NET languages + href: ../fundamentals/languages.md - name: .NET implementations href: ../fundamentals/implementations.md - name: .NET class libraries @@ -145,6 +159,12 @@ items: href: ../core/tutorials/index.md - name: What's new in .NET items: + - name: .NET 8 + items: + - name: What's new + href: ../core/whats-new/dotnet-8.md + - name: Breaking changes + href: ../core/compatibility/8.0.md?toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json - name: .NET 7 items: - name: What's new @@ -187,1957 +207,6 @@ items: href: ../core/whats-new/dotnet-core-2-0.md - name: .NET Standard href: ../standard/whats-new/whats-new-in-dotnet-standard.md -- name: Tools and diagnostics - items: - - name: Overview - displayName: diagnostics,tools,tooling,productivity,instrumentation - href: tools-and-productivity.md - - name: .NET SDK - items: - - name: Overview - displayName: '.net sdk,software development kit,software dev kit,tool' - href: ../core/sdk.md - - name: Environment variables - href: ../core/tools/dotnet-environment-variables.md - - name: dotnet-install scripts - href: ../core/tools/dotnet-install-script.md - - name: global.json overview - href: ../core/tools/global-json.md - - name: Telemetry - href: ../core/tools/telemetry.md - - name: Signed-package verification - href: ../core/tools/nuget-signed-package-verification.md - - name: Error messages - items: - - name: List of all SDK errors - href: ../core/tools/sdk-errors/index.md - - name: NETSDK1004 - href: ../core/tools/sdk-errors/netsdk1004.md - - name: NETSDK1005 and NETSDK1047 - href: ../core/tools/sdk-errors/netsdk1005.md - - name: NETSDK1013 - href: ../core/tools/sdk-errors/netsdk1013.md - - name: NETSDK1022 - href: ../core/tools/sdk-errors/netsdk1022.md - - name: NETSDK1045 - href: ../core/tools/sdk-errors/netsdk1045.md - - name: NETSDK1059 - href: ../core/tools/sdk-errors/netsdk1059.md - - name: NETSDK1064 - href: ../core/tools/sdk-errors/netsdk1064.md - - name: NETSDK1071 - href: ../core/tools/sdk-errors/netsdk1071.md - - name: NETSDK1073 - href: ../core/tools/sdk-errors/netsdk1073.md - - name: NETSDK1079 - href: ../core/tools/sdk-errors/netsdk1079.md - - name: NETSDK1080 - href: ../core/tools/sdk-errors/netsdk1080.md - - name: NETSDK1082 - href: ../core/tools/sdk-errors/netsdk1082.md - - name: NETSDK1100 - href: ../core/tools/sdk-errors/netsdk1100.md - - name: NETSDK1112 - href: ../core/tools/sdk-errors/netsdk1112.md - - name: NETSDK1130 - href: ../core/tools/sdk-errors/netsdk1130.md - - name: NETSDK1135 - href: ../core/tools/sdk-errors/netsdk1135.md - - name: NETSDK1136 - href: ../core/tools/sdk-errors/netsdk1136.md - - name: NETSDK1137 - href: ../core/tools/sdk-errors/netsdk1137.md - - name: NETSDK1138 - href: ../core/tools/sdk-errors/netsdk1138.md - - name: NETSDK1141 - href: ../core/tools/sdk-errors/netsdk1141.md - - name: NETSDK1145 - href: ../core/tools/sdk-errors/netsdk1145.md - - name: NETSDK1147 - href: ../core/tools/sdk-errors/netsdk1147.md - - name: NETSDK1149 - href: ../core/tools/sdk-errors/netsdk1149.md - - name: NETSDK1174 - href: ../core/tools/sdk-errors/netsdk1174.md - - name: NETSDK1182 - href: ../core/tools/sdk-errors/netsdk1182.md - - name: .NET CLI - items: - - name: Overview - displayName: '.net cli,command-line interface,cli,tool' - href: ../core/tools/index.md - - name: dotnet command reference - items: - - name: dotnet - href: ../core/tools/dotnet.md - - name: dotnet add/list/remove package - items: - - name: dotnet add package - href: ../core/tools/dotnet-add-package.md - - name: dotnet list package - href: ../core/tools/dotnet-list-package.md - - name: dotnet remove package - href: ../core/tools/dotnet-remove-package.md - - name: dotnet add/list/remove reference - items: - - name: dotnet add reference - href: ../core/tools/dotnet-add-reference.md - - name: dotnet list reference - href: ../core/tools/dotnet-list-reference.md - - name: dotnet remove reference - href: ../core/tools/dotnet-remove-reference.md - - name: dotnet build - href: ../core/tools/dotnet-build.md - - name: dotnet build-server - href: ../core/tools/dotnet-build-server.md - - name: dotnet clean - href: ../core/tools/dotnet-clean.md - - name: dotnet dev-certs - href: ../core/tools/dotnet-dev-certs.md - - name: dotnet format - href: ../core/tools/dotnet-format.md - - name: dotnet help - href: ../core/tools/dotnet-help.md - - name: dotnet migrate - href: ../core/tools/dotnet-migrate.md - - name: dotnet msbuild - href: ../core/tools/dotnet-msbuild.md - - name: dotnet new - items: - - name: dotnet new <TEMPLATE> - href: ../core/tools/dotnet-new.md - - name: dotnet new list - href: ../core/tools/dotnet-new-list.md - - name: dotnet new search - href: ../core/tools/dotnet-new-search.md - - name: dotnet new install - href: ../core/tools/dotnet-new-install.md - - name: dotnet new uninstall - href: ../core/tools/dotnet-new-uninstall.md - - name: dotnet new update - href: ../core/tools/dotnet-new-update.md - - name: .NET default templates - href: ../core/tools/dotnet-new-sdk-templates.md - - name: Custom templates - href: ../core/tools/custom-templates.md - - name: dotnet nuget - items: - - name: dotnet nuget delete - href: ../core/tools/dotnet-nuget-delete.md - - name: dotnet nuget locals - href: ../core/tools/dotnet-nuget-locals.md - - name: dotnet nuget push - href: ../core/tools/dotnet-nuget-push.md - - name: dotnet nuget add source - href: ../core/tools/dotnet-nuget-add-source.md - - name: dotnet nuget disable source - href: ../core/tools/dotnet-nuget-disable-source.md - - name: dotnet nuget enable source - href: ../core/tools/dotnet-nuget-enable-source.md - - name: dotnet nuget list source - href: ../core/tools/dotnet-nuget-list-source.md - - name: dotnet nuget remove source - href: ../core/tools/dotnet-nuget-remove-source.md - - name: dotnet nuget update source - href: ../core/tools/dotnet-nuget-update-source.md - - name: dotnet nuget verify - href: ../core/tools/dotnet-nuget-verify.md - - name: dotnet nuget trust - href: ../core/tools/dotnet-nuget-trust.md - - name: dotnet nuget sign - href: ../core/tools/dotnet-nuget-sign.md - - name: dotnet pack - href: ../core/tools/dotnet-pack.md - - name: dotnet publish - href: ../core/tools/dotnet-publish.md - - name: dotnet restore - href: ../core/tools/dotnet-restore.md - - name: dotnet run - href: ../core/tools/dotnet-run.md - - name: dotnet sdk check - href: ../core/tools/dotnet-sdk-check.md - - name: dotnet sln - href: ../core/tools/dotnet-sln.md - - name: dotnet store - href: ../core/tools/dotnet-store.md - - name: dotnet test - href: ../core/tools/dotnet-test.md - - name: dotnet tool - items: - - name: dotnet tool install - href: ../core/tools/dotnet-tool-install.md - - name: dotnet tool list - href: ../core/tools/dotnet-tool-list.md - - name: dotnet tool restore - href: ../core/tools/dotnet-tool-restore.md - - name: dotnet tool run - href: ../core/tools/dotnet-tool-run.md - - name: dotnet tool search - href: ../core/tools/dotnet-tool-search.md - - name: dotnet tool uninstall - href: ../core/tools/dotnet-tool-uninstall.md - - name: dotnet tool update - href: ../core/tools/dotnet-tool-update.md - - name: dotnet vstest - href: ../core/tools/dotnet-vstest.md - - name: dotnet watch - displayName: hot reload - href: ../core/tools/dotnet-watch.md - - name: dotnet workload - items: - - name: dotnet workload - href: ../core/tools/dotnet-workload.md - - name: dotnet workload install - href: ../core/tools/dotnet-workload-install.md - - name: dotnet workload list - href: ../core/tools/dotnet-workload-list.md - - name: dotnet workload repair - href: ../core/tools/dotnet-workload-repair.md - - name: dotnet workload restore - href: ../core/tools/dotnet-workload-restore.md - - name: dotnet workload search - href: ../core/tools/dotnet-workload-search.md - - name: dotnet workload uninstall - href: ../core/tools/dotnet-workload-uninstall.md - - name: dotnet workload update - href: ../core/tools/dotnet-workload-update.md - - name: Elevated access - href: ../core/tools/elevated-access.md - - name: Enable Tab completion - href: ../core/tools/enable-tab-autocomplete.md - - name: Develop libraries with the CLI - href: ../core/tutorials/libraries.md - - name: Create templates for the CLI - items: - - name: 1 - Create an item template - href: ../core/tutorials/cli-templates-create-item-template.md - displayName: tutorials, cli - - name: 2 - Create a project template - href: ../core/tutorials/cli-templates-create-project-template.md - displayName: tutorials, cli - - name: 3 - Create a template package - href: ../core/tutorials/cli-templates-create-template-package.md - displayName: tutorials, cli - - name: SYSLIB diagnostics - items: - - name: Obsoletions - items: - - name: Overview - displayName: syslib, obsolete, obsoletion - href: syslib-diagnostics/obsoletions-overview.md - - name: SYSLIB0001 - href: syslib-diagnostics/syslib0001.md - - name: SYSLIB0002 - href: syslib-diagnostics/syslib0002.md - - name: SYSLIB0003 - href: syslib-diagnostics/syslib0003.md - - name: SYSLIB0004 - href: syslib-diagnostics/syslib0004.md - - name: SYSLIB0005 - href: syslib-diagnostics/syslib0005.md - - name: SYSLIB0006 - href: syslib-diagnostics/syslib0006.md - - name: SYSLIB0007 - href: syslib-diagnostics/syslib0007.md - - name: SYSLIB0008 - href: syslib-diagnostics/syslib0008.md - - name: SYSLIB0009 - href: syslib-diagnostics/syslib0009.md - - name: SYSLIB0010 - href: syslib-diagnostics/syslib0010.md - - name: SYSLIB0011 - href: syslib-diagnostics/syslib0011.md - - name: SYSLIB0012 - href: syslib-diagnostics/syslib0012.md - - name: SYSLIB0013 - href: syslib-diagnostics/syslib0013.md - - name: SYSLIB0014 - href: syslib-diagnostics/syslib0014.md - - name: SYSLIB0015 - href: syslib-diagnostics/syslib0015.md - - name: SYSLIB0016 - href: syslib-diagnostics/syslib0016.md - - name: SYSLIB0017 - href: syslib-diagnostics/syslib0017.md - - name: SYSLIB0018 - href: syslib-diagnostics/syslib0018.md - - name: SYSLIB0019 - href: syslib-diagnostics/syslib0019.md - - name: SYSLIB0020 - href: syslib-diagnostics/syslib0020.md - - name: SYSLIB0021 - href: syslib-diagnostics/syslib0021.md - - name: SYSLIB0022 - href: syslib-diagnostics/syslib0022.md - - name: SYSLIB0023 - href: syslib-diagnostics/syslib0023.md - - name: SYSLIB0024 - href: syslib-diagnostics/syslib0024.md - - name: SYSLIB0025 - href: syslib-diagnostics/syslib0025.md - - name: SYSLIB0026 - href: syslib-diagnostics/syslib0026.md - - name: SYSLIB0027 - href: syslib-diagnostics/syslib0027.md - - name: SYSLIB0028 - href: syslib-diagnostics/syslib0028.md - - name: SYSLIB0029 - href: syslib-diagnostics/syslib0029.md - - name: SYSLIB0030 - href: syslib-diagnostics/syslib0030.md - - name: SYSLIB0031 - href: syslib-diagnostics/syslib0031.md - - name: SYSLIB0032 - href: syslib-diagnostics/syslib0032.md - - name: SYSLIB0033 - href: syslib-diagnostics/syslib0033.md - - name: SYSLIB0034 - href: syslib-diagnostics/syslib0034.md - - name: SYSLIB0035 - href: syslib-diagnostics/syslib0035.md - - name: SYSLIB0036 - href: syslib-diagnostics/syslib0036.md - - name: SYSLIB0037 - href: syslib-diagnostics/syslib0037.md - - name: SYSLIB0038 - href: syslib-diagnostics/syslib0038.md - - name: SYSLIB0039 - href: syslib-diagnostics/syslib0039.md - - name: SYSLIB0040 - href: syslib-diagnostics/syslib0040.md - - name: SYSLIB0041 - href: syslib-diagnostics/syslib0041.md - - name: SYSLIB0042 - href: syslib-diagnostics/syslib0042.md - - name: SYSLIB0043 - href: syslib-diagnostics/syslib0043.md - - name: SYSLIB0044 - href: syslib-diagnostics/syslib0044.md - - name: SYSLIB0045 - href: syslib-diagnostics/syslib0045.md - - name: SYSLIB0046 - href: syslib-diagnostics/syslib0046.md - - name: SYSLIB0047 - href: syslib-diagnostics/syslib0047.md - - name: Source-generated code - items: - - name: Overview - displayName: syslib, diagnostic, diagnostics, source generator - href: syslib-diagnostics/source-generator-overview.md - - name: SYSLIB1001 - href: syslib-diagnostics/syslib1001.md - - name: SYSLIB1002 - href: syslib-diagnostics/syslib1002.md - - name: SYSLIB1003 - href: syslib-diagnostics/syslib1003.md - - name: SYSLIB1005 - href: syslib-diagnostics/syslib1005.md - - name: SYSLIB1006 - href: syslib-diagnostics/syslib1006.md - - name: SYSLIB1007 - href: syslib-diagnostics/syslib1007.md - - name: SYSLIB1008 - href: syslib-diagnostics/syslib1008.md - - name: SYSLIB1009 - href: syslib-diagnostics/syslib1009.md - - name: SYSLIB1010 - href: syslib-diagnostics/syslib1010.md - - name: SYSLIB1011 - href: syslib-diagnostics/syslib1011.md - - name: SYSLIB1012 - href: syslib-diagnostics/syslib1012.md - - name: SYSLIB1013 - href: syslib-diagnostics/syslib1013.md - - name: SYSLIB1014 - href: syslib-diagnostics/syslib1014.md - - name: SYSLIB1015 - href: syslib-diagnostics/syslib1015.md - - name: SYSLIB1016 - href: syslib-diagnostics/syslib1016.md - - name: SYSLIB1017 - href: syslib-diagnostics/syslib1017.md - - name: SYSLIB1018 - href: syslib-diagnostics/syslib1018.md - - name: SYSLIB1019 - href: syslib-diagnostics/syslib1019.md - - name: SYSLIB1020 - href: syslib-diagnostics/syslib1020.md - - name: SYSLIB1021 - href: syslib-diagnostics/syslib1021.md - - name: SYSLIB1022 - href: syslib-diagnostics/syslib1022.md - - name: SYSLIB1023 - href: syslib-diagnostics/syslib1023.md - - name: SYSLIB1030 - href: syslib-diagnostics/syslib1030.md - - name: SYSLIB1031 - href: syslib-diagnostics/syslib1031.md - - name: SYSLIB1032 - href: syslib-diagnostics/syslib1032.md - - name: SYSLIB1033 - href: syslib-diagnostics/syslib1033.md - - name: SYSLIB1035 - href: syslib-diagnostics/syslib1035.md - - name: SYSLIB1036 - href: syslib-diagnostics/syslib1036.md - - name: SYSLIB1037 - href: syslib-diagnostics/syslib1037.md - - name: SYSLIB1038 - href: syslib-diagnostics/syslib1038.md - - name: SYSLIB1040 - href: syslib-diagnostics/syslib1040-1049.md - - name: SYSLIB1041 - href: syslib-diagnostics/syslib1040-1049.md - - name: SYSLIB1042 - href: syslib-diagnostics/syslib1040-1049.md - - name: SYSLIB1043 - href: syslib-diagnostics/syslib1040-1049.md - - name: SYSLIB1044 - href: syslib-diagnostics/syslib1040-1049.md - - name: SYSLIB1045 - href: syslib-diagnostics/syslib1040-1049.md - - name: SYSLIB1050 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1051 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1052 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1053 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1054 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1055 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1056 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1057 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1058 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1059 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1060 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1061 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1062 - href: syslib-diagnostics/syslib1050-1069.md - - name: SYSLIB1070 - href: syslib-diagnostics/syslib1070-1089.md - - name: SYSLIB1071 - href: syslib-diagnostics/syslib1070-1089.md - - name: SYSLIB1072 - href: syslib-diagnostics/syslib1070-1089.md - - name: SYSLIB1073 - href: syslib-diagnostics/syslib1070-1089.md - - name: SYSLIB1074 - href: syslib-diagnostics/syslib1070-1089.md - - name: SYSLIB1075 - href: syslib-diagnostics/syslib1070-1089.md - - name: Integrated development environments (IDEs) - items: - - name: Visual Studio - displayName: ide,integrated development environment,vs - href: /visualstudio/windows/?toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json - - name: Visual Studio for Mac - displayName: ide,integrated development environment,vs for mac,macOS,Mac - href: /visualstudio/mac/?toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json - - name: Visual Studio Code - displayName: ide,integrated development environment,code,vs code,oss ide, - href: https://code.visualstudio.com/docs - - name: MSBuild and project files - items: - - name: Project SDKs - items: - - name: Overview - href: ../core/project-sdk/overview.md - - name: Reference - items: - - name: Microsoft.NET.Sdk - displayName: msbuild, msbuild properties - href: ../core/project-sdk/msbuild-props.md - - name: Microsoft.NET.Sdk.Web - href: /aspnet/core/razor-pages/web-sdk?toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json - - name: Microsoft.NET.Sdk.Razor - href: /aspnet/core/razor-pages/sdk?toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json - - name: Microsoft.NET.Sdk.Desktop - href: ../core/project-sdk/msbuild-props-desktop.md - - name: Target frameworks - href: ../standard/frameworks.md - - name: Dependency management - href: ../core/tools/dependencies.md - - name: Global and local tools - items: - - name: Manage tools - displayName: global tool,local tool - href: ../core/tools/global-tools.md - - name: Troubleshoot tools - displayName: global tool troubleshooting,local tool troubleshooting, - href: ../core/tools/troubleshoot-usage-issues.md - - name: Create tools for the CLI - items: - - name: 1 - Create a tool - displayName: tools,tutorials,cli,create global tool,create local tool - href: ../core/tools/global-tools-how-to-create.md - - name: 2 - Use a global tool - displayName: tools,tutorials,cli,understand global tool - href: ../core/tools/global-tools-how-to-use.md - - name: 3 - Use a local tool - href: ../core/tools/local-tools-how-to-use.md - displayName: tools,tutorials,cli,local tool - - name: Additional tools - items: - - name: Overview - href: ../core/additional-tools/index.md - - name: .NET uninstall tool - href: ../core/additional-tools/uninstall-tool.md - - name: .NET install tool for extension authors - href: ../core/additional-tools/vscode-dotnet-runtime.md - - name: Generate self-signed certificates - href: ../core/additional-tools/self-signed-certificates-guide.md - - name: WCF web service reference provider - href: ../core/additional-tools/wcf-web-service-reference-guide.md - - name: WCF service utility - displayName: dotnet-svcutil - href: ../core/additional-tools/dotnet-svcutil-guide.md - - name: WCF service XML serializer - displayName: dotnet-svcutil.xmlserializer - href: ../core/additional-tools/dotnet-svcutil.xmlserializer-guide.md - - name: XML serializer generator - displayName: sgen,sgen.exe,Microsoft.XmlSerializer.Generator,XmlSerializer - href: ../core/additional-tools/xml-serializer-generator.md - - name: Diagnostics and instrumentation - items: - - name: Overview - href: ../core/diagnostics/index.md - - name: Managed debuggers - href: ../core/diagnostics/managed-debuggers.md - - name: Diagnostic port - href: ../core/diagnostics/diagnostic-port.md - - name: Dumps - items: - - name: Overview - displayName: dumps - href: ../core/diagnostics/dumps.md - - name: Linux dumps - href: ../core/diagnostics/debug-linux-dumps.md - - name: SOS debugger extension - href: ../core/diagnostics/sos-debugging-extension.md - - name: Dumps FAQ - .NET - href: ../core/diagnostics/faq-dumps.yml - - name: Logging and tracing - items: - - name: Overview - displayName: logging tracing - href: ../core/diagnostics/logging-tracing.md - - name: Well-known event providers - href: ../core/diagnostics/well-known-event-providers.md - - name: Event Source - items: - - name: Overview - href: ../core/diagnostics/eventsource.md - - name: Getting started - href: ../core/diagnostics/eventsource-getting-started.md - - name: Instrumentation - href: ../core/diagnostics/eventsource-instrumentation.md - - name: Collection - href: ../core/diagnostics/eventsource-collect-and-view-traces.md - - name: Activity IDs - href: ../core/diagnostics/eventsource-activity-ids.md - - name: DiagnosticSource and DiagnosticListener - items: - - name: Getting started - href: ../core/diagnostics/diagnosticsource-diagnosticlistener.md - - name: EventPipe - href: ../core/diagnostics/eventpipe.md - - name: Metrics - items: - - name: Overview - displayName: metrics - href: ../core/diagnostics/metrics.md - - name: Instrumentation - href: ../core/diagnostics/metrics-instrumentation.md - - name: Collection - href: ../core/diagnostics/metrics-collection.md - - name: EventCounters - items: - - name: Overview - displayName: eventcounter - href: ../core/diagnostics/event-counters.md - - name: Well-known counters - href: ../core/diagnostics/available-counters.md - - name: "Tutorial: Measure performance with EventCounters" - href: ../core/diagnostics/event-counter-perf.md - - name: Compare metric APIs - href: ../core/diagnostics/compare-metric-apis.md - - name: Distributed tracing - items: - - name: Overview - href: ../core/diagnostics/distributed-tracing.md - - name: Concepts - href: ../core/diagnostics/distributed-tracing-concepts.md - - name: Instrumentation - href: ../core/diagnostics/distributed-tracing-instrumentation-walkthroughs.md - - name: Collection - href: ../core/diagnostics/distributed-tracing-collection-walkthroughs.md - - name: Symbols - href: ../core/diagnostics/symbols.md - - name: Microsoft.Diagnostics.NETCore.Client library - items: - - name: Overview and examples - displayName: diagnostics client library - href: ../core/diagnostics/diagnostics-client-library.md - - name: API reference - href: ../core/diagnostics/microsoft-diagnostics-netcore-client.md - - name: Runtime events - items: - - name: Overview - href: ../fundamentals/diagnostics/runtime-events.md - - name: Contention events - href: ../fundamentals/diagnostics/runtime-contention-events.md - - name: Exception events - href: ../fundamentals/diagnostics/runtime-exception-events.md - - name: Garbage collection events - href: ../fundamentals/diagnostics/runtime-garbage-collection-events.md - - name: Interop events - href: ../fundamentals/diagnostics/runtime-interop-events.md - - name: Loader and binder events - href: ../fundamentals/diagnostics/runtime-loader-binder-events.md - - name: Method events - href: ../fundamentals/diagnostics/runtime-method-events.md - - name: ThreadPool events - href: ../fundamentals/diagnostics/runtime-thread-events.md - - name: Type-system events - href: ../fundamentals/diagnostics/runtime-type-events.md - - name: Collect diagnostics in containers - href: ../core/diagnostics/diagnostics-in-containers.md - - name: .NET CLI global tools - items: - - name: dotnet-counters - href: ../core/diagnostics/dotnet-counters.md - - name: dotnet-coverage - href: ../core/additional-tools/dotnet-coverage.md - - name: dotnet-dump - href: ../core/diagnostics/dotnet-dump.md - - name: dotnet-gcdump - href: ../core/diagnostics/dotnet-gcdump.md - - name: dotnet-monitor - href: ../core/diagnostics/dotnet-monitor.md - - name: dotnet-trace - href: ../core/diagnostics/dotnet-trace.md - - name: dotnet-stack - href: ../core/diagnostics/dotnet-stack.md - - name: dotnet-symbol - href: ../core/diagnostics/dotnet-symbol.md - - name: dotnet-sos - href: ../core/diagnostics/dotnet-sos.md - - name: dotnet-dsrouter - href: ../core/diagnostics/dotnet-dsrouter.md - - name: .NET diagnostics tutorials - items: - - name: Collect performance trace in Linux with PerfCollect - href: ../core/diagnostics/trace-perfcollect-lttng.md - - name: Debug a memory leak - href: ../core/diagnostics/debug-memory-leak.md - - name: Debug high CPU usage - href: ../core/diagnostics/debug-highcpu.md - - name: Debug deadlock - href: ../core/diagnostics/debug-deadlock.md - - name: Debug thread-pool starvation - href: ../core/diagnostics/debug-threadpool-starvation.md - - name: Debug a stack overflow - href: ../core/diagnostics/debug-stackoverflow.md - - name: Code analysis - items: - - name: Overview - href: code-analysis/overview.md - displayName: code analysis, analyzers - - name: Configuration - items: - - name: General options - href: code-analysis/configuration-options.md - - name: Configuration files - href: code-analysis/configuration-files.md - - name: How to suppress warnings - href: code-analysis/suppress-warnings.md - - name: Code quality rules - items: - - name: Rule options - href: code-analysis/code-quality-rule-options.md - - name: Predefined configurations - href: code-analysis/predefined-configurations.md - - name: Code style rules - items: - - name: Rule options - href: code-analysis/code-style-rule-options.md - - name: Rule reference - items: - - name: Categories - href: code-analysis/categories.md - - name: Code quality rules - items: - - name: Overview - href: code-analysis/quality-rules/index.md - - name: Design rules - items: - - name: Overview - displayName: "design rules" - href: code-analysis/quality-rules/design-warnings.md - - name: CA1000 - href: code-analysis/quality-rules/ca1000.md - - name: CA1001 - href: code-analysis/quality-rules/ca1001.md - - name: CA1002 - href: code-analysis/quality-rules/ca1002.md - - name: CA1003 - href: code-analysis/quality-rules/ca1003.md - - name: CA1005 - href: code-analysis/quality-rules/ca1005.md - - name: CA1008 - href: code-analysis/quality-rules/ca1008.md - - name: CA1010 - href: code-analysis/quality-rules/ca1010.md - - name: CA1012 - href: code-analysis/quality-rules/ca1012.md - - name: CA1014 - href: code-analysis/quality-rules/ca1014.md - - name: CA1016 - href: code-analysis/quality-rules/ca1016.md - - name: CA1017 - href: code-analysis/quality-rules/ca1017.md - - name: CA1018 - href: code-analysis/quality-rules/ca1018.md - - name: CA1019 - href: code-analysis/quality-rules/ca1019.md - - name: CA1021 - href: code-analysis/quality-rules/ca1021.md - - name: CA1024 - href: code-analysis/quality-rules/ca1024.md - - name: CA1027 - href: code-analysis/quality-rules/ca1027.md - - name: CA1028 - href: code-analysis/quality-rules/ca1028.md - - name: CA1030 - href: code-analysis/quality-rules/ca1030.md - - name: CA1031 - href: code-analysis/quality-rules/ca1031.md - - name: CA1032 - href: code-analysis/quality-rules/ca1032.md - - name: CA1033 - href: code-analysis/quality-rules/ca1033.md - - name: CA1034 - href: code-analysis/quality-rules/ca1034.md - - name: CA1036 - href: code-analysis/quality-rules/ca1036.md - - name: CA1040 - href: code-analysis/quality-rules/ca1040.md - - name: CA1041 - href: code-analysis/quality-rules/ca1041.md - - name: CA1043 - href: code-analysis/quality-rules/ca1043.md - - name: CA1044 - href: code-analysis/quality-rules/ca1044.md - - name: CA1045 - href: code-analysis/quality-rules/ca1045.md - - name: CA1046 - href: code-analysis/quality-rules/ca1046.md - - name: CA1047 - href: code-analysis/quality-rules/ca1047.md - - name: CA1050 - href: code-analysis/quality-rules/ca1050.md - - name: CA1051 - href: code-analysis/quality-rules/ca1051.md - - name: CA1052 - href: code-analysis/quality-rules/ca1052.md - - name: CA1053 - href: code-analysis/quality-rules/ca1053.md - - name: CA1054 - href: code-analysis/quality-rules/ca1054.md - - name: CA1055 - href: code-analysis/quality-rules/ca1055.md - - name: CA1056 - href: code-analysis/quality-rules/ca1056.md - - name: CA1058 - href: code-analysis/quality-rules/ca1058.md - - name: CA1060 - href: code-analysis/quality-rules/ca1060.md - - name: CA1061 - href: code-analysis/quality-rules/ca1061.md - - name: CA1062 - href: code-analysis/quality-rules/ca1062.md - - name: CA1063 - href: code-analysis/quality-rules/ca1063.md - - name: CA1064 - href: code-analysis/quality-rules/ca1064.md - - name: CA1065 - href: code-analysis/quality-rules/ca1065.md - - name: CA1066 - href: code-analysis/quality-rules/ca1066.md - - name: CA1067 - href: code-analysis/quality-rules/ca1067.md - - name: CA1068 - href: code-analysis/quality-rules/ca1068.md - - name: CA1069 - href: code-analysis/quality-rules/ca1069.md - - name: CA1070 - href: code-analysis/quality-rules/ca1070.md - - name: Documentation rules - items: - - name: Overview - displayName: "documentation rules" - href: code-analysis/quality-rules/documentation-warnings.md - - name: CA1200 - href: code-analysis/quality-rules/ca1200.md - - name: Globalization rules - items: - - name: Overview - displayName: "globalization rules" - href: code-analysis/quality-rules/globalization-warnings.md - - name: CA1303 - href: code-analysis/quality-rules/ca1303.md - - name: CA1304 - href: code-analysis/quality-rules/ca1304.md - - name: CA1305 - href: code-analysis/quality-rules/ca1305.md - - name: CA1307 - href: code-analysis/quality-rules/ca1307.md - - name: CA1308 - href: code-analysis/quality-rules/ca1308.md - - name: CA1309 - href: code-analysis/quality-rules/ca1309.md - - name: CA1310 - href: code-analysis/quality-rules/ca1310.md - - name: CA1311 - href: code-analysis/quality-rules/ca1311.md - - name: CA2101 - href: code-analysis/quality-rules/ca2101.md - - name: Portability and interoperability rules - items: - - name: Overview - displayName: "portability and interoperability rules" - href: code-analysis/quality-rules/interoperability-warnings.md - - name: CA1401 - href: code-analysis/quality-rules/ca1401.md - - name: CA1416 - href: code-analysis/quality-rules/ca1416.md - - name: CA1417 - href: code-analysis/quality-rules/ca1417.md - - name: CA1418 - href: code-analysis/quality-rules/ca1418.md - - name: CA1419 - href: code-analysis/quality-rules/ca1419.md - - name: CA1420 - href: code-analysis/quality-rules/ca1420.md - - name: CA1421 - href: code-analysis/quality-rules/ca1421.md - - name: CA1422 - href: code-analysis/quality-rules/ca1422.md - - name: Maintainability rules - items: - - name: Overview - displayName: "maintainability rules" - href: code-analysis/quality-rules/maintainability-warnings.md - - name: CA1501 - href: code-analysis/quality-rules/ca1501.md - - name: CA1502 - href: code-analysis/quality-rules/ca1502.md - - name: CA1505 - href: code-analysis/quality-rules/ca1505.md - - name: CA1506 - href: code-analysis/quality-rules/ca1506.md - - name: CA1507 - href: code-analysis/quality-rules/ca1507.md - - name: CA1508 - href: code-analysis/quality-rules/ca1508.md - - name: CA1509 - href: code-analysis/quality-rules/ca1509.md - - name: Naming rules - items: - - name: Overview - displayName: "naming rules" - href: code-analysis/quality-rules/naming-warnings.md - - name: CA1700 - href: code-analysis/quality-rules/ca1700.md - - name: CA1707 - href: code-analysis/quality-rules/ca1707.md - - name: CA1708 - href: code-analysis/quality-rules/ca1708.md - - name: CA1710 - href: code-analysis/quality-rules/ca1710.md - - name: CA1711 - href: code-analysis/quality-rules/ca1711.md - - name: CA1712 - href: code-analysis/quality-rules/ca1712.md - - name: CA1713 - href: code-analysis/quality-rules/ca1713.md - - name: CA1714 - href: code-analysis/quality-rules/ca1714.md - - name: CA1715 - href: code-analysis/quality-rules/ca1715.md - - name: CA1716 - href: code-analysis/quality-rules/ca1716.md - - name: CA1717 - href: code-analysis/quality-rules/ca1717.md - - name: CA1720 - href: code-analysis/quality-rules/ca1720.md - - name: CA1721 - href: code-analysis/quality-rules/ca1721.md - - name: CA1724 - href: code-analysis/quality-rules/ca1724.md - - name: CA1725 - href: code-analysis/quality-rules/ca1725.md - - name: CA1727 - href: code-analysis/quality-rules/ca1727.md - - name: Performance rules - items: - - name: Overview - displayName: "performance rules" - href: code-analysis/quality-rules/performance-warnings.md - - name: CA1802 - href: code-analysis/quality-rules/ca1802.md - - name: CA1805 - href: code-analysis/quality-rules/ca1805.md - - name: CA1806 - href: code-analysis/quality-rules/ca1806.md - - name: CA1810 - href: code-analysis/quality-rules/ca1810.md - - name: CA1812 - href: code-analysis/quality-rules/ca1812.md - - name: CA1813 - href: code-analysis/quality-rules/ca1813.md - - name: CA1814 - href: code-analysis/quality-rules/ca1814.md - - name: CA1815 - href: code-analysis/quality-rules/ca1815.md - - name: CA1819 - href: code-analysis/quality-rules/ca1819.md - - name: CA1820 - href: code-analysis/quality-rules/ca1820.md - - name: CA1821 - href: code-analysis/quality-rules/ca1821.md - - name: CA1822 - href: code-analysis/quality-rules/ca1822.md - - name: CA1823 - href: code-analysis/quality-rules/ca1823.md - - name: CA1824 - href: code-analysis/quality-rules/ca1824.md - - name: CA1825 - href: code-analysis/quality-rules/ca1825.md - - name: CA1826 - href: code-analysis/quality-rules/ca1826.md - - name: CA1827 - href: code-analysis/quality-rules/ca1827.md - - name: CA1828 - href: code-analysis/quality-rules/ca1828.md - - name: CA1829 - href: code-analysis/quality-rules/ca1829.md - - name: CA1830 - href: code-analysis/quality-rules/ca1830.md - - name: CA1831 - href: code-analysis/quality-rules/ca1831.md - - name: CA1832 - href: code-analysis/quality-rules/ca1832.md - - name: CA1833 - href: code-analysis/quality-rules/ca1833.md - - name: CA1834 - href: code-analysis/quality-rules/ca1834.md - - name: CA1835 - href: code-analysis/quality-rules/ca1835.md - - name: CA1836 - href: code-analysis/quality-rules/ca1836.md - - name: CA1837 - href: code-analysis/quality-rules/ca1837.md - - name: CA1838 - href: code-analysis/quality-rules/ca1838.md - - name: CA1839 - href: code-analysis/quality-rules/ca1839.md - - name: CA1840 - href: code-analysis/quality-rules/ca1840.md - - name: CA1841 - href: code-analysis/quality-rules/ca1841.md - - name: CA1842 - href: code-analysis/quality-rules/ca1842.md - - name: CA1843 - href: code-analysis/quality-rules/ca1843.md - - name: CA1844 - href: code-analysis/quality-rules/ca1844.md - - name: CA1845 - href: code-analysis/quality-rules/ca1845.md - - name: CA1846 - href: code-analysis/quality-rules/ca1846.md - - name: CA1847 - href: code-analysis/quality-rules/ca1847.md - - name: CA1848 - href: code-analysis/quality-rules/ca1848.md - - name: CA1849 - href: code-analysis/quality-rules/ca1849.md - - name: CA1850 - href: code-analysis/quality-rules/ca1850.md - - name: CA1851 - href: code-analysis/quality-rules/ca1851.md - - name: CA1852 - href: code-analysis/quality-rules/ca1852.md - - name: CA1853 - href: code-analysis/quality-rules/ca1853.md - - name: CA1854 - href: code-analysis/quality-rules/ca1854.md - - name: CA1855 - href: code-analysis/quality-rules/ca1855.md - - name: CA1858 - href: code-analysis/quality-rules/ca1858.md - - name: SingleFile rules - items: - - name: Overview - displayName: "singlefile rules" - href: ../core/deploying/single-file/warnings/overview.md - - name: IL3000 - href: ../core/deploying/single-file/warnings/il3000.md - - name: IL3001 - href: ../core/deploying/single-file/warnings/il3001.md - - name: IL3002 - href: ../core/deploying/single-file/warnings/il3002.md - - name: IL3003 - href: ../core/deploying/single-file/warnings/il3003.md - - name: Reliability rules - items: - - name: Overview - displayName: "reliability rules" - href: code-analysis/quality-rules/reliability-warnings.md - - name: CA2000 - href: code-analysis/quality-rules/ca2000.md - - name: CA2002 - href: code-analysis/quality-rules/ca2002.md - - name: CA2007 - href: code-analysis/quality-rules/ca2007.md - - name: CA2008 - href: code-analysis/quality-rules/ca2008.md - - name: CA2009 - href: code-analysis/quality-rules/ca2009.md - - name: CA2011 - href: code-analysis/quality-rules/ca2011.md - - name: CA2012 - href: code-analysis/quality-rules/ca2012.md - - name: CA2013 - href: code-analysis/quality-rules/ca2013.md - - name: CA2014 - href: code-analysis/quality-rules/ca2014.md - - name: CA2015 - href: code-analysis/quality-rules/ca2015.md - - name: CA2016 - href: code-analysis/quality-rules/ca2016.md - - name: CA2017 - href: code-analysis/quality-rules/ca2017.md - - name: CA2018 - href: code-analysis/quality-rules/ca2018.md - - name: CA2019 - href: code-analysis/quality-rules/ca2019.md - - name: CA2020 - href: code-analysis/quality-rules/ca2020.md - - name: Security rules - items: - - name: Overview - displayName: "security rules" - href: code-analysis/quality-rules/security-warnings.md - - name: CA2100 - href: code-analysis/quality-rules/ca2100.md - - name: CA2109 - href: code-analysis/quality-rules/ca2109.md - - name: CA2119 - href: code-analysis/quality-rules/ca2119.md - - name: CA2153 - href: code-analysis/quality-rules/ca2153.md - - name: CA2300 - href: code-analysis/quality-rules/ca2300.md - - name: CA2301 - href: code-analysis/quality-rules/ca2301.md - - name: CA2302 - href: code-analysis/quality-rules/ca2302.md - - name: CA2305 - href: code-analysis/quality-rules/ca2305.md - - name: CA2310 - href: code-analysis/quality-rules/ca2310.md - - name: CA2311 - href: code-analysis/quality-rules/ca2311.md - - name: CA2312 - href: code-analysis/quality-rules/ca2312.md - - name: CA2315 - href: code-analysis/quality-rules/ca2315.md - - name: CA2321 - href: code-analysis/quality-rules/ca2321.md - - name: CA2322 - href: code-analysis/quality-rules/ca2322.md - - name: CA2326 - href: code-analysis/quality-rules/ca2326.md - - name: CA2327 - href: code-analysis/quality-rules/ca2327.md - - name: CA2328 - href: code-analysis/quality-rules/ca2328.md - - name: CA2329 - href: code-analysis/quality-rules/ca2329.md - - name: CA2330 - href: code-analysis/quality-rules/ca2330.md - - name: CA2350 - href: code-analysis/quality-rules/ca2350.md - - name: CA2351 - href: code-analysis/quality-rules/ca2351.md - - name: CA2352 - href: code-analysis/quality-rules/ca2352.md - - name: CA2353 - href: code-analysis/quality-rules/ca2353.md - - name: CA2354 - href: code-analysis/quality-rules/ca2354.md - - name: CA2355 - href: code-analysis/quality-rules/ca2355.md - - name: CA2356 - href: code-analysis/quality-rules/ca2356.md - - name: CA2361 - href: code-analysis/quality-rules/ca2361.md - - name: CA2362 - href: code-analysis/quality-rules/ca2362.md - - name: CA3001 - href: code-analysis/quality-rules/ca3001.md - - name: CA3002 - href: code-analysis/quality-rules/ca3002.md - - name: CA3003 - href: code-analysis/quality-rules/ca3003.md - - name: CA3004 - href: code-analysis/quality-rules/ca3004.md - - name: CA3005 - href: code-analysis/quality-rules/ca3005.md - - name: CA3006 - href: code-analysis/quality-rules/ca3006.md - - name: CA3007 - href: code-analysis/quality-rules/ca3007.md - - name: CA3008 - href: code-analysis/quality-rules/ca3008.md - - name: CA3009 - href: code-analysis/quality-rules/ca3009.md - - name: CA3010 - href: code-analysis/quality-rules/ca3010.md - - name: CA3011 - href: code-analysis/quality-rules/ca3011.md - - name: CA3012 - href: code-analysis/quality-rules/ca3012.md - - name: CA3061 - href: code-analysis/quality-rules/ca3061.md - - name: CA3075 - href: code-analysis/quality-rules/ca3075.md - - name: CA3076 - href: code-analysis/quality-rules/ca3076.md - - name: CA3077 - href: code-analysis/quality-rules/ca3077.md - - name: CA3147 - href: code-analysis/quality-rules/ca3147.md - - name: CA5350 - href: code-analysis/quality-rules/ca5350.md - - name: CA5351 - href: code-analysis/quality-rules/ca5351.md - - name: CA5358 - href: code-analysis/quality-rules/ca5358.md - - name: CA5359 - href: code-analysis/quality-rules/ca5359.md - - name: CA5360 - href: code-analysis/quality-rules/ca5360.md - - name: CA5361 - href: code-analysis/quality-rules/ca5361.md - - name: CA5362 - href: code-analysis/quality-rules/ca5362.md - - name: CA5363 - href: code-analysis/quality-rules/ca5363.md - - name: CA5364 - href: code-analysis/quality-rules/ca5364.md - - name: CA5365 - href: code-analysis/quality-rules/ca5365.md - - name: CA5366 - href: code-analysis/quality-rules/ca5366.md - - name: CA5367 - href: code-analysis/quality-rules/ca5367.md - - name: CA5368 - href: code-analysis/quality-rules/ca5368.md - - name: CA5369 - href: code-analysis/quality-rules/ca5369.md - - name: CA5370 - href: code-analysis/quality-rules/ca5370.md - - name: CA5371 - href: code-analysis/quality-rules/ca5371.md - - name: CA5372 - href: code-analysis/quality-rules/ca5372.md - - name: CA5373 - href: code-analysis/quality-rules/ca5373.md - - name: CA5374 - href: code-analysis/quality-rules/ca5374.md - - name: CA5375 - href: code-analysis/quality-rules/ca5375.md - - name: CA5376 - href: code-analysis/quality-rules/ca5376.md - - name: CA5377 - href: code-analysis/quality-rules/ca5377.md - - name: CA5378 - href: code-analysis/quality-rules/ca5378.md - - name: CA5379 - href: code-analysis/quality-rules/ca5379.md - - name: CA5380 - href: code-analysis/quality-rules/ca5380.md - - name: CA5381 - href: code-analysis/quality-rules/ca5381.md - - name: CA5382 - href: code-analysis/quality-rules/ca5382.md - - name: CA5383 - href: code-analysis/quality-rules/ca5383.md - - name: CA5384 - href: code-analysis/quality-rules/ca5384.md - - name: CA5385 - href: code-analysis/quality-rules/ca5385.md - - name: CA5386 - href: code-analysis/quality-rules/ca5386.md - - name: CA5387 - href: code-analysis/quality-rules/ca5387.md - - name: CA5388 - href: code-analysis/quality-rules/ca5388.md - - name: CA5389 - href: code-analysis/quality-rules/ca5389.md - - name: CA5390 - href: code-analysis/quality-rules/ca5390.md - - name: CA5391 - href: code-analysis/quality-rules/ca5391.md - - name: CA5392 - href: code-analysis/quality-rules/ca5392.md - - name: CA5393 - href: code-analysis/quality-rules/ca5393.md - - name: CA5394 - href: code-analysis/quality-rules/ca5394.md - - name: CA5395 - href: code-analysis/quality-rules/ca5395.md - - name: CA5396 - href: code-analysis/quality-rules/ca5396.md - - name: CA5397 - href: code-analysis/quality-rules/ca5397.md - - name: CA5398 - href: code-analysis/quality-rules/ca5398.md - - name: CA5399 - href: code-analysis/quality-rules/ca5399.md - - name: CA5400 - href: code-analysis/quality-rules/ca5400.md - - name: CA5401 - href: code-analysis/quality-rules/ca5401.md - - name: CA5402 - href: code-analysis/quality-rules/ca5402.md - - name: CA5403 - href: code-analysis/quality-rules/ca5403.md - - name: CA5404 - href: code-analysis/quality-rules/ca5404.md - - name: CA5405 - href: code-analysis/quality-rules/ca5405.md - - name: Usage rules - items: - - name: Overview - displayName: "usage rules" - href: code-analysis/quality-rules/usage-warnings.md - - name: CA1801 - href: code-analysis/quality-rules/ca1801.md - - name: CA1816 - href: code-analysis/quality-rules/ca1816.md - - name: CA2200 - href: code-analysis/quality-rules/ca2200.md - - name: CA2201 - href: code-analysis/quality-rules/ca2201.md - - name: CA2207 - href: code-analysis/quality-rules/ca2207.md - - name: CA2208 - href: code-analysis/quality-rules/ca2208.md - - name: CA2211 - href: code-analysis/quality-rules/ca2211.md - - name: CA2213 - href: code-analysis/quality-rules/ca2213.md - - name: CA2214 - href: code-analysis/quality-rules/ca2214.md - - name: CA2215 - href: code-analysis/quality-rules/ca2215.md - - name: CA2216 - href: code-analysis/quality-rules/ca2216.md - - name: CA2217 - href: code-analysis/quality-rules/ca2217.md - - name: CA2218 - href: code-analysis/quality-rules/ca2218.md - - name: CA2219 - href: code-analysis/quality-rules/ca2219.md - - name: CA2224 - href: code-analysis/quality-rules/ca2224.md - - name: CA2225 - href: code-analysis/quality-rules/ca2225.md - - name: CA2226 - href: code-analysis/quality-rules/ca2226.md - - name: CA2227 - href: code-analysis/quality-rules/ca2227.md - - name: CA2229 - href: code-analysis/quality-rules/ca2229.md - - name: CA2231 - href: code-analysis/quality-rules/ca2231.md - - name: CA2234 - href: code-analysis/quality-rules/ca2234.md - - name: CA2235 - href: code-analysis/quality-rules/ca2235.md - - name: CA2237 - href: code-analysis/quality-rules/ca2237.md - - name: CA2241 - href: code-analysis/quality-rules/ca2241.md - - name: CA2242 - href: code-analysis/quality-rules/ca2242.md - - name: CA2243 - href: code-analysis/quality-rules/ca2243.md - - name: CA2244 - href: code-analysis/quality-rules/ca2244.md - - name: CA2245 - href: code-analysis/quality-rules/ca2245.md - - name: CA2246 - href: code-analysis/quality-rules/ca2246.md - - name: CA2247 - href: code-analysis/quality-rules/ca2247.md - - name: CA2248 - href: code-analysis/quality-rules/ca2248.md - - name: CA2249 - href: code-analysis/quality-rules/ca2249.md - - name: CA2250 - href: code-analysis/quality-rules/ca2250.md - - name: CA2251 - href: code-analysis/quality-rules/ca2251.md - - name: CA2252 - href: code-analysis/quality-rules/ca2252.md - - name: CA2253 - href: code-analysis/quality-rules/ca2253.md - - name: CA2254 - href: code-analysis/quality-rules/ca2254.md - - name: CA2255 - href: code-analysis/quality-rules/ca2255.md - - name: CA2256 - href: code-analysis/quality-rules/ca2256.md - - name: CA2257 - href: code-analysis/quality-rules/ca2257.md - - name: CA2258 - href: code-analysis/quality-rules/ca2258.md - - name: CA2259 - href: code-analysis/quality-rules/ca2259.md - - name: CA2260 - href: code-analysis/quality-rules/ca2260.md - - name: Code style rules - items: - - name: Overview - href: code-analysis/style-rules/index.md - - name: Language rules - items: - - name: Overview - displayName: "language rules" - href: code-analysis/style-rules/language-rules.md - - name: this and Me preferences - items: - - name: IDE0003 and IDE0009 - href: code-analysis/style-rules/ide0003-ide0009.md - - name: Use language keywords for types - items: - - name: IDE0049 - href: code-analysis/style-rules/ide0049.md - - name: Modifier preferences - items: - - name: Overview - href: code-analysis/style-rules/modifier-preferences.md - - name: IDE0036 - href: code-analysis/style-rules/ide0036.md - - name: IDE0040 - href: code-analysis/style-rules/ide0040.md - - name: IDE0044 - href: code-analysis/style-rules/ide0044.md - - name: IDE0062 - href: code-analysis/style-rules/ide0062.md - - name: IDE0064 - href: code-analysis/style-rules/ide0064.md - - name: Parentheses preferences - items: - - name: IDE0047 and IDE0048 - href: code-analysis/style-rules/ide0047-ide0048.md - - name: Expression-level preferences - items: - - name: Overview - href: code-analysis/style-rules/expression-level-preferences.md - - name: IDE0010 - href: code-analysis/style-rules/ide0010.md - - name: IDE0017 - href: code-analysis/style-rules/ide0017.md - - name: IDE0018 - href: code-analysis/style-rules/ide0018.md - - name: IDE0028 - href: code-analysis/style-rules/ide0028.md - - name: IDE0032 - href: code-analysis/style-rules/ide0032.md - - name: IDE0033 - href: code-analysis/style-rules/ide0033.md - - name: IDE0034 - href: code-analysis/style-rules/ide0034.md - - name: IDE0037 - href: code-analysis/style-rules/ide0037.md - - name: IDE0039 - href: code-analysis/style-rules/ide0039.md - - name: IDE0042 - href: code-analysis/style-rules/ide0042.md - - name: IDE0045 - href: code-analysis/style-rules/ide0045.md - - name: IDE0046 - href: code-analysis/style-rules/ide0046.md - - name: IDE0050 - href: code-analysis/style-rules/ide0050.md - - name: IDE0054 - href: code-analysis/style-rules/ide0054-ide0074.md - - name: IDE0056 - href: code-analysis/style-rules/ide0056.md - - name: IDE0057 - href: code-analysis/style-rules/ide0057.md - - name: IDE0070 - href: code-analysis/style-rules/ide0070.md - - name: IDE0071 - href: code-analysis/style-rules/ide0071.md - - name: IDE0072 - href: code-analysis/style-rules/ide0072.md - - name: IDE0074 - href: code-analysis/style-rules/ide0054-ide0074.md - - name: IDE0075 - href: code-analysis/style-rules/ide0075.md - - name: IDE0082 - href: code-analysis/style-rules/ide0082.md - - name: IDE0090 - href: code-analysis/style-rules/ide0090.md - - name: IDE0180 - href: code-analysis/style-rules/ide0180.md - - name: Namespace declaration preferences - items: - - name: IDE0160 and IDE0161 - href: code-analysis/style-rules/ide0160-ide0161.md - - name: Null-checking preferences - items: - - name: Overview - href: code-analysis/style-rules/null-checking-preferences.md - - name: IDE0016 - href: code-analysis/style-rules/ide0016.md - - name: IDE0029 and IDE0030 - href: code-analysis/style-rules/ide0029-ide0030.md - - name: IDE0031 - href: code-analysis/style-rules/ide0031.md - - name: IDE0041 - href: code-analysis/style-rules/ide0041.md - - name: IDE0150 - href: code-analysis/style-rules/ide0150.md - - name: IDE1005 - href: code-analysis/style-rules/ide1005.md - - name: var preferences - items: - - name: IDE0007 and IDE0008 - href: code-analysis/style-rules/ide0007-ide0008.md - - name: Expression-bodied members - items: - - name: Overview - href: code-analysis/style-rules/expression-bodied-members.md - - name: IDE0021 - href: code-analysis/style-rules/ide0021.md - - name: IDE0022 - href: code-analysis/style-rules/ide0022.md - - name: IDE0023 and IDE0024 - href: code-analysis/style-rules/ide0023-ide0024.md - - name: IDE0025 - href: code-analysis/style-rules/ide0025.md - - name: IDE0026 - href: code-analysis/style-rules/ide0026.md - - name: IDE0027 - href: code-analysis/style-rules/ide0027.md - - name: IDE0053 - href: code-analysis/style-rules/ide0053.md - - name: IDE0061 - href: code-analysis/style-rules/ide0061.md - - name: Pattern matching preferences - items: - - name: Overview - href: code-analysis/style-rules/pattern-matching-preferences.md - - name: IDE0019 - href: code-analysis/style-rules/ide0019.md - - name: IDE0020 and IDE0038 - href: code-analysis/style-rules/ide0020-ide0038.md - - name: IDE0066 - href: code-analysis/style-rules/ide0066.md - - name: IDE0078 - href: code-analysis/style-rules/ide0078.md - - name: IDE0083 - href: code-analysis/style-rules/ide0083.md - - name: IDE0084 - href: code-analysis/style-rules/ide0084.md - - name: IDE0170 - href: code-analysis/style-rules/ide0170.md - - name: Code block preferences - items: - - name: Overview - href: code-analysis/style-rules/code-block-preferences.md - - name: IDE0011 - href: code-analysis/style-rules/ide0011.md - - name: IDE0063 - href: code-analysis/style-rules/ide0063.md - - name: using directive preferences - items: - - name: IDE0065 - href: code-analysis/style-rules/ide0065.md - - name: File header preferences - items: - - name: IDE0073 - href: code-analysis/style-rules/ide0073.md - - name: Namespace naming preferences - items: - - name: IDE0130 - href: code-analysis/style-rules/ide0130.md - - name: Unnecessary code rules - items: - - name: Overview - href: code-analysis/style-rules/unnecessary-code-rules.md - - name: IDE0001 - href: code-analysis/style-rules/ide0001.md - - name: IDE0002 - href: code-analysis/style-rules/ide0002.md - - name: IDE0004 - href: code-analysis/style-rules/ide0004.md - - name: IDE0005 - href: code-analysis/style-rules/ide0005.md - - name: IDE0035 - href: code-analysis/style-rules/ide0035.md - - name: IDE0051 - href: code-analysis/style-rules/ide0051.md - - name: IDE0052 - href: code-analysis/style-rules/ide0052.md - - name: IDE0058 - href: code-analysis/style-rules/ide0058.md - - name: IDE0059 - href: code-analysis/style-rules/ide0059.md - - name: IDE0060 - href: code-analysis/style-rules/ide0060.md - - name: IDE0079 - href: code-analysis/style-rules/ide0079.md - - name: IDE0080 - href: code-analysis/style-rules/ide0080.md - - name: IDE0081 - href: code-analysis/style-rules/ide0081.md - - name: IDE0100 - href: code-analysis/style-rules/ide0100.md - - name: IDE0110 - href: code-analysis/style-rules/ide0110.md - - name: IDE0140 - href: code-analysis/style-rules/ide0140.md - - name: Miscellaneous rules - items: - - name: Overview - href: code-analysis/style-rules/miscellaneous-rules.md - - name: IDE0076 - href: code-analysis/style-rules/ide0076.md - - name: IDE0077 - href: code-analysis/style-rules/ide0077.md - - name: Formatting rules - items: - - name: IDE0055 - items: - - name: Overview - displayName: formatting rule, ide0055 - href: code-analysis/style-rules/ide0055.md - - name: .NET formatting options - href: code-analysis/style-rules/dotnet-formatting-options.md - - name: C# formatting options - href: code-analysis/style-rules/csharp-formatting-options.md - - name: Naming rules - href: code-analysis/style-rules/naming-rules.md - - name: Platform compatibility analyzer - href: ../standard/analyzers/platform-compat-analyzer.md - - name: Portability analyzer - href: ../standard/analyzers/portability-analyzer.md - - name: Package validation - items: - - name: Get started - displayName: package validation - href: package-validation/overview.md - - name: Baseline package validator - href: package-validation/baseline-version-validator.md - - name: Compatible framework in package validator - href: package-validation/compatible-framework-in-package-validator.md - - name: Compatible framework validator - href: package-validation/compatible-framework-validator.md - - name: Diagnostic IDs - href: package-validation/diagnostic-ids.md -- name: Execution model - items: - - name: Common Language Runtime (CLR) - href: ../standard/clr.md - - name: Managed execution process - href: ../standard/managed-execution-process.md - - name: Assemblies - href: ../standard/assembly/ - - name: Metadata and self-describing components - href: ../standard/metadata-and-self-describing-components.md - - name: Dependency loading - items: - - name: Overview - displayName: dependency loading - href: ../core/dependency-loading/overview.md - - name: Understand AssemblyLoadContext - href: ../core/dependency-loading/understanding-assemblyloadcontext.md - - name: Dependency loading details - items: - - name: Default dependency probing - href: ../core/dependency-loading/default-probing.md - - name: Load managed assemblies - href: ../core/dependency-loading/loading-managed.md - - name: Load satellite assemblies - href: ../core/dependency-loading/loading-resources.md - - name: Load unmanaged libraries - href: ../core/dependency-loading/loading-unmanaged.md - - name: Collect detailed assembly loading information - href: ../core/dependency-loading/collect-details.md - - name: Tutorials - items: - - name: Create a .NET application with plugins - href: ../core/tutorials/creating-app-with-plugin-support.md - - name: How to use and debug assembly unloadability - href: ../standard/assembly/unloadability.md - - name: Versioning - items: - - name: Overview - href: ../core/versions/index.md - - name: .NET version selection - href: ../core/versions/selection.md - - name: Configure .NET Runtime - items: - - name: Settings - displayName: runtime configuration, configure runtime, configuration settings - href: ../core/runtime-config/index.md - - name: Compilation settings - href: ../core/runtime-config/compilation.md - - name: Debugging and profiling settings - href: ../core/runtime-config/debugging-profiling.md - - name: Garbage collector settings - href: ../core/runtime-config/garbage-collector.md - - name: Globalization settings - href: ../core/runtime-config/globalization.md - - name: Networking settings - href: ../core/runtime-config/networking.md - - name: Threading settings - href: ../core/runtime-config/threading.md - - name: Troubleshoot app launch failures - href: ../core/runtime-discovery/troubleshoot-app-launch.md -- name: Deployment models - items: - - name: Overview - href: ../core/deploying/index.md - - name: Deploy apps with Visual Studio - href: ../core/deploying/deploy-with-vs.md - - name: Publish apps with the CLI - href: ../core/deploying/deploy-with-cli.md - - name: Create a NuGet package with the CLI - href: ../core/deploying/creating-nuget-packages.md - - name: Self-contained deployment runtime roll forward - href: ../core/deploying/runtime-patch-selection.md - - name: Single file deployment and executable - href: ../core/deploying/single-file/overview.md - - name: ReadyToRun - href: ../core/deploying/ready-to-run.md - - name: Trim self-contained deployments - items: - - name: Overview and how-to - href: ../core/deploying/trimming/trim-self-contained.md - - name: Intro to trim warnings - href: ../core/deploying/trimming/fixing-warnings.md - - name: Trim incompatibilities - href: ../core/deploying/trimming/incompatibilities.md - - name: Options - href: ../core/deploying/trimming/trimming-options.md - - name: Trimming libraries - href: ../core/deploying/trimming/prepare-libraries-for-trimming.md - - name: Trim warnings - items: - - name: IL2001 - href: ../core/deploying/trimming/trim-warnings/il2001.md - - name: IL2002 - href: ../core/deploying/trimming/trim-warnings/il2002.md - - name: IL2003 - href: ../core/deploying/trimming/trim-warnings/il2003.md - - name: IL2004 - href: ../core/deploying/trimming/trim-warnings/il2004.md - - name: IL2005 - href: ../core/deploying/trimming/trim-warnings/il2005.md - - name: IL2007 - href: ../core/deploying/trimming/trim-warnings/il2007.md - - name: IL2008 - href: ../core/deploying/trimming/trim-warnings/il2008.md - - name: IL2009 - href: ../core/deploying/trimming/trim-warnings/il2009.md - - name: IL2010 - href: ../core/deploying/trimming/trim-warnings/il2010.md - - name: IL2011 - href: ../core/deploying/trimming/trim-warnings/il2011.md - - name: IL2012 - href: ../core/deploying/trimming/trim-warnings/il2012.md - - name: IL2013 - href: ../core/deploying/trimming/trim-warnings/il2013.md - - name: IL2014 - href: ../core/deploying/trimming/trim-warnings/il2014.md - - name: IL2015 - href: ../core/deploying/trimming/trim-warnings/il2015.md - - name: IL2016 - href: ../core/deploying/trimming/trim-warnings/il2016.md - - name: IL2017 - href: ../core/deploying/trimming/trim-warnings/il2017.md - - name: IL2018 - href: ../core/deploying/trimming/trim-warnings/il2018.md - - name: IL2019 - href: ../core/deploying/trimming/trim-warnings/il2019.md - - name: IL2022 - href: ../core/deploying/trimming/trim-warnings/il2022.md - - name: IL2023 - href: ../core/deploying/trimming/trim-warnings/il2023.md - - name: IL2024 - href: ../core/deploying/trimming/trim-warnings/il2024.md - - name: IL2025 - href: ../core/deploying/trimming/trim-warnings/il2025.md - - name: IL2026 - href: ../core/deploying/trimming/trim-warnings/il2026.md - - name: IL2027 - href: ../core/deploying/trimming/trim-warnings/il2027.md - - name: IL2028 - href: ../core/deploying/trimming/trim-warnings/il2028.md - - name: IL2029 - href: ../core/deploying/trimming/trim-warnings/il2029.md - - name: IL2030 - href: ../core/deploying/trimming/trim-warnings/il2030.md - - name: IL2031 - href: ../core/deploying/trimming/trim-warnings/il2031.md - - name: IL2032 - href: ../core/deploying/trimming/trim-warnings/il2032.md - - name: IL2033 - href: ../core/deploying/trimming/trim-warnings/il2033.md - - name: IL2034 - href: ../core/deploying/trimming/trim-warnings/il2034.md - - name: IL2035 - href: ../core/deploying/trimming/trim-warnings/il2035.md - - name: IL2036 - href: ../core/deploying/trimming/trim-warnings/il2036.md - - name: IL2037 - href: ../core/deploying/trimming/trim-warnings/il2037.md - - name: IL2038 - href: ../core/deploying/trimming/trim-warnings/il2038.md - - name: IL2039 - href: ../core/deploying/trimming/trim-warnings/il2039.md - - name: IL2040 - href: ../core/deploying/trimming/trim-warnings/il2040.md - - name: IL2041 - href: ../core/deploying/trimming/trim-warnings/il2041.md - - name: IL2042 - href: ../core/deploying/trimming/trim-warnings/il2042.md - - name: IL2043 - href: ../core/deploying/trimming/trim-warnings/il2043.md - - name: IL2044 - href: ../core/deploying/trimming/trim-warnings/il2044.md - - name: IL2045 - href: ../core/deploying/trimming/trim-warnings/il2045.md - - name: IL2046 - href: ../core/deploying/trimming/trim-warnings/il2046.md - - name: IL2048 - href: ../core/deploying/trimming/trim-warnings/il2048.md - - name: IL2049 - href: ../core/deploying/trimming/trim-warnings/il2049.md - - name: IL2050 - href: ../core/deploying/trimming/trim-warnings/il2050.md - - name: IL2051 - href: ../core/deploying/trimming/trim-warnings/il2051.md - - name: IL2052 - href: ../core/deploying/trimming/trim-warnings/il2052.md - - name: IL2053 - href: ../core/deploying/trimming/trim-warnings/il2053.md - - name: IL2054 - href: ../core/deploying/trimming/trim-warnings/il2054.md - - name: IL2055 - href: ../core/deploying/trimming/trim-warnings/il2055.md - - name: IL2056 - href: ../core/deploying/trimming/trim-warnings/il2056.md - - name: IL2057 - href: ../core/deploying/trimming/trim-warnings/il2057.md - - name: IL2058 - href: ../core/deploying/trimming/trim-warnings/il2058.md - - name: IL2059 - href: ../core/deploying/trimming/trim-warnings/il2059.md - - name: IL2060 - href: ../core/deploying/trimming/trim-warnings/il2060.md - - name: IL2061 - href: ../core/deploying/trimming/trim-warnings/il2061.md - - name: IL2062 - href: ../core/deploying/trimming/trim-warnings/il2062.md - - name: IL2063 - href: ../core/deploying/trimming/trim-warnings/il2063.md - - name: IL2064 - href: ../core/deploying/trimming/trim-warnings/il2064.md - - name: IL2065 - href: ../core/deploying/trimming/trim-warnings/il2065.md - - name: IL2066 - href: ../core/deploying/trimming/trim-warnings/il2066.md - - name: IL2067 - href: ../core/deploying/trimming/trim-warnings/il2067.md - - name: IL2068 - href: ../core/deploying/trimming/trim-warnings/il2068.md - - name: IL2069 - href: ../core/deploying/trimming/trim-warnings/il2069.md - - name: IL2070 - href: ../core/deploying/trimming/trim-warnings/il2070.md - - name: IL2072 - href: ../core/deploying/trimming/trim-warnings/il2072.md - - name: IL2073 - href: ../core/deploying/trimming/trim-warnings/il2073.md - - name: IL2074 - href: ../core/deploying/trimming/trim-warnings/il2074.md - - name: IL2075 - href: ../core/deploying/trimming/trim-warnings/il2075.md - - name: IL2077 - href: ../core/deploying/trimming/trim-warnings/il2077.md - - name: IL2078 - href: ../core/deploying/trimming/trim-warnings/il2078.md - - name: IL2079 - href: ../core/deploying/trimming/trim-warnings/il2079.md - - name: IL2080 - href: ../core/deploying/trimming/trim-warnings/il2080.md - - name: IL2082 - href: ../core/deploying/trimming/trim-warnings/il2082.md - - name: IL2083 - href: ../core/deploying/trimming/trim-warnings/il2083.md - - name: IL2084 - href: ../core/deploying/trimming/trim-warnings/il2084.md - - name: IL2085 - href: ../core/deploying/trimming/trim-warnings/il2085.md - - name: IL2087 - href: ../core/deploying/trimming/trim-warnings/il2087.md - - name: IL2088 - href: ../core/deploying/trimming/trim-warnings/il2088.md - - name: IL2089 - href: ../core/deploying/trimming/trim-warnings/il2089.md - - name: IL2090 - href: ../core/deploying/trimming/trim-warnings/il2090.md - - name: IL2091 - href: ../core/deploying/trimming/trim-warnings/il2091.md - - name: IL2092 - href: ../core/deploying/trimming/trim-warnings/il2092.md - - name: IL2093 - href: ../core/deploying/trimming/trim-warnings/il2093.md - - name: IL2094 - href: ../core/deploying/trimming/trim-warnings/il2094.md - - name: IL2095 - href: ../core/deploying/trimming/trim-warnings/il2095.md - - name: IL2096 - href: ../core/deploying/trimming/trim-warnings/il2096.md - - name: IL2097 - href: ../core/deploying/trimming/trim-warnings/il2097.md - - name: IL2098 - href: ../core/deploying/trimming/trim-warnings/il2098.md - - name: IL2099 - href: ../core/deploying/trimming/trim-warnings/il2099.md - - name: IL2100 - href: ../core/deploying/trimming/trim-warnings/il2100.md - - name: IL2101 - href: ../core/deploying/trimming/trim-warnings/il2101.md - - name: IL2102 - href: ../core/deploying/trimming/trim-warnings/il2102.md - - name: IL2103 - href: ../core/deploying/trimming/trim-warnings/il2103.md - - name: IL2104 - href: ../core/deploying/trimming/trim-warnings/il2104.md - - name: IL2105 - href: ../core/deploying/trimming/trim-warnings/il2105.md - - name: IL2106 - href: ../core/deploying/trimming/trim-warnings/il2106.md - - name: IL2107 - href: ../core/deploying/trimming/trim-warnings/il2107.md - - name: IL2108 - href: ../core/deploying/trimming/trim-warnings/il2108.md - - name: IL2109 - href: ../core/deploying/trimming/trim-warnings/il2109.md - - name: IL2110 - href: ../core/deploying/trimming/trim-warnings/il2110.md - - name: IL2111 - href: ../core/deploying/trimming/trim-warnings/il2111.md - - name: IL2112 - href: ../core/deploying/trimming/trim-warnings/il2112.md - - name: IL2113 - href: ../core/deploying/trimming/trim-warnings/il2113.md - - name: IL2114 - href: ../core/deploying/trimming/trim-warnings/il2114.md - - name: IL2115 - href: ../core/deploying/trimming/trim-warnings/il2115.md - - name: IL2116 - href: ../core/deploying/trimming/trim-warnings/il2116.md - - name: IL2117 - href: ../core/deploying/trimming/trim-warnings/il2117.md - - name: Native AOT deployment model - items: - - name: Overview - href: ../core/deploying/native-aot/index.md - - name: Intro to AOT warnings - href: ../core/deploying/native-aot/fixing-warnings.md - - name: AOT warnings - items: - - name: IL3050 - href: ../core/deploying/native-aot/warnings/il3050.md - - name: IL3051 - href: ../core/deploying/native-aot/warnings/il3051.md - - name: IL3052 - href: ../core/deploying/native-aot/warnings/il3052.md - - name: IL3053 - href: ../core/deploying/native-aot/warnings/il3053.md - - name: IL3054 - href: ../core/deploying/native-aot/warnings/il3054.md - - name: IL3055 - href: ../core/deploying/native-aot/warnings/il3055.md - - name: IL3056 - href: ../core/deploying/native-aot/warnings/il3056.md - - name: Runtime package store - href: ../core/deploying/runtime-store.md - - name: Runtime Identifier (RID) catalog - href: ../core/rid-catalog.md - - name: Resource manifest names - href: ../core/resources/manifest-file-names.md - - name: Docker - items: - - name: Introduction to .NET and Docker - href: ../core/docker/introduction.md - - name: Containerize a .NET app - href: ../core/docker/build-container.md - - name: Publish app as container image - href: ../core/docker/publish-as-container.md - - name: Container tools in Visual Studio - href: /visualstudio/containers/overview?toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json -- name: DevOps - items: - - name: GitHub Actions and .NET - href: ../devops/github-actions-overview.md - displayName: "continuous integration,continuous deployment,continuous delivery,ci,cd,ci/cd,github,github action,github actions,lifecycle" - - name: .NET CLI and Continuous Integration - href: ../devops/dotnet-cli-and-continuous-integration.md - - name: Official .NET GitHub Actions - href: ../devops/dotnet-github-action-reference.md - - name: Tutorials - expanded: true - items: - - name: Create a GitHub Action with .NET - href: ../devops/create-dotnet-github-action.md - displayName: "continuous integration, continuous deployment, ci, cd, ci/cd, github, github action, github actions, lifecycle" - - name: Quickstarts - expanded: true - items: - - name: Create a build GitHub workflow - href: ../devops/dotnet-build-github-action.md - displayName: dotnet restore,dotnet build - - name: Create a test GitHub workflow - href: ../devops/dotnet-test-github-action.md - displayName: dotnet restore,dotnet build,dotnet test - - name: Create a publish GitHub workflow - href: ../devops/dotnet-publish-github-action.md - displayName: dotnet restore,dotnet build,dotnet test,dotnet publish - - name: Create a CodeQL GitHub workflow - href: ../devops/dotnet-secure-github-action.md - displayName: codeql,security,vulnerability,source scan - name: Fundamental coding components items: - name: Base types overview @@ -2192,7 +261,7 @@ items: - name: Hashtable and Dictionary types href: ../standard/collections/hashtable-and-dictionary-collection-types.md - name: Thread-safe collections - href: ../standard/collections/thread-safe/ + href: ../standard/collections/thread-safe/index.md?toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json - name: Delegates and lambdas href: ../standard/delegates-lambdas.md - name: Events @@ -2245,7 +314,60 @@ items: - name: Numeric types href: ../standard/numerics.md - name: Dates, times, and time zones - href: ../standard/datetime/ + items: + - name: Overview + displayName: dates,times,time zones + href: ../standard/datetime/index.md + - name: Choose which date and time type to use + href: ../standard/datetime/choosing-between-datetime.md + - name: Work with calendars + href: ../standard/datetime/working-with-calendars.md + - name: Use the DateOnly and TimeOnly types + href: ../standard/datetime/how-to-use-dateonly-timeonly.md + - name: Perform arithmetic operations + href: ../standard/datetime/performing-arithmetic-operations.md + - name: "DateTime and DateTimeOffset support in System.Text.Json" + href: ../standard/datetime/system-text-json-support.md + - name: Time zones + items: + - name: Overview + href: ../standard/datetime/time-zone-overview.md + - name: Use time zones in date and time arithmetic + href: ../standard/datetime/use-time-zones-in-arithmetic.md + - name: Convert between DateTime and DateTimeOffset + href: ../standard/datetime/converting-between-datetime-and-offset.md + - name: Convert times between time zones + href: ../standard/datetime/converting-between-time-zones.md + - name: "How to: Resolve ambiguous times" + href: ../standard/datetime/resolve-ambiguous-times.md + - name: "How to: Let users resolve ambiguous times" + href: ../standard/datetime/let-users-resolve-ambiguous-times.md + - name: Instantiate a DateTimeOffset object + items: + - name: Overview + href: ../standard/datetime/instantiating-a-datetimeoffset-object.md + - name: Create time zones without adjustment rules + href: ../standard/datetime/create-time-zones-without-adjustment-rules.md + - name: Create time zones with adjustment rules + href: ../standard/datetime/create-time-zones-with-adjustment-rules.md + - name: Time zones defined by the OS + items: + - name: Overview + href: ../standard/datetime/finding-the-time-zones-on-local-system.md + - name: Enumerate time zones present on a computer + href: ../standard/datetime/enumerate-time-zones.md + - name: Access predefined UTC and local time zone objects + href: ../standard/datetime/access-utc-and-local.md + - name: Instantiate a TimeZoneInfo object + href: ../standard/datetime/instantiate-time-zone-info.md + - name: Save and restore time zones + items: + - name: Overview + href: ../standard/datetime/saving-and-restoring-time-zones.md + - name: Save time zones to an embedded resource + href: ../standard/datetime/save-time-zones-to-an-embedded-resource.md + - name: Restore time zones from an embedded resource + href: ../standard/datetime/restore-time-zones-from-an-embedded-resource.md - name: Attributes items: - name: Overview @@ -2257,6 +379,16 @@ items: href: ../standard/attributes/writing-custom-attributes.md - name: Retrieve information stored in attributes href: ../standard/attributes/retrieving-information-stored-in-attributes.md + - name: Performance-related types + items: + - name: Memory and span-related types + items: + - name: Overview + href: ../standard/memory-and-spans/index.md + - name: Memory<T> and Span<T> usage guidelines + href: ../standard/memory-and-spans/memory-t-usage-guidelines.md + - name: SIMD-enabled types + href: ../standard/simd.md - name: Runtime libraries items: - name: Overview @@ -2425,6 +557,8 @@ items: href: ../standard/serialization/system-text-json/required-properties.md - name: Allow invalid JSON href: ../standard/serialization/system-text-json/invalid-json.md + - name: Handle missing members + href: ../standard/serialization/system-text-json/missing-members.md - name: Handle overflow JSON, use JsonElement or JsonNode href: ../standard/serialization/system-text-json/handle-overflow.md - name: Preserve references, handle circular references @@ -2451,31 +585,6 @@ items: href: ../standard/serialization/system-text-json/converters-how-to.md - name: Customize contracts href: ../standard/serialization/system-text-json/custom-contracts.md - - name: Binary serialization - items: - - name: Overview - href: ../standard/serialization/binary-serialization.md - displayName: binary serialization - - name: BinaryFormatter security guide - href: ../standard/serialization/binaryformatter-security-guide.md - - name: BinaryFormatter event source - href: ../standard/serialization/binaryformatter-event-source.md - - name: Serialization concepts - href: ../standard/serialization/serialization-concepts.md - - name: Basic serialization - href: ../standard/serialization/basic-serialization.md - - name: Selective serialization - href: ../standard/serialization/selective-serialization.md - - name: Custom serialization - href: ../standard/serialization/custom-serialization.md - - name: Steps in the serialization process - href: ../standard/serialization/steps-in-the-serialization-process.md - - name: Version-tolerant serialization - href: ../standard/serialization/version-tolerant-serialization.md - - name: Serialization guidelines - href: ../standard/serialization/serialization-guidelines.md - - name: "How to: Chunk serialized data" - href: ../standard/serialization/how-to-chunk-serialized-data.md - name: XML and SOAP serialization items: - name: Overview @@ -2512,6 +621,8 @@ items: href: ../standard/serialization/how-to-serialize-an-object-as-a-soap-encoded-xml-stream.md - name: Override encoded SOAP XML serialization href: ../standard/serialization/how-to-override-encoded-soap-xml-serialization.md + - name: Chunk serialized data + href: ../standard/serialization/how-to-chunk-serialized-data.md - name: XML serialization elements items: - name: system.xml.serialization @@ -2530,6 +641,10 @@ items: href: ../standard/serialization/xml-serializer-generator-tool-sgen-exe.md - name: XML Schema Definition tool (Xsd.exe) href: ../standard/serialization/xml-schema-definition-tool-xsd-exe.md + - name: Binary serialization + items: + - name: BinaryFormatter security guide + href: ../standard/serialization/binaryformatter-security-guide.md - name: System.CommandLine items: - name: Overview @@ -2649,88 +764,119 @@ items: displayName: custom configuration,custom config,custom configuration provider,custom config provider - name: Options pattern href: ../core/extensions/options.md + displayName: options pattern,options,configuration options,config options - name: Options pattern guidance for library authors href: ../core/extensions/options-library-authors.md + displayName: options pattern guidance,options guidance,configuration options guidance,config options guidance - name: Logging items: - name: Overview href: ../core/extensions/logging.md + displayName: logging,logger,log,loggers - name: Logging providers href: ../core/extensions/logging-providers.md + displayName: logging providers,log providers - name: Compile-time logging source generation href: ../core/extensions/logger-message-generator.md displayName: LoggerMessage,LoggerMessageAttribute,source generator,compile-time generation - name: Implement a custom logging provider href: ../core/extensions/custom-logging-provider.md + displayName: custom logging,custom log,custom logging provider,custom log provider - name: High-performance logging href: ../core/extensions/high-performance-logging.md + displayName: high-performance logging,high-performance log,high-performance logging provider,high-performance log provider - name: Console log formatting href: ../core/extensions/console-log-formatter.md + displayName: console log formatting,console log formatter,console log formatting provider,console log formatter provider - name: HostBuilder (generic host) href: ../core/extensions/generic-host.md - name: Networking items: - name: Network programming href: networking/overview.md + displayName: networking,sockets,socket,socket programming,socket client,socket server,socket client server,socket client-server,socket client-server,socket client/server,socket client/server,socket client-serve - name: Network availability href: networking/network-info.md + displayName: network availability,network info,network information,network availability info,network availability information,network info availability,network information availability,network availability info - name: IPv6 overview href: networking/ipv6-overview.md + displayName: ipv6,ipv - name: Telemetry href: networking/networking-telemetry.md + displayName: networking telemetry - name: HTTP items: - name: HTTP support href: networking/http/http-overview.md + displayName: networking,http,web services,httpclient - name: HTTP client guidelines - displayName: networking, httpclient href: networking/http/httpclient-guidelines.md + displayName: networking, httpclient - name: Make HTTP requests - displayName: networking,http,web services,client href: networking/http/httpclient.md + displayName: networking,http,web services,client - name: IHttpClientFactory - displayName: networking,httpclient,http,dependency injection,client,factory href: ../core/extensions/httpclient-factory.md + displayName: networking,httpclient,http,dependency injection,client,factory,named client,named httpclient,typed client,typed httpclient - name: HTTP/3 with .NET href: ../core/extensions/httpclient-http3.md + displayName: networking,http,http3,http/3,http3 with .net,http/3 with .net - name: Rate limit an HTTP handler href: ../core/extensions/http-ratelimiter.md + displayName: networking,http,rate limit,rate limiting,rate limit http,rate limiting http,rate limit http handler,rate limiting http handler - name: Sockets items: - name: Sockets support href: networking/sockets/sockets-overview.md + displayName: networking,sockets,socket,socket programming,socket client,socket server - name: Use Sockets to send and receive data over TCP href: networking/sockets/socket-services.md + displayName: networking,sockets,socket,socket programming,socket client,socket server - name: Use TcpClient and TcpListener href: networking/sockets/tcp-classes.md + displayName: networking,tcp,tcp listener,tcp client - name: WebSockets items: - name: WebSockets support href: networking/websockets.md + displayName: websockets,websocket,websocket programming,websocket client,websocket server - name: Security items: - name: TLS/SSL best practices href: ../core/extensions/sslstream-best-practices.md + displayName: tls,ssl,sslstream,sslstream best practices,tls best practices,ssl best practices - name: Troubleshoot SslStream authentication issues href: ../core/extensions/sslstream-troubleshooting.md + displayName: tls,ssl,sslstream,sslstream troubleshooting,tls troubleshooting,ssl troubleshooting - name: Migrate from .NET Framework to .NET href: ../core/extensions/sslstream-migration-from-framework.md + - name: QUIC + items: + - name: QUIC support + href: networking/quic/quic-overview.md - name: File globbing href: ../core/extensions/file-globbing.md + displayName: file globbing,globbing,globbing patterns,globbing pattern,globbing - name: Primitives library href: ../core/extensions/primitives.md + displayName: primitives,primitive types,ichangetoken,change notifications,string tokenizers,StringSegment,StringTokenizer,StringValues - name: Globalization and localization items: - name: Overview href: ../core/extensions/globalization-and-localization.md + displayName: globalization,localization,culture,localization and globalization - name: Globalization href: ../core/extensions/globalization.md + displayName: globalization,culture - name: Globalization and ICU href: ../core/extensions/globalization-icu.md + displayName: globalization,icu,culture - name: Localizability review href: ../core/extensions/localizability-review.md + displayName: localizability,localization,localization review,localizability review - name: Localization href: ../core/extensions/localization.md + displayName: localization,localization review,localizability review - name: Culture-insensitive string operations items: - name: Overview @@ -2772,6 +918,9 @@ items: href: ../core/extensions/scoped-service.md - name: Create a Windows Service using BackgroundService href: ../core/extensions/windows-service.md + - name: Create a Windows Service installer + href: ../core/extensions/windows-service-with-installer.md + displayName: msi,windows service installer,setup.exe - name: Implement the IHostedService interface href: ../core/extensions/timer-service.md - name: Deploy a Worker Service to Azure @@ -2780,389 +929,133 @@ items: href: ../core/extensions/caching.md - name: Channels href: ../core/extensions/channels.md -- name: Data access - items: - - name: LINQ - href: ../standard/linq/ - - name: XML documents and data - href: ../standard/data/xml/ - - name: Microsoft.Data.Sqlite - href: ../standard/data/sqlite/ - - name: Entity Framework Core - href: /ef/core/?toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json -- name: Parallel processing, concurrency, and async +- name: Execution model items: - - name: Asynchronous programming patterns - href: ../standard/asynchronous-programming-patterns/ - - name: Parallel programming + - name: Common Language Runtime (CLR) + href: ../standard/clr.md + - name: Managed execution process + href: ../standard/managed-execution-process.md + - name: Assemblies items: - - name: Overview - href: ../standard/parallel-programming/index.md - - name: Task Parallel Library (TPL) - href: ../standard/parallel-programming/task-parallel-library-tpl.md - items: - - name: Data parallelism - items: - - name: Overview - displayName: data parallelism - href: ../standard/parallel-programming/data-parallelism-task-parallel-library.md - - name: Write a Parallel.For loop - href: ../standard/parallel-programming/how-to-write-a-simple-parallel-for-loop.md - - name: Write a Parallel.ForEach loop - href: ../standard/parallel-programming/how-to-write-a-simple-parallel-foreach-loop.md - - name: Write a Parallel.For loop with thread-local variables - href: ../standard/parallel-programming/how-to-write-a-parallel-for-loop-with-thread-local-variables.md - - name: Write a Parallel.ForEach loop with partition-local variables - href: ../standard/parallel-programming/how-to-write-a-parallel-foreach-loop-with-partition-local-variables.md - - name: Cancel a parallel loop - href: ../standard/parallel-programming/how-to-cancel-a-parallel-for-or-foreach-loop.md - - name: Handle exceptions in parallel loops - href: ../standard/parallel-programming/how-to-handle-exceptions-in-parallel-loops.md - - name: Speed up small loop bodies - href: ../standard/parallel-programming/how-to-speed-up-small-loop-bodies.md - - name: Iterate file directories with the Parallel class - href: ../standard/parallel-programming/how-to-iterate-file-directories-with-the-parallel-class.md - - name: Task-based asynchronous programming - href: ../standard/parallel-programming/task-based-asynchronous-programming.md - items: - - name: Chain tasks by using continuation tasks - href: ../standard/parallel-programming/chaining-tasks-by-using-continuation-tasks.md - - name: Attached and detached child tasks - href: ../standard/parallel-programming/attached-and-detached-child-tasks.md - - name: Task cancellation - href: ../standard/parallel-programming/task-cancellation.md - - name: Exception handling - href: ../standard/parallel-programming/exception-handling-task-parallel-library.md - - name: Use Parallel.Invoke to execute parallel operations - href: ../standard/parallel-programming/how-to-use-parallel-invoke-to-execute-parallel-operations.md - - name: Return a value from a task - href: ../standard/parallel-programming/how-to-return-a-value-from-a-task.md - - name: Cancel a task and its children - href: ../standard/parallel-programming/how-to-cancel-a-task-and-its-children.md - - name: Create pre-computed tasks - href: ../standard/parallel-programming/how-to-create-pre-computed-tasks.md - - name: Traverse a binary tree with parallel tasks - href: ../standard/parallel-programming/how-to-traverse-a-binary-tree-with-parallel-tasks.md - - name: Unwrap a nested task - href: ../standard/parallel-programming/how-to-unwrap-a-nested-task.md - - name: Prevent a child task from attaching to its parent - href: ../standard/parallel-programming/how-to-prevent-a-child-task-from-attaching-to-its-parent.md - - name: Dataflow - href: ../standard/parallel-programming/dataflow-task-parallel-library.md - items: - - name: Write messages to and read messages from a dataflow block - href: ../standard/parallel-programming/how-to-write-messages-to-and-read-messages-from-a-dataflow-block.md - - name: Implement a producer-consumer dataflow pattern - href: ../standard/parallel-programming/how-to-implement-a-producer-consumer-dataflow-pattern.md - - name: Perform an action when a dataflow block receives data - href: ../standard/parallel-programming/how-to-perform-action-when-a-dataflow-block-receives-data.md - - name: Create a dataflow pipeline - href: ../standard/parallel-programming/walkthrough-creating-a-dataflow-pipeline.md - - name: Unlink dataflow blocks - href: ../standard/parallel-programming/how-to-unlink-dataflow-blocks.md - - name: Use dataflow in a Windows Forms app - href: ../standard/parallel-programming/walkthrough-using-dataflow-in-a-windows-forms-application.md - - name: Cancel a dataflow block - href: ../standard/parallel-programming/how-to-cancel-a-dataflow-block.md - - name: Create a custom dataflow block type - href: ../standard/parallel-programming/walkthrough-creating-a-custom-dataflow-block-type.md - - name: Use JoinBlock to read data from multiple sources - href: ../standard/parallel-programming/how-to-use-joinblock-to-read-data-from-multiple-sources.md - - name: Specify the degree of parallelism in a dataflow block - href: ../standard/parallel-programming/how-to-specify-the-degree-of-parallelism-in-a-dataflow-block.md - - name: Specify a task scheduler in a dataflow block - href: ../standard/parallel-programming/how-to-specify-a-task-scheduler-in-a-dataflow-block.md - - name: Use BatchBlock and BatchedJoinBlock to improve efficiency - href: ../standard/parallel-programming/walkthrough-using-batchblock-and-batchedjoinblock-to-improve-efficiency.md - - name: Use TPL with other asynchronous patterns - items: - - name: TPL and traditional .NET asynchronous programming - href: ../standard/parallel-programming/tpl-and-traditional-async-programming.md - - name: Wrap EAP patterns in a task - href: ../standard/parallel-programming/how-to-wrap-eap-patterns-in-a-task.md - - name: Potential pitfalls in data and task parallelism - href: ../standard/parallel-programming/potential-pitfalls-in-data-and-task-parallelism.md - - name: Parallel LINQ (PLINQ) - items: - - name: Introduction - href: ../standard/parallel-programming/introduction-to-plinq.md - - name: Optimize queries for speedup - href: ../standard/parallel-programming/understanding-speedup-in-plinq.md - - name: Order preservation - href: ../standard/parallel-programming/order-preservation-in-plinq.md - - name: Merge options - href: ../standard/parallel-programming/merge-options-in-plinq.md - - name: Potential pitfalls - href: ../standard/parallel-programming/potential-pitfalls-with-plinq.md - - name: Create and execute a query - href: ../standard/parallel-programming/how-to-create-and-execute-a-simple-plinq-query.md - - name: Control ordering in a query - href: ../standard/parallel-programming/how-to-control-ordering-in-a-plinq-query.md - - name: Combine parallel and sequential LINQ queries - href: ../standard/parallel-programming/how-to-combine-parallel-and-sequential-linq-queries.md - - name: Handle exceptions in a query - href: ../standard/parallel-programming/how-to-handle-exceptions-in-a-plinq-query.md - - name: Cancel a query - href: ../standard/parallel-programming/how-to-cancel-a-plinq-query.md - - name: Write a custom aggregate function - href: ../standard/parallel-programming/how-to-write-a-custom-plinq-aggregate-function.md - - name: Specify the execution mode - href: ../standard/parallel-programming/how-to-specify-the-execution-mode-in-plinq.md - - name: Specify merge options - href: ../standard/parallel-programming/how-to-specify-merge-options-in-plinq.md - - name: Iterate file directories - href: ../standard/parallel-programming/how-to-iterate-file-directories-with-plinq.md - - name: Measure query performance - href: ../standard/parallel-programming/how-to-measure-plinq-query-performance.md - - name: Data sample - href: ../standard/parallel-programming/plinq-data-sample.md - - name: Data structures for parallel programming - href: ../standard/parallel-programming/data-structures-for-parallel-programming.md - - name: Parallel diagnostic tools - href: ../standard/parallel-programming/parallel-diagnostic-tools.md - - name: Custom partitioners for PLINQ and TPL - items: - name: Overview - href: ../standard/parallel-programming/custom-partitioners-for-plinq-and-tpl.md - displayName: custom partitioners - - name: Implement dynamic partitions - href: ../standard/parallel-programming/how-to-implement-dynamic-partitions.md - - name: Implement a partitioner for static partitioning - href: ../standard/parallel-programming/how-to-implement-a-partitioner-for-static-partitioning.md - - name: Lambda expressions in PLINQ and TPL - href: ../standard/parallel-programming/lambda-expressions-in-plinq-and-tpl.md - - name: Further reading - href: ../standard/parallel-programming/for-further-reading-parallel-programming.md - - name: Threading - href: ../standard/threading/managed-threading-basics.md -- name: Testing - displayName: xUnit,NUnit,MSTest,unit test,test,integration test,load test,smoke test, web test - items: - - name: Overview - href: ../core/testing/index.md - - name: Unit testing best practices - href: ../core/testing/unit-testing-best-practices.md - - name: xUnit - items: - - name: C# unit testing - href: ../core/testing/unit-testing-with-dotnet-test.md - - name: F# unit testing - href: ../core/testing/unit-testing-fsharp-with-dotnet-test.md - - name: VB unit testing - href: ../core/testing/unit-testing-visual-basic-with-dotnet-test.md - - name: Organize a project and test with xUnit - href: ../core/tutorials/testing-with-cli.md - displayName: tutorials, cli - - name: NUnit - items: - - name: C# unit testing - href: ../core/testing/unit-testing-with-nunit.md - - name: F# unit testing - href: ../core/testing/unit-testing-fsharp-with-nunit.md - - name: VB unit testing - href: ../core/testing/unit-testing-visual-basic-with-nunit.md - - name: MSTest - items: - - name: C# unit testing - href: ../core/testing/unit-testing-with-mstest.md - - name: F# unit testing - href: ../core/testing/unit-testing-fsharp-with-mstest.md - - name: VB unit testing - href: ../core/testing/unit-testing-visual-basic-with-mstest.md - - name: Run selective unit tests - href: ../core/testing/selective-unit-tests.md - - name: Order unit tests - href: ../core/testing/order-unit-tests.md - - name: Unit test code coverage - href: ../core/testing/unit-testing-code-coverage.md - - name: Unit test published output - href: ../core/testing/unit-testing-published-output.md - - name: Live unit test .NET projects with Visual Studio - href: /visualstudio/test/live-unit-testing-start?toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json -- name: Security - href: ../standard/security/ -- name: Advanced topics - items: - - name: Performance - items: - - name: Memory management - items: - - name: What is "managed code"? - href: ../standard/managed-code.md - - name: Automatic memory management - href: ../standard/automatic-memory-management.md - - name: Clean up unmanaged resources + displayName: assembly,assemblies + href: ../standard/assembly/index.md + - name: Assembly contents + href: ../standard/assembly/contents.md + - name: Manifest + href: ../standard/assembly/manifest.md + - name: Security considerations + href: ../standard/assembly/security-considerations.md + - name: Versioning + href: ../standard/assembly/versioning.md + - name: Side-by-side execution + href: ../standard/assembly/side-by-side-execution.md + - name: Assembly file format + href: ../standard/assembly/file-format.md + - name: Unloadability in .NET Core + href: ../standard/assembly/unloadability.md + - name: Learn about reference assemblies + href: ../standard/assembly/reference-assemblies.md + - name: Resolve assembly loads + href: ../standard/assembly/resolve-loads.md + - name: Create assemblies + href: ../standard/assembly/create.md + - name: Assembly names + href: ../standard/assembly/names.md + - name: Find an assembly's fully qualified name + href: ../standard/assembly/find-fully-qualified-name.md + - name: Assembly location + href: ../standard/assembly/location.md + - name: Set assembly attributes + href: ../standard/assembly/set-attributes.md + - name: Strong-named assemblies items: - name: Overview - href: ../standard/garbage-collection/unmanaged.md - displayName: unmanaged resources, memory management - - name: Implement a Dispose method - href: ../standard/garbage-collection/implementing-dispose.md - displayName: "using, Dispose, dispose pattern, IDisposable" - - name: Implement a DisposeAsync method - href: ../standard/garbage-collection/implementing-disposeasync.md - displayName: "await using, DisposeAsync, async dispose pattern, IAsyncDisposable" - - name: Use objects that implement IDisposable - href: ../standard/garbage-collection/using-objects.md - - name: Garbage collection + href: ../standard/assembly/strong-named.md + - name: Create and use strong-named assemblies + href: ../standard/assembly/create-use-strong-named.md + - name: Create a public-private key pair + href: ../standard/assembly/create-public-private-key-pair.md + - name: Sign an assembly with a strong name + href: ../standard/assembly/sign-strong-name.md + - name: Enhanced strong naming + href: ../standard/assembly/enhanced-strong-naming.md + - name: Reference a strong-named assembly + href: ../standard/assembly/reference-strong-named.md + - name: Disable strong-name bypass + href: ../standard/assembly/disable-strong-name-bypass-feature.md + - name: Delay-sign an assembly + href: ../standard/assembly/delay-sign.md + - name: View assembly contents + href: ../standard/assembly/view-contents.md + - name: Type forwarding in the CLR + href: ../standard/assembly/type-forwarding.md + - name: Friend assemblies items: - name: Overview - href: ../standard/garbage-collection/index.md - displayName: garbage collection - - name: Fundamentals - href: ../standard/garbage-collection/fundamentals.md - - name: Workstation and server GC - href: ../standard/garbage-collection/workstation-server-gc.md - - name: Background GC - href: ../standard/garbage-collection/background-gc.md - - name: The large object heap - href: ../standard/garbage-collection/large-object-heap.md - - name: Garbage collection and performance - href: ../standard/garbage-collection/performance.md - - name: Induced collections - href: ../standard/garbage-collection/induced.md - - name: Latency modes - href: ../standard/garbage-collection/latency.md - - name: Optimization for shared web hosting - href: ../standard/garbage-collection/optimization-for-shared-web-hosting.md - - name: Garbage collection notifications - href: ../standard/garbage-collection/notifications.md - - name: Application domain resource monitoring - href: ../standard/garbage-collection/app-domain-resource-monitoring.md - - name: Weak references - href: ../standard/garbage-collection/weak-references.md - - name: Memory and span-related types - items: - - name: Overview - href: ../standard/memory-and-spans/index.md - - name: Memory<T> and Span<T> usage guidelines - href: ../standard/memory-and-spans/memory-t-usage-guidelines.md - - name: SIMD-enabled types - href: ../standard/simd.md - - name: Native interoperability + displayName: friend assembly,friend assemblies + href: ../standard/assembly/friend.md + - name: Create unsigned friend assemblies + href: ../standard/assembly/create-unsigned-friend.md + - name: Create signed friend assemblies + href: ../standard/assembly/create-signed-friend.md + - name: Determine if a file is an assembly + href: ../standard/assembly/identify.md + - name: Load and unload assemblies + href: ../standard/assembly/load-unload.md + - name: Embed types from managed assemblies in Visual Studio + href: ../standard/assembly/embed-types-visual-studio.md + - name: Inspect assembly contents using MetadataLoadContext + href: ../standard/assembly/inspect-contents-using-metadataloadcontext.md + - name: Metadata and self-describing components + href: ../standard/metadata-and-self-describing-components.md + - name: Dependency loading items: - name: Overview - href: ../standard/native-interop/index.md - displayName: Native interop - - name: P/Invoke - items: - - name: Overview - href: ../standard/native-interop/pinvoke.md - displayName: P/Invoke - - name: Cross-platform P/Invoke - href: ../standard/native-interop/cross-platform.md - - name: Source generation - href: ../standard/native-interop/pinvoke-source-generation.md - - name: Type marshalling - items: - - name: Overview - href: ../standard/native-interop/type-marshalling.md - displayName: Type marshalling - - name: Charsets and marshalling - href: ../standard/native-interop/charset.md - - name: Disabled marshalling - href: ../standard/native-interop/disabled-marshalling.md - - name: Customize structure marshalling - href: ../standard/native-interop/customize-struct-marshalling.md - - name: Customize parameter marshalling - href: ../standard/native-interop/customize-parameter-marshalling.md - - name: Source generation - href: ../standard/native-interop/custom-marshalling-source-generation.md - - name: Tutorial - Use custom marshallers in source generation - href: ../standard/native-interop/tutorial-custom-marshaller.md - - name: Interop guidance - href: ../standard/native-interop/best-practices.md - - name: Expose .NET components to COM - href: ../core/native-interop/expose-components-to-com.md - - name: Host .NET from native code - href: ../core/tutorials/netcore-hosting.md - - name: COM interop - items: - - name: Overview - href: ../standard/native-interop/cominterop.md - displayName: COM interop - - name: COM wrappers - items: - - name: Overview - href: ../standard/native-interop/com-wrappers.md - displayName: COM wrappers - - name: Runtime-callable wrapper - href: ../standard/native-interop/runtime-callable-wrapper.md - - name: COM-callable wrapper - href: ../standard/native-interop/com-callable-wrapper.md - - name: Tutorial - Use the ComWrappers API - href: ../standard/native-interop/tutorial-comwrappers.md - - name: Qualifying .NET types for COM interop - href: ../standard/native-interop/qualify-net-types-for-interoperation.md - - name: Apply interop attributes - href: ../standard/native-interop/apply-interop-attributes.md - - name: Exceptions - href: ../standard/native-interop/exceptions-interoperability.md - - name: .NET distribution packaging - href: ../core/distribution-packaging.md -- name: Migration guide - items: - - name: Overview - href: ../core/porting/index.md - - name: General Information - items: - - name: About .NET - items: - - name: Versioning info for .NET SDK, MSBuild, and Visual Studio - href: ../core/porting/versioning-sdk-msbuild-vs.md - - name: Choose between .NET 5 and .NET Framework for server apps - href: ../standard/choosing-core-framework-server.md - - name: .NET Upgrade Assistant tool + displayName: dependency loading + href: ../core/dependency-loading/overview.md + - name: Understand AssemblyLoadContext + href: ../core/dependency-loading/understanding-assemblyloadcontext.md + - name: Dependency loading details items: - - name: Overview - href: ../core/porting/upgrade-assistant-overview.md - displayName: upgrade assistant - - name: Windows Communication Foundation - href: ../core/porting/upgrade-assistant-wcf.md - - name: Windows Presentation Foundation - href: ../core/porting/upgrade-assistant-wpf-framework.md - - name: Windows Forms - href: ../core/porting/upgrade-assistant-winforms-framework.md - - name: Universal Windows Platform - href: ../core/porting/upgrade-assistant-uwp-framework.md - - name: ASP.NET Core - href: ../core/porting/upgrade-assistant-aspnetmvc.md - - name: Telemetry - href: ../core/porting/upgrade-assistant-telemetry.md - - name: Breaking changes + - name: Default dependency probing + href: ../core/dependency-loading/default-probing.md + - name: Load managed assemblies + href: ../core/dependency-loading/loading-managed.md + - name: Load satellite assemblies + href: ../core/dependency-loading/loading-resources.md + - name: Load unmanaged libraries + href: ../core/dependency-loading/loading-unmanaged.md + - name: Collect detailed assembly loading information + href: ../core/dependency-loading/collect-details.md + - name: Tutorials items: - - name: Overview - displayName: app compatibility - href: ../core/porting/breaking-changes.md - - name: Breaking changes - href: ../core/compatibility/fx-core.md - - name: Pre-migration + - name: Create a .NET application with plugins + href: ../core/tutorials/creating-app-with-plugin-support.md + - name: How to use and debug assembly unloadability + href: ../standard/assembly/unloadability.md + - name: Versioning items: - - name: Assess the portability of your project - items: - - name: Unsupported dependencies - href: ../core/porting/third-party-deps.md - - name: Use the Windows Compatibility Pack - href: ../core/porting/windows-compat-pack.md - - name: Unavailable technologies - href: ../core/porting/net-framework-tech-unavailable.md - - name: Unsupported APIs - href: ../core/porting/unsupported-apis.md - - name: Needed changes before porting code - href: ../core/porting/premigration-needed-changes.md - - name: Migration + - name: Overview + href: ../core/versions/index.md + - name: .NET version selection + href: ../core/versions/selection.md + - name: Configure .NET Runtime items: - - name: Create a porting plan - items: - - name: Approaches - href: ../core/porting/porting-approaches.md - - name: Project structure - href: ../core/porting/project-structure.md - - name: Application porting guides - items: - - name: Windows Forms - href: /dotnet/desktop/winforms/migration/?view=netdesktop-6.0&preserve-view=false&toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json - - name: Windows Presentation Foundation - href: /dotnet/desktop/wpf/migration/convert-project-from-net-framework?view=netdesktop-6.0&preserve-view=false&toc=/dotnet/fundamentals/toc.json&bc=/dotnet/breadcrumb/toc.json - - name: C++/CLI projects - href: ../core/porting/cpp-cli.md + - name: Settings + displayName: runtime configuration, configure runtime, configuration settings + href: ../core/runtime-config/index.md + - name: Compilation settings + href: ../core/runtime-config/compilation.md + - name: Debugging and profiling settings + href: ../core/runtime-config/debugging-profiling.md + - name: Garbage collector settings + href: ../core/runtime-config/garbage-collector.md + - name: Globalization settings + href: ../core/runtime-config/globalization.md + - name: Networking settings + href: ../core/runtime-config/networking.md + - name: Threading settings + href: ../core/runtime-config/threading.md + - name: Troubleshoot app launch failures + href: ../core/runtime-discovery/troubleshoot-app-launch.md diff --git a/docs/fundamentals/tools-and-productivity.md b/docs/fundamentals/tools-and-productivity.md deleted file mode 100644 index 53a58d414943d..0000000000000 --- a/docs/fundamentals/tools-and-productivity.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Tools and diagnostics in .NET -author: IEvangelist -description: Learn about the development and diagnostic tools available to .NET developers. -ms.author: dapine -ms.date: 10/21/2020 -ms.topic: overview ---- - -# Tools and diagnostics in .NET - -In this article, you'll learn about the various tools available to .NET developers. With .NET, you have a robust software development kit (SDK) that includes a command-line interface (CLI). The .NET CLI enables many of the features throughout the .NET-ready integrated development environments (IDEs). This article also provides resources to productivity capabilities, such as .NET CLI tools for diagnosing performance issues, memory leaks, high CPU, deadlocks, and tooling support for code analysis. - -## .NET SDK - -The .NET SDK includes both the .NET Runtime and the .NET CLI. You can download the [.NET SDK](https://dotnet.microsoft.com/download) for Windows, Linux, macOS, or Docker. For more information, see [.NET SDK overview](../core/sdk.md). - -## .NET CLI - -The .NET CLI is a cross-platform toolchain for developing, building, running, and publishing .NET applications. The .NET CLI is included with the .NET SDK. For more information, see [.NET CLI overview](../core/tools/index.md). - -## IDEs - -You can write .NET apps with [a variety of IDEs and tools](https://dotnet.microsoft.com/platform/tools). - -## Additional tools - -In addition to the more common tools, .NET also provides tools for specific scenarios. Some of the use cases include uninstalling the .NET SDK or the .NET Runtime, retrieving Windows Communication Foundation (WCF) metadata, generating proxy source code, and serializing XML. For more information, see [.NET additional tools overview](../core/additional-tools/index.md). - -## Diagnostics and instrumentation - -As a .NET developer, you can make use of common performance diagnostic tools to monitor app performance, profile apps with tracing, collect performance metrics, and analyze dump files. You collect performance metrics with event counters, and use profiling tools to gain insights into how apps perform. For more information, see [.NET diagnostics tools](../core/diagnostics/index.md). - -## Code analysis - -The .NET compiler platform (Roslyn) analyzers inspect your C# or Visual Basic code for code quality and code style issues. For more information, see [.NET source code analysis overview](code-analysis/overview.md). - -## Package Validation - -The .NET SDK allows library developers to validate that their packages are consistent and well formed. For more information, see [.NET SDK package validation](package-validation/overview.md). diff --git a/docs/index.yml b/docs/index.yml index a058cf8da171b..1e93faac817db 100644 --- a/docs/index.yml +++ b/docs/index.yml @@ -24,6 +24,10 @@ highlightedContent: itemType: download url: https://dotnet.microsoft.com/download # Card + - title: "Give feedback on docs" + itemType: whats-new + url: https://www.research.net/r/CHFMFD5 + # Card - title: "Build .NET apps with C#" itemType: learn url: /training/paths/build-dotnet-applications-csharp @@ -32,10 +36,6 @@ highlightedContent: itemType: learn url: https://dotnet.microsoft.com/learn/aspnet/hello-world-tutorial/intro # Card - - title: "Browse .NET learning paths" - itemType: learn - url: /training/dotnet/ - # Card - title: "Interactive introduction to C#" itemType: get-started url: csharp/tour-of-csharp/tutorials/hello-world.yml @@ -70,9 +70,6 @@ conceptualContent: - url: core/whats-new/dotnet-7.md itemType: whats-new text: What's new in .NET 7 - - url: core/deploying/index.md - itemType: deploy - text: Deploy .NET apps - url: https://dotnetfoundation.org itemType: overview text: .NET Foundation @@ -82,6 +79,7 @@ conceptualContent: - url: /dotnet/communitytoolkit/ itemType: overview text: Community Toolkits + # Card - title: .NET concepts links: @@ -91,26 +89,43 @@ conceptualContent: - url: fundamentals/index.yml itemType: concept text: .NET fundamentals - - url: /aspnet/core/ - itemType: overview - text: ASP.NET Core - - url: /ef/core/ - itemType: overview - text: Entity Framework Core - url: fundamentals/implementations.md itemType: concept text: .NET implementations - url: framework/index.yml itemType: overview - text: .NET Framework (Windows) apps + text: .NET Framework (for Windows) + - url: standard/net-standard.md + itemType: overview + text: .NET Standard - url: /answers/products/dotnet itemType: get-started text: .NET Q&A - url: https://techcommunity.microsoft.com/t5/net/ct-p/dotnet itemType: concept text: .NET tech community forums + - url: standard/security/index.md + itemType: overview + text: Security in .NET + # Card - title: Develop .NET apps + links: + - url: /dotnet/desktop/wpf/get-started/create-app-visual-studio?view=netdesktop-6.0&preserve-view=true + itemType: tutorial + text: Create .NET desktop apps for Windows + - url: /aspnet/core/ + itemType: overview + text: Create web apps with ASP.NET Core + - url: orleans/index.yml + itemType: overview + text: Build cloud-native .NET apps with Orleans + - url: core/docker/build-container.md + itemType: tutorial + text: Containerize .NET apps with Docker + + # Card + - title: .NET tools and diagnostics links: - url: core/sdk.md itemType: overview @@ -118,32 +133,94 @@ conceptualContent: - url: core/tools/index.md itemType: overview text: .NET CLI overview - - url: standard/net-standard.md + - url: core/project-sdk/msbuild-props.md + itemType: reference + text: MSBuild property reference + - url: core/tools/global-tools.md itemType: overview - text: .NET Standard + text: Global and local tools + - url: core/diagnostics/index.md + itemType: overview + text: Diagnostics tools + - url: fundamentals/code-analysis/overview.md + itemType: overview + text: Code analysis + - url: fundamentals/package-validation/overview.md + itemType: overview + text: Package validation + + # Card + - title: Migrate and upgrade + links: - url: core/porting/index.md itemType: overview text: Port from .NET Framework to .NET - url: core/compatibility/breaking-changes.md itemType: concept text: .NET breaking changes - - url: orleans/index.yml + - url: https://dotnet.microsoft.com/download + itemType: download + text: Download .NET + + # Card + - title: DevOps and testing + links: + - url: core/deploying/index.md + itemType: deploy + text: Deploy .NET apps + - url: core/testing/index.md itemType: overview - text: Build cloud-native .NET apps with Orleans - - url: core/docker/build-container.md - itemType: tutorial - text: Containerize .NET apps with Docker - - url: /dotnet/desktop/wpf/get-started/create-app-visual-studio?view=netdesktop-6.0&preserve-view=true - itemType: tutorial - text: Create .NET desktop apps for Windows - + text: Unit test .NET apps + - url: devops/github-actions-overview.md + itemType: overview + text: GitHub Actions and .NET + + # Card + - title: Data access in .NET + links: + - url: standard/linq/index.md + itemType: overview + text: LINQ overview + - url: /ef/core/ + itemType: overview + text: Entity Framework Core + - url: /dotnet/api/overview/azure/storage/ + itemType: overview + text: Azure Storage + - url: standard/data/xml/index.md + itemType: overview + text: XML data + + # Card + - title: Advanced .NET programming + links: + - url: standard/asynchronous-programming-patterns/index.md + itemType: overview + text: Async programming patterns overview + - url: standard/threading/managed-threading-basics.md + itemType: overview + text: Threading overview + - url: standard/parallel-programming/index.md + itemType: overview + text: Parallel programming overview + - url: standard/native-interop/index.md + itemType: overview + text: Native interoperability + - url: standard/garbage-collection/index.md + itemType: overview + text: Garbage collection + # tools section (optional) -## Languages: C#, F#, and Visual Basic +## Languages: strategy, C#, F#, and Visual Basic tools: title: Programming languages # < 60 chars (optional) - summary: "You can write .NET apps in C#, F#, or Visual Basic." + summary: "Write your app in your favorite language" items: # Card + - title: "Write .NET apps in C#, F#, or Visual Basic" + imageSrc: /media/logos/logo_net.svg + url: fundamentals/languages.md + # Card - title: "A modern, object-oriented, and type-safe language" imageSrc: /media/logos/logo_Csharp.svg url: csharp/index.yml diff --git a/docs/iot/debugging.md b/docs/iot/debugging.md index f18929ba54726..a89fc13826c6b 100644 --- a/docs/iot/debugging.md +++ b/docs/iot/debugging.md @@ -1,6 +1,6 @@ --- -title: Debug .NET apps on Raspberry Pi -description: Learn how to debug .NET apps on Raspberry Pi and similar devices. +title: Debug .NET apps on ARM single-board computers +description: Learn how to debug .NET apps on ARM single-board computers (SBCs) such as Raspberry Pi. author: camsoper ms.author: casoper ms.date: 10/07/2022 @@ -9,23 +9,39 @@ ms.prod: dotnet zone_pivot_groups: ide-set-one --- -# Debug .NET apps on Raspberry Pi +# Debug .NET apps on ARM single-board computers -Debugging .NET apps running on ARM-based IoT devices like Raspberry Pi presents a unique challenge. It is possible to develop .NET apps on ARM devices. However, OmniSharp, which is required for debugging .NET apps outside of Visual Studio, is not compatible with ARM devices. As a result, apps must be debugged remotely from a compatible platform. +Debugging .NET apps running on ARM-based SBCs like Raspberry Pi presents a unique challenge. If desired, you can install Visual Studio Code and the .NET SDK on the device and develop locally. However, the device's performance is such that coding and debugging locally is not ideal. Additionally, the Visual Studio Code extension for C# is not compatible with 32-bit ARM operating systems. Consequently, functionality like IntelliSense and debugging in Visual Studio Code on ARM devices is only supported in 64-bit systems. + +For these reasons, it's strongly recommended that you develop your app on a development computer and then deploy the app to the device for remote debugging. If you wish to develop and debug locally on the device, the following is required: + +- A 64-bit OS with a desktop environment, such as Raspberry Pi OS (64-bit). +- [Visual Studio Code](https://code.visualstudio.com/docs/setup/raspberry-pi) with the [C# extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp). + - Disable the [hardware acceleration](https://code.visualstudio.com/docs/setup/raspberry-pi#_workaround-for-poor-performance). +- .NET SDK 6.0 or later. + - Install using the *dotnet-install* script [as in a framework-dependent deployment](deployment.md#deploying-a-framework-dependent-app). Be sure to add a `DOTNET_ROOT` environment variable and add the *.dotnet* directory to `$PATH`. + +The rest of this article describes how to debug .NET apps on single-board computers remotely from a development computer. + +> [!IMPORTANT] +> As of this writing, remotely debugging .NET 7 apps in `linux-arm` environments is unreliable and may cause the process to exit prematurely. This issue is under investigation. .NET 6 apps that target `linux-arm` and .NET 7 apps that target `linux-arm64` are unaffected. ::: zone pivot="vscode" ## Debug from Visual Studio Code (cross-platform) -Debugging .NET on Raspberry Pi from Visual Studio Code requires configuration steps on the Raspberry Pi and in the project's *launch.json* file. +Debugging .NET on single-board computers from Visual Studio Code requires configuration steps on the SBC and in the project's *launch.json* file. + +### Enable SSH on the SBC -### Enable SSH on the Raspberry Pi +SSH is required for remote debugging. To enable SSH on Raspberry Pi, [refer to *Enable SSH* in the Raspberry Pi documentation](https://www.raspberrypi.com/documentation/computers/remote-access.html#setting-up-an-ssh-server). Ensure that you have configured [passwordless SSH](https://www.raspberrypi.com/documentation/computers/remote-access.html#passwordless-ssh-access). -SSH is required for remote debugging. To enable SSH, [refer to *Enable SSH* in the Raspberry Pi documentation](https://www.raspberrypi.com/documentation/computers/remote-access.html#setting-up-an-ssh-server). +> [!IMPORTANT] +> This example requires you to configure [passwordless SSH](https://www.raspberrypi.com/documentation/computers/remote-access.html#passwordless-ssh-access) on your device, as OpenSSH doesn't support passing passwords on the command line. If you need to use a password, consider substituting the *plink* tool included with [PuTTY](https://www.putty.org/) for *ssh*. -### Install the Visual Studio Remote Debugger on the Raspberry Pi +### Install the Visual Studio Remote Debugger on the SBC -Within a Bash console on the Raspberry Pi (either locally or via SSH), execute the following command. This command downloads and installs the Visual Studio Remote Debugger on the Raspberry Pi: +Within a Bash console on the SBC (either in a local session or via SSH), run the following command. This command downloads and installs the Visual Studio Remote Debugger on the device: ```bash curl -sSL https://aka.ms/getvsdbgsh | /bin/sh /dev/stdin -v latest -l ~/vsdbg @@ -52,20 +68,19 @@ The new configuration in *launch.json* should look similar to one of the followi "console": "internalConsole", "pipeTransport": { "pipeCwd": "${workspaceRoot}", - "pipeProgram": "C:\\Program Files\\PuTTY\\PLINK.EXE", + "pipeProgram": "ssh", "pipeArgs": [ - "-pw", "raspberry", "pi@raspberrypi" ], "debuggerPath": "~/vsdbg/vsdbg" - } - }, + } + }, ``` Notice the following: - `program` is the executable file created by `dotnet publish`. -- `cwd` is the working directory to use when launching the app on the Pi. +- `cwd` is the working directory to use when launching the app on the device. - `pipeProgram` is the path to an SSH client on the local machine. - `pipeArgs` are the parameters to be passed to the SSH client. Be sure to specify the password parameter, as well as the `pi` user in the format `<user>@<hostname>`. @@ -84,9 +99,8 @@ Notice the following: "console": "internalConsole", "pipeTransport": { "pipeCwd": "${workspaceRoot}", - "pipeProgram": "C:\\Program Files\\PuTTY\\PLINK.EXE", + "pipeProgram": "ssh", "pipeArgs": [ - "-pw", "raspberry", "pi@raspberrypi" ], "debuggerPath": "~/vsdbg/vsdbg" @@ -96,28 +110,21 @@ Notice the following: Notice the following: -- `program` is the path to the .NET runtime on the Pi. -- `args` is the path to the assembly to debug on the Pi. -- `cwd` is the working directory to use when launching the app on the Pi. +- `program` is the path to the .NET runtime on the device. +- `args` is the path to the assembly to debug on the device. +- `cwd` is the working directory to use when launching the app on the device. - `pipeProgram` is the path to an SSH client on the local machine. - `pipeArgs` are the parameters to be passed to the SSH client. Be sure to specify the password parameter, as well as the `pi` user in the format `<user>@<hostname>`. --- -> [!IMPORTANT] -> The previous examples use *plink*, a component of the [PuTTY](https://www.ssh.com/ssh/putty/)<span class="docon docon-navigate-external x-hidden-focus"></span> SSH client. [OpenSSH](https://www.openssh.com/)<span class="docon docon-navigate-external x-hidden-focus"></span>, which is included in recent versions of Windows and Linux, may be used instead. However, OpenSSH doesn't support sending passwords as a command-line parameter. To use OpenSSH, [configure your Raspberry Pi for passwordless SSH access](https://www.raspberrypi.com/documentation/remote-access/ssh/passwordless.md). - ### Deploy the app -Deploy the app as described in [Deploy .NET apps to Raspberry Pi](deployment.md). Ensure the deployment path is the same path specified in the `cwd` parameter in the *launch.json* configuration. +Deploy the app as described in [Deploy .NET apps to ARM single-board computers](deployment.md). Ensure the deployment path is the same path specified in the `cwd` parameter in the *launch.json* configuration. ### Launch the debugger -On the **Run** tab, select the configuration you added to *launch.json* and select **Start Debugging**. The app launches on the Raspberry Pi. The debugger may be used to set breakpoints, inspect locals, and more. - -### References - -[Remote Debugging on Linux ARM](https://github.com/OmniSharp/omnisharp-vscode/wiki/Remote-Debugging-On-Linux-Arm) (OmniSharp documentation) +In Visual Studio Code, on the **Run and Debug** tab, select the configuration you added to *launch.json* and select **Start Debugging**. The app launches on the device. The debugger may be used to set breakpoints, inspect locals, and more. ::: zone-end @@ -127,4 +134,6 @@ On the **Run** tab, select the configuration you added to *launch.json* and sele Visual Studio can debug .NET apps on remote devices via SSH. No specialized configuration is required on the device. For details on using Visual Studio to debug .NET remotely, see [Remote debug .NET on Linux using SSH](/visualstudio/debugger/remote-debugging-dotnet-core-linux-with-ssh). +Be sure to select the `dotnet` process if you're debugging a framework-dependent deployment. Otherwise, the process will be named the same as the app's executable. + ::: zone-end diff --git a/docs/iot/deployment.md b/docs/iot/deployment.md index 8f79b1a655d6b..1f1488dfb3215 100644 --- a/docs/iot/deployment.md +++ b/docs/iot/deployment.md @@ -1,6 +1,6 @@ --- -title: Deploy .NET apps to Raspberry Pi -description: Learn how to deploy .NET apps to Raspberry Pi. +title: Deploy .NET apps to ARM single-board computers +description: Learn how to deploy .NET apps to ARM single-board computers (SBCs) such as Raspberry Pi. author: camsoper ms.author: casoper ms.date: 10/07/2022 @@ -8,17 +8,19 @@ ms.topic: how-to ms.prod: dotnet --- -# Deploy .NET apps to Raspberry Pi +# Deploy .NET apps on ARM single-board computers -Deployment of .NET apps to Raspberry Pi is identical to that of any other platform. Your app can run as *self-contained* or *framework-dependent* deployment modes. There are advantages to each strategy. For more information, see [.NET application publishing overview](../core/deploying/index.md). +Deployment of .NET apps to single-board computers is identical to that of any other platform. Your app can run as *self-contained* or *framework-dependent* deployment modes. There are advantages to each strategy. For more information, see [.NET application publishing overview](../core/deploying/index.md). ## Deploying a framework-dependent app +:::image type="content" source="media/framework-dependent-animation.gif" alt-text="Animated GIF showing a diagram of framework-dependent deployment. The SDK creates the assemblies, which require the .NET runtime on the target device."::: + To deploy your app as a framework-dependent app, complete the following steps: 1. [!INCLUDE [ensure-ssh](includes/ensure-ssh.md)] -1. Install .NET on the Raspberry Pi using the [dotnet-install scripts](../core/tools/dotnet-install-script.md). Complete the following steps from a Bash prompt on the Raspberry Pi (local or SSH): +1. Install .NET on the device using the [dotnet-install scripts](../core/tools/dotnet-install-script.md). Complete the following steps from a Bash prompt on the device (local or SSH): 1. Run the following command to install .NET: ```bash @@ -58,24 +60,26 @@ To deploy your app as a framework-dependent app, complete the following steps: ## Deploying a self-contained app +:::image type="content" source="media/self-contained-animation.gif" alt-text="Animated GIF showing a diagram of self-contained deployment. The SDK creates the assemblies bundled with the .NET runtime. Consequently, there are no dependencies required on the target device."::: + To deploy your app as a self-contained app, complete the following steps: 1. [!INCLUDE [ensure-ssh](includes/ensure-ssh.md)] 1. Publish the app on the development computer as follows, depending on development environment. - - If using **Visual Studio**, [deploy the app to a local folder](/visualstudio/deployment/quickstart-deploy-to-local-folder). Before publishing, select **Edit** in the publish profile summary and select the **Settings** tab. Ensure that **Deployment mode** is set to *Self-contained* and **Target runtime** is set to *linux-arm*. - - If using the **.NET CLI**, use the [dotnet publish](../core/tools/dotnet-publish.md) command with the `--runtime linux-arm` and `--self-contained` arguments: + - If using **Visual Studio**, [deploy the app to a local folder](/visualstudio/deployment/quickstart-deploy-to-local-folder). Before publishing, select **Edit** in the publish profile summary and select the **Settings** tab. Ensure that **Deployment mode** is set to *Self-contained* and **Target runtime** is set to *linux-arm64*. + - If using the **.NET CLI**, use the [dotnet publish](../core/tools/dotnet-publish.md) command with the `--runtime linux-arm64` and `--self-contained` arguments: ```dotnetcli - dotnet publish --runtime linux-arm --self-contained + dotnet publish --runtime linux-arm64 --self-contained ``` > [!IMPORTANT] - > If you're using a 64-bit version of Raspberry Pi OS, you need to target the `linux-arm64` runtime. + > If you're using a 32-bit OS, you need to target the `linux-arm` runtime. 1. [!INCLUDE [sftp-client](includes/sftp-client.md)] -1. From a Bash prompt on the Raspberry Pi (local or SSH), run the app. To do this, set the current directory to the deployment location and complete the following steps: +1. From a Bash prompt on the device (local or SSH), run the app. To do this, set the current directory to the deployment location and complete the following steps: 1. Give the executable *execute* permission (where `HelloWorld` is the executable file name). ```bash diff --git a/docs/iot/includes/ensure-ssh.md b/docs/iot/includes/ensure-ssh.md index f62e77191a66c..2545fa7fd5c06 100644 --- a/docs/iot/includes/ensure-ssh.md +++ b/docs/iot/includes/ensure-ssh.md @@ -1 +1 @@ -Ensure SSH is enabled on your Raspberry Pi. If needed, [refer to *Setting up an SSH Server* in the Raspberry Pi documentation](https://www.raspberrypi.com/documentation/computers/remote-access.html#ssh). +Ensure SSH is enabled on your device. For Raspberry Pi, [refer to *Setting up an SSH Server* in the Raspberry Pi documentation](https://www.raspberrypi.com/documentation/computers/remote-access.html#ssh). diff --git a/docs/iot/includes/prepare-pi-i2c.md b/docs/iot/includes/prepare-pi-i2c.md index 8f99d5f817aea..8f9ba800e6caa 100644 --- a/docs/iot/includes/prepare-pi-i2c.md +++ b/docs/iot/includes/prepare-pi-i2c.md @@ -1,8 +1,8 @@ -## Prepare the Raspberry Pi +## Prepare the SBC -Use the `raspi-config` command to ensure the following two services are enabled: +Ensure your SBC is configured to support the following services: - SSH - I2C -For more information on `raspi-config`, refer to the [Raspberry Pi documentation](https://www.raspberrypi.com/documentation/computers/configuration.html). +For many devices, no additional configuration is required. For Raspberry Pi, use the `raspi-config` command. For more information on `raspi-config`, refer to the [Raspberry Pi documentation](https://www.raspberrypi.com/documentation/computers/configuration.html). diff --git a/docs/iot/includes/prepare-pi-spi.md b/docs/iot/includes/prepare-pi-spi.md index d4dc9d1675129..18b8241277bd6 100644 --- a/docs/iot/includes/prepare-pi-spi.md +++ b/docs/iot/includes/prepare-pi-spi.md @@ -1,8 +1,8 @@ -## Prepare the Raspberry Pi +## Prepare the SBC -Use the `raspi-config` command to ensure the following two services are enabled: +Ensure your SBC is configured to support the following services: - SSH - SPI -For more information on `raspi-config`, refer to the [Raspberry Pi documentation](https://www.raspberrypi.com/documentation/computers/configuration.html). +For many devices, no additional configuration is required. For Raspberry Pi, use the `raspi-config` command. For more information on `raspi-config`, refer to the [Raspberry Pi documentation](https://www.raspberrypi.com/documentation/computers/configuration.html). diff --git a/docs/iot/includes/prereq-rpi.md b/docs/iot/includes/prereq-rpi.md index d2d1de49371f1..571df8a4eb5a4 100644 --- a/docs/iot/includes/prereq-rpi.md +++ b/docs/iot/includes/prereq-rpi.md @@ -1 +1 @@ - Raspberry Pi (2 or greater) with [Raspberry Pi OS installed](https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system) + Raspberry Pi that supports ARM v7 instructions with [Raspberry Pi OS](https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system). Raspberry Pi OS Lite (64-bit) is recommended. diff --git a/docs/iot/includes/prereq-sbc.md b/docs/iot/includes/prereq-sbc.md new file mode 100644 index 0000000000000..80ff119a6c1b8 --- /dev/null +++ b/docs/iot/includes/prereq-sbc.md @@ -0,0 +1 @@ +ARM-based (ARMv7 or greater) single-board computer (SBC) diff --git a/docs/iot/includes/rpi-note.md b/docs/iot/includes/rpi-note.md new file mode 100644 index 0000000000000..2c421a6c36b06 --- /dev/null +++ b/docs/iot/includes/rpi-note.md @@ -0,0 +1,2 @@ +> [!NOTE] +> This tutorial is written assuming the target device is Raspberry Pi. However, this tutorial can be used for any Linux-based SBC that supports .NET, such as Orange Pi, ODROID, and more. diff --git a/docs/iot/includes/sftp-client.md b/docs/iot/includes/sftp-client.md index 5379ceed77b2b..9c5b960946a25 100644 --- a/docs/iot/includes/sftp-client.md +++ b/docs/iot/includes/sftp-client.md @@ -1,6 +1,6 @@ -[Using an SFTP client like `scp`](https://www.raspberrypi.com/documentation/computers/remote-access.html#using-secure-copy), copy the files from the publish location on the development computer to a new folder on the Raspberry Pi. +[Using an SFTP client like `scp`](https://www.raspberrypi.com/documentation/computers/remote-access.html#using-secure-copy), copy the files from the publish location on the development computer to a new folder on the SBC. -For example, to use the `scp` command to copy files from the development computer to your Raspberry Pi, open a command prompt and execute the following: +For example, to use the `scp` command to copy files from the development computer to your SBC, open a command prompt and execute the following: ```console scp -r /publish-location/* pi@raspberrypi:/home/pi/deployment-location/ @@ -11,7 +11,7 @@ Where: - The `-r` option instructs `scp` to copy files recursively. - */publish-location/* is the folder you published to in the previous step. - `pi@raspberypi` is the user and host names in the format `<username>@<hostname>`. -- */home/pi/deployment-location/* is the new folder on the Raspberry Pi. +- */home/pi/deployment-location/* is the new folder on the SBC. > [!TIP] > Recent versions of Windows have OpenSSH, which includes `scp`, pre-installed. diff --git a/docs/iot/includes/tutorial-add-gpio-package.md b/docs/iot/includes/tutorial-add-gpio-package.md index 92211a4e448db..3402b7425b0e7 100644 --- a/docs/iot/includes/tutorial-add-gpio-package.md +++ b/docs/iot/includes/tutorial-add-gpio-package.md @@ -1,5 +1,5 @@ Add the [System.Device.Gpio](https://www.nuget.org/packages/System.Device.Gpio/) package to the project. Use either [.NET CLI](../../core/tools/dotnet-add-package.md) from the project directory or [Visual Studio](/nuget/consume-packages/install-use-packages-visual-studio). ```dotnetcli -dotnet add package System.Device.Gpio --version 2.1.0-* +dotnet add package System.Device.Gpio --version 2.2.0-* ``` diff --git a/docs/iot/includes/tutorial-add-iot-package.md b/docs/iot/includes/tutorial-add-iot-package.md index cc38f1dc8b975..6ad28221c777a 100644 --- a/docs/iot/includes/tutorial-add-iot-package.md +++ b/docs/iot/includes/tutorial-add-iot-package.md @@ -1,5 +1,5 @@ Add the [Iot.Device.Bindings](https://www.nuget.org/packages/Iot.Device.Bindings/) package to the project. Use either [.NET CLI](../../core/tools/dotnet-add-package.md) from the project directory or [Visual Studio](/nuget/consume-packages/install-use-packages-visual-studio). ```dotnetcli -dotnet add package Iot.Device.Bindings --version 2.1.0-* +dotnet add package Iot.Device.Bindings --version 2.2.0-* ``` diff --git a/docs/iot/includes/tutorial-deploy.md b/docs/iot/includes/tutorial-deploy.md index 8fcc97a06cddb..2dfa396c1c4c9 100644 --- a/docs/iot/includes/tutorial-deploy.md +++ b/docs/iot/includes/tutorial-deploy.md @@ -1 +1 @@ -Deploy the app to the Raspberry Pi as a self-contained app. For instructions, see [Deploy .NET apps to Raspberry Pi](../deployment.md#deploying-a-self-contained-app). Make sure to give the executable *execute* permission using `chmod +x`. +Deploy the app to the SBC as a self-contained app. For instructions, see [Deploy .NET apps to Raspberry Pi](../deployment.md#deploying-a-self-contained-app). Make sure to give the executable *execute* permission using `chmod +x`. diff --git a/docs/iot/index.yml b/docs/iot/index.yml index fcfcfd569a810..994b6714a5926 100644 --- a/docs/iot/index.yml +++ b/docs/iot/index.yml @@ -21,7 +21,7 @@ landingContent: linkLists: - linkListType: quickstart links: - - text: Sense HAT quickstart + - text: Raspberry Pi Sense HAT quickstart url: quickstarts/sensehat.md - title: Learn diff --git a/docs/iot/intro.md b/docs/iot/intro.md index a7dbc6765e884..de5055e743860 100644 --- a/docs/iot/intro.md +++ b/docs/iot/intro.md @@ -51,7 +51,9 @@ Some commonly used device bindings include: `System.Device.Gpio` is supported on any operating system that supports .NET, including most versions of Linux that support ARM/ARM64 and Windows 10 IoT Core. > [!TIP] -> For Raspberry Pi, [Raspberry Pi OS](https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system) (formerly Raspbian) is recommended. +> For Raspberry Pi, [Raspberry Pi OS (64-bit)](https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system) is recommended. No desktop is required, so Raspberry Pi OS Lite can be used to reduce the size of the operating system. +> +> :::image type="content" source="media/rpi-imager-64bit.gif" alt-text="Animated GIF showing the Raspberry Pi Imager tool. The user selects 'RASPBERRY PI OS LITE (64-BIT) from the list of available operating systems."::: ## Supported hardware platforms @@ -60,7 +62,7 @@ Some commonly used device bindings include: PC platforms are supported via the use of a USB to SPI/I<sup>2</sup>C bridge. > [!IMPORTANT] -> .NET is not supported on ARMv6 architecture devices, including Raspberry Pi Zero and Raspberry Pi devices prior to Raspberry Pi 2. +> .NET is not supported on devices prior to ARMv7, including Raspberry Pi Zero and Raspberry Pi devices prior to Raspberry Pi 2. ## Resources diff --git a/docs/iot/media/framework-dependent-animation.gif b/docs/iot/media/framework-dependent-animation.gif new file mode 100644 index 0000000000000..408bff6e414c0 Binary files /dev/null and b/docs/iot/media/framework-dependent-animation.gif differ diff --git a/docs/iot/media/rpi-imager-64bit.gif b/docs/iot/media/rpi-imager-64bit.gif new file mode 100644 index 0000000000000..1271cf2c7d95a Binary files /dev/null and b/docs/iot/media/rpi-imager-64bit.gif differ diff --git a/docs/iot/media/self-contained-animation.gif b/docs/iot/media/self-contained-animation.gif new file mode 100644 index 0000000000000..cc9a45e220d17 Binary files /dev/null and b/docs/iot/media/self-contained-animation.gif differ diff --git a/docs/iot/quickstarts/sensehat.md b/docs/iot/quickstarts/sensehat.md index 48df770a1b94b..37aeaf29a1336 100644 --- a/docs/iot/quickstarts/sensehat.md +++ b/docs/iot/quickstarts/sensehat.md @@ -27,7 +27,14 @@ This quickstart uses .NET to retrieve sensor values from the Sense HAT, respond - [!INCLUDE [prereq-rpi](../includes/prereq-rpi.md)] - Sense HAT -[!INCLUDE [prepare-pi-i2c](../includes/prepare-pi-i2c.md)] +## Prepare the Raspberry Pi + +Use the `raspi-config` command to ensure your SBC is configured to support the following services: + +- SSH +- I2C + +For more information on `raspi-config`, refer to the [Raspberry Pi documentation](https://www.raspberrypi.com/documentation/computers/configuration.html). ## Attach the Sense HAT diff --git a/docs/iot/tutorials/adc.md b/docs/iot/tutorials/adc.md index e129086bf8fb4..37191892ea2ad 100644 --- a/docs/iot/tutorials/adc.md +++ b/docs/iot/tutorials/adc.md @@ -17,7 +17,7 @@ In this topic, you will use .NET to read values from an ADC as you modulate the ## Prerequisites -- [!INCLUDE [prereq-rpi](../includes/prereq-rpi.md)] +- [!INCLUDE [prereq-sbc](../includes/prereq-sbc.md)] - [MCP3008](https://www.microchip.com/wwwproducts/MCP3008) analog-to-digital converter - Three-pin potentiometer - Breadboard @@ -25,6 +25,8 @@ In this topic, you will use .NET to read values from an ADC as you modulate the - Raspberry Pi GPIO breakout board (optional/recommended) - [!INCLUDE [tutorial-prereq-dotnet](../includes/tutorial-prereq-dotnet.md)] +[!INCLUDE [rpi-note](../includes/rpi-note.md)] + [!INCLUDE [prepare-pi-spi](../includes/prepare-pi-spi.md)] ## Prepare the hardware @@ -75,13 +77,15 @@ Complete the following steps in your preferred development environment: In the preceding code: - `hardwareSpiSettings` is set to a new instance of `SpiConnectionSettings`. The constructor sets the `busId` parameter to 0 and the `chipSelectLine` parameter to 0. - - A [using declaration](../../csharp/language-reference/keywords/using-statement.md) creates an instance of `SpiDevice` by calling `SpiDevice.Create` and passing in `hardwareSpiSettings`. This `SpiDevice` represents the SPI bus. The `using` declaration ensures the object is disposed and hardware resources are released properly. + - A [using declaration](../../csharp/language-reference/statements/using.md) creates an instance of `SpiDevice` by calling `SpiDevice.Create` and passing in `hardwareSpiSettings`. This `SpiDevice` represents the SPI bus. The `using` declaration ensures the object is disposed and hardware resources are released properly. - Another `using` declaration creates an instance of `Mcp3008` and passes the `SpiDevice` into the constructor. - A `while` loop runs indefinitely. Each iteration: + 1. Clears the console. 1. Reads the value of CH0 on the ADC by calling `mcp.Read(0)`. - 1. Divides the value by 10.24. The MCP3008 is a 10-bit ADC, which means it returns 1024 possible values ranging 0-1023. Dividing the value by 10.24 represents the value as a percentage. - 1. Rounds the value to the nearest integer. + 1. Writes the raw value to the console. 1. Writes the value to the console formatted as a percentage. + - To calculate the percentage, the value is divided by 10.23. The MCP3008 is a 10-bit ADC, which means it returns 1024 possible values ranging 0-1023. Dividing the value by 10.23 represents the value as a percentage. + - The percentage is rounded to the nearest 0.1. 1. Sleeps 500 ms. 1. [!INCLUDE [tutorial-build](../includes/tutorial-build.md)] diff --git a/docs/iot/tutorials/blink-led.md b/docs/iot/tutorials/blink-led.md index e6d6f4899267d..a012a9b5c77ae 100644 --- a/docs/iot/tutorials/blink-led.md +++ b/docs/iot/tutorials/blink-led.md @@ -15,7 +15,7 @@ General-purpose I/O (GPIO) pins can be controlled individually. This is useful f ## Prerequisites -- [!INCLUDE [prereq-rpi](../includes/prereq-rpi.md)] +- [!INCLUDE [prereq-sbc](../includes/prereq-sbc.md)] - 5 mm LED - 330 Ω resistor - Breadboard @@ -23,6 +23,8 @@ General-purpose I/O (GPIO) pins can be controlled individually. This is useful f - Raspberry Pi GPIO breakout board (optional/recommended) - [!INCLUDE [tutorial-prereq-dotnet](../includes/tutorial-prereq-dotnet.md)] +[!INCLUDE [rpi-note](../includes/rpi-note.md)] + [!INCLUDE [ensure-ssh](../includes/ensure-ssh.md)] ## Prepare the hardware @@ -52,14 +54,14 @@ Complete the following steps in your preferred development environment: cd BlinkTutorial ``` -1. [!INCLUDE [tutorial-add-packages](../includes/tutorial-add-iot-package.md)] +1. [!INCLUDE [tutorial-add-packages](../includes/tutorial-add-gpio-package.md)] 1. Replace the contents of *Program.cs* with the following code: :::code language="csharp" source="~/iot-samples/tutorials/BlinkTutorial/Program.cs" ::: In the preceding code: - - A [using declaration](../../csharp/language-reference/keywords/using-statement.md) creates an instance of `GpioController`. The `using` declaration ensures the object is disposed and hardware resources are released properly. + - A [using declaration](../../csharp/language-reference/statements/using.md) creates an instance of `GpioController`. The `using` declaration ensures the object is disposed and hardware resources are released properly. - GPIO pin 18 is opened for output - A `while` loop runs indefinitely. Each iteration: 1. Writes a value to GPIO pin 18. If `ledOn` is true, it writes `PinValue.High` (on). Otherwise, it writes `PinValue.Low`. diff --git a/docs/iot/tutorials/gpio-input.md b/docs/iot/tutorials/gpio-input.md index 243a8edf1b9f4..34bb582a5f00d 100644 --- a/docs/iot/tutorials/gpio-input.md +++ b/docs/iot/tutorials/gpio-input.md @@ -17,12 +17,14 @@ In this tutorial, you'll use .NET and your Raspberry Pi's GPIO pins to detect th ## Prerequisites -- [!INCLUDE [prereq-rpi](../includes/prereq-rpi.md)] +- [!INCLUDE [prereq-sbc](../includes/prereq-sbc.md)] - Jumper wires - Breadboard (optional) - Raspberry Pi GPIO breakout board (optional) - [!INCLUDE [tutorial-prereq-dotnet](../includes/tutorial-prereq-dotnet.md)] +[!INCLUDE [rpi-note](../includes/rpi-note.md)] + [!INCLUDE [ensure-ssh](../includes/ensure-ssh.md)] ## Prepare the hardware @@ -56,7 +58,7 @@ Complete the following steps in your preferred development environment: In the preceding code: - - A [using declaration](../../csharp/language-reference/keywords/using-statement.md) creates an instance of `GpioController`. The `using` declaration ensures the object is disposed and hardware resources are released properly. + - A [using declaration](../../csharp/language-reference/statements/using.md) creates an instance of `GpioController`. The `using` declaration ensures the object is disposed and hardware resources are released properly. - `GpioController` is instantiated with no parameters, indicating that it should detect which hardware platform it's running on and use the [logical pin numbering scheme](/dotnet/api/system.device.gpio.pinnumberingscheme). - GPIO pin 21 is opened with `PinMode.InputPullUp`. - This opens the pin with a *PullUp* resistor engaged. In this mode, when the pin is connected to ground, it will return `PinValue.Low`. When the pin is disconnected from ground and the circuit is open, the pin returns `PinValue.High`. diff --git a/docs/iot/tutorials/lcd-display.md b/docs/iot/tutorials/lcd-display.md index e7303f63c761f..beed88b400578 100644 --- a/docs/iot/tutorials/lcd-display.md +++ b/docs/iot/tutorials/lcd-display.md @@ -19,13 +19,15 @@ In this topic, you will use .NET to display text on an LCD character display usi ## Prerequisites -- [!INCLUDE [prereq-rpi](../includes/prereq-rpi.md)] +- [!INCLUDE [prereq-sbc](../includes/prereq-sbc.md)] - [20x4 LCD Character Display with I<sup>2</sup>C interface](https://www.bing.com/images/search?q=20x4+lcd+display+with+i2c) - Jumper wires - Breadboard (optional/recommended) - Raspberry Pi GPIO breakout board (optional/recommended) - [!INCLUDE [tutorial-prereq-dotnet](../includes/tutorial-prereq-dotnet.md)] +[!INCLUDE [rpi-note](../includes/rpi-note.md)] + > [!NOTE] > There are many manufacturers of LCD character displays. Most designs are identical, and the manufacturer shouldn't make any difference to the functionality. For reference, this tutorial was developed with the [SunFounder LCD2004](https://www.sunfounder.com/lcd2004-module.html). @@ -67,7 +69,7 @@ Complete the following steps in your preferred development environment: In the preceding code: - - A [using declaration](../../csharp/language-reference/keywords/using-statement.md) creates an instance of `I2cDevice` by calling `I2cDevice.Create` and passing in a new `I2cConnectionSettings` with the `busId` and `deviceAddress` parameters. This `I2cDevice` represents the I<sup>2</sup>C bus. The `using` declaration ensures the object is disposed and hardware resources are released properly. + - A [using declaration](../../csharp/language-reference/statements/using.md) creates an instance of `I2cDevice` by calling `I2cDevice.Create` and passing in a new `I2cConnectionSettings` with the `busId` and `deviceAddress` parameters. This `I2cDevice` represents the I<sup>2</sup>C bus. The `using` declaration ensures the object is disposed and hardware resources are released properly. > [!WARNING] > The device address for the GPIO expander depends on the chip used by the manufacturer. GPIO expanders equipped with a PCF8574 use the address `0x27`, while those using PCF8574A chips use `0x3F`. Consult your LCD's documentation. diff --git a/docs/iot/tutorials/temp-sensor.md b/docs/iot/tutorials/temp-sensor.md index 2e80b3ee892d9..a690bebd6bb2f 100644 --- a/docs/iot/tutorials/temp-sensor.md +++ b/docs/iot/tutorials/temp-sensor.md @@ -17,17 +17,19 @@ In this topic, you will use .NET to read environmental conditions from a sensor. ## Prerequisites -- [!INCLUDE [prereq-rpi](../includes/prereq-rpi.md)] +- [!INCLUDE [prereq-sbc](../includes/prereq-sbc.md)] - [BME280](https://learn.adafruit.com/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout) humidity/barometric pressure/temperature sensor breakout - Jumper wires - Breadboard (optional) - Raspberry Pi GPIO breakout board (optional) - [!INCLUDE [tutorial-prereq-dotnet](../includes/tutorial-prereq-dotnet.md)] +[!INCLUDE [rpi-note](../includes/rpi-note.md)] + > [!IMPORTANT] > There are many manufacturers of BME280 breakouts. Most designs are similar, and the manufacturer shouldn't make any difference to the functionality. This tutorial attempts to account for variations. Ensure your BME280 breakout includes an Inter-Integrated Circuit (I<sup>2</sup>C) interface. > -> Components like BME280 breakouts are generally sold with unsoldered pin headers. If you're uncomfortable with soldering, look for a BME280 breakout board with a pre-soldered header or a different connector. If you want, consider learning how to solder! [Here's a good beginner's guide to soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering). +> Components like BME280 breakouts are often sold with unsoldered pin headers. If you're uncomfortable with soldering, look for a BME280 breakout board with a pre-soldered header or a different connector. If you want, consider learning how to solder! [Here's a good beginner's guide to soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering). [!INCLUDE [prepare-pi-i2c](../includes/prepare-pi-i2c.md)] @@ -73,7 +75,7 @@ Complete the following steps in your preferred development environment: > [!IMPORTANT] > Some BME280 breakout manufacturers use the secondary address value. For those devices, use `Bme280.SecondaryI2cAddress`. - - A [using declaration](../../csharp/language-reference/keywords/using-statement.md) creates an instance of `I2cDevice` by calling `I2cDevice.Create` and passing in `i2cSettings`. This `I2cDevice` represents the I<sup>2</sup>C bus. The `using` declaration ensures the object is disposed and hardware resources are released properly. + - A [using declaration](../../csharp/language-reference/statements/using.md) creates an instance of `I2cDevice` by calling `I2cDevice.Create` and passing in `i2cSettings`. This `I2cDevice` represents the I<sup>2</sup>C bus. The `using` declaration ensures the object is disposed and hardware resources are released properly. - Another `using` declaration creates an instance of `Bme280` to represent the sensor. The `I2cDevice` is passed in the constructor. - The time required for the chip to take measurements with the chip's current (default) settings is retrieved by calling `GetMeasurementDuration`. - A `while` loop runs indefinitely. Each iteration: diff --git a/docs/machine-learning/how-to-guides/getting-started-dataframe.md b/docs/machine-learning/how-to-guides/getting-started-dataframe.md new file mode 100644 index 0000000000000..a8ba4670b2df0 --- /dev/null +++ b/docs/machine-learning/how-to-guides/getting-started-dataframe.md @@ -0,0 +1,129 @@ +--- +title: Getting started with DataFrames +description: Learn how to use DataFrame to manipulate and prepare data. +author: beccamc +ms.author: beccam +ms.date: 3/10/2023 +ms.custom: mvc, how-to, title-hack-0625 +ms.topic: how-to +--- + +# Getting started with DataFrames + +Learn how to get started with DataFrames. [DataFrames](/dotnet/api/microsoft.data.analysis.dataframe) are a two-dimensional data structure for storing and manipulating data. DataFrames help with preparation of data for a machine learning model. DataFrames can also be used for data manipulation unrelated to machine learning. + +## Install Microsoft.Data.Analysis + +In most cases, accessing DataFrame is as simple as referencing the [Microsoft.Data.Analysis](https://www.nuget.org/packages/Microsoft.Data.Analysis/) NuGet package. + +```dotnetcli +dotnet add package Microsoft.Data.Analysis +``` + +## Load data + +DataFrames make it easy to load tabular data. Create a comma-separated file called *housing-prices.csv* with the following data. + +```text +Id,Size,HistoricalPrice,CurrentPrice +1,600f,100000,170000 +2,1000f,200000,225000 +3,1000f,126000,195000 +4,850f,150000,205000 +5,900f,155000,210000 +6,550f,99000,180000 +``` + +Start by loading the data into a DataFrame. + +```csharp +using System.IO; +using System.Linq; +using Microsoft.Data.Analysis; + +// Define data path +var dataPath = Path.GetFullPath(@"housing-prices.csv"); + +// Load the data into the data frame +var dataFrame = DataFrame.LoadCsv(dataPath); +``` + +## Inspect Data + +DataFrames store data as a collection of columns. This makes it easy to interact with the data. + +To get a preview of the column datatypes, run <xref:Microsoft.Data.Analysis.DataFrame.Info>. + +```csharp +dataFrame.Info(); +``` + +To get a summary of the data, run <xref:Microsoft.Data.Analysis.DataFrame.Description>. + +```csharp +dataFrame.Description(); +``` + +## Transform Data + +There are a variety of transformative options for data. The <xref:Microsoft.Data.Analysis.DataFrame> and <xref:Microsoft.Data.Analysis.DataFrameColumn> classes expose a number of useful APIs: binary operations, computations, joins, merges, handling missing values and more. + +For example, this data can be edited to compare historical prices to current prices accounting for inflation. We can apply a computation to all of the values and save the results in a new column. + +```csharp +dataFrame["ComputedPrices"] = dataFrame["HistoricalPrice"].Multiply(2); +``` + +Data can be sorted into groups from the values in a specific column. + +```csharp +var sortedDataFrame = dataFrame.GroupBy("Size"); +``` + +Data can be filtered based on different equality metrics. This example uses a ElementWise equality function, and then filters based on the boolean result column to get a new DataFrame with only the appropriate values. + +```csharp +PrimitiveDataFrameColumn<bool> boolFilter = dataFrame["CurrentPrice"].ElementwiseGreaterThan(200000); +DataFrame filteredDataFrame = dataFrame.Filter(boolFilter); +``` + +## Combine Data Sources + +```text +Id, Bedrooms +1, 1 +2, 2 +3, 3 +4, 2 +5, 3 +6, 1 +``` + +DataFrames can be constructed from individual data columns. Create a DataFrame from a list of the raw data above. + +```csharp +var ids = new List<Single>() {1,2,3,4,5,6}; +var bedrooms = new List<Single>() {1, 2, 3, 2, 3, 1}; + +var idColumn = new SingleDataFrameColumn("Id", ids); +var bedroomColumn = new SingleDataFrameColumn("BedroomNumber", bedrooms); +var dataFrame2 = new DataFrame(idColumn, bedroomColumn); +``` + +The two DataFrames can be merged based on the Id value. The merge function will take both DataFrames, and combine rows based on their id. + +```csharp +dataFrame = dataFrame.Merge(dataFrame2, new string[] {"Id"}, new string[] {"Id"}); +``` + +## Save DataFrames + +Results can be saved back into a .csv format. + +```csharp +DataFrame.SaveCsv(dataFrame, "result.csv", ','); +``` + +## Use DataFrame with ML.NET + +DataFrames work directly with ML.NET. DataFrame implements the <xref:Microsoft.ML.IDataView> and can be used to train a model. diff --git a/docs/machine-learning/how-to-guides/how-to-use-the-automl-api.md b/docs/machine-learning/how-to-guides/how-to-use-the-automl-api.md index 42ec158014f94..a362fa6812601 100644 --- a/docs/machine-learning/how-to-guides/how-to-use-the-automl-api.md +++ b/docs/machine-learning/how-to-guides/how-to-use-the-automl-api.md @@ -721,5 +721,5 @@ To determine feature importance using AutoML: ```csharp var featureImportance = pfi.Select(x => Tuple.Create(x.Key, x.Value.Regression.RSquared)) - .OrderByDescending(x => x.Item2) + .OrderByDescending(x => x.Item2); ``` diff --git a/docs/machine-learning/how-to-guides/install-gpu-model-builder.md b/docs/machine-learning/how-to-guides/install-gpu-model-builder.md index 54b6f23a38f5c..86e10fde3a135 100644 --- a/docs/machine-learning/how-to-guides/install-gpu-model-builder.md +++ b/docs/machine-learning/how-to-guides/install-gpu-model-builder.md @@ -1,7 +1,7 @@ --- title: How to install GPU support in Model Builder description: Learn how to install GPU support in Model Builder -ms.date: 12/08/2022 +ms.date: 02/28/2023 author: luisquintanilla ms.author: luquinta ms.topic: how-to @@ -24,7 +24,6 @@ Learn how to install the GPU drivers to use your GPU with Model Builder. ### Image classification only -- [Model Builder Visual Studio GPU support extension](https://marketplace.visualstudio.com/items?itemName=MLNET.ModelBuilderGPU2022) - NVIDIA developer account. If you don't have one, [create a free account](https://developer.nvidia.com/developer-program). - Install dependencies - Install [CUDA v10.1](https://developer.nvidia.com/cuda-10.1-download-archive-update2). Make sure you install CUDA v10.1, not any other newer version. diff --git a/docs/machine-learning/how-to-guides/install-ml-net-cli.md b/docs/machine-learning/how-to-guides/install-ml-net-cli.md index 2bc6c258bedf4..df24fbe289e83 100644 --- a/docs/machine-learning/how-to-guides/install-ml-net-cli.md +++ b/docs/machine-learning/how-to-guides/install-ml-net-cli.md @@ -1,7 +1,7 @@ --- title: How to install the ML.NET Command-Line Interface (CLI) tool description: Learn how to install, upgrade, downgrade, and uninstall the ML.NET Command-Line Interface (CLI) tool. -ms.date: 02/22/2022 +ms.date: 03/08/2023 ms.custom: mlnet-tooling ms.topic: how-to --- @@ -98,7 +98,13 @@ mlnet You should see the help for available commands for the mlnet tool such as the 'classification' command. > [!IMPORTANT] -> If you are running Linux or macOS, note that if you're using a console other than Bash (for example, zsh, which is the new default for macOS), then you'll need to give `mlnet` executable permissions and include `mlnet` to the system path. Instructions on how to do this should appear in the terminal when you install `mlnet` (or any global tool). +> If you're running Linux or macOS and using a console other than Bash (for example, zsh, which is the new default for macOS), then you'll need to give `mlnet` executable permissions and include `mlnet` to the system path. In general, you can do so with the following command: +> +> ```console +> chmod +x <PATH-TO-MLNET-CLI-EXECUTABLE> +> ``` +> +> More detailed instructions on how to do this should appear in the terminal when you install `mlnet` (or any global tool). > > Alternatively, you can try using the following command to run the mlnet tool: > diff --git a/docs/machine-learning/how-to-guides/prepare-data-ml-net.md b/docs/machine-learning/how-to-guides/prepare-data-ml-net.md index 510a19e2da01e..ce0adf7ef95ac 100644 --- a/docs/machine-learning/how-to-guides/prepare-data-ml-net.md +++ b/docs/machine-learning/how-to-guides/prepare-data-ml-net.md @@ -332,7 +332,7 @@ Using the first entry as an example, the following is a detailed description of |--|--|--| |1. NormalizeText | Converts all letters to lowercase by default | this is a good product |2. TokenizeWords | Splits string into individual words | ["this","is","a","good","product"] -|3. RemoveDefaultStopWords | Removes stopwords like *is* and *a*. | ["good","product"] +|3. RemoveDefaultStopWords | Removes stop words like *is* and *a*. | ["good","product"] |4. MapValueToKey | Maps the values to keys (categories) based on the input data | [1,2] |5. ProduceNGrams | Transforms text into sequence of consecutive words | [1,1,1,0,0] |6. NormalizeLpNorm | Scale inputs by their lp-norm | [ 0.577350529, 0.577350529, 0.577350529, 0, 0 ] diff --git a/docs/machine-learning/how-to-guides/serve-model-web-api-ml-net.md b/docs/machine-learning/how-to-guides/serve-model-web-api-ml-net.md index 39da18e0ccec4..cfa0fd260202a 100644 --- a/docs/machine-learning/how-to-guides/serve-model-web-api-ml-net.md +++ b/docs/machine-learning/how-to-guides/serve-model-web-api-ml-net.md @@ -1,7 +1,7 @@ --- title: Deploy a model in an ASP.NET Core Web API -description: Serve ML.NET sentiment analysis machine learning model over the internet using ASP.NET Core Web API -ms.date: 09/07/2021 +description: Serve an ML.NET sentiment analysis machine learning model using an ASP.NET Core Web API +ms.date: 03/02/2023 author: luisquintanilla ms.author: luquinta ms.custom: mvc,how-to @@ -15,77 +15,81 @@ Learn how to serve a pre-trained ML.NET machine learning model on the web using ## Prerequisites -- [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019) or later or Visual Studio 2017 version 15.6 or later with the ".NET Core cross-platform development" workload installed. +- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/#download) with the **ASP.NET and web development workload**. - PowerShell. - Pre-trained model. Use the [ML.NET Sentiment Analysis tutorial](../tutorials/sentiment-analysis.md) to build your own model or download this [pre-trained sentiment analysis machine learning model](https://github.com/dotnet/samples/blob/main/machine-learning/models/sentimentanalysis/sentiment_model.zip) ## Create ASP.NET Core Web API project -1. Open Visual Studio 2017. Select **File > New > Project** from the menu bar. In the New Project dialog, select the **Visual C#** node followed by the **Web** node. Then select the **ASP.NET Core Web Application** project template. In the **Name** text box, type "SentimentAnalysisWebAPI" and then select the **OK** button. +1. Start Visual Studio 2022 and select **Create a new project**. +1. In the **Create a new project** dialog: -1. In the window that displays the different types of ASP.NET Core Projects, select **API** and the select the **OK** button. + - Enter `Web API` in the search box. + - Select the **ASP.NET Core Web API** template and select **Next**. -1. Create a directory named *MLModels* in your project to save your pre-built machine learning model files: +1. In the **Configure your project** dialog: - In Solution Explorer, right-click on your project and select Add > New Folder. Type "MLModels" and hit Enter. + - Name your project **SentimentAnalysisWebAPI**. + - Select **Next**. -1. Install the **Microsoft.ML NuGet Package**: +1. In the **Additional information** dialog: - In Solution Explorer, right-click on your project and select **Manage NuGet Packages**. Choose "nuget.org" as the Package source, select the Browse tab, search for **Microsoft.ML**, select that package in the list, and select the Install button. Select the **OK** button on the **Preview Changes** dialog and then select the **I Accept** button on the License Acceptance dialog if you agree with the license terms for the packages listed. + - Uncheck **Do not use top-level statements**. + - Select **Create**. -1. Install the **Microsoft.Extensions.ML Nuget Package**: +1. Install the following NuGet packages: - In Solution Explorer, right-click on your project and select **Manage NuGet Packages**. Choose "nuget.org" as the Package source, select the Browse tab, search for **Microsoft.Extensions.ML**, select that package in the list, and select the Install button. Select the **OK** button on the **Preview Changes** dialog and then select the **I Accept** button on the License Acceptance dialog if you agree with the license terms for the packages listed. + - [Microsoft.ML](https://www.nuget.org/packages/Microsoft.ML) + - [Microsoft.Extensions.ML](https://www.nuget.org/packages/Microsoft.Extensions.ML/) + + For more details on installing NuGet packages in Visual Studio, see the [Install and use a NuGet package in Visual Studio](/nuget/quickstart/install-and-use-a-package-in-visual-studio#nuget-package-manager) guide. ### Add model to ASP.NET Core Web API project -1. Copy your pre-built model to the *MLModels* directory -1. In Solution Explorer, right-click the model zip file and select Properties. Under Advanced, change the value of Copy to Output Directory to Copy if newer. +1. Copy your pre-built model to your *SentimentAnalysisWebAPI* project directory. +1. Configure your project to copy your model file to the output directory. In Solution Explorer: + + - Right-click the model zip file and select **Properties**. + - Under Advanced, change the value of Copy to Output Directory to **Copy if newer**. ## Create data models -You need to create some classes for your input data and predictions. Add a new class to your project: +You need to create some classes to define the schema of your model input and output. -1. Create a directory named *DataModels* in your project to save your data models: +> [!NOTE] +> The properties of your input and output schema classes depend on the dataset columns used to train your model as well as the machine learning task (regression, classification, etc.). - In Solution Explorer, right-click on your project and select Add > New Folder. Type "DataModels" and hit <kbd>Enter</kbd>. +In your *Program.cs* file: -2. In Solution Explorer, right-click the *DataModels* directory, and then select Add > New Item. -3. In the **Add New Item** dialog box, select **Class** and change the **Name** field to *SentimentData.cs*. Then, select the **Add** button. The *SentimentData.cs* file opens in the code editor. Add the following using statement to the top of *SentimentData.cs*: +1. Add the following using statements: ```csharp using Microsoft.ML.Data; + using Microsoft.Extensions.ML; ``` - Remove the existing class definition and add the following code to the **SentimentData.cs** file: +1. At the bottom of the file, add the following classes: + + **Model input** + + For this model, the input contains a single property `SentimentText` which is a string that represents a user comment. ```csharp - public class SentimentData + public class ModelInput { - [LoadColumn(0)] public string SentimentText; - - [LoadColumn(1)] - [ColumnName("Label")] - public bool Sentiment; } ``` -4. In Solution Explorer, right-click the *DataModels* directory, and then select **Add > New Item**. -5. In the **Add New Item** dialog box, select **Class** and change the **Name** field to *SentimentPrediction.cs*. Then, select the Add button. The *SentimentPrediction.cs* file opens in the code editor. Add the following using statement to the top of *SentimentPrediction.cs*: - - ```csharp - using Microsoft.ML.Data; - ``` + **Model output** - Remove the existing class definition and add the following code to the *SentimentPrediction.cs* file: + Once the model evaluates the input, it outputs a prediction with three properties: `Sentiment`, `Probability`, and `Score`. In this case, the `Sentiment` is the predicted sentiment of the user comment and the `Probability` and `Score` are confidence measures for the prediction. ```csharp - public class SentimentPrediction : SentimentData + public class ModelOutput { - [ColumnName("PredictedLabel")] - public bool Prediction { get; set; } + public bool Sentiment { get; set; } public float Probability { get; set; } @@ -93,32 +97,18 @@ You need to create some classes for your input data and predictions. Add a new c } ``` - `SentimentPrediction` inherits from `SentimentData`. This makes it easier to see the original data in the `SentimentText` property along with the output generated by the model. - ## Register PredictionEnginePool for use in the application To make a single prediction, you have to create a [`PredictionEngine`](xref:Microsoft.ML.PredictionEngine%602). [`PredictionEngine`](xref:Microsoft.ML.PredictionEngine%602) is not thread-safe. Additionally, you have to create an instance of it everywhere it is needed within your application. As your application grows, this process can become unmanageable. For improved performance and thread safety, use a combination of dependency injection and the `PredictionEnginePool` service, which creates an [`ObjectPool`](xref:Microsoft.Extensions.ObjectPool.ObjectPool%601) of [`PredictionEngine`](xref:Microsoft.ML.PredictionEngine%602) objects for use throughout your application. The following link provides more information if you want to learn more about [dependency injection in ASP.NET Core](/aspnet/core/fundamentals/dependency-injection). -1. Open the *Startup.cs* class and add the following using statement to the top of the file: - - ```csharp - using Microsoft.AspNetCore.Builder; - using Microsoft.AspNetCore.Hosting; - using Microsoft.AspNetCore.Mvc; - using Microsoft.Extensions.Configuration; - using Microsoft.Extensions.DependencyInjection; - using Microsoft.Extensions.ML; - using SentimentAnalysisWebAPI.DataModels; - ``` - -2. Add the following code to the *ConfigureServices* method: +Add the following code to your *Program.cs* file: - ```csharp - services.AddPredictionEnginePool<SentimentData, SentimentPrediction>() - .FromFile(modelName: "SentimentAnalysisModel", filePath:"MLModels/sentiment_model.zip", watchForChanges: true); - ``` +```csharp +builder.Services.AddPredictionEnginePool<ModelInput, ModelOutput>() + .FromFile(modelName: "SentimentAnalysisModel", filePath: "sentiment_model.zip", watchForChanges: true); +``` At a high level, this code initializes the objects and services automatically for later use when requested by the application instead of having to manually do it. @@ -139,51 +129,58 @@ The model is identified by the `modelName` parameter so that more than one model > period: TimeSpan.FromMinutes(1)); >``` -## Create Predict controller +## Map predict endpoint -To process your incoming HTTP requests, create a controller. +To process your incoming HTTP requests, create an endpoint. -1. In Solution Explorer, right-click the *Controllers* directory, and then select **Add > Controller**. -1. In the **Add New Item** dialog box, select **API Controller Empty** and select **Add**. -1. In the prompt change the **Controller Name** field to *PredictController.cs*. Then, select the Add button. The *PredictController.cs* file opens in the code editor. Add the following using statement to the top of *PredictController.cs*: +Replace the `/` endpoint with the following: - ```csharp - using System; - using Microsoft.AspNetCore.Mvc; - using Microsoft.Extensions.ML; - using SentimentAnalysisWebAPI.DataModels; - ``` +```csharp +var predictionHandler = + async (PredictionEnginePool<ModelInput, ModelOutput> predictionEnginePool, ModelInput input) => + await Task.FromResult(predictionEnginePool.Predict(modelName: "SentimentAnalysisModel", input)); - Remove the existing class definition and add the following code to the *PredictController.cs* file: +app.MapPost("/predict", predictionHandler); +``` - ```csharp - public class PredictController : ControllerBase - { - private readonly PredictionEnginePool<SentimentData, SentimentPrediction> _predictionEnginePool; +The `/predict` endpoint accepts HTTP POST requests and uses the prediction engine pool to return a prediction using the provided input. - public PredictController(PredictionEnginePool<SentimentData,SentimentPrediction> predictionEnginePool) - { - _predictionEnginePool = predictionEnginePool; - } +When finished, your *Program.cs* should look like the following: - [HttpPost] - public ActionResult<string> Post([FromBody] SentimentData input) - { - if(!ModelState.IsValid) - { - return BadRequest(); - } +```csharp +using Microsoft.ML.Data; +using Microsoft.Extensions.ML; - SentimentPrediction prediction = _predictionEnginePool.Predict(modelName: "SentimentAnalysisModel", example: input); +var builder = WebApplication.CreateBuilder(args); - string sentiment = Convert.ToBoolean(prediction.Prediction) ? "Positive" : "Negative"; +builder.Services.AddPredictionEnginePool<ModelInput, ModelOutput>() + .FromFile(modelName: "SentimentAnalysisModel", filePath: "sentiment_model.zip", watchForChanges: true); - return Ok(sentiment); - } - } - ``` +var app = builder.Build(); + +var predictionHandler = + async (PredictionEnginePool<ModelInput, ModelOutput> predictionEnginePool, ModelInput input) => + await Task.FromResult(predictionEnginePool.Predict(modelName: "SentimentAnalysisModel", input)); + +app.MapPost("/predict", predictionHandler); + +app.Run(); + +public class ModelInput +{ + public string SentimentText; +} + +public class ModelOutput +{ + [ColumnName("PredictedLabel")] + public bool Sentiment { get; set; } + + public float Probability { get; set; } -This code assigns the `PredictionEnginePool` by passing it to the controller's constructor which you get via dependency injection. Then, the `Predict` controller's `Post` method uses the `PredictionEnginePool` to make predictions using the `SentimentAnalysisModel` registered in the `Startup` class and returns the results back to the user if successful. + public float Score { get; set; } +} +``` ## Test web API locally @@ -193,13 +190,15 @@ Once everything is set up, it's time to test the application. 1. Open PowerShell and enter the following code where PORT is the port your application is listening on. ```powershell - Invoke-RestMethod "https://localhost:<PORT>/api/predict" -Method Post -Body (@{SentimentText="This was a very bad steak"} | ConvertTo-Json) -ContentType "application/json" + Invoke-RestMethod "https://localhost:<PORT>/predict" -Method Post -Body (@{SentimentText="This was a very bad steak"} | ConvertTo-Json) -ContentType "application/json" ``` If successful, the output should look similar to the text below: ```powershell - Negative + sentiment probability score + --------- ----------- ----- + False 0.5 0 ``` Congratulations! You have successfully served your model to make predictions over the internet using an ASP.NET Core Web API. diff --git a/docs/machine-learning/resources/metrics.md b/docs/machine-learning/resources/metrics.md index 3281192bf4a9b..252b79cac03ef 100644 --- a/docs/machine-learning/resources/metrics.md +++ b/docs/machine-learning/resources/metrics.md @@ -1,7 +1,7 @@ --- title: ML.NET metrics description: Understand the metrics that are used to evaluate the performance of an ML.NET model -ms.date: 11/10/2022 +ms.date: 02/28/2023 --- # Evaluate your ML.NET model with metrics @@ -90,3 +90,9 @@ For further details on regression metrics, read the following articles: |----------|-----------------------|-----------| |**Area Under ROC Curve**|Area under the receiver operator curve measures how well the model separates anomalous and usual data points.|**Values closer to 1 are better**. Only values greater than 0.5 demonstrate effectiveness of the model. Values of 0.5 or below indicate that the model is no better than randomly allocating the inputs to anomalous and usual categories| |**Detection Rate At False Positive Count**|Detection rate at false positive count is the ratio of the number of correctly identified anomalies to the total number of anomalies in a test set, indexed by each false positive. That is, there is a value for detection rate at false positive count for each false positive item.|**Values closer to 1 are better**. If there are no false positives, then this value is 1| + +## Evaluation metrics for sentence similarity + +| Metric | Description | Look for | +|----------|-----------------------|-----------| +| **Pearson Correlation** | [Pearson correlation](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient), also known as correlation coefficient, measures the dependence or relationship between two sets of data. | **Absolute values closer to 1 are most similar**. This metric ranges from -1 to 1. An absolute value of 1 implies that the datasets are identical. A value of 0 implies there is no relationship between the two sets of data. | diff --git a/docs/machine-learning/toc.yml b/docs/machine-learning/toc.yml index 425b66fc3bd76..ad8817950434a 100644 --- a/docs/machine-learning/toc.yml +++ b/docs/machine-learning/toc.yml @@ -101,6 +101,8 @@ href: how-to-guides/load-data-ml-net.md - name: Prepare data href: how-to-guides/prepare-data-ml-net.md + - name: Work with DataFrames + href: how-to-guides/getting-started-dataframe.md - name: Train, evaluate, and explain the model items: - name: Train and evaluate a model diff --git a/docs/machine-learning/tutorials/media/time-series-demand-forecasting/forecast.png b/docs/machine-learning/tutorials/media/time-series-demand-forecasting/forecast.png index e1b47ee8f7736..0ca4f17e44359 100644 Binary files a/docs/machine-learning/tutorials/media/time-series-demand-forecasting/forecast.png and b/docs/machine-learning/tutorials/media/time-series-demand-forecasting/forecast.png differ diff --git a/docs/machine-learning/tutorials/snippets/github-issue-classification/csharp/GitHubIssueClassification.csproj b/docs/machine-learning/tutorials/snippets/github-issue-classification/csharp/GitHubIssueClassification.csproj index 766157558eecb..37f36940a6fa4 100644 --- a/docs/machine-learning/tutorials/snippets/github-issue-classification/csharp/GitHubIssueClassification.csproj +++ b/docs/machine-learning/tutorials/snippets/github-issue-classification/csharp/GitHubIssueClassification.csproj @@ -12,7 +12,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.ML" Version="2.0.0" /> + <PackageReference Include="Microsoft.ML" Version="2.0.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/machine-learning/tutorials/snippets/image-classification/csharp/TransferLearningTF.csproj b/docs/machine-learning/tutorials/snippets/image-classification/csharp/TransferLearningTF.csproj index 885fdb66dcf45..2b5a65cd57d1f 100644 --- a/docs/machine-learning/tutorials/snippets/image-classification/csharp/TransferLearningTF.csproj +++ b/docs/machine-learning/tutorials/snippets/image-classification/csharp/TransferLearningTF.csproj @@ -7,10 +7,10 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.ML" Version="2.0.0" /> - <PackageReference Include="Microsoft.ML.ImageAnalytics" Version="2.0.0" /> - <PackageReference Include="Microsoft.ML.TensorFlow" Version="2.0.0" /> - <PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.10.0" /> + <PackageReference Include="Microsoft.ML" Version="2.0.1" /> + <PackageReference Include="Microsoft.ML.ImageAnalytics" Version="2.0.1" /> + <PackageReference Include="Microsoft.ML.TensorFlow" Version="2.0.1" /> + <PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.11.0" /> </ItemGroup> <ItemGroup> diff --git a/docs/machine-learning/tutorials/snippets/iris-clustering/csharp/IrisFlowerClustering.csproj b/docs/machine-learning/tutorials/snippets/iris-clustering/csharp/IrisFlowerClustering.csproj index 3bdd29b02c231..2c61ac3120755 100644 --- a/docs/machine-learning/tutorials/snippets/iris-clustering/csharp/IrisFlowerClustering.csproj +++ b/docs/machine-learning/tutorials/snippets/iris-clustering/csharp/IrisFlowerClustering.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.ML" Version="2.0.0" /> + <PackageReference Include="Microsoft.ML" Version="2.0.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/machine-learning/tutorials/snippets/movie-recommendation/csharp/MovieRecommendation.csproj b/docs/machine-learning/tutorials/snippets/movie-recommendation/csharp/MovieRecommendation.csproj index 5a5a0c3f482ec..d3f512bb9fa1f 100644 --- a/docs/machine-learning/tutorials/snippets/movie-recommendation/csharp/MovieRecommendation.csproj +++ b/docs/machine-learning/tutorials/snippets/movie-recommendation/csharp/MovieRecommendation.csproj @@ -7,8 +7,8 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.ML" Version="2.0.0" /> - <PackageReference Include="Microsoft.ML.Recommender" Version="0.20.0" /> + <PackageReference Include="Microsoft.ML" Version="2.0.1" /> + <PackageReference Include="Microsoft.ML.Recommender" Version="0.20.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/machine-learning/tutorials/snippets/phone-calls-anomaly-detection/csharp/PhoneCallsAnomalyDetection.csproj b/docs/machine-learning/tutorials/snippets/phone-calls-anomaly-detection/csharp/PhoneCallsAnomalyDetection.csproj index 5364ff6930b2f..d062f78966ca6 100644 --- a/docs/machine-learning/tutorials/snippets/phone-calls-anomaly-detection/csharp/PhoneCallsAnomalyDetection.csproj +++ b/docs/machine-learning/tutorials/snippets/phone-calls-anomaly-detection/csharp/PhoneCallsAnomalyDetection.csproj @@ -7,8 +7,8 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.ML" Version="2.0.0" /> - <PackageReference Include="Microsoft.ML.TimeSeries" Version="2.0.0" /> + <PackageReference Include="Microsoft.ML" Version="2.0.1" /> + <PackageReference Include="Microsoft.ML.TimeSeries" Version="2.0.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/machine-learning/tutorials/snippets/predict-prices/csharp/TaxiFarePrediction.csproj b/docs/machine-learning/tutorials/snippets/predict-prices/csharp/TaxiFarePrediction.csproj index 7785533a0d79d..0fe77e880ca60 100644 --- a/docs/machine-learning/tutorials/snippets/predict-prices/csharp/TaxiFarePrediction.csproj +++ b/docs/machine-learning/tutorials/snippets/predict-prices/csharp/TaxiFarePrediction.csproj @@ -7,8 +7,8 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.ML" Version="2.0.0" /> - <PackageReference Include="Microsoft.ML.FastTree" Version="2.0.0" /> + <PackageReference Include="Microsoft.ML" Version="2.0.1" /> + <PackageReference Include="Microsoft.ML.FastTree" Version="2.0.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/machine-learning/tutorials/snippets/sales-anomaly-detection/csharp/ProductSalesAnomalyDetection.csproj b/docs/machine-learning/tutorials/snippets/sales-anomaly-detection/csharp/ProductSalesAnomalyDetection.csproj index 787d9f96724f6..18e6917720f54 100644 --- a/docs/machine-learning/tutorials/snippets/sales-anomaly-detection/csharp/ProductSalesAnomalyDetection.csproj +++ b/docs/machine-learning/tutorials/snippets/sales-anomaly-detection/csharp/ProductSalesAnomalyDetection.csproj @@ -7,8 +7,8 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.ML" Version="2.0.0" /> - <PackageReference Include="Microsoft.ML.TimeSeries" Version="2.0.0" /> + <PackageReference Include="Microsoft.ML" Version="2.0.1" /> + <PackageReference Include="Microsoft.ML.TimeSeries" Version="2.0.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/machine-learning/tutorials/snippets/sentiment-analysis/csharp/SentimentAnalysis.csproj b/docs/machine-learning/tutorials/snippets/sentiment-analysis/csharp/SentimentAnalysis.csproj index 8dfc7e531d559..4766365f356c1 100644 --- a/docs/machine-learning/tutorials/snippets/sentiment-analysis/csharp/SentimentAnalysis.csproj +++ b/docs/machine-learning/tutorials/snippets/sentiment-analysis/csharp/SentimentAnalysis.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.ML" Version="2.0.0" /> + <PackageReference Include="Microsoft.ML" Version="2.0.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/machine-learning/tutorials/snippets/text-classification-tf/csharp/TextClassificationTF.csproj b/docs/machine-learning/tutorials/snippets/text-classification-tf/csharp/TextClassificationTF.csproj index ce3503ce4d121..aee0a718e8a45 100644 --- a/docs/machine-learning/tutorials/snippets/text-classification-tf/csharp/TextClassificationTF.csproj +++ b/docs/machine-learning/tutorials/snippets/text-classification-tf/csharp/TextClassificationTF.csproj @@ -7,10 +7,10 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.ML" Version="2.0.0" /> - <PackageReference Include="Microsoft.ML.SampleUtils" Version="0.20.0" /> - <PackageReference Include="Microsoft.ML.TensorFlow" Version="2.0.0" /> - <PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.10.0" /> + <PackageReference Include="Microsoft.ML" Version="2.0.1" /> + <PackageReference Include="Microsoft.ML.SampleUtils" Version="0.20.1" /> + <PackageReference Include="Microsoft.ML.TensorFlow" Version="2.0.1" /> + <PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.11.0" /> </ItemGroup> <ItemGroup> diff --git a/docs/navigate/advanced-programming/index.yml b/docs/navigate/advanced-programming/index.yml new file mode 100644 index 0000000000000..f4dbe78c39f7b --- /dev/null +++ b/docs/navigate/advanced-programming/index.yml @@ -0,0 +1,90 @@ +### YamlMime:Landing + +title: Advanced .NET programming documentation +summary: Learn about advanced programming concepts in .NET such as threading, parallel programming, asynchronous programming models, native interop, and memory management. + +metadata: + title: Advanced .NET programming documentation + description: Learn about advanced programming concepts in .NET such as threading, parallel programming, asynchronous programming models, native interop, and memory management. + ms.topic: landing-page + ms.date: 01/17/2023 + +landingContent: + + # Card + - title: Asynchronous programming + linkLists: + - linkListType: overview + links: + - text: Pattern overview + url: ../../standard/asynchronous-programming-patterns/index.md + - text: TAP overview + url: ../../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md + - text: EAP overview + url: ../../standard/asynchronous-programming-patterns/event-based-asynchronous-pattern-eap.md + - text: APM overview + url: ../../standard/asynchronous-programming-patterns/asynchronous-programming-model-apm.md + + # Card + - title: Threading + linkLists: + - linkListType: overview + links: + - text: Overview + url: ../../standard/threading/managed-threading-basics.md + - linkListType: concept + links: + - text: Managed thread pool + url: ../../standard/threading/the-managed-thread-pool.md + + # Card + - title: Parallel programming + linkLists: + - linkListType: overview + links: + - text: Parallel Programming in .NET + url: ../../standard/parallel-programming/index.md + - linkListType: concept + links: + - text: Task Parallel Library (TPL) + url: ../../standard/parallel-programming/task-parallel-library-tpl.md + - text: Task-based asynchronous programming + url: ../../standard/parallel-programming/task-based-asynchronous-programming.md + - text: Task cancellation + url: ../../standard/parallel-programming/task-cancellation.md + - linkListType: how-to-guide + links: + - text: Write a simple parallel program using Parallel.ForEach + url: ../../standard/parallel-programming/how-to-write-a-simple-parallel-foreach-loop.md + - text: Return a value from a task + url: ../../standard/parallel-programming/how-to-return-a-value-from-a-task.md + + # Card + - title: Native interoperability + linkLists: + - linkListType: overview + links: + - text: Overview + url: ../../standard/native-interop/index.md + - text: P/Invoke + url: ../../standard/native-interop/pinvoke.md + - text: Type marshalling + url: ../../standard/native-interop/type-marshalling.md + + # Card + - title: Memory management + linkLists: + - linkListType: overview + links: + - text: Managed code + url: ../../standard/managed-code.md + - text: Garbage collection + url: ../../standard/garbage-collection/index.md + - text: Unmanaged resources + url: ../../standard/garbage-collection/unmanaged.md + - linkListType: concept + links: + - text: Implement a Dispose method + url: ../../standard/garbage-collection/implementing-dispose.md + - text: Implement a DisposeAsync method + url: ../../standard/garbage-collection/implementing-disposeasync.md diff --git a/docs/navigate/advanced-programming/toc.yml b/docs/navigate/advanced-programming/toc.yml new file mode 100644 index 0000000000000..e53d305445ee9 --- /dev/null +++ b/docs/navigate/advanced-programming/toc.yml @@ -0,0 +1,417 @@ +items: +- name: Advanced .NET programming + href: index.yml +- name: Asynchronous programming patterns + items: + - name: Overview + href: ../../standard/asynchronous-programming-patterns/index.md + - name: Task-based asynchronous pattern (TAP) + items: + - name: Overview + displayName: TAP, task-based asynchronous pattern + href: ../../standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap.md + - name: Implement the TAP + href: ../../standard/asynchronous-programming-patterns/implementing-the-task-based-asynchronous-pattern.md + - name: Consume the TAP + href: ../../standard/asynchronous-programming-patterns/consuming-the-task-based-asynchronous-pattern.md + - name: Interop with other asynchronous patterns and types + href: ../../standard/asynchronous-programming-patterns/interop-with-other-asynchronous-patterns-and-types.md + - name: Event-based asynchronous pattern (EAP) + items: + - name: Documentation overview + href: ../../standard/asynchronous-programming-patterns/event-based-asynchronous-pattern-eap.md + - name: EAP overview + displayName: EAP, event-based asynchronous pattern + href: ../../standard/asynchronous-programming-patterns/event-based-asynchronous-pattern-overview.md + - name: Implement the EAP + href: ../../standard/asynchronous-programming-patterns/implementing-the-event-based-asynchronous-pattern.md + - name: Best practices + href: ../../standard/asynchronous-programming-patterns/best-practices-for-implementing-the-event-based-asynchronous-pattern.md + - name: When to implement the EAP + href: ../../standard/asynchronous-programming-patterns/deciding-when-to-implement-the-event-based-asynchronous-pattern.md + - name: Implement a component that supports the EAP + href: ../../standard/asynchronous-programming-patterns/component-that-supports-the-event-based-asynchronous-pattern.md + - name: Implement a client of the EAP + href: ../../standard/asynchronous-programming-patterns/how-to-implement-a-client-of-the-event-based-asynchronous-pattern.md + - name: Use components that support the EAP + href: ../../standard/asynchronous-programming-patterns/how-to-use-components-that-support-the-event-based-asynchronous-pattern.md + - name: Asynchronous programming model (APM) + items: + - name: Overview + displayName: APM, asynchronous programming model + href: ../../standard/asynchronous-programming-patterns/asynchronous-programming-model-apm.md + - name: Call asynchronous methods using IAsyncResult + href: ../../standard/asynchronous-programming-patterns/calling-asynchronous-methods-using-iasyncresult.md + items: + - name: Block execution using an AsyncWaitHandle + href: ../../standard/asynchronous-programming-patterns/blocking-application-execution-using-an-asyncwaithandle.md + - name: Block execution by ending an async operation + href: ../../standard/asynchronous-programming-patterns/blocking-application-execution-by-ending-an-async-operation.md + - name: Poll for the status of an async operation + href: ../../standard/asynchronous-programming-patterns/polling-for-the-status-of-an-asynchronous-operation.md + - name: Use an AsyncCallback delegate to end an async operation + href: ../../standard/asynchronous-programming-patterns/using-an-asynccallback-delegate-to-end-an-asynchronous-operation.md + items: + - name: Use an AsyncCallback delegate and state object + href: ../../standard/asynchronous-programming-patterns/using-an-asynccallback-delegate-and-state-object.md + - name: Asynchronous programming using delegates + items: + - name: Overview + href: ../../standard/asynchronous-programming-patterns/asynchronous-programming-using-delegates.md + - name: Call synchronous methods asynchronously + href: ../../standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously.md +- name: Parallel programming + items: + - name: Overview + href: ../../standard/parallel-programming/index.md + - name: Task Parallel Library (TPL) + href: ../../standard/parallel-programming/task-parallel-library-tpl.md + items: + - name: Data parallelism + items: + - name: Overview + displayName: data parallelism + href: ../../standard/parallel-programming/data-parallelism-task-parallel-library.md + - name: Write a Parallel.For loop + href: ../../standard/parallel-programming/how-to-write-a-simple-parallel-for-loop.md + - name: Write a Parallel.ForEach loop + href: ../../standard/parallel-programming/how-to-write-a-simple-parallel-foreach-loop.md + - name: Write a Parallel.For loop with thread-local variables + href: ../../standard/parallel-programming/how-to-write-a-parallel-for-loop-with-thread-local-variables.md + - name: Write a Parallel.ForEach loop with partition-local variables + href: ../../standard/parallel-programming/how-to-write-a-parallel-foreach-loop-with-partition-local-variables.md + - name: Cancel a parallel loop + href: ../../standard/parallel-programming/how-to-cancel-a-parallel-for-or-foreach-loop.md + - name: Handle exceptions in parallel loops + href: ../../standard/parallel-programming/how-to-handle-exceptions-in-parallel-loops.md + - name: Speed up small loop bodies + href: ../../standard/parallel-programming/how-to-speed-up-small-loop-bodies.md + - name: Iterate file directories with the Parallel class + href: ../../standard/parallel-programming/how-to-iterate-file-directories-with-the-parallel-class.md + - name: Task-based asynchronous programming + href: ../../standard/parallel-programming/task-based-asynchronous-programming.md + items: + - name: Chain tasks by using continuation tasks + href: ../../standard/parallel-programming/chaining-tasks-by-using-continuation-tasks.md + - name: Attached and detached child tasks + href: ../../standard/parallel-programming/attached-and-detached-child-tasks.md + - name: Task cancellation + href: ../../standard/parallel-programming/task-cancellation.md + - name: Exception handling + href: ../../standard/parallel-programming/exception-handling-task-parallel-library.md + - name: Use Parallel.Invoke to execute parallel operations + href: ../../standard/parallel-programming/how-to-use-parallel-invoke-to-execute-parallel-operations.md + - name: Return a value from a task + href: ../../standard/parallel-programming/how-to-return-a-value-from-a-task.md + - name: Cancel a task and its children + href: ../../standard/parallel-programming/how-to-cancel-a-task-and-its-children.md + - name: Create pre-computed tasks + href: ../../standard/parallel-programming/how-to-create-pre-computed-tasks.md + - name: Traverse a binary tree with parallel tasks + href: ../../standard/parallel-programming/how-to-traverse-a-binary-tree-with-parallel-tasks.md + - name: Unwrap a nested task + href: ../../standard/parallel-programming/how-to-unwrap-a-nested-task.md + - name: Prevent a child task from attaching to its parent + href: ../../standard/parallel-programming/how-to-prevent-a-child-task-from-attaching-to-its-parent.md + - name: Dataflow + href: ../../standard/parallel-programming/dataflow-task-parallel-library.md + items: + - name: Write messages to and read messages from a dataflow block + href: ../../standard/parallel-programming/how-to-write-messages-to-and-read-messages-from-a-dataflow-block.md + - name: Implement a producer-consumer dataflow pattern + href: ../../standard/parallel-programming/how-to-implement-a-producer-consumer-dataflow-pattern.md + - name: Perform an action when a dataflow block receives data + href: ../../standard/parallel-programming/how-to-perform-action-when-a-dataflow-block-receives-data.md + - name: Create a dataflow pipeline + href: ../../standard/parallel-programming/walkthrough-creating-a-dataflow-pipeline.md + - name: Unlink dataflow blocks + href: ../../standard/parallel-programming/how-to-unlink-dataflow-blocks.md + - name: Use dataflow in a Windows Forms app + href: ../../standard/parallel-programming/walkthrough-using-dataflow-in-a-windows-forms-application.md + - name: Cancel a dataflow block + href: ../../standard/parallel-programming/how-to-cancel-a-dataflow-block.md + - name: Create a custom dataflow block type + href: ../../standard/parallel-programming/walkthrough-creating-a-custom-dataflow-block-type.md + - name: Use JoinBlock to read data from multiple sources + href: ../../standard/parallel-programming/how-to-use-joinblock-to-read-data-from-multiple-sources.md + - name: Specify the degree of parallelism in a dataflow block + href: ../../standard/parallel-programming/how-to-specify-the-degree-of-parallelism-in-a-dataflow-block.md + - name: Specify a task scheduler in a dataflow block + href: ../../standard/parallel-programming/how-to-specify-a-task-scheduler-in-a-dataflow-block.md + - name: Use BatchBlock and BatchedJoinBlock to improve efficiency + href: ../../standard/parallel-programming/walkthrough-using-batchblock-and-batchedjoinblock-to-improve-efficiency.md + - name: Use TPL with other asynchronous patterns + items: + - name: TPL and traditional .NET asynchronous programming + href: ../../standard/parallel-programming/tpl-and-traditional-async-programming.md + - name: Wrap EAP patterns in a task + href: ../../standard/parallel-programming/how-to-wrap-eap-patterns-in-a-task.md + - name: Potential pitfalls in data and task parallelism + href: ../../standard/parallel-programming/potential-pitfalls-in-data-and-task-parallelism.md + - name: Parallel LINQ (PLINQ) + items: + - name: Introduction + href: ../../standard/parallel-programming/introduction-to-plinq.md + - name: Optimize queries for speedup + href: ../../standard/parallel-programming/understanding-speedup-in-plinq.md + - name: Order preservation + href: ../../standard/parallel-programming/order-preservation-in-plinq.md + - name: Merge options + href: ../../standard/parallel-programming/merge-options-in-plinq.md + - name: Potential pitfalls + href: ../../standard/parallel-programming/potential-pitfalls-with-plinq.md + - name: Create and execute a query + href: ../../standard/parallel-programming/how-to-create-and-execute-a-simple-plinq-query.md + - name: Control ordering in a query + href: ../../standard/parallel-programming/how-to-control-ordering-in-a-plinq-query.md + - name: Combine parallel and sequential LINQ queries + href: ../../standard/parallel-programming/how-to-combine-parallel-and-sequential-linq-queries.md + - name: Handle exceptions in a query + href: ../../standard/parallel-programming/how-to-handle-exceptions-in-a-plinq-query.md + - name: Cancel a query + href: ../../standard/parallel-programming/how-to-cancel-a-plinq-query.md + - name: Write a custom aggregate function + href: ../../standard/parallel-programming/how-to-write-a-custom-plinq-aggregate-function.md + - name: Specify the execution mode + href: ../../standard/parallel-programming/how-to-specify-the-execution-mode-in-plinq.md + - name: Specify merge options + href: ../../standard/parallel-programming/how-to-specify-merge-options-in-plinq.md + - name: Iterate file directories + href: ../../standard/parallel-programming/how-to-iterate-file-directories-with-plinq.md + - name: Measure query performance + href: ../../standard/parallel-programming/how-to-measure-plinq-query-performance.md + - name: Data sample + href: ../../standard/parallel-programming/plinq-data-sample.md + - name: Data structures for parallel programming + href: ../../standard/parallel-programming/data-structures-for-parallel-programming.md + - name: Parallel diagnostic tools + href: ../../standard/parallel-programming/parallel-diagnostic-tools.md + - name: Custom partitioners for PLINQ and TPL + items: + - name: Overview + href: ../../standard/parallel-programming/custom-partitioners-for-plinq-and-tpl.md + displayName: custom partitioners + - name: Implement dynamic partitions + href: ../../standard/parallel-programming/how-to-implement-dynamic-partitions.md + - name: Implement a partitioner for static partitioning + href: ../../standard/parallel-programming/how-to-implement-a-partitioner-for-static-partitioning.md + - name: Lambda expressions in PLINQ and TPL + href: ../../standard/parallel-programming/lambda-expressions-in-plinq-and-tpl.md + - name: Further reading + href: ../../standard/parallel-programming/for-further-reading-parallel-programming.md +- name: Threading + items: + - name: Managed threading basics + items: + - name: Overview + displayName: threading + href: ../../standard/threading/managed-threading-basics.md + - name: Threads and threading + href: ../../standard/threading/threads-and-threading.md + - name: Exceptions in managed threads + href: ../../standard/threading/exceptions-in-managed-threads.md + - name: Synchronize data for multithreading + href: ../../standard/threading/synchronizing-data-for-multithreading.md + - name: Foreground and background threads + href: ../../standard/threading/foreground-and-background-threads.md + - name: Managed and unmanaged threading in windows + href: ../../standard/threading/managed-and-unmanaged-threading-in-windows.md + - name: "Thread local storage: Thread-relative static fields and data slots" + href: ../../standard/threading/thread-local-storage-thread-relative-static-fields-and-data-slots.md + - name: Using threads and threading + items: + - name: Overview + href: ../../standard/threading/using-threads-and-threading.md + - name: Create threads and pass data at start time + href: ../../standard/threading/creating-threads-and-passing-data-at-start-time.md + - name: Pause and interrupt threads + href: ../../standard/threading/pausing-and-resuming-threads.md + - name: Schedule threads + href: ../../standard/threading/scheduling-threads.md + - name: Cancel threads + items: + - name: Overview + href: ../../standard/threading/cancellation-in-managed-threads.md + - name: Cancel threads cooperatively + href: ../../standard/threading/canceling-threads-cooperatively.md + - name: How-tos + items: + - name: Listen for cancellation requests by polling + href: ../../standard/threading/how-to-listen-for-cancellation-requests-by-polling.md + - name: Register callbacks for cancellation requests + href: ../../standard/threading/how-to-register-callbacks-for-cancellation-requests.md + - name: Listen for cancellation requests that have wait handles + href: ../../standard/threading/how-to-listen-for-cancellation-requests-that-have-wait-handles.md + - name: Listen for multiple cancellation requests + href: ../../standard/threading/how-to-listen-for-multiple-cancellation-requests.md + - name: Destroy threads + href: ../../standard/threading/destroying-threads.md + - name: Best practices + href: ../../standard/threading/managed-threading-best-practices.md + - name: Threading objects and features + items: + - name: Overview + href: ../../standard/threading/threading-objects-and-features.md + - name: The managed thread pool + href: ../../standard/threading/the-managed-thread-pool.md + - name: Timers + href: ../../standard/threading/timers.md + - name: Overview of synchronization primitives + href: ../../standard/threading/overview-of-synchronization-primitives.md + - name: EventWaitHandle + href: ../../standard/threading/eventwaithandle.md + - name: CountdownEvent + href: ../../standard/threading/countdownevent.md + - name: Mutexes + href: ../../standard/threading/mutexes.md + - name: Semaphore and SemaphoreSlim + href: ../../standard/threading/semaphore-and-semaphoreslim.md + - name: Barrier + items: + - name: Overview + href: ../../standard/threading/barrier.md + - name: Synchronize concurrent operations with a Barrier + href: ../../standard/threading/how-to-synchronize-concurrent-operations-with-a-barrier.md + - name: SpinLock + items: + - name: Overview + displayName: spinlock + href: ../../standard/threading/spinlock.md + - name: Use SpinLock for low-level synchronization + href: ../../standard/threading/how-to-use-spinlock-for-low-level-synchronization.md + - name: Enable thread-tracking mode in SpinLock + href: ../../standard/threading/how-to-enable-thread-tracking-mode-in-spinlock.md + - name: SpinWait + items: + - name: Overview + href: ../../standard/threading/spinwait.md + - name: Use SpinWait to implement a two-phase wait operation + href: ../../standard/threading/how-to-use-spinwait-to-implement-a-two-phase-wait-operation.md + - name: Thread-safe collections + items: + - name: Overview + displayName: thread-safe collections + href: ../../standard/collections/thread-safe/index.md + items: + - name: BlockingCollection overview + href: ../../standard/collections/thread-safe/blockingcollection-overview.md + - name: When to use a thread-safe collection + href: ../../standard/collections/thread-safe/when-to-use-a-thread-safe-collection.md + - name: Add and take items from a BlockingCollection + href: ../../standard/collections/thread-safe/how-to-add-and-take-items.md + - name: Use ForEach to remove items in a BlockingCollection + href: ../../standard/collections/thread-safe/how-to-use-foreach-to-remove.md + - name: Add and remove items from a ConcurrentDictionary + href: ../../standard/collections/thread-safe/how-to-add-and-remove-items.md + - name: Add bounding and blocking functionality + href: ../../standard/collections/thread-safe/how-to-add-bounding-and-blocking.md + - name: Use arrays of blocking collections in a pipeline + href: ../../standard/collections/thread-safe/how-to-use-arrays-of-blockingcollections.md + - name: Create an object pool using a ConcurrentBag + href: ../../standard/collections/thread-safe/how-to-create-an-object-pool.md +- name: Native interoperability + items: + - name: Overview + href: ../../standard/native-interop/index.md + displayName: Native interop + - name: P/Invoke + items: + - name: Overview + href: ../../standard/native-interop/pinvoke.md + displayName: P/Invoke + - name: Cross-platform P/Invoke + href: ../../standard/native-interop/cross-platform.md + - name: Source generation + href: ../../standard/native-interop/pinvoke-source-generation.md + - name: Type marshalling + items: + - name: Overview + href: ../../standard/native-interop/type-marshalling.md + displayName: Type marshalling + - name: Charsets and marshalling + href: ../../standard/native-interop/charset.md + - name: Disabled marshalling + href: ../../standard/native-interop/disabled-marshalling.md + - name: Customize structure marshalling + href: ../../standard/native-interop/customize-struct-marshalling.md + - name: Customize parameter marshalling + href: ../../standard/native-interop/customize-parameter-marshalling.md + - name: Source generation + href: ../../standard/native-interop/custom-marshalling-source-generation.md + - name: "Tutorial: Use custom marshallers in source generation" + href: ../../standard/native-interop/tutorial-custom-marshaller.md + - name: Interop guidance + href: ../../standard/native-interop/best-practices.md + - name: Expose .NET components to COM + href: ../../core/native-interop/expose-components-to-com.md + - name: Host .NET from native code + href: ../../core/tutorials/netcore-hosting.md + - name: COM interop + items: + - name: Overview + href: ../../standard/native-interop/cominterop.md + displayName: COM interop + - name: COM wrappers + items: + - name: Overview + href: ../../standard/native-interop/com-wrappers.md + displayName: COM wrappers + - name: Runtime-callable wrapper + href: ../../standard/native-interop/runtime-callable-wrapper.md + - name: COM-callable wrapper + href: ../../standard/native-interop/com-callable-wrapper.md + - name: "Tutorial: Use the ComWrappers API" + href: ../../standard/native-interop/tutorial-comwrappers.md + - name: Qualify .NET types for COM interop + href: ../../standard/native-interop/qualify-net-types-for-interoperation.md + - name: Apply interop attributes + href: ../../standard/native-interop/apply-interop-attributes.md + - name: Exceptions + href: ../../standard/native-interop/exceptions-interoperability.md +- name: Memory management + items: + - name: What is "managed code"? + href: ../../standard/managed-code.md + - name: Automatic memory management + href: ../../standard/automatic-memory-management.md + - name: Clean up unmanaged resources + items: + - name: Overview + href: ../../standard/garbage-collection/unmanaged.md + displayName: unmanaged resources, memory management + - name: Implement a Dispose method + href: ../../standard/garbage-collection/implementing-dispose.md + displayName: "using, Dispose, dispose pattern, IDisposable" + - name: Implement a DisposeAsync method + href: ../../standard/garbage-collection/implementing-disposeasync.md + displayName: "await using, DisposeAsync, async dispose pattern, IAsyncDisposable" + - name: Use objects that implement IDisposable + href: ../../standard/garbage-collection/using-objects.md + - name: Garbage collection + items: + - name: Overview + href: ../../standard/garbage-collection/index.md + displayName: garbage collection + - name: Fundamentals + href: ../../standard/garbage-collection/fundamentals.md + - name: Workstation and server GC + href: ../../standard/garbage-collection/workstation-server-gc.md + - name: Background GC + href: ../../standard/garbage-collection/background-gc.md + - name: The large object heap + href: ../../standard/garbage-collection/large-object-heap.md + - name: Garbage collection and performance + href: ../../standard/garbage-collection/performance.md + - name: Induced collections + href: ../../standard/garbage-collection/induced.md + - name: Latency modes + href: ../../standard/garbage-collection/latency.md + - name: Optimization for shared web hosting + href: ../../standard/garbage-collection/optimization-for-shared-web-hosting.md + - name: Garbage collection notifications + href: ../../standard/garbage-collection/notifications.md + - name: Application domain resource monitoring + href: ../../standard/garbage-collection/app-domain-resource-monitoring.md + - name: Weak references + href: ../../standard/garbage-collection/weak-references.md + diff --git a/docs/navigate/breadcrumb.png b/docs/navigate/breadcrumb.png new file mode 100644 index 0000000000000..4fce48b0309e7 Binary files /dev/null and b/docs/navigate/breadcrumb.png differ diff --git a/docs/navigate/data-access/index.yml b/docs/navigate/data-access/index.yml new file mode 100644 index 0000000000000..cc55f40910b88 --- /dev/null +++ b/docs/navigate/data-access/index.yml @@ -0,0 +1,70 @@ +### YamlMime:Landing + +title: .NET data access documentation +summary: Learn about data access in .NET, including XML data, Entity Framework, LINQ, and SQLite. + +metadata: + title: .NET data access documentation + description: Learn about data access in .NET, including XML data, Entity Framework, LINQ, and SQLite. + ms.topic: landing-page + ms.date: 01/17/2023 + +landingContent: + + # Card + - title: LINQ + linkLists: + - linkListType: overview + links: + - text: LINQ overview + url: ../../standard/linq/index.md + - text: LINQ to XML + url: ../../standard/linq/index.md + + # Card + - title: Entity Framework + linkLists: + - linkListType: overview + links: + - text: Entity Framework Core + url: /ef/core/ + + # Card + - title: XML documents and data + linkLists: + - linkListType: overview + links: + - text: Overview + url: ../../standard/data/xml/index.md + - linkListType: concept + links: + - text: Document object model (DOM) + url: ../../standard/data/xml/xml-document-object-model-dom.md + - text: XPath + url: ../../standard/data/xml/process-xml-data-using-the-xpath-data-model.md + - text: XSLT transformations + url: ../../standard/data/xml/xslt-transformations.md + - text: XML schemas + url: ../../standard/data/xml/working-with-xml-schemas.md + + # Card + - title: Microsoft.Data.Sqlite + linkLists: + - linkListType: overview + links: + - text: Overview + url: ../../standard/data/sqlite/index.md + - linkListType: reference + links: + - text: API reference + url: ../../../api/index.md?view=msdata-sqlite-3.1.0&preserve-view=false + - text: SQL syntax + url: https://www.sqlite.org/lang.html + + # Card + - title: Azure Storage + linkLists: + - linkListType: overview + links: + - text: Azure Storage client libraries for .NET + url: /dotnet/api/overview/azure/storage/ diff --git a/docs/navigate/data-access/toc.yml b/docs/navigate/data-access/toc.yml new file mode 100644 index 0000000000000..85ab5afd02563 --- /dev/null +++ b/docs/navigate/data-access/toc.yml @@ -0,0 +1,671 @@ +items: + - name: Data access in .NET + href: index.yml + - name: LINQ + items: + - name: LINQ overview + href: ../../standard/linq/index.md + - name: LINQ to XML + items: + - name: Get started + items: + - name: LINQ to XML overview + href: ../../standard/linq/linq-xml-overview.md + - name: LINQ to XML vs. DOM + href: ../../standard/linq/linq-xml-vs-dom.md + - name: LINQ to XML vs. other XML technologies + href: ../../standard/linq/linq-xml-vs-xml-technologies.md + - name: Programming guide + items: + - name: LINQ to XML programming overview + items: + - name: Functional vs. procedural programming + href: ../../standard/linq/functional-vs-procedural-programming.md + - name: LINQ to XML classes overview + href: ../../standard/linq/linq-xml-classes-overview.md + - name: XElement class overview + href: ../../standard/linq/xelement-class-overview.md + - name: XAttribute class overview + href: ../../standard/linq/xattribute-class-overview.md + - name: XDocument class overview + href: ../../standard/linq/xdocument-class-overview.md + - name: How to build LINQ to XML examples + href: ../../standard/linq/build-linq-xml-examples.md + - name: XML trees + items: + - name: Functional construction + href: ../../standard/linq/functional-construction.md + - name: Create XML trees in C# + href: ../../standard/linq/create-xml-trees.md + - name: XML literals in Visual Basic + href: ../../standard/linq/xml-literals.md + - name: Parse XML + items: + - name: Parse a string + href: ../../standard/linq/parse-string.md + - name: Load XML from a file + href: ../../standard/linq/load-xml-file.md + - name: Preserve white space while loading or parsing XML + href: ../../standard/linq/preserve-white-space-loading-parsing-xml.md + - name: How to catch parsing errors + href: ../../standard/linq/catch-parsing-errors.md + - name: Create a tree from an XmlReader + href: ../../standard/linq/create-tree-xmlreader.md + - name: Stream XML fragments from an XmlReader + href: ../../standard/linq/stream-xml-fragments-xmlreader.md + - name: Populate an XML tree with an XmlWriter + href: ../../standard/linq/populate-xml-tree-xmlwriter.md + - name: How to validate using XSD + href: ../../standard/linq/validate-xsd.md + - name: Valid content of XElement and XDocument objects + href: ../../standard/linq/valid-content-xelement-xdocument-objects.md + - name: Work with XML namespaces + items: + - name: Namespaces overview + href: ../../standard/linq/namespaces-overview.md + - name: Create a document with namespaces in C# + href: ../../standard/linq/create-document-namespaces-csharp.md + - name: Create a document with namespaces in Visual Basic + href: ../../standard/linq/create-document-namespaces-visual-basic.md + - name: How to control namespace prefixes + href: ../../standard/linq/control-namespace-prefixes.md + - name: Scope of default namespaces + href: ../../standard/linq/scope-default-namespaces.md + - name: Work with global namespaces in Visual Basic + href: ../../standard/linq/work-global-namespaces.md + - name: Write queries on XML in namespaces + href: ../../standard/linq/write-queries-xml-namespaces.md + - name: Serialize XML trees + items: + - name: Preserve white space while serializing + href: ../../standard/linq/preserve-white-space-serializing.md + - name: Serialize with an XML declaration + href: ../../standard/linq/serialize-xml-declaration.md + - name: Serialize to files, TextWriters, and XmlWriters + href: ../../standard/linq/serialize-files-textwriters-xmlwriters.md + - name: Serialize to an XmlReader (invoke XSLT) + href: ../../standard/linq/serialize-xmlreader-invoke-xslt.md + - name: LINQ to XML axes + items: + - name: LINQ to XML axes overview + href: ../../standard/linq/linq-xml-axes-overview.md + - name: Retrieve a collection of elements + href: ../../standard/linq/retrieve-collection-elements.md + - name: Retrieve the value of an element + href: ../../standard/linq/retrieve-value-element.md + - name: Filter on element names + href: ../../standard/linq/filter-element-names.md + - name: Chain axis method calls + href: ../../standard/linq/chain-axis-method-calls.md + - name: Retrieve a single child element + href: ../../standard/linq/retrieve-single-child-element.md + - name: Retrieve a collection of attributes + href: ../../standard/linq/retrieve-collection-attributes.md + - name: Retrieve a single attribute + href: ../../standard/linq/retrieve-single-attribute.md + - name: Retrieve the value of an attribute + href: ../../standard/linq/retrieve-value-attribute.md + - name: Retrieve the shallow value of an element + href: ../../standard/linq/retrieve-shallow-value-element.md + - name: Language-integrated axes in Visual Basic + href: ../../standard/linq/language-integrated-axes.md + - name: Query XML trees + items: + - name: Query XML trees overview + href: ../../standard/linq/query-xml-trees-overview.md + - name: Basic queries + items: + - name: Index to examples + displayName: queries + href: ../../standard/linq/basic-queries-linq-to-xml.md + - name: Find an element with a specific attribute + href: ../../standard/linq/find-element-specific-attribute.md + - name: Find an element with a specific child element + href: ../../standard/linq/find-element-specific-child-element.md + - name: Query an XDocument vs. query an XElement + href: ../../standard/linq/query-xdocument-vs-query-xelement.md + - name: Find descendants with a specific element name + href: ../../standard/linq/find-descendants-specific-element-name.md + - name: Find a single descendant using the Descendants method + href: ../../standard/linq/find-single-descendant-descendants-method.md + - name: Write queries with complex filtering + href: ../../standard/linq/write-queries-complex-filtering.md + - name: Filter on an optional element + href: ../../standard/linq/filter-optional-element.md + - name: Find all nodes in a namespace + href: ../../standard/linq/find-all-nodes-namespace.md + - name: Sort elements + href: ../../standard/linq/sort-elements.md + - name: Sort elements on multiple Keys + href: ../../standard/linq/sort-elements-multiple-keys.md + - name: Calculate intermediate values + href: ../../standard/linq/calculate-intermediate-values.md + - name: Find elements based on context + href: ../../standard/linq/write-query-finds-elements-based-context.md + - name: Debug empty query results sets + href: ../../standard/linq/debug-empty-query-results-sets.md + - name: Projections and transformations + items: + - name: Work with dictionaries using LINQ to XML + href: ../../standard/linq/work-dictionaries-linq-xml.md + - name: Transform the shape of an XML tree + href: ../../standard/linq/transform-shape-xml-tree.md + - name: Control the type of a projection + href: ../../standard/linq/control-type-projection.md + - name: Project a new type + href: ../../standard/linq/project-new-type.md + - name: Project an object graph + href: ../../standard/linq/project-object-graph.md + - name: Project an anonymous type + href: ../../standard/linq/project-anonymous-type.md + - name: Generate text files from XML + href: ../../standard/linq/generate-text-files-xml.md + - name: Generate XML from CSV files + href: ../../standard/linq/generate-xml-csv-files.md + - name: Advanced query techniques + items: + - name: Join two collections + href: ../../standard/linq/join-two-collections.md + - name: Create hierarchy using grouping + href: ../../standard/linq/create-hierarchy-grouping.md + - name: Query LINQ to XML using XPath + href: ../../standard/linq/query-linq-xml-xpath.md + - name: Write a LINQ to XML axis method + href: ../../standard/linq/write-linq-xml-axis-method.md + - name: Perform streaming transformations of text to XML in C# + href: ../../standard/linq/perform-streaming-transformations-text-xml.md + - name: List all nodes in a tree + href: ../../standard/linq/list-all-nodes-tree.md + - name: Retrieve paragraphs from an Office Open XML document + href: ../../standard/linq/retrieve-paragraphs-office-open-xml-document.md + - name: Modify an Office Open XML document + href: ../../standard/linq/modify-office-open-xml-document.md + - name: Populate an XML tree from the file system + href: ../../standard/linq/populate-xml-tree-file-system.md + - name: LINQ to XML for XPath users + items: + - name: Comparison of XPath and LINQ to XML + href: ../../standard/linq/comparison-xpath-linq-xml.md + - name: Find a child element + href: ../../standard/linq/find-child-element.md + - name: Find a list of child elements + href: ../../standard/linq/find-list-child-elements.md + - name: Find the root element + href: ../../standard/linq/find-root-element.md + - name: Find descendant elements + href: ../../standard/linq/find-descendant-elements.md + - name: Filter on an attribute + href: ../../standard/linq/filter-attribute.md + - name: Find related elements + href: ../../standard/linq/find-related-elements.md + - name: Find elements in a namespace + href: ../../standard/linq/find-elements-namespace.md + - name: Find preceding siblings + href: ../../standard/linq/find-preceding-siblings.md + - name: Find descendants of a child element + href: ../../standard/linq/find-descendants-child-element.md + - name: Find a union of two location paths + href: ../../standard/linq/find-union-two-location-paths.md + - name: Find sibling nodes + href: ../../standard/linq/find-sibling-nodes.md + - name: Find an attribute of the parent + href: ../../standard/linq/find-attribute-parent.md + - name: Find attributes of siblings with a specific name + href: ../../standard/linq/find-attributes-siblings-specific-name.md + - name: Find elements with a specific attribute + href: ../../standard/linq/find-elements-specific-attribute.md + - name: Find child elements based on position + href: ../../standard/linq/find-child-elements-based-position.md + - name: Find the immediate preceding sibling + href: ../../standard/linq/find-immediate-preceding-sibling.md + - name: Pure functional transformations of XML + items: + - name: Introduction + href: ../../standard/linq/introduction-pure-functional-transformations.md + - name: Concepts and terminology + href: ../../standard/linq/concepts-terminology-functional-transformation.md + - name: Functional vs. imperative programming + href: ../../standard/linq/functional-vs-imperative-programming.md + - name: Refactor into pure functions + href: ../../standard/linq/refactor-pure-functions.md + - name: Applicability of functional transformation + href: ../../standard/linq/applicability-functional-transformation.md + - name: Functional transformation of XML + href: ../../standard/linq/functional-transformation-xml.md + - name: Deferred execution and lazy evaluation + href: ../../standard/linq/deferred-execution-lazy-evaluation.md + - name: Deferred execution example + href: ../../standard/linq/deferred-execution-example.md + - name: "Tutorial: Chain queries together (C#)" + items: + - name: Chain queries example + href: ../../standard/linq/chain-queries-example.md + - name: Intermediate materialization + href: ../../standard/linq/intermediate-materialization.md + - name: Chain standard query operators + href: ../../standard/linq/chain-standard-query-operators-together.md + - name: "Tutorial: Manipulate content in a WordprocessingML document" + items: + - name: The XML shape of WordprocessingML documents + href: ../../standard/linq/xml-shape-wordprocessingml-documents.md + - name: Create the source Office Open XML document + href: ../../standard/linq/create-source-office-open-xml-document.md + - name: Find the default paragraph style + href: ../../standard/linq/find-default-paragraph-style.md + - name: Retrieve the paragraphs and their styles + href: ../../standard/linq/retrieve-paragraphs-styles.md + - name: Retrieve the text of the paragraphs + href: ../../standard/linq/retrieve-text-paragraphs.md + - name: Refactor using an extension method + href: ../../standard/linq/refactor-extension-method.md + - name: Refactor using a pure function + href: ../../standard/linq/refactor-pure-function.md + - name: Project XML in a different shape + href: ../../standard/linq/project-xml-different-shape.md + - name: Find text in Word documents + href: ../../standard/linq/find-text-word-documents.md + - name: Details of Office Open XML WordprocessingML documents + items: + - name: WordprocessingML document with styles + href: ../../standard/linq/wordprocessingml-document-styles.md + - name: Style part of a WordprocessingML document + href: ../../standard/linq/style-part-wordprocessingml-document.md + - name: Example that outputs document parts + href: ../../standard/linq/example-outputs-office-open-xml-document-parts.md + - name: Modify XML trees + items: + - name: In-memory XML tree modification vs. functional construction + href: ../../standard/linq/in-memory-xml-tree-modification-vs-functional-construction.md + - name: Add elements, attributes, and nodes + href: ../../standard/linq/add-elements-attributes-nodes-xml-tree.md + - name: Modify elements, attributes, and nodes + href: ../../standard/linq/modify-elements-attributes-nodes-xml-tree.md + - name: Remove elements, attributes, and nodes + href: ../../standard/linq/remove-elements-attributes-nodes-xml-tree.md + - name: Maintain name-value pairs + href: ../../standard/linq/maintain-name-value-pairs.md + - name: Change the namespace for an entire XML tree + href: ../../standard/linq/change-namespace-entire-xml-tree.md + - name: Performance + items: + - name: Performance of chained queries + href: ../../standard/linq/performance-chained-queries.md + - name: Atomized XName and XNamespace objects + href: ../../standard/linq/atomized-xname-xnamespace-objects.md + - name: Pre-atomization of XName objects + href: ../../standard/linq/pre-atomization-xname-objects.md + - name: Statically compiled queries + href: ../../standard/linq/statically-compiled-queries.md + - name: Advanced LINQ to XML programming + items: + - name: LINQ to XML annotations + href: ../../standard/linq/linq-xml-annotations.md + - name: LINQ to XML events + href: ../../standard/linq/linq-xml-events.md + - name: Program with nodes + href: ../../standard/linq/program-nodes.md + - name: Mixed declarative/imperative code bugs + href: ../../standard/linq/mixed-declarative-imperative-code-bugs.md + - name: Stream XML fragments with access to header information + href: ../../standard/linq/stream-xml-fragments-access-header-information.md + - name: Perform streaming transform of large XML documents + href: ../../standard/linq/perform-streaming-transform-large-xml-documents.md + - name: Read and write an encoded document + href: ../../standard/linq/read-write-encoded-document.md + - name: Use XSLT to transform an XML tree + href: ../../standard/linq/use-xslt-transform-xml-tree.md + - name: Use annotations to transform LINQ to XML trees in an XSLT style + href: ../../standard/linq/use-annotations-transform-linq-xml-trees-xslt-style.md + - name: Serialize object graphs that contain XElement objects + items: + - name: Serialize using XmlSerializer + href: ../../standard/linq/serialize-xmlserializer.md + - name: Serialize using DataContractSerializer + href: ../../standard/linq/serialize-datacontractserializer.md + - name: LINQ to XML security + href: ../../standard/linq/linq-xml-security.md + - name: Sample XML documents + items: + - name: "Sample XML file: Typical purchase order" + href: ../../standard/linq/sample-xml-file-typical-purchase-order.md + - name: "Sample XML file: Typical purchase order in a namespace" + href: ../../standard/linq/sample-xml-file-typical-purchase-order-namespace.md + - name: "Sample XML file: Multiple purchase orders" + href: ../../standard/linq/sample-xml-file-multiple-purchase-orders.md + - name: "Sample XML file: Multiple purchase orders in a namespace" + href: ../../standard/linq/sample-xml-file-multiple-purchase-orders-namespace.md + - name: "Sample XML file: Test configuration" + href: ../../standard/linq/sample-xml-file-test-configuration.md + - name: "Sample XML file: Test configuration in a namespace" + href: ../../standard/linq/sample-xml-file-test-configuration-namespace.md + - name: "Sample XML file: Customers and orders" + href: ../../standard/linq/sample-xml-file-customers-orders.md + - name: "Sample XSD file: Customers and orders" + href: ../../standard/linq/sample-xsd-file-customers-orders.md + - name: "Sample XML file: Customers and orders in a namespace" + href: ../../standard/linq/sample-xml-file-customers-orders-namespace.md + - name: "Sample XML file: Numerical data" + href: ../../standard/linq/sample-xml-file-numerical-data.md + - name: "Sample XML file: Numerical data in a namespace" + href: ../../standard/linq/sample-xml-file-numerical-data-namespace.md + - name: "Sample XML file: Books" + href: ../../standard/linq/sample-xml-file-books.md + - name: "Sample XML file: Consolidated purchase orders" + href: ../../standard/linq/sample-xml-file-consolidated-purchase-orders.md + - name: Reference + href: ../../standard/linq/reference.md + - name: XML documents and data + href: ../../standard/data/xml/index.md + items: + - name: XML processing options + href: ../../standard/data/xml/xml-processing-options.md + - name: Process XML data in-memory + href: ../../standard/data/xml/processing-xml-data-in-memory.md + items: + - name: Process XML data using the DOM model + href: ../../standard/data/xml/process-xml-data-using-the-dom-model.md + items: + - name: XML document object model (DOM) + href: ../../standard/data/xml/xml-document-object-model-dom.md + - name: Types of XML nodes + href: ../../standard/data/xml/types-of-xml-nodes.md + - name: XML DOM hierarchy + href: ../../standard/data/xml/xml-document-object-model-dom-hierarchy.md + - name: Map the object hierarchy to XML data + href: ../../standard/data/xml/mapping-the-object-hierarchy-to-xml-data.md + - name: Create XML docs + href: ../../standard/data/xml/xml-document-creation.md + - name: Read XML docs into the DOM + items: + - name: Overview + href: ../../standard/data/xml/reading-an-xml-document-into-the-dom.md + - name: Style sheet directives embedded in a document + href: ../../standard/data/xml/style-sheet-directives-embedded-in-a-document.md + - name: Load data from a reader + href: ../../standard/data/xml/load-data-from-a-reader.md + - name: Handle white space + href: ../../standard/data/xml/white-space-and-significant-white-space-handling-when-loading-the-dom.md + - name: Access attributes in the DOM + href: ../../standard/data/xml/accessing-attributes-in-the-dom.md + - name: Read entities into the DOM + href: ../../standard/data/xml/reading-entity-declarations-and-entity-references-into-the-dom.md + - name: Preserve entity references + href: ../../standard/data/xml/entity-references-are-preserved.md + - name: Expand entity references + href: ../../standard/data/xml/entity-references-are-expanded-and-not-preserved.md + - name: Insert nodes + items: + - name: Overview + href: ../../standard/data/xml/inserting-nodes-into-an-xml-document.md + - name: Create new nodes + href: ../../standard/data/xml/create-new-nodes-in-the-dom.md + items: + - name: Create new attributes for elements + href: ../../standard/data/xml/creating-new-attributes-for-elements-in-the-dom.md + - name: Verify XML element and attribute names + href: ../../standard/data/xml/xml-element-and-attribute-name-verification-when-creating-new-nodes.md + - name: Create new entity references + href: ../../standard/data/xml/creating-new-entity-references.md + - name: Entity reference expansion for new nodes + href: ../../standard/data/xml/namespace-affect-on-entity-ref-expansion-for-new-nodes.md + - name: Copy existing nodes + href: ../../standard/data/xml/copy-existing-nodes.md + - name: Copy existing nodes to another document + href: ../../standard/data/xml/copying-existing-nodes-from-one-document-to-another.md + - name: Copy document fragments + href: ../../standard/data/xml/copying-document-fragments.md + - name: Remove nodes, content, and values + items: + - name: Overview + href: ../../standard/data/xml/removing-nodes-content-and-values-from-an-xml-document.md + - name: Remove nodes from the DOM + href: ../../standard/data/xml/removing-nodes-from-the-dom.md + - name: Remove attributes from an element node + href: ../../standard/data/xml/removing-attributes-from-an-element-node-in-the-dom.md + - name: Remove node content in the DOM + href: ../../standard/data/xml/removing-node-content-in-the-dom.md + - name: Modify nodes, content, and values + href: ../../standard/data/xml/modifying-nodes-content-and-values-in-an-xml-document.md + - name: Validate an XML document + href: ../../standard/data/xml/validating-an-xml-document-in-the-dom.md + - name: Save and write a document + href: ../../standard/data/xml/saving-and-writing-a-document.md + - name: Select nodes using XPath navigation + href: ../../standard/data/xml/select-nodes-using-xpath-navigation.md + - name: Resolve external resources + href: ../../standard/data/xml/resolving-external-resources.md + - name: Compare objects using XmlNameTable + href: ../../standard/data/xml/object-comparison-using-xmlnametable.md + - name: Node collections in NamedNodeMaps and NodeLists + href: ../../standard/data/xml/node-collections-in-namednodemaps-and-nodelists.md + items: + - name: Unordered node retrieval by name or index + href: ../../standard/data/xml/unordered-node-retrieval-by-name-or-index.md + - name: Ordered node retrieval by index + href: ../../standard/data/xml/ordered-node-retrieval-by-index.md + - name: Dynamic updates to NodeLists and NamedNodeMaps + href: ../../standard/data/xml/dynamic-updates-to-nodelists-and-namednodemaps.md + - name: Namespace support in the DOM + href: ../../standard/data/xml/namespace-support-in-the-dom.md + items: + - name: Namespaces and DTDs + href: ../../standard/data/xml/namespaces-and-dtds-in-the-dom.md + - name: Change namespace declarations + href: ../../standard/data/xml/changing-namespace-declarations-in-an-xml-document.md + - name: Change namespace prefix properties + href: ../../standard/data/xml/changing-namespace-prefix-properties.md + - name: Handle events using XmlNodeChangedEventArgs + href: ../../standard/data/xml/event-handling-in-an-xml-document-using-the-xmlnodechangedeventargs.md + - name: Extend the DOM + href: ../../standard/data/xml/extending-the-dom.md + - name: Process XML data using the XPath data model + href: ../../standard/data/xml/process-xml-data-using-the-xpath-data-model.md + items: + - name: Read XML data using XPathDocument and XmlDocument + href: ../../standard/data/xml/reading-xml-data-using-xpathdocument-and-xmldocument.md + - name: Select, Evaluate, and Match XML data using XPathNavigator + href: ../../standard/data/xml/selecting-evaluating-and-matching-xml-data-using-xpathnavigator.md + items: + - name: Select XML data using XPathNavigator + href: ../../standard/data/xml/select-xml-data-using-xpathnavigator.md + - name: Evaluate XPath expressions using XPathNavigator + href: ../../standard/data/xml/evaluate-xpath-expressions-using-xpathnavigator.md + - name: Match nodes using XPathNavigator + href: ../../standard/data/xml/matching-nodes-using-xpathnavigator.md + - name: Node types recognized with XPath queries + href: ../../standard/data/xml/node-types-recognized-with-xpath-queries.md + - name: XPath queries and namespaces + href: ../../standard/data/xml/xpath-queries-and-namespaces.md + - name: Compiled XPath expressions + href: ../../standard/data/xml/compiled-xpath-expressions.md + - name: XPath namespace navigation + href: ../../standard/data/xml/xpath-namespace-navigation.md + - name: Access XML data using XPathNavigator + href: ../../standard/data/xml/accessing-xml-data-using-xpathnavigator.md + items: + - name: Node set navigation using XPathNavigator + href: ../../standard/data/xml/node-set-navigation-using-xpathnavigator.md + - name: Attribute and namespace node navigation Using XPathNavigator + href: ../../standard/data/xml/attribute-and-namespace-node-navigation-using-xpathnavigator.md + - name: Extract XML data Using XPathNavigator + href: ../../standard/data/xml/extract-xml-data-using-xpathnavigator.md + - name: Access strongly typed XML data Using XPathNavigator + href: ../../standard/data/xml/accessing-strongly-typed-xml-data-using-xpathnavigator.md + - name: User-defined functions and variables + href: ../../standard/data/xml/user-defined-functions-and-variables.md + - name: Edit XML Data using XPathNavigator + href: ../../standard/data/xml/editing-xml-data-using-xpathnavigator.md + items: + - name: Insert XML Data using XPathNavigator + href: ../../standard/data/xml/insert-xml-data-using-xpathnavigator.md + - name: Modify XML Data using XPathNavigator + href: ../../standard/data/xml/modify-xml-data-using-xpathnavigator.md + - name: Remove XML Data using XPathNavigator + href: ../../standard/data/xml/remove-xml-data-using-xpathnavigator.md + - name: Schema Validation using XPathNavigator + href: ../../standard/data/xml/schema-validation-using-xpathnavigator.md + - name: Process XML Data Using LINQ to XML + href: ../../standard/data/xml/process-xml-data-using-linq-to-xml.md + - name: XML serialization + href: ../../standard/serialization/xml-and-soap-serialization.md?toc=/dotnet/navigate/data-access/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: XSLT Transformations + href: ../../standard/data/xml/xslt-transformations.md + items: + - name: Use the XslCompiledTransform Class + href: ../../standard/data/xml/using-the-xslcompiledtransform-class.md + items: + - name: Inputs to the XslCompiledTransform Class + href: ../../standard/data/xml/inputs-to-the-xslcompiledtransform-class.md + - name: Output Options on the XslCompiledTransform Class + href: ../../standard/data/xml/output-options-on-the-xslcompiledtransform-class.md + - name: Resolve External Resources During XSLT Processing + href: ../../standard/data/xml/resolving-external-resources-during-xslt-processing.md + - name: Extend XSLT Style Sheets + href: ../../standard/data/xml/extending-xslt-style-sheets.md + items: + - name: XSLT Extension Objects + href: ../../standard/data/xml/xslt-extension-objects.md + - name: XSLT Parameters + href: ../../standard/data/xml/xslt-parameters.md + - name: Script Blocks Using msxsl:script + href: ../../standard/data/xml/script-blocks-using-msxsl-script.md + - name: Recoverable XSLT Errors + href: ../../standard/data/xml/recoverable-xslt-errors.md + - name: "How to: Transform a Node Fragment" + href: ../../standard/data/xml/how-to-transform-a-node-fragment.md + - name: Migrate From the XslTransform Class + href: ../../standard/data/xml/migrating-from-the-xsltransform-class.md + items: + - name: "How to: Migrate Your XslTransform Code" + href: ../../standard/data/xml/how-to-migrate-your-xsltransform-code.md + - name: XSLT Security Considerations + href: ../../standard/data/xml/xslt-security-considerations.md + - name: XSLT Compiler (xsltc.exe) + href: ../../standard/data/xml/xslt-compiler-xsltc-exe.md + items: + - name: Perform an XSLT Transformation by Using an Assembly + href: ../../standard/data/xml/how-to-perform-an-xslt-transformation-by-using-an-assembly.md + - name: Work with XML Schemas + href: ../../standard/data/xml/working-with-xml-schemas.md + items: + - name: XML Schema Object Model (SOM) + href: ../../standard/data/xml/xml-schema-object-model-som.md + items: + - name: XML Schema Object Model Overview + href: ../../standard/data/xml/xml-schema-object-model-overview.md + - name: Read and Write XML Schemas + href: ../../standard/data/xml/reading-and-writing-xml-schemas.md + - name: Build XML Schemas + href: ../../standard/data/xml/building-xml-schemas.md + - name: Traverse XML Schemas + href: ../../standard/data/xml/traversing-xml-schemas.md + - name: Edit XML Schemas + href: ../../standard/data/xml/editing-xml-schemas.md + - name: Include or Import XML Schemas + href: ../../standard/data/xml/including-or-importing-xml-schemas.md + - name: XmlSchemaSet for Schema Compilation + href: ../../standard/data/xml/xmlschemaset-for-schema-compilation.md + items: + - name: Post-Schema Compilation Infoset + href: ../../standard/data/xml/post-schema-compilation-infoset.md + - name: XML Schema (XSD) Validation with XmlSchemaSet + href: ../../standard/data/xml/xml-schema-xsd-validation-with-xmlschemaset.md + - name: XmlSchemaCollection Schema Compilation + href: ../../standard/data/xml/xmlschemacollection-schema-compilation.md + items: + - name: XDR Validation with XmlSchemaCollection + href: ../../standard/data/xml/xdr-validation-with-xmlschemacollection.md + - name: XML Schema (XSD) Validation with XmlSchemaCollection + href: ../../standard/data/xml/xml-schema-xsd-validation-with-xmlschemacollection.md + - name: XmlSchemaValidator Push-Based Validation + href: ../../standard/data/xml/xmlschemavalidator-push-based-validation.md + - name: Infer an XML Schema + href: ../../standard/data/xml/inferring-an-xml-schema.md + items: + - name: Infer Schemas from XML Documents + href: ../../standard/data/xml/inferring-schemas-from-xml-documents.md + - name: Rules for Inferring Schema Node Types and Structure + href: ../../standard/data/xml/rules-for-inferring-schema-node-types-and-structure.md + - name: Rules for Inferring Simple Types + href: ../../standard/data/xml/rules-for-inferring-simple-types.md + - name: XML Integration with Relational Data and ADO.NET + href: ../../standard/data/xml/xml-integration-with-relational-data-and-adonet.md + - name: Manage Namespaces in an XML Document + href: ../../standard/data/xml/managing-namespaces-in-an-xml-document.md + - name: Type Support in the System.Xml Classes + href: ../../standard/data/xml/type-support-in-the-system-xml-classes.md + items: + - name: Map XML Data Types to CLR Types + href: ../../standard/data/xml/mapping-xml-data-types-to-clr-types.md + - name: XML Type Support Implementation Notes + href: ../../standard/data/xml/xml-type-support-implementation-notes.md + - name: Convert XML Data Types + href: ../../standard/data/xml/conversion-of-xml-data-types.md + items: + - name: Convert Strings to .NET Framework Data Types + href: ../../standard/data/xml/converting-strings-to-dotnet-data-types.md + - name: Convert .NET Framework Types to Strings + href: ../../standard/data/xml/converting-dotnet-types-to-strings.md + - name: Microsoft.Data.Sqlite + items: + - name: Overview + href: ../../standard/data/sqlite/index.md + - name: Connection strings + href: ../../standard/data/sqlite/connection-strings.md + - name: Data types + href: ../../standard/data/sqlite/types.md + - name: Parameters + href: ../../standard/data/sqlite/parameters.md + - name: Database errors + displayName: Busy, locked, retries, timeouts + href: ../../standard/data/sqlite/database-errors.md + - name: Transactions + href: ../../standard/data/sqlite/transactions.md + - name: Batching + href: ../../standard/data/sqlite/batching.md + - name: Metadata + href: ../../standard/data/sqlite/metadata.md + - name: SQLite features + items: + - name: In-memory databases + href: ../../standard/data/sqlite/in-memory-databases.md + - name: Encryption + href: ../../standard/data/sqlite/encryption.md + - name: Online backup + href: ../../standard/data/sqlite/backup.md + - name: User-defined functions + displayName: UDFs + href: ../../standard/data/sqlite/user-defined-functions.md + - name: Custom SQLite versions + href: ../../standard/data/sqlite/custom-versions.md + - name: Collation + href: ../../standard/data/sqlite/collation.md + - name: Blob I/O + displayName: Streams + href: ../../standard/data/sqlite/blob-io.md + - name: Interoperability + href: ../../standard/data/sqlite/interop.md + - name: Extensions + href: ../../standard/data/sqlite/extensions.md + - name: Limitations + items: + - name: ADO.NET + href: ../../standard/data/sqlite/adonet-limitations.md + - name: Async + href: ../../standard/data/sqlite/async.md + - name: Bulk insert + href: ../../standard/data/sqlite/bulk-insert.md + - name: Entity Framework Core + href: /ef/core/providers/sqlite/limitations/?toc=/dotnet/navigate/data-access/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: Dapper + href: ../../standard/data/sqlite/dapper-limitations.md + - name: System.Data.SQLite + href: ../../standard/data/sqlite/compare.md + - name: Xamarin + href: ../../standard/data/sqlite/xamarin.md + - name: Entity Framework + href: /ef/core/?toc=/dotnet/navigate/data-access/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: Azure Storage + href: /dotnet/api/overview/azure/storage/?toc=/dotnet/navigate/data-access/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: Azure Cosmos DB .NET SDK + href: /azure/cosmos-db/nosql/sdk-dotnet-v3/?toc=/dotnet/navigate/data-access/toc.json&bc=/dotnet/breadcrumb/toc.json diff --git a/docs/navigate/devops-testing/index.yml b/docs/navigate/devops-testing/index.yml new file mode 100644 index 0000000000000..8df7eb79d29fd --- /dev/null +++ b/docs/navigate/devops-testing/index.yml @@ -0,0 +1,64 @@ +### YamlMime:Landing + +title: .NET DevOps, testing, and deployment documentation +summary: Learn about DevOps, GitHub Actions, testing, and deployment in .NET. + +metadata: + title: .NET DevOps, testing, and deployment documentation + description: Learn about DevOps, GitHub Actions, testing, and deployment in .NET. + ms.topic: landing-page + ms.date: 01/17/2023 + +landingContent: + + # Card + - title: GitHub Actions + linkLists: + - linkListType: overview + links: + - text: Overview + url: ../../devops/github-actions-overview.md + - linkListType: quickstart + links: + - text: Create a build GitHub workflow + url: ../../devops/dotnet-build-github-action.md + + # Card + - title: Unit test with .NET + linkLists: + - linkListType: overview + links: + - text: Unit testing in .NET + url: ../../core/testing/index.md + - linkListType: tutorial + links: + - text: Test C# code using dotnet test and xUnit + url: ../../core/testing/unit-testing-with-dotnet-test.md + - text: Unit test with NUnit + url: ../../core/testing/unit-testing-with-nunit.md + - text: Unit test with MSTest + url: ../../core/testing/unit-testing-with-mstest.md + - linkListType: concept + links: + - text: Best practices + url: ../../core/testing/unit-testing-best-practices.md + + # Card + - title: Deploy .NET apps + linkLists: + - linkListType: overview + links: + - text: Publish overview + url: ../../core/deploying/index.md + - text: ReadyToRun + url: ../../core/deploying/ready-to-run.md + - text: Trimming + url: ../../core/deploying/trimming/trim-self-contained.md + - text: Native AOT deployment + url: ../../core/deploying/native-aot/index.md + - text: Docker and .NET + url: ../../core/docker/introduction.md + - linkListType: reference + links: + - text: RID catalog + url: ../../core/rid-catalog.md diff --git a/docs/navigate/devops-testing/toc.yml b/docs/navigate/devops-testing/toc.yml new file mode 100644 index 0000000000000..357ab133d8a48 --- /dev/null +++ b/docs/navigate/devops-testing/toc.yml @@ -0,0 +1,365 @@ +items: + - name: DevOps, testing, and deployment + href: index.yml + - name: DevOps + items: + - name: GitHub Actions and .NET + href: ../../devops/github-actions-overview.md + displayName: "continuous integration,continuous deployment,continuous delivery,ci,cd,ci/cd,github,github action,github actions,lifecycle" + - name: .NET CLI and continuous integration + href: ../../devops/dotnet-cli-and-continuous-integration.md + - name: Official .NET GitHub Actions + href: ../../devops/dotnet-github-action-reference.md + - name: Tutorials + expanded: true + items: + - name: Create a GitHub Action with .NET + href: ../../devops/create-dotnet-github-action.md + displayName: "continuous integration, continuous deployment, ci, cd, ci/cd, github, github action, github actions, lifecycle" + - name: Quickstarts + expanded: true + items: + - name: Create a build GitHub workflow + href: ../../devops/dotnet-build-github-action.md + displayName: dotnet restore,dotnet build + - name: Create a test GitHub workflow + href: ../../devops/dotnet-test-github-action.md + displayName: dotnet restore,dotnet build,dotnet test + - name: Create a publish GitHub workflow + href: ../../devops/dotnet-publish-github-action.md + displayName: dotnet restore,dotnet build,dotnet test,dotnet publish + - name: Create a CodeQL GitHub workflow + href: ../../devops/dotnet-secure-github-action.md + displayName: codeql,security,vulnerability,source scan + - name: Testing + displayName: xUnit,NUnit,MSTest,unit test,test,integration test,load test,smoke test, web test + items: + - name: Overview + href: ../../core/testing/index.md + - name: Unit testing best practices + href: ../../core/testing/unit-testing-best-practices.md + - name: xUnit + items: + - name: C# unit testing + href: ../../core/testing/unit-testing-with-dotnet-test.md + - name: F# unit testing + href: ../../core/testing/unit-testing-fsharp-with-dotnet-test.md + - name: VB unit testing + href: ../../core/testing/unit-testing-visual-basic-with-dotnet-test.md + - name: Organize a project and test with xUnit + href: ../../core/tutorials/testing-with-cli.md + displayName: tutorials, cli + - name: NUnit + items: + - name: C# unit testing + href: ../../core/testing/unit-testing-with-nunit.md + - name: F# unit testing + href: ../../core/testing/unit-testing-fsharp-with-nunit.md + - name: VB unit testing + href: ../../core/testing/unit-testing-visual-basic-with-nunit.md + - name: MSTest + items: + - name: C# unit testing + href: ../../core/testing/unit-testing-with-mstest.md + - name: F# unit testing + href: ../../core/testing/unit-testing-fsharp-with-mstest.md + - name: VB unit testing + href: ../../core/testing/unit-testing-visual-basic-with-mstest.md + - name: Run selective unit tests + href: ../../core/testing/selective-unit-tests.md + - name: Order unit tests + href: ../../core/testing/order-unit-tests.md + - name: Unit test code coverage + href: ../../core/testing/unit-testing-code-coverage.md + - name: Unit test published output + href: ../../core/testing/unit-testing-published-output.md + - name: Live unit test with Visual Studio + href: /visualstudio/test/live-unit-testing-start?toc=/dotnet/navigate/devops-testing/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: Deployment models + items: + - name: Overview + href: ../../core/deploying/index.md + - name: Deploy apps with Visual Studio + href: ../../core/deploying/deploy-with-vs.md + - name: Publish apps with the CLI + href: ../../core/deploying/deploy-with-cli.md + - name: Create a NuGet package with the CLI + href: ../../core/deploying/creating-nuget-packages.md + - name: Self-contained deployment runtime roll forward + href: ../../core/deploying/runtime-patch-selection.md + - name: Single file deployment and executable + href: ../../core/deploying/single-file/overview.md + - name: ReadyToRun + href: ../../core/deploying/ready-to-run.md + - name: Trim self-contained deployments + items: + - name: Overview and how-to + href: ../../core/deploying/trimming/trim-self-contained.md + - name: Intro to trim warnings + href: ../../core/deploying/trimming/fixing-warnings.md + - name: Trim incompatibilities + href: ../../core/deploying/trimming/incompatibilities.md + - name: Options + href: ../../core/deploying/trimming/trimming-options.md + - name: Trimming libraries + href: ../../core/deploying/trimming/prepare-libraries-for-trimming.md + - name: Trim warnings + items: + - name: IL2001 + href: ../../core/deploying/trimming/trim-warnings/il2001.md + - name: IL2002 + href: ../../core/deploying/trimming/trim-warnings/il2002.md + - name: IL2003 + href: ../../core/deploying/trimming/trim-warnings/il2003.md + - name: IL2004 + href: ../../core/deploying/trimming/trim-warnings/il2004.md + - name: IL2005 + href: ../../core/deploying/trimming/trim-warnings/il2005.md + - name: IL2007 + href: ../../core/deploying/trimming/trim-warnings/il2007.md + - name: IL2008 + href: ../../core/deploying/trimming/trim-warnings/il2008.md + - name: IL2009 + href: ../../core/deploying/trimming/trim-warnings/il2009.md + - name: IL2010 + href: ../../core/deploying/trimming/trim-warnings/il2010.md + - name: IL2011 + href: ../../core/deploying/trimming/trim-warnings/il2011.md + - name: IL2012 + href: ../../core/deploying/trimming/trim-warnings/il2012.md + - name: IL2013 + href: ../../core/deploying/trimming/trim-warnings/il2013.md + - name: IL2014 + href: ../../core/deploying/trimming/trim-warnings/il2014.md + - name: IL2015 + href: ../../core/deploying/trimming/trim-warnings/il2015.md + - name: IL2016 + href: ../../core/deploying/trimming/trim-warnings/il2016.md + - name: IL2017 + href: ../../core/deploying/trimming/trim-warnings/il2017.md + - name: IL2018 + href: ../../core/deploying/trimming/trim-warnings/il2018.md + - name: IL2019 + href: ../../core/deploying/trimming/trim-warnings/il2019.md + - name: IL2022 + href: ../../core/deploying/trimming/trim-warnings/il2022.md + - name: IL2023 + href: ../../core/deploying/trimming/trim-warnings/il2023.md + - name: IL2024 + href: ../../core/deploying/trimming/trim-warnings/il2024.md + - name: IL2025 + href: ../../core/deploying/trimming/trim-warnings/il2025.md + - name: IL2026 + href: ../../core/deploying/trimming/trim-warnings/il2026.md + - name: IL2027 + href: ../../core/deploying/trimming/trim-warnings/il2027.md + - name: IL2028 + href: ../../core/deploying/trimming/trim-warnings/il2028.md + - name: IL2029 + href: ../../core/deploying/trimming/trim-warnings/il2029.md + - name: IL2030 + href: ../../core/deploying/trimming/trim-warnings/il2030.md + - name: IL2031 + href: ../../core/deploying/trimming/trim-warnings/il2031.md + - name: IL2032 + href: ../../core/deploying/trimming/trim-warnings/il2032.md + - name: IL2033 + href: ../../core/deploying/trimming/trim-warnings/il2033.md + - name: IL2034 + href: ../../core/deploying/trimming/trim-warnings/il2034.md + - name: IL2035 + href: ../../core/deploying/trimming/trim-warnings/il2035.md + - name: IL2036 + href: ../../core/deploying/trimming/trim-warnings/il2036.md + - name: IL2037 + href: ../../core/deploying/trimming/trim-warnings/il2037.md + - name: IL2038 + href: ../../core/deploying/trimming/trim-warnings/il2038.md + - name: IL2039 + href: ../../core/deploying/trimming/trim-warnings/il2039.md + - name: IL2040 + href: ../../core/deploying/trimming/trim-warnings/il2040.md + - name: IL2041 + href: ../../core/deploying/trimming/trim-warnings/il2041.md + - name: IL2042 + href: ../../core/deploying/trimming/trim-warnings/il2042.md + - name: IL2043 + href: ../../core/deploying/trimming/trim-warnings/il2043.md + - name: IL2044 + href: ../../core/deploying/trimming/trim-warnings/il2044.md + - name: IL2045 + href: ../../core/deploying/trimming/trim-warnings/il2045.md + - name: IL2046 + href: ../../core/deploying/trimming/trim-warnings/il2046.md + - name: IL2048 + href: ../../core/deploying/trimming/trim-warnings/il2048.md + - name: IL2049 + href: ../../core/deploying/trimming/trim-warnings/il2049.md + - name: IL2050 + href: ../../core/deploying/trimming/trim-warnings/il2050.md + - name: IL2051 + href: ../../core/deploying/trimming/trim-warnings/il2051.md + - name: IL2052 + href: ../../core/deploying/trimming/trim-warnings/il2052.md + - name: IL2053 + href: ../../core/deploying/trimming/trim-warnings/il2053.md + - name: IL2054 + href: ../../core/deploying/trimming/trim-warnings/il2054.md + - name: IL2055 + href: ../../core/deploying/trimming/trim-warnings/il2055.md + - name: IL2056 + href: ../../core/deploying/trimming/trim-warnings/il2056.md + - name: IL2057 + href: ../../core/deploying/trimming/trim-warnings/il2057.md + - name: IL2058 + href: ../../core/deploying/trimming/trim-warnings/il2058.md + - name: IL2059 + href: ../../core/deploying/trimming/trim-warnings/il2059.md + - name: IL2060 + href: ../../core/deploying/trimming/trim-warnings/il2060.md + - name: IL2061 + href: ../../core/deploying/trimming/trim-warnings/il2061.md + - name: IL2062 + href: ../../core/deploying/trimming/trim-warnings/il2062.md + - name: IL2063 + href: ../../core/deploying/trimming/trim-warnings/il2063.md + - name: IL2064 + href: ../../core/deploying/trimming/trim-warnings/il2064.md + - name: IL2065 + href: ../../core/deploying/trimming/trim-warnings/il2065.md + - name: IL2066 + href: ../../core/deploying/trimming/trim-warnings/il2066.md + - name: IL2067 + href: ../../core/deploying/trimming/trim-warnings/il2067.md + - name: IL2068 + href: ../../core/deploying/trimming/trim-warnings/il2068.md + - name: IL2069 + href: ../../core/deploying/trimming/trim-warnings/il2069.md + - name: IL2070 + href: ../../core/deploying/trimming/trim-warnings/il2070.md + - name: IL2072 + href: ../../core/deploying/trimming/trim-warnings/il2072.md + - name: IL2073 + href: ../../core/deploying/trimming/trim-warnings/il2073.md + - name: IL2074 + href: ../../core/deploying/trimming/trim-warnings/il2074.md + - name: IL2075 + href: ../../core/deploying/trimming/trim-warnings/il2075.md + - name: IL2077 + href: ../../core/deploying/trimming/trim-warnings/il2077.md + - name: IL2078 + href: ../../core/deploying/trimming/trim-warnings/il2078.md + - name: IL2079 + href: ../../core/deploying/trimming/trim-warnings/il2079.md + - name: IL2080 + href: ../../core/deploying/trimming/trim-warnings/il2080.md + - name: IL2082 + href: ../../core/deploying/trimming/trim-warnings/il2082.md + - name: IL2083 + href: ../../core/deploying/trimming/trim-warnings/il2083.md + - name: IL2084 + href: ../../core/deploying/trimming/trim-warnings/il2084.md + - name: IL2085 + href: ../../core/deploying/trimming/trim-warnings/il2085.md + - name: IL2087 + href: ../../core/deploying/trimming/trim-warnings/il2087.md + - name: IL2088 + href: ../../core/deploying/trimming/trim-warnings/il2088.md + - name: IL2089 + href: ../../core/deploying/trimming/trim-warnings/il2089.md + - name: IL2090 + href: ../../core/deploying/trimming/trim-warnings/il2090.md + - name: IL2091 + href: ../../core/deploying/trimming/trim-warnings/il2091.md + - name: IL2092 + href: ../../core/deploying/trimming/trim-warnings/il2092.md + - name: IL2093 + href: ../../core/deploying/trimming/trim-warnings/il2093.md + - name: IL2094 + href: ../../core/deploying/trimming/trim-warnings/il2094.md + - name: IL2095 + href: ../../core/deploying/trimming/trim-warnings/il2095.md + - name: IL2096 + href: ../../core/deploying/trimming/trim-warnings/il2096.md + - name: IL2097 + href: ../../core/deploying/trimming/trim-warnings/il2097.md + - name: IL2098 + href: ../../core/deploying/trimming/trim-warnings/il2098.md + - name: IL2099 + href: ../../core/deploying/trimming/trim-warnings/il2099.md + - name: IL2100 + href: ../../core/deploying/trimming/trim-warnings/il2100.md + - name: IL2101 + href: ../../core/deploying/trimming/trim-warnings/il2101.md + - name: IL2102 + href: ../../core/deploying/trimming/trim-warnings/il2102.md + - name: IL2103 + href: ../../core/deploying/trimming/trim-warnings/il2103.md + - name: IL2104 + href: ../../core/deploying/trimming/trim-warnings/il2104.md + - name: IL2105 + href: ../../core/deploying/trimming/trim-warnings/il2105.md + - name: IL2106 + href: ../../core/deploying/trimming/trim-warnings/il2106.md + - name: IL2107 + href: ../../core/deploying/trimming/trim-warnings/il2107.md + - name: IL2108 + href: ../../core/deploying/trimming/trim-warnings/il2108.md + - name: IL2109 + href: ../../core/deploying/trimming/trim-warnings/il2109.md + - name: IL2110 + href: ../../core/deploying/trimming/trim-warnings/il2110.md + - name: IL2111 + href: ../../core/deploying/trimming/trim-warnings/il2111.md + - name: IL2112 + href: ../../core/deploying/trimming/trim-warnings/il2112.md + - name: IL2113 + href: ../../core/deploying/trimming/trim-warnings/il2113.md + - name: IL2114 + href: ../../core/deploying/trimming/trim-warnings/il2114.md + - name: IL2115 + href: ../../core/deploying/trimming/trim-warnings/il2115.md + - name: IL2116 + href: ../../core/deploying/trimming/trim-warnings/il2116.md + - name: IL2117 + href: ../../core/deploying/trimming/trim-warnings/il2117.md + - name: Native AOT deployment model + items: + - name: Overview + href: ../../core/deploying/native-aot/index.md + - name: Intro to AOT warnings + href: ../../core/deploying/native-aot/fixing-warnings.md + - name: AOT warnings + items: + - name: IL3050 + href: ../../core/deploying/native-aot/warnings/il3050.md + - name: IL3051 + href: ../../core/deploying/native-aot/warnings/il3051.md + - name: IL3052 + href: ../../core/deploying/native-aot/warnings/il3052.md + - name: IL3053 + href: ../../core/deploying/native-aot/warnings/il3053.md + - name: IL3054 + href: ../../core/deploying/native-aot/warnings/il3054.md + - name: IL3055 + href: ../../core/deploying/native-aot/warnings/il3055.md + - name: IL3056 + href: ../../core/deploying/native-aot/warnings/il3056.md + - name: Runtime package store + href: ../../core/deploying/runtime-store.md + - name: Runtime Identifier (RID) catalog + href: ../../core/rid-catalog.md + - name: Resource manifest names + href: ../../core/resources/manifest-file-names.md + - name: Docker + items: + - name: Introduction to .NET and Docker + href: ../../core/docker/introduction.md + - name: Containerize a .NET app + href: ../../core/docker/build-container.md + - name: Publish app as container image + href: ../../core/docker/publish-as-container.md + - name: Container tools in Visual Studio + href: /visualstudio/containers/overview?toc=/dotnet/navigate/devops-testing/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: .NET distribution packaging + href: ../../core/distribution-packaging.md diff --git a/docs/navigate/index.md b/docs/navigate/index.md new file mode 100644 index 0000000000000..404012a4fb37c --- /dev/null +++ b/docs/navigate/index.md @@ -0,0 +1,18 @@ +--- +title: Navigate .NET docs +titleSuffix: "" +description: Learn how to navigate the .NET docs +ms.topic: reference +ms.date: 01/25/2023 +--- +# Navigate .NET docs + +Use one of the following mechanisms to find other .NET documentation that you might be interested in: + +- The drop-down menus on the header. + + :::image type="content" source="media/l2-header.png" alt-text=".NET L2 header on learn.microsoft.com"::: + +- The breadcrumb trail. From any article, select an entry in the breadcrumb trail. The ".NET" breadcrumb navigates to the [.NET documentation](../index.yml) page where you can find another area that interests you. Or, select a different breadcrumb to see an overview for that topic. + + :::image type="content" source="breadcrumb.png" alt-text=".NET docs breadcrumb"::: diff --git a/docs/navigate/media/l2-header.png b/docs/navigate/media/l2-header.png new file mode 100644 index 0000000000000..e9c5e6bee4306 Binary files /dev/null and b/docs/navigate/media/l2-header.png differ diff --git a/docs/navigate/migration-guide/index.yml b/docs/navigate/migration-guide/index.yml new file mode 100644 index 0000000000000..ba42ce5e9cb4f --- /dev/null +++ b/docs/navigate/migration-guide/index.yml @@ -0,0 +1,26 @@ +### YamlMime:Landing + +title: .NET migration documentation +summary: Learn about migrating apps from .NET Framework to .NET. + +metadata: + title: .NET migration documentation + description: Learn about migrating apps from .NET Framework to .NET. + ms.topic: landing-page + ms.date: 01/17/2023 + +landingContent: + + # Card + - title: Migrate from .NET Framework + linkLists: + - linkListType: overview + links: + - text: Port from .NET Framework to .NET Core + url: ../../core/porting/index.md + - text: Upgrade Assistant + url: ../../core/porting/upgrade-assistant-overview.md + - linkListType: reference + links: + - text: Versioning info + url: ../../core/porting/versioning-sdk-msbuild-vs.md diff --git a/docs/navigate/migration-guide/toc.yml b/docs/navigate/migration-guide/toc.yml new file mode 100644 index 0000000000000..7b0d201ca273b --- /dev/null +++ b/docs/navigate/migration-guide/toc.yml @@ -0,0 +1,71 @@ +items: + - name: .NET migration guide + href: index.yml + - name: Overview + href: ../../core/porting/index.md + - name: General information + items: + - name: About .NET + items: + - name: Versioning info for .NET SDK, MSBuild, and Visual Studio + href: ../../core/porting/versioning-sdk-msbuild-vs.md + - name: Choose between .NET and .NET Framework for server apps + href: ../../standard/choosing-core-framework-server.md + - name: .NET Upgrade Assistant tool + items: + - name: Overview + href: ../../core/porting/upgrade-assistant-overview.md + displayName: upgrade assistant + - name: Windows Communication Foundation + href: ../../core/porting/upgrade-assistant-wcf.md + - name: Windows Presentation Foundation + href: ../../core/porting/upgrade-assistant-wpf-framework.md + - name: Windows Forms + href: ../../core/porting/upgrade-assistant-winforms-framework.md + - name: Universal Windows Platform + href: ../../core/porting/upgrade-assistant-uwp-framework.md + - name: ASP.NET Core + href: ../../core/porting/upgrade-assistant-aspnetmvc.md + - name: Telemetry + href: ../../core/porting/upgrade-assistant-telemetry.md + - name: Breaking changes + items: + - name: Overview + displayName: app compatibility + href: ../../core/porting/breaking-changes.md + - name: Breaking changes + href: ../../core/compatibility/fx-core.md + - name: Pre-migration + items: + - name: Assess the portability of your project + items: + - name: Unsupported dependencies + href: ../../core/porting/third-party-deps.md + - name: Use the Windows Compatibility Pack + href: ../../core/porting/windows-compat-pack.md + - name: Unavailable technologies + href: ../../core/porting/net-framework-tech-unavailable.md + - name: Unsupported APIs + items: + - name: Tools to find unsupported APIs + href: ../../core/porting/unsupported-apis.md + - name: Unsupported API list + href: ../../core/compatibility/unsupported-apis.md + - name: Needed changes before porting code + href: ../../core/porting/premigration-needed-changes.md + - name: Migration + items: + - name: Create a porting plan + items: + - name: Approaches + href: ../../core/porting/porting-approaches.md + - name: Project structure + href: ../../core/porting/project-structure.md + - name: Application porting guides + items: + - name: Windows Forms + href: /dotnet/desktop/winforms/migration/?view=netdesktop-6.0&preserve-view=false&toc=/dotnet/navigate/migration-guide/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: Windows Presentation Foundation + href: /dotnet/desktop/wpf/migration/convert-project-from-net-framework?view=netdesktop-6.0&preserve-view=false&toc=/dotnet/navigate/migration-guide/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: C++/CLI projects + href: ../../core/porting/cpp-cli.md diff --git a/docs/navigate/security/index.yml b/docs/navigate/security/index.yml new file mode 100644 index 0000000000000..c48751d62273b --- /dev/null +++ b/docs/navigate/security/index.yml @@ -0,0 +1,28 @@ +### YamlMime:Landing + +title: .NET security documentation +summary: Learn about security features of .NET. + +metadata: + title: .NET security documentation + description: Learn about security features of .NET. + ms.topic: landing-page + ms.date: 01/17/2023 + +landingContent: + + # Card + - title: Security + linkLists: + - linkListType: concept + links: + - text: Key security concepts + url: ../../standard/security/key-security-concepts.md + - text: Role-based security + url: ../../standard/security/role-based-security.md + - text: Secure coding guidelines + url: ../../standard/security/secure-coding-guidelines.md + - linkListType: overview + links: + - text: Cryptography model + url: ../../standard/security/cryptography-model.md diff --git a/docs/navigate/security/toc.yml b/docs/navigate/security/toc.yml new file mode 100644 index 0000000000000..aa2283d241b24 --- /dev/null +++ b/docs/navigate/security/toc.yml @@ -0,0 +1,75 @@ +items: +- name: .NET security + href: ../../standard/security/index.md +- name: Key security concepts + href: ../../standard/security/key-security-concepts.md +- name: .NET Core FIPS compliance + href: ../../standard/security/fips-compliance.md +- name: Role-based security + href: ../../standard/security/role-based-security.md + items: + - name: Principal and Identity Objects + href: ../../standard/security/principal-and-identity-objects.md + - name: "How to: Create a WindowsPrincipal Object" + href: ../../standard/security/how-to-create-a-windowsprincipal-object.md + - name: "How to: Create GenericPrincipal and GenericIdentity Objects" + href: ../../standard/security/how-to-create-genericprincipal-and-genericidentity-objects.md + - name: Replacing a Principal Object + href: ../../standard/security/replacing-a-principal-object.md + - name: Impersonating and Reverting + href: ../../standard/security/impersonating-and-reverting.md +- name: Cryptography model + items: + - name: Overview + href: ../../standard/security/cryptography-model.md + - name: Cross-platform cryptography + href: ../../standard/security/cross-platform-cryptography.md + - name: Cryptographic Services + href: ../../standard/security/cryptographic-services.md + - name: Generating Keys for Encryption and Decryption + href: ../../standard/security/generating-keys-for-encryption-and-decryption.md + - name: "How to: Store Asymmetric Keys in a Key Container" + href: ../../standard/security/how-to-store-asymmetric-keys-in-a-key-container.md + - name: Encrypting Data + href: ../../standard/security/encrypting-data.md + - name: Decrypting Data + href: ../../standard/security/decrypting-data.md + - name: Cryptographic Signatures + href: ../../standard/security/cryptographic-signatures.md + - name: Ensuring Data Integrity with Hash Codes + href: ../../standard/security/ensuring-data-integrity-with-hash-codes.md + - name: "How to: Encrypt XML Elements with Symmetric Keys" + href: ../../standard/security/how-to-encrypt-xml-elements-with-symmetric-keys.md + - name: "How to: Decrypt XML Elements with Symmetric Keys" + href: ../../standard/security/how-to-decrypt-xml-elements-with-symmetric-keys.md + - name: "How to: Encrypt XML Elements with Asymmetric Keys" + href: ../../standard/security/how-to-encrypt-xml-elements-with-asymmetric-keys.md + - name: "How to: Decrypt XML Elements with Asymmetric Keys" + href: ../../standard/security/how-to-decrypt-xml-elements-with-asymmetric-keys.md + - name: "How to: Encrypt XML Elements with X.509 Certificates" + href: ../../standard/security/how-to-encrypt-xml-elements-with-x-509-certificates.md + - name: "How to: Decrypt XML Elements with X.509 Certificates" + href: ../../standard/security/how-to-decrypt-xml-elements-with-x-509-certificates.md + - name: "How to: Sign XML Documents with Digital Signatures" + href: ../../standard/security/how-to-sign-xml-documents-with-digital-signatures.md + - name: "How to: Verify the Digital Signatures of XML Documents" + href: ../../standard/security/how-to-verify-the-digital-signatures-of-xml-documents.md + - name: "How to: Use Data Protection" + href: ../../standard/security/how-to-use-data-protection.md + - name: "How to: Access Hardware Encryption Devices" + href: ../../standard/security/how-to-access-hardware-encryption-devices.md + - name: "Walkthrough: Creating a Cryptographic Application" + href: ../../standard/security/walkthrough-creating-a-cryptographic-application.md +- name: Secure coding guidelines + href: ../../standard/security/secure-coding-guidelines.md + items: + - name: Securing State Data + href: ../../standard/security/securing-state-data.md + - name: Security and User Input + href: ../../standard/security/security-and-user-input.md + - name: Security and Race Conditions + href: ../../standard/security/security-and-race-conditions.md + - name: Security and On-the-Fly Code Generation + href: ../../standard/security/security-and-on-the-fly-code-generation.md + - name: Timing vulnerabilities with CBC-mode symmetric decryption using padding + href: ../../standard/security/vulnerabilities-cbc-mode.md diff --git a/docs/navigate/tools-diagnostics/index.yml b/docs/navigate/tools-diagnostics/index.yml new file mode 100644 index 0000000000000..e2deab6d0b92d --- /dev/null +++ b/docs/navigate/tools-diagnostics/index.yml @@ -0,0 +1,128 @@ +### YamlMime:Landing + +title: .NET tools and diagnostics documentation +summary: Learn about .NET tools, including the SDK and .NET CLI, diagnostics and instrumentation, code analysis, and package validation. + +metadata: + title: .NET tools and diagnostics documentation + description: Learn about .NET tools, including the SDK and .NET CLI, diagnostics and instrumentation, code analysis, and package validation. + ms.topic: landing-page + ms.date: 01/17/2023 + +# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | sample | tutorial | video | whats-new + +landingContent: + + # Card + - title: .NET SDK + linkLists: + - linkListType: download + links: + - text: Download .NET SDK + url: https://dotnet.microsoft.com/download + - linkListType: overview + links: + - text: .NET SDK overview + url: ../../core/sdk.md + - linkListType: reference + links: + - text: .NET SDK error messages + url: ../../core/tools/sdk-errors/index.md + + # Card + - title: MSBuild and project files + linkLists: + - linkListType: overview + links: + - text: Project SDKs + url: ../../core/project-sdk/overview.md + - linkListType: reference + links: + - text: Microsoft.NET.Sdk property reference + url: ../../core/project-sdk/msbuild-props.md + - linkListType: concept + links: + - text: Target frameworks + url: ../../standard/frameworks.md + + # Card + - title: .NET CLI + linkLists: + - linkListType: overview + links: + - text: .NET CLI overview + url: ../../core/tools/index.md + - linkListType: tutorial + links: + - text: Get started using the CLI + url: ../../core/tutorials/with-visual-studio-code.md + - linkListType: reference + links: + - text: dotnet build command + url: ../../core/tools/dotnet-build.md + - text: dotnet new command + url: ../../core/tools/dotnet-new.md + - text: dotnet publish command + url: ../../core/tools/dotnet-publish.md + - linkListType: deploy + links: + - text: Publish apps + url: ../../core/deploying/deploy-with-cli.md + + # Card + - title: Global and local tools + linkLists: + - linkListType: overview + links: + - text: Overview + url: ../../core/tools/global-tools.md + + # Card + - title: Diagnostics and instrumentation + linkLists: + - linkListType: overview + links: + - text: .NET diagnostics tools + url: ../../core/diagnostics/index.md + - text: Dumps + url: ../../core/diagnostics/dumps.md + - text: Logging and tracing + url: ../../core/diagnostics/logging-tracing.md + - text: Metrics + url: ../../core/diagnostics/metrics.md + - text: Runtime events + url: ../../fundamentals/diagnostics/runtime-events.md + + # Card + - title: Code analysis + linkLists: + - linkListType: overview + links: + - text: Overview + url: ../../fundamentals/code-analysis/overview.md + - linkListType: reference + links: + - text: Configuration options + url: ../../fundamentals/code-analysis/configuration-options.md + - text: Code quality rules + url: ../../fundamentals/code-analysis/quality-rules/index.md + - text: Code style rules + url: ../../fundamentals/code-analysis/style-rules/index.md + + # Card + - title: SYSLIB diagnostics + linkLists: + - linkListType: reference + links: + - text: Obsoletion warnings + url: ../../fundamentals/syslib-diagnostics/obsoletions-overview.md + - text: Source-generated code warnings + url: ../../fundamentals/syslib-diagnostics/source-generator-overview.md + + # Card + - title: Package validation + linkLists: + - linkListType: overview + links: + - text: Overview + url: ../../fundamentals/package-validation/overview.md diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml new file mode 100644 index 0000000000000..f9b5c964f0b14 --- /dev/null +++ b/docs/navigate/tools-diagnostics/toc.yml @@ -0,0 +1,1582 @@ +items: + - name: .NET tools and diagnostics + href: index.yml + displayName: productivity,instrumentation + - name: .NET SDK + items: + - name: Overview + displayName: ".net sdk,software development kit,software dev kit,tool" + href: ../../core/sdk.md + - name: Environment variables + href: ../../core/tools/dotnet-environment-variables.md + - name: dotnet-install scripts + href: ../../core/tools/dotnet-install-script.md + - name: global.json overview + href: ../../core/tools/global-json.md + - name: Telemetry + href: ../../core/tools/telemetry.md + - name: Signed-package verification + href: ../../core/tools/nuget-signed-package-verification.md + - name: Error messages + items: + - name: List of all SDK errors + href: ../../core/tools/sdk-errors/index.md + - name: NETSDK1004 + href: ../../core/tools/sdk-errors/netsdk1004.md + - name: NETSDK1005 and NETSDK1047 + href: ../../core/tools/sdk-errors/netsdk1005.md + - name: NETSDK1013 + href: ../../core/tools/sdk-errors/netsdk1013.md + - name: NETSDK1022 + href: ../../core/tools/sdk-errors/netsdk1022.md + - name: NETSDK1045 + href: ../../core/tools/sdk-errors/netsdk1045.md + - name: NETSDK1059 + href: ../../core/tools/sdk-errors/netsdk1059.md + - name: NETSDK1064 + href: ../../core/tools/sdk-errors/netsdk1064.md + - name: NETSDK1071 + href: ../../core/tools/sdk-errors/netsdk1071.md + - name: NETSDK1073 + href: ../../core/tools/sdk-errors/netsdk1073.md + - name: NETSDK1079 + href: ../../core/tools/sdk-errors/netsdk1079.md + - name: NETSDK1080 + href: ../../core/tools/sdk-errors/netsdk1080.md + - name: NETSDK1082 + href: ../../core/tools/sdk-errors/netsdk1082.md + - name: NETSDK1100 + href: ../../core/tools/sdk-errors/netsdk1100.md + - name: NETSDK1112 + href: ../../core/tools/sdk-errors/netsdk1112.md + - name: NETSDK1130 + href: ../../core/tools/sdk-errors/netsdk1130.md + - name: NETSDK1135 + href: ../../core/tools/sdk-errors/netsdk1135.md + - name: NETSDK1136 + href: ../../core/tools/sdk-errors/netsdk1136.md + - name: NETSDK1137 + href: ../../core/tools/sdk-errors/netsdk1137.md + - name: NETSDK1138 + href: ../../core/tools/sdk-errors/netsdk1138.md + - name: NETSDK1141 + href: ../../core/tools/sdk-errors/netsdk1141.md + - name: NETSDK1145 + href: ../../core/tools/sdk-errors/netsdk1145.md + - name: NETSDK1147 + href: ../../core/tools/sdk-errors/netsdk1147.md + - name: NETSDK1149 + href: ../../core/tools/sdk-errors/netsdk1149.md + - name: NETSDK1174 + href: ../../core/tools/sdk-errors/netsdk1174.md + - name: NETSDK1182 + href: ../../core/tools/sdk-errors/netsdk1182.md + - name: .NET CLI + items: + - name: Overview + displayName: ".net cli,command-line interface,cli,tool" + href: ../../core/tools/index.md + - name: dotnet command reference + items: + - name: dotnet + href: ../../core/tools/dotnet.md + - name: dotnet add/list/remove package + items: + - name: dotnet add package + href: ../../core/tools/dotnet-add-package.md + - name: dotnet list package + href: ../../core/tools/dotnet-list-package.md + - name: dotnet remove package + href: ../../core/tools/dotnet-remove-package.md + - name: dotnet add/list/remove reference + items: + - name: dotnet add reference + href: ../../core/tools/dotnet-add-reference.md + - name: dotnet list reference + href: ../../core/tools/dotnet-list-reference.md + - name: dotnet remove reference + href: ../../core/tools/dotnet-remove-reference.md + - name: dotnet build + href: ../../core/tools/dotnet-build.md + - name: dotnet build-server + href: ../../core/tools/dotnet-build-server.md + - name: dotnet clean + href: ../../core/tools/dotnet-clean.md + - name: dotnet dev-certs + href: ../../core/tools/dotnet-dev-certs.md + - name: dotnet format + href: ../../core/tools/dotnet-format.md + - name: dotnet help + href: ../../core/tools/dotnet-help.md + - name: dotnet migrate + href: ../../core/tools/dotnet-migrate.md + - name: dotnet msbuild + href: ../../core/tools/dotnet-msbuild.md + - name: dotnet new + items: + - name: dotnet new <TEMPLATE> + href: ../../core/tools/dotnet-new.md + - name: dotnet new list + href: ../../core/tools/dotnet-new-list.md + - name: dotnet new search + href: ../../core/tools/dotnet-new-search.md + - name: dotnet new install + href: ../../core/tools/dotnet-new-install.md + - name: dotnet new uninstall + href: ../../core/tools/dotnet-new-uninstall.md + - name: dotnet new update + href: ../../core/tools/dotnet-new-update.md + - name: .NET default templates + href: ../../core/tools/dotnet-new-sdk-templates.md + - name: Custom templates + href: ../../core/tools/custom-templates.md + - name: dotnet nuget + items: + - name: dotnet nuget delete + href: ../../core/tools/dotnet-nuget-delete.md + - name: dotnet nuget locals + href: ../../core/tools/dotnet-nuget-locals.md + - name: dotnet nuget push + href: ../../core/tools/dotnet-nuget-push.md + - name: dotnet nuget add source + href: ../../core/tools/dotnet-nuget-add-source.md + - name: dotnet nuget disable source + href: ../../core/tools/dotnet-nuget-disable-source.md + - name: dotnet nuget enable source + href: ../../core/tools/dotnet-nuget-enable-source.md + - name: dotnet nuget list source + href: ../../core/tools/dotnet-nuget-list-source.md + - name: dotnet nuget remove source + href: ../../core/tools/dotnet-nuget-remove-source.md + - name: dotnet nuget update source + href: ../../core/tools/dotnet-nuget-update-source.md + - name: dotnet nuget verify + href: ../../core/tools/dotnet-nuget-verify.md + - name: dotnet nuget trust + href: ../../core/tools/dotnet-nuget-trust.md + - name: dotnet nuget sign + href: ../../core/tools/dotnet-nuget-sign.md + - name: dotnet pack + href: ../../core/tools/dotnet-pack.md + - name: dotnet publish + href: ../../core/tools/dotnet-publish.md + - name: dotnet restore + href: ../../core/tools/dotnet-restore.md + - name: dotnet run + href: ../../core/tools/dotnet-run.md + - name: dotnet sdk check + href: ../../core/tools/dotnet-sdk-check.md + - name: dotnet sln + href: ../../core/tools/dotnet-sln.md + - name: dotnet store + href: ../../core/tools/dotnet-store.md + - name: dotnet test + href: ../../core/tools/dotnet-test.md + - name: dotnet tool + items: + - name: dotnet tool install + href: ../../core/tools/dotnet-tool-install.md + - name: dotnet tool list + href: ../../core/tools/dotnet-tool-list.md + - name: dotnet tool restore + href: ../../core/tools/dotnet-tool-restore.md + - name: dotnet tool run + href: ../../core/tools/dotnet-tool-run.md + - name: dotnet tool search + href: ../../core/tools/dotnet-tool-search.md + - name: dotnet tool uninstall + href: ../../core/tools/dotnet-tool-uninstall.md + - name: dotnet tool update + href: ../../core/tools/dotnet-tool-update.md + - name: dotnet vstest + href: ../../core/tools/dotnet-vstest.md + - name: dotnet watch + displayName: hot reload + href: ../../core/tools/dotnet-watch.md + - name: dotnet workload + items: + - name: dotnet workload + href: ../../core/tools/dotnet-workload.md + - name: dotnet workload install + href: ../../core/tools/dotnet-workload-install.md + - name: dotnet workload list + href: ../../core/tools/dotnet-workload-list.md + - name: dotnet workload repair + href: ../../core/tools/dotnet-workload-repair.md + - name: dotnet workload restore + href: ../../core/tools/dotnet-workload-restore.md + - name: dotnet workload search + href: ../../core/tools/dotnet-workload-search.md + - name: dotnet workload uninstall + href: ../../core/tools/dotnet-workload-uninstall.md + - name: dotnet workload update + href: ../../core/tools/dotnet-workload-update.md + - name: Elevated access + href: ../../core/tools/elevated-access.md + - name: Enable Tab completion + href: ../../core/tools/enable-tab-autocomplete.md + - name: Develop libraries with the CLI + href: ../../core/tutorials/libraries.md + - name: Create templates for the CLI + items: + - name: 1 - Create an item template + href: ../../core/tutorials/cli-templates-create-item-template.md + displayName: tutorials, cli + - name: 2 - Create a project template + href: ../../core/tutorials/cli-templates-create-project-template.md + displayName: tutorials, cli + - name: 3 - Create a template package + href: ../../core/tutorials/cli-templates-create-template-package.md + displayName: tutorials, cli + - name: Integrated development environments (IDEs) + items: + - name: Visual Studio + displayName: ide,integrated development environment,vs + href: /visualstudio/get-started/visual-studio-ide?toc=/dotnet/navigate/tools-diagnostics/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: Visual Studio for Mac + displayName: ide,integrated development environment,vs for mac,macOS,Mac + href: /visualstudio/mac/ide-tour?toc=/dotnet/navigate/tools-diagnostics/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: Visual Studio Code + displayName: ide,integrated development environment,code,vs code,oss ide, + href: https://code.visualstudio.com/docs + - name: MSBuild and project files + items: + - name: Project SDKs + items: + - name: Overview + href: ../../core/project-sdk/overview.md + - name: Reference + items: + - name: Microsoft.NET.Sdk + displayName: msbuild, msbuild properties + href: ../../core/project-sdk/msbuild-props.md + - name: Microsoft.NET.Sdk.Web + href: /aspnet/core/razor-pages/web-sdk?toc=/dotnet/navigate/tools-diagnostics/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: Microsoft.NET.Sdk.Razor + href: /aspnet/core/razor-pages/sdk?toc=/dotnet/navigate/tools-diagnostics/toc.json&bc=/dotnet/breadcrumb/toc.json + - name: Microsoft.NET.Sdk.Desktop + href: ../../core/project-sdk/msbuild-props-desktop.md + - name: Target frameworks + href: ../../standard/frameworks.md + - name: Dependency management + href: ../../core/tools/dependencies.md + - name: Global and local tools + items: + - name: Manage tools + displayName: global tool,local tool + href: ../../core/tools/global-tools.md + - name: Troubleshoot tools + displayName: global tool troubleshooting,local tool troubleshooting, + href: ../../core/tools/troubleshoot-usage-issues.md + - name: Create tools for the CLI + items: + - name: 1 - Create a tool + displayName: tools,tutorials,cli,create global tool,create local tool + href: ../../core/tools/global-tools-how-to-create.md + - name: 2 - Use a global tool + displayName: tools,tutorials,cli,understand global tool + href: ../../core/tools/global-tools-how-to-use.md + - name: 3 - Use a local tool + href: ../../core/tools/local-tools-how-to-use.md + displayName: tools,tutorials,cli,local tool + - name: Additional tools + items: + - name: Overview + href: ../../core/additional-tools/index.md + - name: .NET uninstall tool + href: ../../core/additional-tools/uninstall-tool.md + - name: .NET install tool for extension authors + href: ../../core/additional-tools/vscode-dotnet-runtime.md + - name: Generate self-signed certificates + href: ../../core/additional-tools/self-signed-certificates-guide.md + - name: WCF web service reference provider + href: ../../core/additional-tools/wcf-web-service-reference-guide.md + - name: WCF service utility + displayName: dotnet-svcutil + href: ../../core/additional-tools/dotnet-svcutil-guide.md + - name: WCF service XML serializer + displayName: dotnet-svcutil.xmlserializer + href: ../../core/additional-tools/dotnet-svcutil.xmlserializer-guide.md + - name: XML serializer generator + displayName: sgen,sgen.exe,Microsoft.XmlSerializer.Generator,XmlSerializer + href: ../../core/additional-tools/xml-serializer-generator.md + - name: Diagnostics and instrumentation + items: + - name: Overview + href: ../../core/diagnostics/index.md + - name: Managed debuggers + href: ../../core/diagnostics/managed-debuggers.md + - name: Diagnostic port + href: ../../core/diagnostics/diagnostic-port.md + - name: Dumps + items: + - name: Overview + displayName: dumps + href: ../../core/diagnostics/dumps.md + - name: Linux dumps + href: ../../core/diagnostics/debug-linux-dumps.md + - name: SOS debugger extension + href: ../../core/diagnostics/sos-debugging-extension.md + - name: Dumps FAQ - .NET + href: ../../core/diagnostics/faq-dumps.yml + - name: Debug Windows dumps + href: ../../core/diagnostics/debug-windows-dumps.md + - name: Collect dumps on crash + href: ../../core/diagnostics/collect-dumps-crash.md + - name: Logging and tracing + items: + - name: Overview + displayName: logging tracing + href: ../../core/diagnostics/logging-tracing.md + - name: Well-known event providers + href: ../../core/diagnostics/well-known-event-providers.md + - name: Event Source + items: + - name: Overview + href: ../../core/diagnostics/eventsource.md + - name: Getting started + href: ../../core/diagnostics/eventsource-getting-started.md + - name: Instrumentation + href: ../../core/diagnostics/eventsource-instrumentation.md + - name: Collection + href: ../../core/diagnostics/eventsource-collect-and-view-traces.md + - name: Activity IDs + href: ../../core/diagnostics/eventsource-activity-ids.md + - name: DiagnosticSource and DiagnosticListener + items: + - name: Getting started + href: ../../core/diagnostics/diagnosticsource-diagnosticlistener.md + - name: EventPipe + href: ../../core/diagnostics/eventpipe.md + - name: Metrics + items: + - name: Overview + displayName: metrics + href: ../../core/diagnostics/metrics.md + - name: Instrumentation + href: ../../core/diagnostics/metrics-instrumentation.md + - name: Collection + href: ../../core/diagnostics/metrics-collection.md + - name: EventCounters + items: + - name: Overview + displayName: eventcounter + href: ../../core/diagnostics/event-counters.md + - name: Well-known counters + href: ../../core/diagnostics/available-counters.md + - name: "Tutorial: Measure performance with EventCounters" + href: ../../core/diagnostics/event-counter-perf.md + - name: Compare metric APIs + href: ../../core/diagnostics/compare-metric-apis.md + - name: Distributed tracing + items: + - name: Overview + href: ../../core/diagnostics/distributed-tracing.md + - name: Concepts + href: ../../core/diagnostics/distributed-tracing-concepts.md + - name: Instrumentation + href: ../../core/diagnostics/distributed-tracing-instrumentation-walkthroughs.md + - name: Collection + href: ../../core/diagnostics/distributed-tracing-collection-walkthroughs.md + - name: Symbols + href: ../../core/diagnostics/symbols.md + - name: Microsoft.Diagnostics.NETCore.Client library + items: + - name: Overview and examples + displayName: diagnostics client library + href: ../../core/diagnostics/diagnostics-client-library.md + - name: API reference + href: ../../core/diagnostics/microsoft-diagnostics-netcore-client.md + - name: Runtime events + items: + - name: Overview + href: ../../fundamentals/diagnostics/runtime-events.md + - name: Contention events + href: ../../fundamentals/diagnostics/runtime-contention-events.md + - name: Exception events + href: ../../fundamentals/diagnostics/runtime-exception-events.md + - name: Garbage collection events + href: ../../fundamentals/diagnostics/runtime-garbage-collection-events.md + - name: Interop events + href: ../../fundamentals/diagnostics/runtime-interop-events.md + - name: Loader and binder events + href: ../../fundamentals/diagnostics/runtime-loader-binder-events.md + - name: Method events + href: ../../fundamentals/diagnostics/runtime-method-events.md + - name: ThreadPool events + href: ../../fundamentals/diagnostics/runtime-thread-events.md + - name: Type-system events + href: ../../fundamentals/diagnostics/runtime-type-events.md + - name: Collect diagnostics in containers + href: ../../core/diagnostics/diagnostics-in-containers.md + - name: .NET CLI global tools + items: + - name: dotnet-counters + href: ../../core/diagnostics/dotnet-counters.md + - name: dotnet-coverage + href: ../../core/additional-tools/dotnet-coverage.md + - name: dotnet-dump + href: ../../core/diagnostics/dotnet-dump.md + - name: dotnet-gcdump + href: ../../core/diagnostics/dotnet-gcdump.md + - name: dotnet-monitor + href: ../../core/diagnostics/dotnet-monitor.md + - name: dotnet-trace + href: ../../core/diagnostics/dotnet-trace.md + - name: dotnet-stack + href: ../../core/diagnostics/dotnet-stack.md + - name: dotnet-symbol + href: ../../core/diagnostics/dotnet-symbol.md + - name: dotnet-sos + href: ../../core/diagnostics/dotnet-sos.md + - name: dotnet-dsrouter + href: ../../core/diagnostics/dotnet-dsrouter.md + - name: .NET diagnostics tutorials + items: + - name: Collect performance trace in Linux with PerfCollect + href: ../../core/diagnostics/trace-perfcollect-lttng.md + - name: Debug a memory leak + href: ../../core/diagnostics/debug-memory-leak.md + - name: Debug high CPU usage + href: ../../core/diagnostics/debug-highcpu.md + - name: Debug deadlock + href: ../../core/diagnostics/debug-deadlock.md + - name: Debug thread-pool starvation + href: ../../core/diagnostics/debug-threadpool-starvation.md + - name: Debug a stack overflow + href: ../../core/diagnostics/debug-stackoverflow.md + - name: Code analysis + items: + - name: Overview + href: ../../fundamentals/code-analysis/overview.md + displayName: code analysis, analyzers + - name: Configuration + items: + - name: General options + href: ../../fundamentals/code-analysis/configuration-options.md + - name: Configuration files + href: ../../fundamentals/code-analysis/configuration-files.md + - name: How to suppress warnings + href: ../../fundamentals/code-analysis/suppress-warnings.md + - name: Code quality rules + items: + - name: Rule options + href: ../../fundamentals/code-analysis/code-quality-rule-options.md + - name: Predefined configurations + href: ../../fundamentals/code-analysis/predefined-configurations.md + - name: Code style rules + items: + - name: Rule options + href: ../../fundamentals/code-analysis/code-style-rule-options.md + - name: Rule reference + items: + - name: Categories + href: ../../fundamentals/code-analysis/categories.md + - name: Code quality rules + items: + - name: Overview + href: ../../fundamentals/code-analysis/quality-rules/index.md + - name: Design rules + items: + - name: Overview + displayName: "design rules" + href: ../../fundamentals/code-analysis/quality-rules/design-warnings.md + - name: CA1000 + href: ../../fundamentals/code-analysis/quality-rules/ca1000.md + - name: CA1001 + href: ../../fundamentals/code-analysis/quality-rules/ca1001.md + - name: CA1002 + href: ../../fundamentals/code-analysis/quality-rules/ca1002.md + - name: CA1003 + href: ../../fundamentals/code-analysis/quality-rules/ca1003.md + - name: CA1005 + href: ../../fundamentals/code-analysis/quality-rules/ca1005.md + - name: CA1008 + href: ../../fundamentals/code-analysis/quality-rules/ca1008.md + - name: CA1010 + href: ../../fundamentals/code-analysis/quality-rules/ca1010.md + - name: CA1012 + href: ../../fundamentals/code-analysis/quality-rules/ca1012.md + - name: CA1014 + href: ../../fundamentals/code-analysis/quality-rules/ca1014.md + - name: CA1016 + href: ../../fundamentals/code-analysis/quality-rules/ca1016.md + - name: CA1017 + href: ../../fundamentals/code-analysis/quality-rules/ca1017.md + - name: CA1018 + href: ../../fundamentals/code-analysis/quality-rules/ca1018.md + - name: CA1019 + href: ../../fundamentals/code-analysis/quality-rules/ca1019.md + - name: CA1021 + href: ../../fundamentals/code-analysis/quality-rules/ca1021.md + - name: CA1024 + href: ../../fundamentals/code-analysis/quality-rules/ca1024.md + - name: CA1027 + href: ../../fundamentals/code-analysis/quality-rules/ca1027.md + - name: CA1028 + href: ../../fundamentals/code-analysis/quality-rules/ca1028.md + - name: CA1030 + href: ../../fundamentals/code-analysis/quality-rules/ca1030.md + - name: CA1031 + href: ../../fundamentals/code-analysis/quality-rules/ca1031.md + - name: CA1032 + href: ../../fundamentals/code-analysis/quality-rules/ca1032.md + - name: CA1033 + href: ../../fundamentals/code-analysis/quality-rules/ca1033.md + - name: CA1034 + href: ../../fundamentals/code-analysis/quality-rules/ca1034.md + - name: CA1036 + href: ../../fundamentals/code-analysis/quality-rules/ca1036.md + - name: CA1040 + href: ../../fundamentals/code-analysis/quality-rules/ca1040.md + - name: CA1041 + href: ../../fundamentals/code-analysis/quality-rules/ca1041.md + - name: CA1043 + href: ../../fundamentals/code-analysis/quality-rules/ca1043.md + - name: CA1044 + href: ../../fundamentals/code-analysis/quality-rules/ca1044.md + - name: CA1045 + href: ../../fundamentals/code-analysis/quality-rules/ca1045.md + - name: CA1046 + href: ../../fundamentals/code-analysis/quality-rules/ca1046.md + - name: CA1047 + href: ../../fundamentals/code-analysis/quality-rules/ca1047.md + - name: CA1050 + href: ../../fundamentals/code-analysis/quality-rules/ca1050.md + - name: CA1051 + href: ../../fundamentals/code-analysis/quality-rules/ca1051.md + - name: CA1052 + href: ../../fundamentals/code-analysis/quality-rules/ca1052.md + - name: CA1053 + href: ../../fundamentals/code-analysis/quality-rules/ca1053.md + - name: CA1054 + href: ../../fundamentals/code-analysis/quality-rules/ca1054.md + - name: CA1055 + href: ../../fundamentals/code-analysis/quality-rules/ca1055.md + - name: CA1056 + href: ../../fundamentals/code-analysis/quality-rules/ca1056.md + - name: CA1058 + href: ../../fundamentals/code-analysis/quality-rules/ca1058.md + - name: CA1060 + href: ../../fundamentals/code-analysis/quality-rules/ca1060.md + - name: CA1061 + href: ../../fundamentals/code-analysis/quality-rules/ca1061.md + - name: CA1062 + href: ../../fundamentals/code-analysis/quality-rules/ca1062.md + - name: CA1063 + href: ../../fundamentals/code-analysis/quality-rules/ca1063.md + - name: CA1064 + href: ../../fundamentals/code-analysis/quality-rules/ca1064.md + - name: CA1065 + href: ../../fundamentals/code-analysis/quality-rules/ca1065.md + - name: CA1066 + href: ../../fundamentals/code-analysis/quality-rules/ca1066.md + - name: CA1067 + href: ../../fundamentals/code-analysis/quality-rules/ca1067.md + - name: CA1068 + href: ../../fundamentals/code-analysis/quality-rules/ca1068.md + - name: CA1069 + href: ../../fundamentals/code-analysis/quality-rules/ca1069.md + - name: CA1070 + href: ../../fundamentals/code-analysis/quality-rules/ca1070.md + - name: Documentation rules + items: + - name: Overview + displayName: "documentation rules" + href: ../../fundamentals/code-analysis/quality-rules/documentation-warnings.md + - name: CA1200 + href: ../../fundamentals/code-analysis/quality-rules/ca1200.md + - name: Globalization rules + items: + - name: Overview + displayName: "globalization rules" + href: ../../fundamentals/code-analysis/quality-rules/globalization-warnings.md + - name: CA1303 + href: ../../fundamentals/code-analysis/quality-rules/ca1303.md + - name: CA1304 + href: ../../fundamentals/code-analysis/quality-rules/ca1304.md + - name: CA1305 + href: ../../fundamentals/code-analysis/quality-rules/ca1305.md + - name: CA1307 + href: ../../fundamentals/code-analysis/quality-rules/ca1307.md + - name: CA1308 + href: ../../fundamentals/code-analysis/quality-rules/ca1308.md + - name: CA1309 + href: ../../fundamentals/code-analysis/quality-rules/ca1309.md + - name: CA1310 + href: ../../fundamentals/code-analysis/quality-rules/ca1310.md + - name: CA1311 + href: ../../fundamentals/code-analysis/quality-rules/ca1311.md + - name: CA2101 + href: ../../fundamentals/code-analysis/quality-rules/ca2101.md + - name: Portability and interoperability rules + items: + - name: Overview + displayName: "portability and interoperability rules" + href: ../../fundamentals/code-analysis/quality-rules/interoperability-warnings.md + - name: CA1401 + href: ../../fundamentals/code-analysis/quality-rules/ca1401.md + - name: CA1416 + href: ../../fundamentals/code-analysis/quality-rules/ca1416.md + - name: CA1417 + href: ../../fundamentals/code-analysis/quality-rules/ca1417.md + - name: CA1418 + href: ../../fundamentals/code-analysis/quality-rules/ca1418.md + - name: CA1419 + href: ../../fundamentals/code-analysis/quality-rules/ca1419.md + - name: CA1420 + href: ../../fundamentals/code-analysis/quality-rules/ca1420.md + - name: CA1421 + href: ../../fundamentals/code-analysis/quality-rules/ca1421.md + - name: CA1422 + href: ../../fundamentals/code-analysis/quality-rules/ca1422.md + - name: Maintainability rules + items: + - name: Overview + displayName: "maintainability rules" + href: ../../fundamentals/code-analysis/quality-rules/maintainability-warnings.md + - name: CA1501 + href: ../../fundamentals/code-analysis/quality-rules/ca1501.md + - name: CA1502 + href: ../../fundamentals/code-analysis/quality-rules/ca1502.md + - name: CA1505 + href: ../../fundamentals/code-analysis/quality-rules/ca1505.md + - name: CA1506 + href: ../../fundamentals/code-analysis/quality-rules/ca1506.md + - name: CA1507 + href: ../../fundamentals/code-analysis/quality-rules/ca1507.md + - name: CA1508 + href: ../../fundamentals/code-analysis/quality-rules/ca1508.md + - name: CA1509 + href: ../../fundamentals/code-analysis/quality-rules/ca1509.md + - name: Naming rules + items: + - name: Overview + displayName: "naming rules" + href: ../../fundamentals/code-analysis/quality-rules/naming-warnings.md + - name: CA1700 + href: ../../fundamentals/code-analysis/quality-rules/ca1700.md + - name: CA1707 + href: ../../fundamentals/code-analysis/quality-rules/ca1707.md + - name: CA1708 + href: ../../fundamentals/code-analysis/quality-rules/ca1708.md + - name: CA1710 + href: ../../fundamentals/code-analysis/quality-rules/ca1710.md + - name: CA1711 + href: ../../fundamentals/code-analysis/quality-rules/ca1711.md + - name: CA1712 + href: ../../fundamentals/code-analysis/quality-rules/ca1712.md + - name: CA1713 + href: ../../fundamentals/code-analysis/quality-rules/ca1713.md + - name: CA1714 + href: ../../fundamentals/code-analysis/quality-rules/ca1714.md + - name: CA1715 + href: ../../fundamentals/code-analysis/quality-rules/ca1715.md + - name: CA1716 + href: ../../fundamentals/code-analysis/quality-rules/ca1716.md + - name: CA1717 + href: ../../fundamentals/code-analysis/quality-rules/ca1717.md + - name: CA1720 + href: ../../fundamentals/code-analysis/quality-rules/ca1720.md + - name: CA1721 + href: ../../fundamentals/code-analysis/quality-rules/ca1721.md + - name: CA1724 + href: ../../fundamentals/code-analysis/quality-rules/ca1724.md + - name: CA1725 + href: ../../fundamentals/code-analysis/quality-rules/ca1725.md + - name: CA1727 + href: ../../fundamentals/code-analysis/quality-rules/ca1727.md + - name: Performance rules + items: + - name: Overview + displayName: "performance rules" + href: ../../fundamentals/code-analysis/quality-rules/performance-warnings.md + - name: CA1802 + href: ../../fundamentals/code-analysis/quality-rules/ca1802.md + - name: CA1805 + href: ../../fundamentals/code-analysis/quality-rules/ca1805.md + - name: CA1806 + href: ../../fundamentals/code-analysis/quality-rules/ca1806.md + - name: CA1810 + href: ../../fundamentals/code-analysis/quality-rules/ca1810.md + - name: CA1812 + href: ../../fundamentals/code-analysis/quality-rules/ca1812.md + - name: CA1813 + href: ../../fundamentals/code-analysis/quality-rules/ca1813.md + - name: CA1814 + href: ../../fundamentals/code-analysis/quality-rules/ca1814.md + - name: CA1815 + href: ../../fundamentals/code-analysis/quality-rules/ca1815.md + - name: CA1819 + href: ../../fundamentals/code-analysis/quality-rules/ca1819.md + - name: CA1820 + href: ../../fundamentals/code-analysis/quality-rules/ca1820.md + - name: CA1821 + href: ../../fundamentals/code-analysis/quality-rules/ca1821.md + - name: CA1822 + href: ../../fundamentals/code-analysis/quality-rules/ca1822.md + - name: CA1823 + href: ../../fundamentals/code-analysis/quality-rules/ca1823.md + - name: CA1824 + href: ../../fundamentals/code-analysis/quality-rules/ca1824.md + - name: CA1825 + href: ../../fundamentals/code-analysis/quality-rules/ca1825.md + - name: CA1826 + href: ../../fundamentals/code-analysis/quality-rules/ca1826.md + - name: CA1827 + href: ../../fundamentals/code-analysis/quality-rules/ca1827.md + - name: CA1828 + href: ../../fundamentals/code-analysis/quality-rules/ca1828.md + - name: CA1829 + href: ../../fundamentals/code-analysis/quality-rules/ca1829.md + - name: CA1830 + href: ../../fundamentals/code-analysis/quality-rules/ca1830.md + - name: CA1831 + href: ../../fundamentals/code-analysis/quality-rules/ca1831.md + - name: CA1832 + href: ../../fundamentals/code-analysis/quality-rules/ca1832.md + - name: CA1833 + href: ../../fundamentals/code-analysis/quality-rules/ca1833.md + - name: CA1834 + href: ../../fundamentals/code-analysis/quality-rules/ca1834.md + - name: CA1835 + href: ../../fundamentals/code-analysis/quality-rules/ca1835.md + - name: CA1836 + href: ../../fundamentals/code-analysis/quality-rules/ca1836.md + - name: CA1837 + href: ../../fundamentals/code-analysis/quality-rules/ca1837.md + - name: CA1838 + href: ../../fundamentals/code-analysis/quality-rules/ca1838.md + - name: CA1839 + href: ../../fundamentals/code-analysis/quality-rules/ca1839.md + - name: CA1840 + href: ../../fundamentals/code-analysis/quality-rules/ca1840.md + - name: CA1841 + href: ../../fundamentals/code-analysis/quality-rules/ca1841.md + - name: CA1842 + href: ../../fundamentals/code-analysis/quality-rules/ca1842.md + - name: CA1843 + href: ../../fundamentals/code-analysis/quality-rules/ca1843.md + - name: CA1844 + href: ../../fundamentals/code-analysis/quality-rules/ca1844.md + - name: CA1845 + href: ../../fundamentals/code-analysis/quality-rules/ca1845.md + - name: CA1846 + href: ../../fundamentals/code-analysis/quality-rules/ca1846.md + - name: CA1847 + href: ../../fundamentals/code-analysis/quality-rules/ca1847.md + - name: CA1848 + href: ../../fundamentals/code-analysis/quality-rules/ca1848.md + - name: CA1849 + href: ../../fundamentals/code-analysis/quality-rules/ca1849.md + - name: CA1850 + href: ../../fundamentals/code-analysis/quality-rules/ca1850.md + - name: CA1851 + href: ../../fundamentals/code-analysis/quality-rules/ca1851.md + - name: CA1852 + href: ../../fundamentals/code-analysis/quality-rules/ca1852.md + - name: CA1853 + href: ../../fundamentals/code-analysis/quality-rules/ca1853.md + - name: CA1854 + href: ../../fundamentals/code-analysis/quality-rules/ca1854.md + - name: CA1855 + href: ../../fundamentals/code-analysis/quality-rules/ca1855.md + - name: CA1858 + href: ../../fundamentals/code-analysis/quality-rules/ca1858.md + - name: CA1860 + href: ../../fundamentals/code-analysis/quality-rules/ca1860.md + - name: SingleFile rules + items: + - name: Overview + displayName: "singlefile rules" + href: ../../core/deploying/single-file/warnings/overview.md + - name: IL3000 + href: ../../core/deploying/single-file/warnings/il3000.md + - name: IL3001 + href: ../../core/deploying/single-file/warnings/il3001.md + - name: IL3002 + href: ../../core/deploying/single-file/warnings/il3002.md + - name: IL3003 + href: ../../core/deploying/single-file/warnings/il3003.md + - name: Reliability rules + items: + - name: Overview + displayName: "reliability rules" + href: ../../fundamentals/code-analysis/quality-rules/reliability-warnings.md + - name: CA2000 + href: ../../fundamentals/code-analysis/quality-rules/ca2000.md + - name: CA2002 + href: ../../fundamentals/code-analysis/quality-rules/ca2002.md + - name: CA2007 + href: ../../fundamentals/code-analysis/quality-rules/ca2007.md + - name: CA2008 + href: ../../fundamentals/code-analysis/quality-rules/ca2008.md + - name: CA2009 + href: ../../fundamentals/code-analysis/quality-rules/ca2009.md + - name: CA2011 + href: ../../fundamentals/code-analysis/quality-rules/ca2011.md + - name: CA2012 + href: ../../fundamentals/code-analysis/quality-rules/ca2012.md + - name: CA2013 + href: ../../fundamentals/code-analysis/quality-rules/ca2013.md + - name: CA2014 + href: ../../fundamentals/code-analysis/quality-rules/ca2014.md + - name: CA2015 + href: ../../fundamentals/code-analysis/quality-rules/ca2015.md + - name: CA2016 + href: ../../fundamentals/code-analysis/quality-rules/ca2016.md + - name: CA2017 + href: ../../fundamentals/code-analysis/quality-rules/ca2017.md + - name: CA2018 + href: ../../fundamentals/code-analysis/quality-rules/ca2018.md + - name: CA2019 + href: ../../fundamentals/code-analysis/quality-rules/ca2019.md + - name: CA2020 + href: ../../fundamentals/code-analysis/quality-rules/ca2020.md + - name: Security rules + items: + - name: Overview + displayName: "security rules" + href: ../../fundamentals/code-analysis/quality-rules/security-warnings.md + - name: CA2100 + href: ../../fundamentals/code-analysis/quality-rules/ca2100.md + - name: CA2109 + href: ../../fundamentals/code-analysis/quality-rules/ca2109.md + - name: CA2119 + href: ../../fundamentals/code-analysis/quality-rules/ca2119.md + - name: CA2153 + href: ../../fundamentals/code-analysis/quality-rules/ca2153.md + - name: CA2300 + href: ../../fundamentals/code-analysis/quality-rules/ca2300.md + - name: CA2301 + href: ../../fundamentals/code-analysis/quality-rules/ca2301.md + - name: CA2302 + href: ../../fundamentals/code-analysis/quality-rules/ca2302.md + - name: CA2305 + href: ../../fundamentals/code-analysis/quality-rules/ca2305.md + - name: CA2310 + href: ../../fundamentals/code-analysis/quality-rules/ca2310.md + - name: CA2311 + href: ../../fundamentals/code-analysis/quality-rules/ca2311.md + - name: CA2312 + href: ../../fundamentals/code-analysis/quality-rules/ca2312.md + - name: CA2315 + href: ../../fundamentals/code-analysis/quality-rules/ca2315.md + - name: CA2321 + href: ../../fundamentals/code-analysis/quality-rules/ca2321.md + - name: CA2322 + href: ../../fundamentals/code-analysis/quality-rules/ca2322.md + - name: CA2326 + href: ../../fundamentals/code-analysis/quality-rules/ca2326.md + - name: CA2327 + href: ../../fundamentals/code-analysis/quality-rules/ca2327.md + - name: CA2328 + href: ../../fundamentals/code-analysis/quality-rules/ca2328.md + - name: CA2329 + href: ../../fundamentals/code-analysis/quality-rules/ca2329.md + - name: CA2330 + href: ../../fundamentals/code-analysis/quality-rules/ca2330.md + - name: CA2350 + href: ../../fundamentals/code-analysis/quality-rules/ca2350.md + - name: CA2351 + href: ../../fundamentals/code-analysis/quality-rules/ca2351.md + - name: CA2352 + href: ../../fundamentals/code-analysis/quality-rules/ca2352.md + - name: CA2353 + href: ../../fundamentals/code-analysis/quality-rules/ca2353.md + - name: CA2354 + href: ../../fundamentals/code-analysis/quality-rules/ca2354.md + - name: CA2355 + href: ../../fundamentals/code-analysis/quality-rules/ca2355.md + - name: CA2356 + href: ../../fundamentals/code-analysis/quality-rules/ca2356.md + - name: CA2361 + href: ../../fundamentals/code-analysis/quality-rules/ca2361.md + - name: CA2362 + href: ../../fundamentals/code-analysis/quality-rules/ca2362.md + - name: CA3001 + href: ../../fundamentals/code-analysis/quality-rules/ca3001.md + - name: CA3002 + href: ../../fundamentals/code-analysis/quality-rules/ca3002.md + - name: CA3003 + href: ../../fundamentals/code-analysis/quality-rules/ca3003.md + - name: CA3004 + href: ../../fundamentals/code-analysis/quality-rules/ca3004.md + - name: CA3005 + href: ../../fundamentals/code-analysis/quality-rules/ca3005.md + - name: CA3006 + href: ../../fundamentals/code-analysis/quality-rules/ca3006.md + - name: CA3007 + href: ../../fundamentals/code-analysis/quality-rules/ca3007.md + - name: CA3008 + href: ../../fundamentals/code-analysis/quality-rules/ca3008.md + - name: CA3009 + href: ../../fundamentals/code-analysis/quality-rules/ca3009.md + - name: CA3010 + href: ../../fundamentals/code-analysis/quality-rules/ca3010.md + - name: CA3011 + href: ../../fundamentals/code-analysis/quality-rules/ca3011.md + - name: CA3012 + href: ../../fundamentals/code-analysis/quality-rules/ca3012.md + - name: CA3061 + href: ../../fundamentals/code-analysis/quality-rules/ca3061.md + - name: CA3075 + href: ../../fundamentals/code-analysis/quality-rules/ca3075.md + - name: CA3076 + href: ../../fundamentals/code-analysis/quality-rules/ca3076.md + - name: CA3077 + href: ../../fundamentals/code-analysis/quality-rules/ca3077.md + - name: CA3147 + href: ../../fundamentals/code-analysis/quality-rules/ca3147.md + - name: CA5350 + href: ../../fundamentals/code-analysis/quality-rules/ca5350.md + - name: CA5351 + href: ../../fundamentals/code-analysis/quality-rules/ca5351.md + - name: CA5358 + href: ../../fundamentals/code-analysis/quality-rules/ca5358.md + - name: CA5359 + href: ../../fundamentals/code-analysis/quality-rules/ca5359.md + - name: CA5360 + href: ../../fundamentals/code-analysis/quality-rules/ca5360.md + - name: CA5361 + href: ../../fundamentals/code-analysis/quality-rules/ca5361.md + - name: CA5362 + href: ../../fundamentals/code-analysis/quality-rules/ca5362.md + - name: CA5363 + href: ../../fundamentals/code-analysis/quality-rules/ca5363.md + - name: CA5364 + href: ../../fundamentals/code-analysis/quality-rules/ca5364.md + - name: CA5365 + href: ../../fundamentals/code-analysis/quality-rules/ca5365.md + - name: CA5366 + href: ../../fundamentals/code-analysis/quality-rules/ca5366.md + - name: CA5367 + href: ../../fundamentals/code-analysis/quality-rules/ca5367.md + - name: CA5368 + href: ../../fundamentals/code-analysis/quality-rules/ca5368.md + - name: CA5369 + href: ../../fundamentals/code-analysis/quality-rules/ca5369.md + - name: CA5370 + href: ../../fundamentals/code-analysis/quality-rules/ca5370.md + - name: CA5371 + href: ../../fundamentals/code-analysis/quality-rules/ca5371.md + - name: CA5372 + href: ../../fundamentals/code-analysis/quality-rules/ca5372.md + - name: CA5373 + href: ../../fundamentals/code-analysis/quality-rules/ca5373.md + - name: CA5374 + href: ../../fundamentals/code-analysis/quality-rules/ca5374.md + - name: CA5375 + href: ../../fundamentals/code-analysis/quality-rules/ca5375.md + - name: CA5376 + href: ../../fundamentals/code-analysis/quality-rules/ca5376.md + - name: CA5377 + href: ../../fundamentals/code-analysis/quality-rules/ca5377.md + - name: CA5378 + href: ../../fundamentals/code-analysis/quality-rules/ca5378.md + - name: CA5379 + href: ../../fundamentals/code-analysis/quality-rules/ca5379.md + - name: CA5380 + href: ../../fundamentals/code-analysis/quality-rules/ca5380.md + - name: CA5381 + href: ../../fundamentals/code-analysis/quality-rules/ca5381.md + - name: CA5382 + href: ../../fundamentals/code-analysis/quality-rules/ca5382.md + - name: CA5383 + href: ../../fundamentals/code-analysis/quality-rules/ca5383.md + - name: CA5384 + href: ../../fundamentals/code-analysis/quality-rules/ca5384.md + - name: CA5385 + href: ../../fundamentals/code-analysis/quality-rules/ca5385.md + - name: CA5386 + href: ../../fundamentals/code-analysis/quality-rules/ca5386.md + - name: CA5387 + href: ../../fundamentals/code-analysis/quality-rules/ca5387.md + - name: CA5388 + href: ../../fundamentals/code-analysis/quality-rules/ca5388.md + - name: CA5389 + href: ../../fundamentals/code-analysis/quality-rules/ca5389.md + - name: CA5390 + href: ../../fundamentals/code-analysis/quality-rules/ca5390.md + - name: CA5391 + href: ../../fundamentals/code-analysis/quality-rules/ca5391.md + - name: CA5392 + href: ../../fundamentals/code-analysis/quality-rules/ca5392.md + - name: CA5393 + href: ../../fundamentals/code-analysis/quality-rules/ca5393.md + - name: CA5394 + href: ../../fundamentals/code-analysis/quality-rules/ca5394.md + - name: CA5395 + href: ../../fundamentals/code-analysis/quality-rules/ca5395.md + - name: CA5396 + href: ../../fundamentals/code-analysis/quality-rules/ca5396.md + - name: CA5397 + href: ../../fundamentals/code-analysis/quality-rules/ca5397.md + - name: CA5398 + href: ../../fundamentals/code-analysis/quality-rules/ca5398.md + - name: CA5399 + href: ../../fundamentals/code-analysis/quality-rules/ca5399.md + - name: CA5400 + href: ../../fundamentals/code-analysis/quality-rules/ca5400.md + - name: CA5401 + href: ../../fundamentals/code-analysis/quality-rules/ca5401.md + - name: CA5402 + href: ../../fundamentals/code-analysis/quality-rules/ca5402.md + - name: CA5403 + href: ../../fundamentals/code-analysis/quality-rules/ca5403.md + - name: CA5404 + href: ../../fundamentals/code-analysis/quality-rules/ca5404.md + - name: CA5405 + href: ../../fundamentals/code-analysis/quality-rules/ca5405.md + - name: Usage rules + items: + - name: Overview + displayName: "usage rules" + href: ../../fundamentals/code-analysis/quality-rules/usage-warnings.md + - name: CA1801 + href: ../../fundamentals/code-analysis/quality-rules/ca1801.md + - name: CA1816 + href: ../../fundamentals/code-analysis/quality-rules/ca1816.md + - name: CA2200 + href: ../../fundamentals/code-analysis/quality-rules/ca2200.md + - name: CA2201 + href: ../../fundamentals/code-analysis/quality-rules/ca2201.md + - name: CA2207 + href: ../../fundamentals/code-analysis/quality-rules/ca2207.md + - name: CA2208 + href: ../../fundamentals/code-analysis/quality-rules/ca2208.md + - name: CA2211 + href: ../../fundamentals/code-analysis/quality-rules/ca2211.md + - name: CA2213 + href: ../../fundamentals/code-analysis/quality-rules/ca2213.md + - name: CA2214 + href: ../../fundamentals/code-analysis/quality-rules/ca2214.md + - name: CA2215 + href: ../../fundamentals/code-analysis/quality-rules/ca2215.md + - name: CA2216 + href: ../../fundamentals/code-analysis/quality-rules/ca2216.md + - name: CA2217 + href: ../../fundamentals/code-analysis/quality-rules/ca2217.md + - name: CA2218 + href: ../../fundamentals/code-analysis/quality-rules/ca2218.md + - name: CA2219 + href: ../../fundamentals/code-analysis/quality-rules/ca2219.md + - name: CA2224 + href: ../../fundamentals/code-analysis/quality-rules/ca2224.md + - name: CA2225 + href: ../../fundamentals/code-analysis/quality-rules/ca2225.md + - name: CA2226 + href: ../../fundamentals/code-analysis/quality-rules/ca2226.md + - name: CA2227 + href: ../../fundamentals/code-analysis/quality-rules/ca2227.md + - name: CA2229 + href: ../../fundamentals/code-analysis/quality-rules/ca2229.md + - name: CA2231 + href: ../../fundamentals/code-analysis/quality-rules/ca2231.md + - name: CA2234 + href: ../../fundamentals/code-analysis/quality-rules/ca2234.md + - name: CA2235 + href: ../../fundamentals/code-analysis/quality-rules/ca2235.md + - name: CA2237 + href: ../../fundamentals/code-analysis/quality-rules/ca2237.md + - name: CA2241 + href: ../../fundamentals/code-analysis/quality-rules/ca2241.md + - name: CA2242 + href: ../../fundamentals/code-analysis/quality-rules/ca2242.md + - name: CA2243 + href: ../../fundamentals/code-analysis/quality-rules/ca2243.md + - name: CA2244 + href: ../../fundamentals/code-analysis/quality-rules/ca2244.md + - name: CA2245 + href: ../../fundamentals/code-analysis/quality-rules/ca2245.md + - name: CA2246 + href: ../../fundamentals/code-analysis/quality-rules/ca2246.md + - name: CA2247 + href: ../../fundamentals/code-analysis/quality-rules/ca2247.md + - name: CA2248 + href: ../../fundamentals/code-analysis/quality-rules/ca2248.md + - name: CA2249 + href: ../../fundamentals/code-analysis/quality-rules/ca2249.md + - name: CA2250 + href: ../../fundamentals/code-analysis/quality-rules/ca2250.md + - name: CA2251 + href: ../../fundamentals/code-analysis/quality-rules/ca2251.md + - name: CA2252 + href: ../../fundamentals/code-analysis/quality-rules/ca2252.md + - name: CA2253 + href: ../../fundamentals/code-analysis/quality-rules/ca2253.md + - name: CA2254 + href: ../../fundamentals/code-analysis/quality-rules/ca2254.md + - name: CA2255 + href: ../../fundamentals/code-analysis/quality-rules/ca2255.md + - name: CA2256 + href: ../../fundamentals/code-analysis/quality-rules/ca2256.md + - name: CA2257 + href: ../../fundamentals/code-analysis/quality-rules/ca2257.md + - name: CA2258 + href: ../../fundamentals/code-analysis/quality-rules/ca2258.md + - name: CA2259 + href: ../../fundamentals/code-analysis/quality-rules/ca2259.md + - name: CA2260 + href: ../../fundamentals/code-analysis/quality-rules/ca2260.md + - name: Code style rules + items: + - name: Overview + href: ../../fundamentals/code-analysis/style-rules/index.md + - name: Language rules + items: + - name: Overview + displayName: "language rules" + href: ../../fundamentals/code-analysis/style-rules/language-rules.md + - name: this and Me preferences + items: + - name: IDE0003 and IDE0009 + href: ../../fundamentals/code-analysis/style-rules/ide0003-ide0009.md + - name: Use language keywords for types + items: + - name: IDE0049 + href: ../../fundamentals/code-analysis/style-rules/ide0049.md + - name: Modifier preferences + items: + - name: Overview + href: ../../fundamentals/code-analysis/style-rules/modifier-preferences.md + - name: IDE0036 + href: ../../fundamentals/code-analysis/style-rules/ide0036.md + - name: IDE0040 + href: ../../fundamentals/code-analysis/style-rules/ide0040.md + - name: IDE0044 + href: ../../fundamentals/code-analysis/style-rules/ide0044.md + - name: IDE0062 + href: ../../fundamentals/code-analysis/style-rules/ide0062.md + - name: IDE0064 + href: ../../fundamentals/code-analysis/style-rules/ide0064.md + - name: Parentheses preferences + items: + - name: IDE0047 and IDE0048 + href: ../../fundamentals/code-analysis/style-rules/ide0047-ide0048.md + - name: Expression-level preferences + items: + - name: Overview + href: ../../fundamentals/code-analysis/style-rules/expression-level-preferences.md + - name: IDE0010 + href: ../../fundamentals/code-analysis/style-rules/ide0010.md + - name: IDE0017 + href: ../../fundamentals/code-analysis/style-rules/ide0017.md + - name: IDE0018 + href: ../../fundamentals/code-analysis/style-rules/ide0018.md + - name: IDE0028 + href: ../../fundamentals/code-analysis/style-rules/ide0028.md + - name: IDE0032 + href: ../../fundamentals/code-analysis/style-rules/ide0032.md + - name: IDE0033 + href: ../../fundamentals/code-analysis/style-rules/ide0033.md + - name: IDE0034 + href: ../../fundamentals/code-analysis/style-rules/ide0034.md + - name: IDE0037 + href: ../../fundamentals/code-analysis/style-rules/ide0037.md + - name: IDE0039 + href: ../../fundamentals/code-analysis/style-rules/ide0039.md + - name: IDE0042 + href: ../../fundamentals/code-analysis/style-rules/ide0042.md + - name: IDE0045 + href: ../../fundamentals/code-analysis/style-rules/ide0045.md + - name: IDE0046 + href: ../../fundamentals/code-analysis/style-rules/ide0046.md + - name: IDE0050 + href: ../../fundamentals/code-analysis/style-rules/ide0050.md + - name: IDE0054 + href: ../../fundamentals/code-analysis/style-rules/ide0054-ide0074.md + - name: IDE0056 + href: ../../fundamentals/code-analysis/style-rules/ide0056.md + - name: IDE0057 + href: ../../fundamentals/code-analysis/style-rules/ide0057.md + - name: IDE0070 + href: ../../fundamentals/code-analysis/style-rules/ide0070.md + - name: IDE0071 + href: ../../fundamentals/code-analysis/style-rules/ide0071.md + - name: IDE0072 + href: ../../fundamentals/code-analysis/style-rules/ide0072.md + - name: IDE0074 + href: ../../fundamentals/code-analysis/style-rules/ide0054-ide0074.md + - name: IDE0075 + href: ../../fundamentals/code-analysis/style-rules/ide0075.md + - name: IDE0082 + href: ../../fundamentals/code-analysis/style-rules/ide0082.md + - name: IDE0090 + href: ../../fundamentals/code-analysis/style-rules/ide0090.md + - name: IDE0180 + href: ../../fundamentals/code-analysis/style-rules/ide0180.md + - name: Namespace declaration preferences + items: + - name: IDE0160 and IDE0161 + href: ../../fundamentals/code-analysis/style-rules/ide0160-ide0161.md + - name: Null-checking preferences + items: + - name: Overview + href: ../../fundamentals/code-analysis/style-rules/null-checking-preferences.md + - name: IDE0016 + href: ../../fundamentals/code-analysis/style-rules/ide0016.md + - name: IDE0029 and IDE0030 + href: ../../fundamentals/code-analysis/style-rules/ide0029-ide0030.md + - name: IDE0031 + href: ../../fundamentals/code-analysis/style-rules/ide0031.md + - name: IDE0041 + href: ../../fundamentals/code-analysis/style-rules/ide0041.md + - name: IDE0150 + href: ../../fundamentals/code-analysis/style-rules/ide0150.md + - name: IDE1005 + href: ../../fundamentals/code-analysis/style-rules/ide1005.md + - name: var preferences + items: + - name: IDE0007 and IDE0008 + href: ../../fundamentals/code-analysis/style-rules/ide0007-ide0008.md + - name: Expression-bodied members + items: + - name: Overview + href: ../../fundamentals/code-analysis/style-rules/expression-bodied-members.md + - name: IDE0021 + href: ../../fundamentals/code-analysis/style-rules/ide0021.md + - name: IDE0022 + href: ../../fundamentals/code-analysis/style-rules/ide0022.md + - name: IDE0023 and IDE0024 + href: ../../fundamentals/code-analysis/style-rules/ide0023-ide0024.md + - name: IDE0025 + href: ../../fundamentals/code-analysis/style-rules/ide0025.md + - name: IDE0026 + href: ../../fundamentals/code-analysis/style-rules/ide0026.md + - name: IDE0027 + href: ../../fundamentals/code-analysis/style-rules/ide0027.md + - name: IDE0053 + href: ../../fundamentals/code-analysis/style-rules/ide0053.md + - name: IDE0061 + href: ../../fundamentals/code-analysis/style-rules/ide0061.md + - name: Pattern matching preferences + items: + - name: Overview + href: ../../fundamentals/code-analysis/style-rules/pattern-matching-preferences.md + - name: IDE0019 + href: ../../fundamentals/code-analysis/style-rules/ide0019.md + - name: IDE0020 and IDE0038 + href: ../../fundamentals/code-analysis/style-rules/ide0020-ide0038.md + - name: IDE0066 + href: ../../fundamentals/code-analysis/style-rules/ide0066.md + - name: IDE0078 + href: ../../fundamentals/code-analysis/style-rules/ide0078.md + - name: IDE0083 + href: ../../fundamentals/code-analysis/style-rules/ide0083.md + - name: IDE0084 + href: ../../fundamentals/code-analysis/style-rules/ide0084.md + - name: IDE0170 + href: ../../fundamentals/code-analysis/style-rules/ide0170.md + - name: Code block preferences + items: + - name: Overview + href: ../../fundamentals/code-analysis/style-rules/code-block-preferences.md + - name: IDE0011 + href: ../../fundamentals/code-analysis/style-rules/ide0011.md + - name: IDE0063 + href: ../../fundamentals/code-analysis/style-rules/ide0063.md + - name: using directive preferences + items: + - name: IDE0065 + href: ../../fundamentals/code-analysis/style-rules/ide0065.md + - name: File header preferences + items: + - name: IDE0073 + href: ../../fundamentals/code-analysis/style-rules/ide0073.md + - name: Namespace naming preferences + items: + - name: IDE0130 + href: ../../fundamentals/code-analysis/style-rules/ide0130.md + - name: Unnecessary code rules + items: + - name: Overview + href: ../../fundamentals/code-analysis/style-rules/unnecessary-code-rules.md + - name: IDE0001 + href: ../../fundamentals/code-analysis/style-rules/ide0001.md + - name: IDE0002 + href: ../../fundamentals/code-analysis/style-rules/ide0002.md + - name: IDE0004 + href: ../../fundamentals/code-analysis/style-rules/ide0004.md + - name: IDE0005 + href: ../../fundamentals/code-analysis/style-rules/ide0005.md + - name: IDE0035 + href: ../../fundamentals/code-analysis/style-rules/ide0035.md + - name: IDE0051 + href: ../../fundamentals/code-analysis/style-rules/ide0051.md + - name: IDE0052 + href: ../../fundamentals/code-analysis/style-rules/ide0052.md + - name: IDE0058 + href: ../../fundamentals/code-analysis/style-rules/ide0058.md + - name: IDE0059 + href: ../../fundamentals/code-analysis/style-rules/ide0059.md + - name: IDE0060 + href: ../../fundamentals/code-analysis/style-rules/ide0060.md + - name: IDE0079 + href: ../../fundamentals/code-analysis/style-rules/ide0079.md + - name: IDE0080 + href: ../../fundamentals/code-analysis/style-rules/ide0080.md + - name: IDE0081 + href: ../../fundamentals/code-analysis/style-rules/ide0081.md + - name: IDE0100 + href: ../../fundamentals/code-analysis/style-rules/ide0100.md + - name: IDE0110 + href: ../../fundamentals/code-analysis/style-rules/ide0110.md + - name: IDE0140 + href: ../../fundamentals/code-analysis/style-rules/ide0140.md + - name: Miscellaneous rules + items: + - name: Overview + href: ../../fundamentals/code-analysis/style-rules/miscellaneous-rules.md + - name: IDE0076 + href: ../../fundamentals/code-analysis/style-rules/ide0076.md + - name: IDE0077 + href: ../../fundamentals/code-analysis/style-rules/ide0077.md + - name: Formatting rules + items: + - name: IDE0055 + items: + - name: Overview + displayName: formatting rule, ide0055 + href: ../../fundamentals/code-analysis/style-rules/ide0055.md + - name: .NET formatting options + href: ../../fundamentals/code-analysis/style-rules/dotnet-formatting-options.md + - name: C# formatting options + href: ../../fundamentals/code-analysis/style-rules/csharp-formatting-options.md + - name: Naming rules + href: ../../fundamentals/code-analysis/style-rules/naming-rules.md + - name: Platform compatibility analyzer + href: ../../standard/analyzers/platform-compat-analyzer.md + - name: Portability analyzer + href: ../../standard/analyzers/portability-analyzer.md + - name: SYSLIB diagnostics + items: + - name: Obsoletions + items: + - name: Overview + displayName: syslib, obsolete, obsoletion + href: ../../fundamentals/syslib-diagnostics/obsoletions-overview.md + - name: SYSLIB0001 + href: ../../fundamentals/syslib-diagnostics/syslib0001.md + - name: SYSLIB0002 + href: ../../fundamentals/syslib-diagnostics/syslib0002.md + - name: SYSLIB0003 + href: ../../fundamentals/syslib-diagnostics/syslib0003.md + - name: SYSLIB0004 + href: ../../fundamentals/syslib-diagnostics/syslib0004.md + - name: SYSLIB0005 + href: ../../fundamentals/syslib-diagnostics/syslib0005.md + - name: SYSLIB0006 + href: ../../fundamentals/syslib-diagnostics/syslib0006.md + - name: SYSLIB0007 + href: ../../fundamentals/syslib-diagnostics/syslib0007.md + - name: SYSLIB0008 + href: ../../fundamentals/syslib-diagnostics/syslib0008.md + - name: SYSLIB0009 + href: ../../fundamentals/syslib-diagnostics/syslib0009.md + - name: SYSLIB0010 + href: ../../fundamentals/syslib-diagnostics/syslib0010.md + - name: SYSLIB0011 + href: ../../fundamentals/syslib-diagnostics/syslib0011.md + - name: SYSLIB0012 + href: ../../fundamentals/syslib-diagnostics/syslib0012.md + - name: SYSLIB0013 + href: ../../fundamentals/syslib-diagnostics/syslib0013.md + - name: SYSLIB0014 + href: ../../fundamentals/syslib-diagnostics/syslib0014.md + - name: SYSLIB0015 + href: ../../fundamentals/syslib-diagnostics/syslib0015.md + - name: SYSLIB0016 + href: ../../fundamentals/syslib-diagnostics/syslib0016.md + - name: SYSLIB0017 + href: ../../fundamentals/syslib-diagnostics/syslib0017.md + - name: SYSLIB0018 + href: ../../fundamentals/syslib-diagnostics/syslib0018.md + - name: SYSLIB0019 + href: ../../fundamentals/syslib-diagnostics/syslib0019.md + - name: SYSLIB0020 + href: ../../fundamentals/syslib-diagnostics/syslib0020.md + - name: SYSLIB0021 + href: ../../fundamentals/syslib-diagnostics/syslib0021.md + - name: SYSLIB0022 + href: ../../fundamentals/syslib-diagnostics/syslib0022.md + - name: SYSLIB0023 + href: ../../fundamentals/syslib-diagnostics/syslib0023.md + - name: SYSLIB0024 + href: ../../fundamentals/syslib-diagnostics/syslib0024.md + - name: SYSLIB0025 + href: ../../fundamentals/syslib-diagnostics/syslib0025.md + - name: SYSLIB0026 + href: ../../fundamentals/syslib-diagnostics/syslib0026.md + - name: SYSLIB0027 + href: ../../fundamentals/syslib-diagnostics/syslib0027.md + - name: SYSLIB0028 + href: ../../fundamentals/syslib-diagnostics/syslib0028.md + - name: SYSLIB0029 + href: ../../fundamentals/syslib-diagnostics/syslib0029.md + - name: SYSLIB0030 + href: ../../fundamentals/syslib-diagnostics/syslib0030.md + - name: SYSLIB0031 + href: ../../fundamentals/syslib-diagnostics/syslib0031.md + - name: SYSLIB0032 + href: ../../fundamentals/syslib-diagnostics/syslib0032.md + - name: SYSLIB0033 + href: ../../fundamentals/syslib-diagnostics/syslib0033.md + - name: SYSLIB0034 + href: ../../fundamentals/syslib-diagnostics/syslib0034.md + - name: SYSLIB0035 + href: ../../fundamentals/syslib-diagnostics/syslib0035.md + - name: SYSLIB0036 + href: ../../fundamentals/syslib-diagnostics/syslib0036.md + - name: SYSLIB0037 + href: ../../fundamentals/syslib-diagnostics/syslib0037.md + - name: SYSLIB0038 + href: ../../fundamentals/syslib-diagnostics/syslib0038.md + - name: SYSLIB0039 + href: ../../fundamentals/syslib-diagnostics/syslib0039.md + - name: SYSLIB0040 + href: ../../fundamentals/syslib-diagnostics/syslib0040.md + - name: SYSLIB0041 + href: ../../fundamentals/syslib-diagnostics/syslib0041.md + - name: SYSLIB0042 + href: ../../fundamentals/syslib-diagnostics/syslib0042.md + - name: SYSLIB0043 + href: ../../fundamentals/syslib-diagnostics/syslib0043.md + - name: SYSLIB0044 + href: ../../fundamentals/syslib-diagnostics/syslib0044.md + - name: SYSLIB0045 + href: ../../fundamentals/syslib-diagnostics/syslib0045.md + - name: SYSLIB0046 + href: ../../fundamentals/syslib-diagnostics/syslib0046.md + - name: SYSLIB0047 + href: ../../fundamentals/syslib-diagnostics/syslib0047.md + - name: SYSLIB0048 + href: ../../fundamentals/syslib-diagnostics/syslib0048.md + - name: Source-generated code + items: + - name: Overview + displayName: syslib, diagnostic, diagnostics, source generator + href: ../../fundamentals/syslib-diagnostics/source-generator-overview.md + - name: SYSLIB1001 + href: ../../fundamentals/syslib-diagnostics/syslib1001.md + - name: SYSLIB1002 + href: ../../fundamentals/syslib-diagnostics/syslib1002.md + - name: SYSLIB1003 + href: ../../fundamentals/syslib-diagnostics/syslib1003.md + - name: SYSLIB1005 + href: ../../fundamentals/syslib-diagnostics/syslib1005.md + - name: SYSLIB1006 + href: ../../fundamentals/syslib-diagnostics/syslib1006.md + - name: SYSLIB1007 + href: ../../fundamentals/syslib-diagnostics/syslib1007.md + - name: SYSLIB1008 + href: ../../fundamentals/syslib-diagnostics/syslib1008.md + - name: SYSLIB1009 + href: ../../fundamentals/syslib-diagnostics/syslib1009.md + - name: SYSLIB1010 + href: ../../fundamentals/syslib-diagnostics/syslib1010.md + - name: SYSLIB1011 + href: ../../fundamentals/syslib-diagnostics/syslib1011.md + - name: SYSLIB1012 + href: ../../fundamentals/syslib-diagnostics/syslib1012.md + - name: SYSLIB1013 + href: ../../fundamentals/syslib-diagnostics/syslib1013.md + - name: SYSLIB1014 + href: ../../fundamentals/syslib-diagnostics/syslib1014.md + - name: SYSLIB1015 + href: ../../fundamentals/syslib-diagnostics/syslib1015.md + - name: SYSLIB1016 + href: ../../fundamentals/syslib-diagnostics/syslib1016.md + - name: SYSLIB1017 + href: ../../fundamentals/syslib-diagnostics/syslib1017.md + - name: SYSLIB1018 + href: ../../fundamentals/syslib-diagnostics/syslib1018.md + - name: SYSLIB1019 + href: ../../fundamentals/syslib-diagnostics/syslib1019.md + - name: SYSLIB1020 + href: ../../fundamentals/syslib-diagnostics/syslib1020.md + - name: SYSLIB1021 + href: ../../fundamentals/syslib-diagnostics/syslib1021.md + - name: SYSLIB1022 + href: ../../fundamentals/syslib-diagnostics/syslib1022.md + - name: SYSLIB1023 + href: ../../fundamentals/syslib-diagnostics/syslib1023.md + - name: SYSLIB1030 + href: ../../fundamentals/syslib-diagnostics/syslib1030.md + - name: SYSLIB1031 + href: ../../fundamentals/syslib-diagnostics/syslib1031.md + - name: SYSLIB1032 + href: ../../fundamentals/syslib-diagnostics/syslib1032.md + - name: SYSLIB1033 + href: ../../fundamentals/syslib-diagnostics/syslib1033.md + - name: SYSLIB1035 + href: ../../fundamentals/syslib-diagnostics/syslib1035.md + - name: SYSLIB1036 + href: ../../fundamentals/syslib-diagnostics/syslib1036.md + - name: SYSLIB1037 + href: ../../fundamentals/syslib-diagnostics/syslib1037.md + - name: SYSLIB1038 + href: ../../fundamentals/syslib-diagnostics/syslib1038.md + - name: SYSLIB1040 + href: ../../fundamentals/syslib-diagnostics/syslib1040-1049.md + - name: SYSLIB1041 + href: ../../fundamentals/syslib-diagnostics/syslib1040-1049.md + - name: SYSLIB1042 + href: ../../fundamentals/syslib-diagnostics/syslib1040-1049.md + - name: SYSLIB1043 + href: ../../fundamentals/syslib-diagnostics/syslib1040-1049.md + - name: SYSLIB1044 + href: ../../fundamentals/syslib-diagnostics/syslib1040-1049.md + - name: SYSLIB1045 + href: ../../fundamentals/syslib-diagnostics/syslib1040-1049.md + - name: SYSLIB1050 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1051 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1052 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1053 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1054 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1055 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1056 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1057 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1058 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1059 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1060 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1061 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1062 + href: ../../fundamentals/syslib-diagnostics/syslib1050-1069.md + - name: SYSLIB1070 + href: ../../fundamentals/syslib-diagnostics/syslib1070-1089.md + - name: SYSLIB1071 + href: ../../fundamentals/syslib-diagnostics/syslib1070-1089.md + - name: SYSLIB1072 + href: ../../fundamentals/syslib-diagnostics/syslib1070-1089.md + - name: SYSLIB1073 + href: ../../fundamentals/syslib-diagnostics/syslib1070-1089.md + - name: SYSLIB1074 + href: ../../fundamentals/syslib-diagnostics/syslib1070-1089.md + - name: SYSLIB1075 + href: ../../fundamentals/syslib-diagnostics/syslib1070-1089.md + - name: Package validation + items: + - name: Get started + displayName: package validation + href: ../../fundamentals/package-validation/overview.md + - name: Baseline package validator + href: ../../fundamentals/package-validation/baseline-version-validator.md + - name: Compatible framework in package validator + href: ../../fundamentals/package-validation/compatible-framework-in-package-validator.md + - name: Compatible framework validator + href: ../../fundamentals/package-validation/compatible-framework-validator.md + - name: Diagnostic IDs + href: ../../fundamentals/package-validation/diagnostic-ids.md diff --git a/docs/orleans/deployment/deploy-to-azure-app-service.md b/docs/orleans/deployment/deploy-to-azure-app-service.md index 09288ccc9b74e..a937869e56ea6 100644 --- a/docs/orleans/deployment/deploy-to-azure-app-service.md +++ b/docs/orleans/deployment/deploy-to-azure-app-service.md @@ -1,8 +1,10 @@ --- title: Deploy Orleans to Azure App Service description: Learn how to deploy an Orleans shopping cart app to Azure App Service. -ms.date: 05/02/2022 +ms.date: 04/05/2023 ms.topic: tutorial +ms.custom: devx-track-bicep +no-loc: --- # Deploy Orleans to Azure App Service @@ -29,7 +31,7 @@ In this tutorial, you learn how to: - A [GitHub account](https://github.com/join) - [Read an introduction to Orleans](../overview.md) -- The [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet) +- The [.NET 7 SDK](https://dotnet.microsoft.com/download/dotnet) - The [Azure CLI](/cli/azure/install-azure-cli) - A .NET integrated development environment (IDE) - Feel free to use [Visual Studio](https://visualstudio.microsoft.com) or [Visual Studio Code](https://code.visualstudio.com) @@ -156,10 +158,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup .NET 6.0 + - name: Setup .NET 7.0 uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: .NET publish shopping cart app run: dotnet publish ./Silo/Orleans.ShoppingCart.Silo.csproj --configuration Release @@ -184,6 +186,14 @@ jobs: --resource-group ${{ env.AZURE_RESOURCE_GROUP_NAME }} \ --clean true --restart true \ --type zip --src-path silo.zip --debug + + - name: Staging deploy + run: | + az webapp deploy --name ${{ env.UNIQUE_APP_NAME }} \ + --slot ${{ env.UNIQUE_APP_NAME }}stg \ + --resource-group ${{ env.AZURE_RESOURCE_GROUP_NAME }} \ + --clean true --restart true \ + --type zip --src-path silo.zip --debug ``` The preceding GitHub workflow will: @@ -192,6 +202,7 @@ The preceding GitHub workflow will: - Login to Azure using the credentials from the [Create a service principal](#create-a-service-principal) step. - Evaluate the _main.bicep_ file and start a deployment group using [az deployment group create](/cli/azure/deployment/group#az-deployment-group-create). - Deploy the _silo.zip_ file to Azure App Service using [az webapp deploy](/cli/azure/webapp#az-webapp-deploy). + - An additional deployment to staging is also configured. The workflow is triggered by a push to the _main_ branch. For more information, see [GitHub Actions and .NET](../../devops/github-actions-overview.md). @@ -252,7 +263,8 @@ resource vnet 'Microsoft.Network/virtualNetworks@2021-05-01' = { properties: { addressSpace: { addressPrefixes: [ - '172.17.0.0/16' + '172.17.0.0/16', + '192.168.0.0/16' ] } subnets: [ @@ -270,6 +282,20 @@ resource vnet 'Microsoft.Network/virtualNetworks@2021-05-01' = { ] } } + { + name: 'staging' + properties: { + addressPrefix: '192.168.0.0/24' + delegations: [ + { + name: 'delegation' + properties: { + serviceName: 'Microsoft.Web/serverFarms' + } + } + ] + } + } ] } } @@ -280,6 +306,7 @@ module siloModule 'app-service.bicep' = { appName: appName location: location vnetSubnetId: vnet.properties.subnets[0].id + stagingSubnetId: vnet.properties.subnets[1].id appInsightsConnectionString: logsModule.outputs.appInsightsConnectionString appInsightsInstrumentationKey: logsModule.outputs.appInsightsInstrumentationKey storageConnectionString: storageModule.outputs.connectionString @@ -365,6 +392,7 @@ Finally, the _app-service.bicep_ file defines the Azure App Service resource: param appName string param location string param vnetSubnetId string +param stagingSubnetId string param appInsightsInstrumentationKey string param appInsightsConnectionString string param storageConnectionString string @@ -404,29 +432,85 @@ resource appService 'Microsoft.Web/sites@2021-03-01' = { name: 'ORLEANS_AZURE_STORAGE_CONNECTION_STRING' value: storageConnectionString } + { + name: 'ORLEANS_CLUSTER_ID' + value: 'Default' + } + ] + alwaysOn: true + } + } +} + +resource stagingSlot 'Microsoft.Web/sites/slots@2022-03-01' = { + name: '${appName}stg' + location: location + properties: { + serverFarmId: appServicePlan.id + virtualNetworkSubnetId: stagingSubnetId + siteConfig: { + http20Enabled: true + vnetPrivatePortsCount: 2 + webSocketsEnabled: true + netFrameworkVersion: 'v7.0' + appSettings: [ + { + name: 'APPINSIGHTS_INSTRUMENTATIONKEY' + value: appInsightsInstrumentationKey + } + { + name: 'APPLICATIONINSIGHTS_CONNECTION_STRING' + value: appInsightsConnectionString + } + { + name: 'ORLEANS_AZURE_STORAGE_CONNECTION_STRING' + value: storageConnectionString + } + { + name: 'ORLEANS_CLUSTER_ID' + value: 'Staging' + } ] alwaysOn: true } } } +resource slotConfig 'Microsoft.Web/sites/config@2021-03-01' = { + name: 'slotConfigNames' + parent: appService + properties: { + appSettingNames: [ + 'ORLEANS_CLUSTER_ID' + ] + } +} + resource appServiceConfig 'Microsoft.Web/sites/config@2021-03-01' = { - name: '${appService.name}/metadata' + parent: appService + name: 'metadata' properties: { CURRENT_STACK: 'dotnet' } } ``` -This bicep file configures the Azure App Service as a .NET 6 application. Both the `appServicePlan` resource and the `appService` resource are provisioned in the resource group's location. The `appService` resource is configured to use the `S1` SKU, with a capacity of `1`. Additionally, the resource is configured to use the `vnetSubnetId` subnet and to use HTTPS. It also configures the `appInsightsInstrumentationKey` instrumentation key, the `appInsightsConnectionString` connection string, and the `storageConnectionString` connection string. These are used by the shopping cart app. +This bicep file configures the Azure App Service as a .NET 7 application. Both the `appServicePlan` resource and the `appService` resource are provisioned in the resource group's location. The `appService` resource is configured to use the `S1` SKU, with a capacity of `1`. Additionally, the resource is configured to use the `vnetSubnetId` subnet and to use HTTPS. It also configures the `appInsightsInstrumentationKey` instrumentation key, the `appInsightsConnectionString` connection string, and the `storageConnectionString` connection string. These are used by the shopping cart app. The aforementioned Visual Studio Code extension for Bicep includes a visualizer. All of these bicep files are visualized as follows: :::image type="content" source="media/shopping-cart-flexing.png" alt-text="Orleans: Shopping cart sample app bicep provisioning visualizer rendering." lightbox="media/shopping-cart-flexing.png"::: +### Staging environments + +The deployment infrastructure can deploy to staging environments, which are short-lived, test-centric, and immutable throwaway environments. These environments are very helpful for testing deployments before promoting them to production. + +> [!NOTE] +> If your App Service is running on Windows, each App Service must be on its own separate App Service Plan. Alternatively, to avoid such configuration, you could instead use App Service on Linux, and this problem would be resolved. + ## Summary -As you update the source code and `push` changes to the `main` branch of the repository, the _deploy.yml_ workflow will run. It will provision the resources defined in the bicep files and deploy the application. The application can be expanded upon to include new features, such as authentication, or to support multiple instances of the application. The primary objective of this workflow is to demonstrate the ability to provision and deploy resources in a single step. +As you update the source code and `push` changes to the `main` branch of the repository, the _deploy.yml_ workflow will run. It will provide the resources defined in the bicep files and deploy the application. The application can be expanded upon to include new features, such as authentication, or to support multiple instances of the application. The primary objective of this workflow is to demonstrate the ability to provision and deploy resources in a single step. In addition to the visualizer from the bicep extension, the Azure portal resource group page would look similar to the following example after provisioning and deploying the application: diff --git a/docs/orleans/deployment/deploy-to-azure-container-apps.md b/docs/orleans/deployment/deploy-to-azure-container-apps.md index 3f7e8aafa40fb..f2a2a371c996e 100644 --- a/docs/orleans/deployment/deploy-to-azure-container-apps.md +++ b/docs/orleans/deployment/deploy-to-azure-container-apps.md @@ -3,6 +3,7 @@ title: Deploy Orleans to Azure Container Apps description: Learn how to deploy an updated Orleans shopping cart app to Azure Container Apps. ms.date: 07/25/2022 ms.topic: tutorial +ms.custom: devx-track-bicep --- # Deploy Orleans to Azure Container Apps diff --git a/docs/orleans/deployment/kubernetes.md b/docs/orleans/deployment/kubernetes.md index 197856db274ca..2a7d77baec8ad 100644 --- a/docs/orleans/deployment/kubernetes.md +++ b/docs/orleans/deployment/kubernetes.md @@ -121,7 +121,7 @@ metadata: rules: - apiGroups: [ "" ] resources: ["pods"] - verbs: ["get", "watch", "list"] + verbs: ["get", "watch", "list", "delete"] --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 diff --git a/docs/orleans/deployment/media/shopping-cart-container-app-bicep-visualizer.png b/docs/orleans/deployment/media/shopping-cart-container-app-bicep-visualizer.png index 4f83ccd6bc26b..24426819c88a5 100644 Binary files a/docs/orleans/deployment/media/shopping-cart-container-app-bicep-visualizer.png and b/docs/orleans/deployment/media/shopping-cart-container-app-bicep-visualizer.png differ diff --git a/docs/orleans/deployment/media/shopping-cart-flexing.png b/docs/orleans/deployment/media/shopping-cart-flexing.png index ae946a6a6f4ef..31969da92a999 100644 Binary files a/docs/orleans/deployment/media/shopping-cart-flexing.png and b/docs/orleans/deployment/media/shopping-cart-flexing.png differ diff --git a/docs/orleans/deployment/snippets/service-fabric/app/Orleans.ServiceFabric.App.sfproj b/docs/orleans/deployment/snippets/service-fabric/app/Orleans.ServiceFabric.App.sfproj index 7f81ff08ec43a..1d5c284ea17b2 100644 --- a/docs/orleans/deployment/snippets/service-fabric/app/Orleans.ServiceFabric.App.sfproj +++ b/docs/orleans/deployment/snippets/service-fabric/app/Orleans.ServiceFabric.App.sfproj @@ -44,4 +44,4 @@ <Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.7.6\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.7.6\build\Microsoft.VisualStudio.Azure.Fabric.Application.props' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." /> <Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.7.6\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.7.6\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." /> </Target> -</Project> +</Project> \ No newline at end of file diff --git a/docs/orleans/deployment/snippets/service-fabric/service-fabric.sln b/docs/orleans/deployment/snippets/service-fabric/service-fabric.sln new file mode 100644 index 0000000000000..748bc8f9c7fbf --- /dev/null +++ b/docs/orleans/deployment/snippets/service-fabric/service-fabric.sln @@ -0,0 +1,45 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33122.133 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{A07B5EB6-E848-4116-A8D0-A826331D98C6}") = "Orleans.ServiceFabric.App", "app\Orleans.ServiceFabric.App.sfproj", "{B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Orleans.ServiceFabric.Stateless", "stateless\Orleans.ServiceFabric.Stateless.csproj", "{BC512B9F-CA72-424E-8F20-4E2EF5DC9C55}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Debug|Any CPU.ActiveCfg = Debug|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Debug|Any CPU.Build.0 = Debug|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Debug|Any CPU.Deploy.0 = Debug|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Debug|x64.ActiveCfg = Debug|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Debug|x64.Build.0 = Debug|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Debug|x64.Deploy.0 = Debug|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Release|Any CPU.ActiveCfg = Release|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Release|Any CPU.Build.0 = Release|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Release|Any CPU.Deploy.0 = Release|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Release|x64.ActiveCfg = Release|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Release|x64.Build.0 = Release|x64 + {B9EB4AF8-EBC8-4F3B-88A9-2DAF0C613DA1}.Release|x64.Deploy.0 = Release|x64 + {BC512B9F-CA72-424E-8F20-4E2EF5DC9C55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC512B9F-CA72-424E-8F20-4E2EF5DC9C55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC512B9F-CA72-424E-8F20-4E2EF5DC9C55}.Debug|x64.ActiveCfg = Debug|Any CPU + {BC512B9F-CA72-424E-8F20-4E2EF5DC9C55}.Debug|x64.Build.0 = Debug|Any CPU + {BC512B9F-CA72-424E-8F20-4E2EF5DC9C55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC512B9F-CA72-424E-8F20-4E2EF5DC9C55}.Release|Any CPU.Build.0 = Release|Any CPU + {BC512B9F-CA72-424E-8F20-4E2EF5DC9C55}.Release|x64.ActiveCfg = Release|Any CPU + {BC512B9F-CA72-424E-8F20-4E2EF5DC9C55}.Release|x64.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9A69CE07-3374-4727-82EC-104F5EDA1772} + EndGlobalSection +EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/snippets.5000.json b/docs/orleans/deployment/snippets/service-fabric/snippets.5000.json similarity index 100% rename from samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/snippets.5000.json rename to docs/orleans/deployment/snippets/service-fabric/snippets.5000.json diff --git a/docs/orleans/deployment/snippets/service-fabric/stateless/Orleans.ServiceFabric.Stateless.csproj b/docs/orleans/deployment/snippets/service-fabric/stateless/Orleans.ServiceFabric.Stateless.csproj index 2e7f50a3029b5..2a72adf9888e6 100644 --- a/docs/orleans/deployment/snippets/service-fabric/stateless/Orleans.ServiceFabric.Stateless.csproj +++ b/docs/orleans/deployment/snippets/service-fabric/stateless/Orleans.ServiceFabric.Stateless.csproj @@ -13,9 +13,9 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.ServiceFabric.Services" Version="6.0.1028" /> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Server" Version="7.0.0" /> + <PackageReference Include="Microsoft.ServiceFabric.Services" Version="6.1.1583" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> + <PackageReference Include="Microsoft.Orleans.Server" Version="7.1.1" /> </ItemGroup> </Project> diff --git a/docs/orleans/grains/grain-lifecycle.md b/docs/orleans/grains/grain-lifecycle.md index 6b41d4d9b2105..9b6898d4cb2e1 100644 --- a/docs/orleans/grains/grain-lifecycle.md +++ b/docs/orleans/grains/grain-lifecycle.md @@ -1,7 +1,8 @@ --- title: Grain lifecycle overview description: Learn about grain lifecycles in .NET Orleans. -ms.date: 03/16/2022 +ms.date: 02/13/2023 +zone_pivot_groups: orleans-version --- # Grain lifecycle overview @@ -22,10 +23,10 @@ public static class GrainLifecycleStage } ``` -- `First` - First stage in grain's lifecycle -- `SetupState` – Setup grain state, prior to activation. For stateful grains, this is the stage where state is loaded from storage. -- `Activate` – Stage where <xref:Orleans.Grain.OnActivateAsync%2A?displayProperty=nameWithType> and <xref:Orleans.Grain.OnDeactivateAsync%2A?displayProperty=nameWithType> are called -- `Last` - Last stage in grain's lifecycle +- `First`: First stage in a grain's lifecycle. +- `SetupState`: Setup grain state, before activation. For stateful grains, this is the stage where <xref:Orleans.Core.IStorage%601.State?displayProperty=nameWithType> is loaded from storage, when <xref:Orleans.Core.IStorage.RecordExists?displayProperty=nameWithType> is `true`. +- `Activate`: Stage where <xref:Orleans.Grain.OnActivateAsync%2A?displayProperty=nameWithType> and <xref:Orleans.Grain.OnDeactivateAsync%2A?displayProperty=nameWithType> are called. +- `Last`: Last stage in a grain's lifecycle. While the grain lifecycle will be used during grain activation, since grains are not always deactivated during some error cases (such as silo crashes), applications should not rely on the grain lifecycle always being executed during grain deactivations. @@ -33,8 +34,23 @@ While the grain lifecycle will be used during grain activation, since grains are Application logic can participate with a grain's lifecycle in two ways: -1. The grain can participate in its lifecycle (and/or) -1. Components can access the lifecycle via the grain activation context (see <xref:Orleans.Runtime.IGrainActivationContext.ObservableLifecycle%2A?displayProperty=nameWithType>). +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +- The grain can participate in its lifecycle. +- Components can access the lifecycle via the grain activation context (see <xref:Orleans.Runtime.IGrainContext.ObservableLifecycle?displayProperty=nameWithType>). + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + +- The grain can participate in its lifecycle. +- Components can access the lifecycle via the grain activation context (see <xref:Orleans.Runtime.IGrainActivationContext.ObservableLifecycle%2A?displayProperty=nameWithType>). + +:::zone-end A grain always participates in its lifecycle, so application logic can be introduced by overriding the participate method. @@ -53,11 +69,57 @@ public override void Participate(IGrainLifecycle lifecycle) In the above example, <xref:Orleans.Grain%601> overrides the <xref:Orleans.Grain.Participate%2A?displayProperty=nameWithType> method to tell the lifecycle to call its `OnSetupState` method during the <xref:Orleans.Runtime.GrainLifecycleStage.SetupState?displayProperty=nameWithType> stage of the lifecycle. -Components created during a grain's construction can take part in the lifecycle as well, without any special grain logic being added. Since the grain's activation context (<xref:Orleans.Runtime.IGrainActivationContext>), including the grain's lifecycle (<xref:Orleans.Runtime.IGrainActivationContext.ObservableLifecycle?displayProperty=nameWithType>), is created before the grain is created, any component injected into the grain by the container can participate in the grain's lifecycle. +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +Components created during a grain's construction can take part in the lifecycle as well, without the addition of any special grain logic. Since the grain's context (<xref:Orleans.Runtime.IGrainContext>), including the grain's lifecycle (<xref:Orleans.Runtime.IGrainContext.ObservableLifecycle?displayProperty=nameWithType>), is created before the grain is created, any component injected into the grain by the container can participate in the grain's lifecycle. + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + +Components created during a grain's construction can take part in the lifecycle as well, without the addition of any special grain logic. Since the grain's activation context (<xref:Orleans.Runtime.IGrainActivationContext>), including the grain's lifecycle (<xref:Orleans.Runtime.IGrainActivationContext.ObservableLifecycle?displayProperty=nameWithType>), is created before the grain is created, any component injected into the grain by the container can participate in the grain's lifecycle. + +:::zone-end ### Example participation, creation, and activation -The below component participates in the grain's lifecycle when created using its factory function `Create(...)`. This logic could exist in the component's constructor, but that risks the component being added to the lifecycle before it's fully constructed, which may not be safe. +The following component participates in the grain's lifecycle when created using its factory function `Create(...)`. This logic could exist in the component's constructor, but that risks the component being added to the lifecycle before it's fully constructed, which may not be safe. + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +```csharp +public class MyComponent : ILifecycleParticipant<IGrainLifecycle> +{ + public static MyComponent Create(IGrainContext context) + { + var component = new MyComponent(); + component.Participate(context.ObservableLifecycle); + return component; + } + + public void Participate(IGrainLifecycle lifecycle) + { + lifecycle.Subscribe<MyComponent>(GrainLifecycleStage.Activate, OnActivate); + } + + private Task OnActivate(CancellationToken ct) + { + // Do stuff + } +} +``` + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> ```csharp public class MyComponent : ILifecycleParticipant<IGrainLifecycle> @@ -81,15 +143,34 @@ public class MyComponent : ILifecycleParticipant<IGrainLifecycle> } ``` -By registering the above component in the service container using its `Create(...)` factory function, any grain constructed with the component as a dependency will have the component taking part in its lifecycle without any special logic in the grain. +:::zone-end + +By registering the example component in the service container using its `Create(...)` factory function, any grain constructed with the component as a dependency will have the component taking part in its lifecycle without any special logic in the grain. #### Register component in container +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +```csharp +services.AddTransient<MyComponent>(sp => + MyComponent.Create(sp.GetRequiredService<IGrainContext>()); +``` + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + ```csharp services.AddTransient<MyComponent>(sp => MyComponent.Create(sp.GetRequiredService<IGrainActivationContext>()); ``` +:::zone-end + #### Grain with component as a dependency ```csharp diff --git a/docs/orleans/grains/grain-persistence/azure-storage.md b/docs/orleans/grains/grain-persistence/azure-storage.md index 2c7836556234f..bd8724a30caf3 100644 --- a/docs/orleans/grains/grain-persistence/azure-storage.md +++ b/docs/orleans/grains/grain-persistence/azure-storage.md @@ -1,7 +1,7 @@ --- title: Azure Storage grain persistence description: Learn about Azure Storage grain persistence in .NET Orleans. -ms.date: 03/15/2022 +ms.date: 02/08/2023 --- # Azure Storage grain persistence @@ -19,7 +19,6 @@ siloBuilder.AddAzureTableGrainStorage( name: "profileStore", configureOptions: options => { - options.UseJson = true; options.ConfigureTableServiceClient( "DefaultEndpointsProtocol=https;AccountName=data1;AccountKey=SOMETHING1"); }); @@ -36,7 +35,6 @@ siloBuilder.AddAzureBlobGrainStorage( name: "profileStore", configureOptions: options => { - options.UseJson = true; options.ConfigureBlobServiceClient( "DefaultEndpointsProtocol=https;AccountName=data1;AccountKey=SOMETHING1"); }); diff --git a/docs/orleans/grains/grain-persistence/index.md b/docs/orleans/grains/grain-persistence/index.md index 1a50042e59805..4909474138782 100644 --- a/docs/orleans/grains/grain-persistence/index.md +++ b/docs/orleans/grains/grain-persistence/index.md @@ -1,7 +1,7 @@ --- title: Grain persistence description: Learn about persistence in .NET Orleans. -ms.date: 12/09/2022 +ms.date: 02/13/2023 zone_pivot_groups: orleans-version --- @@ -246,7 +246,7 @@ public class UserGrain : Grain, IUserGrain } ``` -> [!NOTE] +> [!IMPORTANT] > The profile state will not be loaded at the time it is injected into the constructor, so accessing it is invalid at that time. The state will be loaded before <xref:Orleans.Grain.OnActivateAsync%2A> is called. Now that the grain has a persistent state, we can add methods to read and write the state: diff --git a/docs/orleans/grains/grain-persistence/media/reentrancy-scheduling-diagram-02.png b/docs/orleans/grains/grain-persistence/media/reentrancy-scheduling-diagram-02.png index 61af77361eab2..bbc7a827b546a 100644 Binary files a/docs/orleans/grains/grain-persistence/media/reentrancy-scheduling-diagram-02.png and b/docs/orleans/grains/grain-persistence/media/reentrancy-scheduling-diagram-02.png differ diff --git a/docs/orleans/grains/grain-placement.md b/docs/orleans/grains/grain-placement.md index 97539c6cf3c75..a17649e19e148 100644 --- a/docs/orleans/grains/grain-placement.md +++ b/docs/orleans/grains/grain-placement.md @@ -1,12 +1,12 @@ --- title: Grain placement description: Learn about grain placements in .NET Orleans. -ms.date: 03/16/2022 +ms.date: 02/23/2023 --- # Grain placement -Orleans ensures that when a grain call is made there is an instance of that grain available in memory on some server in the cluster to handle the request. If the grain is not currently active in the cluster, Orleans picks one of the servers to activate the grain on. This is called grain placement. Placement is also one way that load is balanced: even placement of busy grains helps to even the workload across the cluster. +Orleans ensures that when a grain call is made there is an instance of that grain available in memory on some server in the cluster to handle the request. If the grain is not currently active in the cluster, Orleans picks one of the servers to activate the grain on. This is called _grain placement_. Placement is also one way that load is balanced: even placement of busy grains helps to even the workload across the cluster. The placement process in Orleans is fully configurable: developers can choose from a set of out-of-the-box placement policies such as random, prefer-local, and load-based, or custom logic can be configured. This allows for full flexibility in deciding where grains are created. For example, grains can be placed on a server close to resources which they need to operate on or close to other grains with which they communicate. By default, Orleans will pick a random compatible server. @@ -14,7 +14,7 @@ The placement strategy which Orleans uses can be configured globally or per-grai ## Random placement -A server is randomly selected from the set of compatible servers. This placement strategy is configured by adding the <xref:Orleans.Placement.RandomPlacementAttribute> to a grain. +A server is randomly selected from the compatible servers in the cluster. This placement strategy is configured by adding the <xref:Orleans.Placement.RandomPlacementAttribute> to a grain. ## Local placement @@ -36,10 +36,31 @@ This placement strategy is configured by adding the <xref:Orleans.Placement.Acti ## Stateless worker placement -This is a special placement strategy used by [*stateless worker* grains](../grains/stateless-worker-grains.md). This operates almost identically to `PreferLocalPlacement` except that each server can have multiple activations of the same grain and the grain is not registered in the grain directory since there is no need. +Stateless worker placement is a special placement strategy used by [*stateless worker* grains](../grains/stateless-worker-grains.md). This placement operates almost identically to <xref:Orleans.Runtime.PreferLocalPlacement> except that each server can have multiple activations of the same grain and the grain is not registered in the grain directory since there's no need. This placement strategy is configured by adding the <xref:Orleans.Concurrency.StatelessWorkerAttribute> to a grain. +## Silo-role based placement + +A deterministic placement strategy that places grains on silos with a specific role. This placement strategy is configured by adding the <xref:Orleans.Placement.SiloRoleBasedPlacementAttribute> to a grain. + +## Choose a placement strategy + +Choosing the appropriate grain placement strategy, beyond the defaults that Orleans provides, requires monitoring and developer evaluation. The choice of placement strategy should be based on the size and complexity of the app, workload characteristics, and deployment environment. + +Random placement relies on the [Law of Large Numbers](https://en.wikipedia.org/wiki/Law_of_large_numbers), so it's usually a good default when there is an unpredictable load spread across a large number of grains (10,000 plus). + +Activation-count-based placement also has a random element to it, relying on the Power of Two Choices principle, which is a commonly used algorithm for distributed load balancing and is used in popular load balancers. Silos frequently publish run-time statistics to other silos in the cluster, including: + +- Available memory, total physical memory, and memory usage. +- CPU usage. +- Total activation count and recent active activation count. + - A sliding window of activations that were active in the last few seconds, sometimes referred to as the activation working set. + +From these statistics, only the activation counts are currently used to determine the load on a given silo. + +Ultimately, you should experiment with different strategies and monitor performance metrics to determine the best fit. By selecting the right grain placement strategy, you can optimize the performance, scalability, and cost-effectiveness of your Orleans apps. + ## Configure the default placement strategy Orleans will use random placement unless the default is overridden. The default placement strategy can be overridden by registering an implementation of <xref:Orleans.Runtime.PlacementStrategy> during configuration: @@ -49,7 +70,7 @@ siloBuilder.ConfigureServices(services => services.AddSingleton<PlacementStrategy, MyPlacementStrategy>()); ``` -## Configuring the placement strategy for a grain +## Configure the placement strategy for a grain The placement strategy for a grain type is configured by adding the appropriate attribute on the grain class. The relevant attributes are specified in the [placement strategies](#random-placement) sections. @@ -87,8 +108,8 @@ public sealed class SamplePlacementStrategyAttribute : PlacementAttribute { public SamplePlacementStrategyAttribute() : base(new SamplePlacementStrategy()) - { - } + { + } } ``` @@ -98,7 +119,7 @@ Then just tag any grain classes you want to use this strategy with the attribute [SamplePlacementStrategy] public class MyGrain : Grain, IMyGrain { - ... + // ... } ``` @@ -119,7 +140,6 @@ private static async Task<ISiloHost> StartSilo() return host; } - private static void ConfigureServices(IServiceCollection services) { services.AddSingletonNamedService< diff --git a/docs/orleans/grains/grainservices.md b/docs/orleans/grains/grainservices.md index 6724c09a24828..0301934e26997 100644 --- a/docs/orleans/grains/grainservices.md +++ b/docs/orleans/grains/grainservices.md @@ -28,6 +28,48 @@ A <xref:Orleans.Runtime.GrainService> is a special grain; one that has no stable 1. Create the `DataService` grain service. It's good to know that you can also inject an <xref:Orleans.IGrainFactory> so you can make grain calls from your `GrainService`. + <!-- markdownlint-disable MD044 --> + :::zone target="docs" pivot="orleans-7-0" + <!-- markdownlint-enable MD044 --> + + ```csharp + [Reentrant] + public class DataService : GrainService, IDataService + { + readonly IGrainFactory _grainFactory; + + public DataService( + IServiceProvider services, + GrainId id, + Silo silo, + ILoggerFactory loggerFactory, + IGrainFactory grainFactory) + : base(id, silo, loggerFactory) + { + _grainFactory = grainFactory; + } + + public override Task Init(IServiceProvider serviceProvider) => + base.Init(serviceProvider); + + public override Task Start() => base.Start(); + + public override Task Stop() => base.Stop(); + + public Task MyMethod() + { + // TODO: custom logic here. + return Task.CompletedTask; + } + } + ``` + + :::zone-end + + <!-- markdownlint-disable MD044 --> + :::zone target="docs" pivot="orleans-3-x" + <!-- markdownlint-enable MD044 --> + ```csharp [Reentrant] public class DataService : GrainService, IDataService @@ -60,6 +102,8 @@ A <xref:Orleans.Runtime.GrainService> is a special grain; one that has no stable } ``` + :::zone-end + 1. Create an interface for the <xref:Orleans.Runtime.Services.GrainServiceClient%601>`GrainServiceClient` to be used by other grains to connect to the `GrainService`. ```csharp diff --git a/docs/orleans/grains/index.md b/docs/orleans/grains/index.md index 57287b46c7ecb..e1dc654251fbf 100644 --- a/docs/orleans/grains/index.md +++ b/docs/orleans/grains/index.md @@ -144,7 +144,7 @@ IPlayerGrain player = client.GetGrain<IPlayerGrain>(playerId); ### Grain method invocation -The Orleans programming model is based on [asynchronous programming](../../csharp/async.md). Using the grain reference from the previous example, here's how to perform a grain method invocation: +The Orleans programming model is based on [asynchronous programming](../../csharp/asynchronous-programming/index.md). Using the grain reference from the previous example, here's how to perform a grain method invocation: ```csharp // Invoking a grain method asynchronously diff --git a/docs/orleans/grains/observers.md b/docs/orleans/grains/observers.md index e75446ceadf45..708990d32afe4 100644 --- a/docs/orleans/grains/observers.md +++ b/docs/orleans/grains/observers.md @@ -9,7 +9,7 @@ ms.date: 03/16/2022 There are situations in which a simple message/response pattern is not enough, and the client needs to receive asynchronous notifications. For example, a user might want to be notified when a new instant message has been published by a friend. -Client observers is a mechanism that allows notifying clients asynchronously. An observer is a one-way asynchronous interface that inherits from <xref:Orleans.IGrainObserver>, and all its methods must return `void` or <xref:System.Threading.Tasks.Task>. The grain sends a notification to the observer by invoking it like a grain interface method, except that it has no return value, and so the grain need not depend on the result. The Orleans runtime will ensure one-way delivery of the notifications. A grain that publishes such notifications should provide an API to add or remove observers. In addition, it is usually convenient to expose a method that allows an existing subscription to be cancelled. +Client observers is a mechanism that allows notifying clients asynchronously. Observer interfaces must inherit from <xref:Orleans.IGrainObserver>, and all methods must return either `void`, <xref:System.Threading.Tasks.Task>, <xref:System.Threading.Tasks.Task%601>, <xref:System.Threading.Tasks.ValueTask>, or <xref:System.Threading.Tasks.ValueTask%601>. A return type of `void` is not recommended as it may encourage the use of `async void` on the implementation, which is a dangerous pattern since it can result in application crashes if an exception is thrown from the method. Instead, for best-effort notification scenarios, consider applying the <xref:Orleans.Concurrency.OneWayAttribute> to the observer's interface method. This will cause the receiver to not send a response for the method invocation and will cause the method to return immediately at the call site, without waiting for a response from the observer. A grain calls a method on an observer by invoking it like any grain interface method. The Orleans runtime will ensure the delivery of requests and responses. A common use case for observers is to enlist a client to receive notifications when an event occurs in the Orleans application. A grain that publishes such notifications should provide an API to add or remove observers. In addition, it is usually convenient to expose a method that allows an existing subscription to be cancelled. Grain developers may use a utility class such as <xref:Orleans.Utilities.ObserverManager%601> to simplify development of observed grain types. Unlike grains, which are automatically reactivated as-needed after failure, clients are not fault-tolerant: a client which fails may never recover. For this reason, the `ObserverManager<T>` utility removes subscriptions after a configured duration. Clients which are active should resubscribe on a timer to keep their subscription active. @@ -27,7 +27,7 @@ The interface will look like this ```csharp public interface IChat : IGrainObserver { - void ReceiveMessage(string message); + Task ReceiveMessage(string message); } ``` @@ -40,9 +40,10 @@ The simplest case would be something like this: ```csharp public class Chat : IChat { - public void ReceiveMessage(string message) + public Task ReceiveMessage(string message) { Console.WriteLine(message); + return Task.CompletedTask; } } ``` @@ -61,7 +62,7 @@ class HelloGrain : Grain, IHello { _subsManager = new ObserverManager<IChat>( - TimeSpan.FromMinutes(5), logger, "subs"); + TimeSpan.FromMinutes(5), logger); } // Clients call this to subscribe. diff --git a/docs/orleans/grains/request-context.md b/docs/orleans/grains/request-context.md index 014b9b077eca4..16cc04398221c 100644 --- a/docs/orleans/grains/request-context.md +++ b/docs/orleans/grains/request-context.md @@ -20,7 +20,7 @@ Object Get(string key) The preceding API is used to retrieve a value from the current request context. -The backing storage for `RequestContext` is thread-static. When a thread (whether client-side or within Orleans) sends a request, the contents of the sending thread's `RequestContext` are included with the Orleans message for the request; when the grain code receives the request, that metadata is accessible from the local `RequestContext`. If the grain code does not modify the `RequestContext`, then any grain it requests to will receive the same metadata, and so on. +The backing storage for `RequestContext` is async-local. When a caller (whether client-side or within Orleans) sends a request, the contents of the caller's `RequestContext` are included with the Orleans message for the request; when the grain code receives the request, that metadata is accessible from the local `RequestContext`. If the grain code does not modify the `RequestContext`, then any grain it requests to will receive the same metadata, and so on. Application metadata also is maintained when you schedule a future computation using <xref:System.Threading.Tasks.TaskFactory.StartNew%2A> or <xref:System.Threading.Tasks.Task.ContinueWith%2A>; in both cases, the continuation will execute with the same metadata as the scheduling code had at the moment the computation was scheduled (that is, the system makes a copy of the current metadata and passes it to the continuation, so changes after the call to `StartNew` or `ContinueWith` will not be seen by the continuation). diff --git a/docs/orleans/grains/snippets/transactions/Abstractions/Abstractions.csproj b/docs/orleans/grains/snippets/transactions/Abstractions/Abstractions.csproj index 46714099e35de..1a2abeb58be74 100644 --- a/docs/orleans/grains/snippets/transactions/Abstractions/Abstractions.csproj +++ b/docs/orleans/grains/snippets/transactions/Abstractions/Abstractions.csproj @@ -7,9 +7,9 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Orleans.Core.Abstractions" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Transactions" Version="7.0.0" /> + <PackageReference Include="Microsoft.Orleans.Core.Abstractions" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.Transactions" Version="7.1.1" /> </ItemGroup> </Project> diff --git a/docs/orleans/grains/snippets/transactions/Client/Client.csproj b/docs/orleans/grains/snippets/transactions/Client/Client.csproj index 9bcb773bfad01..b2c007a674657 100644 --- a/docs/orleans/grains/snippets/transactions/Client/Client.csproj +++ b/docs/orleans/grains/snippets/transactions/Client/Client.csproj @@ -8,9 +8,9 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Transactions" Version="7.0.0" /> + <PackageReference Include="Microsoft.Orleans.Transactions" Version="7.1.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/orleans/grains/snippets/transactions/Grains/Grains.csproj b/docs/orleans/grains/snippets/transactions/Grains/Grains.csproj index 9549c95f31f18..104b837e84ae8 100644 --- a/docs/orleans/grains/snippets/transactions/Grains/Grains.csproj +++ b/docs/orleans/grains/snippets/transactions/Grains/Grains.csproj @@ -7,9 +7,9 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Orleans.Core.Abstractions" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Transactions" Version="7.0.0" /> + <PackageReference Include="Microsoft.Orleans.Core.Abstractions" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.Transactions" Version="7.1.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/orleans/grains/snippets/transactions/Server/Server.csproj b/docs/orleans/grains/snippets/transactions/Server/Server.csproj index 196fe10af1047..a13ac748ca610 100644 --- a/docs/orleans/grains/snippets/transactions/Server/Server.csproj +++ b/docs/orleans/grains/snippets/transactions/Server/Server.csproj @@ -8,11 +8,11 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Server" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Transactions" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Transactions.AzureStorage" Version="7.0.0" /> + <PackageReference Include="Microsoft.Orleans.Server" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.Transactions" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.Transactions.AzureStorage" Version="7.1.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/orleans/grains/snippets/transactions/transactions.sln b/docs/orleans/grains/snippets/transactions/transactions.sln new file mode 100644 index 0000000000000..4766099d1a738 --- /dev/null +++ b/docs/orleans/grains/snippets/transactions/transactions.sln @@ -0,0 +1,45 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.32804.182 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abstractions", "Abstractions\Abstractions.csproj", "{80667C15-470B-4997-9354-E229293D68D1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grains", "Grains\Grains.csproj", "{AAAB6D00-3892-4A1D-869F-CA3D8F2C906B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{0FB18D84-837D-4667-B5D2-C9A538FB6AD0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{6436398B-C9B3-46BF-BAA2-2C659C83F4BE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{73B37C61-6323-4A7C-A28F-8DA4FF6B787C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {80667C15-470B-4997-9354-E229293D68D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80667C15-470B-4997-9354-E229293D68D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80667C15-470B-4997-9354-E229293D68D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80667C15-470B-4997-9354-E229293D68D1}.Release|Any CPU.Build.0 = Release|Any CPU + {AAAB6D00-3892-4A1D-869F-CA3D8F2C906B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AAAB6D00-3892-4A1D-869F-CA3D8F2C906B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AAAB6D00-3892-4A1D-869F-CA3D8F2C906B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AAAB6D00-3892-4A1D-869F-CA3D8F2C906B}.Release|Any CPU.Build.0 = Release|Any CPU + {0FB18D84-837D-4667-B5D2-C9A538FB6AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0FB18D84-837D-4667-B5D2-C9A538FB6AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0FB18D84-837D-4667-B5D2-C9A538FB6AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0FB18D84-837D-4667-B5D2-C9A538FB6AD0}.Release|Any CPU.Build.0 = Release|Any CPU + {6436398B-C9B3-46BF-BAA2-2C659C83F4BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6436398B-C9B3-46BF-BAA2-2C659C83F4BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6436398B-C9B3-46BF-BAA2-2C659C83F4BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6436398B-C9B3-46BF-BAA2-2C659C83F4BE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {220FCA18-4F86-4E4D-AA4A-1949FBCE1765} + EndGlobalSection +EndGlobal diff --git a/docs/orleans/host/client.md b/docs/orleans/host/client.md index e4e3c4db7e999..ec6b9e4e7f0db 100644 --- a/docs/orleans/host/client.md +++ b/docs/orleans/host/client.md @@ -1,7 +1,8 @@ --- title: Orleans clients description: Learn how to write .NET Orleans clients. -ms.date: 03/16/2022 +ms.date: 01/13/2023 +zone_pivot_groups: orleans-version --- # Orleans clients @@ -12,7 +13,7 @@ A client allows non-grain code to interact with an Orleans cluster. Clients allo If the client code is hosted in the same process as the grain code, then the client can be directly obtained from the hosting application's dependency injection container. In this case, the client communicates directly with the silo it is attached to and can take advantage of the extra knowledge that the silo has about the cluster. -This provides several benefits, including reducing network and CPU overhead as well as decreasing latency and increasing throughput and reliability. The client utilizes the silo's knowledge of the cluster topology and state and does not need to use a separate gateway. This avoids a network hop and serialization/deserialization round trip. This therefore also increases reliability, since the number of required nodes in between the client and the grain is minimized. If the grain is a [stateless worker grain](../grains/stateless-worker-grains.md) or otherwise happens to be activated on the silo which the client is hosted in, then no serialization or network communication needs to be performed at all and the client can reap the additional performance and reliability gains. Co-hosting client and grain code also simplifies deployment and application topology by eliminating the need for two distinct application binaries to be deployed and monitored. +This provides several benefits, including reducing network and CPU overhead as well as decreasing latency and increasing throughput and reliability. The client utilizes the silo's knowledge of the cluster topology and state and does not need to use a separate gateway. This avoids a network hop and serialization/deserialization round trip. This therefore also increases reliability, since the number of required nodes in between the client and the grain is minimized. If the grain is a [stateless worker grain](../grains/stateless-worker-grains.md) or otherwise happens to be activated on the silo where the client is hosted, then no serialization or network communication needs to be performed at all and the client can reap the additional performance and reliability gains. Co-hosting client and grain code also simplifies deployment and application topology by eliminating the need for two distinct application binaries to be deployed and monitored. There are also detractors to this approach, primarily that the grain code is no longer isolated from the client process. Therefore, issues in client code, such as blocking IO or lock contention causing thread starvation can affect the performance of grain code. Even without code defects like the aforementioned, *noisy neighbor* effects can result simply by having the client code execute on the same processor as grain code, putting additional strain on CPU cache and additional contention for local resources in general. Additionally, identifying the source of these issues is now more difficult because monitoring systems cannot distinguish what is logically client code from grain code. @@ -25,7 +26,19 @@ Despite these detractors, co-hosting client code with grain code is a popular op If hosting using the [.NET Generic Host](../../core/extensions/generic-host.md), the client will be available in the host's [dependency injection](../../core/extensions/dependency-injection.md) container automatically and can be injected into services such as [ASP.NET controllers](/aspnet/core/mvc/controllers/actions) or <xref:Microsoft.Extensions.Hosting.IHostedService> implementations. -Alternatively, a client interface such as <xref:Orleans.IGrainFactory> or <xref:Orleans.IClusterClient> can be obtained from either <xref:Microsoft.Extensions.Hosting.IHost> or <xref:Orleans.Hosting.ISiloHost>: +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + +Alternatively, a client interface such as <xref:Orleans.IGrainFactory> or <xref:Orleans.IClusterClient> can be obtained from <xref:Orleans.Hosting.ISiloHost>: + +:::zone-end ```csharp var client = host.Services.GetService<IClusterClient>(); @@ -35,19 +48,54 @@ await client.GetGrain<IMyGrain>(0).Ping(); ## External clients Client code can run outside of the Orleans cluster where grain code is hosted. Hence, an external client acts as a connector or conduit to the cluster and all grains of the application. Usually, clients are used on the frontend web servers to connect to an Orleans cluster that serves as a middle tier with grains executing business logic. + In a typical setup, a frontend webserver: -* Receives a web request -* Performs necessary authentication and authorization validation -* Decides which grain(s) should process the request -* Uses <xref:Orleans.GrainClient> to make one or more method call to the grain(s) -* Handles successful completion or failures of the grain calls and any returned values -* Sends a response for the web request +* Receives a web request. +* Performs necessary authentication and authorization validation. +* Decides which grain(s) should process the request. +* Uses the [Microsoft.Orleans.Client](https://www.nuget.org/packages/Microsoft.Orleans.Client) NuGet package to make one or more method call to the grain(s). +* Handles successful completion or failures of the grain calls and any returned values. +* Sends a response to the web request. ### Initialization of grain client Before a grain client can be used for making calls to grains hosted in an Orleans cluster, it needs to be configured, initialized, and connected to the cluster. +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +Configuration is provided via <xref:Microsoft.Extensions.Hosting.OrleansClientGenericHostExtensions.UseOrleansClient%2A> and several supplemental option classes that contain a hierarchy of configuration properties for programmatically configuring a client. For more information, see [Client configuration](configuration-guide/client-configuration.md). + +Consider the following example of a client configuration: + +```csharp +// Alternatively, call Host.CreateDefaultBuilder(args) if using the +// Microsoft.Extensions.Hosting NuGet package. +using IHost host = new HostBuilder() + .UseOrleansClient(clientBuilder => + { + clientBuilder.Configure<ClusterOptions>(options => + { + options.ClusterId = "my-first-cluster"; + options.ServiceId = "MyOrleansService"; + }); + + clientBuilder.UseAzureStorageClustering( + options => options.ConfigureTableServiceClient(connectionString)) + }) + .Build(); +``` + +When the `host` is started, the client will be configured and available through its constructed service provider instance. + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + Configuration is provided via <xref:Orleans.ClientBuilder> and several supplemental option classes that contain a hierarchy of configuration properties for programmatically configuring a client. For more information, see [Client configuration](configuration-guide/client-configuration.md). Example of a client configuration: @@ -66,15 +114,17 @@ var client = new ClientBuilder() .Build(); ``` -Lastly, we need to call `Connect()` method on the constructed client object to make it connect to the Orleans cluster. It's an asynchronous method that returns a `Task`. So we need to wait for its completion with an `await` or `.Wait()`. +Lastly, you need to call `Connect()` method on the constructed client object to make it connect to the Orleans cluster. It's an asynchronous method that returns a `Task`. So you need to wait for its completion with an `await` or `.Wait()`. ```csharp await client.Connect(); ``` +:::zone-end + ### Make calls to grains -Making calls to grain from a client is no different from [making such calls from within grain code](../grains/index.md). The same <xref:Orleans.IGrainFactory.GetGrain%60%601(System.Type,System.Guid)?displayProperty=nameWithType> method, where `T` is the target grain interface, is used in both cases [to obtain grain references](../grains/index.md#grain-reference). The slight difference is in through what factory object we invoke <xref:Orleans.IGrainFactory.GetGrain%2A?displayProperty=nameWithType>. In client code, we do that through the connected client object as the following example shows: +Making calls to grain from a client is no different from [making such calls from within grain code](../grains/index.md). The same <xref:Orleans.IGrainFactory.GetGrain%60%601(System.Type,System.Guid)?displayProperty=nameWithType> method, where `T` is the target grain interface, is used in both cases [to obtain grain references](../grains/index.md#grain-reference). The difference is in what factory object is invoked <xref:Orleans.IGrainFactory.GetGrain%2A?displayProperty=nameWithType>. In client code, you do that through the connected client object as the following example shows: ```csharp IPlayerGrain player = client.GetGrain<IPlayerGrain>(playerId); @@ -91,12 +141,31 @@ The major difference between making calls to grains from client code and from wi There are situations in which a simple request-response pattern is not enough, and the client needs to receive asynchronous notifications. For example, a user might want to be notified when a new message has been published by someone that she is following. -The use of [Observers](../grains/observers.md) is one such mechanism that enables exposing client-side objects as grain-like targets to get invoked by grains. Calls to observers do not provide any indication of success or failure, as they are sent as a one-way best effort message. So it is the responsibility of the application code to build a higher level reliability mechanism on top of observers where necessary. +The use of [Observers](../grains/observers.md) is one such mechanism that enables exposing client-side objects as grain-like targets to get invoked by grains. Calls to observers do not provide any indication of success or failure, as they are sent as a one-way best effort message. So it is the responsibility of the application code to build a higher-level reliability mechanism on top of observers where necessary. Another mechanism that can be used for delivering asynchronous messages to clients is [Streams](../streaming/index.md). Streams expose indications of success or failure of delivery of individual messages, and hence enable reliable communication back to the client. ### Client connectivity +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +There are two scenarios in which a cluster client can experience connectivity issues: + +* When the client attempts to connect to a silo. +* When making calls on grain references that were obtained from a connected cluster client. + +In the first case, the client will attempt to connect to a silo. If the client is unable to connect to any silo, it will throw an exception to indicate what went wrong. You can register an <xref:Orleans.IClientConnectionRetryFilter> to handle the exception and decide whether to retry or not. If no retry filter is provided, or if the retry filter returns `false`, the client gives up for good. + +:::code source="snippets/ClientConnectRetryFilter.cs"::: + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + There are two scenarios in which a cluster client can experience connectivity issues: * When the <xref:Orleans.IClusterClient.Connect?displayProperty=nameWithType> method is called initially. @@ -115,20 +184,11 @@ var client = new ClientBuilder() .Build(); ``` +:::zone-end + In the second case, where a connection issue occurs during a grain call, a <xref:Orleans.Runtime.SiloUnavailableException> will be thrown on the client-side. This could be handled like so: -```csharp -IPlayerGrain player = client.GetGrain<IPlayerGrain>(playerId); - -try -{ - await player.JoinGame(game); -} -catch (SiloUnavailableException) -{ - // Lost connection to the cluster... -} -``` +:::code source="snippets/Program.cs" id="siloexc"::: The grain reference is not invalidated in this situation; the call could be retried on the same reference later when a connection might have been re-established. @@ -210,6 +270,18 @@ public class HomeController : Controller Here is an extended version of the example given above of a client application that connects to Orleans, finds the player account, subscribes for updates to the game session the player is part of with an observer, and prints out notifications until the program is manually terminated. +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +:::code source="snippets/ExampleExternalProgram.cs" id="program"::: + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + ```csharp await RunWatcherAsync(); @@ -288,3 +360,5 @@ class GameObserver : IGameObserver } } ``` + +:::zone-end diff --git a/docs/orleans/host/configuration-guide/client-configuration.md b/docs/orleans/host/configuration-guide/client-configuration.md index 27a503ad9dbc6..7abb0c5eae150 100644 --- a/docs/orleans/host/configuration-guide/client-configuration.md +++ b/docs/orleans/host/configuration-guide/client-configuration.md @@ -1,12 +1,27 @@ --- title: Client configuration description: Learn about client configurations in .NET Orleans. -ms.date: 03/16/2022 +ms.date: 01/17/2023 +zone_pivot_groups: orleans-version --- # Client configuration -A client for connecting to a cluster of silos and sending requests to grains is configured programmatically via a <xref:Orleans.ClientBuilder> and several supplemental option classes. Like silo options, client option classes follow the [Options pattern in .NET](../../../core/extensions/options.md). +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +A client for connecting to a cluster of silos and sending requests to grains is configured programmatically via an <xref:Microsoft.Extensions.Hosting.IHostBuilder> and several supplemental option classes. Like silo options, client option classes follow the [Options pattern in .NET](../../../core/extensions/options.md). + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + +A client for connecting to a cluster of silos and sending requests to grains is configured programmatically via an <xref:Orleans.ClientBuilder> and several supplemental option classes. Like silo options, client option classes follow the [Options pattern in .NET](../../../core/extensions/options.md). + +:::zone-end > [!TIP] > If you just want to start a local silo and a local client for development purposes, see [Local development configuration](local-development-configuration.md). @@ -21,6 +36,32 @@ There are several key aspects of client configuration: Example of a client configuration: +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +```csharp +var client = new HostBuilder() + .UseOrleansClient((context, clientBuilder) => + { + clientBuilder.Configure<ClusterOptions>(options => + { + options.ClusterId = "my-first-cluster"; + options.ServiceId = "MyOrleansService"; + }) + .UseAzureStorageClustering( + options => options.ConfigureTableServiceClient( + context.Configuration["ORLEANS_AZURE_STORAGE_CONNECTION_STRING"])); + }) + .Build(); +``` + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + ```csharp using Orleans.Hosting; @@ -38,6 +79,8 @@ var client = new ClientBuilder() .Build(); ``` +:::zone-end + Let's breakdown the steps used in this sample: ## Orleans clustering information @@ -57,15 +100,42 @@ Here we set two things: ## Clustering provider +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +```csharp +.UseAzureStorageClustering( + options => options.ConfigureTableServiceClient(connectionString); +``` + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + ```csharp .UseAzureStorageClustering( options => options.ConnectionString = connectionString) ``` +:::zone-end + The client will discover all gateway available in the cluster using this provider. Several providers are available, here in this sample we use the Azure Table provider. For more information, see [Server configuration](server-configuration.md). +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + ## Application parts ```csharp @@ -76,3 +146,5 @@ For more information, see [Server configuration](server-configuration.md). ``` For more information, see [Server configuration](server-configuration.md). + +:::zone-end diff --git a/docs/orleans/host/configuration-guide/local-development-configuration.md b/docs/orleans/host/configuration-guide/local-development-configuration.md index 08044f061b50d..ffa37dce41c47 100644 --- a/docs/orleans/host/configuration-guide/local-development-configuration.md +++ b/docs/orleans/host/configuration-guide/local-development-configuration.md @@ -1,7 +1,8 @@ --- title: Local development configuration description: Learn how to configure .NET Orleans for local development. -ms.date: 03/16/2022 +ms.date: 02/28/2023 +zone_pivot_groups: orleans-version --- # Local development configuration @@ -13,6 +14,36 @@ For a working sample application that targets Orleans 7.0, see [Orleans: Hello W ## Silo configuration +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +It's recommended to use the [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting) NuGet package to configure and run the silo. Also, when developing an Orleans silo you'll need the [Microsoft.Orleans.Server](https://www.nuget.org/packages/Microsoft.Orleans.Server) NuGet package. For local Orleans silo development, you'll configure localhost clustering, which is configured to use the loopback address. To use localhost clustering, call the <xref:Orleans.Hosting.CoreHostingExtensions.UseLocalhostClustering%2A> extension method. Consider this example _Program.cs_ file of the silo host: + +```csharp +using Microsoft.Extensions.Hosting; + +await Host.CreateDefaultBuilder(args) + .UseOrleans(siloBuilder => + { + siloBuilder.UseLocalhostClustering();; + }) + .RunConsoleAsync(); +``` + +The preceding code: + +- Creates a default host builder. +- Calls the `UseOrleans` extension method to configure the silo. +- Calls the `UseLocalhostClustering` extension method on the given <xref:Orleans.Hosting.ISiloBuilder> to configure the silo to use localhost clustering. +- Chains the `RunConsoleAsync` method to run the silo as a console application. + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + For local development, please refer to the below example of how to configure a silo for that case. It configures and starts a silo listening on the `loopback` address, `11111` and `30000` as silo and gateway ports respectively. Add the `Microsoft.Orleans.Server` NuGet meta-package to the project. After you get comfortable with the API, you can pick and choose which exact packages included in `Microsoft.Orleans.Server` you need, and reference them instead. @@ -67,8 +98,44 @@ static async Task<ISiloHost> BuildAndStartSiloAsync() } ``` +:::zone-end + ## Client configuration +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +It's recommended to use the [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting) NuGet package to configure and run clients (in addition to the silo). You'll also need the [Microsoft.Orleans.Client](https://www.nuget.org/packages/Microsoft.Orleans.Client) NuGet package. To use localhost clustering on the consuming client, call the <xref:Orleans.Hosting.ClientBuilderExtensions.UseLocalhostClustering%2A> extension method. Consider this example _Program.cs_ file of the client host: + +```csharp +using Microsoft.Extensions.Hosting; + +using IHost host = Host.CreateDefaultBuilder(args) + .UseOrleansClient(client => + { + client.UseLocalhostClustering(); + }) + .UseConsoleLifetime() + .Build(); + +await host.StartAsync(); +``` + +The preceding code: + +- Creates a default host builder. +- Calls the `UseOrleansClient` extension method to configure the client. +- Calls the `UseLocalhostClustering` extension method on the given <xref:Orleans.Hosting.IClientBuilder> to configure the client to use localhost clustering. +- Calls the `UseConsoleLifetime` extension method to configure the client to use the console lifetime. +- Calls the `StartAsync` method on the `host` variable to start the client. + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + For local development, please refer to the below example of how to configure a client for that case. It configures a client that would connect to a `loopback` silo. Add the `Microsoft.Orleans.Client` NuGet meta-package to the project. After you get comfortable with the API, you can pick and choose which exact packages included in `Microsoft.Orleans.Client` you actually need and reference them instead. @@ -100,3 +167,5 @@ var client = builder.Build(); await client.Connect(); ``` + +:::zone-end diff --git a/docs/orleans/host/configuration-guide/serialization-configuration.md b/docs/orleans/host/configuration-guide/serialization-configuration.md index 3e73e34832171..92487e6fa94ba 100644 --- a/docs/orleans/host/configuration-guide/serialization-configuration.md +++ b/docs/orleans/host/configuration-guide/serialization-configuration.md @@ -12,7 +12,7 @@ zone_pivot_groups: orleans-version :::zone target="docs" pivot="orleans-7-0" <!-- markdownlint-enable MD044 --> -The configuration of serialization in Orleans is a crucial part of the overall system design. While Orleans provides reasonalble defaults, you can configure serialization to suit your apps' needs. For sending data between hosts, <xref:Orleans.Serialization?displayProperty=fullName> supports delegating to other serializers, such as [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json) and [System.Text.Json](https://www.nuget.org/packages/System.Text.Json). You can add support for other serializers by following the pattern set by those implementations. For grain storage it's best to use <xref:Orleans.Storage.IGrainStorageSerializer> to configure a custom serializer. +The configuration of serialization in Orleans is a crucial part of the overall system design. While Orleans provides reasonable defaults, you can configure serialization to suit your apps' needs. For sending data between hosts, <xref:Orleans.Serialization?displayProperty=fullName> supports delegating to other serializers, such as [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json) and [System.Text.Json](https://www.nuget.org/packages/System.Text.Json). You can add support for other serializers by following the pattern set by those implementations. For grain storage it's best to use <xref:Orleans.Storage.IGrainStorageSerializer> to configure a custom serializer. ## Configure Orleans to use `Newtonsoft.Json` diff --git a/docs/orleans/host/configuration-guide/serialization.md b/docs/orleans/host/configuration-guide/serialization.md index 8d6d71c9195a2..5b6a586b996ce 100644 --- a/docs/orleans/host/configuration-guide/serialization.md +++ b/docs/orleans/host/configuration-guide/serialization.md @@ -36,6 +36,18 @@ By default, Orleans will serialize your type by encoding its full name. You can Members defined in a record's primary constructor have implicit ids by default. In other words, Orleans supports serializing `record` types. This means that you cannot change the parameter order for an already deployed type, since that breaks compatibility with previous versions of your application (in the case of a rolling upgrade) and with serialized instances of that type in storage and streams. Members defined in the body of a record type don't share identities with the primary constructor parameters. +```csharp +[GenerateSerializer] +public record MyRecord(string A, string B) +{ + // ID 0 won't clash with A in primary constructor as they don't share identities + [Id(0)] + public string C { get; init; } +} +``` + +If you don't want the primary constructor parameters to be automatically included as Serializable fields, you can use `[GenerateSerializer(IncludePrimaryConstructorParameters = false)]`. + ## Surrogates for serializing foreign types Sometimes you may need to pass types between grains which you don't have full control over. In these cases, it may be impractical to convert to and from some custom-defined type in your application code manually. Orleans offers a solution for these situations in the form of surrogate types. Surrogates are serialized in place of their target type and have functionality to convert to and from the target type. Consider the following example of a foreign type and a corresponding surrogate and converter: @@ -312,7 +324,7 @@ The <xref:Orleans.Serialization.BinaryFormatterSerializer> is the default fallba ## Exception serialization -Exceptions are serialized using the [fallback serializer](serialization.md#fallback-serialization). Using the default configuration, `BinaryFormatter` is the fallback serializer and so the [ISerializable pattern](../../../standard/serialization/custom-serialization.md) must be followed in order to ensure correct serialization of all properties in an exception type. +Exceptions are serialized using the [fallback serializer](serialization.md#fallback-serialization). Using the default configuration, `BinaryFormatter` is the fallback serializer and so the [ISerializable pattern](/previous-versions/dotnet/fundamentals/serialization/binary/custom-serialization) must be followed in order to ensure correct serialization of all properties in an exception type. Here is an example of an exception type with correctly implemented serialization: diff --git a/docs/orleans/host/configuration-guide/server-configuration.md b/docs/orleans/host/configuration-guide/server-configuration.md index dfc423eae1b3a..dfc0349bb07fe 100644 --- a/docs/orleans/host/configuration-guide/server-configuration.md +++ b/docs/orleans/host/configuration-guide/server-configuration.md @@ -22,13 +22,13 @@ There are several key aspects of silo configuration: This is an example of a silo configuration that defines cluster information, uses Azure clustering, and configures the application parts: ```csharp -// using IHost host = Host.CreateDefaultBuilder(args) could be used instead -using IHost host = new HostBuilder() +using IHost host = Host.CreateDefaultBuilder(args) .UseOrleans(builder => { builder.UseAzureStorageClustering( options => options.ConfigureTableServiceClient(connectionString)); }) + .UseConsoleLifetime() .Build(); ``` @@ -60,11 +60,17 @@ siloBuilder.Configure<ClusterOptions>(options => }) ``` -Here you specific two options: +Here you specify two options: - Set the `ClusterId` to `"my-first-cluster"`: this is a unique ID for the Orleans cluster. All clients and silos that use this ID will be able to talk directly to each other. You can choose to use a different `ClusterId` for different deployments, though. - Set the `ServiceId` to `"SampleApp"`: this is a unique ID for your application that will be used by some providers, such as persistence providers. **This ID should remain stable and not change across deployments**. +By default, Orleans will use a value of `"default"` for both the `ServiceId` and the `ClusterId`. These values don't need to be changed in most cases. `ServiceId` is the more significant of the two, and is used to distinguish different logical services from each other so that they can share backend storage systems without interfering with each other. `ClusterId` is used to determine which hosts will connect to each other and form a cluster. + +Within each cluster, all hosts must use the same `ServiceId`. Multiple clusters can share a `ServiceId`, however. This enables blue/green deployment scenarios where a new deployment (cluster) is started before another is shut down. This is typical for systems hosted in Azure App Service. + +The more common case is that `ServiceId` and `ClusterId` remain fixed for the lifetime of the application and a rolling deployment strategy is used. This is typical for systems hosted in Kubernetes and Service Fabric. + ## Endpoints By default, Orleans will listen on all interfaces on port `11111` for silo-to-silo communication and on port `30000` for client-to-silo communication. To override this behavior, call <xref:Orleans.Hosting.EndpointOptionsExtensions.ConfigureEndpoints(Orleans.Hosting.ISiloBuilder,System.Int32,System.Int32,System.Net.Sockets.AddressFamily,System.Boolean)> and pass in the port numbers you want to use. @@ -83,7 +89,8 @@ An Orleans silo has two typical types of endpoint configuration: - Silo-to-silo endpoints are used for communication between silos in the same cluster. - Client-to-silo (or gateway) endpoints are used for communication between clients and silos in the same cluster. -If you can customize endpoints further, for example, if you need an external IP address with some port-forwarding, consider the following: +This method should be sufficient in most cases, but you can customize it further if you need to. +Here is an example of how to use an external IP address with some port-forwarding: ```csharp siloBuilder.Configure<EndpointOptions>(options => @@ -121,7 +128,7 @@ There are several key aspects of silo configuration: This is an example of a silo configuration that defines cluster information, uses Azure clustering, and configures the application parts: ```csharp -var silo = new HostBuilder() +var silo = Host.CreateDefaultBuilder(args) .UseOrleans(builder => { builder @@ -136,6 +143,7 @@ var silo = new HostBuilder() .ConfigureApplicationParts( parts => parts.AddApplicationPart(typeof(ValueGrain).Assembly).WithReferences()) }) + .UseConsoleLifetime() .Build(); ``` @@ -169,6 +177,12 @@ Here we do two things: - Set the `ClusterId` to `"my-first-cluster"`: this is a unique ID for the Orleans cluster. All clients and silos that use this ID will be able to talk directly to each other. You can choose to use a different `ClusterId` for different deployments, though. - Set the `ServiceId` to `"AspNetSampleApp"`: this is a unique ID for your application that will be used by some providers, such as persistence providers. **This ID should remain stable and not change across deployments**. +By default, Orleans will use a value of `"default"` for both the `ServiceId` and the `ClusterId`. These values don't need to be changed in most cases. `ServiceId` is the more significant of the two, and is used to distinguish different logical services from each other so that they can share backend storage systems without interfering with each other. `ClusterId` is used to determine which hosts will connect to each other and form a cluster. + +Within each cluster, all hosts must use the same `ServiceId`. Multiple clusters can share a `ServiceId`, however. This enables blue/green deployment scenarios where a new deployment (cluster) is started before another is shut down. This is typical for systems hosted in Azure App Service. + +The more common case is that `ServiceId` and `ClusterId` remain fixed for the lifetime of the application and a rolling deployment strategy is used. This is typical for systems hosted in Kubernetes and Service Fabric. + ## Endpoints ```csharp diff --git a/docs/orleans/host/configuration-guide/snippets/best-practices/Program.cs b/docs/orleans/host/configuration-guide/snippets/best-practices/Program.cs deleted file mode 100644 index f023caf9a61b9..0000000000000 --- a/docs/orleans/host/configuration-guide/snippets/best-practices/Program.cs +++ /dev/null @@ -1 +0,0 @@ -return 0; \ No newline at end of file diff --git a/docs/orleans/host/configuration-guide/snippets/best-practices/best-practices.csproj b/docs/orleans/host/configuration-guide/snippets/best-practices/best-practices.csproj deleted file mode 100644 index c191126bb4e4d..0000000000000 --- a/docs/orleans/host/configuration-guide/snippets/best-practices/best-practices.csproj +++ /dev/null @@ -1,14 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>net7.0</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" /> - </ItemGroup> - -</Project> diff --git a/docs/orleans/host/configuration-guide/snippets/configuration/Program.cs b/docs/orleans/host/configuration-guide/snippets/configuration/Program.cs deleted file mode 100644 index f023caf9a61b9..0000000000000 --- a/docs/orleans/host/configuration-guide/snippets/configuration/Program.cs +++ /dev/null @@ -1 +0,0 @@ -return 0; \ No newline at end of file diff --git a/docs/orleans/host/configuration-guide/snippets/configuration/configuration.csproj b/docs/orleans/host/configuration-guide/snippets/configuration/configuration.csproj deleted file mode 100644 index c191126bb4e4d..0000000000000 --- a/docs/orleans/host/configuration-guide/snippets/configuration/configuration.csproj +++ /dev/null @@ -1,14 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>net7.0</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" /> - </ItemGroup> - -</Project> diff --git a/docs/orleans/host/configuration-guide/snippets/custom-serialization/Program.cs b/docs/orleans/host/configuration-guide/snippets/custom-serialization/Program.cs deleted file mode 100644 index f023caf9a61b9..0000000000000 --- a/docs/orleans/host/configuration-guide/snippets/custom-serialization/Program.cs +++ /dev/null @@ -1 +0,0 @@ -return 0; \ No newline at end of file diff --git a/docs/orleans/host/configuration-guide/snippets/custom-serialization/custom.csproj b/docs/orleans/host/configuration-guide/snippets/custom-serialization/custom.csproj deleted file mode 100644 index c191126bb4e4d..0000000000000 --- a/docs/orleans/host/configuration-guide/snippets/custom-serialization/custom.csproj +++ /dev/null @@ -1,14 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Exe</OutputType> - <TargetFramework>net7.0</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" /> - </ItemGroup> - -</Project> diff --git a/docs/orleans/host/grain-directory.md b/docs/orleans/host/grain-directory.md index a3ecb307f7e27..88e62d3e72930 100644 --- a/docs/orleans/host/grain-directory.md +++ b/docs/orleans/host/grain-directory.md @@ -56,7 +56,7 @@ The Azure grain directory is configured like this: ```csharp siloBuilder.AddAzureTableGrainDirectory( "my-grain-directory", - options => options.ConnectionString = = azureConnectionString); + options => options.ConnectionString = azureConnectionString); ``` You can configure multiple directories with different names to use for different grain classes: @@ -71,5 +71,5 @@ siloBuilder options => options.ConfigurationOptions = redisConfiguration2) .AddAzureTableGrainDirectory( "azure-directory", - options => options.ConnectionString = = azureConnectionString); + options => options.ConnectionString = azureConnectionString); ``` diff --git a/docs/orleans/host/media/jaeger-ui.png b/docs/orleans/host/media/jaeger-ui.png new file mode 100644 index 0000000000000..59cf8e6f1cceb Binary files /dev/null and b/docs/orleans/host/media/jaeger-ui.png differ diff --git a/docs/orleans/host/monitoring/client-error-code-monitoring.md b/docs/orleans/host/monitoring/client-error-code-monitoring.md index 717681d52c668..f809a34324f35 100644 --- a/docs/orleans/host/monitoring/client-error-code-monitoring.md +++ b/docs/orleans/host/monitoring/client-error-code-monitoring.md @@ -1,7 +1,7 @@ --- title: Client error code monitoring description: Explore the various client error code monitoring values in .NET Orleans. -ms.date: 03/16/2022 +ms.date: 02/21/2023 ms.topic: reference --- diff --git a/docs/orleans/host/monitoring/index.md b/docs/orleans/host/monitoring/index.md index 62e93bf396bbc..77694efa1338c 100644 --- a/docs/orleans/host/monitoring/index.md +++ b/docs/orleans/host/monitoring/index.md @@ -1,14 +1,158 @@ --- -title: Runtime monitoring and logs -description: Explore the various runtime monitoring and logs values in .NET Orleans. -ms.date: 03/16/2022 +title: Orleans observability +description: Explore the various runtime monitoring, logging, distributed tracing, and metrics options available in .NET Orleans. +ms.date: 02/22/2023 +zone_pivot_groups: orleans-version --- -# Orleans logs +# Orleans observability -Orleans leverages [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) for all silo and client logs. For more information, see [Logging in .NET](../../../core/extensions/logging.md). +One of the most important aspects of a distributed system is observability. Observability is the ability to understand the state of the system at any given time. There are various ways to achieve this, including logging, metrics, and distributed tracing. -## Runtime monitoring +## Logging + +Orleans leverages [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) for all silo and client logs. This means that you can use any logging provider that is compatible with `Microsoft.Extensions.Logging`. Your app code would rely on [dependency injection](../../../core/extensions/dependency-injection.md) to get an instance of <xref:Microsoft.Extensions.Logging.ILogger%601> and use it to log messages. For more information, see [Logging in .NET](../../../core/extensions/logging.md). + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +## Metrics + +Metrics are numerical measurements reported over time. They're most often used to monitor the health of an application and generate alerts. For more information, see [Metrics in .NET](../../../core/diagnostics/metrics.md). Orleans uses the [System.Diagnostics.Metrics](../../../core/diagnostics/compare-metric-apis.md#systemdiagnosticsmetrics) APIs to collect metrics. The metrics are exposed to the [OpenTelemetry](https://opentelemetry.io) project, which exports the metrics to various monitoring systems. + +To monitor your app without making any code changes at all, you can use the `dotnet counters` .NET diagnostic tool. To monitor Orleans <xref:System.Diagnostics.ActivitySource> counters, given your desired `<ProcessName>` to monitor, use the `dotnet counters monitor` command as shown: + +```dotnetcli +dotnet counters monitor -n <ProcessName> --counters Microsoft.Orleans +``` + +Imagine that you're running the [Orleans GPS Tracker sample app](/samples/dotnet/samples/orleans-gps-device-tracker-sample), and in a separate terminal, you're monitoring it with the `dotnet counters monitor` command. The following output is typical: + +```dotnetcli +Press p to pause, r to resume, q to quit. + Status: Running +[Microsoft.Orleans] + orleans-app-requests-latency-bucket (Count / 1 sec) 0 + duration=10000ms 0 + duration=1000ms 0 + duration=100ms 0 + duration=10ms 0 + duration=15000ms 0 + duration=1500ms 0 + duration=1ms 2,530 + duration=2000ms 0 + duration=200ms 0 + duration=2ms 0 + duration=400ms 0 + duration=4ms 0 + duration=5000ms 0 + duration=50ms 0 + duration=6ms 0 + duration=800ms 0 + duration=8ms 0 + duration=9223372036854775807ms 0 + orleans-app-requests-latency-count (Count / 1 sec) 2,530 + orleans-app-requests-latency-sum (Count / 1 sec) 0 + orleans-catalog-activation-working-set 36 + orleans-catalog-activations 38 + orleans-consistent-ring-range-percentage-average 100 + orleans-consistent-ring-range-percentage-local 100 + orleans-consistent-ring-size 1 + orleans-directory-cache-size 27 + orleans-directory-partition-size 26 + orleans-directory-ring-local-portion-average-percentage 100 + orleans-directory-ring-local-portion-distance 0 + orleans-directory-ring-local-portion-percentage 0 + orleans-directory-ring-size 1,295 + orleans-gateway-received (Count / 1 sec) 1,291 + orleans-gateway-sent (Count / 1 sec) 2,582 + orleans-messaging-processing-activation-data 0 + orleans-messaging-processing-dispatcher-forwarded (Count / 1 0 + orleans-messaging-processing-dispatcher-processed (Count / 1 2,543 + Direction=Request,Status=Ok 2,582 + orleans-messaging-processing-dispatcher-received (Count / 1 1,271 + Context=Grain,Direction=Request 1,291 + Context=None,Direction=Request 1,291 + orleans-messaging-processing-ima-enqueued (Count / 1 sec) 5,113 +``` + +For more information, see [Investigate performance counters (dotnet-counters)](../../../core/diagnostics/dotnet-counters.md). + +### Prometheus + +There are various third-party metrics providers that you can use with Orleans. One popular example is [Prometheus](https://prometheus.io), which can be used to collect metrics from your app in conjunction with OpenTelemetry. + +To use OpenTelemetry and Prometheus with Orleans, call the following `IServiceCollection` extension method: + +```csharp +builder.Services.AddOpenTelemetry() + .WithMetrics(metrics => + { + metrics + .AddPrometheusExporter() + .AddMeter("Microsoft.Orleans"); + }); +``` + +> [!IMPORTANT] +> Both the [OpenTelemetry.Exporter.Prometheus](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus) and [OpenTelemetry.Exporter.Prometheus.AspNetCore](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus.AspNetCore) NuGet packages are currently in preview as release candidates. They're not recommended for production use. + +The `AddPrometheusExporter` method ensures that the `PrometheusExporter` is added to the `builder`. Orleans makes use of a <xref:System.Diagnostics.Metrics.Meter> named `"Microsoft.Orleans"` to create <xref:System.Diagnostics.Metrics.Counter%601> instances for many Orleans-specific metrics. The `AddMeter` method is used to specify the name of the meter to subscribe to, in this case `"Microsoft.Orleans"`. + +After the exporter has been configured, and your app has been built, you must call `MapPrometheusScrapingEndpoint` on the `IEndpointRouteBuilder` (the `app` instance) to expose the metrics to Prometheus. For example: + +```csharp +WebApplication app = builder.Build(); + +app.MapPrometheusScrapingEndpoint(); +app.Run(); +``` + +## Distributed tracing + +Distributed tracing is a set of tools and practices to monitor and troubleshoot distributed applications. Distributed tracing is a key component of observability, and it's a critical tool for developers to understand the behavior of their apps. Orleans also supports distributed tracing with [OpenTelemetry](https://opentelemetry.io). + +Regardless of the distributed tracing exporter you choose, you'll call: + +- <xref:Orleans.Hosting.CoreHostingExtensions.AddActivityPropagation(Orleans.Hosting.ISiloBuilder)>: To enable distributed tracing for the silo. +- <xref:Orleans.Hosting.ClientBuilderExtensions.AddActivityPropagation(Orleans.Hosting.IClientBuilder)>: To enable distributed tracing for the client. + +Referring back to the [Orleans GPS Tracker sample app](/samples/dotnet/samples/orleans-gps-device-tracker-sample), you can use the [Zipkin](https://zipkin.io) distributed tracing system to monitor the app by updating the _Program.cs_. To use OpenTelemetry and Zipkin with Orleans, call the following `IServiceCollection` extension method: + +```csharp +builder.Services.AddOpenTelemetry() + .WithTracing(tracing => + { + // Set a service name + tracing.SetResourceBuilder( + ResourceBuilder.CreateDefault() + .AddService(serviceName: "GPSTracker", serviceVersion: "1.0")); + + tracing.AddSource("Microsoft.Orleans.Runtime"); + tracing.AddSource("Microsoft.Orleans.Application"); + + tracing.AddZipkinExporter(zipkin => + { + zipkin.Endpoint = new Uri("http://localhost:9411/api/v2/spans"); + }); + }); +``` + +> [!IMPORTANT] +> The [OpenTelemetry.Exporter.Zipkin](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin) NuGet package is currently in preview as a release candidate. It is not recommended for production use. + +The Zipkin trace is shown in the Jaeger UI (which is an alternative to Zipkin but uses the same data format): + +:::image type="content" source="../media/jaeger-ui.png" lightbox="../media/jaeger-ui.png" alt-text="Orleans GPS Tracker sample app: Jaeger UI trace."::: + +For more information, see [Distributed tracing](../../../core/diagnostics/distributed-tracing.md). + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> Orleans outputs its runtime statistics and metrics through the <xref:Orleans.Runtime.ITelemetryConsumer> interface. The application can register one or more telemetry consumers for their silos and clients, to receive statistics and metrics that the Orleans runtime periodically publishes. These can be consumers for popular telemetry analytics solutions or custom ones for any other destination and purpose. Three telemetry consumers are currently included in the Orleans codebase. @@ -47,7 +191,6 @@ var siloHostBuilder = new HostBuilder() { c.AddApplicationInsightsTelemetryConsumer(telemetryConfiguration); }); - ``` Client configuration code look like this: @@ -57,3 +200,12 @@ var clientBuilder = new ClientBuilder(); var telemetryConfiguration = TelemetryConfiguration.CreateDefault(); clientBuilder.AddApplicationInsightsTelemetryConsumer(telemetryConfiguration); ``` + +:::zone-end + +## See also + +- [Logging in .NET](../../../core/extensions/logging.md) +- [.NET metrics](../../../core/diagnostics/metrics.md) +- [Investigate performance counters (dotnet-counters)](../../../core/diagnostics/dotnet-counters.md) +- [.NET distributed tracing](../../../core/diagnostics/distributed-tracing.md) diff --git a/docs/orleans/host/monitoring/silo-error-code-monitoring.md b/docs/orleans/host/monitoring/silo-error-code-monitoring.md index 2189131c60dab..047360aa2f61b 100644 --- a/docs/orleans/host/monitoring/silo-error-code-monitoring.md +++ b/docs/orleans/host/monitoring/silo-error-code-monitoring.md @@ -1,7 +1,7 @@ --- title: Silo error code monitoring description: Explore the various silo error code monitoring values in .NET Orleans. -ms.date: 03/16/2022 +ms.date: 02/21/2023 ms.topic: reference --- @@ -12,6 +12,6 @@ ms.topic: reference | Azure Problems | Warning or Error | 100800 - 100899 | Any Error or Warning | Transient problems reading or writing to Azure table store will be logged as Warning. Transient read errors will automatically be retried. A final Error log message means there is a real problem connecting to Azure table storage. | | Membership Connectivity Problems | Warning or Error | 100600 - 100699 | Any Error or Warning | Warning logs are an early indication of network connectivity problems and/or silo restart/migration. Ping timeouts and silo-dead votes will show up as Warning messages. Silo detecting it was voted dead will show as an Error message. | | Grain call timeouts | Warning | 100157 | Multiple Warnings logged in a short amount of time | Grain-call timeout problems are generally caused by temporary network connectivity issues or silo restart/reboot problems. The system should recover after a short time (depending on Liveness config settings) at which point Timeouts should clear. Ideally, monitoring for just the bulk log code 600157 variety of these warnings should be sufficient. | -| Silo Restart / Migration | Warning | 100601 or 100602 | Any Warning | Warning printed when silo detects it was restarted on same machine {100602) or migrated to a different machine (100601) | +| Silo Restart / Migration | Warning | 100601 or 100602 | Any Warning | Warning printed when silo detects it was restarted on same machine (100602) or migrated to a different machine (100601) | | Network Socket Problems | Warning or Error | 101000 to 101999, 100307,100015, 100016 | Any Error or Warning | Socket disconnects are logged as Warning messages. Problems opening sockets or during message transmission, are logged as Errors. | | Grain problems | Warning or Error | 101534 | Any Error or Warning | Detection of "stuck" requests for non-reentrant grains. The error code is reported every time a request takes longer than 5x request timeout time to execute. | diff --git a/docs/orleans/host/snippets/Client.csproj b/docs/orleans/host/snippets/Client.csproj new file mode 100644 index 0000000000000..5a56ff70c9de6 --- /dev/null +++ b/docs/orleans/host/snippets/Client.csproj @@ -0,0 +1,16 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> + <PackageReference Include="Microsoft.Orleans.Clustering.AzureStorage" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.Client" Version="7.1.1" /> + </ItemGroup> + +</Project> diff --git a/docs/orleans/host/snippets/ClientConnectRetryFilter.cs b/docs/orleans/host/snippets/ClientConnectRetryFilter.cs new file mode 100644 index 0000000000000..bc3273546a4ff --- /dev/null +++ b/docs/orleans/host/snippets/ClientConnectRetryFilter.cs @@ -0,0 +1,27 @@ +using Orleans.Runtime; + +internal sealed class ClientConnectRetryFilter : IClientConnectionRetryFilter +{ + private int _retryCount = 0; + private const int MaxRetry = 5; + private const int Delay = 1_500; + + public async Task<bool> ShouldRetryConnectionAttempt( + Exception exception, + CancellationToken cancellationToken) + { + if (_retryCount >= MaxRetry) + { + return false; + } + + if (!cancellationToken.IsCancellationRequested && + exception is SiloUnavailableException siloUnavailableException) + { + await Task.Delay(++ _retryCount * Delay, cancellationToken); + return true; + } + + return false; + } +} diff --git a/docs/orleans/host/snippets/ExampleExternalProgram.cs b/docs/orleans/host/snippets/ExampleExternalProgram.cs new file mode 100644 index 0000000000000..0eda9288ad67f --- /dev/null +++ b/docs/orleans/host/snippets/ExampleExternalProgram.cs @@ -0,0 +1,97 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +using Orleans.Configuration; + +namespace Client; + +internal class ExampleExternalProgram +{ + internal static async Task RunWatcherAsync(string[] args) + { + // <program> + try + { + using IHost host = Host.CreateDefaultBuilder(args) + .UseOrleansClient((context, client) => + { + client.Configure<ClusterOptions>(options => + { + options.ClusterId = "my-first-cluster"; + options.ServiceId = "MyOrleansService"; + }) + .UseAzureStorageClustering( + options => options.ConfigureTableServiceClient( + context.Configuration["ORLEANS_AZURE_STORAGE_CONNECTION_STRING"])); + }) + .UseConsoleLifetime() + .Build(); + + await host.StartAsync(); + + IGrainFactory client = host.Services.GetRequiredService<IGrainFactory>(); + + // Hardcoded player ID + Guid playerId = new("{2349992C-860A-4EDA-9590-000000000006}"); + IPlayerGrain player = client.GetGrain<IPlayerGrain>(playerId); + IGameGrain? game = null; + while (game is null) + { + Console.WriteLine( + $"Getting current game for player {playerId}..."); + + try + { + game = await player.GetCurrentGame(); + if (game is null) // Wait until the player joins a game + { + await Task.Delay(TimeSpan.FromMilliseconds(5_000)); + } + } + catch (Exception ex) + { + Console.WriteLine($"Exception: {ex.GetBaseException()}"); + } + } + + Console.WriteLine( + $"Subscribing to updates for game {game.GetPrimaryKey()}..."); + + // Subscribe for updates + var watcher = new GameObserver(); + await game.ObserveGameUpdates( + client.CreateObjectReference<IGameObserver>(watcher)); + + Console.WriteLine( + "Subscribed successfully. Press <Enter> to stop."); + } + catch (Exception e) + { + Console.WriteLine( + $"Unexpected Error: {e.GetBaseException()}"); + } + // </program> + } +} + +// <gameobserver> +/// <summary> +/// Observer class that implements the observer interface. +/// Need to pass a grain reference to an instance of +/// this class to subscribe for updates. +/// </summary> +class GameObserver : IGameObserver +{ + public void UpdateGameScore(string score) + { + Console.WriteLine("New game score: {0}", score); + } +} +// </gameobserver> + +// <igameobserver> +public interface IGameObserver : IGrainObserver +{ + void UpdateGameScore(string score); +} +// </igameobserver> diff --git a/docs/orleans/host/snippets/GameState.cs b/docs/orleans/host/snippets/GameState.cs new file mode 100644 index 0000000000000..f3f3bd090ff69 --- /dev/null +++ b/docs/orleans/host/snippets/GameState.cs @@ -0,0 +1,9 @@ +namespace Client; + +[Serializable] +public enum GameState +{ + AwaitingPlayers, + InPlay, + Finished +}; diff --git a/docs/orleans/host/snippets/IGameGrain.cs b/docs/orleans/host/snippets/IGameGrain.cs new file mode 100644 index 0000000000000..199bbbd80a00b --- /dev/null +++ b/docs/orleans/host/snippets/IGameGrain.cs @@ -0,0 +1,10 @@ +namespace Client; + +public interface IGameGrain : IGrainWithGuidKey +{ + Task UpdateGameStatus(GameState state); + + Task ObserveGameUpdates(IGameObserver observer); + + Task UnobserveGameUpdates(IGameObserver observer); +} diff --git a/docs/orleans/host/snippets/IPlayerGrain.cs b/docs/orleans/host/snippets/IPlayerGrain.cs new file mode 100644 index 0000000000000..615eca23fed12 --- /dev/null +++ b/docs/orleans/host/snippets/IPlayerGrain.cs @@ -0,0 +1,12 @@ +namespace Client; + +public interface IPlayerGrain : IGrainWithGuidKey +{ + Task<GameState> JoinGame(Guid gameId); + + Task<IGameGrain?> GetCurrentGame(); + + Task JoinGame(IGameGrain game); + + Task LeaveGame(IGameGrain game); +} diff --git a/docs/orleans/host/snippets/Program.cs b/docs/orleans/host/snippets/Program.cs new file mode 100644 index 0000000000000..a963d4246074a --- /dev/null +++ b/docs/orleans/host/snippets/Program.cs @@ -0,0 +1,31 @@ +using Orleans.Runtime; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Client; + +using IHost host = Host.CreateDefaultBuilder(args) + .UseOrleansClient((_, client) => + { + client.UseLocalhostClustering(); + client.Services.AddTransient<IClientConnectionRetryFilter, ClientConnectRetryFilter>(); + }) + .Build(); + +await host.StartAsync(); + +var client = host.Services.GetRequiredService<IClusterClient>(); +var playerId = Guid.Empty; +var game = Guid.Empty; + +// <siloexc> +IPlayerGrain player = client.GetGrain<IPlayerGrain>(playerId); + +try +{ + await player.JoinGame(game); +} +catch (SiloUnavailableException) +{ + // Lost connection to the cluster... +} +// </siloexc> diff --git a/docs/orleans/implementation/cluster-management.md b/docs/orleans/implementation/cluster-management.md index c473db29e44b6..755b5682c9467 100644 --- a/docs/orleans/implementation/cluster-management.md +++ b/docs/orleans/implementation/cluster-management.md @@ -179,5 +179,5 @@ A natural question that might be asked is why not rely completely on [Apache Zoo ### Acknowledgements -We would to acknowledge the contribution of [Alex Kogan](https://www.linkedin.com/in/alex-kogan-3a2b52) to the design and implementation of the first version of this protocol. This work was done as part of a summer internship in Microsoft Research in the Summer of 2011. +We would to acknowledge the contribution of Alex Kogan to the design and implementation of the first version of this protocol. This work was done as part of a summer internship in Microsoft Research in the Summer of 2011. The implementation of ZooKeeper based `IMembershipTable` was done by [Shay Hazor](https://github.com/shayhatsor), the implementation of SQL `IMembershipTable` was done by [Veikko Eeva](https://github.com/veikkoeeva), the implementation of AWS DynamoDB `IMembershipTable` was done by [Gutemberg Ribeiro](https://github.com/galvesribeiro/) and the implementation of Consul based `IMembershipTable` was done by [Paul North](https://github.com/PaulNorth). diff --git a/docs/orleans/index.yml b/docs/orleans/index.yml index 4cb14572c1625..14d3620f40492 100644 --- a/docs/orleans/index.yml +++ b/docs/orleans/index.yml @@ -9,7 +9,7 @@ metadata: description: Samples, tutorials, and education for .NET Orleans. Microsoft's cloud native and distributed systems platform. ms.topic: hub-page ms.prod: dotnet-orleans - ms.date: 10/26/2022 + ms.date: 03/06/2023 highlightedContent: # itemType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | whats-new @@ -21,8 +21,8 @@ highlightedContent: title: Deploy Orleans apps url: deployment/index.md - itemType: whats-new - title: What's new in Orleans - url: whats-new-in-orleans.md + title: "Migrate from Orleans 3.x to 7.0" + url: migration-guide.md - itemType: concept title: Why Orleans? url: benefits.md @@ -104,7 +104,7 @@ conceptualContent: text: Host configuration url: host/configuration-guide/index.md - itemType: get-started - text: Host monitoring + text: Observability url: host/monitoring/index.md - itemType: how-to-guide text: Orleans clients @@ -184,13 +184,13 @@ additionalContent: - text: .NET Community Standup url: https://dotnet.microsoft.com/platform/community/standup - text: On .NET Live - url: https://dotnet.microsoft.com/en-us/live/dotnet-docs + url: https://dotnet.microsoft.com/live/on-dotnet-live - title: Open source links: - text: Orleans on GitHub url: https://github.com/dotnet/orleans - text: Orleans samples on GitHub - url: https://github.com/dotnet/orleans/tree/main/samples + url: https://github.com/dotnet/samples/tree/main/orleans - text: .NET samples url: https://github.com/dotnet/samples - text: .NET Platform diff --git a/docs/orleans/media/create-storage-account-small.png b/docs/orleans/media/create-storage-account-small.png new file mode 100644 index 0000000000000..50cdb8dc1bbfe Binary files /dev/null and b/docs/orleans/media/create-storage-account-small.png differ diff --git a/docs/orleans/media/create-storage-account.png b/docs/orleans/media/create-storage-account.png new file mode 100644 index 0000000000000..31dca299bacdf Binary files /dev/null and b/docs/orleans/media/create-storage-account.png differ diff --git a/docs/orleans/media/deploy-container-apps.png b/docs/orleans/media/deploy-container-apps.png new file mode 100644 index 0000000000000..e93d37413f6db Binary files /dev/null and b/docs/orleans/media/deploy-container-apps.png differ diff --git a/docs/orleans/media/scale-containers.png b/docs/orleans/media/scale-containers.png new file mode 100644 index 0000000000000..94bb51df28997 Binary files /dev/null and b/docs/orleans/media/scale-containers.png differ diff --git a/docs/orleans/media/storage-connection-string.png b/docs/orleans/media/storage-connection-string.png new file mode 100644 index 0000000000000..e73352cb749dc Binary files /dev/null and b/docs/orleans/media/storage-connection-string.png differ diff --git a/docs/orleans/media/table-storage.png b/docs/orleans/media/table-storage.png new file mode 100644 index 0000000000000..101c49be40505 Binary files /dev/null and b/docs/orleans/media/table-storage.png differ diff --git a/docs/orleans/migration-guide.md b/docs/orleans/migration-guide.md new file mode 100644 index 0000000000000..1d438f559f2f7 --- /dev/null +++ b/docs/orleans/migration-guide.md @@ -0,0 +1,396 @@ +--- +title: Migrate from Orleans 3.x to 7.0 +description: Learn the various new features introduced in Orleans 7.0, and how to migrate from 3.x versions. +ms.date: 03/06/2023 +--- + +# Migrate from Orleans 3.x to 7.0 + +Orleans 7.0 introduces several beneficial changes, including improvements to hosting, custom serialization, immutability, and grain abstractions. + +## Migration + +Existing applications using reminders, streams, or grain persistence cannot be easily migrated to Orleans 7.0 due to changes in how Orleans identifies grains and streams. We plan to incrementally offer a migration path for these applications. + +Applications running previous versions of Orleans cannot be smoothly upgraded via a rolling upgrade to Orleans 7.0. Therefore, a different upgrade strategy must be used, such as deploying a new cluster and decommissioning the previous cluster. Orleans 7.0 changes the wire protocol in an incompatible fashion, meaning that clusters cannot contain a mix of Orleans 7.0 hosts and hosts running previous versions of Orleans. + +We have avoided such breaking changes for many years, even across major releases, so why now? There are two major reasons: identities and serialization. Regarding identities, Grain and stream identities are now comprised of strings, allowing grains to encode generic type information properly and allowing streams to map more easily to the application domain. Grain types were previously identified using a complex data structure that could not represent generic grains, leading to corner cases. Streams were identified by a `string` namespace and a <xref:System.Guid> key, which was difficult for developers to map to their application domain, however efficient. Serialization is now version-tolerant, meaning that you can modify your types in certain compatible ways, following a set of rules, and be confident that you can upgrade your application without serialization errors. This was especially problematic when application types persisted in streams or grain storage. The following sections detail the major changes and discuss them in more detail. + +### Packaging changes + +If you're upgrading a project to Orleans 7.0, you'll need to perform the following actions: + +- All clients should reference [Microsoft.Orleans.Client](https://nuget.org/packages/Microsoft.Orleans.Client). +- All silos (servers) should reference [Microsoft.Orleans.Server](https://nuget.org/packages/Microsoft.Orleans.Server). +- All other packages should reference [Microsoft.Orleans.Sdk](https://nuget.org/packages/Microsoft.Orleans.Sdk). + - Both _client_ and _server_ packages include a reference to [Microsoft.Orleans.Sdk](https://nuget.org/packages/Microsoft.Orleans.Sdk). +- Remove all references to `Microsoft.Orleans.CodeGenerator.MSBuild` and `Microsoft.Orleans.OrleansCodeGenerator.Build`. + - Replace usages of `KnownAssembly` with <xref:Orleans.GenerateCodeForDeclaringAssemblyAttribute>. + - The `Microsoft.Orleans.Sdk` package references the C# Source Generator package (`Microsoft.Orleans.CodeGenerator`). +- Remove all references to `Microsoft.Orleans.OrleansRuntime`. + - The [Microsoft.Orleans.Server](https://nuget.org/packages/Microsoft.Orleans.Server) packages reference its replacement, `Microsoft.Orleans.Runtime`. +- Remove calls to `ConfigureApplicationParts`. +_Application Parts_ has been removed. The C# Source Generator for Orleans is added to all packages (including the client and server) and will generate the equivalent of _Application Parts_ automatically. +- Replace references to `Microsoft.Orleans.OrleansServiceBus` with [Microsoft.Orleans.Streaming.EventHubs](https://nuget.org/packages/Microsoft.Orleans.Streaming.EventHubs) +- If you are using reminders, add a reference to [Microsoft.Orleans.Reminders](https://nuget.org/packages/Microsoft.Orleans.Reminders) +- If you are using streams, add a reference to [Microsoft.Orleans.Streaming](https://nuget.org/packages/Microsoft.Orleans.Streaming) + +> [!TIP] +> All of the Orleans samples have been upgraded to Orleans 7.0 and can be used as a reference for what changes were made. For more information, see [Orleans issue #8035](https://github.com/dotnet/orleans/issues/8035) that itemizes the changes made to each sample. + +## Orleans `global using` directives + +All Orleans projects either directly or indirectly reference the `Microsoft.Orleans.Sdk` NuGet package. When an Orleans project has configured to _enable_ implicit usings (for example `<ImplicitUsings>enable</ImplicitUsings>`), the `Orleans` and `Orleans.Hosting` namespaces are both implicitly used. This means that your app code doesn't need these directives. + +<!-- markdownlint-disable MD044 --> +For more information, see [ImplicitUsings](../core/project-sdk/msbuild-props.md#implicitusings) and [dotnet/orleans/src/Orleans.Sdk/build/Microsoft.Orleans.Sdk.targets](https://github.com/dotnet/orleans/blob/main/src/Orleans.Sdk/build/Microsoft.Orleans.Sdk.targets#L4-L5). +<!-- markdownlint-enable MD044 --> + +## Hosting + +The <xref:Orleans.ClientBuilder> type has been replaced with a <xref:Microsoft.Extensions.Hosting.OrleansClientGenericHostExtensions.UseOrleansClient%2A> extension method on <xref:Microsoft.Extensions.Hosting.IHostBuilder>. The `IHostBuilder` type comes from the [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting) NuGet package. This means that you can add an Orleans client to an existing host without having to create a separate dependency injection container. The client connects to the cluster during startup. Once <xref:Microsoft.Extensions.Hosting.IHost.StartAsync%2A?displayProperty=nameWithType> has completed, the client will be connected automatically. Services added to the `IHostBuilder` are started in the order of registration, so call `UseOrleansClient` before calling <xref:Microsoft.Extensions.Hosting.GenericHostBuilderExtensions.ConfigureWebHostDefaults%2A> will ensure Orleans is started before ASP.NET Core starts for example, allowing you to access the client from your ASP.NET Core application immediately. + +If you wish to emulate the previous `ClientBuilder` behavior, you can create a separate `HostBuilder` and configure it with an Orleans client. `IHostBuilder` can have either an Orleans client or an Orleans silo configured. All silos register an instance of <xref:Orleans.IGrainFactory> and <xref:Orleans.IClusterClient> which the application can use, so configuring a client separately is unnecessary and unsupported. + +## `OnActivateAsync` and `OnDeactivateAsync` signature change + +Orleans allows grains to execute code during activation and deactivation. This can be used to perform tasks such as reading state from storage or log lifecycle messages. In Orleans 7.0, the signature of these lifecycle methods changed: + +- <xref:Orleans.Grain.OnActivateAsync> now accepts a <xref:System.Threading.CancellationToken> parameter. When the <xref:System.Threading.CancellationToken> is canceled, the activation process should be abandoned. +- <xref:Orleans.Grain.OnDeactivateAsync> now accepts a <xref:Orleans.DeactivationReason> parameter and a `CancellationToken` parameter. The `DeactivationReason` indicates why the activation is being deactivated. Developers are expected to use this information for logging and diagnostics purposes. When the `CancellationToken` is canceled, the deactivation process should be completed promptly. Note that since any host can fail at any time, it is not recommended to rely on `OnDeactivateAsync` to perform important actions such as persisting critical state. + +Consider the following example of a grain overriding these new methods: + +```csharp +public sealed class PingGrain : Grain, IPingGrain +{ + private readonly ILogger<PingGrain> _logger; + + public PingGrain(ILogger<PingGrain> logger) => + _logger = logger; + + public override Task OnActivateAsync(CancellationToken cancellationToken) + { + _logger.LogInformation("OnActivateAsync()"); + return Task.CompletedTask; + } + + public override Task OnDeactivateAsync(DeactivationReason reason, CancellationToken token) + { + _logger.LogInformation("OnDeactivateAsync({Reason})", reason); + return Task.CompletedTask; + } + + public ValueTask Ping() => ValueTask.CompletedTask; +} +``` + +## POCO Grains and `IGrainBase` + +Grains in Orleans no longer need to inherit from the <xref:Orleans.Grain> base class or any other class. This functionality is referred to as [POCO](../standard/glossary.md#poco) grains. To access extension methods such as any of the following: + +- <xref:Orleans.GrainBaseExtensions.DeactivateOnIdle%2A> +- <xref:Orleans.GrainExtensions.AsReference%2A> +- <xref:Orleans.GrainExtensions.Cast%2A> +- <xref:Orleans.GrainExtensions.GetPrimaryKey%2A> +- <xref:Orleans.GrainReminderExtensions.GetReminder%2A> +- <xref:Orleans.GrainReminderExtensions.GetReminders%2A> +- <xref:Orleans.GrainReminderExtensions.RegisterOrUpdateReminder%2A> +- <xref:Orleans.GrainReminderExtensions.UnregisterReminder%2A> +- <xref:Orleans.GrainStreamingExtensions.GetStreamProvider%2A> + +Your grain must either implement <xref:Orleans.IGrainBase> or inherit from <xref:Orleans.Grain>. Here is an example of implementing `IGrainBase` on a grain class: + +```csharp +public sealed class PingGrain : IGrainBase, IPingGrain +{ + public PingGrain(IGrainContext context) => GrainContext = context; + + public IGrainContext GrainContext { get; } + + public ValueTask Ping() => ValueTask.CompletedTask; +} +``` + +`IGrainBase` also defines `OnActivateAsync` and `OnDeactivateAsync` with default implementations, allowing your grain to participate in its lifecycle if desired: + +```csharp +public sealed class PingGrain : IGrainBase, IPingGrain +{ + private readonly ILogger<PingGrain> _logger; + + public PingGrain(IGrainContext context, ILogger<PingGrain> logger) + { + _logger = logger; + GrainContext = context; + } + + public IGrainContext GrainContext { get; } + + public Task OnActivateAsync(CancellationToken cancellationToken) + { + _logger.LogInformation("OnActivateAsync()"); + return Task.CompletedTask; + } + + public Task OnDeactivateAsync(DeactivationReason reason, CancellationToken token) + { + _logger.LogInformation("OnDeactivateAsync({Reason})", reason); + return Task.CompletedTask; + } + + public ValueTask Ping() => ValueTask.CompletedTask; +} +``` + +## Serialization + +The most burdensome change in Orleans 7.0 is the introduction of the version-tolerant serializer. This change was made because applications tend to evolve and this led to a significant pitfall for developers, since the previous serializer couldn't tolerate adding properties to existing types. On the other hand, the serializer was flexible, allowing developers to represent most .NET types without modification, including features such as generics, polymorphism, and reference tracking. A replacement was long overdue, but users still need the high-fidelity representation of their types. Therefore, a replacement serializer was introduced in Orleans 7.0 which supports the high-fidelity representation of .NET types while also allowing types to evolve. The new serializer is much more efficient than the previous serializer, resulting in up to 170% higher end-to-end throughput. + +For more information, see the following articles as it relates to Orleans 7.0: + +- [Serialization overview](host/configuration-guide/serialization.md?pivots=orleans-7.0) +- [Serialization configuration](host/configuration-guide/serialization-configuration.md?pivots=orleans-7.0) +- [Serialization customization](host/configuration-guide/serialization-customization.md?pivots=orleans-7.0) + +## Grain identities + +Grains each have a unique identity which is comprised of the grain's type and its key. Previous versions of Orleans used a compound type for `GrainId`s to support grain keys of either: + +- <xref:System.Guid> +- [`long`](xref:System.Int64) +- [string](xref:System.String) +- <xref:System.Guid>+ [string](xref:System.String) +- [`long`](xref:System.Int64) + [string](xref:System.String) + +This involves some complexity when it comes to dealing with grain keys. Grain identities consist of two components: a type and a key. The type component previously consisted of a numeric type code, a category, and 3 bytes of generic type information. + +Grain identities now take the form `type/key` where both `type` and `key` are strings. The most commonly used grain key interface is the <xref:Orleans.IGrainWithStringKey>. This greatly simplifies how grain identity works and improves support for generic grain types. + +Grain interfaces are also now represented using a human-readable name, rather than a combination of a hash code and a string representation of any generic type parameters. + +The new system is more customizable and these customizations can be driven by attributes. + +- <xref:Orleans.GrainTypeAttribute.%23ctor(System.String)> on a grain `class` specifies the *Type* portion of its grain id. +- <xref:Orleans.Metadata.DefaultGrainTypeAttribute.%23ctor(System.String)> on a grain `interface` specifies the *Type* of the grain which <xref:Orleans.IGrainFactory> should resolve by default when getting a grain reference. For example, when calling `IGrainFactory.GetGrain<IMyGrain>("my-key")`, the grain factory will return a reference to the grain `"my-type/my-key"` if `IMyGrain` has the aforementioned attribute specified. +- <xref:Orleans.Runtime.GrainInterfaceTypeAttribute.%23ctor(System.String)> allows overriding the interface name. Specifying a name explicitly using this mechanism allows renaming of the interface type without breaking compatibility with existing grain references. Note that your interface should also have the <xref:Orleans.AliasAttribute> in this case, since its identity may be serialized. For more information on specifying a type alias, see the section on serialization. + +As mentioned above, overriding the default grain class and interface names for your types allows you to rename the underlying types without breaking compatibility with existing deployments. + +## Stream identities + +When Orleans streams were first released, streams could only be identified using a <xref:System.Guid>. This was efficient in terms of memory allocation, but it was difficult for users to create meaningful stream identities, often requiring some encoding or indirection to determine the appropriate stream identity for a given purpose. + +In Orleans 7.0, streams are now identified using strings. The <xref:Orleans.Runtime.StreamId?displayProperty=fullName> `struct` contains three properties: a <xref:Orleans.Runtime.StreamId.Namespace?displayProperty=nameWithType>, a <xref:Orleans.Runtime.StreamId.Key?displayProperty=nameWithType>, and a <xref:Orleans.Runtime.StreamId.FullKey?displayProperty=nameWithType>. These property values are encoded UTF-8 strings. For example, <xref:Orleans.Runtime.StreamId.Create(System.String,System.String)?displayProperty=nameWithType>. + +### Replacement of SimpleMessageStreams with BroadcastChannel + +`SimpleMessageStreams` (also called SMS) was removed in 7.0. SMS had the same interface as <xref:Orleans.Providers.Streams.PersistentStreams?displayProperty=fullName>, but its behavior was very different, since it relied on direct grain-to-grain calls. To avoid confusion, SMS was removed, and a new replacement called <xref:Orleans.BroadcastChannel?displayProperty=fullName> was introduced. + +`BroadcastChannel` only supports implicit subscriptions and can be a direct replacement in this case. If you need explicit subscriptions or need to use the `PersistentStream` interface (for example you were using SMS in tests while using `EventHub` in production), then `MemoryStream` is the best candidate for you. + +`BroadcastChannel` will have the same behaviors as SMS, while `MemoryStream` will behave like other stream providers. Consider the following Broadcast Channel usage example: + +```csharp +// Configuration +builder.AddBroadcastChannel( + "my-provider", + options => options.FireAndForgetDelivery = false); + +// Publishing +var grainKey = Guid.NewGuid().ToString("N"); +var channelId = ChannelId.Create("some-namespace", grainKey); +var stream = provider.GetChannelWriter<int>(channelId); + +await stream.Publish(1); +await stream.Publish(2); +await stream.Publish(3); + +// Simple implicit subscriber example +[ImplicitChannelSubscription] +public sealed class SimpleSubscriberGrain : Grain, ISubscriberGrain, IOnBroadcastChannelSubscribed +{ + // Called when a subscription is added to the grain + public Task OnSubscribed(IBroadcastChannelSubscription streamSubscription) + { + streamSubscription.Attach<int>( + item => OnPublished(streamSubscription.ChannelId, item), + ex => OnError(streamSubscription.ChannelId, ex)); + + return Task.CompletedTask; + + // Called when an item is published to the channel + static Task OnPublished(ChannelId id, int item) + { + // Do something + return Task.CompletedTask; + } + + // Called when an error occurs + static Task OnError(ChannelId id, Exception ex) + { + // Do something + return Task.CompletedTask; + } + } +} +``` + +Migration to `MemoryStream` will be easier, since only the configuration needs to change. Consider the following `MemoryStream` configuration: + +```csharp +builder.AddMemoryStreams<DefaultMemoryMessageBodySerializer>( + "in-mem-provider", + _ => + { + // Number of pulling agent to start. + // DO NOT CHANGE this value once deployed, if you do rolling deployment + _.ConfigurePartitioning(partitionCount: 8); + }); +``` + +## OpenTelemetry + +The telemetry system has been updated in Orleans 7.0 and the previous system has been removed in favor of standardized .NET APIs such as .NET Metrics for metrics and <xref:System.Diagnostics.ActivitySource> for tracing. + +As a part of this, the existing `Microsoft.Orleans.TelemetryConsumers.*` packages have been removed. We are considering introducing a new set of packages to streamline the process of integrating the metrics emitted by Orleans into your monitoring solution of choice. As always, feedback and contributions are welcome. + +The `dotnet-counters` tool features performance monitoring for ad-hoc health monitoring and first-level performance investigation. For Orleans counters, the [dotnet-counters](../core/diagnostics/dotnet-counters.md) tool can be used to monitor them: + +```dotnetcli +dotnet counters monitor -n MyApp --counters Microsoft.Orleans +``` + +Similarly, OpenTelemetry metrics can add the `Microsoft.Orleans` meters, as shown in the following code: + +```csharp +builder.Services.AddOpenTelemetry() + .WithMetrics(metrics => metrics + .AddPrometheusExporter() + .AddMeter("Microsoft.Orleans")); +``` + +To enable distributed tracing, you configure OpenTelemetry as shown in the following code: + +```csharp +builder.Services.AddOpenTelemetry() + .WithTracing(tracing => + { + tracing.SetResourceBuilder(ResourceBuilder.CreateDefault() + .AddService(serviceName: "ExampleService", serviceVersion: "1.0")); + + tracing.AddAspNetCoreInstrumentation(); + tracing.AddSource("Microsoft.Orleans.Runtime"); + tracing.AddSource("Microsoft.Orleans.Application"); + + tracing.AddZipkinExporter(options => + { + options.Endpoint = new Uri("http://localhost:9411/api/v2/spans"); + }); + }); +``` + +In the preceding code, OpenTelemetry is configured to monitor: + +- `Microsoft.Orleans.Runtime` +- `Microsoft.Orleans.Application` + +To propagate activity, call <xref:Orleans.Hosting.ClientBuilderExtensions.AddActivityPropagation%2A>: + +```csharp +builder.Host.UseOrleans((_, clientBuilder) => +{ + clientBuilder.AddActivityPropagation(); +}); +``` + +## Refactor features from core package into separate packages + +In Orleans 7.0, we have made an effort to factor extensions into separate packages which don't rely on <xref:Orleans.Core?displayName=fullName>. Namely, <xref:Orleans.Streaming?displayName=fullName>, <xref:Orleans.Reminders?displayName=fullName>, and <xref:Orleans.Transactions?displayName=fullName> have been separated from the core. This means that these packages are entirely *pay* for what you _use_ and no code in the core of Orleans is dedicated to these features. This slims down the core API surface and assembly size, simplifies the core, and improves performance. Regarding performance, Transactions in Orleans previously required some code which was executed for every method to coordinate potential transactions. That has since been moved to per-method. + +This is a compilation-breaking change. You may have existing code that interacts with reminders or streams by calling into methods which were previously defined on the <xref:Orleans.Grain> base class but are now extension methods. Such calls which do not specify `this` (for example <xref:Orleans.GrainReminderExtensions.GetReminders%2A>) will need to be updated to include `this` (for example `this.GetReminders()`) because extension methods must be qualified. There will be a compilation error if you do not update those calls and the required code change may not be obvious if you do not know what has changed. + +## Transaction client + +Orleans 7.0 introduces a new abstraction for coordinating transactions, <xref:Orleans.ITransactionClient?displayProperty=fullName>. Previously, transactions could only be coordinated by grains. With `ITransactionClient`, which is available via dependency injection, clients can also coordinate transactions without needing an intermediary grain. The following example withdraws credits from one account and deposits them into another within a single transaction. This code can be called from within a grain or from an external client which has retrieved the `ITransactionClient` from the dependency injection container. + +```csharp +await transactionClient.RunTransaction( + TransactionOption.Create, + () => Task.WhenAll(from.Withdraw(100), to.Deposit(100))); +``` + +For transactions coordinated by the client, the client must add the required services during configuration time: + +``` csharp +clientBuilder.UseTransactions(); +``` + +The [BankAccount](https://github.com/dotnet/samples/tree/main/orleans/BankAccount) sample demonstrates the usage of `ITransactionClient`. For more information, see [Orleans transactions](grains/transactions.md). + +## Call chain reentrancy + +Grains are single-threaded and process requests one by one from beginning to completion by default. In other words, grains are not reentrant by default. Adding the <xref:Orleans.Concurrency.ReentrantAttribute> to a grain class allows for multiple requests be processed concurrently, in an interleaving fashion, while still being single-threaded. This can be useful for grains that hold no internal state or perform a lot of asynchronous operations, such as issuing HTTP calls or writing to a database. Extra care needs to be taken when requests can interleave: it's possible that the state of a grain is observed before an `await` statement has changed by the time the asynchronous operation completes and the method resumes execution. + +For example, the following grain represents a counter. It has been marked `Reentrant`, allowing multiple calls to interleave. The `Increment()` method should increment the internal counter and return the observed value. However, since the `Increment()` method body observes the grain's state before an `await` point and updates it afterwards, it is possible that multiple interleaving executions of `Increment()` can result in a `_value` less than the total number of `Increment()` calls received. This is an error introduced by improper use of reentrancy. + +Removing the <xref:Orleans.Concurrency.ReentrantAttribute> is enough to fix the problem. + +```csharp +[Reentrant] +public sealed class CounterGrain : Grain, ICounterGrain +{ + int _value; + + /// <summary> + /// Increments the grain's value and returns the previous value. + /// </summary> + public Task<int> Increment() + { + // Do not copy this code, it contains an error. + var currentVal = _value; + await Task.Delay(TimeSpan.FromMilliseconds(1_000)); + _value = currentVal + 1; + return currentValue; + } +} +``` + +To prevent such errors, grains are non-reentrant by default. The downside to this is reduced throughput for grains that perform asynchronous operations in their implementation, since other requests cannot be processed while the grain is waiting for an asynchronous operation to complete. To alleviate this, Orleans offers several options to allow reentrancy in certain cases: + +- For an entire class: placing the <xref:Orleans.Concurrency.ReentrantAttribute> on the grain allows any request to the grain to interleave with any other request. +- For a subset of methods: placing the <xref:Orleans.Concurrency.AlwaysInterleaveAttribute> on the grain *interface* method allows requests to that method to interleave with any other request and for requests to that method to be interleaved by any other request. +- For a subset of methods: placing the <xref:Orleans.Concurrency.ReadOnlyAttribute> on the grain *interface* method allows requests to that method to interleave with any other `ReadOnly` request and for requests to that method to be interleaved by any other `ReadOnly` request. In this sense, it is a more restricted form of `AlwaysInterleave`. +- For any request within a call chain: <xref:Orleans.Runtime.RequestContext.AllowCallChainReentrancy?displayProperty=nameWithType> and <xref:Orleans.Runtime.RequestContext.SuppressCallChainReentrancy?displayProperty=nameWithType allows opting in and out of allowing downstream requests to reenter back into the grain. The calls both return a value that _must_ be disposed of while exiting the request. Therefore, the proper usage is as follows: + +``` csharp +public Task<int> OuterCall(IMyGrain other) +{ + // Allow call-chain reentrancy for this grain, for the duration of the method. + using var _ = RequestContext.AllowCallChainReentrancy(); + await other.CallMeBack(this.AsReference<IMyGrain>()); +} + +public Task CallMeBack(IMyGrain grain) +{ + // Because OuterCall allowed reentrancy back into that grain, this method + // will be able to call grain.InnerCall() without deadlocking. + await grain.InnerCall(); +} + +public Task InnerCall() => Task.CompletedTask; +``` + +Call-chain reentrancy must be opted-in per-grain, per-call-chain. For example, consider two grains, grain A & grain B. If grain A enables call chain reentrancy before calling grain B, grain B can call back into grain A in that call. However, grain A cannot call back into grain B if grain B has not *also* enabled call chain reentrancy. It is per-grain, per-call-chain. + +Grains can also suppress call chain reentrancy information from flowing down a call chain using `using var _ = RequestContext.SuppressCallChainReentrancy()`. This prevents subsequent calls from reentry. + +### ADO.NET migration scripts + +To ensure forward compatibility with Orleans clustering, persistence, and reminders that rely on ADO.NET, you'll need the appropriate SQL migration script: + +* [Clustering](https://github.com/dotnet/orleans/tree/main/src/AdoNet/Orleans.Clustering.AdoNet/Migrations) +* [Persistence](https://github.com/dotnet/orleans/tree/main/src/AdoNet/Orleans.Persistence.AdoNet/Migrations) +* [Reminders](https://github.com/dotnet/orleans/tree/main/src/AdoNet/Orleans.Reminders.AdoNet/Migrations) + +Select the files for the database used and apply them in order. diff --git a/docs/orleans/quickstarts/build-your-first-orleans-app.md b/docs/orleans/quickstarts/build-your-first-orleans-app.md index 1a9493b0a01bb..97db140f429f2 100644 --- a/docs/orleans/quickstarts/build-your-first-orleans-app.md +++ b/docs/orleans/quickstarts/build-your-first-orleans-app.md @@ -67,13 +67,13 @@ At the end of the quickstart, you'll have an app that creates and handles redire ## Add Orleans to the project -Orleans is available through a collection of NuGet packages, each of which provides access to various features. For this quickstart, add the [Orleans.Server](https://www.nuget.org/packages/Orleans.Server) NuGet package to the app using the steps below: +Orleans is available through a collection of NuGet packages, each of which provides access to various features. For this quickstart, add the [Microsoft.Orleans.Server](https://www.nuget.org/packages/Microsoft.Orleans.Server) NuGet package to the app using the steps below: # [Visual Studio](#tab/visual-studio) - Right-click on the **OrleansURLShortener** project node in the solution explorer and select **Manage NuGet Packages**. - In the package manager window, search for *Orleans*. -- Choose the **Orleans.Server** package from the search results and then select **Install**. +- Choose the **Microsoft.Orleans.Server** package from the search results and then select **Install**. # [Visual Studio Code](#tab/visual-studio-code) @@ -102,7 +102,7 @@ app.Run(); ## Configure the silos -[Silos](/dotnet/orleans/overview#what-are-silos) are a core building block of Orleans responsible for storing and managing grains. A silo can contain one or more grains; a group of silos is known as a cluster. The cluster coordinates work between silos, allowing communication with grains as though they were all available in a single process. +[Silos](../overview.md#what-are-silos) are a core building block of Orleans responsible for storing and managing grains. A silo can contain one or more grains; a group of silos is known as a cluster. The cluster coordinates work between silos, allowing communication with grains as though they were all available in a single process. At the top of the _Program.cs_ file, refactor the code to use Orleans. The following code uses a <xref:Orleans.Hosting.ISiloBuilder> class to create a localhost cluster with a silo that can store grains. The `ISiloBuilder` also uses the `AddMemoryGrainStorage` to configure the Orleans silos to persist grains in memory. This scenario uses local resources for development, but a production app can be configured to use highly scalable clusters and storage using services like Azure Blob Storage. diff --git a/docs/orleans/quickstarts/deploy-scale-orleans-on-azure.md b/docs/orleans/quickstarts/deploy-scale-orleans-on-azure.md new file mode 100644 index 0000000000000..e56eb540949bd --- /dev/null +++ b/docs/orleans/quickstarts/deploy-scale-orleans-on-azure.md @@ -0,0 +1,172 @@ +--- +title: 'Quickstart: Deploy and scale an Orleans app on Azure' +description: Learn how to host and scale an Orleans app on Azure +author: alexwolfmsft +ms.author: alexwolf +ms.date: 12/16/2022 +ms.topic: quickstart +ms.devlang: csharp +--- + +# Quickstart: Deploy and scale an Orleans app on Azure + +In this quickstart, you'll deploy and scale an Orleans URL shortener app on Azure Container Apps. The app allows users to submit a full URL to the app, which will return a shortened version they can share with others to direct them to the original site. Orleans and Azure provide the scalability features necessary to host high traffic apps like URL shorteners. Orleans is also compatible with any other hosting service that supports .NET. + +At the end of this quickstart, you'll have a scalable app running in Azure to provide URL shortener functionality. Along the way you'll learn to: + +* Configure an Orleans app for Azure hosting +* Deploy an Orleans app to Azure Container Apps +* Scale the app to multiple instances +* Verify where Orleans stores state data in Azure + +## Prerequisites + +- [.NET 7.0 SDK](https://dotnet.microsoft.com/download) +- [Visual Studio 2022](https://visualstudio.microsoft.com/) with the ASP.NET and web development workload +- An Azure Account - [sign up for free](https://azure.microsoft.com/free/) + +## Setup the sample app + +This quickstart builds on the sample app from the [Build your first Orleans app](build-your-first-orleans-app.md) quickstart, which can be cloned from GitHub using the command below. Completing the previous quickstart is not a prerequisite for the steps ahead. You can also [download the app directly](https://github.com/Azure-Samples/build-your-first-orleans-app-aspnetcore/archive/refs/heads/main.zip). + +```bash +git clone https://github.com/Azure-Samples/build-your-first-orleans-app-aspnetcore +``` + +## Configure the sample app + +The sample app is currently configured to create a localhost cluster and persist grains in memory. When hosted in Azure, Orleans can be configured to use more scalable, centralized state using services like Azure Table Storage and Azure Blob Storage. + +Update the `builder` configuration code in the `Program.cs` file to match the example below, which implements these key concepts: + +* A conditional environment check is added to ensure the app runs properly in both local development and Azure hosted scenarios. +* The `UseAzureStorageClustering` method configures the Orleans cluster to use Azure Table Storage and authenticates using a connection string. +* Use the `Configure` method to assign IDs for the Orleans cluster. The `ClusterID` is a unique ID for the cluster that allows clients and silos to talk to one another. The `ClusterID` can change across deployments. The `ServiceID` is a unique ID for the application that is used internally by Orleans and should remain consistent across deployments. + + ```csharp + var builder = WebApplication.CreateBuilder(); + + if (builder.Environment.IsDevelopment()) + { + builder.Host.UseOrleans(builder => + { + builder.UseLocalhostClustering(); + builder.AddMemoryGrainStorage("urls"); + }); + } else + { + builder.Host.UseOrleans(builder => + { + var connectionString = "your_storage_connection_string"; + + builder.UseAzureStorageClustering(options => + options.ConfigureTableServiceClient(connectionString)) + .AddAzureTableGrainStorage("urls", + options => options.ConfigureTableServiceClient(connectionString)); + builder.Configure<ClusterOptions>(options => + { + options.ClusterId = "url-shortener"; + options.ServiceId = "urls"; + }); + }); + } + + var app = builder.Build(); + ``` + +## Create the Azure Storage account + +Create an Azure Storage account to hold the cluster and persistent state data you configured in the previous step. + +1. In the Azure portal, select **Storage accounts** from the left navigation. +1. On the **Storage accounts** listing page, select **Create**. +1. On the **Create a storage account** page, enter the following values: + * **Subscription**: Select the subscription you plan to use. + * **Resource group**: Select **Create new** and then enter a name of *msdocs-url-shortener*. + * **Storage account name**: Enter the name *OrleansUrlShortenerXXX* where XXX are unique numbers. Storage account names must be unique across Azure. + * **Region**: Select a region that is near your location. + * Leave the rest of the options at their defaults, and then select **Review**. + * Select **Create** after Azure validates your settings. + + :::image type="content" source="../media/create-storage-account-small.png" alt-text="A screenshot showing how to create a storage account." lightbox="../media/create-storage-account.png"::: + +1. Select **Go to resource** after the storage account is created. + +## Configure the connection to Azure Storage + +1. On the storage account overview page, select **Access keys** on the left navigation. +1. On the Access keys page, next to **Connection string** select **Show**, and then copy the value. + + :::image type="content" source="../media/storage-connection-string.png" alt-text="A screenshot showing how to retrieve the storage connection string."::: + +1. Inside of Visual Studio, replace the `your_storage_connection_string` placeholder with the value you copied from the storage account. + + ```csharp + var connectionString = "your_storage_connection_string"; + ``` + +## Deploy to Azure Container Apps + +1. In the Visual Studio solution explorer, right click on the top level project node and select **Add > Dockerfile**. Visual Studio creates a Dockerfile at the root of your project. This will enable containerization for your app and allow it to run on Azure container apps. +1. In the Visual Studio solution explorer, right-click on the top level project node and select **Publish**. +1. In the publishing dialog, select **Azure** as the deployment target, and then select **Next**. +1. For the specific target, select **Azure Container Apps (Linux)**, and then select **Next**. +1. Create a new container app to deploy to. Select the **+ Create new** button to open a new dialog and enter the following values: + * **Container app name**: Leave the default value. + * **Subscription name**: Select the subscription to deploy to. + * **Resource group**: Select the **msdocs-url-shortener** group you created earlier. + * **Container apps environment**: Select **New** to open the container apps environment dialog and enter the following values: + * **Environment name**: Keep the default value. + * **Location**: Select a location near you. + * **Azure Log Analytics Workspace**: Select **New** to open the log analytics workspace dialog. + * **Name**: Leave the default value. + * **Location**: Select a location near you and then select **Ok** to close the dialog. + * Select **Ok** to close the container apps environment dialog. + * Select **Create** to close the original container apps dialog. Visual Studio creates the container app resource in Azure. + + :::image type="content" source="../media/deploy-container-apps.png" alt-text="A screenshot showing how to create a container app."::: + +1. Once the resource is created, make sure it's selected in the list of container apps, and then select **Next**. +1. You'll need to create an Azure Container Registry to store the published image artifact for your app. Select the green **+** icon on the container registry screen. + + :::image type="content" source="../media/deploy-container-apps.png" alt-text="A screenshot showing how to create a new container registry."::: + +1. Leave the default values, and then select **Create**. +1. After the container registry is created, make sure it's selected, and then select **Next**. +1. Select **Publish (generates pubxml file)**, and then select **Finish**. +1. On the publishing profile overview, select **Publish** to deploy the app to Azure. + +When the deployment finishes, Visual Studio will launch the application in the browser. + +## Test and verify the app behavior + +1. In the browser address bar, test the `shorten` endpoint by adding a URL path such as `/shorten/www.microsoft.com`. The page should reload and provide a new URL with a shortened path at the end. Copy the new URL to your clipboard. + +1. Paste the shortened URL into the address bar and press enter. The page should reload and redirect you to [https://microsoft.com](https://microsoft.com). + + > [!NOTE] + > By default, Azure Container Apps have lengthy domain names, so the shortened URL is still quite long. In a production app you can assign a custom domain name to improve this setup. + +Optionally, you can verify that the cluster and state data is stored as expected in the storage account you created. + +1. In the Azure portal, navigate to the overview page of the `UrlShortenerXXX` storage account. +1. On the left navigation, select **Storage browser**. +1. Expand the **Tables** navigation item to discover two tables created by Orleans: + * **OrleansGrainState**: This table stores the persistent state grain data used by the application to handle the URL redirects. + * **OrleansSiloInstances**: This table tracks essential silo data for the Orleans cluster. +1. Select the **OrleansGrainState** table. The table holds a row entry for every URL redirect persisted by the app during your testing. + + :::image type="content" source="../media/table-storage.png" alt-text="A screenshot showing Orleans data in Azure Table Storage."::: + +## Scale the app + +Orleans is designed for distributed applications. Even an app as simple as the URL shortener can benefit from the scalability of Orleans. You can scale and test your app across multiple instances using the following steps: + +1. On the container app overview page, select **Scale** on the left navigation. +1. Select **Edit and deploy**, and then switch to the **Scale** tab. +1. Use the slider control to set the min and max replica values to 4. This will ensure the app is running on multiple instances. +1. Select **Create** to deploy the new revision. + + :::image type="content" source="../media/scale-containers.png" alt-text="A screenshot showing how to scale the container app."::: + +After the deployment is finished, repeat the testing steps from the previous section. The app will continue to work as expected across several instances and can now handle a higher number of requests. diff --git a/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener/Program.cs b/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener/Program.cs index 507f7d8b73182..a58c47522b41a 100644 --- a/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener/Program.cs +++ b/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener/Program.cs @@ -16,18 +16,18 @@ // <Endpoints> app.MapGet("/", () => "Hello World!"); -app.MapGet("/shorten/{*path}", - async (IGrainFactory grains, HttpRequest request, string path) => +app.MapGet("/shorten", + async (IGrainFactory grains, HttpRequest request, string redirect) => { // Create a unique, short ID var shortenedRouteSegment = Guid.NewGuid().GetHashCode().ToString("X"); // Create and persist a grain with the shortened ID and full URL var shortenerGrain = grains.GetGrain<IUrlShortenerGrain>(shortenedRouteSegment); - await shortenerGrain.SetUrl(path); + await shortenerGrain.SetUrl(redirect); // Return the shortened URL for later use - var resultBuilder = new UriBuilder(request.GetEncodedUrl()) + var resultBuilder = new UriBuilder($"{ request.Scheme }://{ request.Host.Value}") { Path = $"/go/{shortenedRouteSegment}" }; diff --git a/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener/orleansurlshortener.csproj b/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener/orleansurlshortener.csproj index 2149a70f57b93..cfd3d6a895f85 100644 --- a/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener/orleansurlshortener.csproj +++ b/docs/orleans/quickstarts/snippets/url-shortener/orleansurlshortener/orleansurlshortener.csproj @@ -7,9 +7,9 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.1" /> - <PackageReference Include="Microsoft.Orleans.Server" Version="7.0.0" /> - <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> + <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" /> + <PackageReference Include="Microsoft.Orleans.Server" Version="7.1.1" /> + <PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" /> </ItemGroup> </Project> diff --git a/docs/orleans/resources/links.md b/docs/orleans/resources/links.md index 43f4f1c583fc8..444af75d1e9c7 100644 --- a/docs/orleans/resources/links.md +++ b/docs/orleans/resources/links.md @@ -32,7 +32,6 @@ In this article, you'll discover a listing of various links from the Orleans tea - [Actor Programming with Orleans: What's Different?](https://www.postsharp.net/blog/post/Actor-Programming-with-Orleans-Whats-Different) - [Project Orleans - Actor Model framework](https://www.slideshare.net/nmackenzie/project-orleans) - [A look at Microsoft Orleans through Erlang-tinted glasses](https://theburningmonk.com/2014/12/a-look-at-microsoft-orleans-through-erlang-tinted-glasses/) -- [Using Codename "Orleans" in Enterprise Applications](https://blogs.msdn.com/b/msarchitecture/archive/2014/06/09/using-codename-orleans-in-enterprise-applications.aspx) - [Intro to Virtual Actors By Microsoft Orleans](https://bogdan-dina03.medium.com/intro-to-virtual-actors-by-microsoft-orleans-6ae3264f138d) ### Beyond the introduction @@ -41,12 +40,10 @@ In this article, you'll discover a listing of various links from the Orleans tea - [Fine-graining your Orleans Grains inside the IoT universe](https://encloudify.blogspot.nl/2014/05/fine-graining-your-orleans-grains.html) - [Monitorable Grains](https://encloudify.blogspot.nl/2014/05/monitorable-grains.html) - [Aggregating Results in Orleans](https://coderead.wordpress.com/2014/06/10/aggregating-results-in-orleans/) -- [Creating RESTful Services using Orleans](https://caitiem.com/2014/04/04/creating-restful-services-using-orleans/) - [Tackle Distribution, High Throughput and Low-Latency with Orleans – A "cloud native" Runtime Built for #Azure](https://alexandrebrisebois.wordpress.com/2014/04/05/tackle-distribution-high-throughput-and-low-latency-with-orleans-a-cloud-native-runtime-built-for-azure/) - [Saving state only once in a while in #ProjectOrleans](https://blog.geuer-pollmann.de/blog/2014/05/14/saving-state-only-once-in-a-while-in-project-orleans/) - [Using Orleans for building scalable cloud applications](https://channel9.msdn.com/Events/TechDays/Techdays-2014-the-Netherlands/Using-Orleans-for-building-scalable-cloud-applications) - [Orleans in an IoT universe](https://encloudify.blogspot.nl/2014/05/orleans-in-iot-universe.html) -- [Orleans Preview & Halo 4](https://caitiem.com/2014/04/03/orleans-preview-halo-4/) - [Using Project "Orleans" in Halo](https://hoopsomuah.com/2014/04/06/using-project-orleans-in-halo/) - [Orleans & Thinking Outside the Box](https://msdevshow.com/2014/05/orleans-and-thinking-outside-the-box/) - [John Azariah & Mahesh Krishnan - Immutability, State and Scale - Functional, Distributed Applications in Azure](https://vimeo.com/97315938) diff --git a/docs/orleans/resources/nuget-packages.md b/docs/orleans/resources/nuget-packages.md index 49fc6d3698a59..45dd5b833eb05 100644 --- a/docs/orleans/resources/nuget-packages.md +++ b/docs/orleans/resources/nuget-packages.md @@ -1,16 +1,126 @@ --- title: Orleans NuGet packages description: Explore the many .NET Orleans NuGet packages. -ms.date: 03/21/2022 +ms.date: 03/07/2023 +zone_pivot_groups: orleans-version --- # Orleans NuGet packages -## Key Packages +Consumers of Orleans rely on various NuGet packages to achieve specific desired behaviors. There are several common packages and abstractions, and many individual single purpose packages. This article provides insights to help developers learn which Orleans packages should be used. + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-7-0" +<!-- markdownlint-enable MD044 --> + +## Key packages + +You reference one of two mutually exclusive NuGet packages when writing Orleans apps, depending on the chosen workload. For example, when you write an Orleans Silo, you'll reference the [Microsoft.Orleans.Server](https://www.nuget.org/packages/Microsoft.Orleans.Server) NuGet package. When you write an Orleans Client app, you'll reference the [Microsoft.Orleans.Client](https://www.nuget.org/packages/Microsoft.Orleans.Client) NuGet package. All Orleans projects, such as abstractions or grain class libraries, reference the [Microsoft.Orleans.Sdk](https://www.nuget.org/packages/Microsoft.Orleans.Sdk) NuGet package. The `Microsoft.Orleans.Sdk` package is included with both the `Client` and `Server` packages. + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.Client](https://www.nuget.org/packages/Microsoft.Orleans.Client) | Client-exclusive package, required for Orleans client. | +| [Microsoft.Orleans.Sdk](https://www.nuget.org/packages/Microsoft.Orleans.Sdk) | Metapackage required by all Orleans apps, server and client packages depend on this package. | +| [Microsoft.Orleans.Server](https://www.nuget.org/packages/Microsoft.Orleans.Server) | Server-exclusive package, required for Orleans silos. | + +For information on installing NuGet packages, see the following options: + +- [.NET CLI: dotnet add package](../../core/tools/dotnet-add-package.md) +- [Ways to install a NuGet package](/nuget/consume-packages/overview-and-workflow#ways-to-install-a-nuget-package) + +## Hosting + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.Hosting.AzureCloudServices](https://www.nuget.org/packages/Microsoft.Orleans.Hosting.AzureCloudServices) | Hosting utilities for Azure Cloud Services of Orleans. | +| [Microsoft.Orleans.Hosting.Kubernetes](https://www.nuget.org/packages/Microsoft.Orleans.Hosting.Kubernetes) | Orleans hosting support for Kubernetes. | +| [Microsoft.Orleans.Runtime](https://www.nuget.org/packages/Microsoft.Orleans.Runtime) | Core runtime library of Orleans that hosts and executes grains within a silo. | + +## Clustering providers + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.Clustering.AzureStorage](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.AzureStorage) | Orleans clustering provider backed by Azure Table Storage. | +| [Microsoft.Orleans.Clustering.AdoNet](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.AdoNet) | Orleans clustering provider backed by ADO.NET. | +| [Microsoft.Orleans.Clustering.DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.DynamoDB) | Orleans clustering provider backed by AWS DynamoDB. | + +## Reminder providers + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.Reminders](https://www.nuget.org/packages/Microsoft.Orleans.Reminders) | Reminders library for Microsoft Orleans used on the server. | +| [Microsoft.Orleans.Reminders.AzureStorage](https://www.nuget.org/packages/Microsoft.Orleans.Reminders.AzureStorage) | Orleans reminders provider backed by Azure Table Storage. | +| [Microsoft.Orleans.Reminders.AdoNet](https://www.nuget.org/packages/Microsoft.Orleans.Reminders.AdoNet) | Orleans reminders provider backed by ADO.NET. | +| [Microsoft.Orleans.Reminders.DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Reminders.DynamoDB) | Orleans reminders provider backed by AWS DynamoDB. | + +## Grain storage providers + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.Persistence.AdoNet](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.AdoNet) | Orleans persistence provider backed by ADO.NET. | +| [Microsoft.Orleans.Persistence.AzureStorage](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.AzureStorage) | Orleans persistence provider backed by Azure Table Storage. | +| [Microsoft.Orleans.Persistence.DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.DynamoDB) | Orleans persistence provider backed by AWS DynamoDB. | +| [Microsoft.Orleans.Persistence.Memory](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.Memory) | In-memory storage for Orleans. | + +## Stream providers + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.Streaming](https://www.nuget.org/packages/Microsoft.Orleans.Streaming) | Streaming library for Orleans used both on the client and server. | +| [Microsoft.Orleans.Streaming.AzureStorage](https://www.nuget.org/packages/Microsoft.Orleans.Streaming.AzureStorage) | Orleans streaming provider backed by Azure Queue Storage. | +| [Microsoft.Orleans.Streaming.EventHubs](https://www.nuget.org/packages/Microsoft.Orleans.Streaming.EventHubs) | Orleans streaming provider backed by Azure Event Hubs. | +| [Microsoft.Orleans.Streaming.SQS](https://www.nuget.org/packages/Microsoft.Orleans.Streaming.SQS) | Orleans streaming provider backed by AWS SQS. | + +## Additional packages + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.Analyzers](https://www.nuget.org/packages/Microsoft.Orleans.Analyzers) | C# Analyzers for Orleans. | +| [Microsoft.Orleans.CodeGenerator](https://www.nuget.org/packages/Microsoft.Orleans.CodeGenerator) | Code generation library for `Microsoft.Orleans.Serialization`. | +| [Microsoft.Orleans.EventSourcing](https://www.nuget.org/packages/Microsoft.Orleans.EventSourcing) | Base types for creating Orleans grains with event-sourced state. | +| [Microsoft.Orleans.Connections.Security](https://www.nuget.org/packages/Microsoft.Orleans.Connections.Security) | Support for security communication using TLS in Orleans. | + +## Development and testing + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.TestingHost](https://www.nuget.org/packages/Microsoft.Orleans.TestingHost) | Orleans library for hosting a silo in a testing project. | +| [Microsoft.Orleans.Transactions.TestKit.Base](https://www.nuget.org/packages/Microsoft.Orleans.Transactions.TestKit.Base) | Test kit base library for transactions. | +| [Microsoft.Orleans.Transactions.TestKit.xUnit](https://www.nuget.org/packages/Microsoft.Orleans.Transactions.TestKit.xUnit) | xUnit test kit library for transactions. | +| [Microsoft.Orleans.Serialization.TestKit](https://www.nuget.org/packages/Microsoft.Orleans.Serialization.TestKit) | Test kit for projects using `Microsoft.Orleans.Serialization`. | + +## Serializers + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.Serialization](https://www.nuget.org/packages/Microsoft.Orleans.Serialization) | Fast, flexible, and version-tolerant serializer for .NET. | +| [Microsoft.Orleans.Serialization.Abstractions](https://www.nuget.org/packages/Microsoft.Orleans.Serialization.Abstractions) | Serialization abstractions for Orleans. | +| [Microsoft.Orleans.Serialization.SystemTextJson](https://www.nuget.org/packages/Microsoft.Orleans.Serialization.SystemTextJson) | `System.Text.Json` integration for `Microsoft.Orleans.Serialization`. | +| [Microsoft.Orleans.Serialization.FSharp](https://www.nuget.org/packages/Microsoft.Orleans.Serialization.FSharp) | F# core type support for `Microsoft.Orleans.Serialization`. | +| [Microsoft.Orleans.Serialization.NewtonsoftJson](https://www.nuget.org/packages/Microsoft.Orleans.Serialization.NewtonsoftJson) | `Newtonsoft.Json` integration for `Microsoft.Orleans.Serialization`. | + +## Transactions + +| NuGet package | Description | +|---|---| +| [Microsoft.Orleans.Transactions](https://www.nuget.org/packages/Microsoft.Orleans.Transactions) | Core transaction library of Orleans used on the server. | +| [Microsoft.Orleans.Transactions.AzureStorage](https://www.nuget.org/packages/Microsoft.Orleans.Transactions.AzureStorage) | Orleans transactions storage provider backed by Azure Storage. | + +## Tools + +One popular Orleans tool is the [OrleansDashboard](https://www.nuget.org/packages/OrleansDashboard) NuGet package. This dashboard provides some simple metrics and insights into what is happening inside your Orleans app. For more information, see [GitHub: Orleans Dashboard](https://github.com/OrleansContrib/OrleansDashboard). + +:::zone-end + +<!-- markdownlint-disable MD044 --> +:::zone target="docs" pivot="orleans-3-x" +<!-- markdownlint-enable MD044 --> + +## Key packages There are 5 key NuGet packages you will need to use in most scenarios: -### [Microsoft Orleans Core Abstractions](https://www.nuget.org/packages/Microsoft.Orleans.Core.Abstractions/) +### [Orleans Core Abstractions](https://www.nuget.org/packages/Microsoft.Orleans.Core.Abstractions/) ```powershell Install-Package Microsoft.Orleans.Core.Abstractions @@ -19,7 +129,7 @@ Install-Package Microsoft.Orleans.Core.Abstractions Contains _Orleans.Core.Abstractions.dll_, which defines Orleans public types that are needed for developing application code (grain interfaces and classes). This package is needed to be directly or indirectly referenced by any Orleans project. Add it to your projects that define grain interfaces and classes. -### Microsoft Orleans Build-time Code Generation +### Orleans build-time code generation * [Microsoft.Orleans.OrleansCodeGenerator.Build](https://www.nuget.org/packages/Microsoft.Orleans.OrleansCodeGenerator.Build/). @@ -38,7 +148,7 @@ Add it to your projects that define grain interfaces and classes. Appeared as part of [Orleans 2.1.0](https://dotnet.github.io/orleans/blog/announcing-orleans-2.1.html). An alternative to the `Microsoft.Orleans.OrleansCodeGenerator.Build` package. Leverages Roslyn for code analysis to avoid loading application binaries and improves support for incremental builds, which should result in shorter build times. -### [Microsoft Orleans Server Libraries](https://www.nuget.org/packages/Microsoft.Orleans.Server/) +### [Orleans Server Libraries](https://www.nuget.org/packages/Microsoft.Orleans.Server/) ```powershell Install-Package Microsoft.Orleans.Server @@ -46,12 +156,12 @@ Install-Package Microsoft.Orleans.Server A meta-package for easily building and starting a silo. Includes the following packages: -* Microsoft.Orleans.Core.Abstractions -* Microsoft.Orleans.Core -* Microsoft.Orleans.OrleansRuntime -* Microsoft.Orleans.OrleansProviders +* `Microsoft.Orleans.Core.Abstractions` +* `Microsoft.Orleans.Core` +* `Microsoft.Orleans.OrleansRuntime` +* `Microsoft.Orleans.OrleansProviders` -### [Microsoft Orleans Client Libraries](https://www.nuget.org/packages/Microsoft.Orleans.Client/) +### [Orleans Client Libraries](https://www.nuget.org/packages/Microsoft.Orleans.Client/) ```powershell Install-Package Microsoft.Orleans.Client @@ -59,11 +169,11 @@ Install-Package Microsoft.Orleans.Client A meta-package for easily building and starting an Orleans client (frontend). Includes the following packages: -* Microsoft.Orleans.Core.Abstractions -* Microsoft.Orleans.Core -* Microsoft.Orleans.OrleansProviders +* `Microsoft.Orleans.Core.Abstractions` +* `Microsoft.Orleans.Core` +* `Microsoft.Orleans.OrleansProviders` -### [Microsoft Orleans Core Library](https://www.nuget.org/packages/Microsoft.Orleans.Core/) +### [Orleans Core Library](https://www.nuget.org/packages/Microsoft.Orleans.Core/) ```powershell Install-Package Microsoft.Orleans.Core @@ -75,7 +185,7 @@ Included in Microsoft.Orleans.Client and Microsoft.Orleans.Server meta-packages, ## Hosting -### [Microsoft Orleans Runtime](https://www.nuget.org/packages/Microsoft.Orleans.OrleansRuntime/) +### [Orleans Runtime](https://www.nuget.org/packages/Microsoft.Orleans.OrleansRuntime/) ```powershell Install-Package Microsoft.Orleans.OrleansRuntime @@ -83,15 +193,15 @@ Install-Package Microsoft.Orleans.OrleansRuntime Library for configuring and starting a silo. Reference it in your silo host project. Included in Microsoft.Orleans.Server meta-package. -### [Microsoft Orleans Runtime Abstractions](https://www.nuget.org/packages/Microsoft.Orleans.Runtime.Abstractions/) +### [Orleans Runtime Abstractions](https://www.nuget.org/packages/Microsoft.Orleans.Runtime.Abstractions/) ```powershell Install-Package Microsoft.Orleans.Runtime.Abstractions ``` -Contains interfaces and abstractions for types implemented in Microsoft.Orleans.OrleansRuntime. +Contains interfaces and abstractions for types implemented in `Microsoft.Orleans.OrleansRuntime`. -### [Microsoft Orleans Hosting on Azure Cloud Services](https://www.nuget.org/packages/Microsoft.Orleans.Hosting.AzureCloudServices/) +### [Orleans Hosting on Azure Cloud Services](https://www.nuget.org/packages/Microsoft.Orleans.Hosting.AzureCloudServices/) ```powershell Install-Package Microsoft.Orleans.Hosting.AzureCloudServices @@ -99,7 +209,7 @@ Install-Package Microsoft.Orleans.Hosting.AzureCloudServices Contains helper classes for hosting silos and Orleans clients as Azure Cloud Services (Worker Roles and Web Roles). -### [Microsoft Orleans Service Fabric Hosting Support](https://www.nuget.org/packages/Microsoft.Orleans.Hosting.ServiceFabric/) +### [Orleans Service Fabric Hosting Support](https://www.nuget.org/packages/Microsoft.Orleans.Hosting.ServiceFabric/) ```powershell Install-Package Microsoft.Orleans.Hosting.ServiceFabric @@ -107,11 +217,11 @@ Install-Package Microsoft.Orleans.Hosting.ServiceFabric Contains helper classes for hosting silos as a stateless Service Fabric service. -## Clustering Providers +## Clustering providers The below packages include plugins for persisting cluster membership data in various storage technologies. -### [Microsoft Orleans clustering provider for Azure Table Storages](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.AzureStorage/) +### [Orleans clustering provider for Azure Table Storages](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.AzureStorage/) ```powershell Install-Package Microsoft.Orleans.Clustering.AzureStorage @@ -119,7 +229,7 @@ Install-Package Microsoft.Orleans.Clustering.AzureStorage Includes the plugin for using Azure Tables for storing cluster membership data. -### [Microsoft Orleans clustering provider for ADO.NET Providers](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.AdoNet/) +### [Orleans clustering provider for ADO.NET Providers](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.AdoNet/) ```powershell Install-Package Microsoft.Orleans.Clustering.AdoNet @@ -127,7 +237,7 @@ Install-Package Microsoft.Orleans.Clustering.AdoNet Includes the plugin for using ADO.NET for storing cluster membership data in one of the supported databases. -### [Microsoft Orleans Consul Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansConsulUtils/) +### [Orleans Consul Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansConsulUtils/) ```powershell Install-Package Microsoft.Orleans.OrleansConsulUtils @@ -135,7 +245,7 @@ Install-Package Microsoft.Orleans.OrleansConsulUtils Includes the plugin for using Consul for storing cluster membership data. -### [Microsoft Orleans ZooKeeper Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansZooKeeperUtils/) +### [Orleans ZooKeeper Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansZooKeeperUtils/) ```powershell Install-Package Microsoft.Orleans.OrleansZooKeeperUtils @@ -143,7 +253,7 @@ Install-Package Microsoft.Orleans.OrleansZooKeeperUtils Includes the plugin for using ZooKeeper for storing cluster membership data. -### [Microsoft Orleans clustering provider for AWS DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.DynamoDB/) +### [Orleans clustering provider for AWS DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.DynamoDB/) ```powershell Install-Package Microsoft.Orleans.Clustering.DynamoDB @@ -151,11 +261,11 @@ Install-Package Microsoft.Orleans.Clustering.DynamoDB Includes the plugin for using AWS DynamoDB for storing cluster membership data. -## Reminder Providers +## Reminder providers The below packages include plugins for persisting reminders in various storage technologies. -### [Microsoft Orleans Reminders Azure Table Storage](https://www.nuget.org/packages/Microsoft.Orleans.Reminders.AzureStorage/) +### [Orleans Reminders Azure Table Storage](https://www.nuget.org/packages/Microsoft.Orleans.Reminders.AzureStorage/) ```powershell Install-Package Microsoft.Orleans.Reminders.AzureStorage @@ -163,7 +273,7 @@ Install-Package Microsoft.Orleans.Reminders.AzureStorage Includes the plugin for using Azure Tables for storing reminders. -### [Microsoft Orleans Reminders ADO.NET Providers](https://www.nuget.org/packages/Microsoft.Orleans.reminders.AdoNet/) +### [Orleans Reminders ADO.NET Providers](https://www.nuget.org/packages/Microsoft.Orleans.reminders.AdoNet/) ```powershell Install-Package Microsoft.Orleans.Reminders.AdoNet @@ -171,7 +281,7 @@ Install-Package Microsoft.Orleans.Reminders.AdoNet Includes the plugin for using ADO.NET for storing reminders in one of the supported databases. -### [Microsoft Orleans reminders provider for AWS DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Reminders.DynamoDB/) +### [Orleans reminders provider for AWS DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Reminders.DynamoDB/) ```powershell Install-Package Microsoft.Orleans.Reminders.DynamoDB @@ -179,11 +289,11 @@ Install-Package Microsoft.Orleans.Reminders.DynamoDB Includes the plugin for using AWS DynamoDB for storing reminders. -## Grain Storage Providers +## Grain storage providers The below packages include plugins for persisting grain state in various storage technologies. -### [Microsoft Orleans Persistence Azure Storage](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.AzureStorage/) +### [Orleans Persistence Azure Storage](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.AzureStorage/) ```powershell Install-Package Microsoft.Orleans.Persistence.AzureStorage @@ -191,7 +301,7 @@ Install-Package Microsoft.Orleans.Persistence.AzureStorage Includes the plugins for using Azure Tables or Azure Blobs for storing grain state. -### [Microsoft Orleans Persistence ADO.NET Providers](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.AdoNet/) +### [Orleans Persistence ADO.NET Providers](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.AdoNet/) ```powershell Install-Package Microsoft.Orleans.Persistence.AdoNet @@ -199,7 +309,7 @@ Install-Package Microsoft.Orleans.Persistence.AdoNet Includes the plugin for using ADO.NET for storing grain state in one of the supported databases. -### [Microsoft Orleans Persistence DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.DynamoDB/) +### [Orleans Persistence DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.DynamoDB/) ```powershell Install-Package Microsoft.Orleans.Persistence.DynamoDB @@ -207,11 +317,11 @@ Install-Package Microsoft.Orleans.Persistence.DynamoDB Includes the plugin for using AWS DynamoDB for storing grain state. -## Stream Providers +## Stream providers The below packages include plugins for delivering streaming events. -### [Microsoft Orleans ServiceBus Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansServiceBus/) +### [Orleans ServiceBus Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansServiceBus/) ```powershell Install-Package Microsoft.Orleans.OrleansServiceBus @@ -219,7 +329,7 @@ Install-Package Microsoft.Orleans.OrleansServiceBus Includes the stream provider for Azure Event Hubs. -### [Microsoft Orleans Streaming Azure Storage](https://www.nuget.org/packages/Microsoft.Orleans.Streaming.AzureStorage/) +### [Orleans Streaming Azure Storage](https://www.nuget.org/packages/Microsoft.Orleans.Streaming.AzureStorage/) ```powershell Install-Package Microsoft.Orleans.Streaming.AzureStorage @@ -227,7 +337,7 @@ Install-Package Microsoft.Orleans.Streaming.AzureStorage Includes the stream provider for Azure Queues. -### [Microsoft Orleans Streaming AWS SQS](https://www.nuget.org/packages/Microsoft.Orleans.Streaming.SQS/) +### [Orleans Streaming AWS SQS](https://www.nuget.org/packages/Microsoft.Orleans.Streaming.SQS/) ```powershell Install-Package Microsoft.Orleans.Streaming.SQS @@ -235,7 +345,7 @@ Install-Package Microsoft.Orleans.Streaming.SQS Includes the stream provider for AWS SQS service. -### [Microsoft Orleans Google Cloud Platform Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansGCPUtils/) +### [Orleans Google Cloud Platform Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansGCPUtils/) ```powershell Install-Package Microsoft.Orleans.OrleansGCPUtils @@ -243,9 +353,9 @@ Install-Package Microsoft.Orleans.OrleansGCPUtils Includes the stream provider for GCP PubSub service. -## Additional Packages +## Additional packages -### [Microsoft Orleans Code Generation](https://www.nuget.org/packages/Microsoft.Orleans.OrleansCodeGenerator/) +### [Orleans Code Generation](https://www.nuget.org/packages/Microsoft.Orleans.OrleansCodeGenerator/) ```powershell Install-Package Microsoft.Orleans.OrleansCodeGenerator @@ -253,7 +363,7 @@ Install-Package Microsoft.Orleans.OrleansCodeGenerator Includes the run time code generator. -### [Microsoft Orleans Event-Sourcing](https://www.nuget.org/packages/Microsoft.Orleans.EventSourcing/) +### [Orleans Event-Sourcing](https://www.nuget.org/packages/Microsoft.Orleans.EventSourcing/) ```powershell Install-Package Microsoft.Orleans.EventSourcing @@ -261,9 +371,9 @@ Install-Package Microsoft.Orleans.EventSourcing Contains a set of base types for creating grain classes with event-sourced state. -## Development and Testing +## Development and testing -### [Microsoft Orleans Providers](https://www.nuget.org/packages/Microsoft.Orleans.OrleansProviders/) +### [Orleans Providers](https://www.nuget.org/packages/Microsoft.Orleans.OrleansProviders/) ```powershell Install-Package Microsoft.Orleans.OrleansProviders @@ -272,7 +382,7 @@ Install-Package Microsoft.Orleans.OrleansProviders Contains a set of persistence and stream providers that keep data in memory. Intended for testing. In general, not recommended for production use, unless data loss in case of a silo failure is acceptable. -### [Microsoft Orleans Testing Host Library](https://www.nuget.org/packages/Microsoft.Orleans.TestingHost/) +### [Orleans Testing Host Library](https://www.nuget.org/packages/Microsoft.Orleans.TestingHost/) ```powershell Install-Package Microsoft.Orleans.TestingHost @@ -282,7 +392,7 @@ Includes the library for hosting silos and clients in a testing project. ## Serializers -### [Microsoft Orleans Bond Serializer](https://www.nuget.org/packages/Microsoft.Orleans.Serialization.Bond/) +### [Orleans Bond Serializer](https://www.nuget.org/packages/Microsoft.Orleans.Serialization.Bond/) ```powershell Install-Package Microsoft.Orleans.Serialization.Bond @@ -290,7 +400,7 @@ Install-Package Microsoft.Orleans.Serialization.Bond Includes support for [Bond serializer](https://github.com/microsoft/bond). -### [Microsoft Orleans Google Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansGoogleUtils/) +### [Orleans Google Utilities](https://www.nuget.org/packages/Microsoft.Orleans.OrleansGoogleUtils/) ```powershell Install-Package Microsoft.Orleans.OrleansGoogleUtils @@ -298,7 +408,7 @@ Install-Package Microsoft.Orleans.OrleansGoogleUtils Includes Google Protocol Buffers serializer. -### [Microsoft Orleans protobuf-net Serializer](https://www.nuget.org/packages/Microsoft.Orleans.ProtobufNet/) +### [Orleans protobuf-net Serializer](https://www.nuget.org/packages/Microsoft.Orleans.ProtobufNet/) ```powershell Install-Package Microsoft.Orleans.ProtobufNet @@ -308,7 +418,7 @@ Includes protobuf-net version of Protocol Buffers serializer. ## Telemetry -### [Microsoft Orleans Telemetry Consumer - Performance Counters](https://www.nuget.org/packages/Microsoft.Orleans.OrleansTelemetryConsumers.Counters/) +### [Orleans Telemetry Consumer - Performance Counters](https://www.nuget.org/packages/Microsoft.Orleans.OrleansTelemetryConsumers.Counters/) ```powershell Install-Package Microsoft.Orleans.OrleansTelemetryConsumers.Counters @@ -316,7 +426,7 @@ Install-Package Microsoft.Orleans.OrleansTelemetryConsumers.Counters Windows Performance Counters implementation of Orleans Telemetry API. -### [Microsoft Orleans Telemetry Consumer - Azure Application Insights](https://www.nuget.org/packages/Microsoft.Orleans.OrleansTelemetryConsumers.AI/) +### [Orleans Telemetry Consumer - Azure Application Insights](https://www.nuget.org/packages/Microsoft.Orleans.OrleansTelemetryConsumers.AI/) ```powershell Install-Package Microsoft.Orleans.OrleansTelemetryConsumers.AI @@ -324,7 +434,7 @@ Install-Package Microsoft.Orleans.OrleansTelemetryConsumers.AI Includes the telemetry consumer for Azure Application Insights. -### [Microsoft Orleans Telemetry Consumer - NewRelic](https://www.nuget.org/packages/Microsoft.Orleans.OrleansTelemetryConsumers.NewRelic/) +### [Orleans Telemetry Consumer - NewRelic](https://www.nuget.org/packages/Microsoft.Orleans.OrleansTelemetryConsumers.NewRelic/) ```powershell Install-Package Microsoft.Orleans.OrleansTelemetryConsumers.NewRelic @@ -332,19 +442,9 @@ Install-Package Microsoft.Orleans.OrleansTelemetryConsumers.NewRelic Includes the telemetry consumer for NewRelic. -## Tools - -### [Microsoft Orleans Performance Counter Tool](https://www.nuget.org/packages/Microsoft.Orleans.CounterControl/) - -```powershell -Install-Package Microsoft.Orleans.CounterControl -``` - -Includes OrleansCounterControl.exe, which registers Windows performance counter categories for Orleans statistics and for deployed grain classes. Requires elevation. Can be executed in Azure as part of a role startup task. - ## Transactions -### [Microsoft Orleans Transactions support](https://www.nuget.org/packages/Microsoft.Orleans.Transactions/) +### [Orleans Transactions support](https://www.nuget.org/packages/Microsoft.Orleans.Transactions/) ```powershell Install-Package Microsoft.Orleans.Transactions @@ -352,10 +452,22 @@ Install-Package Microsoft.Orleans.Transactions Includes support for cross-grain transactions (beta). -### [Microsoft Orleans Transactions on Azure](https://www.nuget.org/packages/Microsoft.Orleans.Transactions.AzureStorage/) +### [Orleans Transactions on Azure](https://www.nuget.org/packages/Microsoft.Orleans.Transactions.AzureStorage/) ```powershell Install-Package Microsoft.Orleans.Transactions.AzureStorage ``` Includes a plugin for persisting transaction log in Azure Table (beta). + +## Tools + +### [Orleans Performance Counter Tool](https://www.nuget.org/packages/Microsoft.Orleans.CounterControl/) + +```powershell +Install-Package Microsoft.Orleans.CounterControl +``` + +Includes `OrleansCounterControl.exe`, which registers Windows performance counter categories for Orleans statistics and for deployed grain classes. Requires elevation. Can be executed in Azure as part of a role startup task. + +:::zone-end diff --git a/docs/orleans/resources/orleans-thinking-big-and-small.md b/docs/orleans/resources/orleans-thinking-big-and-small.md index 8bb533e3854b8..74bf699024c8b 100644 --- a/docs/orleans/resources/orleans-thinking-big-and-small.md +++ b/docs/orleans/resources/orleans-thinking-big-and-small.md @@ -8,7 +8,7 @@ ms.date: 03/21/2022 You don't need hundreds of servers to benefit from Orleans. A handful is enough. -When Orleans was officially announced as a public preview ([Available Now: Preview of Project "Orleans" – Cloud Services at Scale](https://blogs.msdn.com/b/dotnet/archive/2014/04/02/available-now-preview-of-project-orleans-cloud-services-at-scale.aspx)), some of the initial questions and discussions at //build/ were around what type of services the Orleans programming model is suitable for. I heard statements that Orleans is for super-high scale systems. +When Orleans was officially announced as a public preview, some of the initial questions and discussions at //build/ were around what type of services the Orleans programming model is suitable for. I heard statements that Orleans is for super-high scale systems. ## Applicability spectrum diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Client/BroadcastChannel.Client.csproj b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Client/BroadcastChannel.Client.csproj index f95ca28601cb1..1827a7c462edd 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Client/BroadcastChannel.Client.csproj +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Client/BroadcastChannel.Client.csproj @@ -6,15 +6,15 @@ <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> - + <ItemGroup> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Client" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.BroadcastChannel" Version="7.0.0" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> + <PackageReference Include="Microsoft.Orleans.Client" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.BroadcastChannel" Version="7.1.1" /> </ItemGroup> - + <ItemGroup> <ProjectReference Include="..\BroadcastChannel.GrainInterfaces\BroadcastChannel.GrainInterfaces.csproj" /> </ItemGroup> - -</Project> + +</Project> \ No newline at end of file diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/BroadcastChannel.GrainInterfaces.csproj b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/BroadcastChannel.GrainInterfaces.csproj index fe193c810907f..21effb4f6655b 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/BroadcastChannel.GrainInterfaces.csproj +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/BroadcastChannel.GrainInterfaces.csproj @@ -1,4 +1,4 @@ -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net7.0</TargetFramework> @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" /> + <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.1.1" /> </ItemGroup> - -</Project> + +</Project> \ No newline at end of file diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/ChannelNames.cs b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/ChannelNames.cs index c60905de262ba..f0b9fb9fa1c63 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/ChannelNames.cs +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/ChannelNames.cs @@ -1,6 +1,6 @@ -namespace BroadcastChannel.GrainInterfaces; +namespace BroadcastChannel.GrainInterfaces; public sealed class ChannelNames { public const string LiveStockTicker = "live-stock-ticker"; -} +} \ No newline at end of file diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/GlobalQuote.cs b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/GlobalQuote.cs index 36889ec316185..3f4284c5e6d88 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/GlobalQuote.cs +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/GlobalQuote.cs @@ -1,4 +1,4 @@ -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace BroadcastChannel.GrainInterfaces; @@ -38,4 +38,4 @@ public sealed class GlobalQuote [Id(9), JsonPropertyName("10. change percent")] public string ChangePercent { get; set; } = null!; -} +} \ No newline at end of file diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/ILiveStockGrain.cs b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/ILiveStockGrain.cs index b7d50430aa2ef..9741299c62f06 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/ILiveStockGrain.cs +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/ILiveStockGrain.cs @@ -1,6 +1,6 @@ -namespace BroadcastChannel.GrainInterfaces; +namespace BroadcastChannel.GrainInterfaces; public interface ILiveStockGrain : IGrainWithGuidKey { ValueTask<Stock> GetStock(StockSymbol symbol); -} +} \ No newline at end of file diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/Stock.cs b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/Stock.cs index 26639df30e105..aa99a165c0be1 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/Stock.cs +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/Stock.cs @@ -1,4 +1,4 @@ -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace BroadcastChannel.GrainInterfaces; @@ -7,4 +7,4 @@ public sealed class Stock { [Id(0), JsonPropertyName("Global Quote")] public GlobalQuote GlobalQuote { get; set; } = null!; -} +} \ No newline at end of file diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/StockSymbol.cs b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/StockSymbol.cs index e80976016a8fc..f6c067dfef04c 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/StockSymbol.cs +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.GrainInterfaces/StockSymbol.cs @@ -1,4 +1,4 @@ -namespace BroadcastChannel.GrainInterfaces; +namespace BroadcastChannel.GrainInterfaces; public enum StockSymbol { @@ -7,4 +7,4 @@ public enum StockSymbol AAPL, // Apple AMZN, // Amazon TSLA // Tesla -}; +}; \ No newline at end of file diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj index 2dcd3578870d1..d039274f3e793 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj @@ -9,10 +9,10 @@ <ItemGroup> <PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" /> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Server" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.BroadcastChannel" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Serialization.SystemTextJson" Version="7.0.0" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> + <PackageReference Include="Microsoft.Orleans.Server" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.BroadcastChannel" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.Serialization.SystemTextJson" Version="7.1.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/LiveStockGrain.cs b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/LiveStockGrain.cs index 72d85dc6d0cfc..f97a27f23ca44 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/LiveStockGrain.cs +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/LiveStockGrain.cs @@ -1,5 +1,4 @@ using System.Collections.Concurrent; - using BroadcastChannel.GrainInterfaces; using Orleans.BroadcastChannel; diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Program.cs b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Program.cs index 28bb6d2452072..0ea8454920aea 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Program.cs +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Program.cs @@ -1,13 +1,10 @@ using System.Text.Json; - using BroadcastChannel.GrainInterfaces; using BroadcastChannel.Silo.Options; using BroadcastChannel.Silo.Services; - using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; - using Orleans.Serialization; await Host.CreateDefaultBuilder(args) diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Services/StockClient.cs b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Services/StockClient.cs index 1803cfbc8cc25..92184f8420564 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Services/StockClient.cs +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Services/StockClient.cs @@ -1,5 +1,4 @@ using System.Net.Http.Json; - using BroadcastChannel.GrainInterfaces; using BroadcastChannel.Silo.Options; using Microsoft.Extensions.Options; diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Services/StockWorker.cs b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Services/StockWorker.cs index 680f409e8dd6a..a9c14a00f448d 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Services/StockWorker.cs +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/Services/StockWorker.cs @@ -1,5 +1,4 @@ using System.Diagnostics; - using BroadcastChannel.GrainInterfaces; using Microsoft.Extensions.Hosting; using Orleans.BroadcastChannel; @@ -22,7 +21,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken) while (!stoppingToken.IsCancellationRequested) { // Capture the starting timestamp. - long startingTimetstamp = Stopwatch.GetTimestamp(); + long startingTimestamp = Stopwatch.GetTimestamp(); // Get all updated stock values. Stock[] stocks = await Task.WhenAll( @@ -37,7 +36,7 @@ await Task.WhenAll( stocks.Where(s => s is not null).Select(channelWriter.Publish)); // Use the elapsed time to calculate a 15 second delay. - int elapsed = Stopwatch.GetElapsedTime(startingTimetstamp).Milliseconds; + int elapsed = Stopwatch.GetElapsedTime(startingTimestamp).Milliseconds; int remaining = Math.Max(0, 15_000 - elapsed); await Task.Delay(remaining, stoppingToken); diff --git a/docs/orleans/streaming/snippets/broadcastchannel/broadcastchannel.sln b/docs/orleans/streaming/snippets/broadcastchannel/broadcastchannel.sln new file mode 100644 index 0000000000000..a9ebc1b09dd73 --- /dev/null +++ b/docs/orleans/streaming/snippets/broadcastchannel/broadcastchannel.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33122.133 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BroadcastChannel.Silo", "BroadcastChannel.Silo\BroadcastChannel.Silo.csproj", "{52D59CB8-5701-4D10-B317-F292EAE0C40F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BroadcastChannel.Client", "BroadcastChannel.Client\BroadcastChannel.Client.csproj", "{3DC18F05-AAB0-4248-8E35-06E47EF5441B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BroadcastChannel.GrainInterfaces", "BroadcastChannel.GrainInterfaces\BroadcastChannel.GrainInterfaces.csproj", "{FC0A9938-769E-4399-ADC4-94C2CAE189C9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {52D59CB8-5701-4D10-B317-F292EAE0C40F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52D59CB8-5701-4D10-B317-F292EAE0C40F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52D59CB8-5701-4D10-B317-F292EAE0C40F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52D59CB8-5701-4D10-B317-F292EAE0C40F}.Release|Any CPU.Build.0 = Release|Any CPU + {3DC18F05-AAB0-4248-8E35-06E47EF5441B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3DC18F05-AAB0-4248-8E35-06E47EF5441B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3DC18F05-AAB0-4248-8E35-06E47EF5441B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3DC18F05-AAB0-4248-8E35-06E47EF5441B}.Release|Any CPU.Build.0 = Release|Any CPU + {FC0A9938-769E-4399-ADC4-94C2CAE189C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC0A9938-769E-4399-ADC4-94C2CAE189C9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC0A9938-769E-4399-ADC4-94C2CAE189C9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC0A9938-769E-4399-ADC4-94C2CAE189C9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F200A6CB-93E3-4FB9-B6F3-B0EE756D2466} + EndGlobalSection +EndGlobal diff --git a/docs/orleans/streaming/streams-quick-start.md b/docs/orleans/streaming/streams-quick-start.md index 7686387684798..106c124d3a3b1 100644 --- a/docs/orleans/streaming/streams-quick-start.md +++ b/docs/orleans/streaming/streams-quick-start.md @@ -1,7 +1,7 @@ --- title: Orleans streaming quickstart description: Learn from the streaming quickstart in .NET Orleans. -ms.date: 01/05/2023 +ms.date: 02/14/2023 zone_pivot_groups: orleans-version --- @@ -64,19 +64,19 @@ siloBuilder You can create streams, send data using them as producers and also receive data as subscribers. -## Producing events - -Producing events for streams is relatively easy. You should first get access to the stream provider which you defined in the config above (`"SMSProvider"`) and then choose a stream and push data to it. +## Produce events <!-- markdownlint-disable MD044 --> :::zone target="docs" pivot="orleans-7-0" <!-- markdownlint-enable MD044 --> +It's relatively easy to produce events for streams. You should first get access to the stream provider that you defined in the config previously (`"StreamProvider"`), and then choose a stream and push data to it. + ```csharp // Pick a GUID for a chat room grain and chat room stream var guid = new Guid("some guid identifying the chat room"); // Get one of the providers which we defined in our config -var streamProvider = GetStreamProvider("SMSProvider"); +var streamProvider = GetStreamProvider("StreamProvider"); // Get the reference to a stream var streamId = StreamId.Create("RANDOMDATA", guid); var stream = streamProvider.GetStream<int>(streamId); @@ -88,6 +88,8 @@ var stream = streamProvider.GetStream<int>(streamId); :::zone target="docs" pivot="orleans-3-x" <!-- markdownlint-enable MD044 --> +It's relatively easy to produce events for streams. You should first get access to the stream provider that you defined in the config previously (`"SMSProvider"`), and then choose a stream and push data to it. + ```csharp // Pick a GUID for a chat room grain and chat room stream var guid = new Guid("some guid identifying the chat room"); @@ -113,11 +115,11 @@ TimeSpan.FromMilliseconds(1_000), TimeSpan.FromMilliseconds(1_000)); ``` -## Subscribing and receiving streaming data +## Subscribe to and receive streaming data -For receiving data, we can use implicit/explicit subscriptions, which are fully described in other pages of the manual. Here we use implicit subscriptions, which are easier. When a grain type wants to implicitly subscribe to a stream, it uses the attribute [[ImplicitStreamSubscription (namespace)]](xref:Orleans.ImplicitStreamSubscriptionAttribute). +For receiving data, you can use implicit/explicit subscriptions, which are fully described in other pages of the docs. This example uses implicit subscriptions, which are easier. When a grain type wants to implicitly subscribe to a stream, it uses the attribute [[ImplicitStreamSubscription(namespace)]](xref:Orleans.ImplicitStreamSubscriptionAttribute). -For our case we'll define a `ReceiverGrain` like this: +For your case, define a `ReceiverGrain` like this: ```csharp [ImplicitStreamSubscription("RANDOMDATA")] @@ -137,7 +139,7 @@ For this to work, we need to complete the subscription process by setting our `O var guid = this.GetPrimaryKey(); // Get one of the providers which we defined in config -var streamProvider = GetStreamProvider("SMSProvider"); +var streamProvider = GetStreamProvider("StreamProvider"); // Get the reference to a stream var streamId = StreamId.Create("RANDOMDATA", guid); diff --git a/docs/orleans/toc.yml b/docs/orleans/toc.yml index 0163f67ad7feb..0ea20ad7cb5e4 100644 --- a/docs/orleans/toc.yml +++ b/docs/orleans/toc.yml @@ -8,12 +8,14 @@ items: href: overview.md - name: Benefits href: benefits.md - - name: What's new - href: whats-new-in-orleans.md + - name: "Migrate from Orleans 3.x to 7.0" + href: migration-guide.md - name: Quickstarts items: - name: Build your first Orleans app href: quickstarts/build-your-first-orleans-app.md + - name: Deploy and scale an Orleans app on Azure + href: quickstarts/deploy-scale-orleans-on-azure.md - name: Grains items: - name: Develop grains @@ -140,22 +142,23 @@ items: href: host/configuration-guide/adonet-configuration.md - name: Serialization items: - - name: Overview - href: host/configuration-guide/serialization.md - - name: Serialization of immutable types - href: host/configuration-guide/serialization-immutability.md - - name: Configure serialization - href: host/configuration-guide/serialization-configuration.md - - name: Customize serialization - href: host/configuration-guide/serialization-customization.md + - name: Overview + href: host/configuration-guide/serialization.md + - name: Serialization of immutable types + href: host/configuration-guide/serialization-immutability.md + - name: Configure serialization + href: host/configuration-guide/serialization-configuration.md + - name: Customize serialization + href: host/configuration-guide/serialization-customization.md - name: Startup tasks href: host/configuration-guide/startup-tasks.md - name: Orleans graceful shut down href: host/configuration-guide/shutting-down-orleans.md - - name: Monitoring + - name: Observability items: - - name: Runtime monitoring + - name: Overview href: host/monitoring/index.md + displayName: zipkin,jaeger,open telemetry,opentelemetry,meter,counter,activity source,observability,monitoring,logging,metrics,telemetry,distributed tracing - name: Silo error code monitoring href: host/monitoring/silo-error-code-monitoring.md - name: Client error code monitoring diff --git a/docs/orleans/tutorials-and-samples/custom-grain-storage.md b/docs/orleans/tutorials-and-samples/custom-grain-storage.md index 5793afce7b5d5..135acad72ae89 100644 --- a/docs/orleans/tutorials-and-samples/custom-grain-storage.md +++ b/docs/orleans/tutorials-and-samples/custom-grain-storage.md @@ -1,7 +1,7 @@ --- title: Custom grain storage sample project description: Explore a custom grain storage sample project written with .NET Orleans. -ms.date: 12/08/2022 +ms.date: 02/27/2023 zone_pivot_groups: orleans-version --- @@ -9,7 +9,7 @@ zone_pivot_groups: orleans-version In the tutorial on declarative actor storage, we looked at allowing grains to store their state in an Azure table using one of the built-in storage providers. While Azure is a great place to squirrel away your data, there are many alternatives. There are so many that there was no way to support them all. Instead, Orleans is designed to let you easily add support for your form of storage by writing a grain storage. -In this tutorial, we'll walk through how to write simple file-based grain storage. A file system is not the best place to store grains states as it is local, there can be issues with file locks and the last update date is not sufficient to prevent inconsistency. But it's an easy example to help us illustrate the implementation of a `Grain Storage`. +In this tutorial, we'll walk through how to write simple file-based grain storage. A file system is not the best place to store grains states as it is local, there can be issues with file locks and the last update date is not sufficient to prevent inconsistency. But it's an easy example to help us illustrate the implementation of a _grain storage_. ## Get started @@ -72,6 +72,14 @@ public sealed class FileGrainStorage : IGrainStorage, ILifecycleParticipant<ISil } ``` +Each method implements the corresponding method in the [IGrainStorage](xref:Orleans.Storage.IGrainStorage) interface, accepting a generic-type parameter for the underlying state type. The methods are: + +- <xref:Orleans.Storage.IGrainStorage.ReadStateAsync%2A?displayProperty=nameWithType>: to read the state of a grain. +- <xref:Orleans.Storage.IGrainStorage.WriteStateAsync%2A?displayProperty=nameWithType>: to write the state of a grain. +- <xref:Orleans.Storage.IGrainStorage.ClearStateAsync%2A?displayProperty=nameWithType>: to clear the state of a grain. + +The <xref:Orleans.ILifecycleParticipant%601.Participate%2A?displayProperty=nameWithType> method is used to subscribe to the lifecycle of the silo. + Before starting the implementation, you'll create an options class containing the root directory where the grain state files are persisted. For that you'll create an options file named `FileGrainStorageOptions` containing the following: :::code source="snippets/custom-grain-storage/FileGrainStorageOptions.cs"::: diff --git a/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/FileGrainStorage.cs b/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/FileGrainStorage.cs index cb3a1e8eddc8d..c37ec67e5eaaa 100644 --- a/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/FileGrainStorage.cs +++ b/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/FileGrainStorage.cs @@ -34,10 +34,10 @@ public Task ClearStateAsync<T>( { if (fileInfo.LastWriteTimeUtc.ToString() != grainState.ETag) { - throw new InconsistentStateException($$""" - Version conflict (ClearState): ServiceId={{_clusterOptions.ServiceId}} - ProviderName={{_storageName}} GrainType={{typeof(T)}} - GrainReference={{grainId}}. + throw new InconsistentStateException($""" + Version conflict (ClearState): ServiceId={_clusterOptions.ServiceId} + ProviderName={_storageName} GrainType={typeof(T)} + GrainReference={grainId}. """); } @@ -57,7 +57,7 @@ public async Task ReadStateAsync<T>( IGrainState<T> grainState) { var fName = GetKeyString(stateName, grainId); - var path = Path.Combine(_options.RootDirectory, fName!); + var path = Path.Combine(_options.RootDirectory, fName!); var fileInfo = new FileInfo(path); if (fileInfo is { Exists: false }) { @@ -84,10 +84,10 @@ public async Task WriteStateAsync<T>( var fileInfo = new FileInfo(path); if (fileInfo.Exists && fileInfo.LastWriteTimeUtc.ToString() != grainState.ETag) { - throw new InconsistentStateException($$""" - Version conflict (WriteState): ServiceId={{_clusterOptions.ServiceId}} - ProviderName={{_storageName}} GrainType={{typeof(T)}} - GrainReference={{grainId}}. + throw new InconsistentStateException($""" + Version conflict (WriteState): ServiceId={_clusterOptions.ServiceId} + ProviderName={_storageName} GrainType={typeof(T)} + GrainReference={grainId}. """); } diff --git a/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/FileGrainStorageFactory.cs b/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/FileGrainStorageFactory.cs index db404df40120b..af6a202d57c4b 100644 --- a/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/FileGrainStorageFactory.cs +++ b/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/FileGrainStorageFactory.cs @@ -10,13 +10,13 @@ internal static class FileGrainStorageFactory internal static IGrainStorage Create( IServiceProvider services, string name) { - var optionsSnapshot = - services.GetRequiredService<IOptionsSnapshot<FileGrainStorageOptions>>(); + var optionsMonitor = + services.GetRequiredService<IOptionsMonitor<FileGrainStorageOptions>>(); return ActivatorUtilities.CreateInstance<FileGrainStorage>( services, name, - optionsSnapshot.Get(name), + optionsMonitor.Get(name), services.GetProviderClusterOptions(name)); } } diff --git a/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/GrainStorage.csproj b/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/GrainStorage.csproj index 413c302aa4274..cc795a3a6c1b2 100644 --- a/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/GrainStorage.csproj +++ b/docs/orleans/tutorials-and-samples/snippets/custom-grain-storage/GrainStorage.csproj @@ -8,9 +8,9 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Runtime" Version="7.0.0" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> + <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.1.1" /> + <PackageReference Include="Microsoft.Orleans.Runtime" Version="7.1.1" /> </ItemGroup> </Project> diff --git a/docs/orleans/tutorials-and-samples/snippets/minimal/Client/Client.csproj b/docs/orleans/tutorials-and-samples/snippets/minimal/Client/Client.csproj index 0c890b2a67b61..a36571cc43695 100644 --- a/docs/orleans/tutorials-and-samples/snippets/minimal/Client/Client.csproj +++ b/docs/orleans/tutorials-and-samples/snippets/minimal/Client/Client.csproj @@ -8,8 +8,8 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Client" Version="7.0.0" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> + <PackageReference Include="Microsoft.Orleans.Client" Version="7.1.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/orleans/tutorials-and-samples/snippets/minimal/GrainInterfaces/GrainInterfaces.csproj b/docs/orleans/tutorials-and-samples/snippets/minimal/GrainInterfaces/GrainInterfaces.csproj index 5bf259b4e127e..cffab729ecc88 100644 --- a/docs/orleans/tutorials-and-samples/snippets/minimal/GrainInterfaces/GrainInterfaces.csproj +++ b/docs/orleans/tutorials-and-samples/snippets/minimal/GrainInterfaces/GrainInterfaces.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" /> + <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.1.1" /> </ItemGroup> </Project> diff --git a/docs/orleans/tutorials-and-samples/snippets/minimal/Grains/Grains.csproj b/docs/orleans/tutorials-and-samples/snippets/minimal/Grains/Grains.csproj index 435d06c0b6fe8..34a2b50a3ac9c 100644 --- a/docs/orleans/tutorials-and-samples/snippets/minimal/Grains/Grains.csproj +++ b/docs/orleans/tutorials-and-samples/snippets/minimal/Grains/Grains.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" /> + <PackageReference Include="Microsoft.Orleans.Sdk" Version="7.1.1" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" /> </ItemGroup> diff --git a/docs/orleans/tutorials-and-samples/snippets/minimal/Silo/Silo.csproj b/docs/orleans/tutorials-and-samples/snippets/minimal/Silo/Silo.csproj index c564a08002f66..741302f67fa03 100644 --- a/docs/orleans/tutorials-and-samples/snippets/minimal/Silo/Silo.csproj +++ b/docs/orleans/tutorials-and-samples/snippets/minimal/Silo/Silo.csproj @@ -8,9 +8,9 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> + <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" /> - <PackageReference Include="Microsoft.Orleans.Server" Version="7.0.0" /> + <PackageReference Include="Microsoft.Orleans.Server" Version="7.1.1" /> </ItemGroup> <ItemGroup> diff --git a/docs/orleans/tutorials-and-samples/snippets/minimal/minimal.sln b/docs/orleans/tutorials-and-samples/snippets/minimal/minimal.sln new file mode 100644 index 0000000000000..2e9c3aa189c3c --- /dev/null +++ b/docs/orleans/tutorials-and-samples/snippets/minimal/minimal.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33122.133 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GrainInterfaces", "GrainInterfaces\GrainInterfaces.csproj", "{C77F02B9-1103-4D28-ADFD-268B41846994}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grains", "Grains\Grains.csproj", "{C96FD7D0-E567-47D8-A148-947B3EFF3261}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silo", "Silo\Silo.csproj", "{FC4062B3-19A2-40AB-9E2B-394413EE2677}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client\Client.csproj", "{AD80F57D-5FD7-4A54-A2E7-8BF409ABFBB3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C77F02B9-1103-4D28-ADFD-268B41846994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C77F02B9-1103-4D28-ADFD-268B41846994}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C77F02B9-1103-4D28-ADFD-268B41846994}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C77F02B9-1103-4D28-ADFD-268B41846994}.Release|Any CPU.Build.0 = Release|Any CPU + {C96FD7D0-E567-47D8-A148-947B3EFF3261}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C96FD7D0-E567-47D8-A148-947B3EFF3261}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C96FD7D0-E567-47D8-A148-947B3EFF3261}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C96FD7D0-E567-47D8-A148-947B3EFF3261}.Release|Any CPU.Build.0 = Release|Any CPU + {FC4062B3-19A2-40AB-9E2B-394413EE2677}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC4062B3-19A2-40AB-9E2B-394413EE2677}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC4062B3-19A2-40AB-9E2B-394413EE2677}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC4062B3-19A2-40AB-9E2B-394413EE2677}.Release|Any CPU.Build.0 = Release|Any CPU + {AD80F57D-5FD7-4A54-A2E7-8BF409ABFBB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD80F57D-5FD7-4A54-A2E7-8BF409ABFBB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD80F57D-5FD7-4A54-A2E7-8BF409ABFBB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD80F57D-5FD7-4A54-A2E7-8BF409ABFBB3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3A7CC6DE-5DCE-4C42-B3FF-6FD8B4976A22} + EndGlobalSection +EndGlobal diff --git a/docs/orleans/tutorials-and-samples/testing.md b/docs/orleans/tutorials-and-samples/testing.md index d14779c1b40cd..33baa36e8c760 100644 --- a/docs/orleans/tutorials-and-samples/testing.md +++ b/docs/orleans/tutorials-and-samples/testing.md @@ -52,7 +52,7 @@ public class ClusterFixture : IDisposable public ClusterFixture() { var builder = new TestClusterBuilder(); - var cluster = builder.Build(); + Cluster = builder.Build(); Cluster.Deploy(); } diff --git a/docs/orleans/whats-new-in-orleans.md b/docs/orleans/whats-new-in-orleans.md deleted file mode 100644 index bd375dd1cbf69..0000000000000 --- a/docs/orleans/whats-new-in-orleans.md +++ /dev/null @@ -1,399 +0,0 @@ ---- -title: What's new in Orleans -description: Learn about the various new features introduced in Orleans 7.0. -ms.date: 12/15/2022 ---- - -# What's new in Orleans 7.0 - -Orleans 7.0 introduces several beneficial changes, including improvements to hosting, custom serialization, immutability, and grain abstractions. - -## Migration - -Existing applications using reminders, streams, or grain persistence cannot be easily migrated to Orleans 7.0 due to changes in how Orleans identifies grains and streams. We plan to incrementally offer a migration path for these applications. - -Applications running previous versions of Orleans cannot be smoothly upgraded via a rolling upgrade to Orleans 7.0. Therefore, a different upgrade strategy must be used, such as deploying a new cluster and decommissioning the previous cluster. Orleans 7.0 changes the wire protocol in an incompatible fashion, meaning that clusters cannot contain a mix of Orleans 7.0 hosts and hosts running previous versions of Orleans. - -We have avoided such breaking changes for many years, even across major releases, so why now? There are two major reasons: identities and serialization. Regarding identities, Grain and stream identities are now comprised of strings, allowing grains to encode generic type information properly and allowing streams to map more easily to the application domain. Grain types were previously identified using a complex data structure which could not represent generic grains, leading to corner cases. Streams were identified by a `string` namespace and a <xref:System.Guid> key, which was difficult for developers to map to their application domain, however efficient. Serialization is now version-tolerant, meaning that you can modify your types in certain compatible ways, following a set of rules, and be confident that you can upgrade your application without serialization errors. This was especially problematic when application types were persisted in streams or grain storage. The following sections detail the major changes and discuss them in more detail. - -### Packaging changes - -If you're upgrading a project to Orleans 7.0, you'll need to perform the following actions: - -- All clients should reference [Microsoft.Orleans.Client](https://nuget.org/packages/Microsoft.Orleans.Client). -- All silos (servers) should reference [Microsoft.Orleans.Server](https://nuget.org/packages/Microsoft.Orleans.Server). -- All other packages should reference [Microsoft.Orleans.Sdk](https://nuget.org/packages/Microsoft.Orleans.Sdk). - - Both _client_ and _server_ packages include a reference to [Microsoft.Orleans.Sdk](https://nuget.org/packages/Microsoft.Orleans.Sdk). -- Remove all references to `Microsoft.Orleans.CodeGenerator.MSBuild` and `Microsoft.Orleans.OrleansCodeGenerator.Build`. - - Replace usages of `KnownAssembly` with <xref:Orleans.GenerateCodeForDeclaringAssemblyAttribute>. - - The `Microsoft.Orleans.Sdk` package references the C# Source Generator package (`Microsoft.Orleans.CodeGenerator`). -- Remove all references to `Microsoft.Orleans.OrleansRuntime`. - - The [Microsoft.Orleans.Server](https://nuget.org/packages/Microsoft.Orleans.Server) packages references its replacement, `Microsoft.Orleans.Runtime`. -- Remove calls to `ConfigureApplicationParts`. - - Application parts has been removed. The C# Source Generator for Orleans is added to all packages (including the client and server) and will generate the equivalent of application parts automatically. -- Replace references to `Microsoft.Orleans.OrleansServiceBus` with [Microsoft.Orleans.Streaming.EventHubs](https://nuget.org/packages/Microsoft.Orleans.Streaming.EventHubs) -- If you are using reminders, add a reference to [Microsoft.Orleans.Reminders](https://nuget.org/packages/Microsoft.Orleans.Reminders) -- If you are using streams, add a reference to [Microsoft.Orleans.Streaming](https://nuget.org/packages/Microsoft.Orleans.Streaming) - -> [!TIP] -> All of the Orleans samples have been upgraded to Orleans 7.0 and can be used as a reference for what changes were made. For more information, see [Orleans issue #8035](https://github.com/dotnet/orleans/issues/8035) that itemizes the changes made to each sample. - -## Orleans `global using` directives - -All Orleans projects either directly or indirectly reference the `Microsoft.Orleans.Sdk` NuGet package. When an Orleans project has configured to _enable_ implicit usings (for example `<ImplicitUsings>enable</ImplicitUsings>`), the `Orleans` and `Orleans.Hosting` namespaces are both implicitly used. This means that your app code doesn't need these directives. - -<!-- markdownlint-disable MD044 --> -For more information, see [ImplicitUsings](../core/project-sdk/msbuild-props.md#implicitusings) and [dotnet/orleans/src/Orleans.Sdk/build/Microsoft.Orleans.Sdk.targets](https://github.com/dotnet/orleans/blob/main/src/Orleans.Sdk/build/Microsoft.Orleans.Sdk.targets#L4-L5). -<!-- markdownlint-enable MD044 --> - -## Hosting - -The <xref:Orleans.ClientBuilder> type has been replaced with a <xref:Microsoft.Extensions.Hosting.OrleansClientGenericHostExtensions.UseOrleansClient%2A> extension method on <xref:Microsoft.Extensions.Hosting.IHostBuilder>. The `IHostBuilder` type comes from the [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting) NuGet package. This means that you can add an Orleans client to an existing host without having to create a separate dependency injection container. The client connects to the cluster during startup. Once <xref:Microsoft.Extensions.Hosting.IHost.StartAsync%2A?displayProperty=nameWithType> has completed, the client will be connected automatically. Services added to the `IHostBuilder` are started in the order of registration, so calling `UseOrleansClient` before calling <xref:Microsoft.Extensions.Hosting.GenericHostBuilderExtensions.ConfigureWebHostDefaults%2A> will ensure Orleans is started before ASP.NET Core starts for example, allowing you to access the client from your ASP.NET Core application immediately. - -If you wish to emulate the previous `ClientBuilder` behavior, you can create a separate `HostBuilder` and configure it with an Orleans client. `IHostBuilder` can have either an Orleans client or an Orleans silo configured. All silos register an instance of <xref:Orleans.IGrainFactory> and <xref:Orleans.IClusterClient> which the application can use, so configuring a client separately is unnecessary and unsupported. - -## `OnActivateAsync` and `OnDeactivateAsync` signature change - -Orleans allows grains to execute code during activation and deactivation. This can be used to perform tasks such as read state from storage or log lifecycle messages. In Orleans 7.0, the signature of these lifecycle methods changed: - -- <xref:Orleans.Grain.OnActivateAsync> now accepts a <xref:System.Threading.CancellationToken> parameter. When the <xref:System.Threading.CancellationToken> is canceled, the activation process should be abandoned. -- <xref:Orleans.Grain.OnDeactivateAsync> now accepts a <xref:Orleans.DeactivationReason> parameter and a `CancellationToken` parameter. The `DeactivationReason` indicates why the activation is being deactivated. Developers are expected to use this information for logging and diagnostics purposes. When the `CancellationToken` is canceled, the deactivation process should be completed promptly. Note that since any host can fail at any time, it is not recommended to rely on `OnDeactivateAsync` to perform important actions such as persisting critical state. - -Consider the following example of a grain overriding these new methods: - -```csharp -public sealed class PingGrain : Grain, IPingGrain -{ - private readonly ILogger<PingGrain> _logger; - - public PingGrain(ILogger<PingGrain> logger) => - _logger = logger; - - public override Task OnActivateAsync(CancellationToken cancellationToken) - { - _logger.LogInformation("OnActivateAsync()"); - return Task.CompletedTask; - } - - public override Task OnDeactivateAsync(DeactivationReason reason, CancellationToken token) - { - _logger.LogInformation("OnDeactivateAsync({Reason})", reason); - return Task.CompletedTask; - } - - public ValueTask Ping() => ValueTask.CompletedTask; -} -``` - -## POCO Grains and `IGrainBase` - -Grains in Orleans no longer need to inherit from the <xref:Orleans.Grain> base class or any other class. This functionality is referred to as [POCO](../standard/glossary.md#poco) grains. To access extension methods such as any of the following: - -- <xref:Orleans.GrainBaseExtensions.DeactivateOnIdle%2A> -- <xref:Orleans.GrainExtensions.AsReference%2A> -- <xref:Orleans.GrainExtensions.Cast%2A> -- <xref:Orleans.GrainExtensions.GetPrimaryKey%2A> -- <xref:Orleans.GrainReminderExtensions.GetReminder%2A> -- <xref:Orleans.GrainReminderExtensions.GetReminders%2A> -- <xref:Orleans.GrainReminderExtensions.RegisterOrUpdateReminder%2A> -- <xref:Orleans.GrainReminderExtensions.UnregisterReminder%2A> -- <xref:Orleans.GrainStreamingExtensions.GetStreamProvider%2A> - -Your grain must either implement <xref:Orleans.IGrainBase> or inherit from <xref:Orleans.Grain>. Here is an example of implementing `IGrainBase` on a grain class: - -```csharp -public sealed class PingGrain : IGrainBase, IPingGrain -{ - public PingGrain(IGrainContext context) => GrainContext = context; - - public IGrainContext GrainContext { get; } - - public ValueTask Ping() => ValueTask.CompletedTask; -} -``` - -`IGrainBase` also defines `OnActivateAsync` and `OnDeactivateAsync` with default implementations, allowing your grain to participate in its lifecycle if desired: - -```csharp -public sealed class PingGrain : IGrainBase, IPingGrain -{ - private readonly ILogger<PingGrain> _logger; - - public PingGrain(IGrainContext context, ILogger<PingGrain> logger) - { - _logger = logger; - GrainContext = context; - } - - public IGrainContext GrainContext { get; } - - public Task OnActivateAsync(CancellationToken cancellationToken) - { - _logger.LogInformation("OnActivateAsync()"); - return Task.CompletedTask; - } - - public Task OnDeactivateAsync(DeactivationReason reason, CancellationToken token) - { - _logger.LogInformation("OnDeactivateAsync({Reason})", reason); - return Task.CompletedTask; - } - - public ValueTask Ping() => ValueTask.CompletedTask; -} -``` - -## Serialization - -The most burdensome change in Orleans 7.0 is the introduction of the version-tolerant serializer. This change was made because applications tend to evolve over time and this led to a significant pitfall for developers, since the previous serializer couldn't tolerate adding properties to existing types. On the other hand, the serializer was flexible, allowing developers to represent most .NET types without modification, including features such as generics, polymorphism, and reference tracking. A replacement was long overdue, but users still need high-fidelity representation of their types. Therefore, a replacement serializer was introduced in Orleans 7.0 which supports high-fidelity representation of .NET types while also allowing types to evolve over time. The new serializer is much more efficient than the previous serializer, resulting in up to 170% higher end-to-end throughput. - -For more information, see the following articles as it relates to Orleans 7.0: - -- [Serialization overview](host/configuration-guide/serialization.md?pivots=orleans-7.0) -- [Serialization configuration](host/configuration-guide/serialization-configuration.md?pivots=orleans-7.0) -- [Serialization customization](host/configuration-guide/serialization-customization.md?pivots=orleans-7.0) - -## Grain identities - -Grains each have a unique identity which is comprised of the grain's type and its key. Previous versions of Orleans used a compound type for `GrainId`s to support grain keys of either: - -- <xref:System.Guid> -- [`long`](xref:System.Int64) -- [string](xref:System.String) -- <xref:System.Guid>+ [string](xref:System.String) -- [`long`](xref:System.Int64) + [string](xref:System.String) - -This involves some complexity when it comes to dealing with grain keys. Grain identities consist of two components: a type and a key. The type component previously consisted of a numeric type code, a category, and 3 bytes of generic type information. - -Grain identities now take the form `type/key` where both `type` and `key` are strings. The most commonly used grain key interface is the <xref:Orleans.IGrainWithStringKey>. This greatly simplifies how grain identity works and improves support for generic grain types. - -Grain interfaces are also now represented using a human-readable name, rather than a combination of a hash code and a string representation of any generic type parameters. - -The new system is more customizable and these customizations can be driven by attributes. - -- <xref:Orleans.GrainTypeAttribute.%23ctor(System.String)> on a grain `class` specifies the *Type* portion of its grain id. -- <xref:Orleans.Metadata.DefaultGrainTypeAttribute.%23ctor(System.String)> on a grain `interface` specifies the *Type* of the grain which <xref:Orleans.IGrainFactory> should resolve by default when getting a grain reference. For example, when calling `IGrainFactory.GetGrain<IMyGrain>("my-key")`, the grain factory will return a reference to the grain `"my-type/my-key"` if `IMyGrain` has the aforementioned attribute specified. -- <xref:Orleans.Runtime.GrainInterfaceTypeAttribute.%23ctor(System.String)> allows overriding the interface name. Specifying a name explicitly using this mechanism allows renaming of the interface type without breaking compatibility with existing grain references. Note that your interface should also have the <xref:Orleans.AliasAttribute> in this case, since its identity may be serialized. For more information on specifying a type alias, see the section on serialization. - -As mentioned above, overriding the default grain class and interface names for your types allows you to rename the underlying types without breaking compatibility with existing deployments. - -## Stream identities - -When Orleans streams was first released, streams could only be identified using a <xref:System.Guid>. This was efficient in terms of memory allocation, but it was difficult for users to create meaningful stream identities, often requiring some encoding or indirection to determine the appropriate stream identity for a given purpose. - -In Orleans 7.0, streams are now identified using strings. The <xref:Orleans.Runtime.StreamId?displayProperty=fullName> `struct` contains three properties: a <xref:Orleans.Runtime.StreamId.Namespace?displayProperty=nameWithType>, a <xref:Orleans.Runtime.StreamId.Key?displayProperty=nameWithType>, and a <xref:Orleans.Runtime.StreamId.FullKey?displayProperty=nameWithType>. These property values are encoded UTF-8 strings. For example, <xref:Orleans.Runtime.StreamId.Create(System.String,System.String)?displayProperty=nameWithType>. - -### Replacement of SimpleMessageStreams with BroadcastChannel - -`SimpleMessageStreams` (also called SMS) was removed in 7.0. SMS had the same interface as <xref:Orleans.Providers.Streams.PersistentStreams?displayProperty=fullName>, but its behavior was very different, since it relied on direct grain-to-grain calls. To avoid confusion, SMS was removed, and a new replacement called <xref:Orleans.BroadcastChannel?displayProperty=fullName> was introduced. - -`BroadcastChannel` only supports implicit subscription and can be a direct replacement in this case. If you need explicit subscriptions or need to use the `PersistentStream` interface (for example you were using SMS in tests while using `EventHub` in production), then `MemoryStream` is the best candidate for you. - -`BroadcastChannel` will have the same behaviors as SMS, while `MemoryStream` will behave like other stream providers. Consider the following Broadcast Channel usage example: - -```csharp -// Configuration -builder.AddBroadcastChannel( - "my-provider", - options => options.FireAndForgetDelivery = false); - -// Publishing -var grainKey = Guid.NewGuid().ToString("N"); -var channelId = ChannelId.Create("some-namespace", grainKey); -var stream = provider.GetChannelWriter<int>(channelId); - -await stream.Publish(1); -await stream.Publish(2); -await stream.Publish(3); - -// Simple implicit subscriber example -[ImplicitChannelSubscription] -public sealed class SimpleSubscriberGrain : Grain, ISubscriberGrain, IOnBroadcastChannelSubscribed -{ - // Called when a subscription is added to the grain - public Task OnSubscribed(IBroadcastChannelSubscription streamSubscription) - { - streamSubscription.Attach<int>( - item => OnPublished(streamSubscription.ChannelId, item), - ex => OnError(streamSubscription.ChannelId, ex)); - - return Task.CompletedTask; - - // Called when an item is published to the channel - static Task OnPublished(ChannelId id, int item) - { - // Do something - return Task.CompletedTask; - } - - // Called when an error occurs - static Task OnError(ChannelId id, Exception ex) - { - // Do something - return Task.CompletedTask; - } - } -} -``` - -Migration to `MemoryStream` will be easier, since only the configuration needs to change. Consider the following `MemoryStream` configuration: - -```csharp -builder.AddMemoryStreams<DefaultMemoryMessageBodySerializer>( - "in-mem-provider", - _ => - { - // Number of pulling agent to start. - // DO NOT CHANGE this value once deployed, if you do rolling deployment - _.ConfigurePartitioning(partitionCount: 8); - }); -``` - -## OpenTelemetry - -The telemetry system has been updated in Orleans 7.0 and the previous system has been removed in favor of standardized .NET APIs such as .NET Metrics for metrics and <xref:System.Diagnostics.ActivitySource> for tracing. - -As a part of this, the existing `Microsoft.Orleans.TelemetryConsumers.*` packages have been removed. We are considering introducing a new set of packages to streamline the process of integrating the metrics emitted by Orleans into your monitoring solution of choice. As always, feedback and contributions are welcome. - -The `dotnet-counters` tool features performance monitoring for ad-hoc health monitoring and first-level performance investigation. For Orleans counters, the [dotnet-counters](../core/diagnostics/dotnet-counters.md) tool can be used to monitor them: - -```dotnetcli -dotnet counters monitor -n MyApp --counters Microsoft.Orleans -``` - -Similarly, OpenTelemetry metrics can add the `Microsoft.Orleans` meters, as shown in the following code: - -```csharp -builder.Services.AddOpenTelemetryMetrics(metrics => -{ - metrics - .AddPrometheusExporter() - .AddMeter("Microsoft.Orleans"); -}); -``` - -To enable distributed tracing, you configure OpenTelemetry as shown in the following code: - -```csharp -builder.Services.AddOpenTelemetryTracing(tracing => -{ - // Set a service name - tracing.SetResourceBuilder( - ResourceBuilder.CreateDefault() - .AddService(serviceName: "ExampleService", serviceVersion: "1.0")); - - tracing.AddAspNetCoreInstrumentation(); - tracing.AddSource("Microsoft.Orleans.Runtime"); - tracing.AddSource("Microsoft.Orleans.Application"); - - tracing.AddZipkinExporter(zipkin => - { - zipkin.Endpoint = new Uri("http://localhost:9411/api/v2/spans"); - }); -}); -``` - -In the preceding code, OpenTelemetry is configured to monitor: - -- `Microsoft.Orleans.Runtime` -- `Microsoft.Orleans.Application` - -To propagate activity, call <xref:Orleans.Hosting.ClientBuilderExtensions.AddActivityPropagation%2A>: - -```csharp -builder.Host.UseOrleans((_, clientBuilder) => -{ - clientBuilder.AddActivityPropagation(); -}); -``` - -## Refactor features from core package into separate packages - -In Orleans 7.0, we have made an effort to factor extensions into separate packages which don't rely on <xref:Orleans.Core?displayName=fullName>. Namely, <xref:Orleans.Streaming?displayName=fullName>, <xref:Orleans.Reminders?displayName=fullName>, and <xref:Orleans.Transactions?displayName=fullName> have been separated from the core. This means that these packages are entirely *pay for what you use* and there is no code in the core of Orleans which is dedicated to these features. This slims down the core API surface and assembly size, simplifies the core, and improves performance. Regarding performance, Transactions in Orleans previously required some code which was executed for every method to coordinate potential transactions. That has since been moved to per-method. - -This is a compilation breaking change. You may have existing code which interacts with reminders or streams by calling into methods which were previously defined on the <xref:Orleans.Grain> base class but are now extension methods. Such calls which do not specify `this` (for example <xref:Orleans.GrainReminderExtensions.GetReminders%2A>) will need to be updated to include `this` (for example `this.GetReminders()`) because extension methods must be qualified. There will be a compilation error if you do not update those calls and the required code change may not be obvious if you do not know what has changed. - -## Transaction client - -Orleans 7.0 introduces a new abstraction for coordinating transactions, <xref:Orleans.ITransactionClient?displayProperty=fullName>. Previously, transactions could only be coordinated by grains. With `ITransactionClient`, which is available via dependency injection, clients can also coordinate transactions without needing an intermediary grain. The following example withdraws credits from one account and deposits them into another within a single transaction. This code can be called from within a grain or from an external client which has retrieved the `ITransactionClient` from the dependency injection container. - -```csharp -await transactionClient.RunTransaction( - TransactionOption.Create, - () => Task.WhenAll(from.Withdraw(100), to.Deposit(100))); -``` - -For transactions coordinated by the client, the client must add the required services during configuration time: - -``` csharp -clientBuilder.UseTransactions(); -``` - -The [BankAccount](https://github.com/dotnet/samples/tree/main/orleans/BankAccount) sample demonstrates the usage of `ITransactionClient`. For more information, see [Orleans transactions](grains/transactions.md). - -## Call chain reentrancy - -Grains are single-threaded and process requests one-by-one from beginning to completion by default. In other words, grains are not reentrant by default. Adding the <xref:Orleans.Concurrency.ReentrantAttribute> to a grain class allows for multiple requests be processed concurrently, in an interleaving fashion, while still being single-threaded. This can be useful for grains which hold no internal state or perform a lot of asynchronous operations, such as issuing HTTP calls or writing to a database. Extra care needs to be taken when requests can interleave: it's possible that the state of a grain observed before an `await` statement has changed by the time the asynchronous operation completes and the method resumes execution. - -For example, the following grain represents a counter. It has been marked `Reentrant`, allowing multiple calls to interleave. The `Increment()` method should increment the internal counter and return the observed value. However, since the `Increment()` method body observes the grain's state before an `await` point and updates it afterwards, it is possible that multiple interleaving executions of `Increment()` can result in a `_value` less than the total number of `Increment()` calls received. This is an error introduced by improper use of reentrancy. - -Removing the <xref:Orleans.Concurrency.ReentrantAttribute> is enough to fix the problem. - -```csharp -[Reentrant] -public sealed class CounterGrain : Grain, ICounterGrain -{ - int _value; - - /// <summary> - /// Increments the grain's value and returns the previous value. - /// </summary> - public Task<int> Increment() - { - // Do not copy this code, it contains an error. - var currentVal = _value; - await Task.Delay(TimeSpan.FromMilliseconds(1_000)); - _value = currentVal + 1; - return currentValue; - } -} -``` - -To prevent such errors, grains are non-reentrant by default. The downside to this is reduced throughput for grains which perform asynchronous operations in their implementation, since other requests cannot be processed while the grain is waiting for an asynchronous operation to complete. To alleviate this, Orleans offers several options to allow reentrancy in certain cases: - -- For an entire class: placing the <xref:Orleans.Concurrency.ReentrantAttribute> on the grain allows any request to the grain to interleave with any other request. -- For a subset of methods: placing the <xref:Orleans.Concurrency.AlwaysInterleaveAttribute> on the grain *interface* method allows requests to that method to interleave with any other request and for requests to that method to be interleaved by any other request. -- For a subset of methods: placing the <xref:Orleans.Concurrency.ReadOnlyAttribute> on the grain *interface* method allows requests to that method to interleave with any other `ReadOnly` request and for requests to that method to be interleaved by any other `ReadOnly` request. In this sense, it is a more restricted form of `AlwaysInterleave`. -- For any request within a call chain: <xref:Orleans.Runtime.RequestContext.AllowCallChainReentrancy?displayProperty=nameWithType> and <xref:Orleans.Runtime.RequestContext.SuppressCallChainReentrancy?displayProperty=nameWithType> allow opting in and out of allowing downstream requests to reenter back into the grain. The calls both return a value which *must* be disposed on exiting the request. Therefore, the proper usage is as follows: - -``` csharp -public Task<int> OuterCall(IMyGrain other) -{ - // Allow call-chain reentrancy for this grain, for the duration of the method. - using var _ = RequestContext.AllowCallChainReentrancy(); - await other.CallMeBack(this.AsReference<IMyGrain>()); -} - -public Task CallMeBack(IMyGrain grain) -{ - // Because OuterCall allowed reentrancy back into that grain, this method - // will be able to call grain.InnerCall() without deadlocking. - await grain.InnerCall(); -} - -public Task InnerCall() => Task.CompletedTask; -``` - -Call-chain reentrancy must be opted-in per-grain, per-call-chain. For example, consider two grains, grain A & grain B. If grain A enables call chain reentrancy before calling grain B, grain B can call back into grain A in that call. However, grain A cannot call back into grain B if grain B has not *also* enabled call chain reentrancy. It is per-grain, per-call-chain. - -Grains can also suppress call chain reentrancy information from flowing down a call chain using `using var _ = RequestContext.SuppressCallChainReentrancy()`. This prevents subsequent calls from reentry. - -### ADO.NET migration scripts - -To ensure forward compatibility with Orleans clustering, persistence, and reminders that rely on ADO.NET, you'll need the appropriate SQL migration script: - -* [Clustering](https://github.com/dotnet/orleans/tree/main/src/AdoNet/Orleans.Clustering.AdoNet/Migrations) -* [Persistence](https://github.com/dotnet/orleans/tree/main/src/AdoNet/Orleans.Persistence.AdoNet/Migrations) -* [Reminders](https://github.com/dotnet/orleans/tree/main/src/AdoNet/Orleans.Reminders.AdoNet/Migrations) - -Select the files for the database used and apply them in order. diff --git a/docs/samples-and-tutorials/index.md b/docs/samples-and-tutorials/index.md index 0e13ab144b153..c5057ded12090 100644 --- a/docs/samples-and-tutorials/index.md +++ b/docs/samples-and-tutorials/index.md @@ -50,7 +50,7 @@ This sample demonstrates the syntax and features for C# indexers. The [completed This sample demonstrates the syntax and features for C# delegates and events. The [completed sample](https://github.com/dotnet/samples/tree/main/csharp/delegates-and-events) is available in the dotnet/samples repository on GitHub. A [second sample](https://github.com/dotnet/samples/tree/main/csharp/events) focused on events is also in the same repository. -**[Expression Trees](../csharp/expression-trees.md)** +**[Expression Trees](/dotnet/csharp/advanced-topics/expression-trees)** This sample demonstrates many of the problems that can be solved by using Expression Trees. The [completed sample](https://github.com/dotnet/samples/tree/main/csharp/expression-trees) is available in the dotnet/samples repository on GitHub. diff --git a/docs/standard/analyzers/portability-analyzer.md b/docs/standard/analyzers/portability-analyzer.md index f963826e5fdf9..4c05b26763fd2 100644 --- a/docs/standard/analyzers/portability-analyzer.md +++ b/docs/standard/analyzers/portability-analyzer.md @@ -7,8 +7,7 @@ ms.assetid: 0375250f-5704-4993-a6d5-e21c499cea1e # The .NET Portability Analyzer -> [!NOTE] -> We're in the process of deprecating API Port in favor of integrating binary analysis directly into [.NET Upgrade Assistant](https://github.com/dotnet/upgrade-assistant). In the upcoming months, we're going to shut down the backend service of API Port, which will require using the tool offline. For more information, see [GitHub: .NET API Port repository](https://github.com/microsoft/dotnet-apiport/blob/dev/docs/Console/README.md#run-the-tool-in-an-offline-mode).* +[!INCLUDE[](~/includes/deprecating-api-port.md)] Want to make your libraries support multi-platform? Want to see how much work is required to make your .NET Framework application run on .NET Core? The [.NET Portability Analyzer](https://github.com/microsoft/dotnet-apiport) is a tool that analyzes assemblies and provides a detailed report on .NET APIs that are missing for the applications or libraries to be portable on your specified targeted .NET platforms. The Portability Analyzer is offered as a [Visual Studio Extension](https://marketplace.visualstudio.com/items?itemName=ConnieYau.NETPortabilityAnalyzer), which analyzes one assembly per project, and as an [ApiPort console app](https://aka.ms/apiportdownload), which analyzes assemblies by specified files or directory. diff --git a/docs/standard/assembly/index.md b/docs/standard/assembly/index.md index abde22f4482f4..5e9a5a1cb791f 100644 --- a/docs/standard/assembly/index.md +++ b/docs/standard/assembly/index.md @@ -30,7 +30,7 @@ Assemblies have the following properties: - Assemblies are only loaded into memory if they're required. If they aren't used, they aren't loaded. Therefore, assemblies can be an efficient way to manage resources in larger projects. -- You can programmatically obtain information about an assembly by using reflection. For more information, see [Reflection (C#)](../../csharp/programming-guide/concepts/reflection.md) or [Reflection (Visual Basic)](../../visual-basic/programming-guide/concepts/reflection.md). +- You can programmatically obtain information about an assembly by using reflection. For more information, see [Reflection (C#)](/dotnet/csharp/advanced-topics/reflection-and-attributes/) or [Reflection (Visual Basic)](../../visual-basic/programming-guide/concepts/reflection.md). - You can load an assembly just to inspect it by using the <xref:System.Reflection.MetadataLoadContext> class on .NET and .NET Framework. <xref:System.Reflection.MetadataLoadContext> replaces the <xref:System.Reflection.Assembly.ReflectionOnlyLoad%2A?displayProperty=nameWithType> methods. diff --git a/docs/standard/assembly/security-considerations.md b/docs/standard/assembly/security-considerations.md index 803a98067e3c2..bdde30318f492 100644 --- a/docs/standard/assembly/security-considerations.md +++ b/docs/standard/assembly/security-considerations.md @@ -36,7 +36,7 @@ When you build an assembly, you can specify a set of permissions that the assemb > [!NOTE] > Security is a complex area, and you have many options to choose from. For more information, see [Key Security Concepts](../security/key-security-concepts.md). - At load time, the assembly's evidence is used as input to security policy. Security policy is established by the enterprise and the computer's administrator as well as by user policy settings, and determines the set of permissions that is granted to all managed code when executed. Security policy can be established for the publisher of the assembly (if it has a signing tool generated signature), for the Web site and zone (in Internet Explorer terms) the assembly was downloaded from, or for the assembly's strong name. For example, a computer's administrator can establish security policy that allows all code downloaded from a Web site and signed by a given software company to access a database on a computer, but does not grant access to write to the computer's disk. + At load time, the assembly's evidence is used as input to security policy. Security policy is established by the enterprise and the computer's administrator as well as by user policy settings, and determines the set of permissions that's granted to all managed code when executed. Security policy can be established for the publisher of the assembly (if it has a signing tool generated signature), for the Web site and zone (which was an Internet Explorer concept) that the assembly was downloaded from, or for the assembly's strong name. For example, a computer's administrator can establish security policy that allows all code downloaded from a Web site and signed by a given software company to access a database on a computer, but does not grant access to write to the computer's disk. ## Strong-named assemblies and signing tools diff --git a/docs/standard/assembly/snippets/identify/csharp/AssemblySnippets.csproj b/docs/standard/assembly/snippets/identify/csharp/AssemblySnippets.csproj index 26d164b426f1b..1c331f3c180ea 100644 --- a/docs/standard/assembly/snippets/identify/csharp/AssemblySnippets.csproj +++ b/docs/standard/assembly/snippets/identify/csharp/AssemblySnippets.csproj @@ -6,7 +6,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="System.Reflection.Metadata" Version="7.0.0" /> + <PackageReference Include="System.Reflection.Metadata" Version="7.0.1" /> </ItemGroup> </Project> diff --git a/docs/standard/assembly/snippets/identify/visual-basic/AssemblySnippets.vbproj b/docs/standard/assembly/snippets/identify/visual-basic/AssemblySnippets.vbproj index cc79bb8a1b358..18a8ddb2002fb 100644 --- a/docs/standard/assembly/snippets/identify/visual-basic/AssemblySnippets.vbproj +++ b/docs/standard/assembly/snippets/identify/visual-basic/AssemblySnippets.vbproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="System.Reflection.Metadata" Version="7.0.0" /> + <PackageReference Include="System.Reflection.Metadata" Version="7.0.1" /> </ItemGroup> </Project> diff --git a/docs/standard/assembly/toc.yml b/docs/standard/assembly/toc.yml deleted file mode 100644 index 25860a04801a4..0000000000000 --- a/docs/standard/assembly/toc.yml +++ /dev/null @@ -1,68 +0,0 @@ -- name: Assemblies in .NET - href: index.md -- name: Assembly contents - href: contents.md -- name: Manifest - href: manifest.md -- name: Security considerations - href: security-considerations.md -- name: Versioning - href: versioning.md -- name: Side-by-side execution - href: side-by-side-execution.md -- name: Assembly file format - href: file-format.md -- name: Unloadability in .NET Core - href: unloadability.md -- name: Reference assemblies - href: reference-assemblies.md -- name: Resolve assembly loads - href: resolve-loads.md -- name: Create assemblies - href: create.md -- name: Assembly names - href: names.md -- name: Find an assembly's fully qualified name - href: find-fully-qualified-name.md -- name: Assembly location - href: location.md -- name: Set assembly attributes - href: set-attributes.md -- name: Strong-named assemblies - items: - - name: Overview - href: strong-named.md - - name: Create and use strong-named assemblies - href: create-use-strong-named.md - - name: Create a public-private key pair - href: create-public-private-key-pair.md - - name: Sign an assembly with a strong name - href: sign-strong-name.md - - name: Enhanced strong naming - href: enhanced-strong-naming.md - - name: Reference a strong-named assembly - href: reference-strong-named.md - - name: Disable strong-name bypass - href: disable-strong-name-bypass-feature.md -- name: Delay-sign an assembly - href: delay-sign.md -- name: View assembly contents - href: view-contents.md -- name: Type forwarding in the CLR - href: type-forwarding.md -- name: Friend assemblies - items: - - name: Overview - href: friend.md - - name: Create unsigned friend assemblies - href: create-unsigned-friend.md - - name: Create signed friend assemblies - href: create-signed-friend.md -- name: Determine if a file is an assembly - href: identify.md -- name: Load and unload assemblies - href: load-unload.md -- name: "Walkthrough: Embed types from managed assemblies in Visual Studio" - href: embed-types-visual-studio.md -- name: Inspect assembly contents using MetadataLoadContext - href: inspect-contents-using-metadataloadcontext.md diff --git a/docs/standard/asynchronous-programming-patterns/implementing-the-task-based-asynchronous-pattern.md b/docs/standard/asynchronous-programming-patterns/implementing-the-task-based-asynchronous-pattern.md index 7f773cf8a4523..7d0eeae0bcb5c 100644 --- a/docs/standard/asynchronous-programming-patterns/implementing-the-task-based-asynchronous-pattern.md +++ b/docs/standard/asynchronous-programming-patterns/implementing-the-task-based-asynchronous-pattern.md @@ -52,7 +52,7 @@ You can generate compute-bound tasks in the following ways: - In .NET Framework 4, use the <xref:System.Threading.Tasks.TaskFactory.StartNew%2A?displayProperty=nameWithType> method, which accepts a delegate (typically an <xref:System.Action%601> or a <xref:System.Func%601>) to be executed asynchronously. If you provide an <xref:System.Action%601> delegate, the method returns a <xref:System.Threading.Tasks.Task?displayProperty=nameWithType> object that represents the asynchronous execution of that delegate. If you provide a <xref:System.Func%601> delegate, the method returns a <xref:System.Threading.Tasks.Task%601?displayProperty=nameWithType> object. Overloads of the <xref:System.Threading.Tasks.TaskFactory.StartNew%2A> method accept a cancellation token (<xref:System.Threading.CancellationToken>), task creation options (<xref:System.Threading.Tasks.TaskCreationOptions>), and a task scheduler (<xref:System.Threading.Tasks.TaskScheduler>), all of which provide fine-grained control over the scheduling and execution of the task. A factory instance that targets the current task scheduler is available as a static property (<xref:System.Threading.Tasks.Task.Factory%2A>) of the <xref:System.Threading.Tasks.Task> class; for example: `Task.Factory.StartNew(…)`. -- Use the constructors of the `Task` type or the `Start` method if you want to generate and schedule the task separately. Public methods must only return tasks that have already been started. +- Use the constructors of the `Task` type and the `Start` method if you want to generate and schedule the task separately. Public methods must only return tasks that have already been started. - Use the overloads of the <xref:System.Threading.Tasks.Task.ContinueWith%2A?displayProperty=nameWithType> method. This method creates a new task that is scheduled when another task completes. Some of the <xref:System.Threading.Tasks.Task.ContinueWith%2A> overloads accept a cancellation token, continuation options, and a task scheduler for better control over the scheduling and execution of the continuation task. diff --git a/docs/standard/asynchronous-programming-patterns/index.md b/docs/standard/asynchronous-programming-patterns/index.md index 897b892dd4175..95902bc5c83fa 100644 --- a/docs/standard/asynchronous-programming-patterns/index.md +++ b/docs/standard/asynchronous-programming-patterns/index.md @@ -61,6 +61,6 @@ public class MyClass ## See also -- [C# - Asynchronous programming with async and await](../../csharp/programming-guide/concepts/async/index.md) +- [C# - Asynchronous programming with async and await](../../csharp/asynchronous-programming/index.md) - [Visual Basic - Asynchronous Programming with Async and Await](../../visual-basic/programming-guide/concepts/async/index.md) - [F# - Asynchronous Programming](../../fsharp/tutorials/async.md) diff --git a/docs/standard/asynchronous-programming-patterns/toc.yml b/docs/standard/asynchronous-programming-patterns/toc.yml deleted file mode 100644 index c391744053674..0000000000000 --- a/docs/standard/asynchronous-programming-patterns/toc.yml +++ /dev/null @@ -1,54 +0,0 @@ -items: - - name: Asynchronous Programming Patterns - href: index.md - - name: Task-based Asynchronous Pattern (TAP) - items: - - name: Overview - href: task-based-asynchronous-pattern-tap.md - - name: Implementing the Task-based Asynchronous Pattern - href: implementing-the-task-based-asynchronous-pattern.md - - name: Consuming the Task-based Asynchronous Pattern - href: consuming-the-task-based-asynchronous-pattern.md - - name: Interop with Other Asynchronous Patterns and Types - href: interop-with-other-asynchronous-patterns-and-types.md - - name: Event-based Asynchronous Pattern (EAP) - items: - - name: Documentation overview - href: event-based-asynchronous-pattern-eap.md - - name: Overview - href: event-based-asynchronous-pattern-overview.md - - name: Implementing the Event-based Asynchronous Pattern - href: implementing-the-event-based-asynchronous-pattern.md - - name: Best Practices for Implementing the Event-based Asynchronous Pattern - href: best-practices-for-implementing-the-event-based-asynchronous-pattern.md - - name: Deciding When to Implement the Event-based Asynchronous Pattern - href: deciding-when-to-implement-the-event-based-asynchronous-pattern.md - - name: "How to: Implement a Component That Supports the Event-based Asynchronous Pattern" - href: component-that-supports-the-event-based-asynchronous-pattern.md - - name: "How to: Implement a Client of the Event-based Asynchronous Pattern" - href: how-to-implement-a-client-of-the-event-based-asynchronous-pattern.md - - name: "How to: Use Components That Support the Event-based Asynchronous Pattern" - href: how-to-use-components-that-support-the-event-based-asynchronous-pattern.md - - name: Asynchronous Programming Model (APM) - items: - - name: Overview - href: asynchronous-programming-model-apm.md - - name: Calling Asynchronous Methods Using IAsyncResult - href: calling-asynchronous-methods-using-iasyncresult.md - items: - - name: Blocking Application Execution Using an AsyncWaitHandle - href: blocking-application-execution-using-an-asyncwaithandle.md - - name: Blocking Application Execution by Ending an Async Operation - href: blocking-application-execution-by-ending-an-async-operation.md - - name: Polling for the Status of an Asynchronous Operation - href: polling-for-the-status-of-an-asynchronous-operation.md - - name: Using an AsyncCallback Delegate to End an Asynchronous Operation - href: using-an-asynccallback-delegate-to-end-an-asynchronous-operation.md - items: - - name: Using an AsyncCallback Delegate and State Object - href: using-an-asynccallback-delegate-and-state-object.md - - name: Asynchronous Programming Using Delegates - href: asynchronous-programming-using-delegates.md - items: - - name: Calling Synchronous Methods Asynchronously - href: calling-synchronous-methods-asynchronously.md diff --git a/docs/standard/attributes/applying-attributes.md b/docs/standard/attributes/applying-attributes.md index 7434b6cefed30..be26015075566 100644 --- a/docs/standard/attributes/applying-attributes.md +++ b/docs/standard/attributes/applying-attributes.md @@ -52,5 +52,5 @@ Use the following process to apply an attribute to an element of your code. - [Attributes](index.md) - [Retrieving Information Stored in Attributes](retrieving-information-stored-in-attributes.md) - [Concepts](/cpp/windows/attributed-programming-concepts) -- [Attributes (C#)](../../csharp/programming-guide/concepts/attributes/index.md) +- [Attributes (C#)](/dotnet/csharp/advanced-topics/reflection-and-attributes) - [Attributes overview (Visual Basic)](../../visual-basic/programming-guide/concepts/attributes/index.md) diff --git a/docs/standard/attributes/writing-custom-attributes.md b/docs/standard/attributes/writing-custom-attributes.md index 20e89a6c34e99..feff372cd49df 100644 --- a/docs/standard/attributes/writing-custom-attributes.md +++ b/docs/standard/attributes/writing-custom-attributes.md @@ -158,4 +158,4 @@ To design custom attributes, you don't need to learn many new concepts. If you'r - <xref:System.Attribute?displayProperty=nameWithType> - <xref:System.AttributeUsageAttribute?displayProperty=nameWithType> - [Attributes](index.md) -- [Attribute parameter types](~/_csharpstandard/standard/attributes.md#2124-attribute-parameter-types) +- [Attribute parameter types](~/_csharpstandard/standard/attributes.md#2224-attribute-parameter-types) diff --git a/docs/standard/base-types/best-practices-display-data.md b/docs/standard/base-types/best-practices-display-data.md index 02c8c54d4d194..c7753661c2b82 100644 --- a/docs/standard/base-types/best-practices-display-data.md +++ b/docs/standard/base-types/best-practices-display-data.md @@ -28,18 +28,18 @@ To explicitly specify that a string should be formatted by using the conventions - For string concatenation, do not allow the compiler to perform any implicit conversions. Instead, perform an explicit conversion by calling a `ToString` overload that has a `provider` parameter. For example, the compiler implicitly uses the current culture when converting a <xref:System.Double> value to a string in the following code: - [!code-csharp[Implicit String Conversion](./snippets/best-practices-strings/csharp/tostring/Program.cs#1)] - [!code-vb[Implicit String Conversion](./snippets/best-practices-strings/vb/tostring/Program.vb#1)] + [!code-csharp[Implicit String Conversion](./snippets/best-practices-display-data/csharp/tostring/Program.cs#1)] + [!code-vb[Implicit String Conversion](./snippets/best-practices-display-data/vb/tostring/Program.vb#1)] Instead, you can explicitly specify the culture whose formatting conventions are used in the conversion by calling the <xref:System.Double.ToString(System.IFormatProvider)?displayProperty=nameWithType> method, as the following code does: - [!code-csharp[Explicit String Conversion](./snippets/best-practices-strings/csharp/tostring/Program.cs#2)] - [!code-vb[Implicit String Conversion](./snippets/best-practices-strings/vb/tostring/Program.vb#2)] + [!code-csharp[Explicit String Conversion](./snippets/best-practices-display-data/csharp/tostring/Program.cs#2)] + [!code-vb[Implicit String Conversion](./snippets/best-practices-display-data/vb/tostring/Program.vb#2)] - For string interpolation, rather than assigning an interpolated string to a <xref:System.String> instance, assign it to a <xref:System.FormattableString>. You can then call its <xref:System.FormattableString.ToString?displayProperty=nameWithType> method produce a result string that reflects the conventions of the current culture, or you can call the <xref:System.FormattableString.ToString(System.IFormatProvider)?displayProperty=nameWithType> method to produce a result string that reflects the conventions of a specified culture. You can also pass the formattable string to the static <xref:System.FormattableString.Invariant%2A?displayProperty=nameWithType> method to produce a result string that reflects the conventions of the invariant culture. The following example illustrates this approach. (The output from the example reflects a current culture of en-US.) - [!code-csharp[String interpolation](./snippets/best-practices-strings/csharp/formattable/Program.cs)] - [!code-vb[String interpolation](./snippets/best-practices-strings/vb/formattable/Program.vb)] + [!code-csharp[String interpolation](./snippets/best-practices-display-data/csharp/formattable/Program.cs)] + [!code-vb[String interpolation](./snippets/best-practices-display-data/vb/formattable/Program.vb)] ## Persist formatted data diff --git a/docs/standard/base-types/best-practices-strings.md b/docs/standard/base-types/best-practices-strings.md index a9c5bb5b75739..77a27d1c78379 100644 --- a/docs/standard/base-types/best-practices-strings.md +++ b/docs/standard/base-types/best-practices-strings.md @@ -1,7 +1,7 @@ --- title: "Best Practices for Comparing Strings in .NET" description: Learn how to compare strings effectively in .NET applications. -ms.date: "05/01/2019" +ms.date: 01/26/2023 ms.topic: conceptual dev_langs: - "csharp" @@ -21,13 +21,13 @@ ms.assetid: b9f0bf53-e2de-4116-8ce9-d4f91a1df4f7 --- # Best practices for comparing strings in .NET -.NET provides extensive support for developing localized and globalized applications, and makes it easy to apply the conventions of either the current culture or a specific culture when performing common operations such as sorting and displaying strings. But sorting or comparing strings is not always a culture-sensitive operation. For example, strings that are used internally by an application typically should be handled identically across all cultures. When culturally independent string data, such as XML tags, HTML tags, user names, file paths, and the names of system objects, are interpreted as if they were culture-sensitive, application code can be subject to subtle bugs, poor performance, and, in some cases, security issues. +.NET provides extensive support for developing localized and globalized applications, and makes it easy to apply the conventions of either the current culture or a specific culture when performing common operations such as sorting and displaying strings. But sorting or comparing strings isn't always a culture-sensitive operation. For example, strings that are used internally by an application typically should be handled identically across all cultures. When culturally independent string data, such as XML tags, HTML tags, user names, file paths, and the names of system objects, are interpreted as if they were culture-sensitive, application code can be subject to subtle bugs, poor performance, and, in some cases, security issues. This article examines the string sorting, comparison, and casing methods in .NET, presents recommendations for selecting an appropriate string-handling method, and provides additional information about string-handling methods. ## Recommendations for string usage -When you develop with .NET, follow these simple recommendations when you compare strings: +When you develop with .NET, follow these recommendations when you compare strings: - Use overloads that explicitly specify the string comparison rules for string operations. Typically, this involves calling a method overload that has a parameter of type <xref:System.StringComparison>. - Use <xref:System.StringComparison.Ordinal?displayProperty=nameWithType> or <xref:System.StringComparison.OrdinalIgnoreCase?displayProperty=nameWithType> for comparisons as your safe default for culture-agnostic string matching. @@ -41,13 +41,13 @@ When you develop with .NET, follow these simple recommendations when you compare Avoid the following practices when you compare strings: -- Do not use overloads that do not explicitly or implicitly specify the string comparison rules for string operations. -- Do not use string operations based on <xref:System.StringComparison.InvariantCulture?displayProperty=nameWithType> in most cases. One of the few exceptions is when you are persisting linguistically meaningful but culturally agnostic data. -- Do not use an overload of the <xref:System.String.Compare%2A?displayProperty=nameWithType> or <xref:System.String.CompareTo%2A> method and test for a return value of zero to determine whether two strings are equal. +- Don't use overloads that don't explicitly or implicitly specify the string comparison rules for string operations. +- Don't use string operations based on <xref:System.StringComparison.InvariantCulture?displayProperty=nameWithType> in most cases. One of the few exceptions is when you're persisting linguistically meaningful but culturally agnostic data. +- Don't use an overload of the <xref:System.String.Compare%2A?displayProperty=nameWithType> or <xref:System.String.CompareTo%2A> method and test for a return value of zero to determine whether two strings are equal. ## Specifying string comparisons explicitly -Most of the string manipulation methods in .NET are overloaded. Typically, one or more overloads accept default settings, whereas others accept no defaults and instead define the precise way in which strings are to be compared or manipulated. Most of the methods that do not rely on defaults include a parameter of type <xref:System.StringComparison>, which is an enumeration that explicitly specifies rules for string comparison by culture and case. The following table describes the <xref:System.StringComparison> enumeration members. +Most of the string manipulation methods in .NET are overloaded. Typically, one or more overloads accept default settings, whereas others accept no defaults and instead define the precise way in which strings are to be compared or manipulated. Most of the methods that don't rely on defaults include a parameter of type <xref:System.StringComparison>, which is an enumeration that explicitly specifies rules for string comparison by culture and case. The following table describes the <xref:System.StringComparison> enumeration members. |StringComparison member|Description| |-----------------------------|-----------------| @@ -60,53 +60,53 @@ Most of the string manipulation methods in .NET are overloaded. Typically, one o For example, the <xref:System.String.IndexOf%2A> method, which returns the index of a substring in a <xref:System.String> object that matches either a character or a string, has nine overloads: -- <xref:System.String.IndexOf%28System.Char%29>, <xref:System.String.IndexOf%28System.Char%2CSystem.Int32%29>, and <xref:System.String.IndexOf%28System.Char%2CSystem.Int32%2CSystem.Int32%29>, which by default perform an ordinal (case-sensitive and culture-insensitive) search for a character in the string. -- <xref:System.String.IndexOf%28System.String%29>, <xref:System.String.IndexOf%28System.String%2CSystem.Int32%29>, and <xref:System.String.IndexOf%28System.String%2CSystem.Int32%2CSystem.Int32%29>, which by default perform a case-sensitive and culture-sensitive search for a substring in the string. +- <xref:System.String.IndexOf%28System.Char%29>, <xref:System.String.IndexOf%28System.Char%2CSystem.Int32%29>, and <xref:System.String.IndexOf%28System.Char%2CSystem.Int32%2CSystem.Int32%29>, which by default performs an ordinal (case-sensitive and culture-insensitive) search for a character in the string. +- <xref:System.String.IndexOf%28System.String%29>, <xref:System.String.IndexOf%28System.String%2CSystem.Int32%29>, and <xref:System.String.IndexOf%28System.String%2CSystem.Int32%2CSystem.Int32%29>, which by default performs a case-sensitive and culture-sensitive search for a substring in the string. - <xref:System.String.IndexOf%28System.String%2CSystem.StringComparison%29>, <xref:System.String.IndexOf%28System.String%2CSystem.Int32%2CSystem.StringComparison%29>, and <xref:System.String.IndexOf%28System.String%2CSystem.Int32%2CSystem.Int32%2CSystem.StringComparison%29>, which include a parameter of type <xref:System.StringComparison> that allows the form of the comparison to be specified. -We recommend that you select an overload that does not use default values, for the following reasons: +We recommend that you select an overload that doesn't use default values, for the following reasons: -- Some overloads with default parameters (those that search for a <xref:System.Char> in the string instance) perform an ordinal comparison, whereas others (those that search for a string in the string instance) are culture-sensitive. It is difficult to remember which method uses which default value, and easy to confuse the overloads. -- The intent of the code that relies on default values for method calls is not clear. In the following example, which relies on defaults, it is difficult to know whether the developer actually intended an ordinal or a linguistic comparison of two strings, or whether a case difference between `protocol` and "http" might cause the test for equality to return `false`. +- Some overloads with default parameters (those that search for a <xref:System.Char> in the string instance) perform an ordinal comparison, whereas others (those that search for a string in the string instance) are culture-sensitive. It's difficult to remember which method uses which default value, and easy to confuse the overloads. +- The intent of the code that relies on default values for method calls isn't clear. In the following example, which relies on defaults, it's difficult to know whether the developer actually intended an ordinal or a linguistic comparison of two strings, or whether a case difference between `url.Scheme` and "https" might cause the test for equality to return `false`. - [!code-csharp[Conceptual.Strings.BestPractices#1](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/explicitargs1.cs#1)] - [!code-vb[Conceptual.Strings.BestPractices#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/explicitargs1.vb#1)] + :::code language="csharp" source="./snippets/best-practices-strings/csharp/explicitargs/Program.cs" id="default"::: + :::code language="vb" source="./snippets/best-practices-strings/vb/explicitargs/Program.vb" id="default"::: -In general, we recommend that you call a method that does not rely on defaults, because it makes the intent of the code unambiguous. This, in turn, makes the code more readable and easier to debug and maintain. The following example addresses the questions raised about the previous example. It makes it clear that ordinal comparison is used and that differences in case are ignored. +In general, we recommend that you call a method that doesn't rely on defaults, because it makes the intent of the code unambiguous. This, in turn, makes the code more readable and easier to debug and maintain. The following example addresses the questions raised about the previous example. It makes it clear that ordinal comparison is used and that differences in case are ignored. -[!code-csharp[Conceptual.Strings.BestPractices#2](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/explicitargs1.cs#2)] -[!code-vb[Conceptual.Strings.BestPractices#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/explicitargs1.vb#2)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/explicitargs/Program.cs" id="explicit"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/explicitargs/Program.vb" id="explicit"::: ## The details of string comparison String comparison is the heart of many string-related operations, particularly sorting and testing for equality. Strings sort in a determined order: If "my" appears before "string" in a sorted list of strings, "my" must compare less than or equal to "string". Additionally, comparison implicitly defines equality. The comparison operation returns zero for strings it deems equal. A good interpretation is that neither string is less than the other. Most meaningful operations involving strings include one or both of these procedures: comparing with another string, and executing a well-defined sort operation. > [!NOTE] -> You can download the [Sorting Weight Tables](https://www.microsoft.com/download/details.aspx?id=10921), a set of text files that contain information on the character weights used in sorting and comparison operations for Windows operating systems, and the [Default Unicode Collation Element Table](https://www.unicode.org/Public/UCA/latest/allkeys.txt), the latest version of the sort weight table for Linux and macOS. The specific version of the sort weight table on Linux and macOS depends on the version of the [International Components for Unicode](http://site.icu-project.org/) libraries installed on the system. For information on ICU versions and the Unicode versions that they implement, see [Downloading ICU](http://site.icu-project.org/download). +> You can download the [Sorting Weight Tables](https://www.microsoft.com/download/details.aspx?id=10921), a set of text files that contain information on the character weights used in sorting and comparison operations for Windows operating systems, and the [Default Unicode Collation Element Table](https://www.unicode.org/Public/UCA/latest/allkeys.txt), the latest version of the sort weight table for Linux and macOS. The specific version of the sort weight table on Linux and macOS depends on the version of the [International Components for Unicode](https://icu.unicode.org/) libraries installed on the system. For information on ICU versions and the Unicode versions that they implement, see [Downloading ICU](https://icu.unicode.org/download). -However, evaluating two strings for equality or sort order does not yield a single, correct result; the outcome depends on the criteria used to compare the strings. In particular, string comparisons that are ordinal or that are based on the casing and sorting conventions of the current culture or the [invariant culture](xref:System.Globalization.CultureInfo.InvariantCulture) (a locale-agnostic culture based on the English language) may produce different results. +However, evaluating two strings for equality or sort order doesn't yield a single, correct result; the outcome depends on the criteria used to compare the strings. In particular, string comparisons that are ordinal or that are based on the casing and sorting conventions of the current culture or the [invariant culture](xref:System.Globalization.CultureInfo.InvariantCulture) (a locale-agnostic culture based on the English language) may produce different results. In addition, string comparisons using different versions of .NET or using .NET on different operating systems or operating system versions may return different results. For more information, see [Strings and the Unicode Standard](xref:System.String#Unicode). ### String comparisons that use the current culture -One criterion involves using the conventions of the current culture when comparing strings. Comparisons that are based on the current culture use the thread's current culture or locale. If the culture is not set by the user, it defaults to the setting in the **Regional Options** window in Control Panel. You should always use comparisons that are based on the current culture when data is linguistically relevant, and when it reflects culture-sensitive user interaction. +One criterion involves using the conventions of the current culture when comparing strings. Comparisons that are based on the current culture use the thread's current culture or locale. If the culture isn't set by the user, it defaults to the operating system's setting. You should always use comparisons that are based on the current culture when data is linguistically relevant, and when it reflects culture-sensitive user interaction. However, comparison and casing behavior in .NET changes when the culture changes. This happens when an application executes on a computer that has a different culture than the computer on which the application was developed, or when the executing thread changes its culture. This behavior is intentional, but it remains non-obvious to many developers. The following example illustrates differences in sort order between the U.S. English ("en-US") and Swedish ("sv-SE") cultures. Note that the words "ångström", "Windows", and "Visual Studio" appear in different positions in the sorted string arrays. -[!code-csharp[Conceptual.Strings.BestPractices#3](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison1.cs#3)] -[!code-vb[Conceptual.Strings.BestPractices#3](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/comparison1.vb#3)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/comparison1/Program.cs"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/comparison1/Program.vb"::: Case-insensitive comparisons that use the current culture are the same as culture-sensitive comparisons, except that they ignore case as dictated by the thread's current culture. This behavior may manifest itself in sort orders as well. Comparisons that use current culture semantics are the default for the following methods: -- <xref:System.String.Compare%2A?displayProperty=nameWithType> overloads that do not include a <xref:System.StringComparison> parameter. +- <xref:System.String.Compare%2A?displayProperty=nameWithType> overloads that don't include a <xref:System.StringComparison> parameter. - <xref:System.String.CompareTo%2A?displayProperty=nameWithType> overloads. - The default <xref:System.String.StartsWith%28System.String%29?displayProperty=nameWithType> method, and the <xref:System.String.StartsWith%28System.String%2CSystem.Boolean%2CSystem.Globalization.CultureInfo%29?displayProperty=nameWithType> method with a `null`<xref:System.Globalization.CultureInfo> parameter. - The default <xref:System.String.EndsWith%28System.String%29?displayProperty=nameWithType> method, and the <xref:System.String.EndsWith%28System.String%2CSystem.Boolean%2CSystem.Globalization.CultureInfo%29?displayProperty=nameWithType> method with a `null`<xref:System.Globalization.CultureInfo> parameter. -- <xref:System.String.IndexOf%2A?displayProperty=nameWithType> overloads that accept a <xref:System.String> as a search parameter and that do not have a <xref:System.StringComparison> parameter. -- <xref:System.String.LastIndexOf%2A?displayProperty=nameWithType> overloads that accept a <xref:System.String> as a search parameter and that do not have a <xref:System.StringComparison> parameter. +- <xref:System.String.IndexOf%2A?displayProperty=nameWithType> overloads that accept a <xref:System.String> as a search parameter and that don't have a <xref:System.StringComparison> parameter. +- <xref:System.String.LastIndexOf%2A?displayProperty=nameWithType> overloads that accept a <xref:System.String> as a search parameter and that don't have a <xref:System.StringComparison> parameter. In any case, we recommend that you call an overload that has a <xref:System.StringComparison> parameter to make the intent of the method call clear. @@ -114,57 +114,57 @@ Subtle and not so subtle bugs can emerge when non-linguistic string data is inte For nearly all Latin alphabets, including U.S. English, the character "i" (\u0069) is the lowercase version of the character "I" (\u0049). This casing rule quickly becomes the default for someone programming in such a culture. However, the Turkish ("tr-TR") alphabet includes an "I with a dot" character "İ" (\u0130), which is the capital version of "i". Turkish also includes a lowercase "i without a dot" character, "ı" (\u0131), which capitalizes to "I". This behavior occurs in the Azerbaijani ("az") culture as well. -Therefore, assumptions made about capitalizing "i" or lowercasing "I" are not valid among all cultures. If you use the default overloads for string comparison routines, they will be subject to variance between cultures. If the data to be compared is non-linguistic, using the default overloads can produce undesirable results, as the following attempt to perform a case-insensitive comparison of the strings "file" and "FILE" illustrates. +Therefore, assumptions made about capitalizing "i" or lowercasing "I" aren't valid among all cultures. If you use the default overloads for string comparison routines, they will be subject to variance between cultures. If the data to be compared is non-linguistic, using the default overloads can produce undesirable results, as the following attempt to perform a case-insensitive comparison of the strings "bill" and "BILL" illustrates. -[!code-csharp[Conceptual.Strings.BestPractices#11](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/turkish1.cs#11)] -[!code-vb[Conceptual.Strings.BestPractices#11](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/turkish1.vb#11)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/turkish/Program.cs" id="main"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/turkish/Program.vb" id="main"::: This comparison could cause significant problems if the culture is inadvertently used in security-sensitive settings, as in the following example. A method call such as `IsFileURI("file:")` returns `true` if the current culture is U.S. English, but `false` if the current culture is Turkish. Thus, on Turkish systems, someone could circumvent security measures that block access to case-insensitive URIs that begin with "FILE:". -[!code-csharp[Conceptual.Strings.BestPractices#12](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/turkish1.cs#12)] -[!code-vb[Conceptual.Strings.BestPractices#12](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/turkish1.vb#12)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/turkish/Program.cs" id="culture_sensitive"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/turkish/Program.vb" id="culture_sensitive"::: In this case, because "file:" is meant to be interpreted as a non-linguistic, culture-insensitive identifier, the code should instead be written as shown in the following example: -[!code-csharp[Conceptual.Strings.BestPractices#13](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/turkish1.cs#13)] -[!code-vb[Conceptual.Strings.BestPractices#13](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/turkish1.vb#13)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/turkish/Program.cs" id="ordinal"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/turkish/Program.vb" id="ordinal"::: ### Ordinal string operations Specifying the <xref:System.StringComparison.Ordinal?displayProperty=nameWithType> or <xref:System.StringComparison.OrdinalIgnoreCase?displayProperty=nameWithType> value in a method call signifies a non-linguistic comparison in which the features of natural languages are ignored. Methods that are invoked with these <xref:System.StringComparison> values base string operation decisions on simple byte comparisons instead of casing or equivalence tables that are parameterized by culture. In most cases, this approach best fits the intended interpretation of strings while making code faster and more reliable. -Ordinal comparisons are string comparisons in which each byte of each string is compared without linguistic interpretation; for example, "windows" does not match "Windows". This is essentially a call to the C runtime `strcmp` function. Use this comparison when the context dictates that strings should be matched exactly or demands conservative matching policy. Additionally, ordinal comparison is the fastest comparison operation because it applies no linguistic rules when determining a result. +Ordinal comparisons are string comparisons in which each byte of each string is compared without linguistic interpretation; for example, "windows" doesn't match "Windows". This is essentially a call to the C runtime `strcmp` function. Use this comparison when the context dictates that strings should be matched exactly or demands conservative matching policy. Additionally, ordinal comparison is the fastest comparison operation because it applies no linguistic rules when determining a result. -Strings in .NET can contain embedded null characters. One of the clearest differences between ordinal and culture-sensitive comparison (including comparisons that use the invariant culture) concerns the handling of embedded null characters in a string. These characters are ignored when you use the <xref:System.String.Compare%2A?displayProperty=nameWithType> and <xref:System.String.Equals%2A?displayProperty=nameWithType> methods to perform culture-sensitive comparisons (including comparisons that use the invariant culture). As a result, in culture-sensitive comparisons, strings that contain embedded null characters can be considered equal to strings that do not. +Strings in .NET can contain embedded null characters. One of the clearest differences between ordinal and culture-sensitive comparison (including comparisons that use the invariant culture) concerns the handling of embedded null characters in a string. These characters are ignored when you use the <xref:System.String.Compare%2A?displayProperty=nameWithType> and <xref:System.String.Equals%2A?displayProperty=nameWithType> methods to perform culture-sensitive comparisons (including comparisons that use the invariant culture). As a result, in culture-sensitive comparisons, strings that contain embedded null characters can be considered equal to strings that don't. > [!IMPORTANT] > Although string comparison methods disregard embedded null characters, string search methods such as <xref:System.String.Contains%2A?displayProperty=nameWithType>, <xref:System.String.EndsWith%2A?displayProperty=nameWithType>, <xref:System.String.IndexOf%2A?displayProperty=nameWithType>, <xref:System.String.LastIndexOf%2A?displayProperty=nameWithType>, and <xref:System.String.StartsWith%2A?displayProperty=nameWithType> do not. The following example performs a culture-sensitive comparison of the string "Aa" with a similar string that contains several embedded null characters between "A" and "a", and shows how the two strings are considered equal: -[!code-csharp[Conceptual.Strings.BestPractices#19](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/embeddednulls1.cs#19)] - [!code-vb[Conceptual.Strings.BestPractices#19](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/embeddednulls1.vb#19)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/embeddednulls1/Program.cs"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/embeddednulls1/Program.vb"::: -However, the strings are not considered equal when you use ordinal comparison, as the following example shows: +However, the strings aren't considered equal when you use ordinal comparison, as the following example shows: -[!code-csharp[Conceptual.Strings.BestPractices#20](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/embeddednulls2.cs#20)] -[!code-vb[Conceptual.Strings.BestPractices#20](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/embeddednulls2.vb#20)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/embeddednulls2/Program.cs"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/embeddednulls2/Program.vb"::: Case-insensitive ordinal comparisons are the next most conservative approach. These comparisons ignore most casing; for example, "windows" matches "Windows". When dealing with ASCII characters, this policy is equivalent to <xref:System.StringComparison.Ordinal?displayProperty=nameWithType>, except that it ignores the usual ASCII casing. Therefore, any character in [A, Z] (\u0041-\u005A) matches the corresponding character in [a,z] (\u0061-\007A). Casing outside the ASCII range uses the invariant culture's tables. Therefore, the following comparison: -[!code-csharp[Conceptual.Strings.BestPractices#4](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison2.cs#4)] -[!code-vb[Conceptual.Strings.BestPractices#4](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/comparison2.vb#4)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/comparison2/Program.cs" id="OrdinalIgnoreCase"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/comparison2/Program.vb" id="OrdinalIgnoreCase"::: is equivalent to (but faster than) this comparison: -[!code-csharp[Conceptual.Strings.BestPractices#5](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison2.cs#5)] -[!code-vb[Conceptual.Strings.BestPractices#5](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/comparison2.vb#5)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/comparison2/Program.cs" id="Ordinal"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/comparison2/Program.vb" id="Ordinal"::: These comparisons are still very fast. -Both <xref:System.StringComparison.Ordinal?displayProperty=nameWithType> and <xref:System.StringComparison.OrdinalIgnoreCase?displayProperty=nameWithType> use the binary values directly, and are best suited for matching. When you are not sure about your comparison settings, use one of these two values. However, because they perform a byte-by-byte comparison, they do not sort by a linguistic sort order (like an English dictionary) but by a binary sort order. The results may look odd in most contexts if displayed to users. +Both <xref:System.StringComparison.Ordinal?displayProperty=nameWithType> and <xref:System.StringComparison.OrdinalIgnoreCase?displayProperty=nameWithType> use the binary values directly, and are best suited for matching. When you aren't sure about your comparison settings, use one of these two values. However, because they perform a byte-by-byte comparison, they don't sort by a linguistic sort order (like an English dictionary) but by a binary sort order. The results may look odd in most contexts if displayed to users. -Ordinal semantics are the default for <xref:System.String.Equals%2A?displayProperty=nameWithType> overloads that do not include a <xref:System.StringComparison> argument (including the equality operator). In any case, we recommend that you call an overload that has a <xref:System.StringComparison> parameter. +Ordinal semantics are the default for <xref:System.String.Equals%2A?displayProperty=nameWithType> overloads that don't include a <xref:System.StringComparison> argument (including the equality operator). In any case, we recommend that you call an overload that has a <xref:System.StringComparison> parameter. ### String operations that use the invariant culture @@ -176,14 +176,14 @@ Comparisons that use <xref:System.StringComparison.InvariantCulture?displayPrope InvariantCulture: a + ̊ = å -The LATIN SMALL LETTER A character "a" (\u0061), when it is next to the COMBINING RING ABOVE character "+ " ̊" (\u030a), is interpreted as the LATIN SMALL LETTER A WITH RING ABOVE character "å" (\u00e5). As the following example shows, this behavior differs from ordinal comparison. +The LATIN SMALL LETTER A character "a" (\u0061), when it's next to the COMBINING RING ABOVE character "+ " ̊" (\u030a), is interpreted as the LATIN SMALL LETTER A WITH RING ABOVE character "å" (\u00e5). As the following example shows, this behavior differs from ordinal comparison. -[!code-csharp[Conceptual.Strings.BestPractices#15](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison3.cs#15)] -[!code-vb[Conceptual.Strings.BestPractices#15](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/comparison3.vb#15)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/comparison3/Program.cs"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/comparison3/Program.vb"::: When interpreting file names, cookies, or anything else where a combination such as "å" can appear, ordinal comparisons still offer the most transparent and fitting behavior. -On balance, the invariant culture has very few properties that make it useful for comparison. It does comparison in a linguistically relevant manner, which prevents it from guaranteeing full symbolic equivalence, but it is not the choice for display in any culture. One of the few reasons to use <xref:System.StringComparison.InvariantCulture?displayProperty=nameWithType> for comparison is to persist ordered data for a cross-culturally identical display. For example, if a large data file that contains a list of sorted identifiers for display accompanies an application, adding to this list would require an insertion with invariant-style sorting. +On balance, the invariant culture has few properties that make it useful for comparison. It does comparison in a linguistically relevant manner, which prevents it from guaranteeing full symbolic equivalence, but it isn't the choice for display in any culture. One of the few reasons to use <xref:System.StringComparison.InvariantCulture?displayProperty=nameWithType> for comparison is to persist ordered data for a cross-culturally identical display. For example, if a large data file that contains a list of sorted identifiers for display accompanies an application, adding to this list would require an insertion with invariant-style sorting. ## Choosing a StringComparison member for your method call @@ -192,7 +192,7 @@ The following table outlines the mapping from semantic string context to a <xref |Data|Behavior|Corresponding System.StringComparison<br /><br /> value| |----------|--------------|-----------------------------------------------------| |Case-sensitive internal identifiers.<br /><br /> Case-sensitive identifiers in standards such as XML and HTTP.<br /><br /> Case-sensitive security-related settings.|A non-linguistic identifier, where bytes match exactly.|<xref:System.StringComparison.Ordinal>| -|Case-insensitive internal identifiers.<br /><br /> Case-insensitive identifiers in standards such as XML and HTTP.<br /><br /> File paths.<br /><br /> Registry keys and values.<br /><br /> Environment variables.<br /><br /> Resource identifiers (for example, handle names).<br /><br /> Case-insensitive security-related settings.|A non-linguistic identifier, where case is irrelevant; especially data stored in most Windows system services.|<xref:System.StringComparison.OrdinalIgnoreCase>| +|Case-insensitive internal identifiers.<br /><br /> Case-insensitive identifiers in standards such as XML and HTTP.<br /><br /> File paths.<br /><br /> Registry keys and values.<br /><br /> Environment variables.<br /><br /> Resource identifiers (for example, handle names).<br /><br /> Case-insensitive security-related settings.|A non-linguistic identifier, where case is irrelevant.|<xref:System.StringComparison.OrdinalIgnoreCase>| |Some persisted, linguistically relevant data.<br /><br /> Display of linguistic data that requires a fixed sort order.|Culturally agnostic data that still is linguistically relevant.|<xref:System.StringComparison.InvariantCulture><br /><br /> -or-<br /><br /> <xref:System.StringComparison.InvariantCultureIgnoreCase>| |Data displayed to the user.<br /><br /> Most user input.|Data that requires local linguistic customs.|<xref:System.StringComparison.CurrentCulture><br /><br /> -or-<br /><br /> <xref:System.StringComparison.CurrentCultureIgnoreCase>| @@ -204,7 +204,7 @@ The following sections describe the methods that are most commonly used for stri Default interpretation: <xref:System.StringComparison.CurrentCulture?displayProperty=nameWithType>. -As the operation most central to string interpretation, all instances of these method calls should be examined to determine whether strings should be interpreted according to the current culture, or dissociated from the culture (symbolically). Typically, it is the latter, and a <xref:System.StringComparison.Ordinal?displayProperty=nameWithType> comparison should be used instead. +As the operation most central to string interpretation, all instances of these method calls should be examined to determine whether strings should be interpreted according to the current culture, or dissociated from the culture (symbolically). Typically, it's the latter, and a <xref:System.StringComparison.Ordinal?displayProperty=nameWithType> comparison should be used instead. The <xref:System.Globalization.CompareInfo?displayProperty=nameWithType> class, which is returned by the <xref:System.Globalization.CultureInfo.CompareInfo%2A?displayProperty=nameWithType> property, also includes a <xref:System.Globalization.CompareInfo.Compare%2A> method that provides a large number of matching options (ordinal, ignoring white space, ignoring kana type, and so on) by means of the <xref:System.Globalization.CompareOptions> flag enumeration. @@ -212,12 +212,12 @@ The <xref:System.Globalization.CompareInfo?displayProperty=nameWithType> class, Default interpretation: <xref:System.StringComparison.CurrentCulture?displayProperty=nameWithType>. -This method does not currently offer an overload that specifies a <xref:System.StringComparison> type. It is usually possible to convert this method to the recommended <xref:System.String.Compare%28System.String%2CSystem.String%2CSystem.StringComparison%29?displayProperty=nameWithType> form. +This method doesn't currently offer an overload that specifies a <xref:System.StringComparison> type. It's usually possible to convert this method to the recommended <xref:System.String.Compare%28System.String%2CSystem.String%2CSystem.StringComparison%29?displayProperty=nameWithType> form. -Types that implement the <xref:System.IComparable> and <xref:System.IComparable%601> interfaces implement this method. Because it does not offer the option of a <xref:System.StringComparison> parameter, implementing types often let the user specify a <xref:System.StringComparer> in their constructor. The following example defines a `FileName` class whose class constructor includes a <xref:System.StringComparer> parameter. This <xref:System.StringComparer> object is then used in the `FileName.CompareTo` method. +Types that implement the <xref:System.IComparable> and <xref:System.IComparable%601> interfaces implement this method. Because it doesn't offer the option of a <xref:System.StringComparison> parameter, implementing types often let the user specify a <xref:System.StringComparer> in their constructor. The following example defines a `FileName` class whose class constructor includes a <xref:System.StringComparer> parameter. This <xref:System.StringComparer> object is then used in the `FileName.CompareTo` method. -[!code-csharp[Conceptual.Strings.BestPractices#6](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/api1.cs#6)] -[!code-vb[Conceptual.Strings.BestPractices#6](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/api1.vb#6)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/stringcomparer/Program.cs" id="class"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/stringcomparer/Program.vb" id="class"::: ### String.Equals @@ -229,7 +229,7 @@ The <xref:System.String> class lets you test for equality by calling either the Default interpretation: <xref:System.StringComparison.CurrentCulture?displayProperty=nameWithType>. -Be careful when you use the <xref:System.String.ToUpper?displayProperty=nameWithType> and <xref:System.String.ToLower?displayProperty=nameWithType> methods, because forcing a string to a uppercase or lowercase is often used as a small normalization for comparing strings regardless of case. If so, consider using a case-insensitive comparison. +Be careful when you use the <xref:System.String.ToUpper?displayProperty=nameWithType> and <xref:System.String.ToLower?displayProperty=nameWithType> methods, because forcing a string to uppercase or lowercase is often used as a small normalization for comparing strings regardless of case. If so, consider using a case-insensitive comparison. The <xref:System.String.ToUpperInvariant%2A?displayProperty=nameWithType> and <xref:System.String.ToLowerInvariant%2A?displayProperty=nameWithType> methods are also available. <xref:System.String.ToUpperInvariant%2A> is the standard way to normalize case. Comparisons made using <xref:System.StringComparison.OrdinalIgnoreCase?displayProperty=nameWithType> are behaviorally the composition of two calls: calling <xref:System.String.ToUpperInvariant%2A> on both string arguments, and doing a comparison using <xref:System.StringComparison.Ordinal?displayProperty=nameWithType>. @@ -251,9 +251,9 @@ By default, both of these methods perform a culture-sensitive comparison. Default interpretation: <xref:System.StringComparison.CurrentCulture?displayProperty=nameWithType>. -There is a lack of consistency in how the default overloads of these methods perform comparisons. All <xref:System.String.IndexOf%2A?displayProperty=nameWithType> and <xref:System.String.LastIndexOf%2A?displayProperty=nameWithType> methods that include a <xref:System.Char> parameter perform an ordinal comparison, but the default <xref:System.String.IndexOf%2A?displayProperty=nameWithType> and <xref:System.String.LastIndexOf%2A?displayProperty=nameWithType> methods that include a <xref:System.String> parameter perform a culture-sensitive comparison. +There's a lack of consistency in how the default overloads of these methods perform comparisons. All <xref:System.String.IndexOf%2A?displayProperty=nameWithType> and <xref:System.String.LastIndexOf%2A?displayProperty=nameWithType> methods that include a <xref:System.Char> parameter perform an ordinal comparison, but the default <xref:System.String.IndexOf%2A?displayProperty=nameWithType> and <xref:System.String.LastIndexOf%2A?displayProperty=nameWithType> methods that include a <xref:System.String> parameter perform a culture-sensitive comparison. -If you call the <xref:System.String.IndexOf%28System.String%29?displayProperty=nameWithType> or <xref:System.String.LastIndexOf%28System.String%29?displayProperty=nameWithType> method and pass it a string to locate in the current instance, we recommend that you call an overload that explicitly specifies the <xref:System.StringComparison> type. The overloads that include a <xref:System.Char> argument do not allow you to specify a <xref:System.StringComparison> type. +If you call the <xref:System.String.IndexOf%28System.String%29?displayProperty=nameWithType> or <xref:System.String.LastIndexOf%28System.String%29?displayProperty=nameWithType> method and pass it a string to locate in the current instance, we recommend that you call an overload that explicitly specifies the <xref:System.StringComparison> type. The overloads that include a <xref:System.Char> argument don't allow you to specify a <xref:System.StringComparison> type. ## Methods that perform string comparison indirectly @@ -272,18 +272,18 @@ Default interpretation: <xref:System.StringComparison.CurrentCulture?displayProp When you store any data in a collection, or read persisted data from a file or database into a collection, switching the current culture can invalidate the invariants in the collection. The <xref:System.Array.BinarySearch%2A?displayProperty=nameWithType> method assumes that the elements in the array to be searched are already sorted. To sort any string element in the array, the <xref:System.Array.Sort%2A?displayProperty=nameWithType> method calls the <xref:System.String.Compare%2A?displayProperty=nameWithType> method to order individual elements. Using a culture-sensitive comparer can be dangerous if the culture changes between the time that the array is sorted and its contents are searched. For example, in the following code, storage and retrieval operate on the comparer that is provided implicitly by the `Thread.CurrentThread.CurrentCulture` property. If the culture can change between the calls to `StoreNames` and `DoesNameExist`, and especially if the array contents are persisted somewhere between the two method calls, the binary search may fail. -[!code-csharp[Conceptual.Strings.BestPractices#7](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect1.cs#7)] - [!code-vb[Conceptual.Strings.BestPractices#7](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/indirect1.vb#7)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/indirect1/binarysearch.cs" id="no_compare" highlight="11,15"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/indirect1/binarysearch.vb" id="no_compare" highlight="10,14"::: A recommended variation appears in the following example, which uses the same ordinal (culture-insensitive) comparison method both to sort and to search the array. The change code is reflected in the lines labeled `Line A` and `Line B` in the two examples. -[!code-csharp[Conceptual.Strings.BestPractices#8](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect1.cs#8)] -[!code-vb[Conceptual.Strings.BestPractices#8](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/indirect1.vb#8)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/indirect1/binarysearch.cs" id="ordinal" highlight="11,15"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/indirect1/binarysearch.vb" id="ordinal" highlight="10,14"::: If this data is persisted and moved across cultures, and sorting is used to present this data to the user, you might consider using <xref:System.StringComparison.InvariantCulture?displayProperty=nameWithType>, which operates linguistically for better user output but is unaffected by changes in culture. The following example modifies the two previous examples to use the invariant culture for sorting and searching the array. -[!code-csharp[Conceptual.Strings.BestPractices#9](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect1.cs#9)] -[!code-vb[Conceptual.Strings.BestPractices#9](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/indirect1.vb#9)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/indirect1/binarysearch.cs" id="invariant" highlight="11,15"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/indirect1/binarysearch.vb" id="invariant" highlight="10,14"::: ### Collections example: Hashtable constructor @@ -291,8 +291,8 @@ Hashing strings provides a second example of an operation that is affected by th The following example instantiates a <xref:System.Collections.Hashtable> object by passing it the <xref:System.StringComparer> object that is returned by the <xref:System.StringComparer.OrdinalIgnoreCase%2A?displayProperty=nameWithType> property. Because a class <xref:System.StringComparer> that is derived from <xref:System.StringComparer> implements the <xref:System.Collections.IEqualityComparer> interface, its <xref:System.Collections.IEqualityComparer.GetHashCode%2A> method is used to compute the hash code of strings in the hash table. -[!code-csharp[Conceptual.Strings.BestPractices#10](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect2.cs#10)] -[!code-vb[Conceptual.Strings.BestPractices#10](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.strings.bestpractices/vb/indirect2.vb#10)] +:::code language="csharp" source="./snippets/best-practices-strings/csharp/indirect1/Program.cs"::: +:::code language="vb" source="./snippets/best-practices-strings/vb/indirect1/Program.vb"::: ## See also diff --git a/docs/standard/base-types/character-encoding-introduction.md b/docs/standard/base-types/character-encoding-introduction.md index 4f22e797a90e1..d8033ac8bc579 100644 --- a/docs/standard/base-types/character-encoding-introduction.md +++ b/docs/standard/base-types/character-encoding-introduction.md @@ -281,7 +281,7 @@ A better approach is to break the string by counting grapheme clusters, or text :::code language="csharp" source="snippets/character-encoding-introduction/csharp/InsertNewlines.cs" id="SnippetGoodExample"::: -As noted earlier, however, in implementations of .NET other than .NET 5, the `StringInfo` class might handle some grapheme clusters incorrectly. +As noted earlier, prior to .NET 5, the `StringInfo` class had a bug causing some grapheme clusters to be handled incorrectly. ## UTF-8 and UTF-32 diff --git a/docs/standard/base-types/choosing-between-anonymous-and-tuple.md b/docs/standard/base-types/choosing-between-anonymous-and-tuple.md index 414d9f0b00e29..4ef0beb81fa98 100644 --- a/docs/standard/base-types/choosing-between-anonymous-and-tuple.md +++ b/docs/standard/base-types/choosing-between-anonymous-and-tuple.md @@ -102,7 +102,7 @@ You might want to always use <xref:System.ValueTuple> over <xref:System.Tuple>, ### Serialization -One important consideration when choosing a type, is whether or not it will need to be serialized. Serialization is the process of converting the state of an object into a form that can be persisted or transported. For more information, see [serialization](../../csharp/programming-guide/concepts/serialization/index.md). When serialization is important, creating a `class` or `struct` is preferred over anonymous types or tuple types. +One important consideration when choosing a type, is whether or not it will need to be serialized. Serialization is the process of converting the state of an object into a form that can be persisted or transported. For more information, see [serialization](../serialization/index.md). When serialization is important, creating a `class` or `struct` is preferred over anonymous types or tuple types. ## Performance @@ -110,12 +110,12 @@ Performance between these types depends on the scenario. The major impact involv ## Conclusion -As a developer choosing between tuples and anonymous types, there are several factors to consider. Generally speaking, if you're not working with [expression trees](../../csharp/expression-trees.md), and you're comfortable with tuple syntax then choose <xref:System.ValueTuple> as they provide a value type with the flexibility to name properties. If you're working with expression trees, and you'd prefer to name properties, choose anonymous types. Otherwise, use <xref:System.Tuple>. +As a developer choosing between tuples and anonymous types, there are several factors to consider. Generally speaking, if you're not working with [expression trees](/dotnet/csharp/advanced-topics/expression-trees), and you're comfortable with tuple syntax then choose <xref:System.ValueTuple> as they provide a value type with the flexibility to name properties. If you're working with expression trees, and you'd prefer to name properties, choose anonymous types. Otherwise, use <xref:System.Tuple>. ## See also - [Anonymous types](../../csharp/fundamentals/types/anonymous-types.md) -- [Expression trees](../../csharp/expression-trees.md) +- [Expression trees](/dotnet/csharp/advanced-topics/expression-trees) - [Tuple types (C# reference)](../../csharp/language-reference/builtin-types/value-tuples.md) - [Tuples (Visual Basic)](../../visual-basic/programming-guide/language-features/data-types/tuples.md) - [Type design guidelines](../design-guidelines/type.md) diff --git a/docs/standard/base-types/regular-expression-options.md b/docs/standard/base-types/regular-expression-options.md index d21651b8b613c..fe2ebdefb6448 100644 --- a/docs/standard/base-types/regular-expression-options.md +++ b/docs/standard/base-types/regular-expression-options.md @@ -367,7 +367,7 @@ The behavior of ECMAScript and canonical regular expressions differs in three ar By default, when the regular expression engine performs case-insensitive comparisons, it uses the casing conventions of the current culture to determine equivalent uppercase and lowercase characters. -However, this behavior is undesirable for some types of comparisons, particularly when comparing user input to the names of system resources, such as passwords, files, or URLs. The following example illustrates such a scenario. The code is intended to block access to any resource whose URL is prefaced with **FILE://**. The regular expression attempts a case-insensitive match with the string by using the regular expression `$FILE://`. However, when the current system culture is tr-TR (Turkish-Turkey), "I" is not the uppercase equivalent of "i". As a result, the call to the <xref:System.Text.RegularExpressions.Regex.IsMatch%2A?displayProperty=nameWithType> method returns `false`, and access to the file is allowed. +However, this behavior is undesirable for some types of comparisons, particularly when comparing user input to the names of system resources, such as passwords, files, or URLs. The following example illustrates such a scenario. The code is intended to block access to any resource whose URL is prefaced with **FILE://**. The regular expression attempts a case-insensitive match with the string by using the regular expression `$FILE://`. However, when the current system culture is tr-TR (Turkish-Türkiye), "I" is not the uppercase equivalent of "i". As a result, the call to the <xref:System.Text.RegularExpressions.Regex.IsMatch%2A?displayProperty=nameWithType> method returns `false`, and access to the file is allowed. [!code-csharp[Conceptual.Regex.Language.Options#14](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.regex.language.options/cs/culture1.cs#14)] [!code-vb[Conceptual.Regex.Language.Options#14](../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.regex.language.options/vb/culture1.vb#14)] @@ -380,7 +380,7 @@ Instead of using the case-insensitive comparisons of the current culture, you ca > [!NOTE] > Comparison using the invariant culture is available only by supplying the <xref:System.Text.RegularExpressions.RegexOptions.CultureInvariant?displayProperty=nameWithType> value to the `options` parameter of a <xref:System.Text.RegularExpressions.Regex> class constructor or static pattern-matching method. It is not available as an inline option. -The following example is identical to the previous example, except that the static <xref:System.Text.RegularExpressions.Regex.IsMatch%28System.String%2CSystem.String%2CSystem.Text.RegularExpressions.RegexOptions%29?displayProperty=nameWithType> method is called with options that include <xref:System.Text.RegularExpressions.RegexOptions.CultureInvariant?displayProperty=nameWithType>. Even when the current culture is set to Turkish (Turkey), the regular expression engine is able to successfully match "FILE" and "file" and block access to the file resource. +The following example is identical to the previous example, except that the static <xref:System.Text.RegularExpressions.Regex.IsMatch%28System.String%2CSystem.String%2CSystem.Text.RegularExpressions.RegexOptions%29?displayProperty=nameWithType> method is called with options that include <xref:System.Text.RegularExpressions.RegexOptions.CultureInvariant?displayProperty=nameWithType>. Even when the current culture is set to Turkish (Türkiye), the regular expression engine is able to successfully match "FILE" and "file" and block access to the file resource. [!code-csharp[Conceptual.Regex.Language.Options#15](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.regex.language.options/cs/culture1.cs#15)] [!code-vb[Conceptual.Regex.Language.Options#15](../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.regex.language.options/vb/culture1.vb#15)] diff --git a/docs/standard/base-types/regular-expressions.md b/docs/standard/base-types/regular-expressions.md index 646b0c4fd383b..331ce730967dd 100644 --- a/docs/standard/base-types/regular-expressions.md +++ b/docs/standard/base-types/regular-expressions.md @@ -76,7 +76,7 @@ The <xref:System.String> class includes string search and replacement methods th [!code-csharp[Conceptual.Regex#2](~/samples/snippets/csharp/VS_Snippets_CLR/conceptual.regex/cs/example1.cs#2)] [!code-vb[Conceptual.Regex#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.regex/vb/example1.vb#2)] - The regular expression pattern `(Mr\.? |Mrs\.? |Miss |Ms\.? )` matches any occurrence of "Mr ", "Mr. ", "Mrs ", "Mrs. ", "Miss ", "Ms or "Ms. ". The call to the <xref:System.Text.RegularExpressions.Regex.Replace%2A?displayProperty=nameWithType> method replaces the matched string with <xref:System.String.Empty?displayProperty=nameWithType>; in other words, it removes it from the original string. + The regular expression pattern `(Mr\.? |Mrs\.? |Miss |Ms\.? )` matches any occurrence of "Mr ", "Mr. ", "Mrs ", "Mrs. ", "Miss ", "Ms ", or "Ms. ". The call to the <xref:System.Text.RegularExpressions.Regex.Replace%2A?displayProperty=nameWithType> method replaces the matched string with <xref:System.String.Empty?displayProperty=nameWithType>; in other words, it removes it from the original string. ### Example 2: Identify duplicated words diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/formattable/Program.cs b/docs/standard/base-types/snippets/best-practices-display-data/csharp/formattable/Program.cs similarity index 100% rename from docs/standard/base-types/snippets/best-practices-strings/csharp/formattable/Program.cs rename to docs/standard/base-types/snippets/best-practices-display-data/csharp/formattable/Program.cs diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/formattable/formattable.csproj b/docs/standard/base-types/snippets/best-practices-display-data/csharp/formattable/formattable.csproj similarity index 100% rename from docs/standard/base-types/snippets/best-practices-strings/csharp/formattable/formattable.csproj rename to docs/standard/base-types/snippets/best-practices-display-data/csharp/formattable/formattable.csproj diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/tostring/Program.cs b/docs/standard/base-types/snippets/best-practices-display-data/csharp/tostring/Program.cs similarity index 100% rename from docs/standard/base-types/snippets/best-practices-strings/csharp/tostring/Program.cs rename to docs/standard/base-types/snippets/best-practices-display-data/csharp/tostring/Program.cs diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/tostring/tostring.csproj b/docs/standard/base-types/snippets/best-practices-display-data/csharp/tostring/tostring.csproj similarity index 100% rename from docs/standard/base-types/snippets/best-practices-strings/csharp/tostring/tostring.csproj rename to docs/standard/base-types/snippets/best-practices-display-data/csharp/tostring/tostring.csproj diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/formattable/Program.vb b/docs/standard/base-types/snippets/best-practices-display-data/vb/formattable/Program.vb similarity index 100% rename from docs/standard/base-types/snippets/best-practices-strings/vb/formattable/Program.vb rename to docs/standard/base-types/snippets/best-practices-display-data/vb/formattable/Program.vb diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/formattable/formattable.vbproj b/docs/standard/base-types/snippets/best-practices-display-data/vb/formattable/formattable.vbproj similarity index 100% rename from docs/standard/base-types/snippets/best-practices-strings/vb/formattable/formattable.vbproj rename to docs/standard/base-types/snippets/best-practices-display-data/vb/formattable/formattable.vbproj diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/tostring/Program.vb b/docs/standard/base-types/snippets/best-practices-display-data/vb/tostring/Program.vb similarity index 100% rename from docs/standard/base-types/snippets/best-practices-strings/vb/tostring/Program.vb rename to docs/standard/base-types/snippets/best-practices-display-data/vb/tostring/Program.vb diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/tostring/tostring.vbproj b/docs/standard/base-types/snippets/best-practices-display-data/vb/tostring/tostring.vbproj similarity index 100% rename from docs/standard/base-types/snippets/best-practices-strings/vb/tostring/tostring.vbproj rename to docs/standard/base-types/snippets/best-practices-display-data/vb/tostring/tostring.vbproj diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison1/Program.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison1/Program.cs new file mode 100644 index 0000000000000..5322723594414 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison1/Program.cs @@ -0,0 +1,45 @@ +using System.Globalization; + +// Words to sort +string[] values= { "able", "ångström", "apple", "Æble", + "Windows", "Visual Studio" }; + +// Current culture +Array.Sort(values); +DisplayArray(values); + +// Change culture to Swedish (Sweden) +string originalCulture = CultureInfo.CurrentCulture.Name; +Thread.CurrentThread.CurrentCulture = new CultureInfo("sv-SE"); +Array.Sort(values); +DisplayArray(values); + +// Restore the original culture +Thread.CurrentThread.CurrentCulture = new CultureInfo(originalCulture); + +static void DisplayArray(string[] values) +{ + Console.WriteLine($"Sorting using the {CultureInfo.CurrentCulture.Name} culture:"); + + foreach (string value in values) + Console.WriteLine($" {value}"); + + Console.WriteLine(); +} + +// The example displays the following output: +// Sorting using the en-US culture: +// able +// Æble +// ångström +// apple +// Visual Studio +// Windows +// +// Sorting using the sv-SE culture: +// able +// apple +// Visual Studio +// Windows +// ångström +// Æble diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison1/comparison.csproj b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison1/comparison.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison1/comparison.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison2/Program.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison2/Program.cs new file mode 100644 index 0000000000000..4b97a93359717 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison2/Program.cs @@ -0,0 +1,12 @@ +string strA = "Владимир"; +string strB = "ВЛАДИМИР"; + +// <OrdinalIgnoreCase> +string.Compare(strA, strB, StringComparison.OrdinalIgnoreCase); +// </OrdinalIgnoreCase> +Console.WriteLine(string.Compare(strA, strB, StringComparison.OrdinalIgnoreCase)); + +// <Ordinal> +string.Compare(strA.ToUpperInvariant(), strB.ToUpperInvariant(), StringComparison.Ordinal); +// </Ordinal> +Console.WriteLine(string.Compare(strA.ToUpperInvariant(), strB.ToUpperInvariant(), StringComparison.Ordinal)); diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison2/comparison.csproj b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison2/comparison.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison2/comparison.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison3/Program.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison3/Program.cs new file mode 100644 index 0000000000000..5fe69d5edab82 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison3/Program.cs @@ -0,0 +1,14 @@ +string separated = "\u0061\u030a"; +string combined = "\u00e5"; + +Console.WriteLine("Equal sort weight of {0} and {1} using InvariantCulture: {2}", + separated, combined, + string.Compare(separated, combined, StringComparison.InvariantCulture) == 0); + +Console.WriteLine("Equal sort weight of {0} and {1} using Ordinal: {2}", + separated, combined, + string.Compare(separated, combined, StringComparison.Ordinal) == 0); + +// The example displays the following output: +// Equal sort weight of a° and å using InvariantCulture: True +// Equal sort weight of a° and å using Ordinal: False diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison3/comparison.csproj b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison3/comparison.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/comparison3/comparison.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls1/Program.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls1/Program.cs new file mode 100644 index 0000000000000..30795b51bc0c7 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls1/Program.cs @@ -0,0 +1,33 @@ +string str1 = "Aa"; +string str2 = "A" + new string('\u0000', 3) + "a"; + +Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo("en-us"); + +Console.WriteLine($"Comparing '{str1}' ({ShowBytes(str1)}) and '{str2}' ({ShowBytes(str2)}):"); +Console.WriteLine(" With String.Compare:"); +Console.WriteLine($" Current Culture: {string.Compare(str1, str2, StringComparison.CurrentCulture)}"); +Console.WriteLine($" Invariant Culture: {string.Compare(str1, str2, StringComparison.InvariantCulture)}"); +Console.WriteLine(" With String.Equals:"); +Console.WriteLine($" Current Culture: {string.Equals(str1, str2, StringComparison.CurrentCulture)}"); +Console.WriteLine($" Invariant Culture: {string.Equals(str1, str2, StringComparison.InvariantCulture)}"); + +string ShowBytes(string value) +{ + string hexString = string.Empty; + for (int index = 0; index < value.Length; index++) + { + string result = Convert.ToInt32(value[index]).ToString("X4"); + result = string.Concat(" ", result.Substring(0,2), " ", result.Substring(2, 2)); + hexString += result; + } + return hexString.Trim(); +} + +// The example displays the following output: +// Comparing 'Aa' (00 41 00 61) and 'Aa' (00 41 00 00 00 00 00 00 00 61): +// With String.Compare: +// Current Culture: 0 +// Invariant Culture: 0 +// With String.Equals: +// Current Culture: True +// Invariant Culture: True diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls1/embeddednulls.csproj b/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls1/embeddednulls.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls1/embeddednulls.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls2/Program.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls2/Program.cs new file mode 100644 index 0000000000000..884aee0f4280a --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls2/Program.cs @@ -0,0 +1,27 @@ +string str1 = "Aa"; +string str2 = "A" + new String('\u0000', 3) + "a"; + +Console.WriteLine($"Comparing '{str1}' ({ShowBytes(str1)}) and '{str2}' ({ShowBytes(str2)}):"); +Console.WriteLine(" With String.Compare:"); +Console.WriteLine($" Ordinal: {string.Compare(str1, str2, StringComparison.Ordinal)}"); +Console.WriteLine(" With String.Equals:"); +Console.WriteLine($" Ordinal: {string.Equals(str1, str2, StringComparison.Ordinal)}"); + +string ShowBytes(string str) +{ + string hexString = string.Empty; + for (int ctr = 0; ctr < str.Length; ctr++) + { + string result = Convert.ToInt32(str[ctr]).ToString("X4"); + result = " " + result.Substring(0, 2) + " " + result.Substring(2, 2); + hexString += result; + } + return hexString.Trim(); +} + +// The example displays the following output: +// Comparing 'Aa' (00 41 00 61) and 'A a' (00 41 00 00 00 00 00 00 00 61): +// With String.Compare: +// Ordinal: 97 +// With String.Equals: +// Ordinal: False diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls2/embeddednulls.csproj b/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls2/embeddednulls.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/embeddednulls2/embeddednulls.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/explicitargs/Program.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/explicitargs/Program.cs new file mode 100644 index 0000000000000..499e49f0e7681 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/explicitargs/Program.cs @@ -0,0 +1,29 @@ + +CompareWithDefault(); +CompareExplicit(); + +void CompareWithDefault() +{ + //<default> + Uri url = new("https://learn.microsoft.com/"); + + // Incorrect + if (string.Equals(url.Scheme, "https")) + { + // ...Code to handle HTTPS protocol. + } + //</default> +} + +void CompareExplicit() +{ + //<explicit> + Uri url = new("https://learn.microsoft.com/"); + + // Correct + if (string.Equals(url.Scheme, "https", StringComparison.OrdinalIgnoreCase)) + { + // ...Code to handle HTTPS protocol. + } + //</explicit> +} diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/explicitargs/explicitargs.csproj b/docs/standard/base-types/snippets/best-practices-strings/csharp/explicitargs/explicitargs.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/explicitargs/explicitargs.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/indirect1/Program.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/indirect1/Program.cs new file mode 100644 index 0000000000000..ad8655d0b6ce5 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/indirect1/Program.cs @@ -0,0 +1,31 @@ +using System.IO; +using System.Collections; + +const int InitialCapacity = 100; + +Hashtable creationTimeByFile = new(InitialCapacity, StringComparer.OrdinalIgnoreCase); +string directoryToProcess = Directory.GetCurrentDirectory(); + +// Fill the hash table +PopulateFileTable(directoryToProcess); + +// Get some of the files and try to find them with upper cased names +foreach (var file in Directory.GetFiles(directoryToProcess)) + PrintCreationTime(file.ToUpper()); + + +void PopulateFileTable(string directory) +{ + foreach (string file in Directory.GetFiles(directory)) + creationTimeByFile.Add(file, File.GetCreationTime(file)); +} + +void PrintCreationTime(string targetFile) +{ + object? dt = creationTimeByFile[targetFile]; + + if (dt is DateTime value) + Console.WriteLine($"File {targetFile} was created at time {value}."); + else + Console.WriteLine($"File {targetFile} does not exist."); +} diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/indirect1/binarysearch.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/indirect1/binarysearch.cs new file mode 100644 index 0000000000000..aa8f253e106e9 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/indirect1/binarysearch.cs @@ -0,0 +1,77 @@ +public class Class1 +{ + public Class1() + { + _storedNames = Array.Empty<string>(); + } + + // <no_compare> + // Incorrect + string[] _storedNames; + + public void StoreNames(string[] names) + { + _storedNames = new string[names.Length]; + + // Copy the array contents into a new array + Array.Copy(names, _storedNames, names.Length); + + Array.Sort(_storedNames); // Line A + } + + public bool DoesNameExist(string name) => + Array.BinarySearch(_storedNames, name) >= 0; // Line B + // </no_compare> +} + +public class Class2 +{ + public Class2() + { + _storedNames = Array.Empty<string>(); + } + + // <ordinal> + // Correct + string[] _storedNames; + + public void StoreNames(string[] names) + { + _storedNames = new string[names.Length]; + + // Copy the array contents into a new array + Array.Copy(names, _storedNames, names.Length); + + Array.Sort(_storedNames, StringComparer.Ordinal); // Line A + } + + public bool DoesNameExist(string name) => + Array.BinarySearch(_storedNames, name, StringComparer.Ordinal) >= 0; // Line B + // </ordinal> +} + +public class Class3 +{ + public Class3() + { + _storedNames = Array.Empty<string>(); + } + + // <invariant> + // Correct + string[] _storedNames; + + public void StoreNames(string[] names) + { + _storedNames = new string[names.Length]; + + // Copy the array contents into a new array + Array.Copy(names, _storedNames, names.Length); + + Array.Sort(_storedNames, StringComparer.InvariantCulture); // Line A + } + + public bool DoesNameExist(string name) => + Array.BinarySearch(_storedNames, name, StringComparer.InvariantCulture) >= 0; // Line B + // </invariant> +} diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/indirect1/indirect1.csproj b/docs/standard/base-types/snippets/best-practices-strings/csharp/indirect1/indirect1.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/indirect1/indirect1.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/stringcomparer/Program.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/stringcomparer/Program.cs new file mode 100644 index 0000000000000..19649111946f9 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/stringcomparer/Program.cs @@ -0,0 +1,35 @@ + +FileName file1 = new("autoexec.bat", null); +FileName file2 = new("AutoExec.BAT", null); +Console.WriteLine(file1.CompareTo(file2)); + +//<class> +class FileName : IComparable +{ + private readonly StringComparer _comparer; + + public string Name { get; } + + public FileName(string name, StringComparer? comparer) + { + if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name)); + + Name = name; + + if (comparer != null) + _comparer = comparer; + else + _comparer = StringComparer.OrdinalIgnoreCase; + } + + public int CompareTo(object? obj) + { + if (obj == null) return 1; + + if (obj is not FileName) + return _comparer.Compare(Name, obj.ToString()); + else + return _comparer.Compare(Name, ((FileName)obj).Name); + } +} +//</class> diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/stringcomparer/api1.csproj b/docs/standard/base-types/snippets/best-practices-strings/csharp/stringcomparer/api1.csproj new file mode 100644 index 0000000000000..f02677bf640fc --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/stringcomparer/api1.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/csharp/turkish/Program.cs b/docs/standard/base-types/snippets/best-practices-strings/csharp/turkish/Program.cs new file mode 100644 index 0000000000000..3d8fbde44ec14 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/csharp/turkish/Program.cs @@ -0,0 +1,42 @@ +//<main> +using System.Globalization; + +string name = "Bill"; + +Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); +Console.WriteLine($"Culture = {Thread.CurrentThread.CurrentCulture.DisplayName}"); +Console.WriteLine($" Is 'Bill' the same as 'BILL'? {name.Equals("BILL", StringComparison.OrdinalIgnoreCase)}"); +Console.WriteLine($" Does 'Bill' start with 'BILL'? {name.StartsWith("BILL", true, null)}"); +Console.WriteLine(); + +Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR"); +Console.WriteLine($"Culture = {Thread.CurrentThread.CurrentCulture.DisplayName}"); +Console.WriteLine($" Is 'Bill' the same as 'BILL'? {name.Equals("BILL", StringComparison.OrdinalIgnoreCase)}"); +Console.WriteLine($" Does 'Bill' start with 'BILL'? {name.StartsWith("BILL", true, null)}"); + +//' The example displays the following output: +//' +//' Culture = English (United States) +//' Is 'Bill' the same as 'BILL'? True +//' Does 'Bill' start with 'BILL'? True +//' +//' Culture = Turkish (Türkiye) +//' Is 'Bill' the same as 'BILL'? True +//' Does 'Bill' start with 'BILL'? False +//</main> + +public class Example2 +{ + // <culture_sensitive> + public static bool IsFileURI(string path) => + path.StartsWith("FILE:", true, null); + // </culture_sensitive> +} + +public class Example3 +{ + // <ordinal> + public static bool IsFileURI(string path) => + path.StartsWith("FILE:", StringComparison.OrdinalIgnoreCase); + // </ordinal> +} diff --git a/docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-V2/AsyncBreakfast.csproj b/docs/standard/base-types/snippets/best-practices-strings/csharp/turkish/turkish.csproj similarity index 100% rename from docs/csharp/programming-guide/concepts/async/snippets/index/AsyncBreakfast-V2/AsyncBreakfast.csproj rename to docs/standard/base-types/snippets/best-practices-strings/csharp/turkish/turkish.csproj diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/comparison1/Program.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison1/Program.vb new file mode 100644 index 0000000000000..ff5146ccff0e1 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison1/Program.vb @@ -0,0 +1,50 @@ +Imports System.Globalization +Imports System.Threading + +Module Program + Sub Main() + ' Words to sort + Dim values As String() = {"able", "ångström", "apple", "Æble", + "Windows", "Visual Studio"} + + ' Current culture + Array.Sort(values) + DisplayArray(values) + + ' Change culture to Swedish (Sweden) + Dim originalCulture As String = CultureInfo.CurrentCulture.Name + Thread.CurrentThread.CurrentCulture = New CultureInfo("sv-SE") + Array.Sort(values) + DisplayArray(values) + + ' Restore the original culture + Thread.CurrentThread.CurrentCulture = New CultureInfo(originalCulture) + End Sub + + Sub DisplayArray(values As String()) + Console.WriteLine($"Sorting using the {CultureInfo.CurrentCulture.Name} culture:") + + For Each value As String In values + Console.WriteLine($" {value}") + Next + + Console.WriteLine() + End Sub +End Module + +' The example displays the following output: +' Sorting using the en-US culture: +' able +' Æble +' ångström +' apple +' Visual Studio +' Windows +' +' Sorting using the sv-SE culture: +' able +' apple +' Visual Studio +' Windows +' ångström +' Æble diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/comparison1/comparison.vbproj b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison1/comparison.vbproj new file mode 100644 index 0000000000000..9b84c963b26ba --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison1/comparison.vbproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <RootNamespace>comparison</RootNamespace> + <TargetFramework>net7.0</TargetFramework> + <OptionStrict>on</OptionStrict> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/comparison2/Program.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison2/Program.vb new file mode 100644 index 0000000000000..f05a255f1f690 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison2/Program.vb @@ -0,0 +1,16 @@ +Module Program + Sub Main() + Dim strA As String = "Владимир" + Dim strB As String = "ВЛАДИМИР" + + ' <OrdinalIgnoreCase> + String.Compare(strA, strB, StringComparison.OrdinalIgnoreCase) + ' </OrdinalIgnoreCase> + Console.WriteLine(String.Compare(strA, strB, StringComparison.OrdinalIgnoreCase)) + + ' <Ordinal> + String.Compare(strA.ToUpperInvariant(), strB.ToUpperInvariant(), StringComparison.Ordinal) + ' </Ordinal> + Console.WriteLine(String.Compare(strA.ToUpperInvariant(), strB.ToUpperInvariant(), StringComparison.Ordinal)) + End Sub +End Module diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/comparison2/comparison.vbproj b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison2/comparison.vbproj new file mode 100644 index 0000000000000..9b84c963b26ba --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison2/comparison.vbproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <RootNamespace>comparison</RootNamespace> + <TargetFramework>net7.0</TargetFramework> + <OptionStrict>on</OptionStrict> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/comparison3/Program.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison3/Program.vb new file mode 100644 index 0000000000000..737ad0f9bd89a --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison3/Program.vb @@ -0,0 +1,18 @@ +Module Program + Sub Main() + Dim separated As String = ChrW(&H61) & ChrW(&H30A) + Dim combined As String = ChrW(&HE5) + + Console.WriteLine("Equal sort weight of {0} and {1} using InvariantCulture: {2}", + separated, combined, + String.Compare(separated, combined, StringComparison.InvariantCulture) = 0) + + Console.WriteLine("Equal sort weight of {0} and {1} using Ordinal: {2}", + separated, combined, + String.Compare(separated, combined, StringComparison.Ordinal) = 0) + + ' The example displays the following output: + ' Equal sort weight of a° and å using InvariantCulture: True + ' Equal sort weight of a° and å using Ordinal: False + End Sub +End Module diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/comparison3/comparison.vbproj b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison3/comparison.vbproj new file mode 100644 index 0000000000000..9b84c963b26ba --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/comparison3/comparison.vbproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <RootNamespace>comparison</RootNamespace> + <TargetFramework>net7.0</TargetFramework> + <OptionStrict>on</OptionStrict> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls1/Program.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls1/Program.vb new file mode 100644 index 0000000000000..f6b7614db2207 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls1/Program.vb @@ -0,0 +1,36 @@ + +Module Program + Sub Main() + Dim str1 As String = "Aa" + Dim str2 As String = "A" & New String(Convert.ToChar(0), 3) & "a" + + Console.WriteLine($"Comparing '{str1}' ({ShowBytes(str1)}) and '{str2}' ({ShowBytes(str2)}):") + Console.WriteLine(" With String.Compare:") + Console.WriteLine($" Current Culture: {String.Compare(str1, str2, StringComparison.CurrentCulture)}") + Console.WriteLine($" Invariant Culture: {String.Compare(str1, str2, StringComparison.InvariantCulture)}") + Console.WriteLine(" With String.Equals:") + Console.WriteLine($" Current Culture: {String.Equals(str1, str2, StringComparison.CurrentCulture)}") + Console.WriteLine($" Invariant Culture: {String.Equals(str1, str2, StringComparison.InvariantCulture)}") + End Sub + + Function ShowBytes(str As String) As String + Dim hexString As String = String.Empty + + For ctr As Integer = 0 To str.Length - 1 + Dim result As String = Convert.ToInt32(str.Chars(ctr)).ToString("X4") + result = String.Concat(" ", result.Substring(0, 2), " ", result.Substring(2, 2)) + hexString &= result + Next + + Return hexString.Trim() + End Function + + ' The example displays the following output: + ' Comparing 'Aa' (00 41 00 61) and 'Aa' (00 41 00 00 00 00 00 00 00 61): + ' With String.Compare: + ' Current Culture: 0 + ' Invariant Culture: 0 + ' With String.Equals: + ' Current Culture: True + ' Invariant Culture: True +End Module diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls1/embeddednulls.vbproj b/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls1/embeddednulls.vbproj new file mode 100644 index 0000000000000..26526d954042d --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls1/embeddednulls.vbproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <RootNamespace>embeddednulls</RootNamespace> + <TargetFramework>net7.0</TargetFramework> + <OptionStrict>on</OptionStrict> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls2/Program.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls2/Program.vb new file mode 100644 index 0000000000000..d5fef1f8faffa --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls2/Program.vb @@ -0,0 +1,31 @@ +Module Program + Sub Main() + Dim str1 As String = "Aa" + Dim str2 As String = "A" & New String(Convert.ToChar(0), 3) & "a" + + Console.WriteLine($"Comparing '{str1}' ({ShowBytes(str1)}) and '{str2}' ({ShowBytes(str2)}):") + Console.WriteLine(" With String.Compare:") + Console.WriteLine($" Ordinal: {String.Compare(str1, str2, StringComparison.Ordinal)}") + Console.WriteLine(" With String.Equals:") + Console.WriteLine($" Ordinal: {String.Equals(str1, str2, StringComparison.Ordinal)}") + End Sub + + Function ShowBytes(str As String) As String + Dim hexString As String = String.Empty + + For ctr As Integer = 0 To str.Length - 1 + Dim result As String = Convert.ToInt32(str.Chars(ctr)).ToString("X4") + result = String.Concat(" ", result.Substring(0, 2), " ", result.Substring(2, 2)) + hexString &= result + Next + + Return hexString.Trim() + End Function + + ' The example displays the following output: + ' Comparing 'Aa' (00 41 00 61) and 'A a' (00 41 00 00 00 00 00 00 00 61): + ' With String.Compare: + ' Ordinal: 97 + ' With String.Equals: + ' Ordinal: False +End Module diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls2/embeddednulls.vbproj b/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls2/embeddednulls.vbproj new file mode 100644 index 0000000000000..26526d954042d --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/embeddednulls2/embeddednulls.vbproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <RootNamespace>embeddednulls</RootNamespace> + <TargetFramework>net7.0</TargetFramework> + <OptionStrict>on</OptionStrict> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/explicitargs/Program.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/explicitargs/Program.vb new file mode 100644 index 0000000000000..9183e47f90922 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/explicitargs/Program.vb @@ -0,0 +1,28 @@ +Module Program + Sub Main() + CompareWithDefault() + CompareExplicit() + End Sub + + Sub CompareWithDefault() + '<default> + Dim url As New Uri("https://learn.microsoft.com/") + + ' Incorrect + If String.Equals(url.Scheme, "https") Then + ' ...Code to handle HTTPS protocol. + End If + '</default> + End Sub + + Sub CompareExplicit() + '<explicit> + Dim url As New Uri("https://learn.microsoft.com/") + + ' Incorrect + If String.Equals(url.Scheme, "https", StringComparison.OrdinalIgnoreCase) Then + ' ...Code to handle HTTPS protocol. + End If + '</explicit> + End Sub +End Module diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/explicitargs/explicitargs.vbproj b/docs/standard/base-types/snippets/best-practices-strings/vb/explicitargs/explicitargs.vbproj new file mode 100644 index 0000000000000..1ee7fe0c13880 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/explicitargs/explicitargs.vbproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <RootNamespace>explicitargs</RootNamespace> + <TargetFramework>net7.0</TargetFramework> + <OptionStrict>on</OptionStrict> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/indirect1/Program.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/indirect1/Program.vb new file mode 100644 index 0000000000000..e4593a13faf31 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/indirect1/Program.vb @@ -0,0 +1,34 @@ +Imports System.IO + +Module Program + Const InitialCapacity As Integer = 100 + + Private ReadOnly s_creationTimeByFile As New Hashtable(InitialCapacity, StringComparer.OrdinalIgnoreCase) + Private ReadOnly s_directoryToProcess As String = Directory.GetCurrentDirectory() + + Sub Main() + ' Fill the hash table + PopulateFileTable(s_directoryToProcess) + + ' Get some of the files and try to find them with upper cased names + For Each File As String In Directory.GetFiles(s_directoryToProcess) + PrintCreationTime(File.ToUpper()) + Next + End Sub + + Sub PopulateFileTable(directoryPath As String) + For Each file As String In Directory.GetFiles(directoryPath) + s_creationTimeByFile.Add(file, IO.File.GetCreationTime(file)) + Next + End Sub + + Sub PrintCreationTime(targetFile As String) + Dim dt As Object = s_creationTimeByFile(targetFile) + + If TypeOf dt Is Date Then + Console.WriteLine($"File {targetFile} was created at time {DirectCast(dt, Date)}.") + Else + Console.WriteLine($"File {targetFile} does not exist.") + End If + End Sub +End Module diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/indirect1/binarysearch.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/indirect1/binarysearch.vb new file mode 100644 index 0000000000000..314d184143bd2 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/indirect1/binarysearch.vb @@ -0,0 +1,77 @@ +Class BinSearch1 + + Sub New() + _storedNames = Array.Empty(Of String) + End Sub + + '<no_compare> + ' Incorrect + Dim _storedNames As String() + + Sub StoreNames(names As String()) + ReDim _storedNames(names.Length - 1) + + ' Copy the array contents into a new array + Array.Copy(names, _storedNames, names.Length) + + Array.Sort(_storedNames) ' Line A + End Sub + + Function DoesNameExist(name As String) As Boolean + Return Array.BinarySearch(_storedNames, name) >= 0 ' Line B + End Function + '</no_compare> + +End Class + +Class BinSearch2 + + Sub New() + _storedNames = Array.Empty(Of String) + End Sub + + '<ordinal> + ' Correct + Dim _storedNames As String() + + Sub StoreNames(names As String()) + ReDim _storedNames(names.Length - 1) + + ' Copy the array contents into a new array + Array.Copy(names, _storedNames, names.Length) + + Array.Sort(_storedNames, StringComparer.Ordinal) ' Line A + End Sub + + Function DoesNameExist(name As String) As Boolean + Return Array.BinarySearch(_storedNames, name, StringComparer.Ordinal) >= 0 ' Line B + End Function + '</ordinal> + +End Class + +Class BinSearch3 + + Sub New() + _storedNames = Array.Empty(Of String) + End Sub + + '<invariant> + ' Correct + Dim _storedNames As String() + + Sub StoreNames(names As String()) + ReDim _storedNames(names.Length - 1) + + ' Copy the array contents into a new array + Array.Copy(names, _storedNames, names.Length) + + Array.Sort(_storedNames, StringComparer.InvariantCulture) ' Line A + End Sub + + Function DoesNameExist(name As String) As Boolean + Return Array.BinarySearch(_storedNames, name, StringComparer.InvariantCulture) >= 0 ' Line B + End Function + '</invariant> + +End Class diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/indirect1/indirect1.vbproj b/docs/standard/base-types/snippets/best-practices-strings/vb/indirect1/indirect1.vbproj new file mode 100644 index 0000000000000..885160d9cc4b2 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/indirect1/indirect1.vbproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <RootNamespace>indirect1</RootNamespace> + <TargetFramework>net7.0</TargetFramework> + <OptionStrict>on</OptionStrict> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/stringcomparer/Program.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/stringcomparer/Program.vb new file mode 100644 index 0000000000000..a151102e2d5be --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/stringcomparer/Program.vb @@ -0,0 +1,40 @@ +Module Program + Sub Main() + Dim file1 As New FileName("autoexec.bat", Nothing) + Dim file2 As New FileName("AutoExec.BAT", Nothing) + + Console.WriteLine(file1.CompareTo(file2)) + End Sub +End Module + +'<class> +Class FileName + Implements IComparable + + Private ReadOnly _comparer As StringComparer + + Public ReadOnly Property Name As String + + Public Sub New(name As String, comparer As StringComparer) + If (String.IsNullOrEmpty(name)) Then Throw New ArgumentNullException(NameOf(name)) + + Me.Name = name + + If comparer IsNot Nothing Then + _comparer = comparer + Else + _comparer = StringComparer.OrdinalIgnoreCase + End If + End Sub + + Public Function CompareTo(obj As Object) As Integer Implements IComparable.CompareTo + If obj Is Nothing Then Return 1 + + If TypeOf obj IsNot FileName Then + Return _comparer.Compare(Name, obj.ToString()) + Else + Return _comparer.Compare(Name, DirectCast(obj, FileName).Name) + End If + End Function +End Class +'</class> diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/stringcomparer/api.vbproj b/docs/standard/base-types/snippets/best-practices-strings/vb/stringcomparer/api.vbproj new file mode 100644 index 0000000000000..eb89ce90037f1 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/stringcomparer/api.vbproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <RootNamespace>api</RootNamespace> + <TargetFramework>net7.0</TargetFramework> + <OptionStrict>on</OptionStrict> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/turkish/Program.vb b/docs/standard/base-types/snippets/best-practices-strings/vb/turkish/Program.vb new file mode 100644 index 0000000000000..48b9d03acc1fd --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/turkish/Program.vb @@ -0,0 +1,48 @@ +'<main> +Imports System.Globalization +Imports System.Threading + +Module Program + Sub Main() + Dim name As String = "Bill" + + Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US") + Console.WriteLine($"Culture = {Thread.CurrentThread.CurrentCulture.DisplayName}") + Console.WriteLine($" Is 'Bill' the same as 'BILL'? {name.Equals("BILL", StringComparison.OrdinalIgnoreCase)}") + Console.WriteLine($" Does 'Bill' start with 'BILL'? {name.StartsWith("BILL", True, Nothing)}") + Console.WriteLine() + + Thread.CurrentThread.CurrentCulture = New CultureInfo("tr-TR") + Console.WriteLine($"Culture = {Thread.CurrentThread.CurrentCulture.DisplayName}") + Console.WriteLine($" Is 'Bill' the same as 'BILL'? {name.Equals("BILL", StringComparison.OrdinalIgnoreCase)}") + Console.WriteLine($" Does 'Bill' start with 'BILL'? {name.StartsWith("BILL", True, Nothing)}") + End Sub + +End Module + +' The example displays the following output: +' +' Culture = English (United States) +' Is 'Bill' the same as 'BILL'? True +' Does 'Bill' start with 'BILL'? True +' +' Culture = Turkish (Türkiye) +' Is 'Bill' the same as 'BILL'? True +' Does 'Bill' start with 'BILL'? False +'</main> + +Class Example2 + '<culture_sensitive> + Public Shared Function IsFileURI(path As String) As Boolean + Return path.StartsWith("FILE:", True, Nothing) + End Function + '</culture_sensitive> +End Class + +Class Example3 + '<ordinal> + Public Shared Function IsFileURI(path As String) As Boolean + Return path.StartsWith("FILE:", StringComparison.OrdinalIgnoreCase) + End Function + '</ordinal> +End Class diff --git a/docs/standard/base-types/snippets/best-practices-strings/vb/turkish/turkish.vbproj b/docs/standard/base-types/snippets/best-practices-strings/vb/turkish/turkish.vbproj new file mode 100644 index 0000000000000..551dc5aed0567 --- /dev/null +++ b/docs/standard/base-types/snippets/best-practices-strings/vb/turkish/turkish.vbproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <RootNamespace>turkish</RootNamespace> + <TargetFramework>net7.0</TargetFramework> + <OptionStrict>on</OptionStrict> + </PropertyGroup> + +</Project> diff --git a/docs/standard/base-types/snippets/regular-expression-example-scanning-for-hrefs/csharp/Program.cs b/docs/standard/base-types/snippets/regular-expression-example-scanning-for-hrefs/csharp/Program.cs index bef24b7135fb6..9240dd7041858 100644 --- a/docs/standard/base-types/snippets/regular-expression-example-scanning-for-hrefs/csharp/Program.cs +++ b/docs/standard/base-types/snippets/regular-expression-example-scanning-for-hrefs/csharp/Program.cs @@ -7,7 +7,7 @@ public class Class1 public static void Main() { string inputString = "My favorite web sites include:</P>" + - "<A HREF=\"https://docs.microsoft.com/en-us/dotnet/\">" + + "<A HREF=\"https://learn.microsoft.com/en-us/dotnet/\">" + ".NET Documentation</A></P>" + "<A HREF=\"http://www.microsoft.com\">" + "Microsoft Corporation Home Page</A></P>" + @@ -16,7 +16,7 @@ public static void Main() DumpHRefs(inputString); } // The example displays the following output: - // Found href https://docs.microsoft.com/dotnet/ at 43 + // Found href https://learn.microsoft.com/dotnet/ at 43 // Found href http://www.microsoft.com at 114 // Found href https://devblogs.microsoft.com/dotnet/ at 188 // </main> diff --git a/docs/standard/base-types/snippets/regular-expression-example-scanning-for-hrefs/vb/Program.vb b/docs/standard/base-types/snippets/regular-expression-example-scanning-for-hrefs/vb/Program.vb index e9fcefc3f06f7..9a2c566fa8880 100644 --- a/docs/standard/base-types/snippets/regular-expression-example-scanning-for-hrefs/vb/Program.vb +++ b/docs/standard/base-types/snippets/regular-expression-example-scanning-for-hrefs/vb/Program.vb @@ -6,7 +6,7 @@ Public Module Example ' <main> Public Sub Main() Dim inputString As String = "My favorite web sites include:</P>" & - "<A HREF=""https://docs.microsoft.com/en-us/dotnet/"">" & + "<A HREF=""https://learn.microsoft.com/en-us/dotnet/"">" & ".NET Documentation</A></P>" & "<A HREF=""http://www.microsoft.com"">" & "Microsoft Corporation Home Page</A></P>" & @@ -15,7 +15,7 @@ Public Module Example DumpHRefs(inputString) End Sub ' The example displays the following output: - ' Found href https://docs.microsoft.com/dotnet/ at 43 + ' Found href https://learn.microsoft.com/dotnet/ at 43 ' Found href http://www.microsoft.com at 114 ' Found href https://devblogs.microsoft.com/dotnet/ at 188 ' </main> diff --git a/docs/standard/base-types/snippets/regular-expression-source-generators/Program.cs b/docs/standard/base-types/snippets/regular-expression-source-generators/Program.cs deleted file mode 100644 index 6b64e5ab0817d..0000000000000 --- a/docs/standard/base-types/snippets/regular-expression-source-generators/Program.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Text; -using System.Text.RegularExpressions; - -static partial class Program -{ - [GeneratedRegex( - pattern: "abc|def", - options: RegexOptions.IgnoreCase | RegexOptions.Compiled, - cultureName: "en-US")] - private static partial Regex AbcOrDefGeneratedRegex(); - - private static void EvaluateText(string text) - { - if (AbcOrDefGeneratedRegex().IsMatch(text)) - { - Console.WriteLine($""" - ✅ "{text}" matches "{AbcOrDefGeneratedRegex()}" pattern. - """); - } - else - { - Console.WriteLine($""" - ❌ "{text}" doesn't match "{AbcOrDefGeneratedRegex()}" pattern. - """); - } - } - - private static void Main() - { - Console.OutputEncoding = Encoding.UTF8; - - new List<string> { "Incubus", "Deftones", "Tool" }.ForEach(EvaluateText); - - // Sample output: - // ❌ "Incubus" doesn't match "abc|def" pattern. - // ✅ "Deftones" matches "abc|def" pattern. - // ❌ "Tool" doesn't match "abc|def" pattern. - - var abcOrDefRegex = new Regex(pattern: "abc|def", options: RegexOptions.IgnoreCase); - } -} - -static file partial class Program -{ - [GeneratedRegex(pattern: @"(a|bc)d")] - private static partial Regex ExampleRegex(); - - [GeneratedRegex(pattern: "[ab]*[bc]")] - private static partial Regex AnotherExampleRegex(); - - [GeneratedRegex(pattern: "Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday")] - private static partial Regex DaysOfWeekRegex(); - - [GeneratedRegex(pattern: "")] - private static partial Regex BlankRegex(); - - [GeneratedRegex(pattern: @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$")] - private static partial Regex EmailRegex(); - - [GeneratedRegex(pattern: "(\\w)\\1")] - private static partial Regex WordWithBacktrackingRegex(); -} diff --git a/docs/standard/base-types/standard-numeric-format-strings.md b/docs/standard/base-types/standard-numeric-format-strings.md index 91e41d49207a2..f3c55314bf6a0 100644 --- a/docs/standard/base-types/standard-numeric-format-strings.md +++ b/docs/standard/base-types/standard-numeric-format-strings.md @@ -192,18 +192,18 @@ The following example formats a <xref:System.Double> and an <xref:System.Int32> The general ("G") format specifier converts a number to the more compact of either fixed-point or scientific notation, depending on the type of the number and whether a precision specifier is present. The precision specifier defines the maximum number of significant digits that can appear in the result string. If the precision specifier is omitted or zero, the type of the number determines the default precision, as indicated in the following table. -|Numeric type|Default precision| -|------------------|-----------------------| -|<xref:System.Byte> or <xref:System.SByte>|3 digits| +|Numeric type | Default precision | +|-------------------------------------------|-------------------| +|<xref:System.Byte> or <xref:System.SByte> |3 digits| |<xref:System.Int16> or <xref:System.UInt16>|5 digits| |<xref:System.Int32> or <xref:System.UInt32>|10 digits| -|<xref:System.Int64>|19 digits| -|<xref:System.UInt64>|20 digits| -|<xref:System.Numerics.BigInteger>|Unlimited (same as ["R"](#RFormatString))| -|<xref:System.Half>|3 digits| -|<xref:System.Single>|7 digits| -|<xref:System.Double>|15 digits| -|<xref:System.Decimal>|29 digits| +|<xref:System.Int64> |19 digits| +|<xref:System.UInt64> |20 digits| +|<xref:System.Numerics.BigInteger> |Unlimited (same as ["R"](#RFormatString))| +|<xref:System.Half> |Smallest round-trippable number of digits to represent the number| +|<xref:System.Single> |Smallest round-trippable number of digits to represent the number (in .NET Framework, G7 is the default)| +|<xref:System.Double> |Smallest round-trippable number of digits to represent the number (in .NET Framework, G15 is the default)| +|<xref:System.Decimal> |Smallest round-trippable number of digits to represent the number| Fixed-point notation is used if the exponent that would result from expressing the number in scientific notation is greater than -5 and less than the precision specifier; otherwise, scientific notation is used. The result contains a decimal point if required, and trailing zeros after the decimal point are omitted. If the precision specifier is present and the number of significant digits in the result exceeds the specified precision, the excess trailing digits are removed by rounding. diff --git a/docs/standard/collections/thread-safe/index.md b/docs/standard/collections/thread-safe/index.md index cf9d34887617d..19205829cac68 100644 --- a/docs/standard/collections/thread-safe/index.md +++ b/docs/standard/collections/thread-safe/index.md @@ -1,56 +1,55 @@ --- -title: "Thread-Safe Collections" +title: Thread-Safe collections description: Get started with thread-safe collections using the System.Collections.Concurrent namespace in .NET, which includes thread-safe and scalable collection classes. -ms.date: "08/01/2022" +ms.date: 01/23/2023 ms.custom: devdivchpfy22 -helpviewer_keywords: +helpviewer_keywords: - "thread-safe collections, overview" -ms.assetid: 2e7ca21f-786c-4367-96be-0cf3f3dcc6bd --- -# Thread-Safe Collections - -The .NET Framework 4 introduced the <xref:System.Collections.Concurrent?displayProperty=nameWithType> namespace, which includes several collection classes that are both thread-safe and scalable. Multiple threads can safely and efficiently add or remove items from these collections, without requiring additional synchronization in user code. When you write new code, use the concurrent collection classes to write multiple threads to the collection concurrently. If you're only reading from a shared collection, then you can use the classes in the <xref:System.Collections.Generic?displayProperty=nameWithType> namespace. We recommend that you don't use 1.0 collection classes unless you're required to target the .NET Framework 1.1 or earlier runtime. - -## Thread Synchronization in the .NET Framework 1.0 and 2.0 Collections - - The collections introduced in the .NET Framework 1.0 are found in the <xref:System.Collections?displayProperty=nameWithType> namespace. These collections, which include the commonly used <xref:System.Collections.ArrayList> and <xref:System.Collections.Hashtable>, provide some thread safety through the `Synchronized` property, which returns a thread-safe wrapper around the collection. The wrapper works by locking the entire collection on every add or remove operation. Therefore, each thread that's attempting to access the collection must wait for its turn to take the one lock. This process isn't scalable and can cause significant performance degradation for large collections. Also, the design isn't protected from race conditions. For more information, see [Synchronization in Generic Collections](/archive/blogs/bclteam/synchronization-in-generic-collections-brian-grunkemeyer). - - The collection classes introduced in the .NET Framework 2.0, such as <xref:System.Collections.Generic.List%601> and <xref:System.Collections.Generic.Dictionary%602>, are found in the <xref:System.Collections.Generic?displayProperty=nameWithType> namespace. These classes provide improved type safety and performance compared to the .NET Framework 1.0 classes. However, the .NET Framework 2.0 collection classes don't provide any thread synchronization; user code must provide all synchronization when items are added or removed on multiple threads concurrently. - - We recommend using the concurrent collections classes in the .NET Framework 4 because they provide not only the type safety of the .NET Framework 2.0 collection classes but also more efficient and complete thread safety than the .NET Framework 1.0 collections provide. - -## Fine-Grained Locking and Lock-Free Mechanisms - - Some of the concurrent collection types use lightweight synchronization mechanisms such as <xref:System.Threading.SpinLock>, <xref:System.Threading.SpinWait>, <xref:System.Threading.SemaphoreSlim>, and <xref:System.Threading.CountdownEvent>, which are new in the .NET Framework 4. These synchronization types typically use *busy spinning* for brief periods before they put the thread into a true Wait state. When wait times are expected to be short, spinning is far less computationally expensive than waiting, which involves an expensive kernel transition. For collection classes that use spinning, this efficiency means that multiple threads can add and remove items at a high rate. For more information about spinning vs. blocking, see [SpinLock](../../threading/spinlock.md) and [SpinWait](../../threading/spinwait.md). - - The <xref:System.Collections.Concurrent.ConcurrentQueue%601> and <xref:System.Collections.Concurrent.ConcurrentStack%601> classes don't use locks at all. Instead, they rely on <xref:System.Threading.Interlocked> operations to achieve thread safety. - +# Thread-safe collections + +The <xref:System.Collections.Concurrent?displayProperty=nameWithType> namespace includes several collection classes that are both thread-safe and scalable. Multiple threads can safely and efficiently add or remove items from these collections, without requiring additional synchronization in user code. When you write new code, use the concurrent collection classes to write multiple threads to the collection concurrently. If you're only reading from a shared collection, then you can use the classes in the <xref:System.Collections.Generic?displayProperty=nameWithType> namespace. + +## System.Collections and System.Collections.Generic + + The collection classes in the <xref:System.Collections?displayProperty=nameWithType> namespace include <xref:System.Collections.ArrayList> and <xref:System.Collections.Hashtable>. These classes provide some thread safety through the `Synchronized` property, which returns a thread-safe wrapper around the collection. The wrapper works by locking the entire collection on every add or remove operation. Therefore, each thread that's attempting to access the collection must wait for its turn to take the one lock. This process isn't scalable and can cause significant performance degradation for large collections. Also, the design isn't protected from race conditions. For more information, see [Synchronization in Generic Collections](/archive/blogs/bclteam/synchronization-in-generic-collections-brian-grunkemeyer). + + The collection classes in the <xref:System.Collections.Generic?displayProperty=nameWithType> namespace include <xref:System.Collections.Generic.List%601> and <xref:System.Collections.Generic.Dictionary%602>. These classes provide improved type safety and performance compared to the <xref:System.Collections?displayProperty=nameWithType> classes. However, the <xref:System.Collections.Generic?displayProperty=nameWithType> classes don't provide any thread synchronization; user code must provide all synchronization when items are added or removed on multiple threads concurrently. + + We recommend using the concurrent collections classes in the <xref:System.Collections.Concurrent?displayProperty=nameWithType> namespace because they provide type safety and also more efficient and complete thread safety. + +## Fine-grained locking and lock-free mechanisms + + Some of the concurrent collection types use lightweight synchronization mechanisms such as <xref:System.Threading.SpinLock>, <xref:System.Threading.SpinWait>, <xref:System.Threading.SemaphoreSlim>, and <xref:System.Threading.CountdownEvent>. These synchronization types typically use *busy spinning* for brief periods before they put the thread into a true `Wait` state. When wait times are expected to be short, spinning is far less computationally expensive than waiting, which involves an expensive kernel transition. For collection classes that use spinning, this efficiency means that multiple threads can add and remove items at a high rate. For more information about spinning versus blocking, see [SpinLock](../../threading/spinlock.md) and [SpinWait](../../threading/spinwait.md). + + The <xref:System.Collections.Concurrent.ConcurrentQueue%601> and <xref:System.Collections.Concurrent.ConcurrentStack%601> classes don't use locks at all. Instead, they rely on <xref:System.Threading.Interlocked> operations to achieve thread safety. + > [!NOTE] -> Because the concurrent collections classes support <xref:System.Collections.ICollection>, they provide implementations for the <xref:System.Collections.ICollection.IsSynchronized%2A> and <xref:System.Collections.ICollection.SyncRoot%2A> properties, even though these properties are irrelevant. `IsSynchronized` always returns `false` and, `SyncRoot` is always `null` (`Nothing` in Visual Basic). - +> Because the concurrent collections classes support <xref:System.Collections.ICollection>, they provide implementations for the <xref:System.Collections.ICollection.IsSynchronized%2A> and <xref:System.Collections.ICollection.SyncRoot%2A> properties, even though these properties are irrelevant. `IsSynchronized` always returns `false` and, `SyncRoot` is always `null` (`Nothing` in Visual Basic). + The following table lists the collection types in the <xref:System.Collections.Concurrent?displayProperty=nameWithType> namespace: - -|Type|Description| -|----------|-----------------| -|<xref:System.Collections.Concurrent.BlockingCollection%601>|Provides bounding and blocking functionality for any type that implements <xref:System.Collections.Concurrent.IProducerConsumerCollection%601>. For more information, see [BlockingCollection Overview](blockingcollection-overview.md).| -|<xref:System.Collections.Concurrent.ConcurrentDictionary%602>|Thread-safe implementation of a dictionary of key-value pairs.| -|<xref:System.Collections.Concurrent.ConcurrentQueue%601>|Thread-safe implementation of a FIFO (first-in, first-out) queue.| -|<xref:System.Collections.Concurrent.ConcurrentStack%601>|Thread-safe implementation of a LIFO (last-in, first-out) stack.| -|<xref:System.Collections.Concurrent.ConcurrentBag%601>|Thread-safe implementation of an unordered collection of elements.| -|<xref:System.Collections.Concurrent.IProducerConsumerCollection%601>|The interface that a type must implement to be used in a `BlockingCollection`.| - -## Related Articles - -|Title|Description| -|-----------|-----------------| -|[BlockingCollection Overview](blockingcollection-overview.md)|Describes the functionality provided by the <xref:System.Collections.Concurrent.BlockingCollection%601> type.| -|[How to: Add and Remove Items from a ConcurrentDictionary](how-to-add-and-remove-items.md)|Describes how to add and remove elements from a <xref:System.Collections.Concurrent.ConcurrentDictionary%602>| -|[How to: Add and Take Items Individually from a BlockingCollection](how-to-add-and-take-items.md)|Describes how to add and retrieve items from a blocking collection without using the read-only enumerator.| -|[How to: Add Bounding and Blocking Functionality to a Collection](how-to-add-bounding-and-blocking.md)|Describes how to use any collection class as the underlying storage mechanism for an <xref:System.Collections.Concurrent.IProducerConsumerCollection%601> collection.| -|[How to: Use ForEach to Remove Items in a BlockingCollection](how-to-use-foreach-to-remove.md)|Describes how to use `foreach` (`For Each` in Visual Basic) to remove all items in a blocking collection.| -|[How to: Use Arrays of Blocking Collections in a Pipeline](how-to-use-arrays-of-blockingcollections.md)|Describes how to use multiple blocking collections at the same time to implement a pipeline.| -|[How to: Create an Object Pool by Using a ConcurrentBag](how-to-create-an-object-pool.md)|Shows how to use a concurrent bag to improve performance in scenarios where you can reuse objects instead of continually creating new ones.| - -## Reference + +|Type|Description| +|----------|-----------------| +|<xref:System.Collections.Concurrent.BlockingCollection%601>|Provides bounding and blocking functionality for any type that implements <xref:System.Collections.Concurrent.IProducerConsumerCollection%601>. For more information, see [BlockingCollection Overview](blockingcollection-overview.md).| +|<xref:System.Collections.Concurrent.ConcurrentDictionary%602>|Thread-safe implementation of a dictionary of key-value pairs.| +|<xref:System.Collections.Concurrent.ConcurrentQueue%601>|Thread-safe implementation of a FIFO (first-in, first-out) queue.| +|<xref:System.Collections.Concurrent.ConcurrentStack%601>|Thread-safe implementation of a LIFO (last-in, first-out) stack.| +|<xref:System.Collections.Concurrent.ConcurrentBag%601>|Thread-safe implementation of an unordered collection of elements.| +|<xref:System.Collections.Concurrent.IProducerConsumerCollection%601>|The interface that a type must implement to be used in a `BlockingCollection`.| + +## Related articles + +|Title|Description| +|-----------|-----------------| +|[BlockingCollection Overview](blockingcollection-overview.md)|Describes the functionality provided by the <xref:System.Collections.Concurrent.BlockingCollection%601> type.| +|[How to: Add and Remove Items from a ConcurrentDictionary](how-to-add-and-remove-items.md)|Describes how to add and remove elements from a <xref:System.Collections.Concurrent.ConcurrentDictionary%602>| +|[How to: Add and Take Items Individually from a BlockingCollection](how-to-add-and-take-items.md)|Describes how to add and retrieve items from a blocking collection without using the read-only enumerator.| +|[How to: Add Bounding and Blocking Functionality to a Collection](how-to-add-bounding-and-blocking.md)|Describes how to use any collection class as the underlying storage mechanism for an <xref:System.Collections.Concurrent.IProducerConsumerCollection%601> collection.| +|[How to: Use ForEach to Remove Items in a BlockingCollection](how-to-use-foreach-to-remove.md)|Describes how to use `foreach` (`For Each` in Visual Basic) to remove all items in a blocking collection.| +|[How to: Use Arrays of Blocking Collections in a Pipeline](how-to-use-arrays-of-blockingcollections.md)|Describes how to use multiple blocking collections at the same time to implement a pipeline.| +|[How to: Create an Object Pool by Using a ConcurrentBag](how-to-create-an-object-pool.md)|Shows how to use a concurrent bag to improve performance in scenarios where you can reuse objects instead of continually creating new ones.| + +## Reference - <xref:System.Collections.Concurrent?displayProperty=nameWithType> diff --git a/docs/standard/collections/thread-safe/toc.yml b/docs/standard/collections/thread-safe/toc.yml deleted file mode 100644 index ecd8483e711d8..0000000000000 --- a/docs/standard/collections/thread-safe/toc.yml +++ /dev/null @@ -1,19 +0,0 @@ -- name: Thread-Safe Collections - href: index.md - items: - - name: BlockingCollection Overview - href: blockingcollection-overview.md - - name: When to Use a Thread-Safe Collection - href: when-to-use-a-thread-safe-collection.md - - name: "How to: Add and Take Items Individually from a BlockingCollection" - href: how-to-add-and-take-items.md - - name: "How to: Use ForEach to Remove Items in a BlockingCollection" - href: how-to-use-foreach-to-remove.md - - name: "How to: Add and Remove Items from a ConcurrentDictionary" - href: how-to-add-and-remove-items.md - - name: "How to: Add Bounding and Blocking Functionality to a Collection" - href: how-to-add-bounding-and-blocking.md - - name: "How to: Use Arrays of Blocking Collections in a Pipeline" - href: how-to-use-arrays-of-blockingcollections.md - - name: "How to: Create an Object Pool by Using a ConcurrentBag" - href: how-to-create-an-object-pool.md diff --git a/docs/standard/data/sqlite/TOC.yml b/docs/standard/data/sqlite/TOC.yml deleted file mode 100644 index 7c2d49b3ddc4f..0000000000000 --- a/docs/standard/data/sqlite/TOC.yml +++ /dev/null @@ -1,59 +0,0 @@ -- name: Overview - href: index.md -- name: Connection strings - href: connection-strings.md -- name: Data types - href: types.md -- name: Parameters - href: parameters.md -- name: Database errors - displayName: Busy, locked, retries, timeouts - href: database-errors.md -- name: Transactions - href: transactions.md -- name: Batching - href: batching.md -- name: Metadata - href: metadata.md -- name: SQLite features - items: - - name: In-memory databases - href: in-memory-databases.md - - name: Encryption - href: encryption.md - - name: Online backup - href: backup.md - - name: User-defined functions - displayName: UDFs - href: user-defined-functions.md - - name: Custom SQLite versions - href: custom-versions.md - - name: Collation - href: collation.md - - name: Blob I/O - displayName: Streams - href: blob-io.md - - name: Interoperability - href: interop.md - - name: Extensions - href: extensions.md -- name: Limitations - items: - - name: ADO.NET - href: adonet-limitations.md - - name: Async - href: async.md - - name: Bulk insert - href: bulk-insert.md - - name: Entity Framework Core - href: /ef/core/providers/sqlite/limitations - - name: Dapper - href: dapper-limitations.md - - name: System.Data.SQLite - href: compare.md - - name: Xamarin - href: xamarin.md -- name: API reference >> - href: ../../../../api/index.md?view=msdata-sqlite-3.1.0&preserve-view=false -- name: SQL syntax - href: https://www.sqlite.org/lang.html diff --git a/docs/standard/data/sqlite/in-memory-databases.md b/docs/standard/data/sqlite/in-memory-databases.md index 53f7ce941401d..68781073f1168 100644 --- a/docs/standard/data/sqlite/in-memory-databases.md +++ b/docs/standard/data/sqlite/in-memory-databases.md @@ -13,7 +13,7 @@ Data Source=:memory: ## Shareable in-memory databases -In-memory databases can be shared between multiple connections by using `Mode=Memory` and `Cache=Shared` in the connection string. The `Data Source` keyword is used to give the in-memory database a name. Connection strings using the same name will access the same in-memory database. The database persists as long as at least one connection to it remains open. A [sample](https://github.com/dotnet/docs/blob/main/samples/snippets/standard/data/sqlite/InMemorySample/Program.cs) demonstrating this is available on GitHub. +In-memory databases can be shared between multiple connections by using `Mode=Memory` and `Cache=Shared` in the connection string. The `Data Source` keyword is used to give the in-memory database a name. Connection strings using the same name will access the same in-memory database. The database persists as long as at least one connection to it remains open. A [sample](https://github.com/dotnet/samples/tree/main/standard/data/sqlite/InMemorySample/Program.cs) demonstrating this is available on GitHub. ```connectionstring Data Source=InMemorySample;Mode=Memory;Cache=Shared diff --git a/docs/standard/data/xml/index.md b/docs/standard/data/xml/index.md index 3a256c3e04521..30f2201da654f 100644 --- a/docs/standard/data/xml/index.md +++ b/docs/standard/data/xml/index.md @@ -6,7 +6,7 @@ ms.assetid: e695047f-3c0f-4045-8708-5baea91cc380 --- # XML Documents and Data -The .NET Framework provides a comprehensive and integrated set of classes that enable you to build XML-aware apps easily. The classes in the following namespaces support parsing and writing XML, editing XML data in memory, data validation, and XSLT transformation. +.NET provides a comprehensive and integrated set of classes that enable you to build XML-aware apps easily. The classes in the following namespaces support parsing and writing XML, editing XML data in memory, data validation, and XSLT transformation. - <xref:System.Xml> diff --git a/docs/standard/data/xml/style-sheet-directives-embedded-in-a-document.md b/docs/standard/data/xml/style-sheet-directives-embedded-in-a-document.md index 039a975abd484..0f43e6a3575e5 100644 --- a/docs/standard/data/xml/style-sheet-directives-embedded-in-a-document.md +++ b/docs/standard/data/xml/style-sheet-directives-embedded-in-a-document.md @@ -6,7 +6,7 @@ ms.assetid: d79fb295-ebc7-438d-ba1b-05be7d534834 --- # Style Sheet Directives Embedded in a Document -Occasionally, existing XML contains the style sheet directive of `<?xml:stylesheet?>`. Microsoft Internet Explorer accepts this as an alternative to the `<?xml-stylesheet?>` syntax. When the XML data contains an `<?xml:stylesheet?>` directive, as shown in the following data, attempting to load this data into the XML Document Object Model (DOM) throws an exception. +Occasionally, existing XML contains the style sheet directive of `<?xml:stylesheet?>` (notice the use of a colon instead of a hyphen). When the XML data contains an `<?xml:stylesheet?>` directive, as shown in the following data, attempting to load this data into the XML Document Object Model (DOM) throws an exception. ```xml <?xml version="1.0" ?> @@ -27,7 +27,7 @@ From Section 6 of the Namespaces in XML specification, the effect of having the With the `<?xml:stylesheet?>` containing a colon, you now violate the rule in the second bullet. -According to the World Wide Web Consortium (W3C) [Associating Style Sheets with XML documents Version 1.0 Recommendation](https://www.w3.org/TR/xml-stylesheet/), the processing instruction to associate an XSLT style sheet with an XML document is `<?xml-stylesheet?>`, with a dash replacing the colon. +According to the World Wide Web Consortium (W3C) [Associating Style Sheets with XML documents Version 1.0 Recommendation](https://www.w3.org/TR/xml-stylesheet/), the processing instruction to associate an XSLT style sheet with an XML document is `<?xml-stylesheet?>`, with a dash replacing the colon. ## See also diff --git a/docs/standard/data/xml/toc.yml b/docs/standard/data/xml/toc.yml deleted file mode 100644 index 34c06f67ae058..0000000000000 --- a/docs/standard/data/xml/toc.yml +++ /dev/null @@ -1,247 +0,0 @@ -- name: XML Documents and Data - href: index.md - items: - - name: XML Processing Options - href: xml-processing-options.md - - name: Processing XML Data In-Memory - href: processing-xml-data-in-memory.md - items: - - name: Process XML Data Using the DOM Model - href: process-xml-data-using-the-dom-model.md - items: - - name: XML Document Object Model (DOM) - href: xml-document-object-model-dom.md - - name: Types of XML Nodes - href: types-of-xml-nodes.md - - name: XML Document Object Model (DOM) Hierarchy - href: xml-document-object-model-dom-hierarchy.md - - name: Mapping the Object Hierarchy to XML Data - href: mapping-the-object-hierarchy-to-xml-data.md - - name: XML Document Creation - href: xml-document-creation.md - - name: Reading an XML Document into the DOM - href: reading-an-xml-document-into-the-dom.md - items: - - name: Style Sheet Directives Embedded in a Document - href: style-sheet-directives-embedded-in-a-document.md - - name: Load Data from a Reader - href: load-data-from-a-reader.md - - name: White Space and Significant White Space Handling when Loading the DOM - href: white-space-and-significant-white-space-handling-when-loading-the-dom.md - - name: Accessing Attributes in the DOM - href: accessing-attributes-in-the-dom.md - - name: Reading Entity Declarations and Entity References into the DOM - href: reading-entity-declarations-and-entity-references-into-the-dom.md - - name: Entity References are Preserved - href: entity-references-are-preserved.md - - name: Entity References are Expanded and Not Preserved - href: entity-references-are-expanded-and-not-preserved.md - - name: Inserting Nodes into an XML Document - href: inserting-nodes-into-an-xml-document.md - items: - - name: Create New Nodes in the DOM - href: create-new-nodes-in-the-dom.md - items: - - name: Creating New Attributes for Elements in the DOM - href: creating-new-attributes-for-elements-in-the-dom.md - - name: XML Element and Attribute Name Verification when Creating New Nodes - href: xml-element-and-attribute-name-verification-when-creating-new-nodes.md - - name: Creating New Entity References - href: creating-new-entity-references.md - - name: Namespace Affect on Entity Reference Expansion for New Nodes Containing Elements and Attributes - href: namespace-affect-on-entity-ref-expansion-for-new-nodes.md - - name: Copy Existing Nodes - href: copy-existing-nodes.md - - name: Copying Existing Nodes from One Document to Another - href: copying-existing-nodes-from-one-document-to-another.md - - name: Copying Document Fragments - href: copying-document-fragments.md - - name: Removing Nodes, Content, and Values from an XML Document - href: removing-nodes-content-and-values-from-an-xml-document.md - items: - - name: Removing Nodes from the DOM - href: removing-nodes-from-the-dom.md - - name: Removing Attributes from an Element Node in the DOM - href: removing-attributes-from-an-element-node-in-the-dom.md - - name: Removing Node Content in the DOM - href: removing-node-content-in-the-dom.md - - name: Modifying Nodes, Content, and Values in an XML Document - href: modifying-nodes-content-and-values-in-an-xml-document.md - - name: Validating an XML Document in the DOM - href: validating-an-xml-document-in-the-dom.md - - name: Saving and Writing a Document - href: saving-and-writing-a-document.md - - name: Select Nodes Using XPath Navigation - href: select-nodes-using-xpath-navigation.md - - name: Resolving External Resources - href: resolving-external-resources.md - - name: Object Comparison Using XmlNameTable - href: object-comparison-using-xmlnametable.md - - name: Node Collections in NamedNodeMaps and NodeLists - href: node-collections-in-namednodemaps-and-nodelists.md - items: - - name: Unordered Node Retrieval by Name or Index - href: unordered-node-retrieval-by-name-or-index.md - - name: Ordered Node Retrieval by Index - href: ordered-node-retrieval-by-index.md - - name: Dynamic Updates to NodeLists and NamedNodeMaps - href: dynamic-updates-to-nodelists-and-namednodemaps.md - - name: Namespace Support in the DOM - href: namespace-support-in-the-dom.md - items: - - name: Namespaces and DTDs in the DOM - href: namespaces-and-dtds-in-the-dom.md - - name: Changing Namespace Declarations in an XML Document - href: changing-namespace-declarations-in-an-xml-document.md - - name: Changing Namespace Prefix Properties - href: changing-namespace-prefix-properties.md - - name: Event Handling in an XML Document Using the XmlNodeChangedEventArgs - href: event-handling-in-an-xml-document-using-the-xmlnodechangedeventargs.md - - name: Extending the DOM - href: extending-the-dom.md - - name: Process XML Data Using the XPath Data Model - href: process-xml-data-using-the-xpath-data-model.md - items: - - name: Reading XML Data using XPathDocument and XmlDocument - href: reading-xml-data-using-xpathdocument-and-xmldocument.md - - name: Selecting, Evaluating and Matching XML Data using XPathNavigator - href: selecting-evaluating-and-matching-xml-data-using-xpathnavigator.md - items: - - name: Select XML Data Using XPathNavigator - href: select-xml-data-using-xpathnavigator.md - - name: Evaluate XPath Expressions using XPathNavigator - href: evaluate-xpath-expressions-using-xpathnavigator.md - - name: Matching Nodes using XPathNavigator - href: matching-nodes-using-xpathnavigator.md - - name: Node Types Recognized with XPath Queries - href: node-types-recognized-with-xpath-queries.md - - name: XPath Queries and Namespaces - href: xpath-queries-and-namespaces.md - - name: Compiled XPath Expressions - href: compiled-xpath-expressions.md - - name: XPath Namespace Navigation - href: xpath-namespace-navigation.md - - name: Accessing XML Data using XPathNavigator - href: accessing-xml-data-using-xpathnavigator.md - items: - - name: Node Set Navigation Using XPathNavigator - href: node-set-navigation-using-xpathnavigator.md - - name: Attribute and Namespace Node Navigation Using XPathNavigator - href: attribute-and-namespace-node-navigation-using-xpathnavigator.md - - name: Extract XML Data Using XPathNavigator - href: extract-xml-data-using-xpathnavigator.md - - name: Accessing Strongly Typed XML Data Using XPathNavigator - href: accessing-strongly-typed-xml-data-using-xpathnavigator.md - - name: User Defined Functions and Variables - href: user-defined-functions-and-variables.md - - name: Editing XML Data using XPathNavigator - href: editing-xml-data-using-xpathnavigator.md - items: - - name: Insert XML Data using XPathNavigator - href: insert-xml-data-using-xpathnavigator.md - - name: Modify XML Data using XPathNavigator - href: modify-xml-data-using-xpathnavigator.md - - name: Remove XML Data using XPathNavigator - href: remove-xml-data-using-xpathnavigator.md - - name: Schema Validation using XPathNavigator - href: schema-validation-using-xpathnavigator.md - - name: Process XML Data Using LINQ to XML - href: process-xml-data-using-linq-to-xml.md - - name: XSLT Transformations - href: xslt-transformations.md - items: - - name: Using the XslCompiledTransform Class - href: using-the-xslcompiledtransform-class.md - items: - - name: Inputs to the XslCompiledTransform Class - href: inputs-to-the-xslcompiledtransform-class.md - - name: Output Options on the XslCompiledTransform Class - href: output-options-on-the-xslcompiledtransform-class.md - - name: Resolving External Resources During XSLT Processing - href: resolving-external-resources-during-xslt-processing.md - - name: Extending XSLT Style Sheets - href: extending-xslt-style-sheets.md - items: - - name: XSLT Extension Objects - href: xslt-extension-objects.md - - name: XSLT Parameters - href: xslt-parameters.md - - name: Script Blocks Using msxsl:script - href: script-blocks-using-msxsl-script.md - - name: Recoverable XSLT Errors - href: recoverable-xslt-errors.md - - name: "How to: Transform a Node Fragment" - href: how-to-transform-a-node-fragment.md - - name: Migrating From the XslTransform Class - href: migrating-from-the-xsltransform-class.md - items: - - name: "How to: Migrate Your XslTransform Code" - href: how-to-migrate-your-xsltransform-code.md - - name: XSLT Security Considerations - href: xslt-security-considerations.md - - name: XSLT Compiler (xsltc.exe) - href: xslt-compiler-xsltc-exe.md - items: - - name: 'How to: Perform an XSLT Transformation by Using an Assembly' - href: how-to-perform-an-xslt-transformation-by-using-an-assembly.md - - name: Working with XML Schemas - href: working-with-xml-schemas.md - items: - - name: XML Schema Object Model (SOM) - href: xml-schema-object-model-som.md - items: - - name: XML Schema Object Model Overview - href: xml-schema-object-model-overview.md - - name: Reading and Writing XML Schemas - href: reading-and-writing-xml-schemas.md - - name: Building XML Schemas - href: building-xml-schemas.md - - name: Traversing XML Schemas - href: traversing-xml-schemas.md - - name: Editing XML Schemas - href: editing-xml-schemas.md - - name: Including or Importing XML Schemas - href: including-or-importing-xml-schemas.md - - name: XmlSchemaSet for Schema Compilation - href: xmlschemaset-for-schema-compilation.md - items: - - name: Post-Schema Compilation Infoset - href: post-schema-compilation-infoset.md - - name: XML Schema (XSD) Validation with XmlSchemaSet - href: xml-schema-xsd-validation-with-xmlschemaset.md - - name: XmlSchemaCollection Schema Compilation - href: xmlschemacollection-schema-compilation.md - items: - - name: XDR Validation with XmlSchemaCollection - href: xdr-validation-with-xmlschemacollection.md - - name: XML Schema (XSD) Validation with XmlSchemaCollection - href: xml-schema-xsd-validation-with-xmlschemacollection.md - - name: XmlSchemaValidator Push-Based Validation - href: xmlschemavalidator-push-based-validation.md - - name: Inferring an XML Schema - href: inferring-an-xml-schema.md - items: - - name: Inferring Schemas from XML Documents - href: inferring-schemas-from-xml-documents.md - - name: Rules for Inferring Schema Node Types and Structure - href: rules-for-inferring-schema-node-types-and-structure.md - - name: Rules for Inferring Simple Types - href: rules-for-inferring-simple-types.md - - name: XML Integration with Relational Data and ADO.NET - href: xml-integration-with-relational-data-and-adonet.md - - name: Managing Namespaces in an XML Document - href: managing-namespaces-in-an-xml-document.md - - name: Type Support in the System.Xml Classes - href: type-support-in-the-system-xml-classes.md - items: - - name: Mapping XML Data Types to CLR Types - href: mapping-xml-data-types-to-clr-types.md - - name: XML Type Support Implementation Notes - href: xml-type-support-implementation-notes.md - - name: Conversion of XML Data Types - href: conversion-of-xml-data-types.md - items: - - name: Converting Strings to .NET Framework Data Types - href: converting-strings-to-dotnet-data-types.md - - name: Converting .NET Framework Types to Strings - href: converting-dotnet-types-to-strings.md diff --git a/docs/standard/data/xml/user-defined-functions-and-variables.md b/docs/standard/data/xml/user-defined-functions-and-variables.md index 85d5fdf6631dd..84f27f82ee459 100644 --- a/docs/standard/data/xml/user-defined-functions-and-variables.md +++ b/docs/standard/data/xml/user-defined-functions-and-variables.md @@ -22,7 +22,7 @@ The <xref:System.Xml.XPath.XPathNavigator> class provides a set of methods that [!code-csharp[XPathExtensionFunctions#2](../../../../samples/snippets/csharp/VS_Snippets_Data/xpathextensionfunctions/cs/xpathextensionfunctions.cs#2)] [!code-vb[XPathExtensionFunctions#2](../../../../samples/snippets/visualbasic/VS_Snippets_Data/xpathextensionfunctions/vb/xpathextensionfunctions.vb#2)] - The following code implements <xref:System.Xml.Xsl.IXsltContextFunction>. The class that implements <xref:System.Xml.Xsl.IXsltContextFunction> resolves and executes user-defined functions. This example uses the function identified by the declaration: `private int CountChar(string title, char charTocount)`. + The following code implements <xref:System.Xml.Xsl.IXsltContextFunction>. The class that implements <xref:System.Xml.Xsl.IXsltContextFunction> resolves and executes user-defined functions. This example uses the function identified by the declaration: `private int CountChar(string title, char charToCount)`. Code comments describe class members. diff --git a/docs/standard/datetime/snippets/system-text-json-support/csharp/datetime-converter-examples/example2/Program.cs b/docs/standard/datetime/snippets/system-text-json-support/csharp/datetime-converter-examples/example2/Program.cs index d031f38363097..ed2bffd695ea0 100644 --- a/docs/standard/datetime/snippets/system-text-json-support/csharp/datetime-converter-examples/example2/Program.cs +++ b/docs/standard/datetime/snippets/system-text-json-support/csharp/datetime-converter-examples/example2/Program.cs @@ -7,7 +7,7 @@ namespace DateTimeConverterExamples; // This converter reads and writes DateTime values according to the "R" standard format specifier: -// https://docs.microsoft.com/dotnet/standard/base-types/standard-date-and-time-format-strings#the-rfc1123-r-r-format-specifier. +// https://learn.microsoft.com/dotnet/standard/base-types/standard-date-and-time-format-strings#the-rfc1123-r-r-format-specifier. public class DateTimeConverterForCustomStandardFormatR : JsonConverter<DateTime> { public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) diff --git a/docs/standard/datetime/time-zone-overview.md b/docs/standard/datetime/time-zone-overview.md index 1c42192d0de90..b8f7205685d4c 100644 --- a/docs/standard/datetime/time-zone-overview.md +++ b/docs/standard/datetime/time-zone-overview.md @@ -28,7 +28,7 @@ Many of the world's time zones support daylight saving time. Daylight saving tim The transition to and from daylight saving time in a particular time zone can be defined either by a fixed or a floating adjustment rule. A fixed adjustment rule sets a particular date on which the transition to or from daylight saving time occurs each year. For example, a transition from daylight saving time to standard time that occurs each year on October 25 follows a fixed adjustment rule. Much more common are floating adjustment rules, which set a particular day of a particular week of a particular month for the transition to or from daylight saving time. For example, a transition from standard time to daylight saving time that occurs on the third Sunday of March follows a floating adjustment rule. -For time zones that support adjustment rules, the transition to and from daylight saving time creates two kinds of anomalous times: invalid times and ambiguous times. An invalid time is a nonexistent time created by the transition from standard time to daylight saving time. For example, if this transition occurs on a particular day at 2:00 A.M. and causes the time to change to 3:00 A.M., each time interval between 2:00 A.M. and 2:59:99 A.M. is invalid. An ambiguous time is a time that can be mapped to two different times in a single time zone. It is created by the transition from daylight saving time to standard time. For example, if this transition occurs on a particular day at 2:00 A.M. and causes the time to change to 1:00 A.M., each time interval between 1:00 A.M. and 1:59:99 A.M. can be interpreted as either a standard time or a daylight saving time. +For time zones that support adjustment rules, the transition to and from daylight saving time creates two kinds of anomalous times: invalid times and ambiguous times. An invalid time is a nonexistent time created by the transition from standard time to daylight saving time. For example, if this transition occurs on a particular day at 2:00 A.M. and causes the time to change to 3:00 A.M., each time interval between 2:00 A.M. and 2:59:59 A.M. is invalid. An ambiguous time is a time that can be mapped to two different times in a single time zone. It is created by the transition from daylight saving time to standard time. For example, if this transition occurs on a particular day at 2:00 A.M. and causes the time to change to 1:00 A.M., each time interval between 1:00 A.M. and 1:59:59 A.M. can be interpreted as either a standard time or a daylight saving time. ## Time zone terminology @@ -37,10 +37,10 @@ The following table defines terms commonly used when working with time zones and | Term | Definition | | --------------- | ---------- | | Adjustment rule | A rule that defines when the transition from standard time to daylight saving time and back from daylight saving time to standard time occurs. Each adjustment rule has a start and end date that defines when the rule is in place (for example, the adjustment rule is in place from January 1, 1986, to December 31, 2006), a delta (the amount of time by which the standard time changes as a result of the application of the adjustment rule), and information about the specific date and time that the transitions are to occur during the adjustment period. Transitions can follow either a fixed rule or a floating rule. | -| Ambiguous time | A time that can be mapped to two different times in a single time zone. It occurs when the clock time is adjusted back in time, such as during the transition from a time zone's daylight saving time to its standard time. For example, if this transition occurs on a particular day at 2:00 A.M. and causes the time to change to 1:00 A.M., each time interval between 1:00 A.M. and 1:59:99 A.M. can be interpreted as either a standard time or a daylight saving time. | +| Ambiguous time | A time that can be mapped to two different times in a single time zone. It occurs when the clock time is adjusted back in time, such as during the transition from a time zone's daylight saving time to its standard time. For example, if this transition occurs on a particular day at 2:00 A.M. and causes the time to change to 1:00 A.M., each time interval between 1:00 A.M. and 1:59:59 A.M. can be interpreted as either a standard time or a daylight saving time. | | Fixed rule | An adjustment rule that sets a particular date for the transition to or from daylight saving time. For example, a transition from daylight saving time to standard time that occurs each year on October 25 follows a fixed adjustment rule. | | Floating rule | An adjustment rule that sets a particular day of a particular week of a particular month for the transition to or from daylight saving time. For example, a transition from standard time to daylight saving time that occurs on the third Sunday of March follows a floating adjustment rule. | -| Invalid time | A nonexistent time that is an artifact of the transition from standard time to daylight saving time. It occurs when the clock time is adjusted forward in time, such as during the transition from a time zone's standard time to its daylight saving time. For example, if this transition occurs on a particular day at 2:00 A.M. and causes the time to change to 3:00 A.M., each time interval between 2:00 A.M. and 2:59:99 A.M. is invalid. | +| Invalid time | A nonexistent time that is an artifact of the transition from standard time to daylight saving time. It occurs when the clock time is adjusted forward in time, such as during the transition from a time zone's standard time to its daylight saving time. For example, if this transition occurs on a particular day at 2:00 A.M. and causes the time to change to 3:00 A.M., each time interval between 2:00 A.M. and 2:59:59 A.M. is invalid. | | Transition time | Information about a specific time change, such as the change from daylight saving time to standard time or vice versa, in a particular time zone. | ## Time zones and the TimeZoneInfo class diff --git a/docs/standard/datetime/toc.yml b/docs/standard/datetime/toc.yml deleted file mode 100644 index e26f6ca47eab2..0000000000000 --- a/docs/standard/datetime/toc.yml +++ /dev/null @@ -1,54 +0,0 @@ -items: - - name: Dates, times, and time zones - href: index.md - - name: Choosing which date and time type to use - href: choosing-between-datetime.md - - name: Working with calendars - href: working-with-calendars.md - - name: Use the DateOnly and TimeOnly types - href: how-to-use-dateonly-timeonly.md - - name: Performing arithmetic operations with dates and times - href: performing-arithmetic-operations.md - - name: "DateTime and DateTimeOffset support in System.Text.Json" - href: system-text-json-support.md - - name: Time zones - expanded: true - items: - - name: Overview - href: time-zone-overview.md - - name: "How to: Use time zones in date and time arithmetic" - href: use-time-zones-in-arithmetic.md - - name: Converting between DateTime and DateTimeOffset - href: converting-between-datetime-and-offset.md - - name: Converting times Between time zones - href: converting-between-time-zones.md - - name: "How to: Resolve ambiguous times" - href: resolve-ambiguous-times.md - - name: "How to: Let users resolve ambiguous times" - href: let-users-resolve-ambiguous-times.md - - name: Instantiating a DateTimeOffset object - items: - - name: Overview - href: instantiating-a-datetimeoffset-object.md - - name: "How to: Create time zones without adjustment rules" - href: create-time-zones-without-adjustment-rules.md - - name: "How to: Create time zones with adjustment rules" - href: create-time-zones-with-adjustment-rules.md - - name: Time zones defined by the operating system - items: - - name: Overview - href: finding-the-time-zones-on-local-system.md - - name: "How to: Enumerate time zones present on a computer" - href: enumerate-time-zones.md - - name: "How to: Access the predefined UTC and local time zone objects" - href: access-utc-and-local.md - - name: "How to: Instantiate a TimeZoneInfo object" - href: instantiate-time-zone-info.md - - name: Saving and restoring time zones - items: - - name: Overview - href: saving-and-restoring-time-zones.md - - name: "How to: Save time zones to an embedded resource" - href: save-time-zones-to-an-embedded-resource.md - - name: "How to: Restore time zones from an embedded resource" - href: restore-time-zones-from-an-embedded-resource.md diff --git a/docs/standard/exceptions/best-practices-for-exceptions.md b/docs/standard/exceptions/best-practices-for-exceptions.md index c04731c596270..6420b6d9d3cda 100644 --- a/docs/standard/exceptions/best-practices-for-exceptions.md +++ b/docs/standard/exceptions/best-practices-for-exceptions.md @@ -1,7 +1,7 @@ --- title: "Best Practices for exceptions - .NET" description: Learn best practices for exceptions, such as using try/catch/finally, handling common conditions without exceptions, and using predefined .NET exception types. -ms.date: "07/26/2022" +ms.date: 02/15/2023 ms.custom: devdivchpfy22 dev_langs: - "csharp" @@ -9,12 +9,11 @@ dev_langs: - "cpp" helpviewer_keywords: - "exceptions, best practices" -ms.assetid: f06da765-235b-427a-bfb6-47cd219af539 --- # Best practices for exceptions -A well-designed app handles exceptions and errors to prevent app crashes. This section describes best practices for handling and creating exceptions. +A well-designed app handles exceptions and errors to prevent app crashes. This article describes best practices for handling and creating exceptions. ## Use try/catch/finally blocks to recover from errors or release resources @@ -62,9 +61,8 @@ Exceptions ensure that failures don't go unnoticed because the calling code didn Introduce a new exception class only when a predefined one doesn't apply. For example: -- Throw an <xref:System.InvalidOperationException> exception if a property set or method call isn't appropriate given the object's current state. - -- Throw an <xref:System.ArgumentException> exception or one of the predefined classes that derive from <xref:System.ArgumentException> if invalid parameters are passed. +- If a property set or method call isn't appropriate given the object's current state, throw an <xref:System.InvalidOperationException> exception. +- If invalid parameters are passed, throw an <xref:System.ArgumentException> exception or one of the predefined classes that derive from <xref:System.ArgumentException>. ## End exception class names with the word `Exception` @@ -79,9 +77,7 @@ When a custom exception is necessary, name it appropriately and derive it from t Use at least the three common constructors when creating your own exception classes: the parameterless constructor, a constructor that takes a string message, and a constructor that takes a string message and an inner exception. - <xref:System.Exception.%23ctor>, which uses default values. - - <xref:System.Exception.%23ctor%28System.String%29>, which accepts a string message. - - <xref:System.Exception.%23ctor%28System.String%2CSystem.Exception%29>, which accepts a string message and an inner exception. For an example, see [How to: Create User-Defined Exceptions](how-to-create-user-defined-exceptions.md). @@ -90,10 +86,9 @@ For an example, see [How to: Create User-Defined Exceptions](how-to-create-user- When you create user-defined exceptions, ensure that the metadata for the exceptions is available to code that's executing remotely. -For example, on .NET implementations that support App Domains, exceptions might occur across App domains. Suppose App Domain A creates App Domain B, which executes code that throws an exception. For App Domain A to properly catch and handle the exception, it must be able to find the assembly that contains the exception thrown by App Domain B. If App Domain B throws an exception that is contained in an assembly under its application base, but not under App Domain A's application base, App Domain A won't be able to find the exception, and the common language runtime will throw a <xref:System.IO.FileNotFoundException> exception. To avoid this situation, you can deploy the assembly that contains the exception information in either of two ways: +For example, on .NET implementations that support app domains, exceptions might occur across app domains. Suppose app domain A creates app domain B, which executes code that throws an exception. For app domain A to properly catch and handle the exception, it must be able to find the assembly that contains the exception thrown by app domain B. If app domain B throws an exception that is contained in an assembly under its application base, but not under app domain A's application base, app domain A won't be able to find the exception, and the common language runtime will throw a <xref:System.IO.FileNotFoundException> exception. To avoid this situation, you can deploy the assembly that contains the exception information in either of two ways: - Put the assembly into a common application base shared by both app domains. - - If the domains don't share a common application base, sign the assembly that contains the exception information with a strong name and deploy the assembly into the global assembly cache. ## Use grammatically correct error messages @@ -106,8 +101,8 @@ The error message the user sees is derived from the <xref:System.Exception.Messa For localized applications, you should provide a localized message string for every exception that your application can throw. You use resource files to provide localized error messages. For information on localizing applications and retrieving localized strings, see the following articles: -- [How to: create user-defined exceptions with localized exception messages](how-to-create-localized-exception-messages.md) -- [Resources in .NET Apps](../../core/extensions/resources.md) +- [How to: Create user-defined exceptions with localized exception messages](how-to-create-localized-exception-messages.md) +- [Resources in .NET apps](../../core/extensions/resources.md) - <xref:System.Resources.ResourceManager?displayProperty=nameWithType> ## In custom exceptions, provide additional properties as needed @@ -181,7 +176,7 @@ Private Shared Sub TransferFunds(from As Account, [to] As Account, amount As Dec End Sub ``` -This example illustrates the use of `throw` to re-throw the original exception, making it easier for callers to see the real cause of the problem without having to examine the <xref:System.Exception.InnerException> property. An alternative is to throw a new exception and include the original exception as the inner exception. +This example illustrates the use of `throw` to rethrow the original exception, making it easier for callers to see the real cause of the problem without having to examine the <xref:System.Exception.InnerException> property. An alternative is to throw a new exception and include the original exception as the inner exception. ```csharp catch (Exception ex) @@ -208,6 +203,52 @@ Catch ex As Exception End Try ``` +## Capture exceptions to rethrow later + +To capture an exception and preserve its callstack to be able to rethrow it later, use the <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo?displayProperty=fullName> class. This class provides the following methods and properties (among others): + +- Use <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(System.Exception)?displayProperty=nameWithType> to capture an exception and call stack. +- Use <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw?displayProperty=nameWithType> to restore the state that was saved when the exception was captured and rethrow the captured exception. +- Use the <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo.SourceException?displayProperty=nameWithType> property to inspect the captured exception. + +The following example shows how the <xref:System.Runtime.ExceptionServices.ExceptionDispatchInfo> class can be used, and what the output might look like. + +```csharp +ExceptionDispatchInfo? edi = null; +try +{ + var txt = File.ReadAllText(@"C:\temp\file.txt"); +} +catch (FileNotFoundException e) +{ + edi = ExceptionDispatchInfo.Capture(e); +} + +// ... + +Console.WriteLine("I was here."); + +if (edi is not null) + edi.Throw(); +``` + +If the file in the example code doesn't exist, the following output is produced: + +```output +I was here. +Unhandled exception. System.IO.FileNotFoundException: Could not find file 'C:\temp\file.txt'. +File name: 'C:\temp\file.txt' + at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) + at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) + at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) + at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) + at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) + at System.IO.File.ReadAllText(String path, Encoding encoding) + at Example.ProcessFile.Main() in C:\repos\ConsoleApp1\Program.cs:line 12 +--- End of stack trace from previous location --- + at Example.ProcessFile.Main() in C:\repos\ConsoleApp1\Program.cs:line 24 +``` + ## See also - [Exceptions](index.md) diff --git a/docs/standard/exceptions/how-to-explicitly-throw-exceptions.md b/docs/standard/exceptions/how-to-explicitly-throw-exceptions.md index f8d29cd76cc7d..584da2fb1e610 100644 --- a/docs/standard/exceptions/how-to-explicitly-throw-exceptions.md +++ b/docs/standard/exceptions/how-to-explicitly-throw-exceptions.md @@ -15,7 +15,7 @@ ms.assetid: 72bdd157-caa9-4478-9ee3-cb4500b84528 --- # How to explicitly throw exceptions -You can explicitly throw an exception using the C# [`throw`](../../csharp/language-reference/keywords/throw.md) or the Visual Basic [`Throw`](../../visual-basic/language-reference/statements/throw-statement.md) statement. You can also throw a caught exception again using the `throw` statement. It is good coding practice to add information to an exception that is re-thrown to provide more information when debugging. +You can explicitly throw an exception using the C# [`throw`](../../csharp/language-reference/keywords/throw.md) or the Visual Basic [`Throw`](../../visual-basic/language-reference/statements/throw-statement.md) statement. You can also throw a caught exception again using the `throw` statement. It's good coding practice to add information to an exception that's rethrown to provide more information when debugging. The following code example uses a `try`/`catch` block to catch a possible <xref:System.IO.FileNotFoundException>. Following the `try` block is a `catch` block that catches the <xref:System.IO.FileNotFoundException> and writes a message to the console if the data file is not found. The next statement is the `throw` statement that throws a new <xref:System.IO.FileNotFoundException> and adds text information to the exception. diff --git a/docs/standard/garbage-collection/fundamentals.md b/docs/standard/garbage-collection/fundamentals.md index dd96ac2ccd2c5..e272f2cf1ad0c 100644 --- a/docs/standard/garbage-collection/fundamentals.md +++ b/docs/standard/garbage-collection/fundamentals.md @@ -58,7 +58,7 @@ The following list summarizes important CLR memory concepts: ### Memory allocation -When you initialize a new process, the runtime reserves a contiguous region of address space for the process. This reserved address space is called the managed heap. The managed heap maintains a pointer to the address where the next object in the heap will be allocated. Initially, this pointer is set to the managed heap's base address. All reference types are allocated on the managed heap. When an application creates the first reference type, memory is allocated for the type at the base address of the managed heap. When the application creates the next object, the garbage collector allocates memory for it in the address space immediately following the first object. As long as address space is available, the garbage collector continues to allocate space for new objects in this manner. +When you initialize a new process, the runtime reserves a contiguous region of address space for the process. This reserved address space is called the managed heap. The managed heap maintains a pointer to the address where the next object in the heap will be allocated. Initially, this pointer is set to the managed heap's base address. All reference types are allocated on the managed heap. When an application creates the first reference type, memory is allocated for the type at the base address of the managed heap. When the application creates the next object, the runtime allocates memory for it in the address space immediately following the first object. As long as address space is available, the runtime continues to allocate space for new objects in this manner. Allocating memory from the managed heap is faster than unmanaged memory allocation. Because the runtime allocates memory for an object by adding a value to a pointer, it's almost as fast as allocating memory from the stack. In addition, because new objects that are allocated consecutively are stored contiguously in the managed heap, an application can access the objects quickly. diff --git a/docs/standard/garbage-collection/implementing-dispose.md b/docs/standard/garbage-collection/implementing-dispose.md index 572efa79d0cbc..7ec568c2f3107 100644 --- a/docs/standard/garbage-collection/implementing-dispose.md +++ b/docs/standard/garbage-collection/implementing-dispose.md @@ -1,7 +1,7 @@ --- title: "Implement a Dispose method" description: In this article, learn to implement the Dispose method, which releases unmanaged resources used by your code in .NET. -ms.date: 09/29/2021 +ms.date: 02/16/2023 dev_langs: - "csharp" - "vb" @@ -13,13 +13,13 @@ ms.topic: how-to # Implement a Dispose method -Implementing the <xref:System.IDisposable.Dispose%2A> method is primarily for releasing unmanaged resources. When working with instance members that are <xref:System.IDisposable> implementations, it's common to cascade <xref:System.IDisposable.Dispose%2A> calls. There are additional reasons for implementing <xref:System.IDisposable.Dispose%2A>, for example, to free memory that was allocated, remove an item that was added to a collection, or signal the release of a lock that was acquired. +The <xref:System.IDisposable.Dispose%2A> method is primarily implemented to release unmanaged resources. When working with instance members that are <xref:System.IDisposable> implementations, it's common to cascade <xref:System.IDisposable.Dispose%2A> calls. There are additional reasons for implementing <xref:System.IDisposable.Dispose%2A>, for example, to free memory that was allocated, remove an item that was added to a collection, or signal the release of a lock that was acquired. -The [.NET garbage collector](index.md) does not allocate or release unmanaged memory. The pattern for disposing an object, referred to as the dispose pattern, imposes order on the lifetime of an object. The dispose pattern is used for objects that implement the <xref:System.IDisposable> interface, and is common when interacting with file and pipe handles, registry handles, wait handles, or pointers to blocks of unmanaged memory. This is because the garbage collector is unable to reclaim unmanaged objects. +The [.NET garbage collector](index.md) does not allocate or release unmanaged memory. The pattern for disposing an object, referred to as the dispose pattern, imposes order on the lifetime of an object. The dispose pattern is used for objects that implement the <xref:System.IDisposable> interface. This pattern is common when interacting with file and pipe handles, registry handles, wait handles, or pointers to blocks of unmanaged memory, because the garbage collector is unable to reclaim unmanaged objects. To help ensure that resources are always cleaned up appropriately, a <xref:System.IDisposable.Dispose%2A> method should be idempotent, such that it is callable multiple times without throwing an exception. Furthermore, subsequent invocations of <xref:System.IDisposable.Dispose%2A> should do nothing. -The code example provided for the <xref:System.GC.KeepAlive%2A?displayProperty=nameWithType> method shows how garbage collection can cause a finalizer to run, while an unmanaged reference to the object or its members is still in use. It may make sense to utilize <xref:System.GC.KeepAlive%2A?displayProperty=nameWithType> to make the object ineligible for garbage collection from the start of the current routine to the point where this method is called. +The code example provided for the <xref:System.GC.KeepAlive%2A?displayProperty=nameWithType> method shows how garbage collection can cause a finalizer to run while an unmanaged reference to the object or its members is still in use. It may make sense to utilize <xref:System.GC.KeepAlive%2A?displayProperty=nameWithType> to make the object ineligible for garbage collection from the start of the current routine to the point where this method is called. [!INCLUDE [disposables-and-dependency-injection](includes/disposables-and-dependency-injection.md)] @@ -27,17 +27,19 @@ The code example provided for the <xref:System.GC.KeepAlive%2A?displayProperty=n Writing code for an object's finalizer is a complex task that can cause problems if not done correctly. Therefore, we recommend that you construct <xref:System.Runtime.InteropServices.SafeHandle?displayProperty=nameWithType> objects instead of implementing a finalizer. -A <xref:System.Runtime.InteropServices.SafeHandle?displayProperty=nameWithType> is an abstract managed type that wraps an <xref:System.IntPtr?displayProperty=nameWithType> that identifies an unmanaged resource. On Windows it might identify a handle while on Unix, a file descriptor. It provides all of the logic necessary to ensure that this resource is released once and only once, when the `SafeHandle` is disposed of or when all references to the `SafeHandle` have been dropped and the `SafeHandle` instance is finalized. +A <xref:System.Runtime.InteropServices.SafeHandle?displayProperty=nameWithType> is an abstract managed type that wraps an <xref:System.IntPtr?displayProperty=nameWithType> that identifies an unmanaged resource. On Windows it might identify a handle, and on Unix, a file descriptor. The `SafeHandle` provides all of the logic necessary to ensure that this resource is released once and only once, either when the `SafeHandle` is disposed of or when all references to the `SafeHandle` have been dropped and the `SafeHandle` instance is finalized. -The <xref:System.Runtime.InteropServices.SafeHandle?displayProperty=nameWithType> is an abstract base class. Derived classes provide specific instances for different kinds of handle. These derived classes validate what values for the <xref:System.IntPtr?displayProperty=nameWithType> are considered invalid and how to actually free the handle. For example, <xref:Microsoft.Win32.SafeHandles.SafeFileHandle> derives from `SafeHandle` to wrap `IntPtrs` that identify open file handles/descriptors, and overrides its <xref:System.Runtime.InteropServices.SafeHandle.ReleaseHandle?displayProperty=nameWithType> method to close it (via the `close` function on Unix or `CloseHandle` function on Windows). Most APIs in .NET libraries that create an unmanaged resource will wrap it in a `SafeHandle` and return that `SafeHandle` to you as needed, rather than handing back the raw pointer. In situations where you interact with an unmanaged component and get an `IntPtr` for an unmanaged resource, you can create your own `SafeHandle` type to wrap it. As a result, few non-`SafeHandle` types need to implement finalizers; most disposable pattern implementations only end up wrapping other managed resources, some of which may be `SafeHandle`s. +The <xref:System.Runtime.InteropServices.SafeHandle?displayProperty=nameWithType> is an abstract base class. Derived classes provide specific instances for different kinds of handle. These derived classes validate what values for the <xref:System.IntPtr?displayProperty=nameWithType> are considered invalid and how to actually free the handle. For example, <xref:Microsoft.Win32.SafeHandles.SafeFileHandle> derives from `SafeHandle` to wrap `IntPtrs` that identify open file handles/descriptors, and overrides its <xref:System.Runtime.InteropServices.SafeHandle.ReleaseHandle?displayProperty=nameWithType> method to close it (via the `close` function on Unix or `CloseHandle` function on Windows). Most APIs in .NET libraries that create an unmanaged resource will wrap it in a `SafeHandle` and return that `SafeHandle` to you as needed, rather than handing back the raw pointer. In situations where you interact with an unmanaged component and get an `IntPtr` for an unmanaged resource, you can create your own `SafeHandle` type to wrap it. As a result, few non-`SafeHandle` types need to implement finalizers. Most disposable pattern implementations only end up wrapping other managed resources, some of which may be `SafeHandle` objects. -The following derived classes in the <xref:Microsoft.Win32.SafeHandles> namespace provide safe handles: +The following derived classes in the <xref:Microsoft.Win32.SafeHandles> namespace provide safe handles. -- The <xref:Microsoft.Win32.SafeHandles.SafeFileHandle>, <xref:Microsoft.Win32.SafeHandles.SafeMemoryMappedFileHandle>, and <xref:Microsoft.Win32.SafeHandles.SafePipeHandle> class, for files, memory mapped files, and pipes. -- The <xref:Microsoft.Win32.SafeHandles.SafeMemoryMappedViewHandle> class, for memory views. -- The <xref:Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>, <xref:Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle>, and <xref:Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle> classes, for cryptography constructs. -- The <xref:Microsoft.Win32.SafeHandles.SafeRegistryHandle> class, for registry keys. -- The <xref:Microsoft.Win32.SafeHandles.SafeWaitHandle> class, for wait handles. +| Class | Resources it holds | +| - | - | +| <xref:Microsoft.Win32.SafeHandles.SafeFileHandle><br/><xref:Microsoft.Win32.SafeHandles.SafeMemoryMappedFileHandle><br/><xref:Microsoft.Win32.SafeHandles.SafePipeHandle> | Files, memory mapped files, and pipes | +| <xref:Microsoft.Win32.SafeHandles.SafeMemoryMappedViewHandle> | Memory views | +| <xref:Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle><br/><xref:Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle><br/><xref:Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle> |Cryptography constructs | +| <xref:Microsoft.Win32.SafeHandles.SafeRegistryHandle> | Registry keys | +| <xref:Microsoft.Win32.SafeHandles.SafeWaitHandle> | Wait handles | ## Dispose() and Dispose(bool) @@ -81,13 +83,15 @@ If the method call comes from a finalizer, only the code that frees unmanaged re ## Cascade dispose calls -If your class owns a field or property, and its type implements <xref:System.IDisposable>, the containing class itself should also implement <xref:System.IDisposable>. A class that instantiates an <xref:System.IDisposable> implementation and storing it as an instance member, is also responsible for its cleanup. This is to help ensure that the referenced disposable types are given the opportunity to deterministically perform cleanup through the <xref:System.IDisposable.Dispose%2A> method. In this example, the class is `sealed` (or `NotInheritable` in Visual Basic). +If your class owns a field or property and its type implements <xref:System.IDisposable>, the containing class itself should also implement <xref:System.IDisposable>. A class that instantiates an <xref:System.IDisposable> implementation and stores it as an instance member is also responsible for its cleanup. This helps ensure that the referenced disposable types are given the opportunity to deterministically perform cleanup through the <xref:System.IDisposable.Dispose%2A> method. In the following example, the class is `sealed` (or `NotInheritable` in Visual Basic). :::code language="csharp" source="../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.disposable/cs/Foo.cs"::: :::code language="vb" source="../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.disposable/vb/Foo.vb"::: > [!TIP] -> There are cases when you may want to perform `null`-checking in a finalizer (which includes the `Dispose(false)` method invoked by a finalizer), one of the primary reasons is if you're unsure whether the instance got fully initialized (for example, an exception may be thrown in a constructor). +> +> - If your class has an <xref:System.IDisposable> field or property but doesn't *own* it, meaning the class doesn't create the object, then the class doesn't need to implement <xref:System.IDisposable>. +> - There are cases when you may want to perform `null`-checking in a finalizer (which includes the `Dispose(false)` method invoked by a finalizer). One of the primary reasons is if you're unsure whether the instance got fully initialized (for example, an exception might be thrown in a constructor). ## Implement the dispose pattern @@ -95,10 +99,10 @@ All non-sealed classes (or Visual Basic classes not modified as `NotInheritable` - A <xref:System.IDisposable.Dispose%2A> implementation that calls the `Dispose(bool)` method. - A `Dispose(bool)` method that performs the actual cleanup. -- Either a class derived from <xref:System.Runtime.InteropServices.SafeHandle> that wraps your unmanaged resource (recommended), or an override to the <xref:System.Object.Finalize%2A?displayProperty=nameWithType> method. The <xref:System.Runtime.InteropServices.SafeHandle> class provides a finalizer, so you do not have to write one yourself. +- Either a class derived from <xref:System.Runtime.InteropServices.SafeHandle> that wraps your unmanaged resource (recommended), or an override to the <xref:System.Object.Finalize%2A?displayProperty=nameWithType> method. The <xref:System.Runtime.InteropServices.SafeHandle> class provides a finalizer, so you don't have to write one yourself. > [!IMPORTANT] -> It is possible for a base class to only reference managed objects, and implement the dispose pattern. In these cases, a finalizer is unnecessary. A finalizer is only required if you directly reference unmanaged resources. +> It's possible for a base class to only reference managed objects and implement the dispose pattern. In these cases, a finalizer is unnecessary. A finalizer is only required if you directly reference unmanaged resources. Here's an example of the general pattern for implementing the dispose pattern for a base class that uses a safe handle. diff --git a/docs/standard/garbage-collection/implementing-disposeasync.md b/docs/standard/garbage-collection/implementing-disposeasync.md index ddc10f28a5c6e..f704a7a3ec040 100644 --- a/docs/standard/garbage-collection/implementing-disposeasync.md +++ b/docs/standard/garbage-collection/implementing-disposeasync.md @@ -108,7 +108,7 @@ With the `DisposeAsyncCore()` method, the same logical approach is followed. If ## Using async disposable -To properly consume an object that implements the <xref:System.IAsyncDisposable> interface, you use the [await](../../csharp/language-reference/operators/await.md) and [using](../../csharp/language-reference/keywords/using-statement.md) keywords together. Consider the following example, where the `ExampleAsyncDisposable` class is instantiated and then wrapped in an `await using` statement. +To properly consume an object that implements the <xref:System.IAsyncDisposable> interface, you use the [await](../../csharp/language-reference/operators/await.md) and [using](../../csharp/language-reference/statements/using.md) keywords together. Consider the following example, where the `ExampleAsyncDisposable` class is instantiated and then wrapped in an `await using` statement. :::code language="csharp" source="snippets/dispose-async/ExampleConfigureAwaitProgram.cs"::: @@ -119,7 +119,7 @@ For situations where the usage of `ConfigureAwait` is not needed, the `await usi :::code language="csharp" source="snippets/dispose-async/ExampleUsingStatementProgram.cs"::: -Furthermore, it could be written to use the implicit scoping of a [using declaration](../../csharp/language-reference/keywords/using-statement.md). +Furthermore, it could be written to use the implicit scoping of a [using declaration](../../csharp/language-reference/statements/using.md). :::code language="csharp" source="snippets/dispose-async/ExampleUsingDeclarationProgram.cs"::: diff --git a/docs/standard/garbage-collection/large-object-heap.md b/docs/standard/garbage-collection/large-object-heap.md index d7c1398c9c9c0..a9095d64244ac 100644 --- a/docs/standard/garbage-collection/large-object-heap.md +++ b/docs/standard/garbage-collection/large-object-heap.md @@ -200,7 +200,7 @@ As you can see, this is a very simple test that just allocates large objects fro If all you have is a memory dump and you need to look at what objects are actually on the LOH, you can use the [SoS debugger extension](../../framework/tools/sos-dll-sos-debugging-extension.md) provided by .NET. > [!NOTE] -> The debugging commands mentioned in this section are applicable to the [Windows Debuggers](https://www.microsoft.com/whdc/devtools/debugging/default.mspx). +> The debugging commands mentioned in this section are applicable to the [Windows debuggers](/windows-hardware/drivers/debugger/). The following shows sample output from analyzing the LOH: diff --git a/docs/standard/garbage-collection/using-objects.md b/docs/standard/garbage-collection/using-objects.md index 524e81fdd9520..f687222e4a0a1 100644 --- a/docs/standard/garbage-collection/using-objects.md +++ b/docs/standard/garbage-collection/using-objects.md @@ -29,14 +29,14 @@ Objects that implement <xref:System.IDisposable?displayProperty=fullName> or <xr ## The using statement -The [`using` statement](../../csharp/language-reference/keywords/using-statement.md) in C# and the [`Using` statement](../../visual-basic/language-reference/statements/using-statement.md) in Visual Basic simplify the code that you must write to cleanup an object. The `using` statement obtains one or more resources, executes the statements that you specify, and automatically disposes of the object. However, the `using` statement is useful only for objects that are used within the scope of the method in which they are constructed. +The [`using` statement](../../csharp/language-reference/statements/using.md) in C# and the [`Using` statement](../../visual-basic/language-reference/statements/using-statement.md) in Visual Basic simplify the code that you must write to cleanup an object. The `using` statement obtains one or more resources, executes the statements that you specify, and automatically disposes of the object. However, the `using` statement is useful only for objects that are used within the scope of the method in which they are constructed. The following example uses the `using` statement to create and release a <xref:System.IO.StreamReader?displayProperty=nameWithType> object. :::code language="csharp" source="../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.disposable/cs/UsingStatement.cs"::: :::code language="vb" source="../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.disposable/vb/UsingStatement.vb"::: -A [`using` declaration](../../csharp/language-reference/keywords/using-statement.md) is an alternative syntax available where the braces are removed, and scoping is implicit. +A [`using` declaration](../../csharp/language-reference/statements/using.md) is an alternative syntax available where the braces are removed, and scoping is implicit. :::code language="csharp" source="../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.disposable/cs/UsingDeclaration.cs"::: @@ -65,10 +65,10 @@ You can follow this basic pattern if you choose to implement or must implement a ## IDisposable instance members -If a class holds an <xref:System.IDisposable> implementation as an instance member, either a field or a property, the class should also implement <xref:System.IDisposable>. For more information, see [implement a cascade dispose](implementing-dispose.md#cascade-dispose-calls). +If a class owns an instance field or property and its type implements <xref:System.IDisposable>, the class should also implement <xref:System.IDisposable>. For more information, see [Implement a cascade dispose](implementing-dispose.md#cascade-dispose-calls). ## See also - [Cleaning up unmanaged resources](unmanaged.md) -- [using Statement (C# Reference)](../../csharp/language-reference/keywords/using-statement.md) +- [using Statement (C# Reference)](../../csharp/language-reference/statements/using.md) - [Using Statement (Visual Basic)](../../visual-basic/language-reference/statements/using-statement.md) diff --git a/docs/standard/garbage-collection/workstation-server-gc.md b/docs/standard/garbage-collection/workstation-server-gc.md index 4cda1217c82a3..d7a8133546d7a 100644 --- a/docs/standard/garbage-collection/workstation-server-gc.md +++ b/docs/standard/garbage-collection/workstation-server-gc.md @@ -40,7 +40,7 @@ The following are threading and performance considerations for workstation garba The following are threading and performance considerations for server garbage collection: -- The collection occurs on multiple dedicated threads that are running at `THREAD_PRIORITY_HIGHEST` priority level. +- The collection occurs on multiple dedicated threads. On Windows, these threads run at `THREAD_PRIORITY_HIGHEST` priority level. - A heap and a dedicated thread to perform garbage collection are provided for each logical CPU, and the heaps are collected at the same time. Each heap contains a small object heap and a large object heap, and all heaps can be accessed by user code. Objects on different heaps can refer to each other. diff --git a/docs/standard/generics/index.md b/docs/standard/generics/index.md index 79d9a06322716..673ce10126813 100644 --- a/docs/standard/generics/index.md +++ b/docs/standard/generics/index.md @@ -33,7 +33,9 @@ Generics let you tailor a method, class, structure, or interface to the precise ## Define and use generics - Generics are classes, structures, interfaces, and methods that have placeholders (type parameters) for one or more of the types that they store or use. A generic collection class might use a type parameter as a placeholder for the type of objects that it stores. The type parameters appear as the types of its fields and the parameter types of its methods. A generic method might use its type parameter as the type of its return value or as the type of one of its formal parameters. The following code illustrates a simple generic class definition. +Generics are classes, structures, interfaces, and methods that have placeholders (type parameters) for one or more of the types that they store or use. A generic collection class might use a type parameter as a placeholder for the type of objects that it stores. The type parameters appear as the types of its fields and the parameter types of its methods. A generic method might use its type parameter as the type of its return value or as the type of one of its formal parameters. + +The following code illustrates a simple generic class definition. [!code-cpp[Conceptual.Generics.Overview#2](../../../samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/source.cpp#2)] [!code-csharp[Conceptual.Generics.Overview#2](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.generics.overview/cs/source.cs#2)] @@ -47,7 +49,7 @@ Generics let you tailor a method, class, structure, or interface to the precise ### Terminology - The following terms are used to discuss generics in .NET: +The following terms are used to discuss generics in .NET: - A *generic type definition* is a class, structure, or interface declaration that functions as a template, with placeholders for the types that it can contain or use. For example, the <xref:System.Collections.Generic.Dictionary%602?displayProperty=nameWithType> class can contain two types: keys and values. Because a generic type definition is only a template, you cannot create instances of a class, structure, or interface that is a generic type definition. @@ -63,17 +65,17 @@ Generics let you tailor a method, class, structure, or interface to the precise - *Constraints* are limits placed on generic type parameters. For example, you might limit a type parameter to types that implement the <xref:System.Collections.Generic.IComparer%601?displayProperty=nameWithType> generic interface, to ensure that instances of the type can be ordered. You can also constrain type parameters to types that have a particular base class, that have a parameterless constructor, or that are reference types or value types. Users of the generic type cannot substitute type arguments that do not satisfy the constraints. -- A *generic method definition* is a method with two parameter lists: a list of generic type parameters and a list of formal parameters. Type parameters can appear as the return type or as the types of the formal parameters, as the following code shows. - - [!code-cpp[Conceptual.Generics.Overview#4](../../../samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/source.cpp#4)] - [!code-csharp[Conceptual.Generics.Overview#4](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.generics.overview/cs/source.cs#4)] - [!code-vb[Conceptual.Generics.Overview#4](../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.generics.overview/vb/source.vb#4)] - - Generic methods can appear on generic or nongeneric types. It's important to note that a method is not generic just because it belongs to a generic type, or even because it has formal parameters whose types are the generic parameters of the enclosing type. A method is generic only if it has its own list of type parameters. In the following code, only method `G` is generic. - - [!code-cpp[Conceptual.Generics.Overview#5](../../../samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/source.cpp#5)] - [!code-csharp[Conceptual.Generics.Overview#5](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.generics.overview/cs/source.cs#5)] - [!code-vb[Conceptual.Generics.Overview#5](../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.generics.overview/vb/source.vb#5)] +- A *generic method definition* is a method with two parameter lists: a list of generic type parameters and a list of formal parameters. Type parameters can appear as the return type or as the types of the formal parameters, as the following code shows. + + [!code-cpp[Conceptual.Generics.Overview#4](../../../samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/source.cpp#4)] + [!code-csharp[Conceptual.Generics.Overview#4](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.generics.overview/cs/source.cs#4)] + [!code-vb[Conceptual.Generics.Overview#4](../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.generics.overview/vb/source.vb#4)] + + Generic methods can appear on generic or nongeneric types. It's important to note that a method is not generic just because it belongs to a generic type, or even because it has formal parameters whose types are the generic parameters of the enclosing type. A method is generic only if it has its own list of type parameters. In the following code, only method `G` is generic. + + [!code-cpp[Conceptual.Generics.Overview#5](../../../samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/source.cpp#5)] + [!code-csharp[Conceptual.Generics.Overview#5](../../../samples/snippets/csharp/VS_Snippets_CLR/conceptual.generics.overview/cs/source.cs#5)] + [!code-vb[Conceptual.Generics.Overview#5](../../../samples/snippets/visualbasic/VS_Snippets_CLR/conceptual.generics.overview/vb/source.vb#5)] ## Advantages and disadvantages of generics diff --git a/docs/standard/io/asynchronous-file-i-o.md b/docs/standard/io/asynchronous-file-i-o.md index bda366702d15a..4483b244ca0d6 100644 --- a/docs/standard/io/asynchronous-file-i-o.md +++ b/docs/standard/io/asynchronous-file-i-o.md @@ -32,7 +32,7 @@ C# and Visual Basic each have two keywords for asynchronous programming: - `Await` (Visual Basic) or `await` (C#) operator, which is applied to the result of an async method. -To implement asynchronous I/O operations, use these keywords in conjunction with the async methods, as shown in the following examples. For more information, see [Asynchronous programming with async and await (C#)](../../csharp/programming-guide/concepts/async/index.md) or [Asynchronous Programming with Async and Await (Visual Basic)](../../visual-basic/programming-guide/concepts/async/index.md). +To implement asynchronous I/O operations, use these keywords in conjunction with the async methods, as shown in the following examples. For more information, see [Asynchronous programming with async and await (C#)](../../csharp/asynchronous-programming/index.md) or [Asynchronous Programming with Async and Await (Visual Basic)](../../visual-basic/programming-guide/concepts/async/index.md). The following example demonstrates how to use two <xref:System.IO.FileStream> objects to copy files asynchronously from one directory to another. Notice that the <xref:System.Web.UI.WebControls.Button.Click> event handler for the <xref:System.Windows.Controls.Button> control is marked with the `async` modifier because it calls an asynchronous method. @@ -55,5 +55,5 @@ The next example shows the code-behind file and the XAML file that are used to o - <xref:System.IO.Stream> - [File and Stream I/O](index.md) -- [Asynchronous programming with async and await (C#)](../../csharp/programming-guide/concepts/async/index.md) +- [Asynchronous programming with async and await (C#)](../../csharp/asynchronous-programming/index.md) - [Asynchronous Programming with Async and Await (Visual Basic)](../../visual-basic/programming-guide/concepts/async/index.md) diff --git a/docs/standard/io/buffers.md b/docs/standard/io/buffers.md index 1165d5c6706ba..69a8b96595002 100644 --- a/docs/standard/io/buffers.md +++ b/docs/standard/io/buffers.md @@ -184,5 +184,5 @@ The following example parses a 4-byte big-endian integer length from the start o ### SequenceReader\<T\> common problems - Because `SequenceReader<T>` is a mutable struct, it should always be passed by [reference](../../csharp/language-reference/keywords/ref.md). -- `SequenceReader<T>` is a [ref struct](../../csharp/language-reference/builtin-types/ref-struct.md) so it can only be used in synchronous methods and can't be stored in fields. For more information, see [Write safe and efficient C# code](../../csharp/write-safe-efficient-code.md). +- `SequenceReader<T>` is a [ref struct](../../csharp/language-reference/builtin-types/ref-struct.md) so it can only be used in synchronous methods and can't be stored in fields. For more information, see [Avoid allocations](../../csharp/advanced-topics/performance/index.md). - `SequenceReader<T>` is optimized for use as a forward-only reader. `Rewind` is intended for small backups that can't be addressed utilizing other `Read`, `Peek`, and `IsNext` APIs. diff --git a/docs/standard/io/how-to-convert-between-dotnet-streams-and-winrt-streams.md b/docs/standard/io/how-to-convert-between-dotnet-streams-and-winrt-streams.md index 07e4b640bc505..9c9edbfe4e687 100644 --- a/docs/standard/io/how-to-convert-between-dotnet-streams-and-winrt-streams.md +++ b/docs/standard/io/how-to-convert-between-dotnet-streams-and-winrt-streams.md @@ -33,10 +33,35 @@ To convert from a Windows Runtime random-access stream to a .NET Framework strea The following code example prompts you to select a file, opens it with Windows Runtime APIs, and then converts it to a .NET Framework stream. It reads the stream and outputs it to a text block. You would typically manipulate the stream with .NET Framework APIs before outputting the results. -To run this example, create a UWP XAML app that contains a text block named `TextBlock1` and a button named `Button1`. Associate the button click event with the `button1_Click` method shown in the example. - - [!code-csharp[System.IO.WindowsRuntimeStreamExtensionsEx#Imports](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage1.xaml.cs)] - [!code-vb[System.IO.WindowsRuntimeStreamExtensionsEx#Imports](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/vb/mainpage1.xaml.vb)] +```csharp +// Create a file picker. +FileOpenPicker picker = new FileOpenPicker(); +picker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; +picker.ViewMode = PickerViewMode.List; +picker.FileTypeFilter.Add(".txt"); + +// Show picker, enabling user to pick one file. +StorageFile result = await picker.PickSingleFileAsync(); +if (result != null) +{ + try + { + // Retrieve the stream. This method returns a IRandomAccessStreamWithContentType. + var stream = await result.OpenReadAsync(); + + // Convert the stream to a .NET stream using AsStream, pass to a + // StreamReader and read the stream. + using (StreamReader sr = new StreamReader(stream.AsStream())) + { + TextBlock1.Text = sr.ReadToEnd(); + } + } + catch (Exception ex) + { + // ... + } +} +``` ## Convert from a .NET Framework to a Windows Runtime stream @@ -59,10 +84,23 @@ To convert from a .NET Framework stream to a Windows Runtime random-access strea > [!IMPORTANT] > Make sure that the .NET Framework stream you are using supports seeking, or copy it to a stream that does. You can use the <xref:System.IO.Stream.CanSeek%2A?displayProperty=nameWithType> property to determine this. -To run this example, create a UWP XAML app that targets the .NET Framework 4.5.1 and contains a text block named `TextBlock2` and a button named `Button2`. Associate the button click event with the `button2_Click` method shown in the example. - - [!code-csharp[System.IO.WindowsRuntimeStreamExtensionsEx#Imports](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage2.xaml.cs)] - [!code-vb[System.IO.WindowsRuntimeStreamExtensionsEx#Imports](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/vb/mainpage2.xaml.vb)] +```csharp +// Create an HttpClient and access an image as a stream. +var client = new HttpClient(); +Stream stream = await client.GetStreamAsync("https://learn.microsoft.com/en-us/dotnet/images/hub/featured-1.png"); +// Create a .NET memory stream. +var memStream = new MemoryStream(); +// Convert the stream to the memory stream, because a memory stream supports seeking. +await stream.CopyToAsync(memStream); +// Set the start position. +memStream.Position = 0; +// Create a new bitmap image. +var bitmap = new BitmapImage(); +// Set the bitmap source to the stream, which is converted to a IRandomAccessStream. +bitmap.SetSource(memStream.AsRandomAccessStream()); +// Set the image control source to the bitmap. +Image1.Source = bitmap; +``` ## See also diff --git a/docs/standard/library-guidance/breaking-changes.md b/docs/standard/library-guidance/breaking-changes.md index 93c3a2fdaa9ea..022be240464f7 100644 --- a/docs/standard/library-guidance/breaking-changes.md +++ b/docs/standard/library-guidance/breaking-changes.md @@ -44,7 +44,7 @@ Because a source breaking change is only harmful when developers recompile their ### Behavior breaking change -Behavior changes are the most common type of breaking change: almost any change in behavior could break someone. Changes to your library, such as method signatures, exceptions thrown or input or output data formats, could all negatively impact your library consumers. Even a bug fix can qualify as a breaking change if users relied on the previously broken behavior. +Behavior changes are the most common type of breaking change: almost any change in behavior could cause a logic error for a consumer. Changes to your library, such as method signatures, exceptions thrown or input or output data formats, could all negatively impact your library consumers. Even a bug fix can qualify as a breaking change if users relied on the previously broken behavior. Adding features and improving bad behaviors is a good thing, but without care it can make it very hard for existing users to upgrade. One approach to helping developers deal with behavior breaking changes is to hide them behind settings. Settings let developers update to the latest version of your library while at the same time choosing to opt in or opt out of breaking changes. This strategy lets developers stay up to date while letting their consuming code adapt over time. diff --git a/docs/standard/linq/linq-xml-vs-xml-technologies.md b/docs/standard/linq/linq-xml-vs-xml-technologies.md index 884238958e2e6..d8bb25dd2c8dc 100644 --- a/docs/standard/linq/linq-xml-vs-xml-technologies.md +++ b/docs/standard/linq/linq-xml-vs-xml-technologies.md @@ -41,7 +41,7 @@ XSLT is XML, and that's why it can be programmatically manipulated. MSXML is the COM-based technology for processing XML that's included with Microsoft Windows. MSXML provides a native implementation of the DOM with support for XPath and XSLT. It also contains the SAX2 non-caching, event-based parser. -MSXML performs well, is secure by default in most scenarios, and can be accessed in Internet Explorer for doing client-side XML processing in AJAX-style applications. MSXML can be used from any programming language that supports COM, including C++, JavaScript, and Visual Basic 6.0. +MSXML performs well, is secure by default in most scenarios, and can be accessed in a browser for doing client-side XML processing in AJAX-style applications. MSXML can be used from any programming language that supports COM, including C++, JavaScript, and Visual Basic 6.0. MSXML isn't recommended for use in managed code based on the CLR. diff --git a/docs/standard/linq/toc.yml b/docs/standard/linq/toc.yml deleted file mode 100644 index 3563a6a246184..0000000000000 --- a/docs/standard/linq/toc.yml +++ /dev/null @@ -1,353 +0,0 @@ -- name: LINQ - items: - - name: LINQ overview - href: index.md - - name: LINQ to XML - items: - - name: Get started - items: - - name: LINQ to XML overview - href: linq-xml-overview.md - - name: LINQ to XML vs. DOM - href: linq-xml-vs-dom.md - - name: LINQ to XML vs. other XML technologies - href: linq-xml-vs-xml-technologies.md - - name: Programming guide - items: - - name: LINQ to XML programming overview - items: - - name: Functional vs. procedural programming - href: functional-vs-procedural-programming.md - - name: LINQ to XML classes overview - href: linq-xml-classes-overview.md - - name: XElement class overview - href: xelement-class-overview.md - - name: XAttribute class overview - href: xattribute-class-overview.md - - name: XDocument class overview - href: xdocument-class-overview.md - - name: How to build LINQ to XML examples - href: build-linq-xml-examples.md - - name: XML trees - items: - - name: Functional construction - href: functional-construction.md - - name: Create XML trees in C# - href: create-xml-trees.md - - name: XML literals in Visual Basic - href: xml-literals.md - - name: Parse XML - items: - - name: Parse a string - href: parse-string.md - - name: Load XML from a file - href: load-xml-file.md - - name: Preserve white space while loading or parsing XML - href: preserve-white-space-loading-parsing-xml.md - - name: How to catch parsing errors - href: catch-parsing-errors.md - - name: Create a tree from an XmlReader - href: create-tree-xmlreader.md - - name: Stream XML fragments from an XmlReader - href: stream-xml-fragments-xmlreader.md - - name: Populate an XML tree with an XmlWriter - href: populate-xml-tree-xmlwriter.md - - name: How to validate using XSD - href: validate-xsd.md - - name: Valid content of XElement and XDocument objects - href: valid-content-xelement-xdocument-objects.md - - name: Work with XML namespaces - items: - - name: Namespaces overview - href: namespaces-overview.md - - name: Create a document with namespaces in C# - href: create-document-namespaces-csharp.md - - name: Create a document with namespaces in Visual Basic - href: create-document-namespaces-visual-basic.md - - name: How to control namespace prefixes - href: control-namespace-prefixes.md - - name: Scope of default namespaces - href: scope-default-namespaces.md - - name: Work with global namespaces in Visual Basic - href: work-global-namespaces.md - - name: Write queries on XML in namespaces - href: write-queries-xml-namespaces.md - - name: Serialize XML trees - items: - - name: Preserve white space while serializing - href: preserve-white-space-serializing.md - - name: Serialize with an XML declaration - href: serialize-xml-declaration.md - - name: Serialize to files, TextWriters, and XmlWriters - href: serialize-files-textwriters-xmlwriters.md - - name: Serialize to an XmlReader (invoke XSLT) - href: serialize-xmlreader-invoke-xslt.md - - name: LINQ to XML axes - items: - - name: LINQ to XML axes overview - href: linq-xml-axes-overview.md - - name: Retrieve a collection of elements - href: retrieve-collection-elements.md - - name: Retrieve the value of an element - href: retrieve-value-element.md - - name: Filter on element names - href: filter-element-names.md - - name: Chain axis method calls - href: chain-axis-method-calls.md - - name: Retrieve a single child element - href: retrieve-single-child-element.md - - name: Retrieve a collection of attributes - href: retrieve-collection-attributes.md - - name: Retrieve a single attribute - href: retrieve-single-attribute.md - - name: Retrieve the value of an attribute - href: retrieve-value-attribute.md - - name: Retrieve the shallow value of an element - href: retrieve-shallow-value-element.md - - name: Language-integrated axes in Visual Basic - href: language-integrated-axes.md - - name: Query XML trees - items: - - name: Query XML trees overview - href: query-xml-trees-overview.md - - name: Basic queries - items: - - name: Index to examples - displayName: queries - href: basic-queries-linq-to-xml.md - - name: Find an element with a specific attribute - href: find-element-specific-attribute.md - - name: Find an element with a specific child element - href: find-element-specific-child-element.md - - name: Query an XDocument vs. query an XElement - href: query-xdocument-vs-query-xelement.md - - name: Find descendants with a specific element name - href: find-descendants-specific-element-name.md - - name: Find a single descendant using the Descendants method - href: find-single-descendant-descendants-method.md - - name: Write queries with complex filtering - href: write-queries-complex-filtering.md - - name: Filter on an optional element - href: filter-optional-element.md - - name: Find all nodes in a namespace - href: find-all-nodes-namespace.md - - name: Sort elements - href: sort-elements.md - - name: Sort elements on multiple Keys - href: sort-elements-multiple-keys.md - - name: Calculate intermediate values - href: calculate-intermediate-values.md - - name: Find elements based on context - href: write-query-finds-elements-based-context.md - - name: Debug empty query results sets - href: debug-empty-query-results-sets.md - - name: Projections and transformations - items: - - name: Work with dictionaries using LINQ to XML - href: work-dictionaries-linq-xml.md - - name: Transform the shape of an XML tree - href: transform-shape-xml-tree.md - - name: Control the type of a projection - href: control-type-projection.md - - name: Project a new type - href: project-new-type.md - - name: Project an object graph - href: project-object-graph.md - - name: Project an anonymous type - href: project-anonymous-type.md - - name: Generate text files from XML - href: generate-text-files-xml.md - - name: Generate XML from CSV files - href: generate-xml-csv-files.md - - name: Advanced query techniques - items: - - name: Join two collections - href: join-two-collections.md - - name: Create hierarchy using grouping - href: create-hierarchy-grouping.md - - name: Query LINQ to XML using XPath - href: query-linq-xml-xpath.md - - name: Write a LINQ to XML axis method - href: write-linq-xml-axis-method.md - - name: Perform streaming transformations of text to XML in C# - href: perform-streaming-transformations-text-xml.md - - name: List all nodes in a tree - href: list-all-nodes-tree.md - - name: Retrieve paragraphs from an Office Open XML document - href: retrieve-paragraphs-office-open-xml-document.md - - name: Modify an Office Open XML document - href: modify-office-open-xml-document.md - - name: Populate an XML tree from the file system - href: populate-xml-tree-file-system.md - - name: LINQ to XML for XPath users - items: - - name: Comparison of XPath and LINQ to XML - href: comparison-xpath-linq-xml.md - - name: Find a child element - href: find-child-element.md - - name: Find a list of child elements - href: find-list-child-elements.md - - name: Find the root element - href: find-root-element.md - - name: Find descendant elements - href: find-descendant-elements.md - - name: Filter on an attribute - href: filter-attribute.md - - name: Find related elements - href: find-related-elements.md - - name: Find elements in a namespace - href: find-elements-namespace.md - - name: Find preceding siblings - href: find-preceding-siblings.md - - name: Find descendants of a child element - href: find-descendants-child-element.md - - name: Find a union of two location paths - href: find-union-two-location-paths.md - - name: Find sibling nodes - href: find-sibling-nodes.md - - name: Find an attribute of the parent - href: find-attribute-parent.md - - name: Find attributes of siblings with a specific name - href: find-attributes-siblings-specific-name.md - - name: Find elements with a specific attribute - href: find-elements-specific-attribute.md - - name: Find child elements based on position - href: find-child-elements-based-position.md - - name: Find the immediate preceding sibling - href: find-immediate-preceding-sibling.md - - name: Pure functional transformations of XML - items: - - name: Introduction - href: introduction-pure-functional-transformations.md - - name: Concepts and terminology - href: concepts-terminology-functional-transformation.md - - name: Functional vs. imperative programming - href: functional-vs-imperative-programming.md - - name: Refactor into pure functions - href: refactor-pure-functions.md - - name: Applicability of functional transformation - href: applicability-functional-transformation.md - - name: Functional transformation of XML - href: functional-transformation-xml.md - - name: Deferred execution and lazy evaluation - href: deferred-execution-lazy-evaluation.md - - name: Deferred execution example - href: deferred-execution-example.md - - name: "Tutorial: Chain queries together (C#)" - items: - - name: Chain queries example - href: chain-queries-example.md - - name: Intermediate materialization - href: intermediate-materialization.md - - name: Chain standard query operators - href: chain-standard-query-operators-together.md - - name: "Tutorial: Manipulate content in a WordprocessingML document" - items: - - name: The XML shape of WordprocessingML documents - href: xml-shape-wordprocessingml-documents.md - - name: Create the source Office Open XML document - href: create-source-office-open-xml-document.md - - name: Find the default paragraph style - href: find-default-paragraph-style.md - - name: Retrieve the paragraphs and their styles - href: retrieve-paragraphs-styles.md - - name: Retrieve the text of the paragraphs - href: retrieve-text-paragraphs.md - - name: Refactor using an extension method - href: refactor-extension-method.md - - name: Refactor using a pure function - href: refactor-pure-function.md - - name: Project XML in a different shape - href: project-xml-different-shape.md - - name: Find text in Word documents - href: find-text-word-documents.md - - name: Details of Office Open XML WordprocessingML documents - items: - - name: WordprocessingML document with styles - href: wordprocessingml-document-styles.md - - name: Style part of a WordprocessingML document - href: style-part-wordprocessingml-document.md - - name: Example that outputs document parts - href: example-outputs-office-open-xml-document-parts.md - - name: Modify XML trees - items: - - name: In-memory XML tree modification vs. functional construction - href: in-memory-xml-tree-modification-vs-functional-construction.md - - name: Add elements, attributes, and nodes - href: add-elements-attributes-nodes-xml-tree.md - - name: Modify elements, attributes, and nodes - href: modify-elements-attributes-nodes-xml-tree.md - - name: Remove elements, attributes, and nodes - href: remove-elements-attributes-nodes-xml-tree.md - - name: Maintain name-value pairs - href: maintain-name-value-pairs.md - - name: Change the namespace for an entire XML tree - href: change-namespace-entire-xml-tree.md - - name: Performance - items: - - name: Performance of chained queries - href: performance-chained-queries.md - - name: Atomized XName and XNamespace objects - href: atomized-xname-xnamespace-objects.md - - name: Pre-atomization of XName objects - href: pre-atomization-xname-objects.md - - name: Statically compiled queries - href: statically-compiled-queries.md - - name: Advanced LINQ to XML programming - items: - - name: LINQ to XML annotations - href: linq-xml-annotations.md - - name: LINQ to XML events - href: linq-xml-events.md - - name: Program with nodes - href: program-nodes.md - - name: Mixed declarative/imperative code bugs - href: mixed-declarative-imperative-code-bugs.md - - name: Stream XML fragments with access to header information - href: stream-xml-fragments-access-header-information.md - - name: Perform streaming transform of large XML documents - href: perform-streaming-transform-large-xml-documents.md - - name: Read and write an encoded document - href: read-write-encoded-document.md - - name: Use XSLT to transform an XML tree - href: use-xslt-transform-xml-tree.md - - name: Use annotations to transform LINQ to XML trees in an XSLT style - href: use-annotations-transform-linq-xml-trees-xslt-style.md - - name: Serialize object graphs that contain XElement objects - items: - - name: Serialize using XmlSerializer - href: serialize-xmlserializer.md - - name: Serialize using DataContractSerializer - href: serialize-datacontractserializer.md - - name: LINQ to XML security - href: linq-xml-security.md - - name: Sample XML documents - items: - - name: "Sample XML file: Typical purchase order" - href: sample-xml-file-typical-purchase-order.md - - name: "Sample XML file: Typical purchase order in a namespace" - href: sample-xml-file-typical-purchase-order-namespace.md - - name: "Sample XML file: Multiple purchase orders" - href: sample-xml-file-multiple-purchase-orders.md - - name: "Sample XML file: Multiple purchase orders in a namespace" - href: sample-xml-file-multiple-purchase-orders-namespace.md - - name: "Sample XML file: Test configuration" - href: sample-xml-file-test-configuration.md - - name: "Sample XML file: Test configuration in a namespace" - href: sample-xml-file-test-configuration-namespace.md - - name: "Sample XML file: Customers and orders" - href: sample-xml-file-customers-orders.md - - name: "Sample XSD file: Customers and orders" - href: sample-xsd-file-customers-orders.md - - name: "Sample XML file: Customers and orders in a namespace" - href: sample-xml-file-customers-orders-namespace.md - - name: "Sample XML file: Numerical data" - href: sample-xml-file-numerical-data.md - - name: "Sample XML file: Numerical data in a namespace" - href: sample-xml-file-numerical-data-namespace.md - - name: "Sample XML file: Books" - href: sample-xml-file-books.md - - name: "Sample XML file: Consolidated purchase orders" - href: sample-xml-file-consolidated-purchase-orders.md - - name: Reference - href: reference.md diff --git a/docs/standard/linq/xdocument-class-overview.md b/docs/standard/linq/xdocument-class-overview.md index ff29b0adc6b61..82e71fa053341 100644 --- a/docs/standard/linq/xdocument-class-overview.md +++ b/docs/standard/linq/xdocument-class-overview.md @@ -23,7 +23,7 @@ An <xref:System.Xml.Linq.XDocument> can contain the following elements: - One <xref:System.Xml.Linq.XDeclaration> object. <xref:System.Xml.Linq.XDeclaration> enables you to specify the pertinent parts of an XML declaration: the XML version, the encoding of the document, and whether the XML document is standalone. - One <xref:System.Xml.Linq.XElement> object. This object is the root node of the XML document. - Any number of <xref:System.Xml.Linq.XProcessingInstruction> objects. A processing instruction communicates information to an application that processes the XML. -- Any number of <xref:System.Xml.Linq.XComment> objects. The comments will be siblings to the root element. The <xref:System.Xml.Linq.XComment> object can't be the first argument in the list, because it's not valid for an XML document to start with a comment. +- Any number of <xref:System.Xml.Linq.XComment> objects. The comments will be siblings to the root element. - One <xref:System.Xml.Linq.XDocumentType> for the DTD. When you serialize an <xref:System.Xml.Linq.XDocument>, even if `XDocument.Declaration` is `null`, the output will have an XML declaration if the writer has `Writer.Settings.OmitXmlDeclaration` set to `false` (the default). diff --git a/docs/standard/memory-and-spans/memory-t-usage-guidelines.md b/docs/standard/memory-and-spans/memory-t-usage-guidelines.md index d36f79553b3d6..eea51020b956b 100644 --- a/docs/standard/memory-and-spans/memory-t-usage-guidelines.md +++ b/docs/standard/memory-and-spans/memory-t-usage-guidelines.md @@ -71,7 +71,7 @@ You use the <xref:System.Buffers.IMemoryOwner%601?displayProperty=nameWithType> [!code-csharp[ownership](~/samples/snippets/standard/buffers/memory-t/owner/owner.cs)] -We can also write this example with the [`using`](../../csharp/language-reference/keywords/using-statement.md): +We can also write this example with the [`using`](../../csharp/language-reference/statements/using.md): [!code-csharp[ownership-using](~/samples/snippets/standard/buffers/memory-t/owner-using/owner-using.cs)] diff --git a/docs/standard/native-interop/best-practices.md b/docs/standard/native-interop/best-practices.md index 2b8f689531289..f854f7ef794b3 100644 --- a/docs/standard/native-interop/best-practices.md +++ b/docs/standard/native-interop/best-practices.md @@ -14,6 +14,7 @@ The guidance in this section applies to all interop scenarios. - ✔️ DO use the same naming and capitalization for your methods and parameters as the native method you want to call. - ✔️ CONSIDER using the same naming and capitalization for constant values. - ✔️ DO use .NET types that map closest to the native type. For example, in C#, use `uint` when the native type is `unsigned int`. +- ✔️ DO prefer expressing higher level native types using .NET structs rather than classes. - ✔️ DO only use `[In]` and `[Out]` attributes when the behavior you want differs from the default behavior. - ✔️ CONSIDER using <xref:System.Buffers.ArrayPool%601?displayProperty=nameWithType> to pool your native array buffers. - ✔️ CONSIDER wrapping your P/Invoke declarations in a class with the same name and capitalization as your native library. @@ -182,20 +183,38 @@ The following types are the same size on 32-bit and 64-bit Windows, despite thei | 32 | `BOOL` | `int` | `bool` | | 8 | `BOOLEAN` | `byte` | `[MarshalAs(UnmanagedType.U1)] bool` | | 8 | `BYTE` | `byte` | | -| 8 | `CHAR` | `sbyte` | | | 8 | `UCHAR` | `byte` | | -| 16 | `SHORT` | `short` | | +| 8 | `UINT8` | `byte` | | +| 8 | `CCHAR` | `byte` | | +| 8 | `CHAR` | `sbyte` | | +| 8 | `CHAR` | `sbyte` | | +| 8 | `INT8` | `sbyte` | | | 16 | `CSHORT` | `short` | | +| 16 | `INT16` | `short` | | +| 16 | `SHORT` | `short` | | +| 16 | `ATOM` | `ushort` | | +| 16 | `UINT16` | `ushort` | | | 16 | `USHORT` | `ushort` | | | 16 | `WORD` | `ushort` | | -| 16 | `ATOM` | `ushort` | | | 32 | `INT` | `int` | | +| 32 | `INT32` | `int` | | | 32 | `LONG` | `int` | See [`CLong` and `CULong`](#cc-long). | +| 32 | `LONG32` | `int` | | +| 32 | `CLONG` | `uint` | See [`CLong` and `CULong`](#cc-long). | +| 32 | `DWORD` | `uint` | See [`CLong` and `CULong`](#cc-long). | +| 32 | `DWORD32` | `uint` | | +| 32 | `UINT` | `uint` | | +| 32 | `UINT32` | `uint` | | | 32 | `ULONG` | `uint` | See [`CLong` and `CULong`](#cc-long). | -| 32 | `DWORD` | `uint` | | -| 64 | `QWORD` | `long` | | +| 32 | `ULONG32` | `uint` | | +| 64 | `INT64` | `long` | | | 64 | `LARGE_INTEGER` | `long` | | +| 64 | `LONG64` | `long` | | | 64 | `LONGLONG` | `long` | | +| 64 | `QWORD` | `long` | | +| 64 | `DWORD64` | `ulong` | | +| 64 | `UINT64` | `ulong` | | +| 64 | `ULONG64` | `ulong` | | | 64 | `ULONGLONG` | `ulong` | | | 64 | `ULARGE_INTEGER` | `ulong` | | | 32 | `HRESULT` | `int` | | @@ -215,7 +234,7 @@ The following types, being pointers, do follow the width of the platform. Use `I A Windows `PVOID`, which is a C `void*`, can be marshalled as either `IntPtr` or `UIntPtr`, but prefer `void*` when possible. -[Windows Data Types](/windows/desktop/WinProg/windows-data-types) +[Windows Data Types](/windows/win32/winprog/windows-data-types) [Data Type Ranges](/cpp/cpp/data-type-ranges) @@ -223,40 +242,71 @@ A Windows `PVOID`, which is a C `void*`, can be marshalled as either `IntPtr` or There are rare instances when built-in support for a type is removed. -The [`UnmanagedType.HString`](xref:System.Runtime.InteropServices.UnmanagedType) built-in marshal support was removed in the .NET 5 release. You must recompile binaries that use this marshalling type and that target a previous framework. It's still possible to marshal this type, but you must marshal it manually, as the following code example shows. This code will work moving forward and is also compatible with previous frameworks. +The [`UnmanagedType.HString`](xref:System.Runtime.InteropServices.UnmanagedType) and [`UnmanagedType.IInspectable`](xref:System.Runtime.InteropServices.UnmanagedType) built-in marshal support was removed in the .NET 5 release. You must recompile binaries that use this marshalling type and that target a previous framework. It's still possible to marshal this type, but you must marshal it manually, as the following code example shows. This code will work moving forward and is also compatible with previous frameworks. ```csharp -static class HSTRING +public sealed class HStringMarshaler : ICustomMarshaler { - public static IntPtr FromString(string s) + public static readonly HStringMarshaler Instance = new HStringMarshaler(); + + public static ICustomMarshaler GetInstance(string _) => Instance; + + public void CleanUpManagedData(object ManagedObj) { } + + public void CleanUpNativeData(IntPtr pNativeData) { - Marshal.ThrowExceptionForHR(WindowsCreateString(s, s.Length, out IntPtr h)); - return h; + if (pNativeData != IntPtr.Zero) + { + Marshal.ThrowExceptionForHR(WindowsDeleteString(pNativeData)); + } } - public static void Delete(IntPtr s) + public int GetNativeDataSize() => -1; + + public IntPtr MarshalManagedToNative(object ManagedObj) { - Marshal.ThrowExceptionForHR(WindowsDeleteString(s)); + if (ManagedObj is null) + return IntPtr.Zero; + + var str = (string)ManagedObj; + Marshal.ThrowExceptionForHR(WindowsCreateString(str, str.Length, out var ptr)); + return ptr; } - [DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)] - private static extern int WindowsCreateString( - [MarshalAs(UnmanagedType.LPWStr)] string sourceString, int length, out IntPtr hstring); + public object MarshalNativeToManaged(IntPtr pNativeData) + { + if (pNativeData == IntPtr.Zero) + return null; + + var ptr = WindowsGetStringRawBuffer(pNativeData, out var length); + if (ptr == IntPtr.Zero) + return null; - [DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)] + if (length == 0) + return string.Empty; + + return Marshal.PtrToStringUni(ptr, length); + } + + [DllImport("api-ms-win-core-winrt-string-l1-1-0.dll")] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] + private static extern int WindowsCreateString([MarshalAs(UnmanagedType.LPWStr)] string sourceString, int length, out IntPtr hstring); + + [DllImport("api-ms-win-core-winrt-string-l1-1-0.dll")] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] private static extern int WindowsDeleteString(IntPtr hstring); -} -// Usage example -IntPtr hstring = HSTRING.FromString("HSTRING from .NET to WinRT API"); -try -{ - // Pass hstring to WinRT or Win32 API. -} -finally -{ - HSTRING.Delete(hstring); + [DllImport("api-ms-win-core-winrt-string-l1-1-0.dll")] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] + private static extern IntPtr WindowsGetStringRawBuffer(IntPtr hstring, out int length); } + +// Example usage: +[DllImport("api-ms-win-core-winrt-l1-1-0.dll", PreserveSig = true)] +internal static extern int RoGetActivationFactory( + /*[MarshalAs(UnmanagedType.HString)]*/[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(HStringMarshaler))] string activatableClassId, + [In] ref Guid iid, + [Out, MarshalAs(UnmanagedType.IUnknown)] out object factory); ``` ## Cross-platform data type considerations @@ -265,7 +315,7 @@ There are types in the C/C++ language that have latitude in how they are defined ### C/C++ `long` -C/C++ `long` and C# `long` are not the same types. Using C# `long` to interop with C/C++ `long` is almost never correct. +C/C++ `long` and C# `long` are not necessarily the same size. The `long` type in C/C++ is defined to have ["at least 32"](https://en.cppreference.com/w/c/language/arithmetic_types) bits. This means there is a minimum number of required bits, but platforms can choose to use more bits if desired. The following table illustrates the differences in provided bits for the C/C++ `long` data type between platforms. @@ -274,7 +324,9 @@ The `long` type in C/C++ is defined to have ["at least 32"](https://en.cpprefere | Windows | 32 | 32 | | macOS/\*nix | 32 | 64 | -These differences can make authoring cross-platform P/Invokes difficult when the native function is defined to use `long` on all platforms. +In contrast, C# `long` is always 64 bit. For this reason, it's best to avoid using C# `long` to interop with C/C++ `long`. + +(This problem with C/C++ `long` does not exist for C/C++ `char`, `short`, `int`, and `long long` as they are 8, 16, 32, and 64 bits respectively on all of these platforms.) In .NET 6 and later versions, use the [`CLong`](xref:System.Runtime.InteropServices.CLong) and [`CULong`](xref:System.Runtime.InteropServices.CULong) types for interop with C/C++ `long` and `unsigned long` data types. The following example is for `CLong`, but you can use `CULong` to abstract `unsigned long` in a similar way. @@ -328,6 +380,8 @@ Pointers to structs in definitions must either be passed by `ref` or use `unsafe ✔️ DO use the C# `sizeof()` instead of `Marshal.SizeOf<MyStruct>()` for blittable structures to improve performance. +❌ AVOID using classes to express complex native types through inheritance. + ❌ AVOID using `System.Delegate` or `System.MulticastDelegate` fields to represent function pointer fields in structures. Since <xref:System.Delegate?displayProperty=fullName> and <xref:System.MulticastDelegate?displayProperty=fullName> don't have a required signature, they don't guarantee that the delegate passed in will match the signature the native code expects. Additionally, in .NET Framework and .NET Core, marshalling a struct containing a `System.Delegate` or `System.MulticastDelegate` from its native representation to a managed object can destabilize the runtime if the value of the field in the native representation isn't a function pointer that wraps a managed delegate. In .NET 5 and later versions, marshalling a `System.Delegate` or `System.MulticastDelegate` field from a native representation to a managed object is not supported. Use a specific delegate type instead of `System.Delegate` or `System.MulticastDelegate`. diff --git a/docs/standard/native-interop/customize-struct-marshalling.md b/docs/standard/native-interop/customize-struct-marshalling.md index ffd8bc1ff7e51..557b17d286aa3 100644 --- a/docs/standard/native-interop/customize-struct-marshalling.md +++ b/docs/standard/native-interop/customize-struct-marshalling.md @@ -19,6 +19,8 @@ Sometimes the default marshalling rules for structures aren't exactly what you n ✔️ DO only use `LayoutKind.Explicit` in marshalling when your native struct also has an explicit layout, such as a union. +❌ AVOID using classes to express complex native types through inheritance. + ❌ AVOID using `LayoutKind.Explicit` when marshalling structures on non-Windows platforms if you need to target runtimes before .NET Core 3.0. The .NET Core runtime before 3.0 doesn't support passing explicit structures by value to native functions on Intel or AMD 64-bit non-Windows systems. However, the runtime supports passing explicit structures by reference on all platforms. ## Customizing Boolean field marshalling @@ -111,7 +113,7 @@ public struct DefaultArray ```cpp struct DefaultArray { - int* values; + int32_t* values; }; ``` @@ -329,6 +331,66 @@ struct Currency }; ``` +### Unions + +A union is a data type that can contain different types of data atop the same memory. It's a common form of data in the C language. A union can be expressed in .NET using `LayoutKind.Explicit`. It's recommended to use structs when defining a union in .NET. Using classes can cause layout issues and produce unpredictable behavior. + +```cpp +struct device1_config +{ + void* a; + void* b; + void* c; +}; +struct device2_config +{ + int32_t a; + int32_t b; +}; +struct config +{ + int32_t type; + + union + { + device1_config dev1; + device2_config dev2; + }; +}; +``` + +```csharp +public unsafe struct Device1Config +{ + void* a; + void* b; + void* c; +} + +public struct Device2Config +{ + int a; + int b; +} + +public struct Config +{ + public int Type; + + public _Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public struct _Union + { + [FieldOffset(0)] + public Device1Config Dev1; + + [FieldOffset(0)] + public Device2Config Dev2; + } +} +``` + ## Marshal `System.Object` On Windows, you can marshal `object`-typed fields to native code. You can marshal these fields to one of three types: diff --git a/docs/standard/parallel-programming/snippets/cs/DownloadCache.cs b/docs/standard/parallel-programming/snippets/cs/DownloadCache.cs index 91b37a6fd0a43..e43c2238f9ee4 100644 --- a/docs/standard/parallel-programming/snippets/cs/DownloadCache.cs +++ b/docs/standard/parallel-programming/snippets/cs/DownloadCache.cs @@ -31,14 +31,14 @@ public static async Task Main() { string[] urls = new[] { - "https://docs.microsoft.com/aspnet/core", - "https://docs.microsoft.com/dotnet", - "https://docs.microsoft.com/dotnet/architecture/dapr-for-net-developers", - "https://docs.microsoft.com/dotnet/azure", - "https://docs.microsoft.com/dotnet/desktop/wpf", - "https://docs.microsoft.com/dotnet/devops/create-dotnet-github-action", - "https://docs.microsoft.com/dotnet/machine-learning", - "https://docs.microsoft.com/xamarin", + "https://learn.microsoft.com/aspnet/core", + "https://learn.microsoft.com/dotnet", + "https://learn.microsoft.com/dotnet/architecture/dapr-for-net-developers", + "https://learn.microsoft.com/dotnet/azure", + "https://learn.microsoft.com/dotnet/desktop/wpf", + "https://learn.microsoft.com/dotnet/devops/create-dotnet-github-action", + "https://learn.microsoft.com/dotnet/machine-learning", + "https://learn.microsoft.com/xamarin", "https://dotnet.microsoft.com/", "https://www.microsoft.com" }; diff --git a/docs/standard/parallel-programming/snippets/vb/DownloadCache.vb b/docs/standard/parallel-programming/snippets/vb/DownloadCache.vb index d67f4351faa6b..0898a313b7658 100644 --- a/docs/standard/parallel-programming/snippets/vb/DownloadCache.vb +++ b/docs/standard/parallel-programming/snippets/vb/DownloadCache.vb @@ -42,14 +42,14 @@ Module Snippets Sub Main() Dim cache As DownloadCache = New DownloadCache() Dim urls As String() = { - "https://docs.microsoft.com/aspnet/core", - "https://docs.microsoft.com/dotnet", - "https://docs.microsoft.com/dotnet/architecture/dapr-for-net-developers", - "https://docs.microsoft.com/dotnet/azure", - "https://docs.microsoft.com/dotnet/desktop/wpf", - "https://docs.microsoft.com/dotnet/devops/create-dotnet-github-action", - "https://docs.microsoft.com/dotnet/machine-learning", - "https://docs.microsoft.com/xamarin", + "https://learn.microsoft.com/aspnet/core", + "https://learn.microsoft.com/dotnet", + "https://learn.microsoft.com/dotnet/architecture/dapr-for-net-developers", + "https://learn.microsoft.com/dotnet/azure", + "https://learn.microsoft.com/dotnet/desktop/wpf", + "https://learn.microsoft.com/dotnet/devops/create-dotnet-github-action", + "https://learn.microsoft.com/dotnet/machine-learning", + "https://learn.microsoft.com/xamarin", "https://dotnet.microsoft.com/", "https://www.microsoft.com" } diff --git a/docs/standard/security/how-to-use-data-protection.md b/docs/standard/security/how-to-use-data-protection.md index 41ecf37f24c8d..df9a1441ad772 100644 --- a/docs/standard/security/how-to-use-data-protection.md +++ b/docs/standard/security/how-to-use-data-protection.md @@ -26,7 +26,7 @@ ms.assetid: 606698b0-cb1a-42ca-beeb-0bea34205d20 .NET provides access to the data protection API (DPAPI), which allows you to encrypt data using information from the current user account or computer. When you use the DPAPI, you alleviate the difficult problem of explicitly generating and storing a cryptographic key. -Use the <xref:System.Security.Cryptography.ProtectedData> class to encrypt a copy of an array of bytes. This functionality is available in .NET Framework, .NET Core, and .NET 5. You can specify that data encrypted by the current user account can be decrypted only by the same user account, or you can specify that data encrypted by the current user account can be decrypted by any account on the computer. See the <xref:System.Security.Cryptography.DataProtectionScope> enumeration for a detailed description of <xref:System.Security.Cryptography.ProtectedData> options. +Use the <xref:System.Security.Cryptography.ProtectedData> class to encrypt a copy of an array of bytes. You can specify that data encrypted by the current user account can be decrypted only by the same user account, or you can specify that data encrypted by the current user account can be decrypted by any account on the computer. See the <xref:System.Security.Cryptography.DataProtectionScope> enumeration for a detailed description of <xref:System.Security.Cryptography.ProtectedData> options. ## Encrypt data to a file or stream using data protection diff --git a/docs/standard/security/toc.yml b/docs/standard/security/toc.yml deleted file mode 100644 index 872a4e875b076..0000000000000 --- a/docs/standard/security/toc.yml +++ /dev/null @@ -1,75 +0,0 @@ -- name: Security - href: index.md - items: - - name: Key Security Concepts - href: key-security-concepts.md - - name: .NET Core FIPS compliance - href: fips-compliance.md - - name: Role-Based Security - href: role-based-security.md - items: - - name: Principal and Identity Objects - href: principal-and-identity-objects.md - - name: "How to: Create a WindowsPrincipal Object" - href: how-to-create-a-windowsprincipal-object.md - - name: "How to: Create GenericPrincipal and GenericIdentity Objects" - href: how-to-create-genericprincipal-and-genericidentity-objects.md - - name: Replacing a Principal Object - href: replacing-a-principal-object.md - - name: Impersonating and Reverting - href: impersonating-and-reverting.md - - name: Cryptography Model - items: - - name: Overview - href: cryptography-model.md - - name: Cross-platform cryptography - href: cross-platform-cryptography.md - - name: Cryptographic Services - href: cryptographic-services.md - - name: Generating Keys for Encryption and Decryption - href: generating-keys-for-encryption-and-decryption.md - - name: "How to: Store Asymmetric Keys in a Key Container" - href: how-to-store-asymmetric-keys-in-a-key-container.md - - name: Encrypting Data - href: encrypting-data.md - - name: Decrypting Data - href: decrypting-data.md - - name: Cryptographic Signatures - href: cryptographic-signatures.md - - name: Ensuring Data Integrity with Hash Codes - href: ensuring-data-integrity-with-hash-codes.md - - name: "How to: Encrypt XML Elements with Symmetric Keys" - href: how-to-encrypt-xml-elements-with-symmetric-keys.md - - name: "How to: Decrypt XML Elements with Symmetric Keys" - href: how-to-decrypt-xml-elements-with-symmetric-keys.md - - name: "How to: Encrypt XML Elements with Asymmetric Keys" - href: how-to-encrypt-xml-elements-with-asymmetric-keys.md - - name: "How to: Decrypt XML Elements with Asymmetric Keys" - href: how-to-decrypt-xml-elements-with-asymmetric-keys.md - - name: "How to: Encrypt XML Elements with X.509 Certificates" - href: how-to-encrypt-xml-elements-with-x-509-certificates.md - - name: "How to: Decrypt XML Elements with X.509 Certificates" - href: how-to-decrypt-xml-elements-with-x-509-certificates.md - - name: "How to: Sign XML Documents with Digital Signatures" - href: how-to-sign-xml-documents-with-digital-signatures.md - - name: "How to: Verify the Digital Signatures of XML Documents" - href: how-to-verify-the-digital-signatures-of-xml-documents.md - - name: "How to: Use Data Protection" - href: how-to-use-data-protection.md - - name: "How to: Access Hardware Encryption Devices" - href: how-to-access-hardware-encryption-devices.md - - name: "Walkthrough: Creating a Cryptographic Application" - href: walkthrough-creating-a-cryptographic-application.md - - name: Secure Coding Guidelines - href: secure-coding-guidelines.md - items: - - name: Securing State Data - href: securing-state-data.md - - name: Security and User Input - href: security-and-user-input.md - - name: Security and Race Conditions - href: security-and-race-conditions.md - - name: Security and On-the-Fly Code Generation - href: security-and-on-the-fly-code-generation.md - - name: Timing vulnerabilities with CBC-mode symmetric decryption using padding - href: vulnerabilities-cbc-mode.md diff --git a/docs/standard/serialization/basic-serialization.md b/docs/standard/serialization/basic-serialization.md deleted file mode 100644 index 1f975abe7680b..0000000000000 --- a/docs/standard/serialization/basic-serialization.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "Basic serialization" -description: This article shows you how to make a class serializable with the SerializableAttribute and includes examples of serialization and deserialization. -ms.date: "03/30/2017" -helpviewer_keywords: - - "binary serialization, basic serialization" - - "serialization, basic serialization" -ms.assetid: d899d43c-335a-433e-a589-cd187192984f -dev_langs: - - "CSharp" ---- -# Basic serialization - -[!INCLUDE [binary-serialization-warning](../../../includes/binary-serialization-warning.md)] - -The easiest way to make a class binary serializable is to mark it with the <xref:System.SerializableAttribute> as follows. - -```csharp -[Serializable] -public class MyObject { - public int n1 = 0; - public int n2 = 0; - public String str = null; -} -``` - -The following code example shows how an instance of this class can be serialized to a file. - -```csharp -MyObject obj = new MyObject(); -obj.n1 = 1; -obj.n2 = 24; -obj.str = "Some String"; -IFormatter formatter = new BinaryFormatter(); -Stream stream = new FileStream("MyFile.bin", FileMode.Create, FileAccess.Write, FileShare.None); -formatter.Serialize(stream, obj); -stream.Close(); -``` - -This example uses a binary formatter to do the serialization. All you need to do is create an instance of the stream and the formatter you intend to use, and then call the **Serialize** method on the formatter. The stream and the object to serialize are provided as parameters to this call. Although it is not explicitly demonstrated in this example, all member variables of a class will be serialized—even variables marked as private. In this aspect, binary serialization differs from the <xref:System.Xml.Serialization.XmlSerializer> class, which only serializes public fields. For information on excluding member variables from binary serialization, see [Selective Serialization](selective-serialization.md). - -Restoring the object back to its former state is just as easy. First, create a stream for reading and a <xref:System.Runtime.Serialization.Formatter>, and then instruct the formatter to deserialize the object. The code example below shows how this is done. - -```csharp -IFormatter formatter = new BinaryFormatter(); -Stream stream = new FileStream("MyFile.bin", FileMode.Open, FileAccess.Read, FileShare.Read); -MyObject obj = (MyObject) formatter.Deserialize(stream); -stream.Close(); - -// Here's the proof. -Console.WriteLine("n1: {0}", obj.n1); -Console.WriteLine("n2: {0}", obj.n2); -Console.WriteLine("str: {0}", obj.str); -``` - -The <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter> used in the preceding code is efficient and produces a compact byte stream. All objects serialized with this formatter can also be deserialized with it, which makes it an ideal tool for serializing objects that will be deserialized on .NET. It's important to note that constructors are not called when an object is deserialized. This constraint is placed on deserialization for performance reasons. However, this violates some of the usual contracts the runtime makes with the object writer, and developers should ensure that they understand the ramifications when marking an object as serializable. - -If portability is a requirement, use the <xref:System.Runtime.Serialization.Formatters.Soap.SoapFormatter> instead. Simply replace the `BinaryFormatter` in the previous code with `SoapFormatter`, and call `Serialize` and `Deserialize` as before. This formatter produces the following output for the example used previously. - -```xml -<SOAP-ENV:Envelope - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" - xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - xmlns:a1="http://schemas.microsoft.com/clr/assem/ToFile"> - - <SOAP-ENV:Body> - <a1:MyObject id="ref-1"> - <n1>1</n1> - <n2>24</n2> - <str id="ref-3">Some String</str> - </a1:MyObject> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope> -``` - -It's important to note that the [Serializable](xref:System.SerializableAttribute) attribute cannot be inherited. If you derive a new class from `MyObject`, the new class must be marked with the attribute as well, or it cannot be serialized. For example, when you attempt to serialize an instance of the following class, you'll get a <xref:System.Runtime.Serialization.SerializationException> informing you that the `MyStuff` type is not marked as serializable. - -```csharp -public class MyStuff : MyObject -{ - public int n3; -} -``` - - Using the [Serializable](xref:System.SerializableAttribute) attribute is convenient, but it has limitations as previously demonstrated. Refer to the [Serialization guidelines](serialization-guidelines.md) for information about when you should mark a class for binary serialization. Binary serialization cannot be added to a class after it's been compiled. - -## See also - -- [Binary Serialization](binary-serialization.md) -- [XML and SOAP Serialization](xml-and-soap-serialization.md) diff --git a/docs/standard/serialization/binary-serialization.md b/docs/standard/serialization/binary-serialization.md deleted file mode 100644 index e485e4ed08cd7..0000000000000 --- a/docs/standard/serialization/binary-serialization.md +++ /dev/null @@ -1,346 +0,0 @@ ---- -title: "Binary serialization" -description: This article describes binary serialization and types for which .NET Core supports it. Be aware of the dangers of binary serialization and alternatives to it. -ms.date: 03/18/2022 -helpviewer_keywords: - - "binary serialization" - - "serialization, about serialization" - - "deserialization" - - "binary serialization, about serialization" - - "binary serialization, .net core serialization" - - "serialization, cross-framework" -ms.assetid: 2b1ea3be-1152-4032-b2b3-07794054c405 -author: "ViktorHofer" ---- -# Binary serialization - -Serialization is the process of storing the state of an object to a storage medium. In binary serialization, the public and private fields of the object and the name of the class, including the assembly containing the class, are converted to a stream of bytes, which is then written to a data stream. When the object is subsequently deserialized, an exact clone of the original object is created. - -When implementing a serialization mechanism in an object-oriented environment, you often need to make tradeoffs between ease of use and flexibility. The process can be automated to a large extent, provided you are given sufficient control over the process. For example, situations may arise where simple binary serialization is not sufficient, or there might be a specific reason to decide which fields in a class need to be serialized. The following sections examine the robust serialization mechanism provided with .NET and highlight a number of important features that allow you to customize the process to meet your needs. - -> [!NOTE] -> The state of a UTF-8 or UTF-7 encoded object is not preserved if the object is serialized and deserialized using different .NET versions. - -[!INCLUDE [binary-serialization-warning](../../../includes/binary-serialization-warning.md)] - -Binary serialization allows modifying private members inside an object and therefore changing the state of it. Because of this, other serialization frameworks, like <xref:System.Text.Json?displayProperty=fullName>, that operate on the public API surface are recommended. - -## .NET Core - -.NET Core supports binary serialization for a subset of types. You can see the list of supported types in the [Serializable types](#serializable-types) section that follows. The listed types are guaranteed to be serializable between .NET Framework 4.5.1 and later versions and between .NET Core 2.0 and later versions. Other .NET implementations, such as Mono, aren't officially supported but should also work. - -### Serializable types - -> [!div class="mx-tdBreakAll"] -> | Type | Notes | -> | - | - | -> | <xref:Microsoft.CSharp.RuntimeBinder.RuntimeBinderException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:Microsoft.CSharp.RuntimeBinder.RuntimeBinderInternalCompilerException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.AccessViolationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.AggregateException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.AppDomainUnloadedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ApplicationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ArgumentException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ArgumentNullException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ArgumentOutOfRangeException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ArithmeticException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Array?displayProperty=nameWithType> | | -> | <xref:System.ArraySegment%601?displayProperty=nameWithType> | | -> | <xref:System.ArrayTypeMismatchException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Attribute?displayProperty=nameWithType> | | -> | <xref:System.BadImageFormatException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Boolean?displayProperty=nameWithType> | | -> | <xref:System.Byte?displayProperty=nameWithType> | | -> | <xref:System.CannotUnloadAppDomainException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Char?displayProperty=nameWithType> | | -> | <xref:System.Collections.ArrayList?displayProperty=nameWithType> | | -> | <xref:System.Collections.BitArray?displayProperty=nameWithType> | | -> | <xref:System.Collections.Comparer?displayProperty=nameWithType> | | -> | <xref:System.Collections.DictionaryEntry?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.Comparer%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.Dictionary%602?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.EqualityComparer%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.HashSet%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.KeyNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Collections.Generic.KeyValuePair%602?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.LinkedList%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.List%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.Queue%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.SortedDictionary%602?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.SortedList%602?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.SortedSet%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.Generic.Stack%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.Hashtable?displayProperty=nameWithType> | | -> | <xref:System.Collections.ObjectModel.Collection%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.ObjectModel.KeyedCollection%602?displayProperty=nameWithType> | | -> | <xref:System.Collections.ObjectModel.ObservableCollection%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.ObjectModel.ReadOnlyCollection%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.ObjectModel.ReadOnlyDictionary%602?displayProperty=nameWithType> | | -> | <xref:System.Collections.ObjectModel.ReadOnlyObservableCollection%601?displayProperty=nameWithType> | | -> | <xref:System.Collections.Queue?displayProperty=nameWithType> | | -> | <xref:System.Collections.SortedList?displayProperty=nameWithType> | | -> | <xref:System.Collections.Specialized.HybridDictionary?displayProperty=nameWithType> | | -> | <xref:System.Collections.Specialized.ListDictionary?displayProperty=nameWithType> | | -> | <xref:System.Collections.Specialized.OrderedDictionary?displayProperty=nameWithType> | | -> | <xref:System.Collections.Specialized.StringCollection?displayProperty=nameWithType> | | -> | <xref:System.Collections.Specialized.StringDictionary?displayProperty=nameWithType> | | -> | <xref:System.Collections.Stack?displayProperty=nameWithType> | | -> | `System.Collections.Generic.NonRandomizedStringEqualityComparer` | Starting in .NET Core 2.0.4. | -> | <xref:System.ComponentModel.BindingList%601?displayProperty=nameWithType> | | -> | <xref:System.ComponentModel.DataAnnotations.ValidationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ComponentModel.Design.CheckoutException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ComponentModel.InvalidAsynchronousStateException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ComponentModel.InvalidEnumArgumentException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ComponentModel.LicenseException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4.<br/>Serialization from .NET Framework to .NET Core is not supported. | -> | <xref:System.ComponentModel.WarningException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ComponentModel.Win32Exception?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Configuration.ConfigurationErrorsException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Configuration.ConfigurationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Configuration.Provider.ProviderException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Configuration.SettingsPropertyIsReadOnlyException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Configuration.SettingsPropertyNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Configuration.SettingsPropertyWrongTypeException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ContextMarshalException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DBNull?displayProperty=nameWithType> | Starting in .NET Core 2.0.2 and later versions. | -> | <xref:System.Data.Common.DbException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.ConstraintException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.DBConcurrencyException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.DataException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.DataSet?displayProperty=nameWithType> | | -> | <xref:System.Data.DataTable?displayProperty=nameWithType> | If you set `RemotingFormat` to `SerializationFormat.Binary`, it can only be exchanged with .NET Core 2.1 and later versions. | -> | <xref:System.Data.DeletedRowInaccessibleException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.DuplicateNameException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.EvaluateException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.InRowChangingEventException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.InvalidConstraintException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.InvalidExpressionException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.MissingPrimaryKeyException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.NoNullAllowedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.Odbc.OdbcException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.OperationAbortedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.PropertyCollection?displayProperty=nameWithType> | | -> | <xref:System.Data.ReadOnlyException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.RowNotInTableException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.SqlClient.SqlException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4.<br/>Serialization from .NET Framework to .NET Core is not supported | -> | <xref:System.Data.SqlTypes.SqlAlreadyFilledException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.SqlTypes.SqlBoolean?displayProperty=nameWithType> | | -> | <xref:System.Data.SqlTypes.SqlByte?displayProperty=nameWithType> | | -> | <xref:System.Data.SqlTypes.SqlDateTime?displayProperty=nameWithType> | | -> | <xref:System.Data.SqlTypes.SqlDouble?displayProperty=nameWithType> | | -> | <xref:System.Data.SqlTypes.SqlGuid?displayProperty=nameWithType> | | -> | <xref:System.Data.SqlTypes.SqlInt16?displayProperty=nameWithType> | | -> | <xref:System.Data.SqlTypes.SqlInt32?displayProperty=nameWithType> | | -> | <xref:System.Data.SqlTypes.SqlInt64?displayProperty=nameWithType> | | -> | <xref:System.Data.SqlTypes.SqlNotFilledException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.SqlTypes.SqlNullValueException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.SqlTypes.SqlString?displayProperty=nameWithType> | | -> | <xref:System.Data.SqlTypes.SqlTruncateException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.SqlTypes.SqlTypeException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.StrongTypingException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.SyntaxErrorException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Data.VersionNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DataMisalignedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DateTime?displayProperty=nameWithType> | | -> | <xref:System.DateTimeOffset?displayProperty=nameWithType> | | -> | <xref:System.Decimal?displayProperty=nameWithType> | | -> | `System.Diagnostics.Contracts.ContractException` | Starting in .NET Core 2.0.4. | -> | <xref:System.Diagnostics.Tracing.EventSourceException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.DirectoryNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.AccountManagement.MultipleMatchesException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.AccountManagement.NoMatchingPrincipalException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.AccountManagement.PasswordException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.AccountManagement.PrincipalException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.AccountManagement.PrincipalExistsException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.AccountManagement.PrincipalOperationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.AccountManagement.PrincipalServerDownException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.ActiveDirectory.ActiveDirectoryObjectExistsException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.ActiveDirectory.ActiveDirectoryObjectNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.ActiveDirectory.ActiveDirectoryOperationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.ActiveDirectory.ActiveDirectoryServerDownException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.ActiveDirectory.ForestTrustCollisionException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.ActiveDirectory.SyncFromAllServersOperationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.DirectoryServicesCOMException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.Protocols.BerConversionException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.Protocols.DirectoryException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.Protocols.DirectoryOperationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.Protocols.LdapException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DirectoryServices.Protocols.TlsOperationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DivideByZeroException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.DllNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Double?displayProperty=nameWithType> | | -> | <xref:System.Drawing.Bitmap?displayProperty=nameWithType> | Starting in .NET Core 3.0 | -> | <xref:System.Drawing.Color?displayProperty=nameWithType> | | -> | <xref:System.Drawing.Icon?displayProperty=nameWithType> | Starting in .NET Core 3.0 | -> | <xref:System.Drawing.Image?displayProperty=nameWithType> | Starting in .NET Core 3.0 | -> | <xref:System.Drawing.Imaging.Metafile?displayProperty=nameWithType> | Starting in .NET Core 3.0 | -> | <xref:System.Drawing.Point?displayProperty=nameWithType> | | -> | <xref:System.Drawing.PointF?displayProperty=nameWithType> | | -> | <xref:System.Drawing.Rectangle?displayProperty=nameWithType> | | -> | <xref:System.Drawing.RectangleF?displayProperty=nameWithType> | | -> | <xref:System.Drawing.Size?displayProperty=nameWithType> | | -> | <xref:System.Drawing.SizeF?displayProperty=nameWithType> | | -> | <xref:System.DuplicateWaitObjectException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.EntryPointNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Enum?displayProperty=nameWithType> | | -> | <xref:System.EventArgs?displayProperty=nameWithType> | Starting in .NET Core 2.0.6. | -> | <xref:System.Exception?displayProperty=nameWithType> | | -> | <xref:System.ExecutionEngineException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.FieldAccessException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.FormatException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Globalization.CompareInfo?displayProperty=nameWithType> | | -> | <xref:System.Globalization.CultureNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Globalization.SortVersion?displayProperty=nameWithType> | | -> | <xref:System.Guid?displayProperty=nameWithType> | | -> | `System.IO.Compression.ZLibException` | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.DriveNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.EndOfStreamException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.FileFormatException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.FileLoadException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.FileNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.IOException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.InternalBufferOverflowException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.InvalidDataException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.IsolatedStorage.IsolatedStorageException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IO.PathTooLongException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.IndexOutOfRangeException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.InsufficientExecutionStackException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.InsufficientMemoryException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Int16?displayProperty=nameWithType> | | -> | <xref:System.Int32?displayProperty=nameWithType> | | -> | <xref:System.Int64?displayProperty=nameWithType> | | -> | <xref:System.IntPtr?displayProperty=nameWithType> | | -> | <xref:System.InvalidCastException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.InvalidOperationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.InvalidProgramException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.InvalidTimeZoneException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.MemberAccessException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.MethodAccessException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.MissingFieldException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.MissingMemberException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.MissingMethodException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.MulticastNotSupportedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.Cookie?displayProperty=nameWithType> | | -> | <xref:System.Net.CookieCollection?displayProperty=nameWithType> | | -> | <xref:System.Net.CookieContainer?displayProperty=nameWithType> | | -> | <xref:System.Net.CookieException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.HttpListenerException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.Mail.SmtpException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.Mail.SmtpFailedRecipientException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.Mail.SmtpFailedRecipientsException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.NetworkInformation.NetworkInformationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.NetworkInformation.PingException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.ProtocolViolationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.Sockets.SocketException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.WebException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Net.WebSockets.WebSocketException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.NotFiniteNumberException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.NotImplementedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.NotSupportedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.NullReferenceException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Nullable%601?displayProperty=nameWithType> | | -> | <xref:System.Numerics.BigInteger?displayProperty=nameWithType> | | -> | <xref:System.Numerics.Complex?displayProperty=nameWithType> | | -> | <xref:System.Object?displayProperty=nameWithType> | | -> | <xref:System.ObjectDisposedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.OperationCanceledException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.OutOfMemoryException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.OverflowException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.PlatformNotSupportedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.RankException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Reflection.AmbiguousMatchException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Reflection.CustomAttributeFormatException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Reflection.InvalidFilterCriteriaException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Reflection.ReflectionTypeLoadException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4.<br/>Serialization from .NET Framework to .NET Core is not supported. | -> | <xref:System.Reflection.TargetException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Reflection.TargetInvocationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Reflection.TargetParameterCountException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Resources.MissingManifestResourceException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Resources.MissingSatelliteAssemblyException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.CompilerServices.RuntimeWrappedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.InteropServices.COMException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.InteropServices.ExternalException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.InteropServices.InvalidComObjectException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.InteropServices.InvalidOleVariantTypeException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.InteropServices.MarshalDirectiveException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.InteropServices.SEHException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.InteropServices.SafeArrayRankMismatchException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.InteropServices.SafeArrayTypeMismatchException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.Serialization.InvalidDataContractException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Runtime.Serialization.SerializationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.SByte?displayProperty=nameWithType> | | -> | <xref:System.Security.AccessControl.PrivilegeNotHeldException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Security.Authentication.AuthenticationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Security.Authentication.InvalidCredentialException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Security.Cryptography.CryptographicException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Security.Cryptography.CryptographicUnexpectedOperationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | `System.Security.Cryptography.Xml.CryptoSignedXmlRecursionException` | Starting in .NET Core 2.0.4. | -> | <xref:System.Security.HostProtectionException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Security.Policy.PolicyException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Security.Principal.IdentityNotMappedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Security.SecurityException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4.<br/>Limited serialization data. | -> | <xref:System.Security.VerificationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Security.XmlSyntaxException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ServiceProcess.TimeoutException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Single?displayProperty=nameWithType> | | -> | <xref:System.StackOverflowException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.String?displayProperty=nameWithType> | | -> | <xref:System.StringComparer?displayProperty=nameWithType> | | -> | <xref:System.SystemException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Text.DecoderFallbackException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Text.EncoderFallbackException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Text.RegularExpressions.RegexMatchTimeoutException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Text.StringBuilder?displayProperty=nameWithType> | | -> | <xref:System.Threading.AbandonedMutexException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.BarrierPostPhaseException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.LockRecursionException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.SemaphoreFullException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.SynchronizationLockException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.Tasks.TaskCanceledException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.Tasks.TaskSchedulerException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.ThreadAbortException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.ThreadInterruptedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.ThreadStartException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.ThreadStateException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Threading.WaitHandleCannotBeOpenedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.TimeSpan?displayProperty=nameWithType> | | -> | <xref:System.TimeZoneInfo.AdjustmentRule?displayProperty=nameWithType> | | -> | <xref:System.TimeZoneInfo?displayProperty=nameWithType> | | -> | <xref:System.TimeZoneNotFoundException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.TimeoutException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Transactions.TransactionAbortedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Transactions.TransactionException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Transactions.TransactionInDoubtException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Transactions.TransactionManagerCommunicationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Transactions.TransactionPromotionException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Tuple?displayProperty=nameWithType> | | -> | <xref:System.TypeAccessException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.TypeInitializationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.TypeLoadException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.TypeUnloadedException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.UInt16?displayProperty=nameWithType> | | -> | <xref:System.UInt32?displayProperty=nameWithType> | | -> | <xref:System.UInt64?displayProperty=nameWithType> | | -> | <xref:System.UIntPtr?displayProperty=nameWithType> | | -> | <xref:System.UnauthorizedAccessException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Uri?displayProperty=nameWithType> | | -> | <xref:System.UriFormatException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.ValueTuple?displayProperty=nameWithType> | Not serializable in .NET Framework 4.7 and earlier versions. | -> | <xref:System.ValueType?displayProperty=nameWithType> | | -> | <xref:System.Version?displayProperty=nameWithType> | | -> | <xref:System.WeakReference%601?displayProperty=nameWithType> | | -> | <xref:System.WeakReference?displayProperty=nameWithType> | | -> | <xref:System.Xml.Schema.XmlSchemaException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Xml.Schema.XmlSchemaInferenceException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Xml.Schema.XmlSchemaValidationException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Xml.XPath.XPathException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Xml.XmlException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Xml.Xsl.XsltCompileException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | -> | <xref:System.Xml.Xsl.XsltException?displayProperty=nameWithType> | Starting in .NET Core 2.0.4. | - -## See also - -- <xref:System.Runtime.Serialization>\ -Contains classes that can be used for serializing and deserializing objects. - -- [XML and SOAP Serialization](xml-and-soap-serialization.md)\ -Describes the XML serialization mechanism that is included with the common language runtime. diff --git a/docs/standard/serialization/binaryformatter-event-source.md b/docs/standard/serialization/binaryformatter-event-source.md deleted file mode 100644 index 11855eba1c46f..0000000000000 --- a/docs/standard/serialization/binaryformatter-event-source.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: BinaryFormatter event source -description: Learn how to use the BinaryFormatter event source to log when serialization or deserialization is occurring. -ms.date: 12/03/2020 -ms.author: levib -author: GrabYourPitchforks -ms.topic: reference ---- -# BinaryFormatter event source - -Starting with .NET 5, <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter> includes a built-in <xref:System.Diagnostics.Tracing.EventSource> that gives you visibility into when an object serialization or deserialization is occurring. Apps can use <xref:System.Diagnostics.Tracing.EventListener>-derived types to listen for these notifications and log them. - -This functionality is not a substitute for a <xref:System.Runtime.Serialization.SerializationBinder> or an <xref:System.Runtime.Serialization.ISerializationSurrogate> and can't be used to modify the data being serialized or deserialized. Rather, this eventing system is intended to provide insight into the types being serialized or deserialized. It can also be used to detect unintended calls into the `BinaryFormatter` infrastructure, such as calls originating from third-party library code. - -## Description of events - -The `BinaryFormatter` event source has the well-known name `System.Runtime.Serialization.Formatters.Binary.BinaryFormatterEventSource`. Listeners can subscribe to six events. - -### SerializationStart event (id = `10`) - -Raised when <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize%2A?displayProperty=nameWithType> has been called and has started the serialization process. This event is paired with the `SerializationEnd` event. The `SerializationStart` event can be called recursively if an object calls `BinaryFormatter.Serialize` within its own serialization routine. - -This event doesn't contain a payload. - -### SerializationEnd event (id = `11`) - -Raised when `BinaryFormatter.Serialize` has completed its work. Each occurrence of `SerializationEnd` denotes the completion of the last unpaired `SerializationStart` event. - -This event doesn't contain a payload. - -### SerializingObject event (id = `12`) - -Raised when `BinaryFormatter.Serialize` is in the process of serializing a non-primitive type. The `BinaryFormatter` infrastructure special-cases certain types (such as `string` and `int`) and doesn't raise this event when these types are encountered. This event is raised for user-defined types and other types that `BinaryFormatter` doesn't natively understand. - -This event may be raised zero or more times between `SerializationStart` and `SerializationEnd` events. - -This event contains a payload with one argument: - -* `typeName` (`string`): The assembly-qualified name (see <xref:System.Type.AssemblyQualifiedName?displayProperty=nameWithType>) of the type being serialized. - -### DeserializationStart event (id = `20`) - -Raised when <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize%2A?displayProperty=nameWithType> has been called and has started the deserialization process. This event is paired with the `DeserializationEnd` event. The `DeserializationStart` event can be called recursively if an object calls `BinaryFormatter.Deserialize` within its own deserialization routine. - -This event doesn't contain a payload. - -### DeserializationEnd event (id = `21`) - -Raised when `BinaryFormatter.Deserialize` has completed its work. Each occurrence of `DeserializationEnd` denotes the completion of the last unpaired `DeserializationStart` event. - -This event doesn't contain a payload. - -### DeserializingObject event (id = `22`) - -Raised when `BinaryFormatter.Deserialize` is in the process of deserializing a non-primitive type. The `BinaryFormatter` infrastructure special-cases certain types (such as `string` and `int`) and doesn't raise this event when these types are encountered. This event is raised for user-defined types and other types that `BinaryFormatter` doesn't natively understand. - -This event may be raised zero or more times between `DeserializationStart` and `DeserializationEnd` events. - -This event contains a payload with one argument. - -* `typeName` (`string`): The assembly-qualified name (see <xref:System.Type.AssemblyQualifiedName?displayProperty=nameWithType>) of the type being deserialized. - -### \[Advanced\] Subscribing to a subset of notifications - -Listeners who wish to subscribe to only a subset of notifications can choose which keywords to enable. - -* `Serialization` = `(EventKeywords)1`: Raises the `SerializationStart`, `SerializationEnd`, and `SerializingObject` events. -* `Deserialization` = `(EventKeywords)2`: Raises the `DeserializationStart`, `DeserializationEnd`, and `DeserializingObject` events. - -If no keyword filters are provided during `EventListener` registration, all events are raised. - -For more information, see <xref:System.Diagnostics.Tracing.EventKeywords?displayProperty=nameWithType>. - -## Sample code - -The following code: - -- creates an `EventListener`-derived type that writes to `System.Console`, -- subscribes that listener to `BinaryFormatter`-produced notifications, -- serializes and deserializes a simple object graph using `BinaryFormatter`, and -- analyzes the events that have been raised. - -:::code language="csharp" source="snippets/binaryformatter-event-source/csharp/Program.cs"::: - -The preceding code produces output similar to the following example: - -```output -Event SerializationStart (id=10) received. -Event SerializingObject (id=12) received. -typeName = BinaryFormatterEventSample.Person, BinaryFormatterEventSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -Event SerializingObject (id=12) received. -typeName = BinaryFormatterEventSample.Book, BinaryFormatterEventSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -Event SerializationStop (id=11) received. -Event DeserializationStart (id=20) received. -Event DeserializingObject (id=22) received. -typeName = BinaryFormatterEventSample.Person, BinaryFormatterEventSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -Event DeserializingObject (id=22) received. -typeName = BinaryFormatterEventSample.Book, BinaryFormatterEventSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -Event DeserializationStop (id=21) received. -Rehydrated person Logan Edwards -Favorite book: A Tale of Two Cities by Charles Dickens, list price 10.25 -``` - -In this sample, the console-based `EventListener` logs that serialization starts, instances of `Person` and `Book` are serialized, and then serialization completes. Similarly, once deserialization has started, instances of `Person` and `Book` are deserialized, and then deserialization completes. - -The app then prints the values contained in the deserialized `Person` to demonstrate that the object did in fact serialize and deserialize properly. - -## See also - -For more information on using `EventListener` to receive `EventSource`-based notifications, see [the `EventListener` class](xref:System.Diagnostics.Tracing.EventListener). diff --git a/docs/standard/serialization/binaryformatter-security-guide.md b/docs/standard/serialization/binaryformatter-security-guide.md index 487216d95e864..06a7955083ef2 100644 --- a/docs/standard/serialization/binaryformatter-security-guide.md +++ b/docs/standard/serialization/binaryformatter-security-guide.md @@ -81,6 +81,7 @@ Another scenario is where the data file is stored in cloud storage and automatic ## See also +* [Binary serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization) * [YSoSerial.Net](https://github.com/pwntester/ysoserial.net) for research into how adversaries attack apps that utilize `BinaryFormatter`. * General background on deserialization vulnerabilities: * [OWASP: Deserialization of Untrusted Data](https://owasp.org/www-community/vulnerabilities/Deserialization_of_untrusted_data) diff --git a/docs/standard/serialization/custom-serialization.md b/docs/standard/serialization/custom-serialization.md deleted file mode 100644 index 5c47b69c38bdf..0000000000000 --- a/docs/standard/serialization/custom-serialization.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: "Custom binary serialization" -description: Custom serialization is controlling the serialization and deserialization of a type. Controlling serialization can ensure serialization compatibility. -ms.date: 04/21/2022 -dev_langs: - - "csharp" - - "vb" -helpviewer_keywords: - - "binary serialization, custom serialization" - - "custom serialization" - - "binary serialization, controlling" - - "OptionalFieldAttribute class, custom serialization" - - "ISerializable interface, custom serialization" - - "OnDeserializingAttribute class, custom serialization" - - "OnSerializedAttribute class, custom serialization" - - "serialization, custom serialization" - - "serialization, controlling" - - "OnDeserializedAttribute class, custom serialization" - - "OnSerializingAttribute class, custom serialization" -ms.assetid: 12ed422d-5280-49b8-9b71-a2ed129c0384 ---- -# Custom binary serialization - -Custom serialization is the process of controlling the serialization and deserialization of a type. By controlling serialization, it's possible to ensure serialization compatibility, which is the ability to serialize and deserialize between versions of a type without breaking the core functionality of the type. For example, in the first version of a type, there may be only two fields. In the next version of a type, several more fields are added. Yet the second version of an application must be able to serialize and deserialize both types. The following sections describe how to control serialization. - -[!INCLUDE [binary-serialization-warning](../../../includes/binary-serialization-warning.md)] - -> [!IMPORTANT] -> In versions previous to .NET Framework 4.0, serialization of custom user data in a partially trusted assembly was accomplished using `GetObjectData`. In .NET Framework versions 4.0 - 4.8, that method is marked with the <xref:System.Security.SecurityCriticalAttribute> attribute, which prevents execution in partially trusted assemblies. To work around this condition, implement the <xref:System.Runtime.Serialization.ISafeSerializationData> interface. - -## Run custom methods during and after serialization - -The recommended way to run custom methods during and after binary serialization is to apply the following attributes to methods that are used to correct data during and after serialization: - -- <xref:System.Runtime.Serialization.OnDeserializedAttribute> - -- <xref:System.Runtime.Serialization.OnDeserializingAttribute> - -- <xref:System.Runtime.Serialization.OnSerializedAttribute> - -- <xref:System.Runtime.Serialization.OnSerializingAttribute> - - These attributes allow the type to participate in any one of, or all four of the phases, of the serialization and deserialization processes. The attributes specify the methods of the type that should be invoked during each phase. The methods do not access the serialization stream but instead allow you to alter the object before and after serialization, or before and after deserialization. The attributes can be applied at all levels of the type inheritance hierarchy, and each method is called in the hierarchy from the base to the most derived. This mechanism avoids the complexity and any resulting issues of implementing the <xref:System.Runtime.Serialization.ISerializable> interface by giving the responsibility for serialization and deserialization to the most derived implementation. Additionally, this mechanism allows the formatters to ignore the population of fields and retrieval from the serialization stream. For details and examples of controlling serialization and deserialization, click any of the previous links. - - In addition, when adding a new field to an existing serializable type, apply the <xref:System.Runtime.Serialization.OptionalFieldAttribute> attribute to the field. The <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter> and the <xref:System.Runtime.Serialization.Formatters.Soap.SoapFormatter> ignores the absence of the field when a stream that is missing the new field is processed. - -## Implement the ISerializable interface - - The other way to control binary serialization is to implement the <xref:System.Runtime.Serialization.ISerializable> interface on an object. Note, however, that the method in the previous section supersedes this method to control serialization. - - In addition, you should not use default serialization on a class that is marked with the [Serializable](xref:System.SerializableAttribute) attribute and has declarative or imperative security at the class level or on its constructors. Instead, these classes should always implement the <xref:System.Runtime.Serialization.ISerializable> interface. - - Implementing <xref:System.Runtime.Serialization.ISerializable> involves implementing the `GetObjectData` method and a special constructor that's used when the object is deserialized. The following sample code shows how to implement <xref:System.Runtime.Serialization.ISerializable> on the `MyObject` class from a previous section. - -```csharp -[Serializable] -public class MyObject : ISerializable -{ - public int n1; - public int n2; - public String str; - - public MyObject() - { - } - - protected MyObject(SerializationInfo info, StreamingContext context) - { - n1 = info.GetInt32("i"); - n2 = info.GetInt32("j"); - str = info.GetString("k"); - } - - public virtual void GetObjectData(SerializationInfo info, StreamingContext context) - { - info.AddValue("i", n1); - info.AddValue("j", n2); - info.AddValue("k", str); - } -} -``` - -```vb -<Serializable()> _ -Public Class MyObject - Implements ISerializable - Public n1 As Integer - Public n2 As Integer - Public str As String - - Public Sub New() - End Sub - - Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext) - n1 = info.GetInt32("i") - n2 = info.GetInt32("j") - str = info.GetString("k") - End Sub 'New - - Public Overridable Sub GetObjectData(ByVal info As SerializationInfo, ByVal context As StreamingContext) - info.AddValue("i", n1) - info.AddValue("j", n2) - info.AddValue("k", str) - End Sub -End Class -``` - - When `GetObjectData` is called during serialization, you are responsible for populating the <xref:System.Runtime.Serialization.SerializationInfo> provided with the method call. Add the variables to be serialized as name and value pairs. Any text can be used as the name. You have the freedom to decide which member variables are added to the <xref:System.Runtime.Serialization.SerializationInfo>, provided that sufficient data is serialized to restore the object during deserialization. Derived classes should call the `GetObjectData` method on the base object if the latter implements <xref:System.Runtime.Serialization.ISerializable>. - - It's important to stress that when <xref:System.Runtime.Serialization.ISerializable> is added to a class, you must implement both `GetObjectData` and the special constructor. The compiler warns you if `GetObjectData` is missing. However, because it is impossible to enforce the implementation of a constructor, no warning is provided if the constructor is absent, and an exception is thrown when an attempt is made to deserialize a class without the constructor. - - The current design was favored above a <xref:System.Runtime.Serialization.ISerializationSurrogate.SetObjectData%2A> method to get around potential security and versioning problems. For example, a `SetObjectData` method must be public if it is defined as part of an interface; thus users must write code to defend against having the `SetObjectData` method called multiple times. Otherwise, a malicious application that calls the `SetObjectData` method on an object in the process of executing an operation can cause potential problems. - - During deserialization, <xref:System.Runtime.Serialization.SerializationInfo> is passed to the class using the constructor provided for this purpose. Any visibility constraints placed on the constructor are ignored when the object is deserialized; so you can mark the class as public, protected, internal, or private. However, it is a best practice to make the constructor protected unless the class is sealed, in which case the constructor should be marked private. The constructor should also perform thorough input validation. - - To restore the state of the object, simply retrieve the values of the variables from <xref:System.Runtime.Serialization.SerializationInfo> using the names used during serialization. If the base class implements <xref:System.Runtime.Serialization.ISerializable>, the base constructor should be called to allow the base object to restore its variables. - - When you derive a new class from one that implements <xref:System.Runtime.Serialization.ISerializable>, the derived class must implement both the constructor as well as the `GetObjectData` method if it has variables that need to be serialized. The following code example shows how this is done using the `MyObject` class shown previously. - -```csharp -[Serializable] -public class ObjectTwo : MyObject -{ - public int num; - - public ObjectTwo() - : base() - { - } - - protected ObjectTwo(SerializationInfo si, StreamingContext context) - : base(si, context) - { - num = si.GetInt32("num"); - } - - public override void GetObjectData(SerializationInfo si, StreamingContext context) - { - base.GetObjectData(si,context); - si.AddValue("num", num); - } -} -``` - -```vb -<Serializable()> _ -Public Class ObjectTwo - Inherits MyObject - Public num As Integer - - Public Sub New() - - End Sub - - Protected Sub New(ByVal si As SerializationInfo, _ - ByVal context As StreamingContext) - MyBase.New(si, context) - num = si.GetInt32("num") - End Sub - - Public Overrides Sub GetObjectData(ByVal si As SerializationInfo, ByVal context As StreamingContext) - MyBase.GetObjectData(si, context) - si.AddValue("num", num) - End Sub -End Class -``` - - Don't forget to call the base class in the deserialization constructor. If this isn't done, the constructor on the base class is never called, and the object is not fully constructed after deserialization. - - Objects are reconstructed from the inside out; and calling methods during deserialization can have undesirable side effects, because the methods called might refer to object references that have not been deserialized by the time the call is made. If the class being deserialized implements the <xref:System.Runtime.Serialization.IDeserializationCallback>, the <xref:System.Runtime.Serialization.IDeserializationCallback.OnDeserialization%2A> method is automatically called when the entire object graph has been deserialized. At this point, all the child objects referenced have been fully restored. A hash table is a typical example of a class that is difficult to deserialize without using the event listener. It is easy to retrieve the key and value pairs during deserialization, but adding these objects back to the hash table can cause problems, because there is no guarantee that classes that derived from the hash table have been deserialized. Calling methods on a hash table at this stage is therefore not advisable. - -## See also - -- [Binary Serialization](binary-serialization.md) -- [XML and SOAP Serialization](xml-and-soap-serialization.md) diff --git a/docs/standard/serialization/examples-of-xml-serialization.md b/docs/standard/serialization/examples-of-xml-serialization.md index 41a321e63f8de..6cd148d2edd2d 100644 --- a/docs/standard/serialization/examples-of-xml-serialization.md +++ b/docs/standard/serialization/examples-of-xml-serialization.md @@ -48,7 +48,8 @@ End Sub ``` ```csharp -private void SerializeDataSet(string filename){ +private void SerializeDataSet(string filename) +{ XmlSerializer ser = new XmlSerializer(typeof(DataSet)); // Creates a DataSet; adds a table, column, and ten rows. @@ -58,11 +59,13 @@ private void SerializeDataSet(string filename){ t.Columns.Add(c); ds.Tables.Add(t); DataRow r; - for(int i = 0; i<10;i++){ + + for (int i = 0; i < 10; i++) { r = t.NewRow(); r[0] = "Thing " + i; t.Rows.Add(r); } + TextWriter writer = new StreamWriter(filename); ser.Serialize(writer, ds); writer.Close(); @@ -97,19 +100,20 @@ End Sub ``` ```csharp -private void SerializeElement(string filename){ +private void SerializeElement(string filename) +{ XmlSerializer ser = new XmlSerializer(typeof(XmlElement)); - XmlElement myElement= - new XmlDocument().CreateElement("MyElement", "ns"); + XmlElement myElement = new XmlDocument().CreateElement("MyElement", "ns"); myElement.InnerText = "Hello World"; TextWriter writer = new StreamWriter(filename); ser.Serialize(writer, myElement); writer.Close(); } -private void SerializeNode(string filename){ +private void SerializeNode(string filename) +{ XmlSerializer ser = new XmlSerializer(typeof(XmlNode)); - XmlNode myNode= new XmlDocument(). + XmlNode myNode = new XmlDocument(). CreateNode(XmlNodeType.Element, "MyNode", "ns"); myNode.InnerText = "Hello Node"; TextWriter writer = new StreamWriter(filename); @@ -137,7 +141,8 @@ public class PurchaseOrder { public Address MyAddress; } -public class Address + +public record Address { public string FirstName; } @@ -301,13 +306,16 @@ using System.Collections; using System.IO; using System.Xml.Serialization; -public class Test { - static void Main(){ +public class Test +{ + static void Main() + { Test t = new Test(); t.SerializeCollection("coll.xml"); } - private void SerializeCollection(string filename){ + private void SerializeCollection(string filename) + { Employees Emps = new Employees(); // Note that only the collection is serialized -- not the // CollectionName or any other public property of the class. @@ -319,40 +327,42 @@ public class Test { x.Serialize(writer, Emps); } } -public class Employees:ICollection { + +public class Employees : ICollection +{ public string CollectionName; private ArrayList empArray = new ArrayList(); - public Employee this[int index]{ - get{return (Employee) empArray[index];} - } + public Employee this[int index] => (Employee) empArray[index]; - public void CopyTo(Array a, int index){ + public void CopyTo(Array a, int index) + { empArray.CopyTo(a, index); } - public int Count{ - get{return empArray.Count;} - } - public object SyncRoot{ - get{return this;} - } - public bool IsSynchronized{ - get{return false;} - } - public IEnumerator GetEnumerator(){ - return empArray.GetEnumerator(); - } - - public void Add(Employee newEmployee){ + + public int Count => empArray.Count; + + public object SyncRoot => this; + + public bool IsSynchronized => false; + + public IEnumerator GetEnumerator() => empArray.GetEnumerator(); + + public void Add(Employee newEmployee) + { empArray.Add(newEmployee); } } -public class Employee { +public class Employee +{ public string EmpName; public string EmpID; - public Employee(){} - public Employee(string empName, string empID){ + + public Employee() {} + + public Employee(string empName, string empID) + { EmpName = empName; EmpID = empID; } @@ -631,10 +641,9 @@ public class Test { // Creates an instance of the XmlSerializer class; // specifies the type of object to serialize. - XmlSerializer serializer = - new XmlSerializer(typeof(PurchaseOrder)); + XmlSerializer serializer = new XmlSerializer(typeof(PurchaseOrder)); TextWriter writer = new StreamWriter(filename); - PurchaseOrder po=new PurchaseOrder(); + PurchaseOrder po =new PurchaseOrder(); // Creates an address to ship and bill to. Address billAddress = new Address(); diff --git a/docs/standard/serialization/how-to-chunk-serialized-data.md b/docs/standard/serialization/how-to-chunk-serialized-data.md index 1a4e9a29df878..55d9ba84457ba 100644 --- a/docs/standard/serialization/how-to-chunk-serialized-data.md +++ b/docs/standard/serialization/how-to-chunk-serialized-data.md @@ -56,4 +56,4 @@ The following code example shows the Web method on the client that turns off ASP ## See also -- [Custom Serialization](custom-serialization.md) +- [Custom Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/custom-serialization) diff --git a/docs/standard/serialization/index.md b/docs/standard/serialization/index.md index 8a368cec4491d..07fb8dda008be 100644 --- a/docs/standard/serialization/index.md +++ b/docs/standard/serialization/index.md @@ -2,7 +2,7 @@ title: "Serialization - .NET" description: This article provides information about .NET serialization technologies, including binary serialization, XML and SOAP serialization, and JSON serialization. ms.date: "09/02/2019" -helpviewer_keywords: +helpviewer_keywords: - "JSON serialization" - "XML serialization, defined" - "binary serialization" @@ -14,15 +14,17 @@ ms.assetid: 4d1111c0-9447-4231-a997-96a2b74b3453 # Serialization in .NET -Serialization is the process of converting the state of an object into a form that can be persisted or transported. The complement of serialization is deserialization, which converts a stream into an object. Together, these processes allow data to be stored and transferred. - -.NET features the following serialization technologies: - +Serialization is the process of converting the state of an object into a form that can be persisted or transported. The complement of serialization is deserialization, which converts a stream into an object. Together, these processes allow data to be stored and transferred. + +.NET features the following serialization technologies: + - [JSON serialization](system-text-json/overview.md) serializes only public properties and does not preserve type fidelity. JSON is an open standard that is an attractive choice for sharing data across the web. - -- [Binary serialization](binary-serialization.md) preserves *type fidelity*, which means that the complete state of the object is recorded and when you deserialize, an exact copy is created. This type of serialization is useful for preserving the state of an object between different invocations of an application. For example, you can share an object between different applications by serializing it to the Clipboard. You can serialize an object to a stream, to a disk, to memory, over the network, and so forth. Remoting uses serialization to pass objects "by value" from one computer or application domain to another. - -- [XML and SOAP serialization](xml-and-soap-serialization.md) serializes only `public` properties and fields and does not preserve type fidelity. This is useful when you want to provide or consume data without restricting the application that uses the data. Because XML is an open standard, it is an attractive choice for sharing data across the Web. SOAP is likewise an open standard, which makes it an attractive choice. + +- [XML and SOAP serialization](xml-and-soap-serialization.md) serializes only `public` properties and fields and does not preserve type fidelity. This is useful when you want to provide or consume data without restricting the application that uses the data. Because XML is an open standard, it is an attractive choice for sharing data across the Web. SOAP is likewise an open standard, which makes it an attractive choice. + +- [Binary serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization) preserves *type fidelity*, which means that the complete state of the object is recorded and when you deserialize, an exact copy is created. This type of serialization is useful for preserving the state of an object between different invocations of an application. For example, you can share an object between different applications by serializing it to the Clipboard. You can serialize an object to a stream, to a disk, to memory, over the network, and so forth. Remoting uses serialization to pass objects "by value" from one computer or application domain to another. + + [!INCLUDE [binary-serialization-warning](../../../includes/binary-serialization-warning.md)] ## Reference @@ -31,6 +33,6 @@ Contains classes that can be used to serialize objects into JSON format document <xref:System.Runtime.Serialization>\ Contains classes that can be used for serializing and deserializing objects. - + <xref:System.Xml.Serialization>\ Contains classes that can be used to serialize objects into XML format documents or streams. diff --git a/docs/standard/serialization/introducing-xml-serialization.md b/docs/standard/serialization/introducing-xml-serialization.md index aacd9aaad2d54..8353f01fc0458 100644 --- a/docs/standard/serialization/introducing-xml-serialization.md +++ b/docs/standard/serialization/introducing-xml-serialization.md @@ -176,7 +176,7 @@ For a complete list of type mappings, see the **DataType** property for any of t - <xref:System.Runtime.Serialization.DataContractSerializer> - <xref:System.IO.FileStream> - [XML and SOAP Serialization](xml-and-soap-serialization.md) -- [Binary Serialization](binary-serialization.md) +- [Binary Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization) - [Serialization](index.md) - <xref:System.Xml.Serialization.XmlSerializer> - [Examples of XML Serialization](examples-of-xml-serialization.md) diff --git a/docs/standard/serialization/selective-serialization.md b/docs/standard/serialization/selective-serialization.md deleted file mode 100644 index cff049993222d..0000000000000 --- a/docs/standard/serialization/selective-serialization.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "Selective binary serialization" -description: This article shows you how to mark fields with the NonSerialized attribute, which prevents that field from being binary serialized. -ms.date: "08/07/2017" -dev_langs: - - "CSharp" -helpviewer_keywords: - - "serialization, selective serialization" - - "binary serialization, selective serialization" -ms.topic: how-to ---- -# Selective binary serialization - -A class often contains fields that shouldn't be serialized using binary serialization. For example, assume a class stores a thread ID in a member variable. When the class is deserialized, the thread stored the ID for when the class was serialized might no longer be running; so serializing this value doesn't make sense. You can prevent member variables from being serialized by marking them with the [NonSerialized](xref:System.NonSerializedAttribute) attribute as follows. - -```csharp -[Serializable] -public class MyObject -{ - public int n1; - [NonSerialized] public int n2; - public String str; -} -``` - -If possible, make an object that could contain security-sensitive data nonserializable. If the object must be serialized, apply the `NonSerialized` attribute to specific fields that store sensitive data. If you don't exclude these fields from serialization, be aware that the data they store are exposed to any code that has permission to serialize. For more information about writing secure serialization code, see [Security and Serialization](/previous-versions/dotnet/framework/code-access-security/security-and-serialization). - -[!INCLUDE [binary-serialization-warning](../../../includes/binary-serialization-warning.md)] - -## See also - -- [Binary Serialization](binary-serialization.md) -- [XML and SOAP Serialization](xml-and-soap-serialization.md) diff --git a/docs/standard/serialization/serialization-concepts.md b/docs/standard/serialization/serialization-concepts.md deleted file mode 100644 index d8516a93a886d..0000000000000 --- a/docs/standard/serialization/serialization-concepts.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "Serialization concepts" -description: Serialization can be used to capture the state of an object so a copy can be created or to send an object by value from one application domain to another. -ms.date: "08/07/2017" -ms.assetid: e1ff4740-20a1-4c76-a8ad-d857db307054 ---- -# Serialization concepts - -Why would you want to use serialization? The two most important reasons are to persist the state of an object to a storage medium so an exact copy can be re-created at a later stage, and to send the object by value from one application domain to another. For example, serialization is used to save session state in ASP.NET and to copy objects to the Clipboard in Windows Forms. It is also used by remoting to pass objects by value from one application domain to another. - -[!INCLUDE [binary-serialization-warning](../../../includes/binary-serialization-warning.md)] - -## Persistent storage - -It is often necessary to store the value of the fields of an object to disk and then, later, retrieve this data. Although this is easy to achieve without relying on serialization, this approach is often cumbersome and error prone, and becomes progressively more complex when you need to track a hierarchy of objects. Imagine writing a large business application, that contains thousands of objects, and having to write code to save and restore the fields and properties to and from disk for each object. Serialization provides a convenient mechanism for achieving this objective. - -The common language runtime manages how objects are stored in memory and provides an automated serialization mechanism by using [reflection](../../framework/reflection-and-codedom/reflection.md). When an object is serialized, the name of the class, the assembly, and all the data members of the class instance are written to storage. Objects often store references to other instances in member variables. When the class is serialized, the serialization engine tracks referenced objects, already serialized, to ensure that the same object is not serialized more than once. The serialization architecture provided by .NET correctly handles object graphs and circular references automatically. The only requirement placed on object graphs is that all objects, referenced by the serialized object, must also be marked as `Serializable` (for more information, see [Basic Serialization](basic-serialization.md)). If this is not done, an exception will be thrown when the serializer attempts to serialize the unmarked object. - -When the serialized class is deserialized, the class is recreated and the values of all the data members are automatically restored. - -## Marshal by value - -Objects are valid only in the application domain where they are created. Any attempt to pass the object as a parameter or return it as a result will fail unless the object derives from `MarshalByRefObject` or is marked as `Serializable`. If the object is marked as `Serializable`, the object will automatically be serialized, transported from the one application domain to the other, and then deserialized to produce an exact copy of the object in the second application domain. This process is typically referred to as marshal-by-value. - -When an object derives from `MarshalByRefObject`, an object reference is passed from one application domain to another, rather than the object itself. You can also mark an object that derives from `MarshalByRefObject` as `Serializable`. When this object is used with remoting, the formatter responsible for serialization, which has been preconfigured with a surrogate selector (`SurrogateSelector`), takes control of the serialization process, and replaces all objects derived from `MarshalByRefObject` with a proxy. Without the `SurrogateSelector` in place, the serialization architecture follows the standard serialization rules described in [Steps in the Serialization Process](steps-in-the-serialization-process.md). - -## Related sections - - [Binary Serialization](binary-serialization.md) - Describes the binary serialization mechanism that is included with the common language runtime. - - [XML and SOAP Serialization](xml-and-soap-serialization.md) - Describes the XML and SOAP serialization mechanism that is included with the common language runtime. diff --git a/docs/standard/serialization/serialization-guidelines.md b/docs/standard/serialization/serialization-guidelines.md deleted file mode 100644 index d539e0ccf47ab..0000000000000 --- a/docs/standard/serialization/serialization-guidelines.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: "Serialization guidelines" -description: This document provides guidelines to consider when designing an API to be serialized and a summary of the different serialization technologies .NET offers. -ms.date: 11/15/2022 -dev_langs: - - "csharp" - - "vb" -helpviewer_keywords: - - "serialization, guidelines" - - "binary serialization, guidelines" -ms.assetid: ebbeddff-179d-443f-bf08-9c373199a73a ---- -# Serialization guidelines - -This article lists the guidelines to consider when designing an API to be serialized. - -[!INCLUDE [binary-serialization-warning](../../../includes/binary-serialization-warning.md)] - - .NET offers the following serialization technologies that are optimized for various serialization scenarios. The following table lists these technologies and the main .NET types related to these technologies. - -| Technology | Relevant classes | Notes | -|------------|------------------|-------| -| JSON serialization | <xref:System.Text.Json.JsonSerializer> | Introduced in .NET Core 3.0, this is the modern way to serialize to and from JSON. For more information, see [JSON serialization and deserialization](system-text-json/overview.md). | -| Data contract serialization |<xref:System.Runtime.Serialization.DataContractAttribute><br /><xref:System.Runtime.Serialization.DataMemberAttribute><br /><xref:System.Runtime.Serialization.DataContractSerializer><br /><xref:System.Runtime.Serialization.NetDataContractSerializer><br /><xref:System.Runtime.Serialization.Json.DataContractJsonSerializer><br /><xref:System.Runtime.Serialization.ISerializable>|General persistence<br />Web Services<br />JSON| -| XML serialization |<xref:System.Xml.Serialization.XmlSerializer>|XML format <br />with full control| -| Runtime serialization (binary and SOAP) |<xref:System.SerializableAttribute><br /><xref:System.Runtime.Serialization.ISerializable><br /><xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter><br /><xref:System.Runtime.Serialization.Formatters.Soap.SoapFormatter>| .NET Remoting<br />**Warning**: Binary serialization can be dangerous. For more information, see [BinaryFormatter security guide](binaryformatter-security-guide.md). | - - When you design new types, you should decide which, if any, of these technologies those types need to support. The following guidelines describe how to make that choice and how to provide such support. These guidelines are not meant to help you choose which serialization technology you should use in the implementation of your application or library. Such guidelines are not directly related to API design and thus are not within the scope of this topic. - -## Guidelines - -- DO think about serialization when you design new types. - - Serialization is an important design consideration for any type, because programs might need to persist or transmit instances of the type. - -### Choosing the right serialization technology to support - - Any given type can support none, one, or more of the serialization technologies. - -- CONSIDER supporting *data contract serialization* if instances of your type might need to be persisted or used in Web Services. - -- CONSIDER supporting the *XML serialization* instead of or in addition to data contract serialization if you need more control over the XML format that is produced when the type is serialized. - - This may be necessary in some interoperability scenarios where you need to use an XML construct that is not supported by data contract serialization, for example, to produce XML attributes. - -- CONSIDER supporting *runtime serialization* if instances of your type need to travel across .NET Remoting boundaries. - -- AVOID supporting runtime serialization or XML serialization just for general persistence reasons. Prefer data contract serialization instead - -#### Data contract serialization - - Types can support data contract serialization by applying the <xref:System.Runtime.Serialization.DataContractAttribute> to the type and the <xref:System.Runtime.Serialization.DataMemberAttribute> to the members (fields and properties) of the type. - - [!code-csharp[SerializationGuidelines#1](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#1)] - [!code-vb[SerializationGuidelines#1](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#1)] - -1. CONSIDER marking data members of your type public if the type can be used in partial trust. In full trust, data contract serializers can serialize and deserialize nonpublic types and members, but only public members can be serialized and deserialized in partial trust. - -2. DO implement a getter and setter on all properties that have Data-MemberAttribute. Data contract serializers require both the getter and the setter for the type to be considered serializable. If the type won't be used in partial trust, one or both of the property accessors can be nonpublic. - - [!code-csharp[SerializationGuidelines#2](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#2)] - [!code-vb[SerializationGuidelines#2](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#2)] - -3. CONSIDER using the serialization callbacks for initialization of deserialized instances. - - Constructors are not called when objects are deserialized. Therefore, any logic that executes during normal construction needs to be implemented as one of the *serialization callbacks*. - - [!code-csharp[SerializationGuidelines#3](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#3)] - [!code-vb[SerializationGuidelines#3](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#3)] - - The <xref:System.Runtime.Serialization.OnDeserializedAttribute> attribute is the most commonly used callback attribute. The other attributes in the family are <xref:System.Runtime.Serialization.OnDeserializingAttribute>, - <xref:System.Runtime.Serialization.OnSerializingAttribute>, and <xref:System.Runtime.Serialization.OnSerializedAttribute>. They can be used to mark callbacks that get executed before deserialization, before serialization, and finally, after serialization, respectively. - -4. CONSIDER using the <xref:System.Runtime.Serialization.KnownTypeAttribute> to indicate concrete types that should be used when deserializing a complex object graph. - - For example, if a type of a deserialized data member is represented by an abstract class, the serializer will need the *known type* information to decide what concrete type to instantiate and assign to the member. If the known type is not specified using the attribute, it will need to be passed to the serializer explicitly (you can do it by passing known types to the serializer constructor) or it will need to be specified in the configuration file. - - [!code-csharp[SerializationGuidelines#4](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#4)] - [!code-vb[SerializationGuidelines#4](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#4)] - - In cases where the list of known types is not known statically (when the **Person** class is compiled), the **KnownTypeAttribute** can also point to a method that returns a list of known types at run time. - -5. DO consider backward and forward compatibility when creating or changing serializable types. - - Keep in mind that serialized streams of future versions of your type can be deserialized into the current version of the type, and vice versa. Make sure you understand that data members, even private and internal, cannot change their names, types, or even their order in future versions of the type unless special care is taken to preserve the contract using explicit parameters to the data contract attributes.Test compatibility of serialization when making changes to serializable types. Try deserializing the new version into an old version, and vice versa. - -6. CONSIDER implementing <xref:System.Runtime.Serialization.IExtensibleDataObject> interface to allow round-tripping between different versions of the type. - - The interface allows the serializer to ensure that no data is lost during round-tripping. The <xref:System.Runtime.Serialization.IExtensibleDataObject.ExtensionData%2A> property stores any data from the future version of the type that is unknown to the current version. When the current version is subsequently serialized and deserialized into a future version, the additional data will be available in the serialized stream through the **ExtensionData** property value. - - [!code-csharp[SerializationGuidelines#5](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#5)] - [!code-vb[SerializationGuidelines#5](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#5)] - - For more information, see [Forward-Compatible Data Contracts](../../framework/wcf/feature-details/forward-compatible-data-contracts.md). - -#### XML serialization - - Data contract serialization is the main (default) serialization technology in .NET Framework, but there are serialization scenarios that data contract serialization does not support. For example, it does not give you full control over the shape of XML produced or consumed by the serializer. If such fine control is required, *XML serialization* has to be used, and you need to design your types to support this serialization technology. - -1. AVOID designing your types specifically for XML Serialization, unless you have a very strong reason to control the shape of the XML produced. This serialization technology has been superseded by the Data Contract Serialization discussed in the previous section. - - In other words, don't apply attributes from the <xref:System.Xml.Serialization> namespace to new types, unless you know that the type will be used with XML Serialization. The following example shows how **System.Xml.Serialization** can be used to control the shape of the XML -produced. - - [!code-csharp[SerializationGuidelines#6](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#6)] - [!code-vb[SerializationGuidelines#6](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#6)] - -2. CONSIDER implementing the <xref:System.Xml.Serialization.IXmlSerializable> interface if you want even more control over the shape of the serialized XML than what's offered by applying the XML Serialization attributes. Two methods of the interface, <xref:System.Xml.Serialization.IXmlSerializable.ReadXml%2A> and <xref:System.Xml.Serialization.IXmlSerializable.WriteXml%2A>, allow you to fully control the serialized XML stream. You can also control the XML schema that gets generated for the type by applying the <xref:System.Xml.Serialization.XmlSchemaProviderAttribute> attribute. - -#### Runtime serialization - - *Runtime serialization* is a technology used by .NET Remoting. If you think your types will be transported using .NET Remoting, make sure they support runtime serialization. - - The basic support for *runtime serialization* can be provided by applying the <xref:System.SerializableAttribute> attribute, and more advanced scenarios involve implementing a simple *runtime serializable pattern* (implement -<xref:System.Runtime.Serialization.ISerializable> and provide a serialization constructor). - -1. CONSIDER supporting runtime serialization if your types will be used with .NET Remoting. For example, the <xref:System.AddIn> namespace uses .NET Remoting, and so all types exchanged between **System.AddIn** add-ins need to support runtime serialization. - - [!code-csharp[SerializationGuidelines#7](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#7)] - [!code-vb[SerializationGuidelines#7](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#7)] - -2. CONSIDER implementing the *runtime serializable pattern* if you want complete control over the serialization process. For example, if you want to transform data as it gets serialized or deserialized. - - The pattern is very simple. All you need to do is implement the <xref:System.Runtime.Serialization.ISerializable> interface and provide a special constructor that is used when the object is deserialized. - - [!code-csharp[SerializationGuidelines#8](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#8)] - [!code-vb[SerializationGuidelines#8](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#8)] - -3. DO make the serialization constructor protected and provide two parameters typed and named exactly as shown in the sample here. - - [!code-csharp[SerializationGuidelines#9](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#9)] - [!code-vb[SerializationGuidelines#9](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#9)] - -4. DO implement the ISerializable members explicitly. - - [!code-csharp[SerializationGuidelines#10](../../../samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs#10)] - [!code-vb[SerializationGuidelines#10](../../../samples/snippets/visualbasic/VS_Snippets_CFX/serializationguidelines/vb/source.vb#10)] - -## See also - -- [Using Data Contracts](../../framework/wcf/feature-details/using-data-contracts.md) -- [Data Contract Serializer](../../framework/wcf/feature-details/data-contract-serializer.md) -- [Types Supported by the Data Contract Serializer](../../framework/wcf/feature-details/types-supported-by-the-data-contract-serializer.md) -- [Binary Serialization](binary-serialization.md) -- [.NET Remoting](/previous-versions/dotnet/netframework-4.0/72x4h507(v=vs.100)) -- [XML and SOAP Serialization](xml-and-soap-serialization.md) diff --git a/docs/standard/serialization/steps-in-the-serialization-process.md b/docs/standard/serialization/steps-in-the-serialization-process.md deleted file mode 100644 index 7972c0360624d..0000000000000 --- a/docs/standard/serialization/steps-in-the-serialization-process.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Steps in the binary serialization process" -description: The binary serialization process begins when the Serialize method is called on a formatter. This article describes the sequence of events. -ms.date: "08/07/2017" -helpviewer_keywords: - - "binary serialization, steps" - - "serialization, steps" -ms.assetid: 4bcbc883-2a91-418f-b968-6c86a25e9737 ---- -# Steps in the binary serialization process - -When the <xref:System.Runtime.Serialization.Formatter.Serialize%2A> method is called on a [formatter](xref:System.Runtime.Serialization.Formatter), object serialization proceeds according to the following sequence of rules: - -- A check is made to determine whether the formatter has a surrogate selector. If the formatter does, check whether the surrogate selector handles objects of the given type. If the selector handles the object type, <xref:System.Runtime.Serialization.ISerializable.GetObjectData%2A?displayProperty=nameWithType> is called on the surrogate selector. - -- If there is no surrogate selector or if it does not handle the object type, a check is made to determine whether the object is marked with the [Serializable](xref:System.SerializableAttribute) attribute. If the object is not, a <xref:System.Runtime.Serialization.SerializationException> is thrown. - -- If the object is marked appropriately, check whether the object implements the <xref:System.Runtime.Serialization.ISerializable> interface. If the object does, <xref:System.Runtime.Serialization.ISerializable.GetObjectData%2A> is called on the object. - -- If the object does not implement <xref:System.Runtime.Serialization.ISerializable>, the default serialization policy is used, serializing all fields not marked as [NonSerialized](xref:System.NonSerializedAttribute). - -[!INCLUDE [binary-serialization-warning](../../../includes/binary-serialization-warning.md)] - -## See also - -- [Binary Serialization](binary-serialization.md) -- [XML and SOAP Serialization](xml-and-soap-serialization.md) diff --git a/docs/standard/serialization/system-text-json/how-to.md b/docs/standard/serialization/system-text-json/how-to.md index 7037e7d5f9146..dd691b4ff3a2e 100644 --- a/docs/standard/serialization/system-text-json/how-to.md +++ b/docs/standard/serialization/system-text-json/how-to.md @@ -4,7 +4,7 @@ description: "Learn how to use the System.Text.Json namespace to serialize to an ms.date: 01/04/2023 ms.custom: contperf-fy21q2 no-loc: [System.Text.Json, Newtonsoft.Json] -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-preview-version dev_langs: - "csharp" - "vb" @@ -57,7 +57,7 @@ Imports System.Text.Json.Serialization > [!IMPORTANT] > > - Attributes from the <xref:System.Runtime.Serialization> namespace aren't supported by `System.Text.Json`. -> - <xref:System.SerializableAttribute?displayProperty=fullName> and the <xref:System.Runtime.Serialization.ISerializable> interface aren't supported by `System.Text.Json`. These types are used only for [Binary and XML serialization](../binary-serialization.md). +> - <xref:System.SerializableAttribute?displayProperty=fullName> and the <xref:System.Runtime.Serialization.ISerializable> interface aren't supported by `System.Text.Json`. These types are used only for [Binary and XML serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization). ## How to write .NET objects as JSON (serialize) @@ -105,7 +105,7 @@ A <xref:System.Text.Json.JsonSerializer.Serialize%2A> overload that takes a <xre ## Serialization behavior -::: zone pivot="dotnet-5-0,dotnet-7-0,dotnet-6-0" +::: zone pivot="dotnet-8-0,dotnet-7-0,dotnet-6-0,dotnet-5-0" * By default, all public properties are serialized. You can [specify properties to ignore](ignore-properties.md). * The [default encoder](xref:System.Text.Encodings.Web.JavaScriptEncoder.Default) escapes non-ASCII characters, HTML-sensitive characters within the ASCII-range, and characters that must be escaped according to [the RFC 8259 JSON spec](https://tools.ietf.org/html/rfc8259#section-7). @@ -128,7 +128,7 @@ When you use System.Text.Json indirectly in an ASP.NET Core app, some default be ::: zone-end Supported types include: -::: zone pivot="dotnet-5-0,dotnet-7-0,dotnet-6-0" +::: zone pivot="dotnet-8-0,dotnet-7-0,dotnet-6-0,dotnet-5-0" * .NET primitives that map to JavaScript primitives, such as numeric types, strings, and Boolean. * User-defined [plain old CLR objects (POCOs)](../../glossary.md#poco). @@ -165,7 +165,7 @@ You can [implement custom converters](converters-how-to.md) to handle additional A common way to deserialize JSON is to first create a class with properties and fields that represent one or more of the JSON properties. Then, to deserialize from a string or a file, call the <xref:System.Text.Json.JsonSerializer.Deserialize%2A?displayProperty=nameWithType> method. For the generic overloads, you pass the type of the class you created as the generic type parameter. For the non-generic overloads, you pass the type of the class you created as a method parameter. You can deserialize either synchronously or asynchronously. -Any JSON properties that aren't represented in your class are ignored. Also, if any properties on the type are [required](required-properties.md) but not present in the JSON payload, deserialization will fail. +Any JSON properties that aren't represented in your class are ignored [by default](missing-members.md). Also, if any properties on the type are [required](required-properties.md) but not present in the JSON payload, deserialization will fail. The following example shows how to deserialize a JSON string: @@ -210,7 +210,7 @@ To deserialize from UTF-8, call a <xref:System.Text.Json.JsonSerializer.Deserial The following behaviors apply when deserializing JSON: -::: zone pivot="dotnet-5-0,dotnet-7-0,dotnet-6-0" +::: zone pivot="dotnet-8-0,dotnet-7-0,dotnet-6-0,dotnet-5-0" * By default, property name matching is case-sensitive. You can [specify case-insensitivity](character-casing.md). * If the JSON contains a value for a read-only property, the value is ignored and no exception is thrown. @@ -251,7 +251,7 @@ If you use `JsonSerializerOptions` repeatedly with the same options, don't creat ## Include fields -::: zone pivot="dotnet-5-0,dotnet-7-0,dotnet-6-0" +::: zone pivot="dotnet-8-0,dotnet-7-0,dotnet-6-0,dotnet-5-0" Use the <xref:System.Text.Json.JsonSerializerOptions.IncludeFields?displayProperty=nameWithType> global setting or the [[JsonInclude]](xref:System.Text.Json.Serialization.JsonIncludeAttribute) attribute to include fields when serializing or deserializing, as shown in the following example: :::code language="csharp" source="snippets/system-text-json-how-to-5-0/csharp/Fields.cs" highlight="15,17,19,31-34"::: @@ -266,7 +266,7 @@ Fields are not supported in System.Text.Json in .NET Core 3.1. [Custom converter ## HttpClient and HttpContent extension methods -::: zone pivot="dotnet-5-0,dotnet-7-0,dotnet-6-0" +::: zone pivot="dotnet-8-0,dotnet-7-0,dotnet-6-0,dotnet-5-0" Serializing and deserializing JSON payloads from the network are common operations. Extension methods on [HttpClient](xref:System.Net.Http.Json.HttpClientJsonExtensions) and [HttpContent](xref:System.Net.Http.Json.HttpContentJsonExtensions) let you do these operations in a single line of code. These extension methods use [web defaults for JsonSerializerOptions](configure-options.md#web-defaults-for-jsonserializeroptions). diff --git a/docs/standard/serialization/system-text-json/missing-members.md b/docs/standard/serialization/system-text-json/missing-members.md new file mode 100644 index 0000000000000..83f7081a162e7 --- /dev/null +++ b/docs/standard/serialization/system-text-json/missing-members.md @@ -0,0 +1,28 @@ +--- +title: Handle missing members during deserialization +description: "Learn how to configure the JSON deserialization behavior when properties are present in the JSON payload that aren't present in the POCO type." +ms.date: 03/01/2023 +no-loc: [System.Text.Json] +dev_langs: + - "csharp" +--- + +# Handle missing members during deserialization + +By default, if the JSON payload you're deserializing contains properties that don't exist in the deserialized plain old CLR object (POCO) type, they're simply ignored. Starting in .NET 8, you can specify that all members must be present in the payload. If they're not, a <xref:System.Text.Json.JsonException> exception is thrown. You can configure this behavior in one of three ways: + +- Annotate your POCO type with the `[<xref:System.Text.Json.Serialization.JsonUnmappedMemberHandlingAttribute>]` attribute, specifying either to <xref:System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip> or <xref:System.Text.Json.Serialization.JsonUnmappedMemberHandling.Disallow> missing members. + + ```csharp + [JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)] + public class MyPoco + { + public int Id { get; set; } + } + + JsonSerializer.Deserialize<MyPoco>("""{"Id" : 42, "AnotherId" : -1 }"""); + // JsonException : The JSON property 'AnotherId' could not be mapped to any .NET member contained in type 'MyPoco'. + ``` + +- Set <xref:System.Text.Json.JsonSerializerOptions.UnmappedMemberHandling?displayProperty=nameWithType> to either <xref:System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip> or <xref:System.Text.Json.Serialization.JsonUnmappedMemberHandling.Disallow>. +- Customize the <xref:System.Text.Json.Serialization.Metadata.JsonTypeInfo> contract for the relevant type. (For information about customizing a contract, see [Customize a JSON contract](custom-contracts.md).) diff --git a/docs/standard/serialization/system-text-json/overview.md b/docs/standard/serialization/system-text-json/overview.md index 895f298b093c0..e27c781797c87 100644 --- a/docs/standard/serialization/system-text-json/overview.md +++ b/docs/standard/serialization/system-text-json/overview.md @@ -33,7 +33,7 @@ For framework versions earlier than .NET Core 3.0, install the [System.Text.Json ## Run-time reflection vs. compile-time source generation -By default, `System.Text.Json` uses [reflection](../../../csharp/programming-guide/concepts/reflection.md) to gather the metadata it needs to access properties of objects for serialization and deserialization *at run time*. As an alternative, `System.Text.Json` can use the C# [source generation](../../../csharp/roslyn-sdk/source-generators-overview.md) feature to improve performance, reduce private memory usage, and facilitate [assembly trimming](../../../core/deploying/trimming/trim-self-contained.md), which reduces app size. For more information, see [How to choose reflection or source generation in System.Text.Json](source-generation-modes.md). +By default, `System.Text.Json` uses [reflection](/dotnet/csharp/advanced-topics/reflection-and-attributes/) to gather the metadata it needs to access properties of objects for serialization and deserialization *at run time*. As an alternative, `System.Text.Json` can use the C# [source generation](../../../csharp/roslyn-sdk/source-generators-overview.md) feature to improve performance, reduce private memory usage, and facilitate [assembly trimming](../../../core/deploying/trimming/trim-self-contained.md), which reduces app size. For more information, see [How to choose reflection or source generation in System.Text.Json](source-generation-modes.md). ## Security information diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to-5-0/vb/CustomConverterHandleNull.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to-5-0/vb/CustomConverterHandleNull.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to-5-0/vb/CustomConverterHandleNull.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to-5-0/vb/CustomConverterHandleNull.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to-5-0/vb/Records.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to-5-0/vb/Records.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to-5-0/vb/Records.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to-5-0/vb/Records.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/csharp/SerializeCustomEncoding.cs b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/csharp/SerializeCustomEncoding.cs index 1019a2e30474e..8658d2115aa6d 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/csharp/SerializeCustomEncoding.cs +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/csharp/SerializeCustomEncoding.cs @@ -26,12 +26,12 @@ public static void Run() Console.WriteLine("Serialize language sets unescaped"); // <LanguageSets> - options = new JsonSerializerOptions + var options1 = new JsonSerializerOptions { Encoder = JavaScriptEncoder.Create(UnicodeRanges.BasicLatin, UnicodeRanges.Cyrillic), WriteIndented = true }; - jsonString = JsonSerializer.Serialize(weatherForecast, options); + jsonString = JsonSerializer.Serialize(weatherForecast, options1); // </LanguageSets> Console.WriteLine(jsonString); Console.WriteLine(); @@ -41,24 +41,24 @@ public static void Run() var encoderSettings = new TextEncoderSettings(); encoderSettings.AllowCharacters('\u0436', '\u0430'); encoderSettings.AllowRange(UnicodeRanges.BasicLatin); - options = new JsonSerializerOptions + var options2 = new JsonSerializerOptions { Encoder = JavaScriptEncoder.Create(encoderSettings), WriteIndented = true }; - jsonString = JsonSerializer.Serialize(weatherForecast, options); + jsonString = JsonSerializer.Serialize(weatherForecast, options2); // </SelectedCharacters> Console.WriteLine(jsonString); Console.WriteLine(); Console.WriteLine("Serialize using unsafe relaxed encoder"); // <UnsafeRelaxed> - options = new JsonSerializerOptions + var options3 = new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, WriteIndented = true }; - jsonString = JsonSerializer.Serialize(weatherForecast, options); + jsonString = JsonSerializer.Serialize(weatherForecast, options3); // </UnsafeRelaxed> Console.WriteLine(jsonString); } diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/csharp/Utf8ReaderPartialRead.cs b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/csharp/Utf8ReaderPartialRead.cs index 4c52404f43aba..94df2b4ac0e46 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/csharp/Utf8ReaderPartialRead.cs +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/csharp/Utf8ReaderPartialRead.cs @@ -37,7 +37,7 @@ public static void Run() if (!reader.Read()) { // Not enough of the JSON is in the buffer to complete a read. - GetMoreBytesFromStream(stream, buffer, reader); + GetMoreBytesFromStream(stream, buffer, ref reader); } } @@ -46,14 +46,14 @@ public static void Run() while (!reader.Read()) { // Not enough of the JSON is in the buffer to complete a read. - GetMoreBytesFromStream(stream, buffer, reader); + GetMoreBytesFromStream(stream, buffer, ref reader); } // Display value of Summary property, that is, "Hot". Console.WriteLine($"Got property value: {reader.GetString()}"); } private static void GetMoreBytesFromStream( - MemoryStream stream, byte[] buffer, Utf8JsonReader reader) + MemoryStream stream, byte[] buffer, ref Utf8JsonReader reader) { int bytesRead; if (reader.BytesConsumed < buffer.Length) diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ConvertDictionaryTkeyEnumTValue.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ConvertDictionaryTkeyEnumTValue.vb index 7537b44717705..96236e8c49539 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ConvertDictionaryTkeyEnumTValue.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ConvertDictionaryTkeyEnumTValue.vb @@ -1,8 +1,8 @@ ' <Register> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Register> ' <Deserialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Deserialize> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ConvertInferredTypesToObject.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ConvertInferredTypesToObject.vb index 7301742bc7bbe..fd355ff3ae1b5 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ConvertInferredTypesToObject.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ConvertInferredTypesToObject.vb @@ -1,4 +1,4 @@ ' <Register> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Register> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DateTimeOffsetConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DateTimeOffsetConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DateTimeOffsetConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DateTimeOffsetConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DateTimeOffsetNullHandlingConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DateTimeOffsetNullHandlingConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DateTimeOffsetNullHandlingConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DateTimeOffsetNullHandlingConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeInferredTypesToObject.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeInferredTypesToObject.vb index 7301742bc7bbe..fd355ff3ae1b5 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeInferredTypesToObject.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeInferredTypesToObject.vb @@ -1,4 +1,4 @@ ' <Register> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Register> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeNullToNonnullableType.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeNullToNonnullableType.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeNullToNonnullableType.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeNullToNonnullableType.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeRequiredProperty.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeRequiredProperty.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeRequiredProperty.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeRequiredProperty.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeRequiredPropertyUsingAttributeRegistration.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeRequiredPropertyUsingAttributeRegistration.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeRequiredPropertyUsingAttributeRegistration.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DeserializeRequiredPropertyUsingAttributeRegistration.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DictionaryTKeyEnumTValueConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DictionaryTKeyEnumTValueConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DictionaryTKeyEnumTValueConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/DictionaryTKeyEnumTValueConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ImmutablePointConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ImmutablePointConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ImmutablePointConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ImmutablePointConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/JsonConverterFactoryForStackOfT.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/JsonConverterFactoryForStackOfT.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/JsonConverterFactoryForStackOfT.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/JsonConverterFactoryForStackOfT.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/LongToStringConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/LongToStringConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/LongToStringConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/LongToStringConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ObjectToInferredTypesConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ObjectToInferredTypesConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ObjectToInferredTypesConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ObjectToInferredTypesConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/PersonConverterWithTypeDiscriminator.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/PersonConverterWithTypeDiscriminator.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/PersonConverterWithTypeDiscriminator.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/PersonConverterWithTypeDiscriminator.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithAttributeOnProperty.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithAttributeOnProperty.vb index 1caf4b5d0837d..31f7427c6425c 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithAttributeOnProperty.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithAttributeOnProperty.vb @@ -1,8 +1,8 @@ ' <Serialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Serialize> ' <Deserialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Deserialize> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithAttributeOnType.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithAttributeOnType.vb index 1caf4b5d0837d..31f7427c6425c 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithAttributeOnType.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithAttributeOnType.vb @@ -1,8 +1,8 @@ ' <Serialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Serialize> ' <Deserialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Deserialize> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithConvertersCollection.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithConvertersCollection.vb index 1caf4b5d0837d..31f7427c6425c 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithConvertersCollection.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RegisterConverterWithConvertersCollection.vb @@ -1,8 +1,8 @@ ' <Serialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Serialize> ' <Deserialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Deserialize> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripCallbacks.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripCallbacks.vb index 3933ece70e782..941a9db803295 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripCallbacks.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripCallbacks.vb @@ -1,8 +1,8 @@ ' <Serialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Serialize> ' <Deserialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' <Deserialize> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripDictionaryTkeyEnumTValue.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripDictionaryTkeyEnumTValue.vb index 7537b44717705..96236e8c49539 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripDictionaryTkeyEnumTValue.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripDictionaryTkeyEnumTValue.vb @@ -1,8 +1,8 @@ ' <Register> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Register> ' <Deserialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Deserialize> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripImmutableStruct.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripImmutableStruct.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripImmutableStruct.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripImmutableStruct.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripLongToString.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripLongToString.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripLongToString.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripLongToString.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripPolymorphic.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripPolymorphic.vb index 7537b44717705..96236e8c49539 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripPolymorphic.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripPolymorphic.vb @@ -1,8 +1,8 @@ ' <Register> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Register> ' <Deserialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Deserialize> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripStackOfT.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripStackOfT.vb index d6811c38aaada..56dfbb9a2164b 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripStackOfT.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripStackOfT.vb @@ -1,4 +1,4 @@ ' ' <Register> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' ' </Register> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripToUtf8.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripToUtf8.vb index 2f9e4e3cdcd68..861e68508cdc0 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripToUtf8.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/RoundtripToUtf8.vb @@ -26,7 +26,7 @@ Namespace SystemTextJsonSamples ' <Deserialize2> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: - ' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support + ' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Deserialize2> 'weatherForecast1.DisplayPropertyValues() End Sub diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/SerializeRuntimePropertyExclusion.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/SerializeRuntimePropertyExclusion.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/SerializeRuntimePropertyExclusion.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/SerializeRuntimePropertyExclusion.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Temperature.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Temperature.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Temperature.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Temperature.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/TemperatureConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/TemperatureConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/TemperatureConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/TemperatureConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderFromBytes.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderFromBytes.vb index a79cd217c7ac3..2e77bb2c92bd8 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderFromBytes.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderFromBytes.vb @@ -1,4 +1,4 @@ ' <Deserialize> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </Deserialize> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderFromFile.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderFromFile.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderFromFile.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderFromFile.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderPartialRead.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderPartialRead.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderPartialRead.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/Utf8ReaderPartialRead.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ValueTextEqualsExample.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ValueTextEqualsExample.vb index 28147ba86f36b..224df4335edcb 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ValueTextEqualsExample.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/ValueTextEqualsExample.vb @@ -1,8 +1,8 @@ ' <DefineUtf8Var> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </DefineUtf8Var> ' <UseUtf8Var> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </UseUtf8Var> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecast.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecast.vb index 02347d85224ee..9b77856caa2f5 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecast.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecast.vb @@ -29,7 +29,7 @@ Namespace SystemTextJsonSamples ' <WFWithReqPptyConverterAttr> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: - ' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support + ' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </WFWithReqPptyConverterAttr> ' <WFWithPrevious> @@ -54,7 +54,7 @@ Namespace SystemTextJsonSamples ' <WFWithLong> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: - ' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support + ' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </WFWithLong> ' <WFWithDefault> @@ -87,7 +87,7 @@ Namespace SystemTextJsonSamples ' <WFWithConverterAttribute> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: - ' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support + ' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </WFWithConverterAttribute> ' <WFWithPropertyNameAttribute> @@ -154,7 +154,7 @@ Namespace SystemTextJsonSamples ' <WFWithTemperatureStruct> ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: - ' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support + ' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support ' </WFWithTemperatureStruct> ' <WFWithDictionary> diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastCallbacksConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastCallbacksConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastCallbacksConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastCallbacksConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRequiredPropertyConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRequiredPropertyConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRequiredPropertyConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRequiredPropertyConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRequiredPropertyConverterForAttributeRegistration.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRequiredPropertyConverterForAttributeRegistration.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRequiredPropertyConverterForAttributeRegistration.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRequiredPropertyConverterForAttributeRegistration.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRuntimeIgnoreConverter.vb b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRuntimeIgnoreConverter.vb index a7a9e7072ce27..abfbbaef0efb6 100644 --- a/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRuntimeIgnoreConverter.vb +++ b/docs/standard/serialization/system-text-json/snippets/system-text-json-how-to/vb/WeatherForecastRuntimeIgnoreConverter.vb @@ -1,2 +1,2 @@ ' This code example doesn't apply to Visual Basic. For more information, go to the following URL: -' https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support +' https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-how-to#visual-basic-support diff --git a/docs/standard/serialization/system-text-json/source-generation-modes.md b/docs/standard/serialization/system-text-json/source-generation-modes.md index f9530182053fd..f9c0c0c35b2f3 100644 --- a/docs/standard/serialization/system-text-json/source-generation-modes.md +++ b/docs/standard/serialization/system-text-json/source-generation-modes.md @@ -1,9 +1,9 @@ --- title: How to choose reflection or source generation in System.Text.Json description: "Learn how to choose reflection or source generation in System.Text.Json." -ms.date: 10/18/2021 +ms.date: 02/21/2023 no-loc: [System.Text.Json] -zone_pivot_groups: dotnet-version +zone_pivot_groups: dotnet-preview-version helpviewer_keywords: - "JSON serialization" - "serializing objects" @@ -14,10 +14,10 @@ ms.topic: how-to # How to choose reflection or source generation in System.Text.Json -:::zone pivot="dotnet-7-0,dotnet-6-0" +:::zone pivot="dotnet-8-0,dotnet-7-0,dotnet-6-0" By default, `System.Text.Json` uses run-time reflection to gather the metadata it needs to access properties of objects for serialization and deserialization. As an alternative, `System.Text.Json` 6.0 and later can use the C# [source generation](../../../csharp/roslyn-sdk/source-generators-overview.md) feature to improve performance, reduce private memory usage, and facilitate [assembly trimming](../../../core/deploying/trimming/trim-self-contained.md), which reduces app size. -You can use version 6.0 of System.Text.Json in projects that target earlier frameworks. For more information, see [How to get the library](overview.md#how-to-get-the-library). +You can use version 6.0+ of `System.Text.Json` in projects that target earlier frameworks. For more information, see [How to get the library](overview.md#how-to-get-the-library). This article explains the options and provides guidance on how to choose the best approach for your scenario. :::zone-end @@ -30,6 +30,27 @@ This article explains the options and provides guidance on how to choose the bes :::zone-end +:::zone pivot="dotnet-8-0" + +## Overview + +Choose reflection or source generation modes based on the following benefits that each one offers: + +| Benefit | Reflection | Source generation:<br/>Metadata collection | Source generation:<br/>Serialization optimization | +|------------------------------------------------------|------------|---------------------|----------------------------| +| Simpler to code and debug. | ✔️ | ❌ | ❌ | +| Supports non-public accessors. | ✔️ | ❌ | ❌ | +| Supports required properties. | ✔️ | ✔️ | ✔️ | +| Supports init-only properties. | ✔️ | ✔️ | ✔️ | +| Supports all available serialization customizations. | ✔️ | ❌ | ❌ | +| Reduces start-up time. | ❌ | ✔️ | ❌ | +| Reduces private memory usage. | ❌ | ✔️ | ✔️ | +| Eliminates run-time reflection. | ❌ | ✔️ | ✔️ | +| Facilitates trim-safe app size reduction. | ❌ | ✔️ | ✔️ | +| Increases serialization throughput. | ❌ | ❌ | ✔️ | + +:::zone-end + :::zone pivot="dotnet-7-0,dotnet-6-0" ## Overview @@ -40,6 +61,7 @@ Choose reflection or source generation modes based on the following benefits tha |------------------------------------------------------|------------|---------------------|----------------------------| | Simpler to code and debug. | ✔️ | ❌ | ❌ | | Supports non-public accessors. | ✔️ | ❌ | ❌ | +| Supports required properties. | ✔️ | ❌ | ❌ | | Supports init-only properties. | ✔️ | ❌ | ❌ | | Supports all available serialization customizations. | ✔️ | ❌ | ❌ | | Reduces start-up time. | ❌ | ✔️ | ❌ | @@ -48,6 +70,10 @@ Choose reflection or source generation modes based on the following benefits tha | Facilitates trim-safe app size reduction. | ❌ | ✔️ | ✔️ | | Increases serialization throughput. | ❌ | ❌ | ✔️ | +:::zone-end + +:::zone pivot="dotnet-8-0,dotnet-7-0,dotnet-6-0" + The following sections explain these options and their relative benefits. ## System.Text.Json metadata @@ -61,7 +87,7 @@ To serialize or deserialize a type, <xref:System.Text.Json.JsonSerializer> needs This information is referred to as *metadata*. -By default, `JsonSerializer` collects metadata at run time by using [reflection](../../../csharp/programming-guide/concepts/reflection.md). Whenever `JsonSerializer` has to serialize or deserialize a type for the first time, it collects and caches this metadata. The metadata collection process takes time and uses memory. +By default, `JsonSerializer` collects metadata at run time by using [reflection](/dotnet/csharp/advanced-topics/reflection-and-attributes/). Whenever `JsonSerializer` has to serialize or deserialize a type for the first time, it collects and caches this metadata. The metadata collection process takes time and uses memory. ## Source generation - metadata collection mode @@ -73,8 +99,6 @@ The performance improvements provided by source generation can be substantial. F Only `public` properties and fields are supported by default<sup>\*</sup> in either serialization mode. However, reflection mode supports the use of `private` *accessors* while source-generation mode does not. For example, you can apply the [JsonInclude attribute](xref:System.Text.Json.Serialization.JsonIncludeAttribute) to a property that has a `private` setter or getter and it will be serialized in reflection mode. Source-generation mode supports only `public` or `internal` accessors of `public` properties. If you set `[JsonInclude]` on non-public accessors and choose source-generation mode, a `NotSupportedException` will be thrown at run time. -Reflection mode also supports deserialization to [init-only properties](../../../csharp/language-reference/keywords/init.md). Source generation doesn't support this, because the metadata-only mode required for deserialization can't express the required initialization statically in source code. The reflection serializer uses run-time reflection to set properties after construction. - In both reflection and source generation modes: * Only `public` properties and `public` fields are supported<sup>\*</sup>. diff --git a/docs/standard/serialization/system-text-json/use-dom-utf8jsonreader-utf8jsonwriter.md b/docs/standard/serialization/system-text-json/use-dom-utf8jsonreader-utf8jsonwriter.md index 81f7d8f63c2ea..c0dcc41e80743 100644 --- a/docs/standard/serialization/system-text-json/use-dom-utf8jsonreader-utf8jsonwriter.md +++ b/docs/standard/serialization/system-text-json/use-dom-utf8jsonreader-utf8jsonwriter.md @@ -116,7 +116,7 @@ The preceding code: * Assumes the JSON to analyze is in a string named `jsonString`. * Calculates an average grade for objects in a `Students` array that have a `Grade` property. * Assigns a default grade of 70 for students who don't have a grade. -* Creates the `JsonDocument` instance in a [`using` statement](../../../csharp/language-reference/keywords/using-statement.md) because `JsonDocument` implements `IDisposable`. After a `JsonDocument` instance is disposed, you lose access to all of its `JsonElement` instances also. To retain access to a `JsonElement` instance, make a copy of it before the parent `JsonDocument` instance is disposed. To make a copy, call <xref:System.Text.Json.JsonElement.Clone%2A?displayProperty=nameWithType>. For more information, see [JsonDocument is IDisposable](migrate-from-newtonsoft.md#jsondocument-is-idisposable). +* Creates the `JsonDocument` instance in a [`using` statement](../../../csharp/language-reference/statements/using.md) because `JsonDocument` implements `IDisposable`. After a `JsonDocument` instance is disposed, you lose access to all of its `JsonElement` instances also. To retain access to a `JsonElement` instance, make a copy of it before the parent `JsonDocument` instance is disposed. To make a copy, call <xref:System.Text.Json.JsonElement.Clone%2A?displayProperty=nameWithType>. For more information, see [JsonDocument is IDisposable](migrate-from-newtonsoft.md#jsondocument-is-idisposable). The preceding example code counts students by incrementing a `count` variable with each iteration. An alternative is to call <xref:System.Text.Json.JsonElement.GetArrayLength%2A>, as shown in the following example: @@ -324,7 +324,7 @@ The preceding example sets no limit to how large the buffer can grow. If the tok ### Utf8JsonReader is a ref struct -Because the `Utf8JsonReader` type is a *ref struct*, it has [certain limitations](../../../csharp/language-reference/builtin-types/ref-struct.md). For example, it can't be stored as a field on a class or struct other than a ref struct. To achieve high performance, this type must be a `ref struct` since it needs to cache the input [ReadOnlySpan\<byte>](xref:System.ReadOnlySpan%601), which itself is a ref struct. In addition, this type is mutable since it holds state. Therefore, **pass it by reference** rather than by value. Passing it by value would result in a struct copy and the state changes would not be visible to the caller. For more information about how to use ref structs, see [Write safe and efficient C# code](../../../csharp/write-safe-efficient-code.md). +Because the `Utf8JsonReader` type is a *ref struct*, it has [certain limitations](../../../csharp/language-reference/builtin-types/ref-struct.md). For example, it can't be stored as a field on a class or struct other than a ref struct. To achieve high performance, this type must be a `ref struct` since it needs to cache the input [ReadOnlySpan\<byte>](xref:System.ReadOnlySpan%601), which itself is a ref struct. In addition, this type is mutable since it holds state. Therefore, **pass it by reference** rather than by value. Passing it by value would result in a struct copy and the state changes would not be visible to the caller. For more information about how to use ref structs, see [Avoid allocations](../../../csharp/advanced-topics/performance/index.md). ### Read UTF-8 text diff --git a/docs/standard/serialization/version-tolerant-serialization.md b/docs/standard/serialization/version-tolerant-serialization.md deleted file mode 100644 index 63ec5309ff083..0000000000000 --- a/docs/standard/serialization/version-tolerant-serialization.md +++ /dev/null @@ -1,288 +0,0 @@ ---- -title: "Version-tolerant binary serialization" -description: Learn about Version Tolerant Serialization, a set of features that make it easier to modify serializable types. -ms.date: "08/08/2017" -dev_langs: - - "csharp" - - "vb" -helpviewer_keywords: - - "version tolerant serialization" - - "serialization, custom serialization" - - "serialization, version tolerant" - - "serialization, controlling" - - "versions and serialization" - - "serialization, attributes" -ms.assetid: bea0ffe3-2708-4a16-ac7d-e586ed6b8e8d ---- -# Version tolerant binary serialization - -In the earliest versions of .NET Framework, creating binary-serializable types that would be reusable from one version of an application to the next was problematic. If a type was modified by adding extra fields, the following problems would occur: - -- Older versions of an application would throw exceptions when asked to deserialize new versions of the old type. -- Newer versions of an application would throw exceptions when deserializing older versions of a type with missing data. - -Version tolerant serialization (VTS) refers to a set of features that make it easier, over time, to modify binary-serializable types. Specifically, the VTS features are enabled for classes to which the <xref:System.SerializableAttribute> attribute has been applied, including generic types. VTS makes it possible to add new fields to those classes without breaking compatibility with other versions of the type. - -The VTS features are enabled when using the <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter>. Additionally, all features except extraneous data tolerance are also enabled when using the <xref:System.Runtime.Serialization.Formatters.Soap.SoapFormatter>. For more information about using these classes for serialization, see [Binary Serialization](binary-serialization.md). - -[!INCLUDE [binary-serialization-warning](../../../includes/binary-serialization-warning.md)] - -## Feature list - -The set of features includes the following: - -- Tolerance of extraneous or unexpected data. This enables newer versions of the type to send data to older versions. -- Tolerance of missing optional data. This enables older versions to send data to newer versions. -- Serialization callbacks. This enables intelligent default value setting in cases where data is missing. - -In addition, there is a feature for declaring when a new optional field has been added. This is the <xref:System.Runtime.Serialization.OptionalFieldAttribute.VersionAdded%2A> property of the <xref:System.Runtime.Serialization.OptionalFieldAttribute> attribute. - -These features are discussed in greater detail in the following sections. - -### Tolerance of extraneous or unexpected data - -In the past, during deserialization, any extraneous or unexpected data caused exceptions to be thrown. With VTS, in the same situation, any extraneous or unexpected data is ignored instead of causing exceptions to be thrown. This enables applications that use newer versions of a type (that is, a version that includes more fields) to send information to applications that expect older versions of the same type. - -In the following example, the extra data contained in the `CountryField` of version 2.0 of the `Address` class is ignored when an older application deserializes the newer version. - -```csharp -// Version 1 of the Address class. -[Serializable] -public class Address -{ - public string Street; - public string City; -} -// Version 2.0 of the Address class. -[Serializable] -public class Address -{ - public string Street; - public string City; - // The older application ignores this data. - public string CountryField; -} -``` - -```vb -' Version 1 of the Address class. -<Serializable> _ -Public Class Address - Public Street As String - Public City As String -End Class - -' Version 2.0 of the Address class. -<Serializable> _ -Public Class Address - Public Street As String - Public City As String - ' The older application ignores this data. - Public CountryField As String -End Class -``` - -### Tolerance of missing data - -Fields can be marked as optional by applying the <xref:System.Runtime.Serialization.OptionalFieldAttribute> attribute to them. During deserialization, if the optional data is missing, the serialization engine ignores the absence and does not throw an exception. Thus, applications that expect older versions of a type can send data to applications that expect newer versions of the same type. - -The following example shows version 2.0 of the `Address` class with the `CountryField` field marked as optional. If an older application sends version 1 to a newer application that expects version 2.0, the absence of the data is ignored. - -```csharp -[Serializable] -public class Address -{ - public string Street; - public string City; - - [OptionalField] - public string CountryField; -} -``` - -```vb -<Serializable> _ -Public Class Address - Public Street As String - Public City As String - - <OptionalField> _ - Public CountryField As String -End Class -``` - -### Serialization callbacks - -Serialization callbacks are a mechanism that provides hooks into the serialization/deserialization process at four points. - -|Attribute|When the Associated Method is Called|Typical Use| -|---------------|------------------------------------------|-----------------| -|<xref:System.Runtime.Serialization.OnDeserializingAttribute>|Before deserialization.\*|Initialize default values for optional fields.| -|<xref:System.Runtime.Serialization.OnDeserializedAttribute>|After deserialization.|Fix optional field values based on contents of other fields.| -|<xref:System.Runtime.Serialization.OnSerializingAttribute>|Before serialization.|Prepare for serialization. For example, create optional data structures.| -|<xref:System.Runtime.Serialization.OnSerializedAttribute>|After serialization.|Log serialization events.| - - \* This callback is invoked before the deserialization constructor, if one is present. - -#### Using callbacks - -To use callbacks, apply the appropriate attribute to a method that accepts a <xref:System.Runtime.Serialization.StreamingContext> parameter. Only one method per class can be marked with each of these attributes. For example: - -```csharp -[OnDeserializing] -private void SetCountryRegionDefault(StreamingContext sc) -{ - CountryField = "Japan"; -} -``` - -```vb -<OnDeserializing> -Private Sub SetCountryRegionDefault(sc As StreamingContext) - CountryField = "Japan" -End Sub -``` - -The intended use of these methods is for versioning. During deserialization, an optional field may not be correctly initialized if the data for the field is missing. This can be corrected by creating the method that assigns the correct value, then applying either the **OnDeserializingAttribute** or **OnDeserializedAttribute** attribute to the method. - -The following example shows the method in the context of a type. If an earlier version of an application sends an instance of the `Address` class to a later version of the application, the `CountryField` field data will be missing. But after deserialization, the field will be set to a default value "Japan". - -```csharp -[Serializable] -public class Address -{ - public string Street; - public string City; - [OptionalField] - public string CountryField; - - [OnDeserializing] - private void SetCountryRegionDefault(StreamingContext sc) - { - CountryField = "Japan"; - } -} -``` - -```vb -<Serializable> _ -Public Class Address - Public Street As String - Public City As String - <OptionalField> _ - Public CountryField As String - - <OnDeserializing> _ - Private Sub SetCountryRegionDefault(sc As StreamingContext) - CountryField = "Japan" - End Sub -End Class -``` - -## The VersionAdded property - -The **OptionalFieldAttribute** has the **VersionAdded** property. The property indicates which version of a type a given field has been added. It should be incremented by exactly one (starting at 2) every time the type is modified, as shown in the following example: - -```csharp -// Version 1.0 -[Serializable] -public class Person -{ - public string FullName; -} - -// Version 2.0 -[Serializable] -public class Person -{ - public string FullName; - - [OptionalField(VersionAdded = 2)] - public string NickName; - [OptionalField(VersionAdded = 2)] - public DateTime BirthDate; -} - -// Version 3.0 -[Serializable] -public class Person -{ - public string FullName; - - [OptionalField(VersionAdded=2)] - public string NickName; - [OptionalField(VersionAdded=2)] - public DateTime BirthDate; - - [OptionalField(VersionAdded=3)] - public int Weight; -} -``` - -```vb -' Version 1.0 -<Serializable> _ -Public Class Person - Public FullName -End Class - -' Version 2.0 -<Serializable> _ -Public Class Person - Public FullName As String - - <OptionalField(VersionAdded := 2)> _ - Public NickName As String - <OptionalField(VersionAdded := 2)> _ - Public BirthDate As DateTime -End Class - -' Version 3.0 -<Serializable> _ -Public Class Person - Public FullName As String - - <OptionalField(VersionAdded := 2)> _ - Public NickName As String - <OptionalField(VersionAdded := 2)> _ - Public BirthDate As DateTime - - <OptionalField(VersionAdded := 3)> _ - Public Weight As Integer -End Class -``` - -## SerializationBinder - -Some users may need to control which class to serialize and deserialize because a different version of the class is required on the server and client. <xref:System.Runtime.Serialization.SerializationBinder> is an abstract class used to control the actual types used during serialization and deserialization. To use this class, derive a class from <xref:System.Runtime.Serialization.SerializationBinder> and override the <xref:System.Runtime.Serialization.SerializationBinder.BindToName%2A> and <xref:System.Runtime.Serialization.SerializationBinder.BindToType%2A> methods. - -## Best practices - -To ensure proper versioning behavior, follow these rules when modifying a type from version to version: - -- Never remove a serialized field. -- Never apply the <xref:System.NonSerializedAttribute> attribute to a field if the attribute was not applied to the field in the previous version. -- Never change the name or the type of a serialized field. -- When adding a new serialized field, apply the **OptionalFieldAttribute** attribute. -- When removing a **NonSerializedAttribute** attribute from a field (that was not serializable in a previous version), apply the **OptionalFieldAttribute** attribute. -- For all optional fields, set meaningful defaults using the serialization callbacks unless 0 or **null** as defaults are acceptable. - -To ensure that a type will be compatible with future serialization engines, follow these guidelines: - -- Always set the **VersionAdded** property on the **OptionalFieldAttribute** attribute correctly. -- Avoid branched versioning. - -## See also - -- <xref:System.SerializableAttribute> -- <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter> -- <xref:System.Runtime.Serialization.Formatters.Soap.SoapFormatter> -- <xref:System.Runtime.Serialization.OptionalFieldAttribute.VersionAdded%2A> -- <xref:System.Runtime.Serialization.OptionalFieldAttribute> -- <xref:System.Runtime.Serialization.OnDeserializingAttribute> -- <xref:System.Runtime.Serialization.OnDeserializedAttribute> -- <xref:System.Runtime.Serialization.OnSerializingAttribute> -- <xref:System.Runtime.Serialization.OnSerializedAttribute> -- <xref:System.Runtime.Serialization.StreamingContext> -- <xref:System.NonSerializedAttribute> -- [Binary Serialization](binary-serialization.md) diff --git a/docs/standard/serialization/xml-and-soap-serialization.md b/docs/standard/serialization/xml-and-soap-serialization.md index dd2dd10979471..b771860e0a6d3 100644 --- a/docs/standard/serialization/xml-and-soap-serialization.md +++ b/docs/standard/serialization/xml-and-soap-serialization.md @@ -23,5 +23,5 @@ To serialize or deserialize objects, use the <xref:System.Xml.Serialization.XmlS ## See also -- [Binary Serialization](binary-serialization.md) +- [Binary Serialization](/previous-versions/dotnet/fundamentals/serialization/binary/binary-serialization) - [XML Web Services created using ASP.NET and XML Web Service clients](/previous-versions/dotnet/netframework-4.0/7bkzywba(v=vs.100)) diff --git a/docs/standard/serialization/xml-serialization-with-xml-web-services.md b/docs/standard/serialization/xml-serialization-with-xml-web-services.md index ca265e7800124..d9f70553d880f 100644 --- a/docs/standard/serialization/xml-serialization-with-xml-web-services.md +++ b/docs/standard/serialization/xml-serialization-with-xml-web-services.md @@ -31,7 +31,7 @@ XML serialization is the underlying transport mechanism used in the XML Web serv When you're creating an XML Web service, you can use both sets of attributes on the methods. In the following code example, the class named `MyService` contains two XML Web service methods, `MyLiteralMethod` and `MyEncodedMethod`. Both methods perform the same function: returning an instance of the `Order` class. In the `Order` class, the <xref:System.Xml.Serialization.XmlTypeAttribute> and the <xref:System.Xml.Serialization.SoapTypeAttribute> attributes are both applied to the `OrderID` field, and both attributes have their `ElementName` property set to different values. - To run the example, paste the code into a file with an .asmx extension, and place the file into a virtual directory managed by Internet Information Services (IIS). From an HTML browser, such as Internet Explorer, type the name of the computer, virtual directory, and file. + To run the example, paste the code into a file with an .asmx extension, and place the file into a virtual directory managed by Internet Information Services (IIS). From a web browser, type the name of the computer, virtual directory, and file. ```vb <%@ WebService Language="VB" Class="MyService" %> diff --git a/docs/standard/threading/toc.yml b/docs/standard/threading/toc.yml deleted file mode 100644 index f77b3df9cf657..0000000000000 --- a/docs/standard/threading/toc.yml +++ /dev/null @@ -1,87 +0,0 @@ -items: - - name: Threading - items: - - name: Managed threading basics - items: - - name: Overview - href: managed-threading-basics.md - - name: Threads and threading - href: threads-and-threading.md - - name: Exceptions in managed threads - href: exceptions-in-managed-threads.md - - name: Synchronize data for multithreading - href: synchronizing-data-for-multithreading.md - - name: Foreground and background threads - href: foreground-and-background-threads.md - - name: Managed and unmanaged threading in windows - href: managed-and-unmanaged-threading-in-windows.md - - name: "Thread local storage: Thread-relative static fields and data slots" - href: thread-local-storage-thread-relative-static-fields-and-data-slots.md - - name: Using threads and threading - items: - - name: Overview - href: using-threads-and-threading.md - - name: Creating threads and passing data at start time - href: creating-threads-and-passing-data-at-start-time.md - - name: Pause and interrupt threads - href: pausing-and-resuming-threads.md - - name: Schedule threads - href: scheduling-threads.md - - name: Cancel threads - items: - - name: Overview - href: cancellation-in-managed-threads.md - - name: Cancel threads cooperatively - href: canceling-threads-cooperatively.md - - name: How-tos - items: - - name: Listen for cancellation requests by polling - href: how-to-listen-for-cancellation-requests-by-polling.md - - name: Register callbacks for cancellation requests - href: how-to-register-callbacks-for-cancellation-requests.md - - name: Listen for cancellation requests that have wait handles - href: how-to-listen-for-cancellation-requests-that-have-wait-handles.md - - name: Listen for multiple cancellation requests - href: how-to-listen-for-multiple-cancellation-requests.md - - name: Destroy threads - href: destroying-threads.md - - name: Best practices - href: managed-threading-best-practices.md - - name: Threading objects and features - items: - - name: Overview - href: threading-objects-and-features.md - - name: The managed thread pool - href: the-managed-thread-pool.md - - name: Timers - href: timers.md - - name: Overview of synchronization primitives - href: overview-of-synchronization-primitives.md - - name: EventWaitHandle - href: eventwaithandle.md - - name: CountdownEvent - href: countdownevent.md - - name: Mutexes - href: mutexes.md - - name: Semaphore and SemaphoreSlim - href: semaphore-and-semaphoreslim.md - - name: Barrier - items: - - name: Overview - href: barrier.md - - name: "How to: Synchronize concurrent operations with a Barrier" - href: how-to-synchronize-concurrent-operations-with-a-barrier.md - - name: SpinLock - items: - - name: Overview - href: spinlock.md - - name: "How to: Use SpinLock for low-level synchronization" - href: how-to-use-spinlock-for-low-level-synchronization.md - - name: "How to: Enable thread-tracking mode in SpinLock" - href: how-to-enable-thread-tracking-mode-in-spinlock.md - - name: SpinWait - items: - - name: Overview - href: spinwait.md - - name: "How to: Use SpinWait to implement a two-phase wait operation" - href: how-to-use-spinwait-to-implement-a-two-phase-wait-operation.md diff --git a/docs/visual-basic/getting-started/strategy.md b/docs/visual-basic/getting-started/strategy.md new file mode 100644 index 0000000000000..6cab81bf69ce7 --- /dev/null +++ b/docs/visual-basic/getting-started/strategy.md @@ -0,0 +1,32 @@ +--- +title: Visual Basic language strategy +description: We will ensure Visual Basic remains a straightforward and approachable language with a stable design. The core libraries of .NET (such as the BCL) will support VB and many of the improvements to the .NET Runtime and libraries will automatically benefit VB. +ms.date: 02/06/2023 +--- +# Annotated Visual Basic language strategy + +[!INCLUDE [visual-basic](../../../includes/vb-strategy.md)] + +## How strategy guides Visual Basic + +The Visual Basic strategy guides our decisions about VB evolution, and these annotations provide insight into how we think about key statements. + +> "Visual Basic remains a straightforward and approachable language" + +Visual Basic’s natural language syntax enables programmers and non-programmers to read code and engage in meaningful discussions. Many people embrace the design of Visual Basic, and we do not plan to change that design. + +> "language with a stable design" + +The Visual Basic design allows programmers to build solid applications today and to understand code written across a long period of time without stylistic changes. + +> "VB will generally adopt a consumption-only approach and avoid new syntax" + +New features in the .NET runtime and C# sometimes require language changes to implement. We will maximize interop by supporting many of these features and maximize stability with a consumption only approach. A consumption only approach means Visual Basic code can access .NET APIs and types built on new .NET runtime features, but Visual Basic won’t add syntax to define types that use those features. This allows new features to benefit Visual Basic users with little or no syntax changes. + +> "We will continue to invest in the experience in Visual Studio" + +We will continue to improve the Visual Studio experience for Visual Basic developers, such as providing analyzers, code fixes and IDE productivity features. + +> "in core VB scenarios" + +We will focus on existing scenarios supported by VB and do not anticipate adding support for new workloads, such as web front ends or cross-platform UI frameworks diff --git a/docs/visual-basic/index.yml b/docs/visual-basic/index.yml index ff838598c6992..1df727a4daf3c 100644 --- a/docs/visual-basic/index.yml +++ b/docs/visual-basic/index.yml @@ -37,6 +37,8 @@ landingContent: linkLists: - linkListType: overview links: + - text: Language strategy + url: getting-started/strategy.md - text: Programming concepts url: programming-guide/concepts/index.md - linkListType: whats-new diff --git a/docs/visual-basic/programming-guide/com-interop/walkthrough-office-programming.md b/docs/visual-basic/programming-guide/com-interop/walkthrough-office-programming.md new file mode 100644 index 0000000000000..0f38c474e65e8 --- /dev/null +++ b/docs/visual-basic/programming-guide/com-interop/walkthrough-office-programming.md @@ -0,0 +1,150 @@ +--- +title: "Walkthrough: Office Programming - Visual Basic" +description: Learn about the features Visual Studio offers in Visual Basic that improve Microsoft Office programming. +ms.date: 02/15/2023 +ms.topic: tutorial +dev_langs: + - "vb" +helpviewer_keywords: + - "Office programming [Visual Basic]" +--- +# Walkthrough: Office Programming in Visual Basic + +Visual Studio offers features in Visual Basic that improve Microsoft Office programming. Features in Visual Basic include auto-implemented properties, statements in lambda expressions, and collection initializers. You can embed type information, which allows deployment of assemblies that interact with COM components without deploying primary interop assemblies (PIAs) to the user's computer. For more information, see [Walkthrough: Embedding Types from Managed Assemblies](../../../standard/assembly/embed-types-visual-studio.md). + +This walkthrough demonstrates these features in the context of Office programming, but many of these features are also useful in general programming. In the walkthrough, you use an Excel Add-in application to create an Excel workbook. Next, you create a Word document that contains a link to the workbook. Finally, you see how to enable and disable the PIA dependency. + +## Prerequisites + +You must have Microsoft Office Excel and Microsoft Office Word installed on your computer to complete this walkthrough. + +[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] + +## Set up an Excel Add-in application + +1. Start Visual Studio. + +2. On the **File** menu, point to **New**, and then click **Project**. + +3. In the **Installed Templates** pane, expand **Visual Basic**, expand **Office**, and then click the version year of the Office product. + +4. In the **Templates** pane, click **Excel \<version> Add-in**. + +5. Look at the top of the **Templates** pane to make sure that **.NET Framework 4**, or a later version, appears in the **Target Framework** box. + +6. Type a name for your project in the **Name** box, if you want to. + +7. Click **OK**. + +8. The new project appears in **Solution Explorer**. + +## Add references + +1. In **Solution Explorer**, right-click your project's name and then click **Add Reference**. The **Add Reference** dialog box appears. + +2. On the **Assemblies** tab, select **Microsoft.Office.Interop.Excel**, version `<version>.0.0.0` (for a key to the Office product version numbers, see [Microsoft Versions](https://en.wikipedia.org/wiki/Microsoft_Office#Versions)), in the **Component Name** list, and then hold down the CTRL key and select **Microsoft.Office.Interop.Word**, `version <version>.0.0.0`. If you do not see the assemblies, you may need to ensure they are installed and displayed (see [How to: Install Office Primary Interop Assemblies](/visualstudio/vsto/how-to-install-office-primary-interop-assemblies)). + +3. Click **OK**. + +## Add necessary Imports statements or using directives + +1. In **Solution Explorer**, right-click the **ThisAddIn.vb** or **ThisAddIn.cs** file and then click **View Code**. + +2. Add the following `Imports` statements to the top of the code file if they are not already present. + + [!code-vb[csOfficeWalkthrough#1](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#1)] + +## Create a list of bank accounts + +1. In **Solution Explorer**, right-click your project's name, click **Add**, and then click **Class**. Name the class Account.vb. Click **Add**. + +2. Replace the definition of the `Account` class with the following code. The class definitions use *auto-implemented properties*. For more information, see [Auto-Implemented Properties](../../../visual-basic/programming-guide/language-features/procedures/auto-implemented-properties.md). + + [!code-vb[csOfficeWalkthrough#2](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/account.vb#2)] + +3. To create a `bankAccounts` list that contains two accounts, add the following code to the `ThisAddIn_Startup` method in *ThisAddIn.vb*. The list declarations use *collection initializers*. For more information, see [Collection Initializers](../../../visual-basic/programming-guide/language-features/collection-initializers/index.md). + + [!code-vb[csOfficeWalkthrough#3](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#3)] + +## Export data to Excel + +1. In the same file, add the following method to the `ThisAddIn` class. The method sets up an Excel workbook and exports data to it. + + [!code-vb[csOfficeWalkthrough#4](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#4)] + + - Method [Add](<xref:Microsoft.Office.Interop.Excel.Workbooks.Add%2A>) has an *optional parameter* for specifying a particular template. Optional parameters enable you to omit the argument for that parameter if you want to use the parameter's default value. Because no argument is sent in the previous example, `Add` uses the default template and creates a new workbook. + + - The `Range` and `Offset` properties of the [Range](<xref:Microsoft.Office.Interop.Excel.Range>) object use the *indexed properties* feature. Indexed properties also enable you to use the `Value` property of the `Range` object, eliminating the need to use the `Value2` property. The `Value` property is indexed, but the index is optional. Optional arguments and indexed properties work together in the following example. + +2. Add the following code at the end of `DisplayInExcel` to adjust the column widths to fit the content. + + [!code-vb[csOfficeWalkthrough#7](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#7)] + + For more information about embedding interop types, see procedures "To find the PIA reference" and "To restore the PIA dependency" later in this article. + +## Invoke DisplayInExcel + +1. Add the following code at the end of the `ThisAddIn_StartUp` method. The call to `DisplayInExcel` contains two arguments. The first argument is the name of the list of accounts to be processed. The second argument is a multiline lambda expression that defines how the data is to be processed. The `ID` and `balance` values for each account are displayed in adjacent cells, and the row is displayed in red if the balance is less than zero. + + [!code-vb[csOfficeWalkthrough#9](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#9)] + +2. To run the program, press F5. An Excel worksheet appears that contains the data from the accounts. + +## Add a Word document + +1. Add the following code at the end of the `ThisAddIn_StartUp` method to create a Word document that contains a link to the Excel workbook. + + [!code-vb[csOfficeWalkthrough#10](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/csofficewalkthrough/vb/thisaddin.vb#10)] + + The [PasteSpecial](<xref:Microsoft.Office.Interop.Word.Selection.PasteSpecial%2A>) method has seven parameters, all of which are defined as optional reference parameters. Named and optional arguments enable you to designate the parameters you want to access by name and to send arguments to only those parameters. In this example, arguments are sent to indicate that a link to the workbook on the Clipboard should be created (parameter `Link`) and that the link is to be displayed in the Word document as an icon (parameter `DisplayAsIcon`). + +## Run the application + +1. Press F5 to run the application. Excel starts and displays a table that contains the information from the two accounts in `bankAccounts`. Then a Word document appears that contains a link to the Excel table. + +## Clean up the completed project + +1. In Visual Studio, click **Clean Solution** on the **Build** menu. Otherwise, the add-in will run every time that you open Excel on your computer. + +## Find the PIA reference + +1. Run the application again, but do not click **Clean Solution**. + +2. Select the **Start**. Locate **Microsoft Visual Studio \<version>** and open a developer command prompt. + +3. Type `ildasm` in the Developer Command Prompt for Visual Studio window, and then press ENTER. The IL DASM window appears. + +4. On the **File** menu in the IL DASM window, select **File** > **Open**. Double-click **Visual Studio \<version>**, and then double-click **Projects**. Open the folder for your project, and look in the bin/Debug folder for *your project name*.dll. Double-click *your project name*.dll. A new window displays your project's attributes, in addition to references to other modules and assemblies. Note that namespaces `Microsoft.Office.Interop.Excel` and `Microsoft.Office.Interop.Word` are included in the assembly. By default in Visual Studio, the compiler imports the types you need from a referenced PIA into your assembly. + + For more information, see [How to: View Assembly Contents](../../../standard/assembly/view-contents.md). + +5. Double-click the **MANIFEST** icon. A window appears that contains a list of assemblies that contain items referenced by the project. `Microsoft.Office.Interop.Excel` and `Microsoft.Office.Interop.Word` are not included in the list. Because the types your project needs have been imported into your assembly, references to a PIA are not required. This makes deployment easier. The PIAs do not have to be present on the user's computer, and because an application does not require deployment of a specific version of a PIA, applications can be designed to work with multiple versions of Office, provided that the necessary APIs exist in all versions. + + Because deployment of PIAs is no longer necessary, you can create an application in advanced scenarios that works with multiple versions of Office, including earlier versions. However, this works only if your code does not use any APIs that are not available in the version of Office you are working with. It is not always clear whether a particular API was available in an earlier version, and for that reason working with earlier versions of Office is not recommended. + + > [!NOTE] + > Office did not publish PIAs before Office 2003. Therefore, the only way to generate an interop assembly for Office 2002 or earlier versions is by importing the COM reference. + +6. Close the manifest window and the assembly window. + +## Restore the PIA dependency + +1. In **Solution Explorer**, click the **Show All Files** button. Expand the **References** folder and select **Microsoft.Office.Interop.Excel**. Press F4 to display the **Properties** window. +1. In the **Properties** window, change the **Embed Interop Types** property from **True** to **False**. +1. Repeat steps 1 and 2 in this procedure for `Microsoft.Office.Interop.Word`. +1. Press F5 to verify that the project still runs correctly. +1. Repeat steps 1-3 from the previous procedure to open the assembly window. Notice that `Microsoft.Office.Interop.Word` and `Microsoft.Office.Interop.Excel` are no longer in the list of embedded assemblies. +1. Double-click the **MANIFEST** icon and scroll through the list of referenced assemblies. Both `Microsoft.Office.Interop.Word` and `Microsoft.Office.Interop.Excel` are in the list. Because the application references the Excel and Word PIAs, and the **Embed Interop Types** property is set to **False**, both assemblies must exist on the end user's computer. +1. In Visual Studio, click **Clean Solution** on the **Build** menu to clean up the completed project. + +## See also + +- [Auto-Implemented Properties (Visual Basic)](../language-features/procedures/auto-implemented-properties.md) +- [Collection Initializers](../language-features/collection-initializers/index.md) +- [Optional Parameters](../language-features/procedures/optional-parameters.md) +- [Passing Arguments by Position and by Name](../language-features/procedures/passing-arguments-by-position-and-by-name.md) +- [Early and Late Binding](../language-features/early-late-binding/index.md) +- [Lambda Expressions](..//language-features/procedures/lambda-expressions.md) +- [Walkthrough: Embedding Types from Managed Assemblies](../../../standard/assembly/embed-types-visual-studio.md) +- [Walkthrough: Creating Your First VSTO Add-in for Excel](/visualstudio/vsto/walkthrough-creating-your-first-vsto-add-in-for-excel) +- [COM Interop](index.md) diff --git a/docs/visual-basic/programming-guide/concepts/async/control-flow-in-async-programs.md b/docs/visual-basic/programming-guide/concepts/async/control-flow-in-async-programs.md index ec2388dc2e3e7..255f8fe62169c 100644 --- a/docs/visual-basic/programming-guide/concepts/async/control-flow-in-async-programs.md +++ b/docs/visual-basic/programming-guide/concepts/async/control-flow-in-async-programs.md @@ -251,7 +251,7 @@ To run the project, perform the following steps: The first two display lines trace the path as `startButton_Click` calls `AccessTheWebAsync`, and `AccessTheWebAsync` calls the asynchronous <xref:System.Net.Http.HttpClient> method <xref:System.Net.Http.HttpClient.GetStringAsync%28System.String%29>. The following image outlines the calls from method to method. -![Steps ONE and TWO](../../../../csharp/programming-guide/concepts/async/media/asynctrace-onetwo.png "AsyncTrace-ONETWO") +![Steps ONE and TWO](./media/control-flow-in-async-programs/asynctrace-onetwo.png "AsyncTrace-ONETWO") The return type of both `AccessTheWebAsync` and `client.GetStringAsync` is <xref:System.Threading.Tasks.Task%601>. For `AccessTheWebAsync`, TResult is an integer. For `GetStringAsync`, TResult is a string. For more information about async method return types, see [Async Return Types (Visual Basic)](async-return-types.md). @@ -283,7 +283,7 @@ Dim urlContents As String = Await getStringTask The following image shows the flow of control from `client.GetStringAsync` to the assignment to `getStringTask` and from the creation of `getStringTask` to the application of an Await operator. -![Step THREE](../../../../csharp/programming-guide/concepts/async/media/asynctrace-three.png "AsyncTrace-Three") +![Step THREE](./media/control-flow-in-async-programs/asynctrace-three.png "AsyncTrace-Three") The await expression suspends `AccessTheWebAsync` until `client.GetStringAsync` returns. In the meantime, control returns to the caller of `AccessTheWebAsync`, `startButton_Click`. @@ -318,7 +318,7 @@ Dim contentLength As Integer = Await getLengthTask In the following illustration, the arrows show the flow of control from the await expression in `AccessTheWebAsync` to the assignment of a value to `getLengthTask`, followed by normal processing in `startButton_Click` until `getLengthTask` is awaited. -![Step FOUR](../../../../csharp/programming-guide/concepts/async/media/asynctrace-four.png "AsyncTrace-FOUR") +![Step FOUR](./media/control-flow-in-async-programs/asynctrace-four.png "AsyncTrace-FOUR") ### Step FIVE @@ -335,7 +335,7 @@ The operand of the return statement, `urlContents.Length`, is stored in the task The following image shows the transfer of control after `client.GetStringAsync` (and `getStringTask`) are complete. -![Step FIVE](../../../../csharp/programming-guide/concepts/async/media/asynctrace-five.png "AsyncTrace-FIVE") +![Step FIVE](./media/control-flow-in-async-programs/asynctrace-five.png "AsyncTrace-FIVE") `AccessTheWebAsync` runs to completion, and control returns to `startButton_Click`, which is awaiting the completion. @@ -360,7 +360,7 @@ Dim contentLength As Integer = Await getLengthTask The following image shows the return of control from `AccessTheWebAsync` to `startButton_Click`. -![Step SIX](../../../../csharp/programming-guide/concepts/async/media/asynctrace-six.png "AsyncTrace-SIX") +![Step SIX](./media/control-flow-in-async-programs/asynctrace-six.png "AsyncTrace-SIX") ## See also diff --git a/docs/csharp/programming-guide/concepts/async/media/asynctrace-five.png b/docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-five.png similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/asynctrace-five.png rename to docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-five.png diff --git a/docs/csharp/programming-guide/concepts/async/media/asynctrace-four.png b/docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-four.png similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/asynctrace-four.png rename to docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-four.png diff --git a/docs/csharp/programming-guide/concepts/async/media/asynctrace-onetwo.png b/docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-onetwo.png similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/asynctrace-onetwo.png rename to docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-onetwo.png diff --git a/docs/csharp/programming-guide/concepts/async/media/asynctrace-six.png b/docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-six.png similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/asynctrace-six.png rename to docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-six.png diff --git a/docs/csharp/programming-guide/concepts/async/media/asynctrace-three.png b/docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-three.png similarity index 100% rename from docs/csharp/programming-guide/concepts/async/media/asynctrace-three.png rename to docs/visual-basic/programming-guide/concepts/async/media/control-flow-in-async-programs/asynctrace-three.png diff --git a/docs/visual-basic/programming-guide/concepts/expression-trees/debugview-syntax.md b/docs/visual-basic/programming-guide/concepts/expression-trees/debugview-syntax.md index 586a2efbdc9fb..601581ddb3eb7 100644 --- a/docs/visual-basic/programming-guide/concepts/expression-trees/debugview-syntax.md +++ b/docs/visual-basic/programming-guide/concepts/expression-trees/debugview-syntax.md @@ -4,7 +4,7 @@ description: Learn about the special syntax used by the DebugView property to pr author: zspitz ms.author: wiwagn ms.date: 02/14/2021 -ms.topic: reference +ms.topic: language-reference helpviewer_keywords: - "expression trees" - "debugview" diff --git a/docs/visual-basic/programming-guide/language-features/early-late-binding/toc.yml b/docs/visual-basic/programming-guide/language-features/early-late-binding/toc.yml index 6f3d21ddd6a93..78ac141877d1d 100644 --- a/docs/visual-basic/programming-guide/language-features/early-late-binding/toc.yml +++ b/docs/visual-basic/programming-guide/language-features/early-late-binding/toc.yml @@ -7,3 +7,5 @@ href: calling-a-property-or-method-using-a-string-name.md - name: Working with Dynamic Objects href: working-with-dynamic-objects.md + - name: "Walkthrough: create and use dynamic objects" + href: walkthrough-creating-and-using-dynamic-objects.md diff --git a/docs/visual-basic/programming-guide/language-features/early-late-binding/walkthrough-creating-and-using-dynamic-objects.md b/docs/visual-basic/programming-guide/language-features/early-late-binding/walkthrough-creating-and-using-dynamic-objects.md new file mode 100644 index 0000000000000..cb454a632bd16 --- /dev/null +++ b/docs/visual-basic/programming-guide/language-features/early-late-binding/walkthrough-creating-and-using-dynamic-objects.md @@ -0,0 +1,162 @@ +--- +title: "Walkthrough: Creating and Using Dynamic Objects - Visual Basic" +description: Learn how to create and use dynamic late binding objects in this walkthrough. Create a custom dynamic object and a project that uses an 'IronPython' library. +ms.date: 02/17/2023 +dev_langs: + - "vb" +helpviewer_keywords: + - "dynamic objects [Visual Basic]" + - "dynamic objects" +--- +# Walkthrough: Creating and Using Dynamic Objects in Visual Basic + +Dynamic objects expose members such as properties and methods at run time, instead of at compile time. This enables you to create objects to work with structures that do not match a static type or format. For example, you can use a dynamic object to reference the HTML Document Object Model (DOM), which can contain any combination of valid HTML markup elements and attributes. Because each HTML document is unique, the members for a particular HTML document are determined at run time. A common method to reference an attribute of an HTML element is to pass the name of the attribute to the `GetProperty` method of the element. To reference the `id` attribute of the HTML element `<div id="Div1">`, you first obtain a reference to the `<div>` element, and then use `divElement.GetProperty("id")`. If you use a dynamic object, you can reference the `id` attribute as `divElement.id`. + + Dynamic objects also provide convenient access to dynamic languages such as IronPython and IronRuby. You can use a dynamic object to refer to a dynamic script that is interpreted at run time. + + You reference a dynamic object by using late binding. You specify the type of a late-bound object as `Object`. For more information, see [[Early and Late Binding](./index.md). + + You can create custom dynamic objects by using the classes in the <xref:System.Dynamic?displayProperty=nameWithType> namespace. For example, you can create an <xref:System.Dynamic.ExpandoObject> and specify the members of that object at run time. You can also create your own type that inherits the <xref:System.Dynamic.DynamicObject> class. You can then override the members of the <xref:System.Dynamic.DynamicObject> class to provide run-time dynamic functionality. + + This article contains two independent walkthroughs: + +- Create a custom object that dynamically exposes the contents of a text file as properties of an object. + +- Create a project that uses an `IronPython` library. + +You can do either one of these or both of them, and if you do both, the order doesn't matter. + +## Prerequisites + +* [Visual Studio 2019 version 16.9 or a later version](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019) with the **.NET desktop development** workload installed. The .NET 5 SDK is automatically installed when you select this workload. + +[!INCLUDE[note_settings_general](~/includes/note-settings-general-md.md)] + +* For the second walkthrough, install [IronPython](https://ironpython.net/) for .NET. Go to their [Download page](https://ironpython.net/download/) to obtain the latest version. + +## Create a Custom Dynamic Object + +The first walkthrough defines a custom dynamic object that searches the contents of a text file. A dynamic property specifies the text to search for. For example, if calling code specifies `dynamicFile.Sample`, the dynamic class returns a generic list of strings that contains all of the lines from the file that begin with "Sample". The search is case-insensitive. The dynamic class also supports two optional arguments. The first argument is a search option enum value that specifies that the dynamic class should search for matches at the start of the line, the end of the line, or anywhere in the line. The second argument specifies that the dynamic class should trim leading and trailing spaces from each line before searching. For example, if calling code specifies `dynamicFile.Sample(StringSearchOption.Contains)`, the dynamic class searches for "Sample" anywhere in a line. If calling code specifies `dynamicFile.Sample(StringSearchOption.StartsWith, false)`, the dynamic class searches for "Sample" at the start of each line, and does not remove leading and trailing spaces. The default behavior of the dynamic class is to search for a match at the start of each line and to remove leading and trailing spaces. + +### To create a custom dynamic class + +1. Start Visual Studio. + +1. Select **Create a new project**. + +1. In the **Create a new project** dialog, select Visual Basic, select **Console Application**, and then select **Next**. + +1. In the **Configure your new project** dialog, enter `DynamicSample` for the **Project name**, and then select **Next**. + +1. In the **Additional information** dialog, select **.NET 5.0 (Current)** for the **Target Framework**, and then select **Create**. + + The new project is created. + +1. In **Solution Explorer**, right-click the DynamicSample project and select **Add** > **Class**. In the **Name** box, type `ReadOnlyFile`, and then select **Add**. + + A new file is added that contains the ReadOnlyFile class. + +1. At the top of the *ReadOnlyFile.cs* or *ReadOnlyFile.vb* file, add the following code to import the <xref:System.IO?displayProperty=nameWithType> and <xref:System.Dynamic?displayProperty=nameWithType> namespaces. + + [!code-vb[VbDynamicWalkthrough#1](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#1)] + +1. The custom dynamic object uses an enum to determine the search criteria. Before the class statement, add the following enum definition. + + [!code-vb[VbDynamicWalkthrough#2](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#2)] + +1. Update the class statement to inherit the `DynamicObject` class, as shown in the following code example. + + [!code-vb[VbDynamicWalkthrough#3](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#3)] + +1. Add the following code to the `ReadOnlyFile` class to define a private field for the file path and a constructor for the `ReadOnlyFile` class. + + [!code-vb[VbDynamicWalkthrough#4](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#4)] + +1. Add the following `GetPropertyValue` method to the `ReadOnlyFile` class. The `GetPropertyValue` method takes, as input, search criteria and returns the lines from a text file that match that search criteria. The dynamic methods provided by the `ReadOnlyFile` class call the `GetPropertyValue` method to retrieve their respective results. + + [!code-vb[VbDynamicWalkthrough#5](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#5)] + +1. After the `GetPropertyValue` method, add the following code to override the <xref:System.Dynamic.DynamicObject.TryGetMember%2A> method of the <xref:System.Dynamic.DynamicObject> class. The <xref:System.Dynamic.DynamicObject.TryGetMember%2A> method is called when a member of a dynamic class is requested and no arguments are specified. The `binder` argument contains information about the referenced member, and the `result` argument references the result returned for the specified member. The <xref:System.Dynamic.DynamicObject.TryGetMember%2A> method returns a Boolean value that returns `true` if the requested member exists; otherwise it returns `false`. + + [!code-vb[VbDynamicWalkthrough#6](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#6)] + +1. After the `TryGetMember` method, add the following code to override the <xref:System.Dynamic.DynamicObject.TryInvokeMember%2A> method of the <xref:System.Dynamic.DynamicObject> class. The <xref:System.Dynamic.DynamicObject.TryInvokeMember%2A> method is called when a member of a dynamic class is requested with arguments. The `binder` argument contains information about the referenced member, and the `result` argument references the result returned for the specified member. The `args` argument contains an array of the arguments that are passed to the member. The <xref:System.Dynamic.DynamicObject.TryInvokeMember%2A> method returns a Boolean value that returns `true` if the requested member exists; otherwise it returns `false`. + + The custom version of the `TryInvokeMember` method expects the first argument to be a value from the `StringSearchOption` enum that you defined in a previous step. The `TryInvokeMember` method expects the second argument to be a Boolean value. If one or both arguments are valid values, they are passed to the `GetPropertyValue` method to retrieve the results. + + [!code-vb[VbDynamicWalkthrough#7](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/readonlyfile.vb#7)] + +1. Save and close the file. + +### To create a sample text file + +1. In **Solution Explorer**, right-click the DynamicSample project and select **Add** > **New Item**. In the **Installed Templates** pane, select **General**, and then select the **Text File** template. Leave the default name of *TextFile1.txt* in the **Name** box, and then click **Add**. A new text file is added to the project. + +1. Copy the following text to the *TextFile1.txt* file. + + ```text + List of customers and suppliers + + Supplier: Lucerne Publishing (https://www.lucernepublishing.com/) + Customer: Preston, Chris + Customer: Hines, Patrick + Customer: Cameron, Maria + Supplier: Graphic Design Institute (https://www.graphicdesigninstitute.com/) + Supplier: Fabrikam, Inc. (https://www.fabrikam.com/) + Customer: Seubert, Roxanne + Supplier: Proseware, Inc. (http://www.proseware.com/) + Customer: Adolphi, Stephan + Customer: Koch, Paul + ``` + +1. Save and close the file. + +### To create a sample application that uses the custom dynamic object + +1. In **Solution Explorer**, double-click the *Program.vb* file. + +2. Add the following code to the `Main` procedure to create an instance of the `ReadOnlyFile` class for the *TextFile1.txt* file. The code uses late binding to call dynamic members and retrieve lines of text that contain the string "Customer". + + [!code-vb[VbDynamicWalkthrough#8](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthrough/vb/Program.vb#8)] + +3. Save the file and press <kbd>Ctrl</kdb>+<kbd>F5</kbd> to build and run the application. + +## Call a dynamic language library + +The following walkthrough creates a project that accesses a library that is written in the dynamic language IronPython. + +### To create a custom dynamic class + +1. In Visual Studio, select **File** > **New** > **Project**. + +1. In the **Create a new project** dialog, select Visual Basic, select **Console Application**, and then select **Next**. + +1. In the **Configure your new project** dialog, enter `DynamicIronPythonSample` for the **Project name**, and then select **Next**. + +1. In the **Additional information** dialog, select **.NET 5.0 (Current)** for the **Target Framework**, and then select **Create**. + + The new project is created. + +1. Install the [IronPython](https://www.nuget.org/packages/IronPython) NuGet package. + +1. Edit the *Program.vb* file. + +1. At the top of the file, add the following code to import the `Microsoft.Scripting.Hosting` and `IronPython.Hosting` namespaces from the IronPython libraries and the `System.Linq` namespace. + + [!code-vb[VbDynamicWalkthroughIronPython#1](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/vb/Program.vb#1)] + +1. In the Main method, add the following code to create a new `Microsoft.Scripting.Hosting.ScriptRuntime` object to host the IronPython libraries. The `ScriptRuntime` object loads the IronPython library module random.py. + + [!code-vb[VbDynamicWalkthroughIronPython#2](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/vb/Program.vb#2)] + +1. After the code to load the random.py module, add the following code to create an array of integers. The array is passed to the `shuffle` method of the random.py module, which randomly sorts the values in the array. + + [!code-vb[VbDynamicWalkthroughIronPython#3](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/vb/Program.vb#3)] + +1. Save the file and press <kbd>Ctrl</kdb>+<kbd>F5</kbd> to build and run the application. + +## See also + +- <xref:System.Dynamic?displayProperty=nameWithType> +- <xref:System.Dynamic.DynamicObject?displayProperty=nameWithType> +- [Implementing Dynamic Interfaces (downloadable PDF from Microsoft TechNet)](https://download.microsoft.com/download/5/4/B/54B83DFE-D7AA-4155-9687-B0CF58FF65D7/implementing-dynamic-interfaces.pdf) diff --git a/docs/visual-basic/programming-guide/language-features/early-late-binding/working-with-dynamic-objects.md b/docs/visual-basic/programming-guide/language-features/early-late-binding/working-with-dynamic-objects.md index 3f244513f7488..db02c8247ab84 100644 --- a/docs/visual-basic/programming-guide/language-features/early-late-binding/working-with-dynamic-objects.md +++ b/docs/visual-basic/programming-guide/language-features/early-late-binding/working-with-dynamic-objects.md @@ -8,7 +8,7 @@ ms.assetid: bdee2a00-07ff-46f9-86dd-fdac9b99cc97 --- # Working with Dynamic Objects (Visual Basic) -Dynamic objects provide another way, other than the `Object` type, to late bind to an object at run time. A dynamic object exposes members such as properties and methods at run time by using dynamic interfaces that are defined in the <xref:System.Dynamic> namespace. You can use the classes in the <xref:System.Dynamic> namespace to create objects that work with data structures that do not match a static type or format. You can also use the dynamic objects that are defined in dynamic languages such as IronPython and IronRuby. For examples that show how to create dynamic objects or use a dynamic object defined in a dynamic language, see [Walkthrough: Creating and Using Dynamic Objects](../../../../csharp/programming-guide/types/walkthrough-creating-and-using-dynamic-objects.md), <xref:System.Dynamic.DynamicObject>, or <xref:System.Dynamic.ExpandoObject>. +Dynamic objects provide another way, other than the `Object` type, to late bind to an object at run time. A dynamic object exposes members such as properties and methods at run time by using dynamic interfaces that are defined in the <xref:System.Dynamic> namespace. You can use the classes in the <xref:System.Dynamic> namespace to create objects that work with data structures that do not match a static type or format. You can also use the dynamic objects that are defined in dynamic languages such as IronPython and IronRuby. For examples that show how to create dynamic objects or use a dynamic object defined in a dynamic language, see [Walkthrough: Creating and Using Dynamic Objects](walkthrough-creating-and-using-dynamic-objects.md), <xref:System.Dynamic.DynamicObject>, or <xref:System.Dynamic.ExpandoObject>. Visual Basic binds to objects from the dynamic language runtime and dynamic languages such as IronPython and IronRuby by using the <xref:System.Dynamic.IDynamicMetaObjectProvider> interface. Examples of classes that implement the `IDynamicMetaObjectProvider` interface are the <xref:System.Dynamic.DynamicObject> and <xref:System.Dynamic.ExpandoObject> classes. @@ -18,5 +18,5 @@ Dynamic objects provide another way, other than the `Object` type, to late bind - <xref:System.Dynamic.DynamicObject> - <xref:System.Dynamic.ExpandoObject> -- [Walkthrough: Creating and Using Dynamic Objects](../../../../csharp/programming-guide/types/walkthrough-creating-and-using-dynamic-objects.md) +- [Walkthrough: Creating and Using Dynamic Objects](walkthrough-creating-and-using-dynamic-objects.md) - [Early and Late Binding](index.md) diff --git a/docs/visual-basic/programming-guide/program-structure/me-my-mybase-and-myclass.md b/docs/visual-basic/programming-guide/program-structure/me-my-mybase-and-myclass.md index 332577726e695..d1ae248307b32 100644 --- a/docs/visual-basic/programming-guide/program-structure/me-my-mybase-and-myclass.md +++ b/docs/visual-basic/programming-guide/program-structure/me-my-mybase-and-myclass.md @@ -48,7 +48,7 @@ ChangeFormColor(Me) ## My - The `My` feature provides easy and intuitive access to a number of .NET Framework classes, enabling the Visual Basic user to interact with the computer, application, settings, resources, and so on. + The `My` feature provides easy and intuitive access to a number of .NET Framework classes, enabling the Visual Basic user to interact with the computer, application, settings, resources, and so on. For a list of these classes, see the [Visual Basic Run-time Objects](../../language-reference/objects/index.md#visual-basic-run-time-objects) reference. ## MyBase diff --git a/docs/visual-basic/reference/command-line-compiler/langversion.md b/docs/visual-basic/reference/command-line-compiler/langversion.md index 0940ec0d1a629..2d2ac9d233a3c 100644 --- a/docs/visual-basic/reference/command-line-compiler/langversion.md +++ b/docs/visual-basic/reference/command-line-compiler/langversion.md @@ -6,7 +6,7 @@ helpviewer_keywords: - "/langversion compiler option [Visual Basic]" - "langversion compiler option [Visual Basic]" - "-langversion compiler option [Visual Basic]" -ms.custom: "updateeachrelease" +ms.custom: "updateeachrelease, UpdateFrequency1" ms.assetid: 59b7b0c8-2dde-4e9b-94e7-0237f7e0bafb --- # -langversion (Visual Basic) diff --git a/docs/visual-basic/toc.yml b/docs/visual-basic/toc.yml index 55658333c87c4..098d552fffd22 100644 --- a/docs/visual-basic/toc.yml +++ b/docs/visual-basic/toc.yml @@ -1,5 +1,8 @@ +items: - name: Visual Basic Guide href: index.yml +- name: Visual Basic strategy + href: getting-started/strategy.md - name: What's New for Visual Basic href: whats-new/index.md - name: Breaking changes in the compiler @@ -247,6 +250,8 @@ href: programming-guide/com-interop/com-interoperability-in-net-framework-applications.md - name: "Walkthrough: Implementing Inheritance with COM Objects" href: programming-guide/com-interop/walkthrough-implementing-inheritance-with-com-objects.md + - name: "Walkthrough: Office programming" + href: programming-guide/com-interop/walkthrough-office-programming.md - name: Language Reference href: language-reference/index.md items: diff --git a/docs/visual-basic/whats-new/breaking-changes.md b/docs/visual-basic/whats-new/breaking-changes.md index 3238348f43ad8..98ba3c3ad7154 100644 --- a/docs/visual-basic/whats-new/breaking-changes.md +++ b/docs/visual-basic/whats-new/breaking-changes.md @@ -2,7 +2,7 @@ title: Breaking changes in the Visual Basic compiler description: Find any breaking changes in the Visual Basic compiler that you are using. ms.topic: troubleshooting -ms.custom: updateeachrelease +ms.custom: "updateeachrelease, UpdateFrequency1" ms.date: 08/18/2020 --- diff --git a/docs/visual-basic/whats-new/index.md b/docs/visual-basic/whats-new/index.md index d884436db464c..e4bef9a884883 100644 --- a/docs/visual-basic/whats-new/index.md +++ b/docs/visual-basic/whats-new/index.md @@ -8,6 +8,7 @@ helpviewer_keywords: - "new features, Visual Basic" - "what's new [Visual Basic]" - "Visual Basic, what's new" +ms.custom: UpdateFrequency1 ms.assetid: d7e97396-7f42-4873-a81c-4ebcc4b6ca02 --- # What's new for Visual Basic diff --git a/docs/whats-new/dotnet-7-docs.md b/docs/whats-new/dotnet-7-docs.md index 59027b932aa7d..a72bcd58bd1cd 100644 --- a/docs/whats-new/dotnet-7-docs.md +++ b/docs/whats-new/dotnet-7-docs.md @@ -241,7 +241,7 @@ Welcome to what's new in the .NET docs for the .NET 7 release. This article list - [Access Modifiers (C# Reference)](../csharp/language-reference/keywords/access-modifiers.md) - Language reference updates for `file` scoped types - [ref (C# Reference)](../csharp/language-reference/keywords/ref.md) - `ref` fields and `scoped`. Modify pages on struct creation, variable declaration, and ref struct. - [Assignment operators (C# reference)](../csharp/language-reference/operators/assignment-operator.md) - `ref` fields and `scoped`. Modify pages on struct creation, variable declaration, and ref struct. -- [Write safe and efficient C# code](../csharp/write-safe-efficient-code.md) +- [Avoid allocations](../csharp//advanced-topics/performance/index.md) - `ref` fields and `scoped`. Modify pages on struct creation, variable declaration, and ref struct. - Add updates for numeric IntPtr - [+ and += operators (C# reference)](../csharp/language-reference/operators/addition-operator.md) - Write content for UTF-8 string literals for C# 11. @@ -256,19 +256,19 @@ Welcome to what's new in the .NET docs for the .NET 7 release. This article list - [Properties](../csharp/properties.md) - C# 11: required members - [Constraints on type parameters (C# Programming Guide)](../csharp/programming-guide/generics/constraints-on-type-parameters.md) - Add information on static virtual interface members - [Generic Interfaces (C# Programming Guide)](../csharp/programming-guide/generics/generic-interfaces.md) - Add information on static virtual interface members -- [Built-in types (C# reference)](../csharp/language-reference/builtin-types/built-in-types.md) - Add updates for numeric IntPtr -- [Built-in numeric conversions (C# reference)](../csharp/language-reference/builtin-types/numeric-conversions.md) - Add updates for numeric IntPtr +- [Built-in types (C# reference)](../csharp/language-reference/builtin-types/built-in-types.md) - Add updates for numeric `IntPtr` +- [Built-in numeric conversions (C# reference)](../csharp/language-reference/builtin-types/numeric-conversions.md) - Add updates for numeric `IntPtr` - [Arithmetic operators (C# reference)](../csharp/language-reference/operators/arithmetic-operators.md) - Operator updates to support generic math -- [Determine caller information using attributes interpreted by the C# compiler](../csharp/language-reference/attributes/caller-information.md) - Extended nameof parameter scope -- [Attributes for null-state static analysis interpreted by the C# compiler](../csharp/language-reference/attributes/nullable-analysis.md) - Extended nameof parameter scope +- [Determine caller information using attributes interpreted by the C# compiler](../csharp/language-reference/attributes/caller-information.md) - Extended `nameof` parameter scope +- [Attributes for null-state static analysis interpreted by the C# compiler](../csharp/language-reference/attributes/nullable-analysis.md) - Extended `nameof` parameter scope - [delegate operator (C# reference)](../csharp/language-reference/operators/delegate-operator.md) - Document new method group conversion -- [Generics and Attributes (C# Programming Guide)](../csharp/programming-guide/generics/generics-and-attributes.md) - generic attributes are allowed in C# 11 +- [Generics and Attributes (C# Programming Guide)](../csharp/advanced-topics/reflection-and-attributes/generics-and-attributes.md) - generic attributes are allowed in C# 11 ## Microsoft Orleans ### New articles -- [What's new in Orleans 7.0](../orleans/whats-new-in-orleans.md) +- [Migrate from Orleans 3.x to 7.0](../orleans/migration-guide.md) ### Updated articles diff --git a/docs/whats-new/dotnet-docs-mod0.md b/docs/whats-new/dotnet-docs-mod0.md index 6dd1f80513aa2..288cfe8718aca 100644 --- a/docs/whats-new/dotnet-docs-mod0.md +++ b/docs/whats-new/dotnet-docs-mod0.md @@ -1,84 +1,147 @@ --- -title: ".NET docs: What's new for December 2022" -description: "What's new in the .NET docs for December 2022." -ms.custom: December-2022 -ms.date: 01/05/2023 +title: ".NET docs: What's new for March 2023" +description: "What's new in the .NET docs for March 2023." +ms.custom: March-2023 +ms.date: 04/01/2023 --- -# .NET docs: What's new for December 2022 +# .NET docs: What's new for March 2023 -Welcome to what's new in the .NET docs for December 2022. This article lists some of the major changes to docs during this period. +Welcome to what's new in the .NET docs for March 2023. This article lists some of the major changes to docs during this period. ## .NET breaking changes ### New articles -- [Automatic RuntimeIdentifier for certain projects](../core/compatibility/sdk/7.0/automatic-runtimeidentifier.md) -- [Side-by-side SDK installations](../core/compatibility/sdk/7.0/side-by-side-install.md) -- [ASPNET-prefixed environment variable precedence](../core/compatibility/aspnet-core/7.0/environment-variable-precedence.md) +- [IntPtr no longer used for function pointer types](../core/compatibility/reflection/8.0/function-pointer-reflection.md) +- [DefaultValueAttribute removed from some properties](../core/compatibility/windows-forms/8.0/defaultvalueattribute-removal.md) +- [HostApplicationBuilderSettings.Args respected by HostApplicationBuilder ctor](../core/compatibility/extensions/8.0/hostapplicationbuilder-ctor.md) +- [CLI console output uses UTF-8](../core/compatibility/sdk/8.0/console-encoding.md) +- [ActivatorUtilities.CreateInstance behaves consistently](../core/compatibility/extensions/8.0/activatorutilities-createinstance-behavior.md) +- [ActivatorUtilities.CreateInstance requires non-null provider](../core/compatibility/extensions/8.0/activatorutilities-createinstance-null-provider.md) +- [ConfigurationBinder throws for mismatched value](../core/compatibility/extensions/8.0/configurationbinder-exceptions.md) + +## .NET Framework + +### Updated articles + +- [How to: Determine which .NET Framework versions are installed](../framework/migration-guide/how-to-determine-which-versions-are-installed.md) - Add PowerShell scripts to determine .NET Fx versions ## .NET fundamentals ### New articles -- [Namespace does not match folder structure (IDE0130)](../fundamentals/code-analysis/style-rules/ide0130.md) -- [CA1852: Seal internal types](../fundamentals/code-analysis/quality-rules/ca1852.md) -- [CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'](../fundamentals/code-analysis/quality-rules/ca1853.md) -- [CA1855: Use Span\<T>.Clear() instead of Span\<T>.Fill()](../fundamentals/code-analysis/quality-rules/ca1855.md) -- [CA1858: Use StartsWith instead of IndexOf](../fundamentals/code-analysis/quality-rules/ca1858.md) +- [QUIC protocol](../fundamentals/networking/quic/quic-overview.md) +- [Install .NET SDK or .NET Runtime on Ubuntu 16.04](../core/install/linux-ubuntu-1604.md) +- [Install .NET SDK or .NET Runtime on Ubuntu 18.04](../core/install/linux-ubuntu-1804.md) +- [Install .NET SDK or .NET Runtime on Ubuntu 20.04](../core/install/linux-ubuntu-2004.md) +- [Install .NET SDK or .NET Runtime on Ubuntu 22.04](../core/install/linux-ubuntu-2204.md) +- [Install .NET SDK or .NET Runtime on Ubuntu 22.10](../core/install/linux-ubuntu-2210.md) + +### Updated articles + +- [What's new in .NET 8](../core/whats-new/dotnet-8.md) - Preview 2 updates for What's new in .NET 8 +- [Troubleshoot .NET errors related to missing files on Linux](../core/install/linux-package-mixup.md) - Updates to Ubuntu (and other related) documentation +- [Install the .NET SDK or the .NET Runtime on Ubuntu](../core/install/linux-ubuntu.md) - Updates to Ubuntu (and other related) documentation + +## .NET tools and diagnostics + +### New articles + +- [CA1860: Avoid using 'Enumerable.Any()' extension method](../fundamentals/code-analysis/quality-rules/ca1860.md) + +## Architecture guides + +### New articles + +- [MVVM Toolkit Features](../architecture/maui/mvvm-community-toolkit-features.md) ## C# language ### New articles -- [Code comments - `//` and `/*`. `*/`](../csharp/language-reference/tokens/comments.md) -- [Raw string literal text - repeated backticks in string literals](../csharp/language-reference/tokens/raw-string.md) +- [Access attributes using reflection](../csharp/advanced-topics/reflection-and-attributes/accessing-attributes-by-using-reflection.md) +- [Define and read custom attributes](../csharp/advanced-topics/reflection-and-attributes/attribute-tutorial.md) +- [Create custom attributes](../csharp/advanced-topics/reflection-and-attributes/creating-custom-attributes.md) +- [Generics and Attributes](../csharp/advanced-topics/reflection-and-attributes/generics-and-attributes.md) +- [Generics and reflection](../csharp/advanced-topics/reflection-and-attributes/generics-and-reflection.md) +- [How to create a C/C++ union by using attributes in C\#](../csharp/advanced-topics/reflection-and-attributes/how-to-create-a-c-cpp-union-by-using-attributes.md) +- [How to query an assembly's metadata with Reflection (LINQ)](../csharp/advanced-topics/reflection-and-attributes/how-to-query-assembly-metadata-with-reflection-linq.md) +- [Attributes](../csharp/advanced-topics/reflection-and-attributes/index.md) +- [using statement - ensure the correct use of disposable objects](../csharp/language-reference/statements/using.md) +- [.NET Runtime support for expression trees](../csharp/advanced-topics/expression-trees/expression-classes.md) +- [Build expression trees](../csharp/advanced-topics/expression-trees/expression-trees-building.md) +- [Execute expression trees](../csharp/advanced-topics/expression-trees/expression-trees-execution.md) +- [Expression trees - data that defines code](../csharp/advanced-topics/expression-trees/expression-trees-explained.md) +- [Interpret expressions](../csharp/advanced-topics/expression-trees/expression-trees-interpreting.md) +- [Translate expression trees](../csharp/advanced-topics/expression-trees/expression-trees-translating.md) +- [Expression Trees](../csharp/advanced-topics/expression-trees/index.md) + +## Microsoft Orleans + +### New articles + +- [Quickstart: Deploy and scale an Orleans app on Azure](../orleans/quickstarts/deploy-scale-orleans-on-azure.md) ### Updated articles -- [The history of C\#](../csharp/whats-new/csharp-version-history.md) - Reorder csharp history +- [Orleans NuGet packages](../orleans/resources/nuget-packages.md) - Added zones and NuGet package tables -## Microsoft Orleans +## Migration to .NET + +### Updated articles + +- [Upgrade a WPF App to .NET 7 with the .NET Upgrade Assistant](../core/porting/upgrade-assistant-wpf-framework.md) - Update upgrade assistant article for WPF + +## ML.NET ### New articles -- [Serialization configuration in Orleans](../orleans/host/configuration-guide/serialization-configuration.md) -- [Serialization customization in Orleans](../orleans/host/configuration-guide/serialization-customization.md) -- [Serialization of immutable types in Orleans](../orleans/host/configuration-guide/serialization-immutability.md) +- [Getting started with DataFrames](../machine-learning/how-to-guides/getting-started-dataframe.md) ### Updated articles -- [Serialization overview in Orleans](../orleans/host/configuration-guide/serialization.md) - Rewrite the Orleans serialization content with `7.0` in mind -- [Grain persistence](../orleans/grains/grain-persistence/index.md) - Grains 7.0 -- [Custom grain storage](../orleans/tutorials-and-samples/custom-grain-storage.md) - Grains 7.0 -- [Orleans streaming APIs](../orleans/streaming/streams-programming-apis.md) - Use pivots in stream content -- [Orleans streaming quickstart](../orleans/streaming/streams-quick-start.md) - Use pivots in stream content -- [Server configuration](../orleans/host/configuration-guide/server-configuration.md) - Server config +- [Deploy a model in an ASP.NET Core Web API](../machine-learning/how-to-guides/serve-model-web-api-ml-net.md) - Update how to deploy ML.NET in Web API ## Community contributors The following people contributed to the .NET docs during this period. Thank you! Learn how to contribute by following the links under "Get involved" in the [what's new landing page](index.yml). -- [Viniciusap](https://github.com/Viniciusap) - Vinicius Apolinário ![There were 4 pull requests merged by Vinicius Apolinário.](https://img.shields.io/badge/Merged%20Pull%20Requests-4-green) -- [JongHeonChoi](https://github.com/JongHeonChoi) ![There were 3 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) -- [Youssef1313](https://github.com/Youssef1313) - Youssef Victor ![There were 3 pull requests merged by Youssef Victor.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) -- [nschonni](https://github.com/nschonni) - Nick Schonning ![There were 2 pull requests merged by Nick Schonning.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [abecasism](https://github.com/abecasism) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [ayakael](https://github.com/ayakael) - Antoine Martin ![There were 1 pull requests merged by Antoine Martin.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [ctstacey](https://github.com/ctstacey) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [dimabarbul](https://github.com/dimabarbul) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [james-perfectserve](https://github.com/james-perfectserve) - James Freeman ![There were 1 pull requests merged by James Freeman.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [keenan137](https://github.com/keenan137) - Keenan Du Plessis ![There were 1 pull requests merged by Keenan Du Plessis.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [klu22](https://github.com/klu22) - Kevin Lu ![There were 1 pull requests merged by Kevin Lu.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [KotM](https://github.com/KotM) - Vitaly Filatenko ![There were 1 pull requests merged by Vitaly Filatenko.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [pkulikov](https://github.com/pkulikov) - Petr Kulikov ![There were 8 pull requests merged by Petr Kulikov.](https://img.shields.io/badge/Merged%20Pull%20Requests-8-green) +- [ardalis](https://github.com/ardalis) - Steve Smith ![There were 3 pull requests merged by Steve Smith.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) +- [BartoszKlonowski](https://github.com/BartoszKlonowski) - Bartosz Klonowski ![There were 3 pull requests merged by Bartosz Klonowski.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) +- [bribeiro-msft](https://github.com/bribeiro-msft) - Bruno Ribeiro ![There were 3 pull requests merged by Bruno Ribeiro.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) +- [CollinAlpert](https://github.com/CollinAlpert) - Collin Alpert ![There were 3 pull requests merged by Collin Alpert.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) +- [Naidile-P-N](https://github.com/Naidile-P-N) - Naidile P N ![There were 3 pull requests merged by Naidile P N.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) +- [HuaChan233](https://github.com/HuaChan233) - 花开花落 ![There were 2 pull requests merged by 花开花落.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [mchlstrng](https://github.com/mchlstrng) - ![There were 2 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [michaelstonis](https://github.com/michaelstonis) - Michael Stonis ![There were 2 pull requests merged by Michael Stonis.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [64J0](https://github.com/64J0) - Vinícius Gajo ![There were 1 pull requests merged by Vinícius Gajo.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [BoldAsLove](https://github.com/BoldAsLove) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Bouke](https://github.com/Bouke) - Bouke Haarsma ![There were 1 pull requests merged by Bouke Haarsma.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [dawedawe](https://github.com/dawedawe) - dawe ![There were 1 pull requests merged by dawe.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [dawei-wang](https://github.com/dawei-wang) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [DJm00n](https://github.com/DJm00n) - Dimitriy Ryazantcev ![There were 1 pull requests merged by Dimitriy Ryazantcev.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [dtdimi](https://github.com/dtdimi) - Dimi Toulakis ![There were 1 pull requests merged by Dimi Toulakis.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Emrebener](https://github.com/Emrebener) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [erruthes](https://github.com/erruthes) - Eduardo Ruthes ![There were 1 pull requests merged by Eduardo Ruthes.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [joostas](https://github.com/joostas) - Justas ![There were 1 pull requests merged by Justas.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [just-ero](https://github.com/just-ero) - Ero ![There were 1 pull requests merged by Ero.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Lanayx](https://github.com/Lanayx) - Vladimir Shchur ![There were 1 pull requests merged by Vladimir Shchur.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) - [mahab339](https://github.com/mahab339) - Muhab Abdelreheem ![There were 1 pull requests merged by Muhab Abdelreheem.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [MatsM16](https://github.com/MatsM16) - Mats Dyrøy ![There were 1 pull requests merged by Mats Dyrøy.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [minicatsCB](https://github.com/minicatsCB) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [MMaxwell66](https://github.com/MMaxwell66) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [morsiu](https://github.com/morsiu) - Łukasz Mrozek ![There were 1 pull requests merged by Łukasz Mrozek.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [MSDN-WhiteKnight](https://github.com/MSDN-WhiteKnight) - MSDN.WhiteKnight ![There were 1 pull requests merged by MSDN.WhiteKnight.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [nnpcYvIVl](https://github.com/nnpcYvIVl) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [Rans4ckeR](https://github.com/Rans4ckeR) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [selaskar](https://github.com/selaskar) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [YounesMDA](https://github.com/YounesMDA) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [zipperer](https://github.com/zipperer) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [MarcoMue](https://github.com/MarcoMue) - Marco ![There were 1 pull requests merged by Marco.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [meziantou](https://github.com/meziantou) - Gérald Barré ![There were 1 pull requests merged by Gérald Barré.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [michaelmcneilnet](https://github.com/michaelmcneilnet) - Michael McNeil ![There were 1 pull requests merged by Michael McNeil.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [mojofawad](https://github.com/mojofawad) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Ninja4Code](https://github.com/Ninja4Code) - Charles Owen ![There were 1 pull requests merged by Charles Owen.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [OoLunar](https://github.com/OoLunar) - Lunar Starstrum ![There were 1 pull requests merged by Lunar Starstrum.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [patricksadowski](https://github.com/patricksadowski) - Patrick Sadowski ![There were 1 pull requests merged by Patrick Sadowski.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [PoolloverNathan](https://github.com/PoolloverNathan) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Rob-Hague](https://github.com/Rob-Hague) - Rob Hague ![There were 1 pull requests merged by Rob Hague.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [spaette](https://github.com/spaette) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [tjaz-brelih](https://github.com/tjaz-brelih) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [vaind](https://github.com/vaind) - Ivan Dlugos ![There were 1 pull requests merged by Ivan Dlugos.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [vcrobe](https://github.com/vcrobe) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [WeihanLi](https://github.com/WeihanLi) - Weihan Li ![There were 1 pull requests merged by Weihan Li.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [whitehorsesoft](https://github.com/whitehorsesoft) - Aaron ![There were 1 pull requests merged by Aaron.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [YoshiRulz](https://github.com/YoshiRulz) - James Groom ![There were 1 pull requests merged by James Groom.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) diff --git a/docs/whats-new/dotnet-docs-mod1.md b/docs/whats-new/dotnet-docs-mod1.md index 3de1863055c94..d6a3d496507f5 100644 --- a/docs/whats-new/dotnet-docs-mod1.md +++ b/docs/whats-new/dotnet-docs-mod1.md @@ -1,113 +1,115 @@ --- -title: ".NET docs: What's new for October 2022" -description: "What's new in the .NET docs for October 2022." -ms.custom: October-2022 -ms.date: 11/01/2022 +title: ".NET docs: What's new for January 2023" +description: "What's new in the .NET docs for January 2023." +ms.custom: January-2023 +ms.date: 02/01/2023 --- -# .NET docs: What's new for October 2022 +# .NET docs: What's new for January 2023 -Welcome to what's new in the .NET docs for October 2022. This article lists some of the major changes to docs during this period. +Welcome to what's new in the .NET docs for January 2023. This article lists some of the major changes to docs during this period. ## .NET breaking changes ### New articles -- [Authentication in WebAssembly apps](../core/compatibility/aspnet-core/7.0/wasm-app-authentication.md) -- [Tracking linked cache entries](../core/compatibility/core-libraries/7.0/memorycache-tracking.md) -- [Fallback file endpoints](../core/compatibility/aspnet-core/7.0/fallback-file-endpoints.md) -- [Output caching API changes](../core/compatibility/aspnet-core/7.0/output-caching-renames.md) -- [Repeated XML elements include index](../core/compatibility/extensions/6.0/repeated-xml-elements.md) +- [Breaking changes in .NET 8](../core/compatibility/8.0.md) +- [Backslash mapping in Unix file paths](../core/compatibility/core-libraries/8.0/file-path-backslash.md) +- [WFDEV002 obsoletion is now an error](../core/compatibility/windows-forms/8.0/domainupdownaccessibleobject.md) +- [AnonymousPipeServerStream.Dispose behavior for HandleInheritability.Inheritable](../core/compatibility/core-libraries/8.0/anonymouspipeserverstream-dispose.md) +- [Legacy Console.ReadKey removed](../core/compatibility/core-libraries/8.0/console-readkey-legacy.md) +- [FileStream writes when pipe is closed](../core/compatibility/core-libraries/8.0/filestream-disposed-pipe.md) +- [Activity operation name when null](../core/compatibility/core-libraries/8.0/activity-operation-name.md) +- [TwoDigitYearMax default is 2049](../core/compatibility/globalization/8.0/twodigityearmax-default.md) +- [GetFolderPath behavior on Unix](../core/compatibility/core-libraries/8.0/getfolderpath-unix.md) +- [AesGcm authentication tag size on macOS](../core/compatibility/cryptography/8.0/aesgcm-auth-tag-size.md) +- [RSA.EncryptValue and RSA.DecryptValue are obsolete](../core/compatibility/cryptography/8.0/rsa-encrypt-decrypt-value-obsolete.md) +- [Anchor layout changes](../core/compatibility/windows-forms/8.0/anchor-layout.md) +- [Top-level forms scale minimum and maximum size to DPI](../core/compatibility/windows-forms/8.0/forms-scale-size-to-dpi.md) +- [WCF Client doesn't support .NET Standard](../core/compatibility/wcf-client/6.0/net-standard-2-support.md) +- [Automatic RuntimeIdentifier for publish only](../core/compatibility/sdk/7.0/automatic-rid-publish-only.md) + +## .NET Framework + +### New articles + +- [Build apps against Microsoft.NETFramework.ReferenceAssemblies](../framework/migration-guide/reference-assemblies.md) ## .NET fundamentals ### New articles -- [dotnet workload command](../core/tools/dotnet-workload.md) -- [Containerize a .NET app with dotnet publish](../core/docker/publish-as-container.md) -- [Networking telemetry in .NET](../fundamentals/networking/networking-telemetry.md) -- [CA2020: Prevent behavioral change caused by built-in operators of IntPtr/UIntPtr](../fundamentals/code-analysis/quality-rules/ca2020.md) -- [CA2260: Implement generic math interfaces correctly](../fundamentals/code-analysis/quality-rules/ca2260.md) -- [.NET regular expression source generators](../standard/base-types/regular-expression-source-generators.md) -- [Tutorial: Use custom marshallers in source-generated P/Invokes](../standard/native-interop/tutorial-custom-marshaller.md) +- [SYSLIB0048: RSA.EncryptValue and DecryptValue are obsolete](../fundamentals/syslib-diagnostics/syslib0048.md) +- [Dispose Pattern](../standard/design-guidelines/dispose-pattern.md) +- [How to use the DateOnly and TimeOnly structures](../standard/datetime/how-to-use-dateonly-timeonly.md) +- [CA1311: Specify a culture or use an invariant version](../fundamentals/code-analysis/quality-rules/ca1311.md) +- [CA1421: Method uses runtime marshalling when DisableRuntimeMarshallingAttribute is applied](../fundamentals/code-analysis/quality-rules/ca1421.md) +- [TLS/SSL best practices](../core/extensions/sslstream-best-practices.md) +- [Migrate SSL code from .NET Framework to .NET](../core/extensions/sslstream-migration-from-framework.md) +- [Troubleshoot `SslStream` authentication issues](../core/extensions/sslstream-troubleshooting.md) ### Updated articles -- [Code quality rules](../fundamentals/code-analysis/quality-rules/index.md) - Tweak code analysis rules +- [Dump collection and analysis utility (dotnet-dump)](../core/diagnostics/dotnet-dump.md) - Add newly supported Linux/MacOS SOS commands +- [Collect a distributed trace](../core/diagnostics/distributed-tracing-collection-walkthroughs.md) - Add ASP.NET distributed tracing example -## .NET IoT libraries +## F# language -### New articles +### Updated articles -- [Use GPIO for binary input](../iot/tutorials/gpio-input.md) +- [F# code formatting guidelines](../fsharp/style-guide/formatting.md) + - Add chained expressions guidance + - Stroustrup style guide -## C# language +## Microsoft Orleans ### New articles -- [Compiler Error CS8210](../csharp/language-reference/compiler-messages/cs8210.md) -- [Compiler Error CS1751](../csharp/language-reference/compiler-messages/cs1751.md) -- [Compiler Error CS8515](../csharp/language-reference/compiler-messages/cs8515.md) -- [Compiler Error CS8140](../csharp/language-reference/compiler-messages/cs8140.md) -- [Compiler Error CS8139](../csharp/language-reference/compiler-messages/cs8139.md) -- [Compiler Error CS8132](../csharp/language-reference/compiler-messages/cs8132.md) -- [Compiler Error CS8131](../csharp/language-reference/compiler-messages/cs8131.md) -- [Compiler Error CS8130](../csharp/language-reference/compiler-messages/cs8130.md) -- [Compiler Error CS8129](../csharp/language-reference/compiler-messages/cs8129.md) -- [Compiler Error CS8127](../csharp/language-reference/compiler-messages/cs8127.md) -- [Compiler Error CS8125](../csharp/language-reference/compiler-messages/cs8125.md) -- [Compiler Error CS8124](../csharp/language-reference/compiler-messages/cs8124.md) - -### Updated articles - -- [Tutorial: Make HTTP requests in a .NET console app using C\#](../csharp/tutorials/console-webapiclient.md) - -## F# language +- [Quickstart: Build your first Orleans app with ASP.NET Core](../orleans/quickstarts/build-your-first-orleans-app.md) +- [Broadcast channels in Orleans](../orleans/streaming/broadcast-channel.md) ### Updated articles -- [F# code formatting guidelines](../fsharp/style-guide/formatting.md) - Fsharp multiline type annotations +- [Orleans clients](../orleans/host/client.md) ## Community contributors The following people contributed to the .NET docs during this period. Thank you! Learn how to contribute by following the links under "Get involved" in the [what's new landing page](index.yml). -- [nschonni](https://github.com/nschonni) - Nick Schonning ![We merged 12 pull requests by Nick Schonning.](https://img.shields.io/badge/Merged%20Pull%20Requests-12-green) -- [peteraritchie](https://github.com/peteraritchie) - Peter Ritchie ![There were 9 pull requests merged by Peter Ritchie.](https://img.shields.io/badge/Merged%20Pull%20Requests-9-green) -- [pkulikov](https://github.com/pkulikov) - Petr Kulikov ![There were 6 pull requests merged by Petr Kulikov.](https://img.shields.io/badge/Merged%20Pull%20Requests-6-green) -- [udidahan](https://github.com/udidahan) - Udi Dahan ![There were 5 pull requests merged by Udi Dahan.](https://img.shields.io/badge/Merged%20Pull%20Requests-5-green) -- [GitHubPang](https://github.com/GitHubPang) ![There were 4 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-4-green) -- [ankitwww](https://github.com/ankitwww) - Ankit Kashyap ![There were 3 pull requests merged by Ankit Kashyap.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) -- [balazsberes](https://github.com/balazsberes) - Balazs Beres ![There were 3 pull requests merged by Balazs Beres.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) -- [bschaeublin](https://github.com/bschaeublin) - Benjamin Schäublin ![There were 3 pull requests merged by Benjamin Schäublin.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) -- [JJS](https://github.com/JJS) ![There were 3 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) -- [luizhlelis](https://github.com/luizhlelis) - Luiz Lelis ![There were 3 pull requests merged by Luiz Lelis.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) -- [Youssef1313](https://github.com/Youssef1313) - Youssef Victor ![There were 3 pull requests merged by Youssef Victor.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) -- [Marusyk](https://github.com/Marusyk) - Roman Marusyk ![There were 2 pull requests merged by Roman Marusyk.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [nojaf](https://github.com/nojaf) - Florian Verdonck ![There were 2 pull requests merged by Florian Verdonck.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [patricksadowski](https://github.com/patricksadowski) - Patrick Sadowski ![There were 2 pull requests merged by Patrick Sadowski.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [vcrobe](https://github.com/vcrobe) ![There were 2 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [wenz](https://github.com/wenz) - Christian Wenz ![There were 2 pull requests merged by Christian Wenz.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [cabrera-carlos](https://github.com/cabrera-carlos) - Carlos Cabrera ![There were 1 pull requests merged by Carlos Cabrera.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [Chazzersize](https://github.com/Chazzersize) - John ![There were 1 pull requests merged by John.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [collinstevens](https://github.com/collinstevens) - Collin Stevens ![There were 1 pull requests merged by Collin Stevens.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [DuncanSungWKim](https://github.com/DuncanSungWKim) - Duncan Sung W. Kim ![There were 1 pull requests merged by Duncan Sung W. Kim.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [eduardopelitti](https://github.com/eduardopelitti) - Eduardo Pelitti ![There were 1 pull requests merged by Eduardo Pelitti.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [eNeRGy164](https://github.com/eNeRGy164) - Michaël Hompus ![There were 1 pull requests merged by Michaël Hompus.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [ign3u5](https://github.com/ign3u5) - Chris Farmer ![There were 1 pull requests merged by Chris Farmer.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- itsbadr - Badr ![There were 1 pull requests merged by Badr.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [j-d-b](https://github.com/j-d-b) - Jacob Brady ![There were 1 pull requests merged by Jacob Brady.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [JiaqiWang18](https://github.com/JiaqiWang18) - Jiaqi (Jacky) Wang ![There were 1 pull requests merged by Jiaqi (Jacky) Wang.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [jonathlan](https://github.com/jonathlan) - Jonathan ![There were 1 pull requests merged by Jonathan.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [juliushardt](https://github.com/juliushardt) - Julius Hardt ![There were 1 pull requests merged by Julius Hardt.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [michpara](https://github.com/michpara) - Michelle Paradis ![There were 1 pull requests merged by Michelle Paradis.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [mikeblakeuk](https://github.com/mikeblakeuk) - Michael Blake ![There were 1 pull requests merged by Michael Blake.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [peter-dye](https://github.com/peter-dye) - Peter Dye ![There were 1 pull requests merged by Peter Dye.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [pjanotti](https://github.com/pjanotti) - Paulo Janotti ![There were 1 pull requests merged by Paulo Janotti.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [SeanKilleen](https://github.com/SeanKilleen) - Sean Killeen ![There were 1 pull requests merged by Sean Killeen.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [softwarepronto](https://github.com/softwarepronto) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [SunnieShine](https://github.com/SunnieShine) - Qitian Zhang ![There were 1 pull requests merged by Qitian Zhang.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [teo-tsirpanis](https://github.com/teo-tsirpanis) - Theodore Tsirpanis ![There were 1 pull requests merged by Theodore Tsirpanis.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [valoTN](https://github.com/valoTN) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [WhitWaldo](https://github.com/WhitWaldo) - Whit Waldo ![There were 1 pull requests merged by Whit Waldo.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [wmundev](https://github.com/wmundev) - Wilson Mun ![There were 1 pull requests merged by Wilson Mun.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [dawei-wang](https://github.com/dawei-wang) ![There were 5 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-5-green) +- [rogeriomc](https://github.com/rogeriomc) - Rogério Moraes de Carvalho ![There were 5 pull requests merged by Rogério Moraes de Carvalho.](https://img.shields.io/badge/Merged%20Pull%20Requests-5-green) +- [BartoszKlonowski](https://github.com/BartoszKlonowski) - Bartosz Klonowski ![There were 2 pull requests merged by Bartosz Klonowski.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [bjorkstromm](https://github.com/bjorkstromm) - Martin Björkström ![There were 2 pull requests merged by Martin Björkström.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [josh-degraw](https://github.com/josh-degraw) - Josh DeGraw ![There were 2 pull requests merged by Josh DeGraw.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [minsouk](https://github.com/minsouk) ![There were 2 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [surfmuggle](https://github.com/surfmuggle) - surfmuggle ![There were 2 pull requests merged by surfmuggle.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [svick](https://github.com/svick) - Petr Onderka ![There were 2 pull requests merged by Petr Onderka.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [alexrp](https://github.com/alexrp) - Alex Rønne Petersen ![There were 1 pull requests merged by Alex Rønne Petersen.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [amirhosseinsaloot](https://github.com/amirhosseinsaloot) - AmirhosseinSaloot ![There were 1 pull requests merged by AmirhosseinSaloot.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [ap0r](https://github.com/ap0r) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Benshi](https://github.com/Benshi) - OHSAWA Masashi ![There were 1 pull requests merged by OHSAWA Masashi.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [colindembovsky](https://github.com/colindembovsky) - Colin Dembovsky ![There were 1 pull requests merged by Colin Dembovsky.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [dkj468](https://github.com/dkj468) - Deepak Kumar Jain ![There were 1 pull requests merged by Deepak Kumar Jain.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [gentledepp](https://github.com/gentledepp) - Alexander Marek ![There were 1 pull requests merged by Alexander Marek.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [glenn-slayden](https://github.com/glenn-slayden) - Glenn Slayden ![There were 1 pull requests merged by Glenn Slayden.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [jacobilsoe](https://github.com/jacobilsoe) - Jacob Ilsø ![There were 1 pull requests merged by Jacob Ilsø.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [jwood803](https://github.com/jwood803) - Jon Wood ![There were 1 pull requests merged by Jon Wood.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [kant2002](https://github.com/kant2002) - Andrii Kurdiumov ![There were 1 pull requests merged by Andrii Kurdiumov.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [lindexi](https://github.com/lindexi) - lindexi ![There were 1 pull requests merged by lindexi.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [linkdotnet](https://github.com/linkdotnet) - Steven Giesel ![There were 1 pull requests merged by Steven Giesel.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [lukehammer](https://github.com/lukehammer) - Luke Hammer ![There were 1 pull requests merged by Luke Hammer.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [mahab339](https://github.com/mahab339) - Muhab Abdelreheem ![There were 1 pull requests merged by Muhab Abdelreheem.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [michaelmcneilnet](https://github.com/michaelmcneilnet) - Michael ![There were 1 pull requests merged by Michael.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [mycomycul](https://github.com/mycomycul) - Michael Strunk ![There were 1 pull requests merged by Michael Strunk.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Niravprajapati1](https://github.com/Niravprajapati1) - Nirav_Prajapati ![There were 1 pull requests merged by Nirav_Prajapati.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [nojaf](https://github.com/nojaf) - Florian Verdonck ![There were 1 pull requests merged by Florian Verdonck.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [olfek](https://github.com/olfek) - riz ![There were 1 pull requests merged by riz.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [poulinjulien](https://github.com/poulinjulien) - Julien Poulin ![There were 1 pull requests merged by Julien Poulin.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [S1GGEN](https://github.com/S1GGEN) - Sigurd Øines ![There were 1 pull requests merged by Sigurd Øines.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [sdavis3](https://github.com/sdavis3) - Shane Davis ![There were 1 pull requests merged by Shane Davis.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [syohex](https://github.com/syohex) - Shohei YOSHIDA ![There were 1 pull requests merged by Shohei YOSHIDA.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [TSanzo-BLE](https://github.com/TSanzo-BLE) - TSanzo_BLE ![There were 1 pull requests merged by TSanzo_BLE.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [ValentinBilla](https://github.com/ValentinBilla) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [xp44mm](https://github.com/xp44mm) - xp44mm ![There were 1 pull requests merged by xp44mm.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Youssef1313](https://github.com/Youssef1313) - Youssef Victor ![There were 1 pull requests merged by Youssef Victor.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [zipperer](https://github.com/zipperer) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) diff --git a/docs/whats-new/dotnet-docs-mod2.md b/docs/whats-new/dotnet-docs-mod2.md index 3a6110ac181bf..f9186e12be48a 100644 --- a/docs/whats-new/dotnet-docs-mod2.md +++ b/docs/whats-new/dotnet-docs-mod2.md @@ -1,116 +1,108 @@ --- -title: ".NET docs: What's new for November 2022" -description: "What's new in the .NET docs for November 2022." -ms.custom: November-2022 -ms.date: 12/01/2022 +title: ".NET docs: What's new for February 2023" +description: "What's new in the .NET docs for February 2023." +ms.custom: February-2023 +ms.date: 03/01/2023 --- -# .NET docs: What's new for November 2022 +# .NET docs: What's new for February 2023 -Welcome to what's new in the .NET docs for November 2022. This article lists some of the major changes to docs during this period. +Welcome to what's new in the .NET docs for February 2023. This article lists some of the major changes to docs during this period. ## .NET breaking changes ### New articles -- [BrotliStream no longer allows undefined CompressionLevel values](../core/compatibility/core-libraries/7.0/brotlistream-ctor.md) -- [Flow direction helper methods removed](../core/compatibility/maui/7.0/flow-direction-apis-removed.md) -- [Some Windows APIs are removed](../core/compatibility/maui/7.0/iwindowstatemanager-apis-removed.md) -- [Constructors accept base interface instead of concrete type](../core/compatibility/maui/7.0/mauiwebviewnavigationdelegate-constructor.md) -- [ScrollToRequest property renamed](../core/compatibility/maui/7.0/scrolltorequest-property-rename.md) -- [New UpdateBackground parameter](../core/compatibility/maui/7.0/updatebackground-parameter.md) -- [System.diagnostics entry in app.config](../core/compatibility/configuration/7.0/diagnostics-config-section.md) -- [API obsoletions with default diagnostic ID (.NET 7)](../core/compatibility/core-libraries/7.0/obsolete-apis-with-default-diagnostic.md) -- [System.Runtime.CompilerServices.Unsafe NuGet package](../core/compatibility/core-libraries/7.0/unsafe-package.md) -- [Environment variable prefixes](../core/compatibility/extensions/7.0/environment-variable-prefix.md) -- [Legacy FileStream strategy removed](../core/compatibility/core-libraries/7.0/filestream-compat-switch.md) -- [Time fields on symbolic links](../core/compatibility/core-libraries/7.0/symbolic-link-timestamps.md) +- [Solution-level `--output` option no longer valid for build-related commands](../core/compatibility/sdk/7.0/solution-level-output-no-longer-valid.md) +- ['dotnet pack' uses Release configuration](../core/compatibility/sdk/8.0/dotnet-pack-config.md) +- ['dotnet publish' uses Release configuration](../core/compatibility/sdk/8.0/dotnet-publish-config.md) +- [DateTime addition methods precision change](../core/compatibility/core-libraries/7.0/datetime-add-precision.md) +- [ExceptionCollection ctor throws ArgumentException](../core/compatibility/windows-forms/8.0/exceptioncollection.md) +- [ImageList.ColorDepth default is Depth32Bit](../core/compatibility/windows-forms/8.0/imagelist-colordepth.md) +- [TableLayoutStyleCollection throws ArgumentException](../core/compatibility/windows-forms/8.0/tablelayoutstylecollection.md) +- [Forms scale according to AutoScaleMode](../core/compatibility/windows-forms/8.0/top-level-window-scaling.md) +- [ITypeDescriptorContext nullable annotations](../core/compatibility/core-libraries/8.0/itypedescriptorcontext-props.md) ## .NET fundamentals ### New articles -- [What's new in .NET 7](../core/whats-new/dotnet-7.md) -- [What's new in docs for .NET 7](dotnet-7-docs.md) -- [SYSLIB diagnostics for regex source generation](../fundamentals/syslib-diagnostics/syslib1040-1049.md) -- [SYSLIB diagnostics for p/invoke source generation](../fundamentals/syslib-diagnostics/syslib1050-1069.md) -- [SYSLIB diagnostics for JavaScript interop source generation](../fundamentals/syslib-diagnostics/syslib1070-1089.md) -- [NuGet signed package verification](../core/tools/nuget-signed-package-verification.md) -- [SYSLIB0044: AssemblyName.CodeBase and AssemblyName.EscapedCodeBase are obsolete](../fundamentals/syslib-diagnostics/syslib0044.md) -- [SYSLIB0046: ControlledExecution.Run should not be used](../fundamentals/syslib-diagnostics/syslib0046.md) -- [CA2019: `ThreadStatic` fields should not use inline initialization](../fundamentals/code-analysis/quality-rules/ca2019.md) -- [CA2259: Ensure `ThreadStatic` is only used with static fields](../fundamentals/code-analysis/quality-rules/ca2259.md) -- [CA1420: Property, type, or attribute requires runtime marshalling](../fundamentals/code-analysis/quality-rules/ca1420.md) -- [CA1422: Validate platform compatibility - obsoleted APIs](../fundamentals/code-analysis/quality-rules/ca1422.md) -- [WebSockets support in .NET](../fundamentals/networking/websockets.md) +- [Create a Windows Service installer](../core/extensions/windows-service-with-installer.md) +- [Microsoft .NET language strategy](../fundamentals/languages.md) +- [What's new in .NET 8](../core/whats-new/dotnet-8.md) +- [Handle missing members during deserialization](../standard/serialization/system-text-json/missing-members.md) + +## .NET tools and diagnostics + +### New articles + +- [Collect dumps on crash](../core/diagnostics/collect-dumps-crash.md) +- [Debug Windows dumps](../core/diagnostics/debug-windows-dumps.md) + +## Architecture guides ### Updated articles -- [dotnet-coverage code coverage utility](../core/additional-tools/dotnet-coverage.md) - Add static instrumentation option into documentation -- [Install the .NET SDK or the .NET Runtime on Ubuntu](../core/install/linux-ubuntu.md) - Updates for linux install instructions -- [TCP overview](../fundamentals/networking/sockets/tcp-classes.md) - Equivalent usages section in TCP +- [Make secure .NET Microservices and Web Applications](../architecture/microservices/secure-net-microservices-web-applications/index.md) - Microservices eBook net7 Update ## C# language ### New articles -- [Resolve warnings related to language features and versions](../csharp/language-reference/compiler-messages/feature-version-errors.md) -- [Pattern matching warnings](../csharp/language-reference/compiler-messages/pattern-matching-warnings.md) - -## Microsoft Orleans +- [Annotated C# strategy](../csharp/tour-of-csharp/strategy.md) +- [Reduce memory allocations using new C# features](../csharp/advanced-topics/performance/index.md) +- [Tutorial: Reduce memory allocations with `ref` safety](../csharp/advanced-topics/performance/ref-tutorial.md) -### New articles +### Updated articles -- [What's new in Orleans 7.0](../orleans/whats-new-in-orleans.md)\ +- [C# Coding Conventions](../csharp/fundamentals/coding-style/coding-conventions.md) - Update coding-conventions.md -## ML.NET +## F# language ### New articles -- [What is Automated Machine Learning (AutoML)?](../machine-learning/automated-machine-learning-mlnet.md) -- [What is deep learning?](../machine-learning/deep-learning-overview.md) +- [Annotated F# strategy](../fsharp/strategy.md) + +## Microsoft Orleans ### Updated articles -- [What is Model Builder and how does it work?](../machine-learning/automate-training-with-model-builder.md) - ML.NET doc updates -- [How to use the ML.NET Automated Machine Learning (AutoML) API](../machine-learning/how-to-guides/how-to-use-the-automl-api.md) - ML.NET doc updates -- [Tutorial: Analyze sentiment of website comments in a web application using ML.NET Model Builder](../machine-learning/tutorials/sentiment-analysis-model-builder.md) - ML.NET doc updates +- [Orleans observability](../orleans/host/monitoring/index.md) - Orleans observability: logging, metrics and distributed tracing +- [Grain lifecycle overview](../orleans/grains/grain-lifecycle.md) - Be a bit more explicit about persisted state + +## Visual Basic language + +### New articles + +- [Annotated Visual Basic language strategy](../visual-basic/getting-started/strategy.md) ## Community contributors The following people contributed to the .NET docs during this period. Thank you! Learn how to contribute by following the links under "Get involved" in the [what's new landing page](index.yml). -- [Youssef1313](https://github.com/Youssef1313) - Youssef Victor ![There were 6 pull requests merged by Youssef Victor.](https://img.shields.io/badge/Merged%20Pull%20Requests-6-green) -- [IanKemp](https://github.com/IanKemp) - Ian Kemp ![There were 3 pull requests merged by Ian Kemp.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) -- [JongHeonChoi](https://github.com/JongHeonChoi) ![There were 2 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [rhires](https://github.com/rhires) ![There were 2 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [aL3891](https://github.com/aL3891) - aL3891 ![There were 1 pull requests merged by aL3891.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [alex-jitbit](https://github.com/alex-jitbit) - Alexander Yumashev ![There were 1 pull requests merged by Alexander Yumashev.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [AshleighAdams](https://github.com/AshleighAdams) - Ashleigh Adams ![There were 1 pull requests merged by Ashleigh Adams.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [awright18](https://github.com/awright18) - Adam Wright ![There were 1 pull requests merged by Adam Wright.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [balazsberes](https://github.com/balazsberes) - Balazs Beres ![There were 1 pull requests merged by Balazs Beres.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [ch1seL](https://github.com/ch1seL) - Alexander Salamatov ![There were 1 pull requests merged by Alexander Salamatov.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [ddobric](https://github.com/ddobric) - Damir Dobric ![There were 1 pull requests merged by Damir Dobric.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [dev-in-disguise](https://github.com/dev-in-disguise) - Manuel Zelenka ![There were 1 pull requests merged by Manuel Zelenka.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [EgoPingvina](https://github.com/EgoPingvina) - Aleksey Biryukov ![There were 1 pull requests merged by Aleksey Biryukov.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [eli-entelis](https://github.com/eli-entelis) - Eli Entelis ![There were 1 pull requests merged by Eli Entelis.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [gusty](https://github.com/gusty) - Gustavo Leon ![There were 1 pull requests merged by Gustavo Leon.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [hoang-himself](https://github.com/hoang-himself) - Hoàng ![There were 1 pull requests merged by Hoàng.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [HTSchoenfelder](https://github.com/HTSchoenfelder) - Henrik Schönfelder ![There were 1 pull requests merged by Henrik Schönfelder.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [imcanida](https://github.com/imcanida) - Ian Canida ![There were 1 pull requests merged by Ian Canida.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [JJS](https://github.com/JJS) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [JohnCgp](https://github.com/JohnCgp) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [mfried40](https://github.com/mfried40) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [MichelMichels](https://github.com/MichelMichels) - Michel Michels ![There were 1 pull requests merged by Michel Michels.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [mrEDitor](https://github.com/mrEDitor) - Eduard Minasyan ![There were 1 pull requests merged by Eduard Minasyan.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [neilboyd](https://github.com/neilboyd) - Neil Boyd ![There were 1 pull requests merged by Neil Boyd.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [patricksadowski](https://github.com/patricksadowski) - Patrick Sadowski ![There were 1 pull requests merged by Patrick Sadowski.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [PreussenKaiser](https://github.com/PreussenKaiser) - Karl Lukan ![There were 1 pull requests merged by Karl Lukan.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [selaskar](https://github.com/selaskar) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [Stancobridge](https://github.com/Stancobridge) - Okechukwu Somtochukwu ![There were 1 pull requests merged by Okechukwu Somtochukwu.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [SteveDunn](https://github.com/SteveDunn) - Steve Dunn ![There were 1 pull requests merged by Steve Dunn.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [sunghwan2789](https://github.com/sunghwan2789) - Sunghwan Bang ![There were 1 pull requests merged by Sunghwan Bang.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [udidahan](https://github.com/udidahan) - Udi Dahan ![There were 1 pull requests merged by Udi Dahan.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [vcrobe](https://github.com/vcrobe) ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [x789](https://github.com/x789) - TillW ![There were 1 pull requests merged by TillW.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [zeynelok](https://github.com/zeynelok) - Zeynel OK ![There were 1 pull requests merged by Zeynel OK.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [ardalis](https://github.com/ardalis) - Steve Smith ![There were 14 pull requests merged by Steve Smith.](https://img.shields.io/badge/Merged%20Pull%20Requests-14-green) +- [BartoszKlonowski](https://github.com/BartoszKlonowski) - Bartosz Klonowski ![There were 3 pull requests merged by Bartosz Klonowski.](https://img.shields.io/badge/Merged%20Pull%20Requests-3-green) +- [dutts](https://github.com/dutts) - Richard D ![There were 2 pull requests merged by Richard D.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [glenn-slayden](https://github.com/glenn-slayden) - Glenn Slayden ![There were 2 pull requests merged by Glenn Slayden.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [mahab339](https://github.com/mahab339) - Muhab Abdelreheem ![There were 2 pull requests merged by Muhab Abdelreheem.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) +- [am11](https://github.com/am11) - Adeel Mujahid ![There were 1 pull requests merged by Adeel Mujahid.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [ascpixi](https://github.com/ascpixi) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Avabin](https://github.com/Avabin) - Andrzej Piotrowski ![There were 1 pull requests merged by Andrzej Piotrowski.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [baylig](https://github.com/baylig) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [CollinAlpert](https://github.com/CollinAlpert) - Collin Alpert ![There were 1 pull requests merged by Collin Alpert.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [ctstacey](https://github.com/ctstacey) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [dawedawe](https://github.com/dawedawe) - dawe ![There were 1 pull requests merged by dawe.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [fgottschalk](https://github.com/fgottschalk) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [GitHubPang](https://github.com/GitHubPang) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [KristofferStrube](https://github.com/KristofferStrube) - Kristoffer Strube ![There were 1 pull requests merged by Kristoffer Strube.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [larsholm](https://github.com/larsholm) - Lars Holm Jensen ![There were 1 pull requests merged by Lars Holm Jensen.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [omajid](https://github.com/omajid) - Omair Majid ![There were 1 pull requests merged by Omair Majid.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [pkulikov](https://github.com/pkulikov) - Petr Kulikov ![There were 1 pull requests merged by Petr Kulikov.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [ramronn](https://github.com/ramronn) - RonaldB ![There were 1 pull requests merged by RonaldB.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [rhires](https://github.com/rhires) - ![There were 1 pull requests merged by .](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [rramoscabral](https://github.com/rramoscabral) - Ricardo Cabral ![There were 1 pull requests merged by Ricardo Cabral.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [TheElectricCo](https://github.com/TheElectricCo) - Lens Meyvaert ![There were 1 pull requests merged by Lens Meyvaert.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [ursenzler](https://github.com/ursenzler) - Urs Enzler ![There were 1 pull requests merged by Urs Enzler.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [vanillajonathan](https://github.com/vanillajonathan) - Jonathan ![There were 1 pull requests merged by Jonathan.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [vladimir-litvinchik](https://github.com/vladimir-litvinchik) - Vladimir Litvinchik ![There were 1 pull requests merged by Vladimir Litvinchik.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) +- [Youssef1313](https://github.com/Youssef1313) - Youssef Victor ![There were 1 pull requests merged by Youssef Victor.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) diff --git a/docs/whats-new/index.yml b/docs/whats-new/index.yml index 67d6139a318b8..b85941c8c52f9 100644 --- a/docs/whats-new/index.yml +++ b/docs/whats-new/index.yml @@ -5,7 +5,7 @@ summary: Welcome to what's new in .NET docs. Use this page to quickly find the l metadata: title: .NET documentation what's new? description: Learn about new and updated content in .NET docs. - ms.date: 01/05/2023 + ms.date: 04/01/2023 ms.topic: landing-page landingContent: - title: .NET release updates @@ -18,11 +18,11 @@ landingContent: linkLists: - linkListType: whats-new links: - - text: December 2022 + - text: March 2023 url: dotnet-docs-mod0.md - - text: November 2022 + - text: February 2023 url: dotnet-docs-mod2.md - - text: October 2022 + - text: January 2023 url: dotnet-docs-mod1.md - title: Find language updates linkLists: diff --git a/docs/whats-new/toc.yml b/docs/whats-new/toc.yml index 06dac8776b91c..8e11f3a53ea11 100644 --- a/docs/whats-new/toc.yml +++ b/docs/whats-new/toc.yml @@ -8,9 +8,9 @@ items: - name: Latest documentation updates expanded: true items: - - name: December 2022 + - name: March 2023 href: dotnet-docs-mod0.md - - name: November 2022 + - name: February 2023 href: dotnet-docs-mod2.md - - name: October 2022 + - name: January 2023 href: dotnet-docs-mod1.md diff --git a/docs/zone-pivot-groups.yml b/docs/zone-pivot-groups.yml index b81951750af80..0b47c1acb06ee 100644 --- a/docs/zone-pivot-groups.yml +++ b/docs/zone-pivot-groups.yml @@ -10,6 +10,16 @@ groups: title: Linux - id: os-macos title: macOS +- id: operating-systems-set-two + title: Linux Operating System + prompt: Choose a Linux distribution + pivots: + - id: os-linux-redhat + title: 'Fedora, CentOS, or RHEL' + - id: os-linux-ubuntu + title: Ubuntu + - id: os-linux-other + title: Other - id: unit-testing-framework-set-one title: Unit testing framework prompt: Choose a unit testing framework @@ -38,6 +48,20 @@ groups: title: Visual Studio Code - id: cli title: Command line interface +- id: dotnet-preview-version + title: .NET version + prompt: Choose a .NET version + pivots: + - id: dotnet-8-0 + title: .NET 8 Preview + - id: dotnet-7-0 + title: .NET 7 + - id: dotnet-6-0 + title: .NET 6 + - id: dotnet-5-0 + title: .NET 5 + - id: dotnet-core-3-1 + title: .NET Core 3.1 - id: dotnet-version title: .NET version prompt: Choose a .NET version @@ -50,6 +74,14 @@ groups: title: .NET 5 - id: dotnet-core-3-1 title: .NET Core 3.1 +- id: dotnet-version-6-7 + title: .NET version + prompt: Choose a .NET version + pivots: + - id: dotnet-7-0 + title: .NET 7 + - id: dotnet-6-0 + title: .NET 6 - id: orleans-version title: Orleans version prompt: Choose an Orleans version diff --git a/dotnet-versionsweeper.json b/dotnet-versionsweeper.json index 9f8570b63ee99..c6759e15ad9ee 100644 --- a/dotnet-versionsweeper.json +++ b/dotnet-versionsweeper.json @@ -9,6 +9,8 @@ "**/docs/core/porting/snippets/upgrade-assistant-wcf-framework/CalculatorSample/**/*.csproj", "**/docs/core/whats-new/snippets/**/*.csproj", "**/docs/core/whats-new/snippets/**/*.vbproj", - "**/docs/core/whats-new/snippets/**/*.fsproj" + "**/docs/core/whats-new/snippets/**/*.fsproj", + "**/docs/csharp/advanced-topics/interop/snippets/**/*.csproj", + "**/docs/csharp/programming-guide/classes-and-structs/snippets/NamedAndOptional/namedandoptionalsnippets.csproj" ] } diff --git a/includes/csharp-strategy.md b/includes/csharp-strategy.md new file mode 100644 index 0000000000000..162af9548232f --- /dev/null +++ b/includes/csharp-strategy.md @@ -0,0 +1,7 @@ +--- +author: billwagner +ms.author: wiwagn +ms.date: 02/05/2023 +ms.topic: include +--- +We will keep evolving C# to meet the changing needs of developers and remain a state-of-the-art programming language. We will innovate eagerly and broadly in collaboration with the teams responsible for .NET libraries, developer tools, and workload support, while being careful to stay within the spirit of the language. Recognizing the diversity of domains where C# is being used, we will prefer language and performance improvements that benefit all or most developers and maintain a high commitment to backwards compatibility. We will continue to empower the broader .NET ecosystem and grow its role in C#’s future, while maintaining stewardship of design decisions. diff --git a/includes/deprecating-api-port.md b/includes/deprecating-api-port.md new file mode 100644 index 0000000000000..ed8b2b8fc9a2e --- /dev/null +++ b/includes/deprecating-api-port.md @@ -0,0 +1,2 @@ +> [!NOTE] +> We're in the process of deprecating API Port in favor of integrating binary analysis directly into [.NET Upgrade Assistant](https://github.com/dotnet/upgrade-assistant). In the upcoming months, we're going to shut down the backend service of API Port, which will require using the tool offline. For more information, see [GitHub: .NET API Port repository](https://github.com/microsoft/dotnet-apiport/blob/dev/docs/Console/README.md#run-the-tool-in-an-offline-mode).* diff --git a/includes/dotnet-new-7-0-syntax.md b/includes/dotnet-new-7-0-syntax.md index ff528a6d6f79e..a05f9b65f7c78 100644 --- a/includes/dotnet-new-7-0-syntax.md +++ b/includes/dotnet-new-7-0-syntax.md @@ -7,7 +7,7 @@ ms.topic: include Starting with the .NET 7 SDK, the `dotnet new` syntax has changed: -- The `--list`, `--search`, `--install`, and `--uninstall` options became `list`, `search`, `install` and `uninstall` subcommands. +- The `--list`, `--search`, `--install`, and `--uninstall` options became `list`, `search`, `install`, and `uninstall` subcommands. - The `--update-apply` option became the `update` subcommand. - To use `--update-check`, use the `update` subcommand with the `--check-only` option. diff --git a/includes/fsharp-strategy.md b/includes/fsharp-strategy.md new file mode 100644 index 0000000000000..afc3f7de72dd2 --- /dev/null +++ b/includes/fsharp-strategy.md @@ -0,0 +1,7 @@ +--- +author: billwagner +ms.author: wiwagn +ms.date: 02/05/2023 +ms.topic: include +--- +We will drive F# evolution and support the F# ecosystem with language leadership and governance. We will encourage community contributions to improve the F# language and developer experience. We will continue to rely on the community to provide important libraries, developer tools and [workload](../docs/standard/glossary.md#workload) support. As the language evolves, F# will support .NET platform improvements and maintain interoperability with new C# features. We will work across language, tooling, and documentation to lower the barrier to entry into F# for new developers and organizations as well as broadening its reach into new domains. diff --git a/includes/net-standard-2.1.md b/includes/net-standard-2.1.md index 3187e9069c7ef..3eb8b0b5a11ce 100644 --- a/includes/net-standard-2.1.md +++ b/includes/net-standard-2.1.md @@ -8,13 +8,15 @@ | Xamarin.iOS | 12.16 | | Xamarin.Mac | 5.16 | | Xamarin.Android | 10.0 | -| Universal Windows Platform | TBD | +| Universal Windows Platform | N/A<sup>3</sup> | | Unity | 2021.2 | <sup>1</sup> The versions listed for .NET Framework apply to .NET Core 2.0 SDK and later versions of the tooling. Older versions used a different mapping for .NET Standard 1.5 and higher. You can [download tooling for .NET Core tools for Visual Studio 2015](https://github.com/dotnet/core/blob/main/release-notes/download-archives) if you cannot upgrade to Visual Studio 2017 or a later version. <sup>2</sup> .NET Framework doesn't support .NET Standard 2.1. For more information, see the [announcement of .NET Standard 2.1](https://devblogs.microsoft.com/dotnet/announcing-net-standard-2-1/). +<sup>3</sup> UWP doesn't support .NET Standard 2.1. + For more information, see [.NET Standard 2.1][2.1]. For an interactive table, see [.NET Standard versions](https://dotnet.microsoft.com/platform/dotnet-standard#versions). [2.1]: https://github.com/dotnet/standard/blob/v2.1.0/docs/versions/netstandard2.1.md diff --git a/includes/regex.md b/includes/regex.md index c032b5d498eab..dac95ae302513 100644 --- a/includes/regex.md +++ b/includes/regex.md @@ -1,3 +1,3 @@ > [!WARNING] -> When using <xref:System.Text.RegularExpressions> to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions`, causing a [Denial-of-Service attack](https://www.us-cert.gov/ncas/tips/ST04-015). ASP.NET Core framework APIs that use `RegularExpressions` pass a timeout. +> When using <xref:System.Text.RegularExpressions> to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions`, causing a [Denial-of-Service attack](https://www.cisa.gov/news-events/news/understanding-denial-service-attacks). ASP.NET Core framework APIs that use `RegularExpressions` pass a timeout. diff --git a/includes/vb-strategy.md b/includes/vb-strategy.md new file mode 100644 index 0000000000000..9dbbef3fb5f00 --- /dev/null +++ b/includes/vb-strategy.md @@ -0,0 +1,7 @@ +--- +author: billwagner +ms.author: wiwagn +ms.date: 02/05/2023 +ms.topic: include +--- +We will ensure Visual Basic remains a straightforward and approachable language with a stable design. The core libraries of .NET (such as the BCL) will support VB and many of the improvements to the .NET Runtime and libraries will automatically benefit VB. When C# or the .NET Runtime introduce new features that would require language support, VB will generally adopt a consumption-only approach and avoid new syntax. We do not plan to extend Visual Basic to new workloads. We will continue to invest in the experience in Visual Studio and interop with C#, especially in core VB scenarios such as Windows Forms and libraries. diff --git a/samples/snippets/core/testing/unit-testing-best-practices/csharp/after/unit-testing-best-practices-after.csproj b/samples/snippets/core/testing/unit-testing-best-practices/csharp/after/unit-testing-best-practices-after.csproj index f1f068792e8c0..34150f117527c 100644 --- a/samples/snippets/core/testing/unit-testing-best-practices/csharp/after/unit-testing-best-practices-after.csproj +++ b/samples/snippets/core/testing/unit-testing-best-practices/csharp/after/unit-testing-best-practices-after.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="xunit" Version="2.4.2" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" /> </ItemGroup> diff --git a/samples/snippets/core/testing/unit-testing-best-practices/csharp/before/unit-testing-best-practices-before.csproj b/samples/snippets/core/testing/unit-testing-best-practices/csharp/before/unit-testing-best-practices-before.csproj index f1f068792e8c0..34150f117527c 100644 --- a/samples/snippets/core/testing/unit-testing-best-practices/csharp/before/unit-testing-best-practices-before.csproj +++ b/samples/snippets/core/testing/unit-testing-best-practices/csharp/before/unit-testing-best-practices-before.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="xunit" Version="2.4.2" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" /> </ItemGroup> diff --git a/samples/snippets/core/testing/unit-testing-using-dotnet-test/csharp/PrimeService.Tests/PrimeService.Tests.csproj b/samples/snippets/core/testing/unit-testing-using-dotnet-test/csharp/PrimeService.Tests/PrimeService.Tests.csproj index 41370e6e50e95..041c379dd3ffb 100644 --- a/samples/snippets/core/testing/unit-testing-using-dotnet-test/csharp/PrimeService.Tests/PrimeService.Tests.csproj +++ b/samples/snippets/core/testing/unit-testing-using-dotnet-test/csharp/PrimeService.Tests/PrimeService.Tests.csproj @@ -6,7 +6,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="xunit" Version="2.4.2" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" /> </ItemGroup> diff --git a/samples/snippets/core/testing/unit-testing-using-nunit/csharp/PrimeService.Tests/PrimeService.Tests.csproj b/samples/snippets/core/testing/unit-testing-using-nunit/csharp/PrimeService.Tests/PrimeService.Tests.csproj index abb73b093db99..6ed6072bc2076 100644 --- a/samples/snippets/core/testing/unit-testing-using-nunit/csharp/PrimeService.Tests/PrimeService.Tests.csproj +++ b/samples/snippets/core/testing/unit-testing-using-nunit/csharp/PrimeService.Tests/PrimeService.Tests.csproj @@ -9,8 +9,8 @@ <!--<snippetPackages>--> <ItemGroup> <PackageReference Include="nunit" Version="3.13.3" /> - <PackageReference Include="NUnit3TestAdapter" Version="4.3.1" /> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="NUnit3TestAdapter" Version="4.4.2" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> </ItemGroup> <!--</snippetPackages>--> diff --git a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService.Tests/PrimeService.Tests.vbproj b/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService.Tests/PrimeService.Tests.vbproj deleted file mode 100644 index 90b1cac196159..0000000000000 --- a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService.Tests/PrimeService.Tests.vbproj +++ /dev/null @@ -1,19 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> - - <IsPackable>false</IsPackable> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> - <PackageReference Include="xunit" Version="2.4.2" /> - <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" /> - </ItemGroup> - - <ItemGroup> - <ProjectReference Include="..\PrimeService\PrimeService.vbproj" /> - </ItemGroup> - -</Project> diff --git a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService.Tests/PrimeService_IsPrimeShould.vb b/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService.Tests/PrimeService_IsPrimeShould.vb deleted file mode 100644 index dd686c6bb8c80..0000000000000 --- a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService.Tests/PrimeService_IsPrimeShould.vb +++ /dev/null @@ -1,41 +0,0 @@ -Imports Xunit - -Namespace PrimeService.Tests - '<Sample_TestCode> - Public Class PrimeService_IsPrimeShould - Private _primeService As Prime.Services.PrimeService = New Prime.Services.PrimeService() - - <Theory> - <InlineData(-1)> - <InlineData(0)> - <InlineData(1)> - Sub IsPrime_ValueLessThan2_ReturnFalse(value As Integer) - Dim result As Boolean = _primeService.IsPrime(value) - - Assert.False(result, $"{value} should not be prime") - End Sub - - <Theory> - <InlineData(2)> - <InlineData(3)> - <InlineData(5)> - <InlineData(7)> - Public Sub IsPrime_PrimesLessThan10_ReturnTrue(value As Integer) - Dim result As Boolean = _primeService.IsPrime(value) - - Assert.True(result, $"{value} should be prime") - End Sub - - <Theory> - <InlineData(4)> - <InlineData(6)> - <InlineData(8)> - <InlineData(9)> - Public Sub IsPrime_NonPrimesLessThan10_ReturnFalse(value As Integer) - Dim result As Boolean = _primeService.IsPrime(value) - - Assert.False(result, $"{value} should not be prime") - End Sub - End Class - '</Sample_TestCode> -End Namespace diff --git a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService/PrimeService.vb b/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService/PrimeService.vb deleted file mode 100644 index ed120b34f1608..0000000000000 --- a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService/PrimeService.vb +++ /dev/null @@ -1,15 +0,0 @@ -Namespace Prime.Services - Public Class PrimeService - Public Function IsPrime(candidate As Integer) As Boolean - If candidate < 2 Then - Return False - End If - For divisor As Integer = 2 To Math.Sqrt(candidate) - If candidate Mod divisor = 0 Then - Return False - End If - Next - Return True - End Function - End Class -End Namespace diff --git a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService/PrimeService.vbproj b/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService/PrimeService.vbproj deleted file mode 100644 index 9f5c4f4abb611..0000000000000 --- a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/PrimeService/PrimeService.vbproj +++ /dev/null @@ -1,7 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <TargetFramework>netstandard2.0</TargetFramework> - </PropertyGroup> - -</Project> diff --git a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/unit-testing-vb-dotnet-test.sln b/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/unit-testing-vb-dotnet-test.sln deleted file mode 100644 index 6c4ada2a7b253..0000000000000 --- a/samples/snippets/core/testing/unit-testing-vb-dotnet-test/vb/unit-testing-vb-dotnet-test.sln +++ /dev/null @@ -1,50 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26730.12 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "PrimeService", "PrimeService\PrimeService.vbproj", "{B2AB2D08-A311-43DA-819B-C828E2A98DF6}" -EndProject -Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "PrimeService.Tests", "PrimeService.Tests\PrimeService.Tests.vbproj", "{8C050B64-1E78-4FA3-AE18-D107F9D73BAA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Debug|x64.ActiveCfg = Debug|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Debug|x64.Build.0 = Debug|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Debug|x86.ActiveCfg = Debug|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Debug|x86.Build.0 = Debug|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Release|Any CPU.Build.0 = Release|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Release|x64.ActiveCfg = Release|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Release|x64.Build.0 = Release|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Release|x86.ActiveCfg = Release|Any CPU - {B2AB2D08-A311-43DA-819B-C828E2A98DF6}.Release|x86.Build.0 = Release|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Debug|x64.ActiveCfg = Debug|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Debug|x64.Build.0 = Debug|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Debug|x86.ActiveCfg = Debug|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Debug|x86.Build.0 = Debug|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Release|Any CPU.Build.0 = Release|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Release|x64.ActiveCfg = Release|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Release|x64.Build.0 = Release|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Release|x86.ActiveCfg = Release|Any CPU - {8C050B64-1E78-4FA3-AE18-D107F9D73BAA}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {2E2D4E8F-6361-4CD2-A505-B19A84F72C32} - EndGlobalSection -EndGlobal diff --git a/samples/snippets/core/testing/unit-testing-vb-mstest/vb/PrimeService.Tests/PrimeService.Tests.vbproj b/samples/snippets/core/testing/unit-testing-vb-mstest/vb/PrimeService.Tests/PrimeService.Tests.vbproj index 934772f413475..0d63c59c6d9e2 100644 --- a/samples/snippets/core/testing/unit-testing-vb-mstest/vb/PrimeService.Tests/PrimeService.Tests.vbproj +++ b/samples/snippets/core/testing/unit-testing-vb-mstest/vb/PrimeService.Tests/PrimeService.Tests.vbproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="MSTest.TestAdapter" Version="3.0.2" /> <PackageReference Include="MSTest.TestFramework" Version="3.0.2" /> </ItemGroup> diff --git a/samples/snippets/core/testing/unit-testing-vb-nunit/vb/PrimeService.Tests/PrimeService.Tests.vbproj b/samples/snippets/core/testing/unit-testing-vb-nunit/vb/PrimeService.Tests/PrimeService.Tests.vbproj index d18d35bf77ba3..2c1435031c5e2 100644 --- a/samples/snippets/core/testing/unit-testing-vb-nunit/vb/PrimeService.Tests/PrimeService.Tests.vbproj +++ b/samples/snippets/core/testing/unit-testing-vb-nunit/vb/PrimeService.Tests/PrimeService.Tests.vbproj @@ -9,8 +9,8 @@ <!--<snippetPackages>--> <ItemGroup> <PackageReference Include="nunit" Version="3.13.3" /> - <PackageReference Include="NUnit3TestAdapter" Version="4.3.1" /> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="NUnit3TestAdapter" Version="4.4.2" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> </ItemGroup> <!--</snippetPackages>--> diff --git a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/AppWithPlugin.sln b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/AppWithPlugin.sln index 7441e6344c871..030518a935c66 100644 --- a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/AppWithPlugin.sln +++ b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/AppWithPlugin.sln @@ -9,14 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PluginBase", "PluginBase\Pl EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloPlugin", "HelloPlugin\HelloPlugin.csproj", "{667AE307-5502-4215-AAC6-76DD86AFCFA2}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonPlugin", "JsonPlugin\JsonPlugin.csproj", "{3D8BDD28-348B-4BA8-BEBA-B4CAD5D3B395}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OldJsonPlugin", "OldJsonPlugin\OldJsonPlugin.csproj", "{7A0C7AE7-3BD8-4E85-ADDB-9653FAE8A91B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FrenchPlugin", "FrenchPlugin\FrenchPlugin.csproj", "{BDCB21F4-05FC-4047-9B35-58084FFFE49C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UVPlugin", "UVPlugin\UVPlugin.csproj", "{B8698156-310C-471E-A957-58A118954BB5}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -35,22 +27,6 @@ Global {667AE307-5502-4215-AAC6-76DD86AFCFA2}.Debug|Any CPU.Build.0 = Debug|Any CPU {667AE307-5502-4215-AAC6-76DD86AFCFA2}.Release|Any CPU.ActiveCfg = Release|Any CPU {667AE307-5502-4215-AAC6-76DD86AFCFA2}.Release|Any CPU.Build.0 = Release|Any CPU - {3D8BDD28-348B-4BA8-BEBA-B4CAD5D3B395}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3D8BDD28-348B-4BA8-BEBA-B4CAD5D3B395}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3D8BDD28-348B-4BA8-BEBA-B4CAD5D3B395}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3D8BDD28-348B-4BA8-BEBA-B4CAD5D3B395}.Release|Any CPU.Build.0 = Release|Any CPU - {7A0C7AE7-3BD8-4E85-ADDB-9653FAE8A91B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7A0C7AE7-3BD8-4E85-ADDB-9653FAE8A91B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7A0C7AE7-3BD8-4E85-ADDB-9653FAE8A91B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7A0C7AE7-3BD8-4E85-ADDB-9653FAE8A91B}.Release|Any CPU.Build.0 = Release|Any CPU - {BDCB21F4-05FC-4047-9B35-58084FFFE49C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BDCB21F4-05FC-4047-9B35-58084FFFE49C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BDCB21F4-05FC-4047-9B35-58084FFFE49C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BDCB21F4-05FC-4047-9B35-58084FFFE49C}.Release|Any CPU.Build.0 = Release|Any CPU - {B8698156-310C-471E-A957-58A118954BB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B8698156-310C-471E-A957-58A118954BB5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B8698156-310C-471E-A957-58A118954BB5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B8698156-310C-471E-A957-58A118954BB5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/FrenchPlugin/FrenchPlugin.cs b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/FrenchPlugin/FrenchPlugin.cs deleted file mode 100644 index 0ff7300d3b364..0000000000000 --- a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/FrenchPlugin/FrenchPlugin.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Humanizer.Localisation.Formatters; -using PluginBase; -using System; -using System.Linq; -using System.Reflection; - -namespace FrenchPlugin -{ - public class FrenchPlugin : ICommand - { - public string Name => "french"; - - public string Description => "Uses satellite assembly to display french."; - - public int Execute() - { - DefaultFormatter formatter = new DefaultFormatter("fr"); - Console.WriteLine(formatter.DateHumanize_Now()); - foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies() - .Where(a => a.GetName().Name.StartsWith("Humanizer"))) - { - Console.WriteLine($"{assembly.FullName} from {assembly.Location}"); - } - - return 0; - } - } -} diff --git a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/FrenchPlugin/FrenchPlugin.csproj b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/FrenchPlugin/FrenchPlugin.csproj deleted file mode 100644 index f35d021ef51a1..0000000000000 --- a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/FrenchPlugin/FrenchPlugin.csproj +++ /dev/null @@ -1,19 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <TargetFramework>net5</TargetFramework> - <EnableDynamicLoading>true</EnableDynamicLoading> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Humanizer" Version="2.14.1" /> - </ItemGroup> - - <ItemGroup> - <ProjectReference Include="..\PluginBase\PluginBase.csproj"> - <Private>false</Private> - <ExcludeAssets>runtime</ExcludeAssets> - </ProjectReference> - </ItemGroup> - -</Project> diff --git a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/JsonPlugin/JsonPlugin.cs b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/JsonPlugin/JsonPlugin.cs deleted file mode 100644 index cd727f4b72396..0000000000000 --- a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/JsonPlugin/JsonPlugin.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Newtonsoft.Json; -using PluginBase; -using System; -using System.Reflection; - -namespace JsonPlugin -{ - public class JsonPlugin : ICommand - { - public string Name => "json"; - - public string Description => "Outputs JSON value."; - - private struct Info - { - public string JsonVersion; - public string JsonLocation; - public string Machine; - public string User; - public DateTime Date; - } - - public int Execute() - { - Assembly jsonAssembly = typeof(JsonConvert).Assembly; - Info info = new Info() - { - JsonVersion = jsonAssembly.FullName, - JsonLocation = jsonAssembly.Location, - Machine = Environment.MachineName, - User = Environment.UserName, - Date = DateTime.Now - }; - - Console.WriteLine(JsonConvert.SerializeObject(info, Formatting.Indented)); - - return 0; - } - } -} diff --git a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/JsonPlugin/JsonPlugin.csproj b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/JsonPlugin/JsonPlugin.csproj deleted file mode 100644 index 918bd1465a82c..0000000000000 --- a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/JsonPlugin/JsonPlugin.csproj +++ /dev/null @@ -1,19 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <TargetFramework>net5</TargetFramework> - <EnableDynamicLoading>true</EnableDynamicLoading> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> - </ItemGroup> - - <ItemGroup> - <ProjectReference Include="..\PluginBase\PluginBase.csproj"> - <Private>false</Private> - <ExcludeAssets>runtime</ExcludeAssets> - </ProjectReference> - </ItemGroup> - -</Project> diff --git a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/OldJsonPlugin/JsonPlugin.cs b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/OldJsonPlugin/JsonPlugin.cs deleted file mode 100644 index d6542b2e35fb9..0000000000000 --- a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/OldJsonPlugin/JsonPlugin.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Newtonsoft.Json; -using PluginBase; -using System; -using System.Reflection; - -namespace JsonPlugin -{ - public class JsonPlugin : ICommand - { - public string Name => "oldjson"; - - public string Description => "Outputs JSON value."; - - private struct Info - { - public string JsonVersion; - public string JsonLocation; - public string Machine; - public DateTime Date; - } - - public int Execute() - { - Assembly jsonAssembly = typeof(JsonConvert).Assembly; - Info info = new Info() - { - JsonVersion = jsonAssembly.FullName, - JsonLocation = jsonAssembly.Location, - Machine = Environment.MachineName, - Date = DateTime.Now - }; - - Console.WriteLine(JsonConvert.SerializeObject(info, Formatting.Indented)); - - return 0; - } - } -} diff --git a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/OldJsonPlugin/OldJsonPlugin.csproj b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/OldJsonPlugin/OldJsonPlugin.csproj deleted file mode 100644 index 918bd1465a82c..0000000000000 --- a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/OldJsonPlugin/OldJsonPlugin.csproj +++ /dev/null @@ -1,19 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <TargetFramework>net5</TargetFramework> - <EnableDynamicLoading>true</EnableDynamicLoading> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> - </ItemGroup> - - <ItemGroup> - <ProjectReference Include="..\PluginBase\PluginBase.csproj"> - <Private>false</Private> - <ExcludeAssets>runtime</ExcludeAssets> - </ProjectReference> - </ItemGroup> - -</Project> diff --git a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/UVPlugin/UVPlugin.cs b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/UVPlugin/UVPlugin.cs deleted file mode 100644 index d78d4a6053e33..0000000000000 --- a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/UVPlugin/UVPlugin.cs +++ /dev/null @@ -1,28 +0,0 @@ -using PluginBase; -using System; -using System.Runtime.InteropServices; - -namespace UVPlugin -{ - public class UVPlugin : ICommand - { - public string Name => "uv"; - - public string Description => "Uses the native library libuv to show its version."; - - public int Execute() - { - Console.WriteLine($"Using libuv version {GetVersion()}."); - return 0; - } - - [DllImport("libuv", CallingConvention = CallingConvention.Cdecl)] - private extern static uint uv_version(); - - private static Version GetVersion() - { - uint version = uv_version(); - return new Version((int)(version & 0xFF0000) >> 16, (int)(version & 0xFF00) >> 8, (int)(version & 0xFF)); - } - } -} diff --git a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/UVPlugin/UVPlugin.csproj b/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/UVPlugin/UVPlugin.csproj deleted file mode 100644 index 0e67a5de55240..0000000000000 --- a/samples/snippets/core/tutorials/creating-app-with-plugin-support/csharp/UVPlugin/UVPlugin.csproj +++ /dev/null @@ -1,19 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <TargetFramework>net5</TargetFramework> - <EnableDynamicLoading>true</EnableDynamicLoading> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Libuv" Version="1.10.0" /> - </ItemGroup> - - <ItemGroup> - <ProjectReference Include="..\PluginBase\PluginBase.csproj"> - <Private>false</Private> - <ExcludeAssets>runtime</ExcludeAssets> - </ProjectReference> - </ItemGroup> - -</Project> diff --git a/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/snippets.5000.json b/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/snippets.5000.json new file mode 100644 index 0000000000000..5d0197eb6bf15 --- /dev/null +++ b/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/snippets.5000.json @@ -0,0 +1,9 @@ +{ + "host": "dotnet", + "expectederrors": [ + { + "file": "samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/inc.vs/nethost.h", + "error": "ERROR: Too many projects found. A single project or solution must exist in this directory or one of the parent directories." + } + ] +} diff --git a/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/inc.vs/nethost.h b/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/inc.vs/nethost.h index 31adde5e8dafb..fd184dab06476 100644 --- a/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/inc.vs/nethost.h +++ b/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/inc.vs/nethost.h @@ -47,7 +47,7 @@ extern "C" { // Size of the struct. This is used for versioning. // // assembly_path -// Path to the compenent's assembly. +// Path to the component's assembly. // If specified, hostfxr is located as if the assembly_path is the apphost // // dotnet_root @@ -77,7 +77,7 @@ struct get_hostfxr_parameters { // // get_hostfxr_parameters // Optional. Parameters that modify the behaviour for locating the hostfxr library. -// If nullptr, hostfxr is located using the enviroment variable or global registration +// If nullptr, hostfxr is located using the environment variable or global registration // // Return value: // 0 on success, otherwise failure diff --git a/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/inc/hostfxr.h b/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/inc/hostfxr.h index 809bf5beccad4..4eb786a24df79 100644 --- a/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/inc/hostfxr.h +++ b/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/inc/hostfxr.h @@ -64,7 +64,7 @@ typedef void(HOSTFXR_CALLTYPE *hostfxr_error_writer_fn)(const char_t *message); // By default no callback is registered in which case the errors are written to stderr. // // Each call to the error writer is sort of like writing a single line (the EOL character is omitted). -// Multiple calls to the error writer may occure for one failure. +// Multiple calls to the error writer may occur for one failure. // // If the hostfxr invokes functions in hostpolicy as part of its operation, the error writer // will be propagated to hostpolicy for the duration of the call. This means that errors from diff --git a/samples/snippets/core/tutorials/testing-with-cli/csharp/test/NewTypesTests/NewTypesTests.csproj b/samples/snippets/core/tutorials/testing-with-cli/csharp/test/NewTypesTests/NewTypesTests.csproj index 43cf4a08b1f8f..1aae537fbc6ba 100644 --- a/samples/snippets/core/tutorials/testing-with-cli/csharp/test/NewTypesTests/NewTypesTests.csproj +++ b/samples/snippets/core/tutorials/testing-with-cli/csharp/test/NewTypesTests/NewTypesTests.csproj @@ -5,7 +5,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" /> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="xunit" Version="2.4.2" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" /> </ItemGroup> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/ADApplicationBase/CPP/adapplicationbase.cpp b/samples/snippets/cpp/VS_Snippets_CLR/ADApplicationBase/CPP/adapplicationbase.cpp deleted file mode 100644 index edf32009f7958..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/ADApplicationBase/CPP/adapplicationbase.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//<Snippet1> -using namespace System; - -int main() -{ - AppDomain^ root = AppDomain::CurrentDomain; - - AppDomainSetup^ setup = gcnew AppDomainSetup(); - setup->ApplicationBase = - root->SetupInformation->ApplicationBase + "MyAppSubfolder\\"; - - AppDomain^ domain = AppDomain::CreateDomain("MyDomain", nullptr, setup); - - Console::WriteLine("Application base of {0}:\r\n\t{1}", - root->FriendlyName, root->SetupInformation->ApplicationBase); - Console::WriteLine("Application base of {0}:\r\n\t{1}", - domain->FriendlyName, domain->SetupInformation->ApplicationBase); - - AppDomain::Unload(domain); -} - -/* This example produces output similar to the following: - -Application base of MyApp.exe: - C:\Program Files\MyApp\ -Application base of MyDomain: - C:\Program Files\MyApp\MyAppSubfolder\ - */ -//</Snippet1> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/AppDomain_Setup/CPP/setup.cpp b/samples/snippets/cpp/VS_Snippets_CLR/AppDomain_Setup/CPP/setup.cpp deleted file mode 100644 index 1b6c10fd7b4d4..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/AppDomain_Setup/CPP/setup.cpp +++ /dev/null @@ -1,21 +0,0 @@ -using namespace System; -using namespace System::Security::Policy; - -int main() -{ - // <Snippet1> - // Set up the AppDomainSetup - AppDomainSetup^ setup = gcnew AppDomainSetup; - setup->ApplicationBase = "(some directory)"; - setup->ConfigurationFile = "(some file)"; - - // Set up the Evidence - Evidence^ baseEvidence = AppDomain::CurrentDomain->Evidence; - Evidence^ evidence = gcnew Evidence( baseEvidence ); - evidence->AddAssembly( "(some assembly)" ); - evidence->AddHost( "(some host)" ); - - // Create the AppDomain - AppDomain^ newDomain = AppDomain::CreateDomain( "newDomain", evidence, setup ); - // </Snippet1> -} diff --git a/samples/snippets/cpp/VS_Snippets_CLR/CodeDomExample/CPP/source.cpp b/samples/snippets/cpp/VS_Snippets_CLR/CodeDomExample/CPP/source.cpp deleted file mode 100644 index 2f548be0a78d0..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/CodeDomExample/CPP/source.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/* -// CodeDOMExample_CPP.cpp : main project file. - -#include "stdafx.h" - -using namespace System; - -int main(array<System::String ^> ^args) -{ - Console::WriteLine(L"Hello World"); - return 0; -} -*/ - -//<Snippet1> -#using <System.Windows.Forms.dll> -#using <System.Drawing.dll> -#using <System.dll> -#using <Microsoft.JScript.dll> - -using namespace System; -using namespace System::CodeDom; -using namespace System::CodeDom::Compiler; -using namespace System::Collections; -using namespace System::ComponentModel; -using namespace System::Diagnostics; -using namespace System::Drawing; -using namespace System::IO; -using namespace System::Windows::Forms; -using namespace Microsoft::CSharp; -using namespace Microsoft::VisualBasic; -using namespace Microsoft::JScript; -using namespace System::Security::Permissions; - -// This example demonstrates building a Hello World program graph -// using System.CodeDom elements. It calls code generator and -// code compiler methods to build the program using CSharp, VB, or -// JScript. A Windows Forms interface is included. Note: Code -// must be compiled and linked with the Microsoft.JScript assembly. -namespace CodeDOMExample -{ - [PermissionSet(SecurityAction::Demand, Name="FullTrust")] - public ref class CodeDomExample - { - public: - //<Snippet2> - // Build a Hello World program graph using - // System::CodeDom types. - static CodeCompileUnit^ BuildHelloWorldGraph() - { - // Create a new CodeCompileUnit to contain - // the program graph. - CodeCompileUnit^ compileUnit = gcnew CodeCompileUnit; - - // Declare a new namespace called Samples. - CodeNamespace^ samples = gcnew CodeNamespace( "Samples" ); - - // Add the new namespace to the compile unit. - compileUnit->Namespaces->Add( samples ); - - // Add the new namespace import for the System namespace. - samples->Imports->Add( gcnew CodeNamespaceImport( "System" ) ); - - // Declare a new type called Class1. - CodeTypeDeclaration^ class1 = gcnew CodeTypeDeclaration( "Class1" ); - - // Add the new type to the namespace's type collection. - samples->Types->Add( class1 ); - - // Declare a new code entry point method. - CodeEntryPointMethod^ start = gcnew CodeEntryPointMethod; - - // Create a type reference for the System::Console class. - CodeTypeReferenceExpression^ csSystemConsoleType = gcnew CodeTypeReferenceExpression( "System.Console" ); - - // Build a Console::WriteLine statement. - CodeMethodInvokeExpression^ cs1 = gcnew CodeMethodInvokeExpression( csSystemConsoleType,"WriteLine", gcnew CodePrimitiveExpression("Hello World!") ); - - // Add the WriteLine call to the statement collection. - start->Statements->Add( cs1 ); - - // Build another Console::WriteLine statement. - CodeMethodInvokeExpression^ cs2 = gcnew CodeMethodInvokeExpression( csSystemConsoleType,"WriteLine", gcnew CodePrimitiveExpression( "Press the Enter key to continue." ) ); - - // Add the WriteLine call to the statement collection. - start->Statements->Add( cs2 ); - - // Build a call to System::Console::ReadLine. - CodeMethodReferenceExpression^ csReadLine = gcnew CodeMethodReferenceExpression( csSystemConsoleType, "ReadLine" ); - CodeMethodInvokeExpression^ cs3 = gcnew CodeMethodInvokeExpression( csReadLine, gcnew array<CodeExpression^>(0) ); - - // Add the ReadLine statement. - start->Statements->Add( cs3 ); - - // Add the code entry point method to - // the Members collection of the type. - class1->Members->Add( start ); - return compileUnit; - } - //</Snippet2> - - //<Snippet3> - static void GenerateCode( CodeDomProvider^ provider, CodeCompileUnit^ compileunit ) - { - // Build the source file name with the appropriate - // language extension. - String^ sourceFile; - if ( provider->FileExtension->StartsWith( "." ) ) - { - sourceFile = String::Concat( "TestGraph", provider->FileExtension ); - } - else - { - sourceFile = String::Concat( "TestGraph.", provider->FileExtension ); - } - - // Create an IndentedTextWriter, constructed with - // a StreamWriter to the source file. - IndentedTextWriter^ tw = gcnew IndentedTextWriter( gcnew StreamWriter( sourceFile,false )," " ); - - // Generate source code using the code generator. - provider->GenerateCodeFromCompileUnit( compileunit, tw, gcnew CodeGeneratorOptions ); - - // Close the output file. - tw->Close(); - } - //</Snippet3> - - //<Snippet4> - static CompilerResults^ CompileCode( CodeDomProvider^ provider, String^ sourceFile, String^ exeFile ) - { - // Configure a CompilerParameters that links System.dll - // and produces the specified executable file. - array<String^>^referenceAssemblies = {"System.dll"}; - CompilerParameters^ cp = gcnew CompilerParameters( referenceAssemblies,exeFile,false ); - - // Generate an executable rather than a DLL file. - cp->GenerateExecutable = true; - - // Invoke compilation. - CompilerResults^ cr = provider->CompileAssemblyFromFile( cp, sourceFile ); - - // Return the results of compilation. - return cr; - } - //</Snippet4> - }; - - public ref class CodeDomExampleForm: public System::Windows::Forms::Form - { - private: - static System::Windows::Forms::Button^ run_button = gcnew System::Windows::Forms::Button; - static System::Windows::Forms::Button^ compile_button = gcnew System::Windows::Forms::Button; - static System::Windows::Forms::Button^ generate_button = gcnew System::Windows::Forms::Button; - static System::Windows::Forms::TextBox^ textBox1 = gcnew System::Windows::Forms::TextBox; - static System::Windows::Forms::ComboBox^ comboBox1 = gcnew System::Windows::Forms::ComboBox; - static System::Windows::Forms::Label^ label1 = gcnew System::Windows::Forms::Label; - void generate_button_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) - { - CodeDomProvider^ provider = GetCurrentProvider(); - CodeDomExample::GenerateCode( provider, CodeDomExample::BuildHelloWorldGraph() ); - - // Build the source file name with the appropriate - // language extension. - String^ sourceFile; - if ( provider->FileExtension->StartsWith( "." ) ) - { - sourceFile = String::Concat( "TestGraph", provider->FileExtension ); - } - else - { - sourceFile = String::Concat( "TestGraph.", provider->FileExtension ); - } - - - // Read in the generated source file and - // display the source text. - StreamReader^ sr = gcnew StreamReader( sourceFile ); - textBox1->Text = sr->ReadToEnd(); - sr->Close(); - } - - CodeDomProvider^ GetCurrentProvider() - { - CodeDomProvider^ provider; - if ( String::Compare( dynamic_cast<String^>(this->comboBox1->SelectedItem), "CSharp" ) == 0 ) - provider = CodeDomProvider::CreateProvider("CSharp"); - else - if ( String::Compare( dynamic_cast<String^>(this->comboBox1->SelectedItem), "Visual Basic" ) == 0 ) - provider = CodeDomProvider::CreateProvider("VisualBasic"); - else - if ( String::Compare( dynamic_cast<String^>(this->comboBox1->SelectedItem), "JScript" ) == 0 ) - provider = CodeDomProvider::CreateProvider("JScript"); - else - provider = CodeDomProvider::CreateProvider("CSharp"); - - return provider; - } - - void compile_button_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) - { - CodeDomProvider^ provider = GetCurrentProvider(); - - // Build the source file name with the appropriate - // language extension. - String^ sourceFile = String::Concat( "TestGraph.", provider->FileExtension ); - - // Compile the source file into an executable output file. - CompilerResults^ cr = CodeDomExample::CompileCode( provider, sourceFile, "TestGraph.exe" ); - if ( cr->Errors->Count > 0 ) - { - // Display compilation errors. - textBox1->Text = String::Concat( "Errors encountered while building ", sourceFile, " into ", cr->PathToAssembly, ": \r\n\n" ); - System::CodeDom::Compiler::CompilerError^ ce; - for ( int i = 0; i < cr->Errors->Count; i++ ) - { - ce = cr->Errors[i]; - textBox1->AppendText( String::Concat( ce->ToString(), "\r\n" ) ); - - } - run_button->Enabled = false; - } - else - { - textBox1->Text = String::Concat( "Source ", sourceFile, " built into ", cr->PathToAssembly, " with no errors." ); - run_button->Enabled = true; - } - } - - void run_button_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) - { - Process::Start( "TestGraph.exe" ); - } - - public: - CodeDomExampleForm() - { - this->SuspendLayout(); - - // Set properties for label1. - this->label1->Location = System::Drawing::Point( 395, 20 ); - this->label1->Size = System::Drawing::Size( 180, 22 ); - this->label1->Text = "Select a programming language:"; - - // Set properties for comboBox1. - this->comboBox1->Location = System::Drawing::Point( 560, 16 ); - this->comboBox1->Size = System::Drawing::Size( 190, 23 ); - this->comboBox1->Name = "comboBox1"; - array<String^>^temp1 = {"CSharp","Visual Basic","JScript"}; - this->comboBox1->Items->AddRange( temp1 ); - this->comboBox1->Anchor = (System::Windows::Forms::AnchorStyles)(System::Windows::Forms::AnchorStyles::Left | System::Windows::Forms::AnchorStyles::Right | System::Windows::Forms::AnchorStyles::Top); - this->comboBox1->SelectedIndex = 0; - - // Set properties for generate_button. - this->generate_button->Location = System::Drawing::Point( 8, 16 ); - this->generate_button->Name = "generate_button"; - this->generate_button->Size = System::Drawing::Size( 120, 23 ); - this->generate_button->Text = "Generate Code"; - this->generate_button->Click += gcnew System::EventHandler( this, &CodeDomExampleForm::generate_button_Click ); - - // Set properties for compile_button. - this->compile_button->Location = System::Drawing::Point( 136, 16 ); - this->compile_button->Name = "compile_button"; - this->compile_button->Size = System::Drawing::Size( 120, 23 ); - this->compile_button->Text = "Compile"; - this->compile_button->Click += gcnew System::EventHandler( this, &CodeDomExampleForm::compile_button_Click ); - - // Set properties for run_button. - this->run_button->Enabled = false; - this->run_button->Location = System::Drawing::Point( 264, 16 ); - this->run_button->Name = "run_button"; - this->run_button->Size = System::Drawing::Size( 120, 23 ); - this->run_button->Text = "Run"; - this->run_button->Click += gcnew System::EventHandler( this, &CodeDomExampleForm::run_button_Click ); - - // Set properties for textBox1. - this->textBox1->Anchor = (System::Windows::Forms::AnchorStyles)(System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left | System::Windows::Forms::AnchorStyles::Right); - this->textBox1->Location = System::Drawing::Point( 8, 48 ); - this->textBox1->Multiline = true; - this->textBox1->ScrollBars = System::Windows::Forms::ScrollBars::Vertical; - this->textBox1->Name = "textBox1"; - this->textBox1->Size = System::Drawing::Size( 744, 280 ); - this->textBox1->Text = ""; - - // Set properties for the CodeDomExampleForm. - this->AutoScaleBaseSize = System::Drawing::Size( 5, 13 ); - this->ClientSize = System::Drawing::Size( 768, 340 ); - this->MinimumSize = System::Drawing::Size( 750, 340 ); - array<System::Windows::Forms::Control^>^myControl = {this->textBox1,this->run_button,this->compile_button,this->generate_button,this->comboBox1,this->label1}; - this->Controls->AddRange( myControl ); - this->Name = "CodeDomExampleForm"; - this->Text = "CodeDom Hello World Example"; - this->ResumeLayout( false ); - } - - public: - ~CodeDomExampleForm() - { - } - }; - -} - -[STAThread] -int main() -{ - Application::Run( gcnew CodeDOMExample::CodeDomExampleForm ); -} -//</Snippet1> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/CodeTryCatchFinallyExample/CPP/codetrycatchfinallyexample.cpp b/samples/snippets/cpp/VS_Snippets_CLR/CodeTryCatchFinallyExample/CPP/codetrycatchfinallyexample.cpp deleted file mode 100644 index cb97225e885b1..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/CodeTryCatchFinallyExample/CPP/codetrycatchfinallyexample.cpp +++ /dev/null @@ -1,81 +0,0 @@ - - -//<Snippet1> -#using <System.dll> - -using namespace System; -using namespace System::CodeDom; -public ref class CodeTryCatchFinallyExample -{ -public: - CodeTryCatchFinallyExample() - { - - //<Snippet2> - // Declares a type to contain a try...catch block. - CodeTypeDeclaration^ type1 = gcnew CodeTypeDeclaration( "TryCatchTest" ); - - // Defines a method that throws an exception of type System.ApplicationException. - CodeMemberMethod^ method1 = gcnew CodeMemberMethod; - method1->Name = "ThrowApplicationException"; - array<CodePrimitiveExpression^>^temp = {gcnew CodePrimitiveExpression( "Test Application Exception" )}; - method1->Statements->Add( gcnew CodeThrowExceptionStatement( gcnew CodeObjectCreateExpression( "System.ApplicationException",temp ) ) ); - type1->Members->Add( method1 ); - - // Defines a constructor that calls the ThrowApplicationException method from a try block. - CodeConstructor^ constructor1 = gcnew CodeConstructor; - constructor1->Attributes = MemberAttributes::Public; - type1->Members->Add( constructor1 ); - - // Defines a try statement that calls the ThrowApplicationException method. - CodeTryCatchFinallyStatement^ try1 = gcnew CodeTryCatchFinallyStatement; - try1->TryStatements->Add( gcnew CodeMethodInvokeExpression( gcnew CodeThisReferenceExpression,"ThrowApplicationException", nullptr ) ); - constructor1->Statements->Add( try1 ); - - // Defines a catch clause for exceptions of type ApplicationException. - CodeCatchClause^ catch1 = gcnew CodeCatchClause( "ex",gcnew CodeTypeReference( "System.ApplicationException" ) ); - catch1->Statements->Add( gcnew CodeCommentStatement( "Handle any System.ApplicationException here." ) ); - try1->CatchClauses->Add( catch1 ); - - // Defines a catch clause for any remaining unhandled exception types. - CodeCatchClause^ catch2 = gcnew CodeCatchClause( "ex" ); - catch2->Statements->Add( gcnew CodeCommentStatement( "Handle any other exception type here." ) ); - try1->CatchClauses->Add( catch2 ); - - // Defines a finally block by adding to the FinallyStatements collection. - try1->FinallyStatements->Add( gcnew CodeCommentStatement( "Handle any finally block statements." ) ); - - // A C# code generator produces the following source code for the preceeding example code: - // public class TryCatchTest - // { - // - // public TryCatchTest() - // { - // try - // { - // this.ThrowApplicationException(); - // } - // catch (System.ApplicationException ex) - // { - // // Handle any System.ApplicationException here. - // } - // catch (System.Exception ex) - // { - // // Handle any other exception type here. - // } - // finally { - // // Handle any finally block statements. - // } - // } - // - // private void ThrowApplicationException() - // { - // throw new System.ApplicationException("Test Application Exception"); - // } - // } - //</Snippet2> - } - -}; - -//</Snippet1> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/Example1.cpp b/samples/snippets/cpp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/Example1.cpp deleted file mode 100644 index c4a45bd69437e..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/Example1.cpp +++ /dev/null @@ -1,16 +0,0 @@ -using namespace System::Runtime::InteropServices; - -typedef void* HWND; - -[DllImport("user32", CharSet=CharSet::Auto)] -extern "C" IntPtr MessageBox(HWND hWnd, - String* pText, - String* pCaption, - unsigned int uType); - -void main() -{ - String* pText = L"Hello World!"; - String* pCaption = L"Platform Invoke Sample"; - MessageBox(0, pText, pCaption, 0); -} diff --git a/samples/snippets/cpp/VS_Snippets_CLR/Cryptography.SmartCardCSP/CPP/Cryptography.SmartCardCSP.cpp b/samples/snippets/cpp/VS_Snippets_CLR/Cryptography.SmartCardCSP/CPP/Cryptography.SmartCardCSP.cpp index 1ce18d2d42930..6695d91dcde59 100644 --- a/samples/snippets/cpp/VS_Snippets_CLR/Cryptography.SmartCardCSP/CPP/Cryptography.SmartCardCSP.cpp +++ b/samples/snippets/cpp/VS_Snippets_CLR/Cryptography.SmartCardCSP/CPP/Cryptography.SmartCardCSP.cpp @@ -1,38 +1,38 @@ -//<SNIPPET1> +//<SNIPPET1> using namespace System; using namespace System::Security::Cryptography; int main() { - - // To idendify the Smart Card CryptoGraphic Providers on your + + // To identify the Smart Card CryptoGraphic Providers on your // computer, use the Microsoft Registry Editor (Regedit.exe). // The available Smart Card CryptoGraphic Providers are listed // in HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Defaults\Provider. - // Create a new CspParameters object that identifies a + // Create a new CspParameters object that identifies a // Smart Card CryptoGraphic Provider. // The 1st parameter comes from HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Defaults\Provider Types. // The 2nd parameter comes from HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Defaults\Provider. CspParameters^ csp = gcnew CspParameters( 1,L"Schlumberger Cryptographic Service Provider" ); csp->Flags = CspProviderFlags::UseDefaultKeyContainer; - + // Initialize an RSACryptoServiceProvider object using // the CspParameters object. RSACryptoServiceProvider^ rsa = gcnew RSACryptoServiceProvider( csp ); - + // Create some data to sign. array<Byte>^data = gcnew array<Byte>{ 0,1,2,3,4,5,6,7 }; Console::WriteLine( L"Data : {0}", BitConverter::ToString( data ) ); - + // Sign the data using the Smart Card CryptoGraphic Provider. array<Byte>^sig = rsa->SignData( data, L"SHA1" ); Console::WriteLine( L"Signature : {0}", BitConverter::ToString( sig ) ); - + // Verify the data using the Smart Card CryptoGraphic Provider. bool verified = rsa->VerifyData( data, L"SHA1", sig ); Console::WriteLine( L"Verified : {0}", verified ); } -//</SNIPPET1> +//</SNIPPET1> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/GCNotification/cpp/program.cpp b/samples/snippets/cpp/VS_Snippets_CLR/GCNotification/cpp/program.cpp index 44aa0f3778280..e69abbd4e0739 100644 --- a/samples/snippets/cpp/VS_Snippets_CLR/GCNotification/cpp/program.cpp +++ b/samples/snippets/cpp/VS_Snippets_CLR/GCNotification/cpp/program.cpp @@ -147,7 +147,7 @@ namespace GCNotify GCNotificationStatus s = GC::WaitForFullGCApproach(); if (s == GCNotificationStatus::Succeeded) { - Console::WriteLine("GC Notifiction raised."); + Console::WriteLine("GC Notification raised."); OnFullGCApproachNotify(); } else if (s == GCNotificationStatus::Canceled) diff --git a/samples/snippets/cpp/VS_Snippets_CLR/HowToGeneric/cpp/source.cpp b/samples/snippets/cpp/VS_Snippets_CLR/HowToGeneric/cpp/source.cpp deleted file mode 100644 index 8afe677bec6d4..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/HowToGeneric/cpp/source.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// <snippet21> -using namespace System; - -// <snippet22> -generic<typename T, typename U> ref class B {}; -generic<typename V, typename W> ref class D : B<int, V> {}; -// </snippet22> - -class GenTypes -{ -public: - static void Main() - { - } -}; - -int main() -{ - GenTypes::Main(); -} -// </snippet21> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/example.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/example.cpp deleted file mode 100644 index 2b943d09be744..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/example.cpp +++ /dev/null @@ -1,230 +0,0 @@ - -// <Snippet1> -using namespace System; - -namespace EventSample -{ - // Class that contains the data for - // the alarm event. Derives from System.EventArgs. - // - public ref class AlarmEventArgs : EventArgs - { - private: - bool snoozePressed; - int nrings; - - public: - //Constructor. - // - AlarmEventArgs(bool snoozePressed, int nrings) - { - this->snoozePressed = snoozePressed; - this->nrings = nrings; - } - - // The NumRings property returns the number of rings - // that the alarm clock has sounded when the alarm event - // is generated. - // - property int NumRings - { - int get() { return nrings;} - } - - // The SnoozePressed property indicates whether the snooze - // button is pressed on the alarm when the alarm event is generated. - // - property bool SnoozePressed - { - bool get() {return snoozePressed;} - } - - // The AlarmText property that contains the wake-up message. - // - property String^ AlarmText - { - String^ get() - { - if (snoozePressed) - { - return ("Wake Up!!! Snooze time is over."); - } - else - { - return ("Wake Up!"); - } - } - } - }; - - // Delegate declaration. - // - public delegate void AlarmEventHandler(Object^ sender, AlarmEventArgs^ e); - - // The Alarm class that raises the alarm event. - // - public ref class AlarmClock - { - private: - bool snoozePressed; - int nrings; - bool stop; - - // The Stop property indicates whether the - // alarm should be turned off. - // - public: - AlarmClock() - { - snoozePressed = false; - nrings = 0; - stop = false; - } - - property bool Stop - { - bool get() {return stop;} - void set(bool value) {stop = value;} - } - - // The SnoozePressed property indicates whether the snooze - // button is pressed on the alarm when the alarm event is generated. - // - property bool SnoozePressed - { - bool get() {return snoozePressed;} - void set(bool value) {snoozePressed = value;} - } - // The event member that is of type AlarmEventHandler. - // - event AlarmEventHandler^ Alarm; - - // The protected OnAlarm method raises the event by invoking - // the delegates. The sender is always this, the current instance - // of the class. - // - protected: - virtual void OnAlarm(AlarmEventArgs^ e) - { - Alarm(this, e); - } - - public: - // This alarm clock does not have - // a user interface. - // To simulate the alarm mechanism it has a loop - // that raises the alarm event at every iteration - // with a time delay of 300 milliseconds, - // if snooze is not pressed. If snooze is pressed, - // the time delay is 1000 milliseconds. - // - void Start() - { - for (;;) - { - nrings++; - if (stop) - { - break; - } - else - { - if (snoozePressed) - { - System::Threading::Thread::Sleep(1000); - } - else - { - System::Threading::Thread::Sleep(300); - } - AlarmEventArgs^ e = gcnew AlarmEventArgs(snoozePressed, nrings); - OnAlarm(e); - } - } - } - }; - - // The WakeMeUp class has a method AlarmRang that handles the - // alarm event. - // - public ref class WakeMeUp - { - public: - void AlarmRang(Object^ sender, AlarmEventArgs^ e) - { - Console::WriteLine(e->AlarmText + "\n"); - - if (!(e->SnoozePressed)) - { - if (e->NumRings % 10 == 0) - { - Console::WriteLine(" Let alarm ring? Enter Y"); - Console::WriteLine(" Press Snooze? Enter N"); - Console::WriteLine(" Stop Alarm? Enter Q"); - String^ input = Console::ReadLine(); - - if (input->Equals("Y") ||input->Equals("y")) - { - return; - } - else if (input->Equals("N") || input->Equals("n")) - { - ((AlarmClock^)sender)->SnoozePressed = true; - return; - } - else - { - ((AlarmClock^)sender)->Stop = true; - return; - } - } - } - else - { - Console::WriteLine(" Let alarm ring? Enter Y"); - Console::WriteLine(" Stop Alarm? Enter Q"); - String^ input = Console::ReadLine(); - if (input->Equals("Y") || input->Equals("y")) - { - return; - } - else - { - ((AlarmClock^)sender)->Stop = true; - return; - } - } - } - }; - - - // The driver class that hooks up the event handling method of - // WakeMeUp to the alarm event of an Alarm object using a delegate. - // In a forms-based application, the driver class is the - // form. - // - public ref class AlarmDriver - { - public: - static void Main() - { - // Instantiates the event receiver. - WakeMeUp^ w= gcnew WakeMeUp(); - - // Instantiates the event source. - AlarmClock^ clock = gcnew AlarmClock(); - - // Wires the AlarmRang method to the Alarm event. - clock->Alarm += gcnew AlarmEventHandler(w, &WakeMeUp::AlarmRang); - - clock->Start(); - } - }; -} - -int main() -{ - EventSample::AlarmDriver::Main(); -} -// </Snippet1> - diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/example2.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/example2.cpp deleted file mode 100644 index e7bbe97d33b81..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/example2.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//<snippet20> -using namespace System; - -public ref class MouseEventArgs : EventArgs -{ -}; - -public ref class EventNameEventArgs : EventArgs -{ -}; - -//<snippet22> -delegate void EventNameEventHandler(Object^ sender, EventNameEventArgs^ e); -//</snippet22> - -ref class EventingSnippets -{ - //<snippet21> -public: - event EventNameEventHandler^ EventName; - //</snippet21> - - - //<snippet23> - void EventHandler(Object^ sender, EventNameEventArgs^ e) {} - //</snippet23> - - //<snippet24> - void Mouse_Moved(Object^ sender, MouseEventArgs^ e){} - //</snippet24> - - void OnSomeSignal(EventNameEventArgs^ e) - { - // Invokes the delegates. - EventName(this, e); - } - - static void Main() - { - Console::WriteLine("EventingSnippets Main()"); - } -}; - -int main() -{ - EventingSnippets::Main(); -} -//</snippet20> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/example4.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/example4.cpp deleted file mode 100644 index 440105fe1f4e1..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/example4.cpp +++ /dev/null @@ -1,92 +0,0 @@ -//<snippet40> -//<snippet44> -#using <System.dll> -#using <System.Windows.Forms.dll> -#using <System.Drawing.dll> - -using namespace System; -using namespace System::ComponentModel; -using namespace System::Windows::Forms; - -public ref class MyForm : Form -{ -private: - TextBox^ box; - Button^ button; - -public: - MyForm() : Form() - { - box = gcnew TextBox(); - box->BackColor = System::Drawing::Color::Cyan; - box->Size = System::Drawing::Size(100,100); - box->Location = System::Drawing::Point(50,50); - box->Text = "Hello"; - - button = gcnew Button(); - button->Location = System::Drawing::Point(50,100); - button->Text = "Click Me"; - - // To wire the event, create - // a delegate instance and add it to the Click event. - button->Click += gcnew EventHandler(this, &MyForm::Button_Click); - Controls->Add(box); - Controls->Add(button); - } - -private: - // The event handler. - void Button_Click(Object^ sender, EventArgs^ e) - { - box->BackColor = System::Drawing::Color::Green; - } - - // The STAThreadAttribute indicates that Windows Forms uses the - // single-threaded apartment model. -public: - [STAThread] - static void Main() - { - Application::Run(gcnew MyForm()); - } -}; - -int main() -{ - MyForm::Main(); -} -//</snippet44> - -public ref class SnippetForm : Form -{ -//<snippet41> -private: - Button^ button; -//</snippet41> - - //<snippet42> -private: - void Button_Click(Object^ sender, EventArgs^ e) - { - //... - } -//</snippet42> - - -public: - SnippetForm() : Form() - { - button = gcnew Button(); - - //<snippet43> - button->Click += gcnew EventHandler(this, &SnippetForm::Button_Click); - //</snippet43> - } -}; - -#if 0 -//<snippet45> -cl /clr:pure WinEvents.cpp -//</snippet45> -#endif -//</snippet40> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/remarks.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/remarks.cpp deleted file mode 100644 index b82ba2bf75715..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.events.other/cpp/remarks.cpp +++ /dev/null @@ -1,68 +0,0 @@ -using namespace System; - -// Code section for remarks -namespace EventRemarks -{ - public ref class AlarmEventArgs : EventArgs - { - }; - - // <Snippet2> - public delegate void AlarmEventHandler(Object^ sender, AlarmEventArgs^ e); - // </Snippet2> - - public ref class AlarmClock - { - public: - event AlarmEventHandler^ Alarm; - }; - - public ref class NextClass - { - public: - // <Snippet4> - delegate void EventtHandler(Object^ sender, EventArgs^ e); - // </Snippet4> - }; - - // <Snippet3> - public ref class WakeMeUp - { - public: - // AlarmRang has the same signature as AlarmEventHandler. - void AlarmRang(Object^ sender, AlarmEventArgs^ e) - { - //... - } - //... - }; - // </Snippet3> - - public ref class AlarmDriver - { - public: - static void Main() - { - // <Snippet5> - // Create an instance of WakeMeUp. - WakeMeUp^ w = gcnew WakeMeUp(); - - // Instantiate the event delegate. - AlarmEventHandler^ alhandler = gcnew AlarmEventHandler(w, &WakeMeUp::AlarmRang); - // </Snippet5> - - // <Snippet6> - // Instantiate the event source. - AlarmClock^ clock = gcnew AlarmClock(); - - // Add the delegate instance to the event. - clock->Alarm += alhandler; - // </Snippet6> - } - }; -} - -int main() -{ - EventRemarks::AlarmDriver::Main(); -} diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/makefile b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/makefile new file mode 100644 index 0000000000000..c9a8cc56bd3de --- /dev/null +++ b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/makefile @@ -0,0 +1,7 @@ +all: source.exe source2.exe + +source.exe: source.cpp + cl /clr:pure source.cpp + +source2.exe: source2.cpp + cl /clr:pure source2.cpp diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/source.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/source.cpp index 14e50c49c7079..1a5ada217ce31 100644 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/source.cpp +++ b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.generics.overview/cpp/source.cpp @@ -5,7 +5,7 @@ namespace GenericsExample1 { //<snippet2> generic<typename T> - public ref class Generics + public ref class SimpleGenericClass { public: T Field; @@ -18,17 +18,17 @@ namespace GenericsExample1 //<snippet3> static void Main() { - Generics<String^>^ g = gcnew Generics<String^>(); + SimpleGenericClass<String^>^ g = gcnew SimpleGenericClass<String^>(); g->Field = "A string"; //... - Console::WriteLine("Generics.Field = \"{0}\"", g->Field); - Console::WriteLine("Generics.Field.GetType() = {0}", g->Field->GetType()->FullName); + Console::WriteLine("SimpleGenericClass.Field = \"{0}\"", g->Field); + Console::WriteLine("SimpleGenericClass.Field.GetType() = {0}", g->Field->GetType()->FullName); } //</snippet3> //<snippet4> generic<typename T> - T Generic(T arg) + T MyGenericMethod(T arg) { T temp = arg; //... @@ -53,7 +53,7 @@ namespace GenericsExample2 } }; generic<typename T> - ref class Generic + ref class MyGenericClass { T M(T arg) { diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/activedir.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/activedir.cpp deleted file mode 100644 index 338361e0bcf60..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/activedir.cpp +++ /dev/null @@ -1,87 +0,0 @@ -//<snippet33> -using namespace System; -using namespace System::Reflection; -using namespace System::Runtime::InteropServices; - -//<snippet34> -[StructLayout(LayoutKind::Sequential, CharSet = CharSet::Unicode)] -public value struct DsBrowseInfo -{ -public: - static int MAX_PATH = 256; - - int Size; - IntPtr OwnerHandle; - String^ Caption; - String^ Title; - String^ Root; - String^ Path; - int PathSize; - int Flags; - IntPtr Callback; - int Param; - int ReturnFormat; - String^ UserName; - String^ Password; - String^ ObjectClass; - int ObjectClassSize; -}; - -private ref class NativeMethods -{ -public: - // Declares a managed prototype for the unmanaged function. - [DllImport("dsuiext.dll", CharSet = CharSet::Unicode)] - static int DsBrowseForContainerW(DsBrowseInfo^ info); - - static int DSBI_ENTIREDIRECTORY = 0x00090000; - static int ADS_FORMAT_WINDOWS = 1; - enum class BrowseStatus - { - BrowseError = -1, - BrowseOk = 1, - BrowseCancel = 2 - }; -}; -//</snippet34> - -//<snippet35> -public ref class App -{ -public: - // Must be marked as STA because the default is MTA. - // DsBrowseForContainerW calls CoInitialize, which initializes the - // COM library as STA. - [STAThread] - static void Main() - { - DsBrowseInfo dsbi; - - // Initialize the fields. - dsbi.Size = Marshal::SizeOf(DsBrowseInfo::typeid); - dsbi.PathSize = DsBrowseInfo::MAX_PATH; - dsbi.Caption = "Container Selection Example"; - dsbi.Title = "Select a container from the list."; - dsbi.ReturnFormat = NativeMethods::ADS_FORMAT_WINDOWS; - dsbi.Flags = NativeMethods::DSBI_ENTIREDIRECTORY; - dsbi.Root = "LDAP:"; - dsbi.Path = gcnew String(gcnew array<Char>(DsBrowseInfo::MAX_PATH)); - // Initialize remaining members... - - int status = NativeMethods::DsBrowseForContainerW(dsbi); - if ((NativeMethods::BrowseStatus)status == NativeMethods::BrowseStatus::BrowseOk) - { - Console::WriteLine(dsbi.Path); - } - else - { - Console::WriteLine("No path returned."); - } - } -}; -//</snippet35> -int main() -{ - App::Main(); -} -//</snippet33> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/buffers.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/buffers.cpp deleted file mode 100644 index 25b7d76f3d5fc..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/buffers.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//<snippet1> -using namespace System; -using namespace System::Text; -using namespace System::Runtime::InteropServices; - -//<snippet2> -private ref class NativeMethods -{ -public: - [DllImport("Kernel32.dll", CharSet = CharSet::Auto)] - static int GetSystemDirectory(StringBuilder^ sysDirBuffer, int size); - - [DllImport("Kernel32.dll", CharSet = CharSet::Auto)] - static IntPtr GetCommandLine(); -}; -//</snippet2> - -//<snippet3> -public ref class App -{ -public: - static void Main() - { - // Call GetSystemDirectory. - StringBuilder^ sysDirBuffer = gcnew StringBuilder(256); - NativeMethods::GetSystemDirectory(sysDirBuffer, sysDirBuffer->Capacity); - // ... - // Call GetCommandLine. - IntPtr cmdLineStr = NativeMethods::GetCommandLine(); - String^ commandLine = Marshal::PtrToStringAuto(cmdLineStr); - } -}; -//</snippet3> - -int main() -{ - App::Main(); -} -//</snippet1> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/comwrappers.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/comwrappers.cpp deleted file mode 100644 index 6995f8836b599..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/comwrappers.cpp +++ /dev/null @@ -1,47 +0,0 @@ -//<snippet48> -using namespace System; -using namespace System::Runtime::InteropServices; - -public ref class Snippets -{ -public: - static void Main() - { - } - - //<snippet49> - void M1([MarshalAs(UnmanagedType::LPWStr)] String^ msg) - { - // ... - } - //</snippet49> - - //<snippet51> - [returnvalue: MarshalAs(UnmanagedType::LPWStr)] - String^ GetMessage() - { - String^ msg = gcnew String(gcnew array<Char>(128)); - // Load message here ... - return msg; - } - //</snippet51> -}; - -//<snippet50> -ref class MsgText -{ -public: - [MarshalAs(UnmanagedType::LPWStr)] - String^ msg; - - MsgText() - { - msg = ""; - } -}; -//</snippet50> -int main() -{ - Snippets::Main(); -} -//</snippet48> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/gchandle.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/gchandle.cpp deleted file mode 100644 index 3c5eafda2bcd4..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/gchandle.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//<snippet39> -using namespace System; -using namespace System::IO; -using namespace System::Runtime::InteropServices; - -//<snippet40> -public delegate bool CallBack(int handle, IntPtr param); - -private ref class NativeMethods -{ -public: - // Passes a managed object as an LPARAM type. - // Declares a managed prototype for the unmanaged function. - [DllImport("user32.dll")] - static bool EnumWindows(CallBack^ cb, IntPtr param); -}; -//</snippet40> - -//<snippet41> -public ref class App -{ -public: - static void Main() - { - TextWriter^ tw = System::Console::Out; - GCHandle gch = GCHandle::Alloc(tw); - CallBack^ cewp = gcnew CallBack(&CaptureEnumWindowsProc); - - // Platform invoke prevents the delegate from being garbage - // collected before the call ends. - NativeMethods::EnumWindows(cewp, (IntPtr)gch); - gch.Free(); - } - -private: - static bool CaptureEnumWindowsProc(int handle, IntPtr param) - { - GCHandle gch = (GCHandle)param; - TextWriter^ tw = (TextWriter^)gch.Target; - tw->WriteLine(handle); - return true; - } -}; -//</snippet41> -int main() -{ - App::Main(); -} -//</snippet39> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/handleref.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/handleref.cpp deleted file mode 100644 index aa7bc4c77a8fd..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/handleref.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//<snippet42> -using namespace System; -using namespace System::IO; -using namespace System::Text; -using namespace System::Runtime::InteropServices; - -//<snippet43> -// Declares a managed structure for the unmanaged structure. -[StructLayout(LayoutKind::Sequential)] -public value struct Overlapped -{ - // ... -}; - -// Declares a managed class for the unmanaged structure. -[StructLayout(LayoutKind::Sequential)] -public ref class Overlapped2 -{ - // ... -}; - -private ref class NativeMethods -{ -public: - // Declares managed prototypes for unmanaged functions. - // Because Overlapped is a structure, you cannot pass null as a - // parameter. Instead, declares an overloaded method. - [DllImport("Kernel32.dll")] - static bool ReadFile( - HandleRef hndRef, - StringBuilder^ buffer, - int numberOfBytesToRead, - int numberOfBytesRead, - Overlapped% flag); - - [DllImport("Kernel32.dll")] - static bool ReadFile( - HandleRef hndRef, - StringBuilder^ buffer, - int numberOfBytesToRead, - int% numberOfBytesRead, - IntPtr flag); // Declares an int instead of a structure reference. - - // Because Overlapped2 is a class, you can pass null as parameter. - // No overloading is needed. - [DllImport("Kernel32.dll", EntryPoint = "ReadFile")] - static bool ReadFile2( - HandleRef hndRef, - StringBuilder^ buffer, - int numberOfBytesToRead, - int% numberOfBytesRead, - Overlapped2^ flag); -}; -//</snippet43> - -//<snippet44> -public ref class App -{ -public: - static void Main() - { - FileStream^ fs = gcnew FileStream("HandleRef.txt", FileMode::Open); - // Wraps the FileStream handle in HandleRef to prevent it - // from being garbage collected before the call ends. - HandleRef hr = HandleRef(fs, fs->SafeFileHandle->DangerousGetHandle()); - StringBuilder^ buffer = gcnew StringBuilder(5); - int read = 0; - // Platform invoke holds a reference to HandleRef until the call - // ends. - NativeMethods::ReadFile(hr, buffer, 5, read, IntPtr::Zero); - Console::WriteLine("Read {0} bytes with struct parameter: {1}", read, buffer); - NativeMethods::ReadFile2(hr, buffer, 5, read, nullptr); - Console::WriteLine("Read {0} bytes with class parameter: {1}", read, buffer); - } -}; -//</snippet44> -int main() -{ - App::Main(); -} -//</snippet42> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/openfiledlg.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/openfiledlg.cpp deleted file mode 100644 index b0fe43ddd0782..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/openfiledlg.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//<snippet7> -using namespace System; -using namespace System::Reflection; -using namespace System::Runtime::InteropServices; - -//<snippet8> -// Declare a class member for each structure element. -[StructLayout(LayoutKind::Sequential, CharSet = CharSet::Auto)] -public ref class OpenFileName -{ -public: - int structSize; - IntPtr hwnd; - IntPtr hinst; - String^ filter; - String^ custFilter; - int custFilterMax; - int filterIndex; - String^ file; - int maxFile; - String^ fileTitle; - int maxFileTitle; - String^ initialDir; - String^ title; - int flags; - short fileOffset; - short fileExtMax; - String^ defExt; - int custData; - IntPtr pHook; - String^ tmplate; - - OpenFileName() - { - // Initialize the fields. - for each (FieldInfo^ fi in this->GetType()->GetFields()) - { - fi->SetValue(this, nullptr); - } - } -}; - -private ref class NativeMethods -{ -public: - // Declare a managed prototype for the unmanaged function. - [DllImport("Comdlg32.dll", CharSet = CharSet::Auto)] - static bool GetOpenFileName([In, Out] OpenFileName^ ofn); -}; -//</snippet8> - -//<snippet9> -public ref class App -{ -public: - static void Main() - { - OpenFileName^ ofn = gcnew OpenFileName(); - - ofn->structSize = Marshal::SizeOf(ofn); - ofn->filter = "Log files\0*.log\0Batch files\0*.bat\0"; - ofn->file = gcnew String(gcnew array<Char>(256)); - ofn->maxFile = ofn->file->Length; - ofn->fileTitle = gcnew String(gcnew array<Char>(64)); - ofn->maxFileTitle = ofn->fileTitle->Length; - ofn->initialDir = "C:\\"; - ofn->title = "Open file called using platform invoke..."; - ofn->defExt = "txt"; - - if (NativeMethods::GetOpenFileName(ofn)) - { - Console::WriteLine("Selected file with full path: {0}", ofn->file); - } - } -}; -//</snippet9> -int main() -{ - App::Main(); -} -//</snippet7> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/osinfo.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/osinfo.cpp deleted file mode 100644 index c9f70a6c5f8f4..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/osinfo.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//<snippet10> -using namespace System; -using namespace System::Runtime::InteropServices; - -//<snippet11> -[StructLayout(LayoutKind::Sequential)] -public ref class OSVersionInfo -{ -public: - int OSVersionInfoSize; - int MajorVersion; - int MinorVersion; - int BuildNumber; - int PlatformId; - - [MarshalAs(UnmanagedType::ByValTStr, SizeConst = 128)] - String^ CSDVersion; -}; - -[StructLayout(LayoutKind::Sequential)] -public value struct OSVersionInfo2 -{ -public: - int OSVersionInfoSize; - int MajorVersion; - int MinorVersion; - int BuildNumber; - int PlatformId; - - [MarshalAs(UnmanagedType::ByValTStr, SizeConst = 128)] - String^ CSDVersion; -}; - -private ref class NativeMethods -{ -public: - [DllImport("kernel32")] - static bool GetVersionEx([In, Out] OSVersionInfo^ osvi); - - [DllImport("kernel32", EntryPoint = "GetVersionEx")] - static bool GetVersionEx2(OSVersionInfo2% osvi); -}; -//</snippet11> - -//<snippet12> -public ref class App -{ -public: - static void Main() - { - Console::WriteLine("\nPassing OSVersionInfo as a class"); - - OSVersionInfo^ osvi = gcnew OSVersionInfo(); - osvi->OSVersionInfoSize = Marshal::SizeOf(osvi); - - NativeMethods::GetVersionEx(osvi); - - Console::WriteLine("Class size: {0}", osvi->OSVersionInfoSize); - Console::WriteLine("OS Version: {0}.{1}", osvi->MajorVersion, osvi->MinorVersion); - - Console::WriteLine("\nPassing OSVersionInfo as a struct"); - - OSVersionInfo2 osvi2; - osvi2.OSVersionInfoSize = Marshal::SizeOf(osvi2); - - NativeMethods::GetVersionEx2(osvi2); - Console::WriteLine("Struct size: {0}", osvi2.OSVersionInfoSize); - Console::WriteLine("OS Version: {0}.{1}", osvi2.MajorVersion, osvi2.MinorVersion); - } -}; -//</snippet12> -int main() -{ - App::Main(); -} -//</snippet10> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/strings.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/strings.cpp deleted file mode 100644 index 6c4a09c7970e0..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/strings.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//<snippet13> -using namespace System; -using namespace System::Text; -using namespace System::Runtime::InteropServices; - -//<snippet14> -// Declares a managed structure for each unmanaged structure. -[StructLayout(LayoutKind::Sequential, CharSet = CharSet::Unicode)] -public value struct MyStrStruct -{ -public: - String^ buffer; - int size; -}; - -[StructLayout(LayoutKind::Sequential, CharSet = CharSet::Ansi)] -public value struct MyStrStruct2 -{ -public: - String^ buffer; - int size; -}; - -private ref class NativeMethods -{ -public: - // Declares managed prototypes for unmanaged functions. - [DllImport("..\\LIB\\PinvokeLib.dll")] - static String^ TestStringAsResult(); - - [DllImport("..\\LIB\\PinvokeLib.dll")] - static void TestStringInStruct(MyStrStruct% mss); - - [DllImport("..\\LIB\\PinvokeLib.dll")] - static void TestStringInStructAnsi(MyStrStruct2% mss); -}; -//</snippet14> - -//<snippet15> -public ref class App -{ -public: - static void Main() - { - // String as result. - String^ str = NativeMethods::TestStringAsResult(); - Console::WriteLine("\nString returned: {0}", str); - - // Initializes buffer and appends something to the end so the whole - // buffer is passed to the unmanaged side. - StringBuilder^ buffer = gcnew StringBuilder("content", 100); - buffer->Append((char)0); - buffer->Append('*', buffer->Capacity - 8); - - MyStrStruct mss; - mss.buffer = buffer->ToString(); - mss.size = mss.buffer->Length; - - NativeMethods::TestStringInStruct(mss); - Console::WriteLine("\nBuffer after Unicode function call: {0}", - mss.buffer); - - StringBuilder^ buffer2 = gcnew StringBuilder("content", 100); - buffer2->Append((char)0); - buffer2->Append('*', buffer2->Capacity - 8); - - MyStrStruct2 mss2; - mss2.buffer = buffer2->ToString(); - mss2.size = mss2.buffer->Length; - - NativeMethods::TestStringInStructAnsi(mss2); - Console::WriteLine("\nBuffer after Ansi function call: {0}", - mss2.buffer); - } -}; -//</snippet15> -int main() -{ - App::Main(); -} -//</snippet13> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/void.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/void.cpp deleted file mode 100644 index f79db071d8dd6..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.interop.marshaling/cpp/void.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//<snippet45> -using namespace System; -using namespace System::Runtime::InteropServices; - -//<snippet46> -private ref class NativeMethods -{ -public: - enum class DataType - { - DT_I2 = 1, - DT_I4, - DT_R4, - DT_R8, - DT_STR - }; - - // Uses AsAny when void* is expected. - [DllImport("..\\LIB\\PInvokeLib.dll")] - static void SetData(DataType t, - [MarshalAs(UnmanagedType::AsAny)] Object^ o); - - // Uses overloading when void* is expected. - [DllImport("..\\LIB\\PInvokeLib.dll", EntryPoint = "SetData")] - static void SetData2(DataType t, double% i); - - [DllImport("..\\LIB\\PInvokeLib.dll", EntryPoint = "SetData")] - static void SetData2(DataType t, String^ s); -}; -//</snippet46> - -//<snippet47> -public class App -{ -public: - static void Main() - { - Console::WriteLine("Calling SetData using AsAny... \n"); - NativeMethods::SetData(NativeMethods::DataType::DT_I2, (short)12); - NativeMethods::SetData(NativeMethods::DataType::DT_I4, (long)12); - NativeMethods::SetData(NativeMethods::DataType::DT_R4, (float)12); - NativeMethods::SetData(NativeMethods::DataType::DT_R8, (double)12); - NativeMethods::SetData(NativeMethods::DataType::DT_STR, "abcd"); - - Console::WriteLine("\nCalling SetData using overloading... \n"); - double d = 12; - NativeMethods::SetData2(NativeMethods::DataType::DT_R8, d); - NativeMethods::SetData2(NativeMethods::DataType::DT_STR, "abcd"); - } -}; -//</snippet47> -int main() -{ - App::Main(); -} -//</snippet45> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source4.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source4.cpp index 7bf5a3b72f274..06fffd85fe7fb 100644 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source4.cpp +++ b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source4.cpp @@ -50,7 +50,7 @@ public ref class ListMembers Console::WriteLine("// Instance Fields"); PrintMembers(fi); - // Instance properites. + // Instance properties. pi = t->GetProperties(BindingFlags::Instance | BindingFlags::NonPublic | BindingFlags::Public); Console::WriteLine ("// Instance Properties"); diff --git a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source6.cpp b/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source6.cpp deleted file mode 100644 index 4516d274c049e..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/conceptual.types.viewinfo/cpp/source6.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//<snippet8> -using namespace System; -using namespace System::Reflection; - -ref class Asminfo1 -{ -public: - static void Main() - { - Console::WriteLine ("\nReflection.MemberInfo"); - - // Get the Type and MemberInfo. - // Insert the fully qualified class name inside the quotation marks in the - // following statement. - Type^ MyType = Type::GetType("System.IO.BinaryReader"); - array<MemberInfo^>^ Mymemberinfoarray = MyType->GetMembers(BindingFlags::Public | - BindingFlags::NonPublic | BindingFlags::Static | - BindingFlags::Instance | BindingFlags::DeclaredOnly); - - // Get and display the DeclaringType method. - Console::Write("\nThere are {0} documentable members in ", Mymemberinfoarray->Length); - Console::Write("{0}.", MyType->FullName); - - for each (MemberInfo^ Mymemberinfo in Mymemberinfoarray) - { - Console::Write("\n" + Mymemberinfo->Name); - } - } -}; - -int main() -{ - Asminfo1::Main(); -} -//</snippet8> diff --git a/samples/snippets/cpp/VS_Snippets_CLR/dg_exceptionDesign/cpp/example1.cpp b/samples/snippets/cpp/VS_Snippets_CLR/dg_exceptionDesign/cpp/example1.cpp deleted file mode 100644 index c003f51a8275c..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR/dg_exceptionDesign/cpp/example1.cpp +++ /dev/null @@ -1,267 +0,0 @@ -#using <System.dll> - -using namespace System; -using namespace System::IO; -using namespace System::Net; -using namespace System::Runtime::Serialization; -using namespace System::Collections::Generic; - -namespace Examples { namespace DesignGuidelines { namespace Exceptions -{ -//<Snippet1> - public ref class BadExceptionHandlingExample1 - { - public: - void DoWork() - { - // Do some work that might throw exceptions. - } - - void MethodWithBadHandler() - { - try - { - DoWork(); - } - catch (Exception^ e) - { - // Handle the exception and - // continue executing. - } - } - }; -//</Snippet1> - -//<Snippet2> - public ref class BadExceptionHandlingExample2 - { - public: - void DoWork() - { - // Do some work that might throw exceptions. - } - - void MethodWithBadHandler() - { - try - { - DoWork(); - } - catch (Exception^ e) - { - if (e->GetType() == StackOverflowException::typeid || - e->GetType() == OutOfMemoryException::typeid) - throw; - // Handle the exception and - // continue executing. - } - } - }; -//</Snippet2> - - - public ref class ThrowExample1 - { - //<Snippet3> - public: - - void DoWork(Object^ anObject) - { - // Do some work that might throw exceptions. - //<Snippet7> - if (anObject == nullptr) - { - throw gcnew ArgumentNullException("anObject", - "Specify a non-null argument."); - } - //</Snippet7> - // Do work with o. - } - //</Snippet3> - - //<Snippet4> - void MethodWithBadCatch(Object^ anObject) - { - try - { - DoWork(anObject); - } - catch (ArgumentNullException^ e) - { - System::Diagnostics::Debug::Write(e->Message); - // This is wrong. - throw e; - // Should be this: - // throw; - } - } - //</Snippet4> - - //<Snippet5> - void MethodWithBetterCatch() - { - try - { - DoWork(nullptr); - } - catch (ArgumentNullException^ e) - { - System::Diagnostics::Debug::Write(e->Message); - throw; - } - } - //</Snippet5> - }; - - public ref class CommunicationFailureException : Exception - { - public: - CommunicationFailureException(String^ message) : Exception(message) - { - } - - CommunicationFailureException(String^ message, Exception^ innerException) - : Exception(message) - { - } - }; - - public ref class Wrapper - { - private: - IPAddress^ address; - - public: - Wrapper() - { - address = IPAddress::Loopback; - } - - void EstablishConnection(){} - - //<Snippet6> - void SendMessages() - { - try - { - EstablishConnection(); - } - catch (System::Net::Sockets::SocketException^ e) - { - throw gcnew CommunicationFailureException( - "Cannot access remote computer.", - e); - } - } - //</Snippet6> - - //<Snippet8> - property IPAddress^ Address - { - IPAddress^ get() - { - return address; - } - void set(IPAddress^ value) - { - if (value == nullptr) - { - throw gcnew ArgumentNullException("value"); - } - address = value; - } - } - //</Snippet8> - }; - - public ref class BaseException : Exception{}; - - //<Snippet9> - public ref class NewException : BaseException, ISerializable - { - public: - NewException() - { - // Add implementation. - } - - NewException(String^ message) - { - // Add implementation. - } - - NewException(String^ message, Exception^ inner) - { - // Add implementation. - } - - protected: - // This constructor is needed for serialization. - NewException(SerializationInfo info, StreamingContext context) - { - // Add implementation. - } - }; - //</Snippet9> - - //<snippet13> - //<Snippet10> - public ref class Doer - { - public: - // Method that can potential throw exceptions often. - static void ProcessMessage(String^ message) - { - if (message == nullptr) - { - throw gcnew ArgumentNullException("message"); - } - } - // Other methods... - }; - //</Snippet10> - - //<Snippet11> - public ref class Tester - { - public: - static void TesterDoer(ICollection<String^>^ messages) - { - for each (String^ message in messages) - { - // Test to ensure that the call - // won't cause the exception. - if (message != nullptr) - { - Doer::ProcessMessage(message); - } - } - } - }; - //</Snippet11> - //</snippet13> - - public ref class BadParser - { - //<Snippet12> - Uri^ ParseUri(String^ uriValue, bool throwOnError) - //</Snippet12> - {return gcnew Uri("http://contoso.com");} - }; - - public ref class TestMain - { - public: - static void Main() - { - ThrowExample1^ t = gcnew ThrowExample1(); - // t.MethodWithBadCatch(); - // t.MethodWithBetterCatch(); - } - }; -}}} - -int main() -{ - Examples::DesignGuidelines::Exceptions::TestMain::Main(); -} diff --git a/samples/snippets/cpp/VS_Snippets_CLR_System/system.Threading.ThreadStart2/CPP/source.cpp b/samples/snippets/cpp/VS_Snippets_CLR_System/system.Threading.ThreadStart2/CPP/source.cpp deleted file mode 100644 index 3295346dbdc8e..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR_System/system.Threading.ThreadStart2/CPP/source.cpp +++ /dev/null @@ -1,49 +0,0 @@ - -// <Snippet1> -using namespace System; -using namespace System::Threading; -ref class Work -{ -public: - static void DoWork() - { - Console::WriteLine( "Static thread procedure." ); - } - - int Data; - void DoMoreWork() - { - Console::WriteLine( "Instance thread procedure. Data={0}", Data ); - } - -}; - -int main() -{ - - // To start a thread using an instance method for the thread - // procedure, specify the object as the first argument of the - // ThreadStart constructor. - // - Work^ w = gcnew Work; - w->Data = 42; - ThreadStart^ threadDelegate = gcnew ThreadStart( w, &Work::DoMoreWork ); - Thread^ newThread = gcnew Thread( threadDelegate ); - newThread->Start(); - - // To start a thread using a static thread procedure, specify - // only the address of the procedure. This is a change from - // earlier versions of the .NET Framework, which required - // two arguments, the first of which was null (0). - // - threadDelegate = gcnew ThreadStart( &Work::DoWork ); - newThread = gcnew Thread( threadDelegate ); - newThread->Start(); -} - -/* This code example produces the following output (the order - of the lines might vary): -Static thread procedure. -Instance thread procedure. Data=42 - */ -// </Snippet1> diff --git a/samples/snippets/cpp/VS_Snippets_CLR_System/system.Threading.Timer/CPP/source.cpp b/samples/snippets/cpp/VS_Snippets_CLR_System/system.Threading.Timer/CPP/source.cpp deleted file mode 100644 index 4dd79b85f2ce2..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR_System/system.Threading.Timer/CPP/source.cpp +++ /dev/null @@ -1,98 +0,0 @@ - -// <Snippet1> -using namespace System; -using namespace System::Threading; - -ref class StatusChecker -{ -private: - int invokeCount, maxCount; - -public: - StatusChecker(int count) - { - invokeCount = 0; - maxCount = count; - } - - // This method is called by the timer delegate. - void CheckStatus(Object^ stateInfo) - { - AutoResetEvent^ autoEvent = dynamic_cast<AutoResetEvent^>(stateInfo); - Console::WriteLine("{0:h:mm:ss.fff} Checking status {1,2}.", - DateTime::Now, ++invokeCount); - - if (invokeCount == maxCount) { - // Reset the counter and signal the waiting thread. - invokeCount = 0; - autoEvent->Set(); - } - } -}; - -ref class TimerExample -{ -public: - static void Main() - { - // Create an AutoResetEvent to signal the timeout threshold in the - // timer callback has been reached. - AutoResetEvent^ autoEvent = gcnew AutoResetEvent(false); - - StatusChecker^ statusChecker = gcnew StatusChecker(10); - - // Create a delegate that invokes methods for the timer. - TimerCallback^ tcb = - gcnew TimerCallback(statusChecker, &StatusChecker::CheckStatus); - - // Create a timer that invokes CheckStatus after one second, - // and every 1/4 second thereafter. - Console::WriteLine("{0:h:mm:ss.fff} Creating timer.\n", - DateTime::Now); - Timer^ stateTimer = gcnew Timer(tcb, autoEvent, 1000, 250); - - // When autoEvent signals, change the period to every half second. - autoEvent->WaitOne(5000, false); - stateTimer->Change(0, 500); - Console::WriteLine("\nChanging period to .5 seconds.\n"); - - // When autoEvent signals the second time, dispose of the timer. - autoEvent->WaitOne(5000, false); - stateTimer->~Timer(); - Console::WriteLine("\nDestroying timer."); - } -}; - -int main() -{ - TimerExample::Main(); -} -// The example displays output like the following: -// 11:59:54.202 Creating timer. -// -// 11:59:55.217 Checking status 1. -// 11:59:55.466 Checking status 2. -// 11:59:55.716 Checking status 3. -// 11:59:55.968 Checking status 4. -// 11:59:56.218 Checking status 5. -// 11:59:56.470 Checking status 6. -// 11:59:56.722 Checking status 7. -// 11:59:56.972 Checking status 8. -// 11:59:57.223 Checking status 9. -// 11:59:57.473 Checking status 10. -// -// Changing period to .5 seconds. -// -// 11:59:57.474 Checking status 1. -// 11:59:57.976 Checking status 2. -// 11:59:58.476 Checking status 3. -// 11:59:58.977 Checking status 4. -// 11:59:59.477 Checking status 5. -// 11:59:59.977 Checking status 6. -// 12:00:00.478 Checking status 7. -// 12:00:00.980 Checking status 8. -// 12:00:01.481 Checking status 9. -// 12:00:01.981 Checking status 10. -// -// Destroying timer. -// </Snippet1> diff --git a/samples/snippets/cpp/VS_Snippets_CLR_System/system.appdomain.load/cpp/source.cpp b/samples/snippets/cpp/VS_Snippets_CLR_System/system.appdomain.load/cpp/source.cpp deleted file mode 100644 index 41005ae13781a..0000000000000 --- a/samples/snippets/cpp/VS_Snippets_CLR_System/system.appdomain.load/cpp/source.cpp +++ /dev/null @@ -1,31 +0,0 @@ -using namespace System; - -ref class AppDomainLoad -{ -private: - AppDomainLoad(){} - - -public: - static void CreateAndLoad() - { - try - { -// <Snippet1> - AppDomain^ ad = AppDomain::CreateDomain("ChildDomain"); - ad->Load("MyAssembly"); -// </Snippet1> - } - catch (Exception^ ex) - { - Console::WriteLine(ex->Message); - Console::WriteLine(ex->StackTrace); - } - } - -}; - -int main() -{ - AppDomainLoad::CreateAndLoad(); -} diff --git a/samples/snippets/cpp/VS_Snippets_Data/PsciSample/CPP/PsciSample.cpp b/samples/snippets/cpp/VS_Snippets_Data/PsciSample/CPP/PsciSample.cpp index 9c35aa8abe15a..4cce2e29e1ff4 100644 --- a/samples/snippets/cpp/VS_Snippets_Data/PsciSample/CPP/PsciSample.cpp +++ b/samples/snippets/cpp/VS_Snippets_Data/PsciSample/CPP/PsciSample.cpp @@ -24,7 +24,7 @@ ref class PsciSample priceElem->SchemaTypeName = gcnew XmlQualifiedName("integer", "http://www.w3.org/2001/XMLSchema"); schema->Items->Add(priceElem); - // Print the pre-compilation value of the ElementSchemaType property + // Print the pre-compilation value of the ElementSchemaType property // of the XmlSchemaElement which is a PSCI property. Console::WriteLine("Before compilation the ElementSchemaType of Price is " + priceElem->ElementSchemaType); @@ -41,9 +41,9 @@ ref class PsciSample schema = compiledSchema; } - // After compilation of the schema, the ElementSchemaType property of the - // XmlSchemaElement will contain a reference to a valid object because the - // SchemaTypeName refered to a valid type. + // After compilation of the schema, the ElementSchemaType property of the + // XmlSchemaElement will contain a reference to a valid object because the + // SchemaTypeName referred to a valid type. Console::WriteLine("After compilation the ElementSchemaType of Price is " + priceElem->ElementSchemaType); diff --git a/samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs b/samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs index 542c9e3d9fd28..bc0a1bdcfe87f 100644 --- a/samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs +++ b/samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs @@ -584,7 +584,7 @@ from order in orders.AsEnumerable() } #endregion - #region "Partioning Operators" + #region "Partitioning Operators" /*[Category("Partitioning Operators")] [Title("Take - Nested")] @@ -1829,7 +1829,7 @@ group order by order.Field<Int32>("ContactID") into g Console.WriteLine("ContactID: {0}", orderGroup.Category); foreach (var order in orderGroup.smallestTotalDue) { - Console.WriteLine("Mininum TotalDue {0} for SalesOrderID {1}: ", + Console.WriteLine("Minimum TotalDue {0} for SalesOrderID {1}: ", order.Field<decimal>("TotalDue"), order.Field<Int32>("SalesOrderID")); } diff --git a/samples/snippets/csharp/VS_Snippets_CFX/CFX_WCFDataServicesActivityExample/cs/Program.cs b/samples/snippets/csharp/VS_Snippets_CFX/CFX_WCFDataServicesActivityExample/cs/Program.cs index a35707abdbdca..c2635517959fc 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/CFX_WCFDataServicesActivityExample/cs/Program.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/CFX_WCFDataServicesActivityExample/cs/Program.cs @@ -10,9 +10,9 @@ using System.Data.Services.Client; // Snippets -// 1 - Worfklow using InvokeMethod activity +// 1 - Workflow using InvokeMethod activity // 2 - Calling an OData service using WebClient -// 3 - Just the InvokeMethd activity from snippet 1 +// 3 - Just the InvokeMethod activity from snippet 1 // 10 - Using OrdersByCustomer // 20 - Using ListCustomers @@ -275,7 +275,7 @@ List<Customer> GetCustomers(string serviceUri) } //</snippet200> } - // Northwind Entitities from Add Service Reference + // Northwind Entities from Add Service Reference //------------------------------------------------------------------------------ // <auto-generated> diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_customclaimcomparison/cs/c_customclaimcomparison.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_customclaimcomparison/cs/c_customclaimcomparison.cs index f75b2144ae5bd..0e8a6cf858f3f 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_customclaimcomparison/cs/c_customclaimcomparison.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_customclaimcomparison/cs/c_customclaimcomparison.cs @@ -29,7 +29,7 @@ public MyResourceType(string text, int number) public int Number { get { return this.number; } } //<snippet3> - // Override Object.Equals to perform specfic comparison + // Override Object.Equals to perform specific comparison public override bool Equals(Object obj) { // If the object we're being asked to compare ourselves to is null diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_customusernameandpasswordvalidator/cs/service.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_customusernameandpasswordvalidator/cs/service.cs index 7d6aa325f6fd3..f8c2e174893a6 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_customusernameandpasswordvalidator/cs/service.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_customusernameandpasswordvalidator/cs/service.cs @@ -71,7 +71,7 @@ public class CustomUserNameValidator : UserNamePasswordValidator // This method validates users. It allows in two users, test1 and test2 // with passwords 1tset and 2tset respectively. // This code is for illustration purposes only and - // must not be used in a production environment because it is not secure. + // must not be used in a production environment because it is not secure. public override void Validate(string userName, string password) { if (null == userName || null == password) @@ -83,7 +83,7 @@ public override void Validate(string userName, string password) { // This throws an informative fault to the client. throw new FaultException("Unknown Username or Incorrect Password"); - // When you do not want to throw an infomative fault to the client, + // When you do not want to throw an informative fault to the client, // throw the following exception. // throw new SecurityTokenException("Unknown Username or Incorrect Password"); } diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_federatedclient/cs/source.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_federatedclient/cs/source.cs index 3f8acc517ca57..d583cee2289b2 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_federatedclient/cs/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_federatedclient/cs/source.cs @@ -28,7 +28,7 @@ SecurityKeyEntropyMode entropyMode // Set the IssuedTokenRenewalThresholdPercentage property cf.Credentials.IssuedToken.IssuedTokenRenewalThresholdPercentage = renewalPercentage; - // Set the DefaulyKeyEntropyMode property + // Set the DefaultKeyEntropyMode property cf.Credentials.IssuedToken.DefaultKeyEntropyMode = entropyMode; } diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_how_to_cf_async/cs/client.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_how_to_cf_async/cs/client.cs index 1771239fd8ae5..dff0a512e0a84 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_how_to_cf_async/cs/client.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_how_to_cf_async/cs/client.cs @@ -28,7 +28,7 @@ static void Main() IAsyncResult arAdd = channelClient.BeginAdd(value1, value2, AddCallback, channelClient); Console.WriteLine("Add({0},{1})", value1, value2); //</snippet3> - // BeginSubstract + // BeginSubtract value1 = 145.00D; value2 = 76.54D; IAsyncResult arSubtract = channelClient.BeginSubtract(value1, value2, SubtractCallback, channelClient); diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_howto_enablestreaming/common/app.config b/samples/snippets/csharp/VS_Snippets_CFX/c_howto_enablestreaming/common/app.config index a72dccd08331a..d6f6134b45231 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_howto_enablestreaming/common/app.config +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_howto_enablestreaming/common/app.config @@ -2,7 +2,7 @@ <configuration> <system.serviceModel> <services> - <service + <service name="Microsoft.ServiceModel.Samples.StreamingService" behaviorConfiguration="StreamingServiceBehavior"> <host> @@ -13,14 +13,14 @@ <!-- this endpoint is exposed at the base address provided by host: http://localhost:8000/ServiceModelSamples/service --> <endpoint address="ep1" binding="basicHttpBinding" - bindingConfiguration="HttpStreaming" + bindingConfiguration="HttpStreaming" contract="Microsoft.ServiceModel.Samples.IStreamingSample" /> <!-- this endpoint is exposed at http://localhost:9000/ServiceModelSamples/service/ep2 --> <endpoint address="http://localhost:9000/ServiceModelSamples/service/ep2" binding="customBinding" - bindingConfiguration="Soap12" + bindingConfiguration="Soap12" contract="Microsoft.ServiceModel.Samples.IStreamingSample" /> - <!-- the mex endpoint is explosed at http://localhost:8000/ServiceModelSamples/service/mex --> + <!-- the mex endpoint is exposed at http://localhost:8000/ServiceModelSamples/service/mex --> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_howto_usereliablesession/common/web.config b/samples/snippets/csharp/VS_Snippets_CFX/c_howto_usereliablesession/common/web.config index 72a6bad943e1c..68e822013abea 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_howto_usereliablesession/common/web.config +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_howto_usereliablesession/common/web.config @@ -7,20 +7,20 @@ <services> <service name="Microsoft.ServiceModel.Samples.CalculatorService"> - <!-- - This endpoint is exposed at the base address provided by + <!-- + This endpoint is exposed at the base address provided by host: http://localhost/servicemodelsamples/service.svc - - Specify wsHttpBinding binding and a binding configuration + + Specify wsHttpBinding binding and a binding configuration to use --> <endpoint address="" binding="wsHttpBinding" - bindingConfiguration="Binding1" + bindingConfiguration="Binding1" contract="Microsoft.ServiceModel.Samples.ICalculator" /> <!-- - The mex endpoint is explosed at + The mex endpoint is exposed at http://localhost/servicemodelsamples/service.svc/mex --> <endpoint address="mex" @@ -29,9 +29,9 @@ </service> </services> - <!-- - Configures WSHttpBinding for reliable sessions with ordered - delivery. + <!-- + Configures WSHttpBinding for reliable sessions with ordered + delivery. --> <bindings> <wsHttpBinding> @@ -43,4 +43,4 @@ </system.serviceModel> </configuration> -<!-- </snippet2111> --> \ No newline at end of file +<!-- </snippet2111> --> diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_impersonationanddelegation/cs/source.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_impersonationanddelegation/cs/source.cs index 739eee2b00463..2fae4e5c966a3 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_impersonationanddelegation/cs/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_impersonationanddelegation/cs/source.cs @@ -82,9 +82,9 @@ private void ServiceAuthorizationBehaviorStuff() //<snippet3> // Code to create a ServiceHost not shown. - ServiceAuthorizationBehavior MyServiceAuthoriationBehavior = + ServiceAuthorizationBehavior MyServiceAuthorizationBehavior = serviceHost.Description.Behaviors.Find<ServiceAuthorizationBehavior>(); - MyServiceAuthoriationBehavior.ImpersonateCallerForAllOperations = true; + MyServiceAuthorizationBehavior.ImpersonateCallerForAllOperations = true; //</snippet3> //<snippet4> diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_replaydetection/cs/source.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_replaydetection/cs/source.cs index 87320f851d339..61ec81a2d6154 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_replaydetection/cs/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_replaydetection/cs/source.cs @@ -27,7 +27,7 @@ static void Main() } //<snippet1> - private SecurityBindingElement CreateSymetricBindingForClient() + private SecurityBindingElement CreateSymmetricBindingForClient() { SymmetricSecurityBindingElement b = SecurityBindingElement.CreateKerberosBindingElement(); b.LocalClientSettings.DetectReplays = true; @@ -38,4 +38,4 @@ private SecurityBindingElement CreateSymetricBindingForClient() } //</snippet1> } -} \ No newline at end of file +} diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_securityscenarios/cs/source.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_securityscenarios/cs/source.cs index 7fe67c86bfaf3..07747d75e30c4 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_securityscenarios/cs/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_securityscenarios/cs/source.cs @@ -14,7 +14,7 @@ static void Main() try { - MessageSecuritWithKerberosAuth.MyService.Run(); + MessageSecurityWithKerberosAuth.MyService.Run(); } catch (System.Exception ex) { @@ -171,7 +171,7 @@ public static void RunClient() // Create the client. The code for the calculator client // is not shown here. See the sample applications - // for examples of the calculator code. + // for examples of the calculator code. CalculatorClient cc = new CalculatorClient(myBinding, myEndpointAddress); try @@ -296,7 +296,7 @@ public static void RunClient() } } -namespace SecuredTranserUsingCertificates +namespace SecuredTransferUsingCertificates { public class MyService { @@ -743,7 +743,7 @@ private void ClientRun() } } -namespace MessageSecuritWithKerberosAuth +namespace MessageSecurityWithKerberosAuth { using ServiceModel; public class MyService diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_settingsecuritymode/cs/source.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_settingsecuritymode/cs/source.cs index 795b5f999daf5..ae28a64d4414b 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_settingsecuritymode/cs/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_settingsecuritymode/cs/source.cs @@ -38,7 +38,7 @@ private void MakeTransportBinding() b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows; //</snippet5> } - private void MakeMessgeBinding() + private void MakeMessageBinding() { //<snippet6> //<snippet2> @@ -86,8 +86,8 @@ private void TcpMessageWithCredential() //<snippet8> NetTcpBinding b = new NetTcpBinding(SecurityMode.TransportWithMessageCredential); b.Security.Message.ClientCredentialType = MessageCredentialType.Certificate; - Uri netTcpAdddress = new Uri("net.tcp://baseAddress"); - ServiceHost sh = new ServiceHost(typeof(Calculator), netTcpAdddress); + Uri netTcpAddress = new Uri("net.tcp://baseAddress"); + ServiceHost sh = new ServiceHost(typeof(Calculator), netTcpAddress); sh.Credentials.ServiceCertificate.SetCertificate( StoreLocation.LocalMachine, StoreName.My, X509FindType.FindByIssuerName, "Contoso.com"); @@ -104,8 +104,8 @@ private void TcpMessageWithCredentialWindows() NetTcpBinding b = new NetTcpBinding(SecurityMode.TransportWithMessageCredential); b.Security.Transport.ClientCredentialType = TcpClientCredentialType.Windows; b.Security.Message.ClientCredentialType = MessageCredentialType.Certificate; - Uri netTcpAdddress = new Uri("net.tcp://Tcp"); - ServiceHost sh = new ServiceHost(typeof(Calculator), netTcpAdddress); + Uri netTcpAddress = new Uri("net.tcp://Tcp"); + ServiceHost sh = new ServiceHost(typeof(Calculator), netTcpAddress); sh.Credentials.ServiceCertificate.SetCertificate( StoreLocation.LocalMachine, StoreName.My, X509FindType.FindByIssuerName, "Contoso.com"); diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_syncasyncclient/cs/services.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_syncasyncclient/cs/services.cs index b0b752698f4cb..8b7263b838833 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_syncasyncclient/cs/services.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_syncasyncclient/cs/services.cs @@ -37,7 +37,7 @@ public class SampleService : ISampleService public string SampleMethod(string msg) { Console.WriteLine("Called synchronous sample method with \"{0}\"", msg); - return "The sychronous service greets you: " + msg; + return "The synchronous service greets you: " + msg; } // This asynchronously implemented operation is never called because diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_tcpservice/cs/source.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_tcpservice/cs/source.cs index 961a5c268133b..78cb593134760 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_tcpservice/cs/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_tcpservice/cs/source.cs @@ -104,7 +104,7 @@ private void TcpMessageCert() "net.tcp://{0}:8036/Calculator", System.Net.Dns.GetHostEntry("").HostName); - // Create an instance of the NetTcpBindng and set its security mode to Message. + // Create an instance of the NetTcpBinding and set its security mode to Message. NetTcpBinding b = new NetTcpBinding(); b.Security.Mode = SecurityMode.Message; diff --git a/samples/snippets/csharp/VS_Snippets_CFX/c_wcfclienttowseservice/cs/wsehttpbinding.cs b/samples/snippets/csharp/VS_Snippets_CFX/c_wcfclienttowseservice/cs/wsehttpbinding.cs index 94fda7e2575a6..b1fbf0ad7ad67 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/c_wcfclienttowseservice/cs/wsehttpbinding.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/c_wcfclienttowseservice/cs/wsehttpbinding.cs @@ -1,6 +1,6 @@  // Copyright (c) Microsoft Corporation. All Rights Reserved. -// <snipppet5> +// <snippet5> using System; using System.Text; using System.Collections.Generic; @@ -90,7 +90,7 @@ public override BindingElementCollection CreateBindingElements() (SymmetricSecurityBindingElement)SymmetricSecurityBindingElement.CreateSecureConversationBindingElement( securityBinding, false); // This is the default - //secureconversation.DefaultProtectionLevel = ProtectionLevel.EncryptAndSign; + //secureconversation.DefaultProtectionLevel = ProtectionLevel.EncryptAndSign; //Set defaults for the secure conversation binding secureconversation.DefaultAlgorithmSuite = SecurityAlgorithmSuite.Basic256; @@ -254,4 +254,4 @@ public MessageProtectionOrder MessageProtectionOrder // </snippet3> } } -// </snipppet5> \ No newline at end of file +// </snippet5> diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/activitylibrary1/activitylibrary1.csproj b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/activitylibrary1/activitylibrary1.csproj deleted file mode 100644 index 3dbec28f3ce79..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/activitylibrary1/activitylibrary1.csproj +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>10.0</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{0AD26601-1A17-41AD-AC65-0679E0503FDA}</ProjectGuid> - <ProjectTypeGuids>{32f31d43-81cc-4c15-9de6-3fc5453562b6};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>ActivityLibrary1</RootNamespace> - <AssemblyName>ActivityLibrary1</AssemblyName> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> - <FileAlignment>512</FileAlignment> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System" /> - <Reference Include="System.Activities" /> - <Reference Include="System.Core" /> - <Reference Include="System.Data" /> - <Reference Include="System.Runtime.Serialization" /> - <Reference Include="System.ServiceModel" /> - <Reference Include="System.ServiceModel.Activities" /> - <Reference Include="System.Xaml" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Xml.Linq" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="..\ReadInt.cs"> - <SubType>Code</SubType> - <Link>ReadInt.cs</Link> - </Compile> - </ItemGroup> - <ItemGroup> - <XamlAppDef Include="Prompt.xaml"> - <Generator>MSBuild:Compile</Generator> - <SubType>Designer</SubType> - </XamlAppDef> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/activitylibrary1/prompt.xaml b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/activitylibrary1/prompt.xaml deleted file mode 100644 index c0d2a93fc1496..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/activitylibrary1/prompt.xaml +++ /dev/null @@ -1,17 +0,0 @@ -<Activity mc:Ignorable="sap" x:Class="ActivityLibrary1.Prompt" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:a="clr-namespace:ActivityLibrary1;assembly=ActivityLibrary1" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=System.Xml" xmlns:s3="clr-namespace:System;assembly=System.Core" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:sd1="clr-namespace:System.Data;assembly=System.Data.DataSetExtensions" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:st="clr-namespace:System.Text;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - <x:Members> - <x:Property Name="BookmarkName" Type="InArgument(x:String)" /> - <x:Property Name="Result" Type="OutArgument(x:Int32)" /> - <x:Property Name="Text" Type="InArgument(x:String)" /> - </x:Members> - <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings> - <Sequence sad:XamlDebuggerXmlReader.FileName="C:\WFProjects\GettingStartedTutorial\ActivityLibrary1\Prompt.xaml" sap:VirtualizedContainerService.HintSize="233,248"> - <sap:WorkflowViewStateService.ViewState> - <scg3:Dictionary x:TypeArguments="x:String, x:Object"> - <x:Boolean x:Key="IsExpanded">True</x:Boolean> - </scg3:Dictionary> - </sap:WorkflowViewStateService.ViewState> - <WriteLine sap:VirtualizedContainerService.HintSize="211,62" Text="[Text]" /> - <a:ReadInt BookmarkName="[BookmarkName]" sap:VirtualizedContainerService.HintSize="211,22" Result="[Result]" /> - </Sequence> -</Activity> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/activitylibrary1/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/activitylibrary1/properties/assemblyinfo.cs deleted file mode 100644 index 8120536f347e1..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/activitylibrary1/properties/assemblyinfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyCompany("MSIT")] -[assembly: AssemblyProduct("ActivityLibrary1")] -[assembly: AssemblyCopyright("Copyright © MSIT 2008")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("80d10ba4-7e98-48f2-8294-92f9d74e05b3")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/extrasnippets.cs b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/extrasnippets.cs index 310adbf4bf0da..4c155cadbb8af 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/extrasnippets.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/extrasnippets.cs @@ -1,11 +1,9 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Activities; -using System.Threading; //<snippet14> using System.Activities.DurableInstancing; +using System.Collections.Generic; +using System.Threading; //</snippet14> namespace WorkflowConsoleApplication1 { @@ -27,18 +25,18 @@ void Snippet4() WorkflowApplication wfApp = new WorkflowApplication(new Workflow1()); - wfApp.Completed = delegate(WorkflowApplicationCompletedEventArgs e) + wfApp.Completed = delegate (WorkflowApplicationCompletedEventArgs e) { syncEvent.Set(); }; - wfApp.Aborted = delegate(WorkflowApplicationAbortedEventArgs e) + wfApp.Aborted = delegate (WorkflowApplicationAbortedEventArgs e) { Console.WriteLine(e.Reason); syncEvent.Set(); }; - wfApp.OnUnhandledException = delegate(WorkflowApplicationUnhandledExceptionEventArgs e) + wfApp.OnUnhandledException = delegate (WorkflowApplicationUnhandledExceptionEventArgs e) { Console.WriteLine(e.UnhandledException.ToString()); return UnhandledExceptionAction.Terminate; @@ -77,7 +75,7 @@ void Step4Snippets() // idleEvent.Set(); //}; - wfApp.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e) + wfApp.PersistableIdle = delegate (WorkflowApplicationIdleEventArgs e) { idleEvent.Set(); return PersistableIdleAction.Persist; diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/gettingstartedtutorial.sln b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/gettingstartedtutorial.sln deleted file mode 100644 index e5107ca68abc4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/gettingstartedtutorial.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ActivityLibrary1", "ActivityLibrary1\ActivityLibrary1.csproj", "{0AD26601-1A17-41AD-AC65-0679E0503FDA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowConsoleApplication1", "WorkflowConsoleApplication1\WorkflowConsoleApplication1.csproj", "{D15E52BC-806A-42A6-8666-9E6DFFCE3B23}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0AD26601-1A17-41AD-AC65-0679E0503FDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0AD26601-1A17-41AD-AC65-0679E0503FDA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0AD26601-1A17-41AD-AC65-0679E0503FDA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0AD26601-1A17-41AD-AC65-0679E0503FDA}.Release|Any CPU.Build.0 = Release|Any CPU - {D15E52BC-806A-42A6-8666-9E6DFFCE3B23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D15E52BC-806A-42A6-8666-9E6DFFCE3B23}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D15E52BC-806A-42A6-8666-9E6DFFCE3B23}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D15E52BC-806A-42A6-8666-9E6DFFCE3B23}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/program.cs b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/program.cs index 02bab7f4f8a3d..8cc426ef9f63e 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/program.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/program.cs @@ -1,12 +1,10 @@ using System; -using System.Linq; using System.Activities; -using System.Activities.Statements; -//<snippet3> -using System.Threading; //</snippet3> //<snippet5> using System.Collections.Generic; +//<snippet3> +using System.Threading; //</snippet5> namespace WorkflowConsoleApplication1 @@ -29,7 +27,7 @@ static void Main(string[] args) //</snippet6> //<snippet7> - wfApp.Completed = delegate(WorkflowApplicationCompletedEventArgs e) + wfApp.Completed = delegate (WorkflowApplicationCompletedEventArgs e) { int Turns = Convert.ToInt32(e.Outputs["Turns"]); Console.WriteLine("Congratulations, you guessed the number in {0} turns.", Turns); @@ -38,20 +36,20 @@ static void Main(string[] args) }; //</snippet7> - wfApp.Aborted = delegate(WorkflowApplicationAbortedEventArgs e) + wfApp.Aborted = delegate (WorkflowApplicationAbortedEventArgs e) { Console.WriteLine(e.Reason); syncEvent.Set(); }; - wfApp.OnUnhandledException = delegate(WorkflowApplicationUnhandledExceptionEventArgs e) + wfApp.OnUnhandledException = delegate (WorkflowApplicationUnhandledExceptionEventArgs e) { Console.WriteLine(e.UnhandledException.ToString()); return UnhandledExceptionAction.Terminate; }; //<snippet9> - wfApp.Idle = delegate(WorkflowApplicationIdleEventArgs e) + wfApp.Idle = delegate (WorkflowApplicationIdleEventArgs e) { idleEvent.Set(); }; diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/project.csproj b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/project.csproj new file mode 100644 index 0000000000000..6f68e7589a272 --- /dev/null +++ b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/project.csproj @@ -0,0 +1,11 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <OutputType>Library</OutputType> + <TargetFrameworks>net4.8</TargetFrameworks> + </PropertyGroup> + <ItemGroup> + <Reference Include="System.Activities" /> + <Reference Include="System.Activities.DurableInstancing" /> + <Reference Include="System.Runtime.DurableInstancing" /> + </ItemGroup> +</Project> diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/readint.cs b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/readint.cs index ee183bcd9eb2c..6298f42d31129 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/readint.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/readint.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Activities; namespace ActivityLibrary1 @@ -19,7 +16,7 @@ protected override void Execute(NativeActivityContext context) if (string.IsNullOrEmpty(name)) { throw new ArgumentException("BookmarkName cannot be an Empty string.", - "BookmarkName"); + "context"); } context.CreateBookmark(name, new BookmarkCallback(OnReadComplete)); diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/app.config b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/app.config deleted file mode 100644 index e3cfe496d5b32..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/app.config +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<configuration> - <startup> - - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" /> - - </startup> -</configuration> diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/properties/assemblyinfo.cs deleted file mode 100644 index 0e8593d6e014d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/properties/assemblyinfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyCompany("MSIT")] -[assembly: AssemblyProduct("WorkflowConsoleApplication1")] -[assembly: AssemblyCopyright("Copyright © MSIT 2008")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("29566798-144f-43bd-b1c6-221640279fd5")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/workflow1.xaml b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/workflow1.xaml deleted file mode 100644 index 190de96d34bb0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/workflow1.xaml +++ /dev/null @@ -1,131 +0,0 @@ -<Activity mc:Ignorable="sap" x:Class="WorkflowConsoleApplication1.Workflow1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:a="clr-namespace:ActivityLibrary1;assembly=ActivityLibrary1" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="clr-namespace:Microsoft.VisualBasic;assembly=System" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" xmlns:s1="clr-namespace:System;assembly=mscorlib" xmlns:s2="clr-namespace:System;assembly=System" xmlns:s3="clr-namespace:System;assembly=System.Xml" xmlns:s4="clr-namespace:System;assembly=System.Core" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:sd1="clr-namespace:System.Data;assembly=System.Data.DataSetExtensions" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:st="clr-namespace:System.Text;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - <x:Members> - <x:Property Name="MaxNumber" Type="InArgument(x:Int32)" /> - <x:Property Name="Turns" Type="OutArgument(x:Int32)" /> - </x:Members> - <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings> - <Flowchart sad:XamlDebuggerXmlReader.FileName="C:\WFProjects\GettingStartedTutorial\WorkflowConsoleApplication1\Workflow1.xaml" sap:VirtualizedContainerService.HintSize="614,636"> - <Flowchart.Variables> - <Variable x:TypeArguments="x:Int32" Name="Guess" /> - <Variable x:TypeArguments="x:Int32" Name="Target" /> - </Flowchart.Variables> - <sap:WorkflowViewStateService.ViewState> - <scg3:Dictionary x:TypeArguments="x:String, x:Object"> - <x:Boolean x:Key="IsExpanded">False</x:Boolean> - <av:Point x:Key="ShapeLocation">270,2.5</av:Point> - <av:Size x:Key="ShapeSize">60,75</av:Size> - <av:PointCollection x:Key="ConnectorLocation">300,77.5 300,81</av:PointCollection> - </scg3:Dictionary> - </sap:WorkflowViewStateService.ViewState> - <Flowchart.StartNode> - <x:Reference>__ReferenceID6</x:Reference> - </Flowchart.StartNode> - <FlowStep x:Name="__ReferenceID6"> - <sap:WorkflowViewStateService.ViewState> - <scg3:Dictionary x:TypeArguments="x:String, x:Object"> - <av:Point x:Key="ShapeLocation">179,81</av:Point> - <av:Size x:Key="ShapeSize">242,58</av:Size> - <av:PointCollection x:Key="ConnectorLocation">300,139 300,159</av:PointCollection> - </scg3:Dictionary> - </sap:WorkflowViewStateService.ViewState> - <Assign sap:VirtualizedContainerService.HintSize="242,58"> - <Assign.To> - <OutArgument x:TypeArguments="x:Int32">[Target]</OutArgument> - </Assign.To> - <Assign.Value> - <InArgument x:TypeArguments="x:Int32">[New System.Random().Next(1, MaxNumber + 1)]</InArgument> - </Assign.Value> - </Assign> - <FlowStep.Next> - <FlowStep x:Name="__ReferenceID0"> - <sap:WorkflowViewStateService.ViewState> - <scg3:Dictionary x:TypeArguments="x:String, x:Object"> - <av:Point x:Key="ShapeLocation">200,159</av:Point> - <av:Size x:Key="ShapeSize">200,22</av:Size> - <av:PointCollection x:Key="ConnectorLocation">300,181 300,201</av:PointCollection> - </scg3:Dictionary> - </sap:WorkflowViewStateService.ViewState> - <a:Prompt BookmarkName="EnterGuess" sap:VirtualizedContainerService.HintSize="200,22" Result="[Guess]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" Text="["Please enter a number between 1 and " & MaxNumber]" /> - <FlowStep.Next> - <FlowStep x:Name="__ReferenceID1"> - <sap:WorkflowViewStateService.ViewState> - <scg3:Dictionary x:TypeArguments="x:String, x:Object"> - <av:Point x:Key="ShapeLocation">179,201</av:Point> - <av:Size x:Key="ShapeSize">242,58</av:Size> - <av:PointCollection x:Key="ConnectorLocation">300,259 300,272.5</av:PointCollection> - </scg3:Dictionary> - </sap:WorkflowViewStateService.ViewState> - <Assign sap:VirtualizedContainerService.HintSize="242,58"> - <Assign.To> - <OutArgument x:TypeArguments="x:Int32">[Turns]</OutArgument> - </Assign.To> - <Assign.Value> - <InArgument x:TypeArguments="x:Int32">[Turns + 1]</InArgument> - </Assign.Value> - </Assign> - <FlowStep.Next> - <FlowDecision x:Name="__ReferenceID2" Condition="[Guess = Target]" sap:VirtualizedContainerService.HintSize="60,75"> - <sap:WorkflowViewStateService.ViewState> - <scg3:Dictionary x:TypeArguments="x:String, x:Object"> - <av:Point x:Key="ShapeLocation">270,272.5</av:Point> - <av:Size x:Key="ShapeSize">60,75</av:Size> - <av:PointCollection x:Key="FalseConnector">330,310 380,310 380,322.5</av:PointCollection> - </scg3:Dictionary> - </sap:WorkflowViewStateService.ViewState> - <FlowDecision.False> - <FlowDecision x:Name="__ReferenceID3" Condition="[Guess < Target]" sap:VirtualizedContainerService.HintSize="60,75"> - <sap:WorkflowViewStateService.ViewState> - <scg3:Dictionary x:TypeArguments="x:String, x:Object"> - <av:Point x:Key="ShapeLocation">350,322.5</av:Point> - <av:Size x:Key="ShapeSize">60,75</av:Size> - <av:PointCollection x:Key="TrueConnector">350,360 170,360 170,379</av:PointCollection> - <av:PointCollection x:Key="FalseConnector">410,360 430,360 430,399 400,399 400,429</av:PointCollection> - </scg3:Dictionary> - </sap:WorkflowViewStateService.ViewState> - <FlowDecision.True> - <FlowStep x:Name="__ReferenceID4"> - <sap:WorkflowViewStateService.ViewState> - <scg3:Dictionary x:TypeArguments="x:String, x:Object"> - <av:Point x:Key="ShapeLocation">64.5,379</av:Point> - <av:Size x:Key="ShapeSize">211,62</av:Size> - <av:PointCollection x:Key="ConnectorLocation">64.5,410 34.5,410 34.5,170 200,170</av:PointCollection> - </scg3:Dictionary> - </sap:WorkflowViewStateService.ViewState> - <WriteLine sap:VirtualizedContainerService.HintSize="211,62" Text="Your guess is too low." /> - <FlowStep.Next> - <x:Reference>__ReferenceID0</x:Reference> - </FlowStep.Next> - </FlowStep> - </FlowDecision.True> - <FlowDecision.False> - <FlowStep x:Name="__ReferenceID5"> - <sap:WorkflowViewStateService.ViewState> - <scg3:Dictionary x:TypeArguments="x:String, x:Object"> - <av:Point x:Key="ShapeLocation">294.5,429</av:Point> - <av:Size x:Key="ShapeSize">211,62</av:Size> - <av:PointCollection x:Key="ConnectorLocation">505.5,460 535.5,460 535.5,170 400,170</av:PointCollection> - </scg3:Dictionary> - </sap:WorkflowViewStateService.ViewState> - <WriteLine sap:VirtualizedContainerService.HintSize="211,62" Text="Your guess is too high." /> - <FlowStep.Next> - <x:Reference>__ReferenceID0</x:Reference> - </FlowStep.Next> - </FlowStep> - </FlowDecision.False> - </FlowDecision> - </FlowDecision.False> - </FlowDecision> - </FlowStep.Next> - </FlowStep> - </FlowStep.Next> - </FlowStep> - </FlowStep.Next> - </FlowStep> - <x:Reference>__ReferenceID0</x:Reference> - <x:Reference>__ReferenceID1</x:Reference> - <x:Reference>__ReferenceID2</x:Reference> - <x:Reference>__ReferenceID3</x:Reference> - <x:Reference>__ReferenceID4</x:Reference> - <x:Reference>__ReferenceID5</x:Reference> - </Flowchart> -</Activity> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/workflowconsoleapplication1.csproj b/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/workflowconsoleapplication1.csproj deleted file mode 100644 index 0aa5c707a000a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_wf_gettingstarted/cs/workflowconsoleapplication1/workflowconsoleapplication1.csproj +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>10.0</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{D15E52BC-806A-42A6-8666-9E6DFFCE3B23}</ProjectGuid> - <ProjectTypeGuids>{32f31d43-81cc-4c15-9de6-3fc5453562b6};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <OutputType>Exe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>WorkflowConsoleApplication1</RootNamespace> - <AssemblyName>WorkflowConsoleApplication1</AssemblyName> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> - <FileAlignment>512</FileAlignment> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System" /> - <Reference Include="System.Activities" /> - <Reference Include="System.Activities.DurableInstancing" /> - <Reference Include="System.Core" /> - <Reference Include="System.Data" /> - <Reference Include="System.Runtime.DurableInstancing" /> - <Reference Include="System.Runtime.Serialization" /> - <Reference Include="System.ServiceModel" /> - <Reference Include="System.ServiceModel.Activities" /> - <Reference Include="System.Xaml" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Xml.Linq" /> - </ItemGroup> - <ItemGroup> - <Compile Include="..\ExtraSnippets.cs"> - <Link>ExtraSnippets.cs</Link> - </Compile> - <Compile Include="..\Program.cs"> - <Link>Program.cs</Link> - </Compile> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <XamlAppDef Include="Workflow1.xaml"> - <SubType>Designer</SubType> - <Generator>MSBuild:Compile</Generator> - </XamlAppDef> - </ItemGroup> - <ItemGroup> - <None Include="App.config" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\ActivityLibrary1\ActivityLibrary1.csproj"> - <Project>{0AD26601-1A17-41AD-AC65-0679E0503FDA}</Project> - <Name>ActivityLibrary1</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CFX/cfx_workflowapplicationexample/cs/program.cs b/samples/snippets/csharp/VS_Snippets_CFX/cfx_workflowapplicationexample/cs/program.cs index 09f686254a700..5caa42468fbf5 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/cfx_workflowapplicationexample/cs/program.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/cfx_workflowapplicationexample/cs/program.cs @@ -21,7 +21,7 @@ // Snippets // 1 WorkflowApplicationUnhandledExceptionEventArgs // 2 IdleEventArgs -// 3 WorkflowCompletEventArgs +// 3 WorkflowCompleteEventArgs // 4 WorkflowApplicationCompletedEventArgs // 5 WorkflowApplicationAbortedEventArgs // 6, 7, 8 - UnhandledExceptionAction diff --git a/samples/snippets/csharp/VS_Snippets_CFX/htatombasic/cs/program.cs b/samples/snippets/csharp/VS_Snippets_CFX/htatombasic/cs/program.cs index 8d4e5cb02bfa8..23fef3d01efba 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/htatombasic/cs/program.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/htatombasic/cs/program.cs @@ -30,7 +30,7 @@ public Atom10FeedFormatter GetBlog() SyndicationFeed feed = new SyndicationFeed("My Blog Feed", "This is a test feed", new Uri("http://SomeURI"), "FeedOneID", new DateTimeOffset(DateTime.Now)); feed.Authors.Add(new SyndicationPerson("someone@microsoft.com")); feed.Categories.Add(new SyndicationCategory("How To Sample Code")); - feed.Description = new TextSyndicationContent("This is a sample that illistrates how to expose a feed using ATOM with WCF"); + feed.Description = new TextSyndicationContent("This is a sample that illustrates how to expose a feed using ATOM with WCF"); // </Snippet2> // <Snippet3> @@ -107,4 +107,4 @@ static void Main(string[] args) } } } -// </Snippet12> \ No newline at end of file +// </Snippet12> diff --git a/samples/snippets/csharp/VS_Snippets_CFX/iinstancecontextinitializer/cs/initializer.cs b/samples/snippets/csharp/VS_Snippets_CFX/iinstancecontextinitializer/cs/initializer.cs index 3263a58c8e763..36aac1d1951a3 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/iinstancecontextinitializer/cs/initializer.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/iinstancecontextinitializer/cs/initializer.cs @@ -16,7 +16,7 @@ public void Initialize(InstanceContext instanceContext, Message message) { MyInstanceContextExtension extension = new MyInstanceContextExtension(); - //Add your custom InstanceContex extension that will let you associate state with this instancecontext + //Add your custom InstanceContext extension that will let you associate state with this instancecontext instanceContext.Extensions.Add(extension); } } diff --git a/samples/snippets/csharp/VS_Snippets_CFX/metadataresolver/cs/client.cs b/samples/snippets/csharp/VS_Snippets_CFX/metadataresolver/cs/client.cs index fa5fc7d8a6f94..1c54631d5ab02 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/metadataresolver/cs/client.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/metadataresolver/cs/client.cs @@ -66,7 +66,7 @@ EndpointAddress httpGetMetaAddress // <snippet3> // Get metadata documents. - Console.WriteLine("URI of the metadata documents retreived:"); + Console.WriteLine("URI of the metadata documents retrieved:"); MetadataExchangeClient metaTransfer = new MetadataExchangeClient(httpGetMetaAddress.Uri, MetadataExchangeClientMode.HttpGet); metaTransfer.ResolveMetadataReferences = true; @@ -137,7 +137,7 @@ Trying all endpoints from HTTP/Get and with direct service channels... SampleMethodResponse SampleMethodResponse -URI of the metadata documents retreived: +URI of the metadata documents retrieved: http://schemas.xmlsoap.org/wsdl/ : http://tempuri.org/ http://schemas.xmlsoap.org/wsdl/ : http://Microsoft.WCF.Documentation http://www.w3.org/2001/XMLSchema : http://schemas.microsoft.com/2003/10/Serialization/ diff --git a/samples/snippets/csharp/VS_Snippets_CFX/s_duplexclients/cs/service.cs b/samples/snippets/csharp/VS_Snippets_CFX/s_duplexclients/cs/service.cs index fe778dfde3e59..3772e7083b476 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/s_duplexclients/cs/service.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/s_duplexclients/cs/service.cs @@ -32,7 +32,7 @@ public interface ICalculatorDuplex // </Snippet3> // The callback interface is used to send messages from service back to client. // The Equals operation will return the current result after each operation. - // The Equation opertion will return the complete equation after Clear() is called. + // The Equation operation will return the complete equation after Clear() is called. // <Snippet4> public interface ICalculatorDuplexCallback { diff --git a/samples/snippets/csharp/VS_Snippets_CFX/s_duplexclients/cs/services.cs b/samples/snippets/csharp/VS_Snippets_CFX/s_duplexclients/cs/services.cs index 4084fdc320abf..5fad416f22730 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/s_duplexclients/cs/services.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/s_duplexclients/cs/services.cs @@ -27,7 +27,7 @@ public interface ICalculatorDuplex // The callback interface is used to send messages from service back to client. // The Result operation will return the current result after each operation. - // The Equation opertion will return the complete equation after Clear() is called. + // The Equation operation will return the complete equation after Clear() is called. public interface ICalculatorDuplexCallback { [OperationContract(IsOneWay = true)] diff --git a/samples/snippets/csharp/VS_Snippets_CFX/s_ue_msmq_poison/cs/service.cs b/samples/snippets/csharp/VS_Snippets_CFX/s_ue_msmq_poison/cs/service.cs index f58658f6f2cd4..91e477d540bd0 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/s_ue_msmq_poison/cs/service.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/s_ue_msmq_poison/cs/service.cs @@ -13,7 +13,7 @@ namespace Microsoft.ServiceModel.Samples { - // Define the purchas order line item. + // Define the purchase order line item. [DataContract] public class PurchaseOrderLineItem { diff --git a/samples/snippets/csharp/VS_Snippets_CFX/s_ws_dualhttp/cs/service.cs b/samples/snippets/csharp/VS_Snippets_CFX/s_ws_dualhttp/cs/service.cs index 47168bb3ab0a7..fd1f74bf99c80 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/s_ws_dualhttp/cs/service.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/s_ws_dualhttp/cs/service.cs @@ -32,7 +32,7 @@ public interface ICalculatorDuplex // </Snippet3> // The callback interface is used to send messages from service back to client. // The Equals operation will return the current result after each operation. - // The Equation opertion will return the complete equation after Clear() is called. + // The Equation operation will return the complete equation after Clear() is called. // <Snippet4> public interface ICalculatorDuplexCallback { diff --git a/samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/Project.csproj b/samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/Project.csproj deleted file mode 100644 index b83f0211b39c5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/Project.csproj +++ /dev/null @@ -1,7 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <OutputType>Library</OutputType> - <TargetFrameworks>net6.0</TargetFrameworks> - </PropertyGroup> -</Project> diff --git a/samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/makefile b/samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/makefile deleted file mode 100644 index 1c17fd58b3942..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/makefile +++ /dev/null @@ -1,4 +0,0 @@ -all: source.exe - -source.exe: source.cs - csc /t:exe source.cs /r:System.ServiceModel.dll,System.Runtime.Serialization.dll /lib:c:\whidbey\assemblies diff --git a/samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs b/samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs deleted file mode 100644 index 25c95006ec0bd..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CFX/serializationguidelines/cs/source.cs +++ /dev/null @@ -1,241 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Runtime.Serialization; -using System.Security.Permissions; - -namespace MiscCodeExamples -{ - - public class Test - { - static void Main() - { - Person p = new Person("John", "Lennon"); - Person2 p2 = new Person2("John", "Lennon"); - Console.WriteLine("Done"); - Console.ReadLine(); - } - } - - //<snippet1> - [DataContract] - class Person - { - - [DataMember] - string LastName { get; set; } - [DataMember] - string FirstName { get; set; } - - public Person(string firstNameValue, string lastNameValue) - { - FirstName = firstNameValue; - LastName = lastNameValue; - } - } - - //</snippet1> - - //<snippet2> - [DataContract] - class Person2 - { - - string lastName; - string firstName; - - public Person2(string firstName, string lastName) - { - this.lastName = lastName; - this.firstName = firstName; - } - - [DataMember] - public string LastName - { - // Implement get and set. - get { return lastName; } - private set { lastName = value; } - } - - [DataMember] - public string FirstName - { - // Implement get and set. - get { return firstName; } - private set { firstName = value; } - } - } - //</snippet2> - - //<snippet3> - [DataContract] - class Person3 - { - [DataMember] - string lastName; - [DataMember] - string firstName; - string fullName; - - public Person3(string firstName, string lastName) - { - // This constructor is not called during deserialization. - this.lastName = lastName; - this.firstName = firstName; - fullName = firstName + " " + lastName; - } - - public string FullName - { - get { return fullName; } - } - - // This method is called after the object - // is completely deserialized. Use it instead of the - // constructror. - [OnDeserialized] - void OnDeserialized(StreamingContext context) - { - fullName = firstName + " " + lastName; - } - } - //</snippet3> - - //<snippet4> - // The KnownTypeAttribute specifies types to be - // used during serialization. - [KnownType(typeof(USAddress))] - [DataContract] - class Person4 - { - - [DataMember] - string fullNameValue; - [DataMember] - Address address; // Address is abstract - - public Person4(string fullName, Address address) - { - this.fullNameValue = fullName; - this.address = address; - } - - public string FullName - { - get { return fullNameValue; } - } - } - - [DataContract] - public abstract class Address - { - public abstract string FullAddress { get; } - } - - [DataContract] - public class USAddress : Address - { - - [DataMember] - public string Street { get; set; } - [DataMember] - public string City { get; set; } - [DataMember] - public string State { get; set; } - [DataMember] - public string ZipCode { get; set; } - - public override string FullAddress - { - get - { - return Street + "\n" + City + ", " + State + " " + ZipCode; - } - } - } - //</snippet4> - - //<snippet5> - // Implement the IExtensibleDataObject interface. - [DataContract] - class Person5 : IExtensibleDataObject - { - ExtensionDataObject serializationData; - [DataMember] - string fullNameValue; - - public Person5(string fullName) - { - this.fullNameValue = fullName; - } - - public string FullName - { - get { return fullNameValue; } - } - - ExtensionDataObject IExtensibleDataObject.ExtensionData - { - get - { - return serializationData; - } - set { serializationData = value; } - } - } - //</snippet5> - - //<snippet6> - public class Address2 - { - [System.Xml.Serialization.XmlAttribute] // Serialize as XML attribute, instead of an element. - public string Name { get { return "Poe, Toni"; } set { } } - [System.Xml.Serialization.XmlElement(ElementName = "StreetLine")] // Explicitly name the element. - public string Street = "1 Main Street"; - } - //</snippet6> - - //<snippet7> - // Apply SerializableAttribute to support runtime serialization. - [Serializable] - public class Person6 - { - // Code not shown. - } - //</snippet7> - - //<snippet8> - // Implement the ISerializable interface for more control. - [Serializable] - public class Person_Runtime_Serializable : ISerializable - { - string fullName; - - public Person_Runtime_Serializable() { } - - //<snippet9> - protected Person_Runtime_Serializable(SerializationInfo info, StreamingContext context){ - //</snippet9> - if (info == null) throw new System.ArgumentNullException("info"); - fullName = (string)info.GetValue("name", typeof(string)); - } - - //<snippet10> - void ISerializable.GetObjectData(SerializationInfo info, - StreamingContext context) { - //</snippet10> - if (info == null) throw new System.ArgumentNullException("info"); - info.AddValue("name", fullName); - } - - public string FullName - { - get { return fullName; } - set { fullName = value; } - } - } - //</snippet8> -} diff --git a/samples/snippets/csharp/VS_Snippets_CFX/tx_enlist/cs/enlist.cs b/samples/snippets/csharp/VS_Snippets_CFX/tx_enlist/cs/enlist.cs index 8fc1758f88d4a..e448f1df6a55f 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/tx_enlist/cs/enlist.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/tx_enlist/cs/enlist.cs @@ -28,12 +28,12 @@ static void Main(string[] args) { using (TransactionScope scope = new TransactionScope()) { - + //Create an enlistment object - myEnlistmentClass myElistment = new myEnlistmentClass(); + myEnlistmentClass myEnlistment = new myEnlistmentClass(); //Enlist on the current transaction with the enlistment object - Transaction.Current.EnlistVolatile(myElistment, EnlistmentOptions.None); + Transaction.Current.EnlistVolatile(myEnlistment, EnlistmentOptions.None); //Perform transactional work here. @@ -44,7 +44,7 @@ static void Main(string[] args) Console.Write("Complete the transaction scope? [Y|N] "); c = Console.ReadKey(); Console.WriteLine(); - + if ((c.KeyChar == 'Y') || (c.KeyChar == 'y')) { scope.Complete(); @@ -108,8 +108,8 @@ public void InDoubt(Enlistment enlistment) { Console.WriteLine("In doubt notification received"); - //Do any work necessary when indout notification is received - + //Do any work necessary when in doubt notification is received + //Declare done on the enlistment enlistment.Done(); } diff --git a/samples/snippets/csharp/VS_Snippets_CFX/x509accessible/cs/source.cs b/samples/snippets/csharp/VS_Snippets_CFX/x509accessible/cs/source.cs index d520610f3e520..7731f30d07519 100644 --- a/samples/snippets/csharp/VS_Snippets_CFX/x509accessible/cs/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CFX/x509accessible/cs/source.cs @@ -14,7 +14,7 @@ static void Main() try { - MessageSecuritWithKerberosAuth.MyService.Run(); + MessageSecurityWithKerberosAuth.MyService.Run(); } catch (System.Exception ex) { @@ -146,7 +146,7 @@ public static void RunClient() // Create the client. The code for the calculator is not // shown here. client is not shown here. See the sample applications - // for examples of the calculator code. + // for examples of the calculator code. CalculatorClient cc = new CalculatorClient(myBinding, myEndpointAddress); cc.Open(); @@ -231,7 +231,7 @@ public static void RunClient() } } -namespace SecuredTranserUsingCertificates +namespace SecuredTransferUsingCertificates { public class MyService { @@ -579,7 +579,7 @@ private void ClientRun() } } -namespace MessageSecuritWithKerberosAuth +namespace MessageSecurityWithKerberosAuth { using ServiceModel; public class MyService diff --git a/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/EndInvoke.cs b/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/EndInvoke.cs index 82e4dbb60ac07..b89ca22d53a49 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/EndInvoke.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/EndInvoke.cs @@ -17,7 +17,7 @@ public static void Main() // Create the delegate. AsyncMethodCaller caller = new AsyncMethodCaller(ad.TestMethod); - // Initiate the asychronous call. + // Initiate the asynchronous call. IAsyncResult result = caller.BeginInvoke(3000, out threadId, null, null); diff --git a/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/polling.cs b/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/polling.cs index c558baf5126c3..d12ad71bb2247 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/polling.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/polling.cs @@ -16,7 +16,7 @@ static void Main() { // Create the delegate. AsyncMethodCaller caller = new AsyncMethodCaller(ad.TestMethod); - // Initiate the asychronous call. + // Initiate the asynchronous call. IAsyncResult result = caller.BeginInvoke(3000, out threadId, null, null); diff --git a/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/waithandle.cs b/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/waithandle.cs index bf20d0caab3c5..cd365b8d35cd2 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/waithandle.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/AsyncDelegateExamples/CS/waithandle.cs @@ -17,7 +17,7 @@ static void Main() // Create the delegate. AsyncMethodCaller caller = new AsyncMethodCaller(ad.TestMethod); - // Initiate the asychronous call. + // Initiate the asynchronous call. IAsyncResult result = caller.BeginInvoke(3000, out threadId, null, null); diff --git a/samples/snippets/csharp/VS_Snippets_CLR/AsyncDesignPattern/CS/Async_Poll.cs b/samples/snippets/csharp/VS_Snippets_CLR/AsyncDesignPattern/CS/Async_Poll.cs index 5c1f733b4b61c..81fa1855f1e37 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/AsyncDesignPattern/CS/Async_Poll.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/AsyncDesignPattern/CS/Async_Poll.cs @@ -29,7 +29,7 @@ public static void Main(string[] args) Console.WriteLine("You must specify the name of a host computer."); return; } - // Start the asychronous request for DNS information. + // Start the asynchronous request for DNS information. IAsyncResult result = Dns.BeginGetHostEntry(args[0], null, null); Console.WriteLine("Processing request for information..."); diff --git a/samples/snippets/csharp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/Example1.cpp b/samples/snippets/csharp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/Example1.cpp deleted file mode 100644 index c4a45bd69437e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/Example1.cpp +++ /dev/null @@ -1,16 +0,0 @@ -using namespace System::Runtime::InteropServices; - -typedef void* HWND; - -[DllImport("user32", CharSet=CharSet::Auto)] -extern "C" IntPtr MessageBox(HWND hWnd, - String* pText, - String* pCaption, - unsigned int uType); - -void main() -{ - String* pText = L"Hello World!"; - String* pCaption = L"Platform Invoke Sample"; - MessageBox(0, pText, pCaption, 0); -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR/CryptoWalkThru/cs/Form1.Designer.cs b/samples/snippets/csharp/VS_Snippets_CLR/CryptoWalkThru/cs/Form1.Designer.cs index f72540bb87030..378d8f0a9b046 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/CryptoWalkThru/cs/Form1.Designer.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/CryptoWalkThru/cs/Form1.Designer.cs @@ -116,7 +116,7 @@ private void InitializeComponent() this.grpAsmKeys.Size = new System.Drawing.Size(160, 138); this.grpAsmKeys.TabIndex = 42; this.grpAsmKeys.TabStop = false; - this.grpAsmKeys.Text = "Asymetric Keys"; + this.grpAsmKeys.Text = "Asymmetric Keys"; // // buttonGetPrivateKey // diff --git a/samples/snippets/csharp/VS_Snippets_CLR/CryptoWalkThru/cs/Form1.cs b/samples/snippets/csharp/VS_Snippets_CLR/CryptoWalkThru/cs/Form1.cs index 4acd11af11108..ac287caa88f3c 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/CryptoWalkThru/cs/Form1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/CryptoWalkThru/cs/Form1.cs @@ -9,7 +9,7 @@ public partial class Form1 : Form { #region Snippet1 - Global objects // <Snippet1> - // Declare CspParmeters and RsaCryptoServiceProvider + // Declare CspParameters and RsaCryptoServiceProvider // objects with global scope of your Form class. readonly CspParameters _cspp = new CspParameters(); RSACryptoServiceProvider _rsa; @@ -107,7 +107,7 @@ private void buttonDecryptFile_Click(object sender, EventArgs e) #endregion #region Snippet5 - EncryptFile - + // <Snippet5> private void EncryptFile(FileInfo file) { @@ -133,12 +133,12 @@ private void EncryptFile(FileInfo file) // for the encrypted file (outFs): // - length of the key // - length of the IV - // - ecrypted key + // - encrypted key // - the IV // - the encrypted cipher content // Change the file's extension to ".enc" - string outFile = + string outFile = Path.Combine(EncrFolder, Path.ChangeExtension(file.Name, ".enc")); using (var outFs = new FileStream(outFile, FileMode.Create)) @@ -150,7 +150,7 @@ private void EncryptFile(FileInfo file) // Now write the cipher text using // a CryptoStream for encrypting. - using (var outStreamEncrypted = + using (var outStreamEncrypted = new CryptoStream(outFs, transform, CryptoStreamMode.Write)) { // By encrypting a chunk at @@ -182,7 +182,7 @@ private void EncryptFile(FileInfo file) #endregion #region Snippet6 - DecryptFile - + // <Snippet6> private void DecryptFile(FileInfo file) { @@ -214,8 +214,8 @@ private void DecryptFile(FileInfo file) int lenK = BitConverter.ToInt32(LenK, 0); int lenIV = BitConverter.ToInt32(LenIV, 0); - // Determine the start postition of - // the ciphter text (startC) + // Determine the start position of + // the cipher text (startC) // and its length(lenC). int startC = lenK + lenIV + 8; int lenC = (int)inFs.Length - startC; @@ -316,7 +316,7 @@ void buttonExportPublicKey_Click(object sender, EventArgs e) #endregion #region Snippet9 - buttonImportPublicKey - + // <Snippet9> void buttonImportPublicKey_Click(object sender, EventArgs e) { diff --git a/samples/snippets/csharp/VS_Snippets_CLR/Cryptography.SmartCardCSP/CS/example.cs b/samples/snippets/csharp/VS_Snippets_CLR/Cryptography.SmartCardCSP/CS/example.cs index c19021c5d0500..5f5c7abed4d56 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/Cryptography.SmartCardCSP/CS/example.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/Cryptography.SmartCardCSP/CS/example.cs @@ -8,7 +8,7 @@ class SCSign { static void Main(string[] args) { - // To idendify the Smart Card CryptoGraphic Providers on your + // To identify the Smart Card CryptoGraphic Providers on your // computer, use the Microsoft Registry Editor (Regedit.exe). // The available Smart Card CryptoGraphic Providers are listed // in HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Defaults\Provider. diff --git a/samples/snippets/csharp/VS_Snippets_CLR/Exception.Throwing/CS/Project.csproj b/samples/snippets/csharp/VS_Snippets_CLR/Exception.Throwing/CS/Project.csproj new file mode 100644 index 0000000000000..4e70f007bfb22 --- /dev/null +++ b/samples/snippets/csharp/VS_Snippets_CLR/Exception.Throwing/CS/Project.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net7.0</TargetFramework> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> + \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CLR/Exception.Throwing/CS/throw.cs b/samples/snippets/csharp/VS_Snippets_CLR/Exception.Throwing/CS/throw.cs index 1cbe8a76f30ae..9b2e1513a8c84 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/Exception.Throwing/CS/throw.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/Exception.Throwing/CS/throw.cs @@ -1,32 +1,35 @@ -// <Snippet1> -using System; +using System; using System.IO; -public class ProcessFile +namespace Example { - public static void Main() + public class ProcessFile { - FileStream fs; - try + public static void Main() { - // Opens a text tile. - fs = new FileStream(@"C:\temp\data.txt", FileMode.Open); - var sr = new StreamReader(fs); + // <Snippet1> + var fs = default(FileStream); + try + { + // Opens a text tile. + fs = new FileStream(@"C:\temp\data.txt", FileMode.Open); + var sr = new StreamReader(fs); - // A value is read from the file and output to the console. - string line = sr.ReadLine(); - Console.WriteLine(line); - } - catch(FileNotFoundException e) - { - Console.WriteLine($"[Data File Missing] {e}"); - throw new FileNotFoundException(@"[data.txt not in c:\temp directory]", e); - } - finally - { - if (fs != null) - fs.Close(); + // A value is read from the file and output to the console. + string? line = sr.ReadLine(); + Console.WriteLine(line); + } + catch (FileNotFoundException e) + { + Console.WriteLine($"[Data File Missing] {e}"); + throw new FileNotFoundException(@"[data.txt not in c:\temp directory]", e); + } + finally + { + if (fs != null) + fs.Close(); + } + // </Snippet1> } } } -// </Snippet1> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/RegularExpressions.Quantifiers/cs/Quantifiers1.cs b/samples/snippets/csharp/VS_Snippets_CLR/RegularExpressions.Quantifiers/cs/Quantifiers1.cs index 6e34656012ee7..dc4dc09fa70ac 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/RegularExpressions.Quantifiers/cs/Quantifiers1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/RegularExpressions.Quantifiers/cs/Quantifiers1.cs @@ -81,7 +81,7 @@ private static void ShowQuestion() { // <Snippet3> string pattern = @"\ban?\b"; - string input = "An amiable animal with a large snount and an animated nose."; + string input = "An amiable animal with a large snout and an animated nose."; foreach (Match match in Regex.Matches(input, pattern, RegexOptions.IgnoreCase)) Console.WriteLine("'{0}' found at position {1}.", match.Value, match.Index); diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.clscompliant/cs/generics2a.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.clscompliant/cs/generics2a.cs index b57aacae46c2e..10fdf90407541 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.clscompliant/cs/generics2a.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.clscompliant/cs/generics2a.cs @@ -45,7 +45,7 @@ public FloatingPoint(T number) : base(number) throw new ArgumentException("The number parameter is not a floating-point number."); } } -// The attempt to comple the example displays the following output: +// The attempt to compile the example displays the following output: // error CS0453: The type 'T' must be a non-nullable value type in // order to use it as parameter 'T' in the generic type or method 'Number<T>' // </Snippet30> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.conversion/cs/iconvertible2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.conversion/cs/iconvertible2.cs index 834d55d9bb9c9..fca48e8178ecf 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.conversion/cs/iconvertible2.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.conversion/cs/iconvertible2.cs @@ -231,7 +231,7 @@ public override string ToString(IFormatProvider provider) public override object ToType(Type conversionType, IFormatProvider provider) { - // For non-objects, call base methood. + // For non-objects, call base method. if (Type.GetTypeCode(conversionType) != TypeCode.Object) { return base.ToType(conversionType, provider); diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.generics.overview/cs/source.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.generics.overview/cs/source.cs index 262c9c76c5cab..4ba07c940329d 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.generics.overview/cs/source.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.generics.overview/cs/source.cs @@ -4,7 +4,7 @@ namespace GenericsExample1 { //<snippet2> - public class Generic<T> + public class SimpleGenericClass<T> { public T Field; } @@ -15,16 +15,16 @@ public class GenTest //<snippet3> public static void Main() { - Generic<string> g = new Generic<string>(); + SimpleGenericClass<string> g = new SimpleGenericClass<string>(); g.Field = "A string"; //... - Console.WriteLine("Generic.Field = \"{0}\"", g.Field); - Console.WriteLine("Generic.Field.GetType() = {0}", g.Field.GetType().FullName); + Console.WriteLine("SimpleGenericClass.Field = \"{0}\"", g.Field); + Console.WriteLine("SimpleGenericClass.Field.GetType() = {0}", g.Field.GetType().FullName); } //</snippet3> //<snippet4> - T Generic<T>(T arg) + T MyGenericMethod<T>(T arg) { T temp = arg; //... @@ -46,7 +46,7 @@ T G<T>(T arg) return temp; } } - class Generic<T> + class MyGenericClass<T> { T M(T arg) { diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/codepages1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/codepages1.cs index 746374986e930..3d335875bca9d 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/codepages1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/codepages1.cs @@ -5,7 +5,7 @@ public class Example { - public static void Main() + public static void CodePages() { // Represent Greek uppercase characters in code page 737. char[] greekChars = @@ -43,6 +43,7 @@ public static void Main() Console.WriteLine(data); } } + // The example displays the following output: // ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ // €‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’""•–— diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/currency2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/currency2.cs index 551d028df9faf..51fe5c1a40574 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/currency2.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/currency2.cs @@ -1,54 +1,47 @@ // <Snippet17> using System; using System.Globalization; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; +using System.Text.Json; using System.Threading; public class Example2 { - public static void Main2() - { - // Display the currency value. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - Decimal value = 16039.47m; - Console.WriteLine("Current Culture: {0}", CultureInfo.CurrentCulture.DisplayName); - Console.WriteLine("Currency Value: {0:C2}", value); + public static void Main2() + { + // Display the currency value. + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); + Decimal value = 16039.47m; + Console.WriteLine($"Current Culture: {CultureInfo.CurrentCulture.DisplayName}"); + Console.WriteLine($"Currency Value: {value:C2}"); - // Serialize the currency data. - BinaryFormatter bf = new BinaryFormatter(); - FileStream fw = new FileStream("currency.dat", FileMode.Create); - CurrencyValue data = new CurrencyValue(value, CultureInfo.CurrentCulture.Name); - bf.Serialize(fw, data); - fw.Close(); - Console.WriteLine(); + // Serialize the currency data. + CurrencyValue data = new() + { + Amount = value, + CultureName = CultureInfo.CurrentCulture.Name + }; + string serialized = JsonSerializer.Serialize(data); + Console.WriteLine(); - // Change the current culture. - CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); - Console.WriteLine("Current Culture: {0}", CultureInfo.CurrentCulture.DisplayName); + // Change the current culture. + CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); + Console.WriteLine($"Current Culture: {CultureInfo.CurrentCulture.DisplayName}"); - // Deserialize the data. - FileStream fr = new FileStream("currency.dat", FileMode.Open); - CurrencyValue restoredData = (CurrencyValue) bf.Deserialize(fr); - fr.Close(); + // Deserialize the data. + CurrencyValue restoredData = JsonSerializer.Deserialize<CurrencyValue>(serialized); - // Display the original value. - CultureInfo culture = CultureInfo.CreateSpecificCulture(restoredData.CultureName); - Console.WriteLine("Currency Value: {0}", restoredData.Amount.ToString("C2", culture)); - } + // Display the round-tripped value. + CultureInfo culture = CultureInfo.CreateSpecificCulture(restoredData.CultureName); + Console.WriteLine($"Currency Value: {restoredData.Amount.ToString("C2", culture)}"); + } } -[Serializable] internal struct CurrencyValue +internal struct CurrencyValue { - public CurrencyValue(Decimal amount, string name) - { - this.Amount = amount; - this.CultureName = name; - } - - public Decimal Amount; - public string CultureName; + public decimal Amount { get; set; } + public string CultureName { get; set; } } + // The example displays the following output: // Current Culture: English (United States) // Currency Value: $16,039.47 diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates1.cs index d7b0d7e702498..a735d90a74300 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates1.cs @@ -5,25 +5,26 @@ public class Example3 { - static DateTime[] dates = { new DateTime(2012, 10, 11, 7, 06, 0), + static DateTime[] dates = { new DateTime(2012, 10, 11, 7, 06, 0), new DateTime(2012, 10, 11, 18, 19, 0) }; - public static void Main3() - { - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("hr-HR"); - ShowDayInfo(); - Console.WriteLine(); - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); - ShowDayInfo(); - } + public static void Main3() + { + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("hr-HR"); + ShowDayInfo(); + Console.WriteLine(); + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); + ShowDayInfo(); + } - private static void ShowDayInfo() - { - Console.WriteLine("Date: {0:D}", dates[0]); - Console.WriteLine(" Sunrise: {0:T}", dates[0]); - Console.WriteLine(" Sunset: {0:T}", dates[1]); - } + private static void ShowDayInfo() + { + Console.WriteLine("Date: {0:D}", dates[0]); + Console.WriteLine(" Sunrise: {0:T}", dates[0]); + Console.WriteLine(" Sunset: {0:T}", dates[1]); + } } + // The example displays the following output: // Date: 11. listopada 2012. // Sunrise: 7:06:00 diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates2.cs index 5e2902c85f1c2..0403bccf22c77 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates2.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates2.cs @@ -6,47 +6,50 @@ public class Example4 { - public static void Main4() - { - // Persist two dates as strings. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - DateTime[] dates = { new DateTime(2013, 1, 9), + public static void Main4() + { + // Persist two dates as strings. + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); + DateTime[] dates = { new DateTime(2013, 1, 9), new DateTime(2013, 8, 18) }; - StreamWriter sw = new StreamWriter("dateData.dat"); - sw.Write("{0:d}|{1:d}", dates[0], dates[1]); - sw.Close(); + StreamWriter sw = new StreamWriter("dateData.dat"); + sw.Write("{0:d}|{1:d}", dates[0], dates[1]); + sw.Close(); - // Read the persisted data. - StreamReader sr = new StreamReader("dateData.dat"); - string dateData = sr.ReadToEnd(); - sr.Close(); - string[] dateStrings = dateData.Split('|'); + // Read the persisted data. + StreamReader sr = new StreamReader("dateData.dat"); + string dateData = sr.ReadToEnd(); + sr.Close(); + string[] dateStrings = dateData.Split('|'); - // Restore and display the data using the conventions of the en-US culture. - Console.WriteLine("Current Culture: {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - foreach (var dateStr in dateStrings) { - DateTime restoredDate; - if (DateTime.TryParse(dateStr, out restoredDate)) - Console.WriteLine("The date is {0:D}", restoredDate); - else - Console.WriteLine("ERROR: Unable to parse {0}", dateStr); - } - Console.WriteLine(); + // Restore and display the data using the conventions of the en-US culture. + Console.WriteLine("Current Culture: {0}", + Thread.CurrentThread.CurrentCulture.DisplayName); + foreach (var dateStr in dateStrings) + { + DateTime restoredDate; + if (DateTime.TryParse(dateStr, out restoredDate)) + Console.WriteLine("The date is {0:D}", restoredDate); + else + Console.WriteLine("ERROR: Unable to parse {0}", dateStr); + } + Console.WriteLine(); - // Restore and display the data using the conventions of the en-GB culture. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); - Console.WriteLine("Current Culture: {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - foreach (var dateStr in dateStrings) { - DateTime restoredDate; - if (DateTime.TryParse(dateStr, out restoredDate)) - Console.WriteLine("The date is {0:D}", restoredDate); - else - Console.WriteLine("ERROR: Unable to parse {0}", dateStr); - } - } + // Restore and display the data using the conventions of the en-GB culture. + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); + Console.WriteLine("Current Culture: {0}", + Thread.CurrentThread.CurrentCulture.DisplayName); + foreach (var dateStr in dateStrings) + { + DateTime restoredDate; + if (DateTime.TryParse(dateStr, out restoredDate)) + Console.WriteLine("The date is {0:D}", restoredDate); + else + Console.WriteLine("ERROR: Unable to parse {0}", dateStr); + } + } } + // The example displays the following output: // Current Culture: English (United States) // The date is Wednesday, January 09, 2013 diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates3.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates3.cs index 34f620bb7f1d6..b97861769bc2d 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates3.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates3.cs @@ -6,50 +6,53 @@ public class Example5 { - public static void Main5() - { - // Persist two dates as strings. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - DateTime[] dates = { new DateTime(2013, 1, 9), + public static void Main5() + { + // Persist two dates as strings. + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); + DateTime[] dates = { new DateTime(2013, 1, 9), new DateTime(2013, 8, 18) }; - StreamWriter sw = new StreamWriter("dateData.dat"); - sw.Write(String.Format(CultureInfo.InvariantCulture, - "{0:d}|{1:d}", dates[0], dates[1])); - sw.Close(); + StreamWriter sw = new StreamWriter("dateData.dat"); + sw.Write(String.Format(CultureInfo.InvariantCulture, + "{0:d}|{1:d}", dates[0], dates[1])); + sw.Close(); - // Read the persisted data. - StreamReader sr = new StreamReader("dateData.dat"); - string dateData = sr.ReadToEnd(); - sr.Close(); - string[] dateStrings = dateData.Split('|'); + // Read the persisted data. + StreamReader sr = new StreamReader("dateData.dat"); + string dateData = sr.ReadToEnd(); + sr.Close(); + string[] dateStrings = dateData.Split('|'); - // Restore and display the data using the conventions of the en-US culture. - Console.WriteLine("Current Culture: {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - foreach (var dateStr in dateStrings) { - DateTime restoredDate; - if (DateTime.TryParse(dateStr, CultureInfo.InvariantCulture, - DateTimeStyles.None, out restoredDate)) - Console.WriteLine("The date is {0:D}", restoredDate); - else - Console.WriteLine("ERROR: Unable to parse {0}", dateStr); - } - Console.WriteLine(); + // Restore and display the data using the conventions of the en-US culture. + Console.WriteLine("Current Culture: {0}", + Thread.CurrentThread.CurrentCulture.DisplayName); + foreach (var dateStr in dateStrings) + { + DateTime restoredDate; + if (DateTime.TryParse(dateStr, CultureInfo.InvariantCulture, + DateTimeStyles.None, out restoredDate)) + Console.WriteLine("The date is {0:D}", restoredDate); + else + Console.WriteLine("ERROR: Unable to parse {0}", dateStr); + } + Console.WriteLine(); - // Restore and display the data using the conventions of the en-GB culture. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); - Console.WriteLine("Current Culture: {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - foreach (var dateStr in dateStrings) { - DateTime restoredDate; - if (DateTime.TryParse(dateStr, CultureInfo.InvariantCulture, - DateTimeStyles.None, out restoredDate)) - Console.WriteLine("The date is {0:D}", restoredDate); - else - Console.WriteLine("ERROR: Unable to parse {0}", dateStr); - } - } + // Restore and display the data using the conventions of the en-GB culture. + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); + Console.WriteLine("Current Culture: {0}", + Thread.CurrentThread.CurrentCulture.DisplayName); + foreach (var dateStr in dateStrings) + { + DateTime restoredDate; + if (DateTime.TryParse(dateStr, CultureInfo.InvariantCulture, + DateTimeStyles.None, out restoredDate)) + Console.WriteLine("The date is {0:D}", restoredDate); + else + Console.WriteLine("ERROR: Unable to parse {0}", dateStr); + } + } } + // The example displays the following output: // Current Culture: English (United States) // The date is Wednesday, January 09, 2013 diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates4.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates4.cs index 7e9017173768d..9e0be240e4c31 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates4.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates4.cs @@ -1,48 +1,34 @@ // <Snippet10> using System; using System.IO; -using System.Runtime.Serialization.Formatters.Binary; public class Example6 { - public static void Main6() - { - BinaryFormatter formatter = new BinaryFormatter(); + public static void Main6() + { + DateTime dateOriginal = new DateTime(2023, 3, 30, 18, 0, 0); + dateOriginal = DateTime.SpecifyKind(dateOriginal, DateTimeKind.Local); - DateTime dateOriginal = new DateTime(2013, 3, 30, 18, 0, 0); - dateOriginal = DateTime.SpecifyKind(dateOriginal, DateTimeKind.Local); + // Serialize a date. + if (!File.Exists("DateInfo.dat")) + { + StreamWriter sw = new StreamWriter("DateInfo.dat"); + sw.Write("{0:G}|{0:s}|{0:o}", dateOriginal); + sw.Close(); + Console.WriteLine("Serialized dates to DateInfo.dat"); + } + Console.WriteLine(); - // Serialize a date. - if (! File.Exists("DateInfo.dat")) { - StreamWriter sw = new StreamWriter("DateInfo.dat"); - sw.Write("{0:G}|{0:s}|{0:o}", dateOriginal); - sw.Close(); - Console.WriteLine("Serialized dates to DateInfo.dat"); - } - // Serialize the data as a binary value. - if (! File.Exists("DateInfo.bin")) { - FileStream fsIn = new FileStream("DateInfo.bin", FileMode.Create); - formatter.Serialize(fsIn, dateOriginal); - fsIn.Close(); - Console.WriteLine("Serialized date to DateInfo.bin"); - } - Console.WriteLine(); - - // Restore the date from string values. - StreamReader sr = new StreamReader("DateInfo.dat"); - string datesToSplit = sr.ReadToEnd(); - string[] dateStrings = datesToSplit.Split('|'); - foreach (var dateStr in dateStrings) { - DateTime newDate = DateTime.Parse(dateStr); - Console.WriteLine("'{0}' --> {1} {2}", - dateStr, newDate, newDate.Kind); - } - Console.WriteLine(); - - // Restore the date from binary data. - FileStream fsOut = new FileStream("DateInfo.bin", FileMode.Open); - DateTime restoredDate = (DateTime) formatter.Deserialize(fsOut); - Console.WriteLine("{0} {1}", restoredDate, restoredDate.Kind); - } + // Restore the date from string values. + StreamReader sr = new StreamReader("DateInfo.dat"); + string datesToSplit = sr.ReadToEnd(); + string[] dateStrings = datesToSplit.Split('|'); + foreach (var dateStr in dateStrings) + { + DateTime newDate = DateTime.Parse(dateStr); + Console.WriteLine("'{0}' --> {1} {2}", + dateStr, newDate, newDate.Kind); + } + } } // </Snippet10> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates5.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates5.cs index 22fa3dfe5d828..648618f7a39b5 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates5.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates5.cs @@ -3,16 +3,17 @@ public class Example7 { - public static void Main7() - { - DateTime date1 = DateTime.SpecifyKind(new DateTime(2013, 3, 9, 10, 30, 0), - DateTimeKind.Local); - TimeSpan interval = new TimeSpan(48, 0, 0); - DateTime date2 = date1 + interval; - Console.WriteLine("{0:g} + {1:N1} hours = {2:g}", - date1, interval.TotalHours, date2); - } + public static void Main7() + { + DateTime date1 = DateTime.SpecifyKind(new DateTime(2013, 3, 9, 10, 30, 0), + DateTimeKind.Local); + TimeSpan interval = new TimeSpan(48, 0, 0); + DateTime date2 = date1 + interval; + Console.WriteLine("{0:g} + {1:N1} hours = {2:g}", + date1, interval.TotalHours, date2); + } } + // The example displays the following output: // 3/9/2013 10:30 AM + 48.0 hours = 3/11/2013 10:30 AM // </Snippet8> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates6.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates6.cs index a2cc5c396d43c..04eae407c0c8b 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates6.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates6.cs @@ -3,19 +3,20 @@ public class Example8 { - public static void Main8() - { - TimeZoneInfo pst = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"); - DateTime date1 = DateTime.SpecifyKind(new DateTime(2013, 3, 9, 10, 30, 0), - DateTimeKind.Local); - DateTime utc1 = date1.ToUniversalTime(); - TimeSpan interval = new TimeSpan(48, 0, 0); - DateTime utc2 = utc1 + interval; - DateTime date2 = TimeZoneInfo.ConvertTimeFromUtc(utc2, pst); - Console.WriteLine("{0:g} + {1:N1} hours = {2:g}", - date1, interval.TotalHours, date2); - } + public static void Main8() + { + TimeZoneInfo pst = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"); + DateTime date1 = DateTime.SpecifyKind(new DateTime(2013, 3, 9, 10, 30, 0), + DateTimeKind.Local); + DateTime utc1 = date1.ToUniversalTime(); + TimeSpan interval = new TimeSpan(48, 0, 0); + DateTime utc2 = utc1 + interval; + DateTime date2 = TimeZoneInfo.ConvertTimeFromUtc(utc2, pst); + Console.WriteLine("{0:g} + {1:N1} hours = {2:g}", + date1, interval.TotalHours, date2); + } } + // The example displays the following output: // 3/9/2013 10:30 AM + 48.0 hours = 3/11/2013 11:30 AM // </Snippet9> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates8.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates8.cs index fdbb79b769a00..bf183d787b9e6 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates8.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/dates8.cs @@ -1,58 +1,41 @@ // <Snippet11> using System; using System.IO; -using System.Runtime.Serialization.Formatters.Binary; public class Example9 { - public static void Main9() - { - BinaryFormatter formatter = new BinaryFormatter(); + public static void Main9() + { + // Serialize a date. + DateTime dateOriginal = new DateTime(2023, 3, 30, 18, 0, 0); + dateOriginal = DateTime.SpecifyKind(dateOriginal, DateTimeKind.Local); - // Serialize a date. - DateTime dateOriginal = new DateTime(2013, 3, 30, 18, 0, 0); - dateOriginal = DateTime.SpecifyKind(dateOriginal, DateTimeKind.Local); + // Serialize the date in string form. + if (!File.Exists("DateInfo2.dat")) + { + StreamWriter sw = new StreamWriter("DateInfo2.dat"); + sw.Write("{0:o}|{1:r}|{1:u}", dateOriginal, + dateOriginal.ToUniversalTime()); + sw.Close(); + } - // Serialize the date in string form. - if (! File.Exists("DateInfo2.dat")) { - StreamWriter sw = new StreamWriter("DateInfo2.dat"); - sw.Write("{0:o}|{1:r}|{1:u}", dateOriginal, - dateOriginal.ToUniversalTime()); - sw.Close(); - Console.WriteLine("Serialized dates to DateInfo.dat"); - } - // Serialize the date as a binary value. - if (! File.Exists("DateInfo2.bin")) { - FileStream fsIn = new FileStream("DateInfo2.bin", FileMode.Create); - formatter.Serialize(fsIn, dateOriginal.ToUniversalTime()); - fsIn.Close(); - Console.WriteLine("Serialized date to DateInfo.bin"); - } - Console.WriteLine(); - - // Restore the date from string values. - StreamReader sr = new StreamReader("DateInfo2.dat"); - string datesToSplit = sr.ReadToEnd(); - string[] dateStrings = datesToSplit.Split('|'); - for (int ctr = 0; ctr < dateStrings.Length; ctr++) { - DateTime newDate = DateTime.Parse(dateStrings[ctr]); - if (ctr == 1) { - Console.WriteLine("'{0}' --> {1} {2}", - dateStrings[ctr], newDate, newDate.Kind); - } - else { - DateTime newLocalDate = newDate.ToLocalTime(); - Console.WriteLine("'{0}' --> {1} {2}", - dateStrings[ctr], newLocalDate, newLocalDate.Kind); - } - } - Console.WriteLine(); - - // Restore the date from binary data. - FileStream fsOut = new FileStream("DateInfo2.bin", FileMode.Open); - DateTime restoredDate = (DateTime) formatter.Deserialize(fsOut); - restoredDate = restoredDate.ToLocalTime(); - Console.WriteLine("{0} {1}", restoredDate, restoredDate.Kind); - } + // Restore the date from string values. + StreamReader sr = new StreamReader("DateInfo2.dat"); + string datesToSplit = sr.ReadToEnd(); + string[] dateStrings = datesToSplit.Split('|'); + for (int ctr = 0; ctr < dateStrings.Length; ctr++) + { + DateTime newDate = DateTime.Parse(dateStrings[ctr]); + if (ctr == 1) + { + Console.WriteLine($"'{dateStrings[ctr]}' --> {newDate} {newDate.Kind}"); + } + else + { + DateTime newLocalDate = newDate.ToLocalTime(); + Console.WriteLine($"'{dateStrings[ctr]}' --> {newLocalDate} {newLocalDate.Kind}"); + } + } + } } // </Snippet11> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/equals1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/equals1.cs index 68764d747a49a..b4a44883ee777 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/equals1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/equals1.cs @@ -5,23 +5,24 @@ public class Example10 { - public static void Main10() - { - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("tr-TR"); - string uri = @"file:\\c:\users\username\Documents\bio.txt"; - if (! AccessesFileSystem(uri)) - // Permit access to resource specified by URI - Console.WriteLine("Access is allowed."); - else - // Prohibit access. - Console.WriteLine("Access is not allowed."); - } + public static void Main10() + { + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("tr-TR"); + string uri = @"file:\\c:\users\username\Documents\bio.txt"; + if (!AccessesFileSystem(uri)) + // Permit access to resource specified by URI + Console.WriteLine("Access is allowed."); + else + // Prohibit access. + Console.WriteLine("Access is not allowed."); + } - private static bool AccessesFileSystem(string uri) - { - return uri.StartsWith("FILE", true, CultureInfo.CurrentCulture); - } + private static bool AccessesFileSystem(string uri) + { + return uri.StartsWith("FILE", true, CultureInfo.CurrentCulture); + } } + // The example displays the following output: // Access is allowed. // </Snippet12> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/equals2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/equals2.cs index aab0dd481417e..d82de1ee540fd 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/equals2.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/equals2.cs @@ -5,23 +5,24 @@ public class Example11 { - public static void Main11() - { - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("tr-TR"); - string uri = @"file:\\c:\users\username\Documents\bio.txt"; - if (! AccessesFileSystem(uri)) - // Permit access to resource specified by URI - Console.WriteLine("Access is allowed."); - else - // Prohibit access. - Console.WriteLine("Access is not allowed."); - } + public static void Main11() + { + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("tr-TR"); + string uri = @"file:\\c:\users\username\Documents\bio.txt"; + if (!AccessesFileSystem(uri)) + // Permit access to resource specified by URI + Console.WriteLine("Access is allowed."); + else + // Prohibit access. + Console.WriteLine("Access is not allowed."); + } - private static bool AccessesFileSystem(string uri) - { - return uri.StartsWith("FILE", StringComparison.OrdinalIgnoreCase); - } + private static bool AccessesFileSystem(string uri) + { + return uri.StartsWith("FILE", StringComparison.OrdinalIgnoreCase); + } } + // The example displays the following output: // Access is not allowed. // </Snippet13> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/monthname1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/monthname1.cs index 7920f719ab4fb..03d2ea71e9f3e 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/monthname1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/monthname1.cs @@ -14,6 +14,7 @@ private static string GetDayName(DateTime date) return date.DayOfWeek.ToString("G"); } } + // The example displays the following output: // 7/1/2013 is a Monday. // </Snippet19> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/monthname2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/monthname2.cs index f5d441a8120bd..157953414f0c0 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/monthname2.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/monthname2.cs @@ -1,51 +1,51 @@ // <Snippet20> using System; using System.Globalization; -using System.Threading; public class Example13 { - public static void Main13() - { - // Set the current culture to French (France). - CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR"); + public static void Main13() + { + // Set the current culture to French (France). + CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR"); - DateTime midYear = new DateTime(2013, 7, 1); - Console.WriteLine("{0:d} is a {1}.", midYear, DateUtilities.GetDayName(midYear)); - Console.WriteLine("{0:d} is a {1}.", midYear, DateUtilities.GetDayName((int) midYear.DayOfWeek)); - Console.WriteLine("{0:d} is in {1}.", midYear, DateUtilities.GetMonthName(midYear)); - Console.WriteLine("{0:d} is in {1}.", midYear, DateUtilities.GetMonthName(midYear.Month)); - } + DateTime midYear = new DateTime(2013, 7, 1); + Console.WriteLine("{0:d} is a {1}.", midYear, DateUtilities.GetDayName(midYear)); + Console.WriteLine("{0:d} is a {1}.", midYear, DateUtilities.GetDayName((int)midYear.DayOfWeek)); + Console.WriteLine("{0:d} is in {1}.", midYear, DateUtilities.GetMonthName(midYear)); + Console.WriteLine("{0:d} is in {1}.", midYear, DateUtilities.GetMonthName(midYear.Month)); + } } public static class DateUtilities { - public static string GetDayName(int dayOfWeek) - { - if (dayOfWeek < 0 | dayOfWeek > DateTimeFormatInfo.CurrentInfo.DayNames.Length) - return String.Empty; - else - return DateTimeFormatInfo.CurrentInfo.DayNames[dayOfWeek]; - } + public static string GetDayName(int dayOfWeek) + { + if (dayOfWeek < 0 | dayOfWeek > DateTimeFormatInfo.CurrentInfo.DayNames.Length) + return String.Empty; + else + return DateTimeFormatInfo.CurrentInfo.DayNames[dayOfWeek]; + } - public static string GetDayName(DateTime date) - { - return date.ToString("dddd"); - } + public static string GetDayName(DateTime date) + { + return date.ToString("dddd"); + } - public static string GetMonthName(int month) - { - if (month < 1 | month > DateTimeFormatInfo.CurrentInfo.MonthNames.Length - 1) - return String.Empty; - else - return DateTimeFormatInfo.CurrentInfo.MonthNames[month - 1]; - } + public static string GetMonthName(int month) + { + if (month < 1 | month > DateTimeFormatInfo.CurrentInfo.MonthNames.Length - 1) + return String.Empty; + else + return DateTimeFormatInfo.CurrentInfo.MonthNames[month - 1]; + } - public static string GetMonthName(DateTime date) - { - return date.ToString("MMMM"); - } + public static string GetMonthName(DateTime date) + { + return date.ToString("MMMM"); + } } + // The example displays the following output: // 01/07/2013 is a lundi. // 01/07/2013 is a lundi. diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers1.cs index c70d054a951f6..a182dd33911b3 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers1.cs @@ -5,41 +5,42 @@ public class Example14 { - public static void Main14() - { - DateTime dateForMonth = new DateTime(2013, 1, 1); - double[] temperatures = { 3.4, 3.5, 7.6, 10.4, 14.5, 17.2, + public static void Main14() + { + DateTime dateForMonth = new DateTime(2013, 1, 1); + double[] temperatures = { 3.4, 3.5, 7.6, 10.4, 14.5, 17.2, 19.9, 18.2, 15.9, 11.3, 6.9, 5.3 }; - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR"); - Console.WriteLine("Current Culture: {0}", CultureInfo.CurrentCulture.DisplayName); - // Build the format string dynamically so we allocate enough space for the month name. - string fmtString = "{0,-" + GetLongestMonthNameLength().ToString() + ":MMMM} {1,4}"; - for (int ctr = 0; ctr < temperatures.Length; ctr++) - Console.WriteLine(fmtString, - dateForMonth.AddMonths(ctr), - temperatures[ctr]); + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR"); + Console.WriteLine("Current Culture: {0}", CultureInfo.CurrentCulture.DisplayName); + // Build the format string dynamically so we allocate enough space for the month name. + string fmtString = "{0,-" + GetLongestMonthNameLength().ToString() + ":MMMM} {1,4}"; + for (int ctr = 0; ctr < temperatures.Length; ctr++) + Console.WriteLine(fmtString, + dateForMonth.AddMonths(ctr), + temperatures[ctr]); - Console.WriteLine(); + Console.WriteLine(); - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - Console.WriteLine("Current Culture: {0}", CultureInfo.CurrentCulture.DisplayName); - fmtString = "{0,-" + GetLongestMonthNameLength().ToString() + ":MMMM} {1,4}"; - for (int ctr = 0; ctr < temperatures.Length; ctr++) - Console.WriteLine(fmtString, - dateForMonth.AddMonths(ctr), - temperatures[ctr]); - } + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); + Console.WriteLine("Current Culture: {0}", CultureInfo.CurrentCulture.DisplayName); + fmtString = "{0,-" + GetLongestMonthNameLength().ToString() + ":MMMM} {1,4}"; + for (int ctr = 0; ctr < temperatures.Length; ctr++) + Console.WriteLine(fmtString, + dateForMonth.AddMonths(ctr), + temperatures[ctr]); + } - private static int GetLongestMonthNameLength() - { - int length = 0; - foreach (var nameOfMonth in DateTimeFormatInfo.CurrentInfo.MonthNames) - if (nameOfMonth.Length > length) length = nameOfMonth.Length; + private static int GetLongestMonthNameLength() + { + int length = 0; + foreach (var nameOfMonth in DateTimeFormatInfo.CurrentInfo.MonthNames) + if (nameOfMonth.Length > length) length = nameOfMonth.Length; - return length; - } + return length; + } } + // The example displays the following output: // Current Culture: French (France) // janvier 3,4 diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers2.cs index 45ba5f3650be1..44b9042f91a1e 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers2.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers2.cs @@ -6,67 +6,70 @@ public class Example15 { - public static void Main15() - { - // Create ten random doubles. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - double[] numbers = GetRandomNumbers(10); - DisplayRandomNumbers(numbers); + public static void Main15() + { + // Create ten random doubles. + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); + double[] numbers = GetRandomNumbers(10); + DisplayRandomNumbers(numbers); - // Persist the numbers as strings. - StreamWriter sw = new StreamWriter("randoms.dat"); - for (int ctr = 0; ctr < numbers.Length; ctr++) - sw.Write("{0:R}{1}", numbers[ctr], ctr < numbers.Length - 1 ? "|" : ""); + // Persist the numbers as strings. + StreamWriter sw = new StreamWriter("randoms.dat"); + for (int ctr = 0; ctr < numbers.Length; ctr++) + sw.Write("{0:R}{1}", numbers[ctr], ctr < numbers.Length - 1 ? "|" : ""); - sw.Close(); + sw.Close(); - // Read the persisted data. - StreamReader sr = new StreamReader("randoms.dat"); - string numericData = sr.ReadToEnd(); - sr.Close(); - string[] numberStrings = numericData.Split('|'); + // Read the persisted data. + StreamReader sr = new StreamReader("randoms.dat"); + string numericData = sr.ReadToEnd(); + sr.Close(); + string[] numberStrings = numericData.Split('|'); - // Restore and display the data using the conventions of the en-US culture. - Console.WriteLine("Current Culture: {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - foreach (var numberStr in numberStrings) { - double restoredNumber; - if (Double.TryParse(numberStr, out restoredNumber)) - Console.WriteLine(restoredNumber.ToString("R")); - else - Console.WriteLine("ERROR: Unable to parse '{0}'", numberStr); - } - Console.WriteLine(); + // Restore and display the data using the conventions of the en-US culture. + Console.WriteLine("Current Culture: {0}", + Thread.CurrentThread.CurrentCulture.DisplayName); + foreach (var numberStr in numberStrings) + { + double restoredNumber; + if (Double.TryParse(numberStr, out restoredNumber)) + Console.WriteLine(restoredNumber.ToString("R")); + else + Console.WriteLine("ERROR: Unable to parse '{0}'", numberStr); + } + Console.WriteLine(); - // Restore and display the data using the conventions of the fr-FR culture. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR"); - Console.WriteLine("Current Culture: {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - foreach (var numberStr in numberStrings) { - double restoredNumber; - if (Double.TryParse(numberStr, out restoredNumber)) - Console.WriteLine(restoredNumber.ToString("R")); - else - Console.WriteLine("ERROR: Unable to parse '{0}'", numberStr); - } - } + // Restore and display the data using the conventions of the fr-FR culture. + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR"); + Console.WriteLine("Current Culture: {0}", + Thread.CurrentThread.CurrentCulture.DisplayName); + foreach (var numberStr in numberStrings) + { + double restoredNumber; + if (Double.TryParse(numberStr, out restoredNumber)) + Console.WriteLine(restoredNumber.ToString("R")); + else + Console.WriteLine("ERROR: Unable to parse '{0}'", numberStr); + } + } - private static double[] GetRandomNumbers(int n) - { - Random rnd = new Random(); - double[] numbers = new double[n]; - for (int ctr = 0; ctr < n; ctr++) - numbers[ctr] = rnd.NextDouble() * 1000; - return numbers; - } + private static double[] GetRandomNumbers(int n) + { + Random rnd = new Random(); + double[] numbers = new double[n]; + for (int ctr = 0; ctr < n; ctr++) + numbers[ctr] = rnd.NextDouble() * 1000; + return numbers; + } - private static void DisplayRandomNumbers(double[] numbers) - { - for (int ctr = 0; ctr < numbers.Length; ctr++) - Console.WriteLine(numbers[ctr].ToString("R")); - Console.WriteLine(); - } + private static void DisplayRandomNumbers(double[] numbers) + { + for (int ctr = 0; ctr < numbers.Length; ctr++) + Console.WriteLine(numbers[ctr].ToString("R")); + Console.WriteLine(); + } } + // The example displays output like the following: // 487.0313743534644 // 674.12000879371533 diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers3.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers3.cs deleted file mode 100644 index 59730f80c9d24..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/numbers3.cs +++ /dev/null @@ -1,91 +0,0 @@ -// <Snippet7> -using System; -using System.Globalization; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using System.Threading; - -public class Example16 -{ - public static void Main16() - { - // Create ten random doubles. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - double[] numbers = GetRandomNumbers(10); - DisplayRandomNumbers(numbers); - - // Serialize the array. - FileStream fsIn = new FileStream("randoms.dat", FileMode.Create); - BinaryFormatter formatter = new BinaryFormatter(); - formatter.Serialize(fsIn, numbers); - fsIn.Close(); - - // Read the persisted data. - FileStream fsOut = new FileStream("randoms.dat", FileMode.Open); - double[] numbers1 = (Double[]) formatter.Deserialize(fsOut); - fsOut.Close(); - - // Display the data using the conventions of the en-US culture. - Console.WriteLine("Current Culture: {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - DisplayRandomNumbers(numbers1); - - // Display the data using the conventions of the fr-FR culture. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-FR"); - Console.WriteLine("Current Culture: {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - DisplayRandomNumbers(numbers1); - } - - private static double[] GetRandomNumbers(int n) - { - Random rnd = new Random(); - double[] numbers = new double[n]; - for (int ctr = 0; ctr < n; ctr++) - numbers[ctr] = rnd.NextDouble() * 1000; - return numbers; - } - - private static void DisplayRandomNumbers(double[] numbers) - { - for (int ctr = 0; ctr < numbers.Length; ctr++) - Console.WriteLine(numbers[ctr].ToString("R")); - Console.WriteLine(); - } -} -// The example displays output like the following: -// 932.10070623648392 -// 96.868112262742642 -// 857.111520067375 -// 771.37727233179726 -// 262.65733840999064 -// 387.00796914613244 -// 557.49389788019187 -// 83.79498919648816 -// 957.31006048494487 -// 996.54487892824454 -// -// Current Culture: English (United States) -// 932.10070623648392 -// 96.868112262742642 -// 857.111520067375 -// 771.37727233179726 -// 262.65733840999064 -// 387.00796914613244 -// 557.49389788019187 -// 83.79498919648816 -// 957.31006048494487 -// 996.54487892824454 -// -// Current Culture: French (France) -// 932,10070623648392 -// 96,868112262742642 -// 857,111520067375 -// 771,37727233179726 -// 262,65733840999064 -// 387,00796914613244 -// 557,49389788019187 -// 83,79498919648816 -// 957,31006048494487 -// 996,54487892824454 -// </Snippet7> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/program.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/program.cs new file mode 100644 index 0000000000000..6049fe51fc6c0 --- /dev/null +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/program.cs @@ -0,0 +1 @@ +Example9.Main9(); diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/search1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/search1.cs index b3da4e6c5809f..01386c4c0ae19 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/search1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/search1.cs @@ -5,14 +5,15 @@ public class Example17 { - public static void Main17() - { - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("pl-PL"); - string composite = "\u0041\u0300"; - Console.WriteLine("Comparing using Char: {0}", composite.IndexOf('\u00C0')); - Console.WriteLine("Comparing using String: {0}", composite.IndexOf("\u00C0")); - } + public static void Main17() + { + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("pl-PL"); + string composite = "\u0041\u0300"; + Console.WriteLine("Comparing using Char: {0}", composite.IndexOf('\u00C0')); + Console.WriteLine("Comparing using String: {0}", composite.IndexOf("\u00C0")); + } } + // The example displays the following output: // Comparing using Char: -1 // Comparing using String: 0 diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/sort1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/sort1.cs index 40d62f77f25ab..5095b95a85b23 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/sort1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/sort1.cs @@ -5,27 +5,28 @@ public class Example18 { - public static void Main18() - { - string[] values = { "able", "ångström", "apple", "Æble", + public static void Main18() + { + string[] values = { "able", "ångström", "apple", "Æble", "Windows", "Visual Studio" }; - // Change thread to en-US. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - // Sort the array and copy it to a new array to preserve the order. - Array.Sort(values); - string[] enValues = (String[]) values.Clone(); + // Change thread to en-US. + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); + // Sort the array and copy it to a new array to preserve the order. + Array.Sort(values); + string[] enValues = (String[])values.Clone(); - // Change culture to Swedish (Sweden). - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("sv-SE"); - Array.Sort(values); - string[] svValues = (String[]) values.Clone(); + // Change culture to Swedish (Sweden). + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("sv-SE"); + Array.Sort(values); + string[] svValues = (String[])values.Clone(); - // Compare the sorted arrays. - Console.WriteLine("{0,-8} {1,-15} {2,-15}\n", "Position", "en-US", "sv-SE"); - for (int ctr = 0; ctr <= values.GetUpperBound(0); ctr++) - Console.WriteLine("{0,-8} {1,-15} {2,-15}", ctr, enValues[ctr], svValues[ctr]); - } + // Compare the sorted arrays. + Console.WriteLine("{0,-8} {1,-15} {2,-15}\n", "Position", "en-US", "sv-SE"); + for (int ctr = 0; ctr <= values.GetUpperBound(0); ctr++) + Console.WriteLine("{0,-8} {1,-15} {2,-15}", ctr, enValues[ctr], svValues[ctr]); + } } + // The example displays the following output: // Position en-US sv-SE // diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/sortkey1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/sortkey1.cs index a400ba5aca03f..285e593b38d20 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/sortkey1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.globalization/cs/sortkey1.cs @@ -6,40 +6,41 @@ public class SortKeyComparer : IComparer<String> { - public int Compare(string str1, string str2) - { - SortKey sk1, sk2; - sk1 = CultureInfo.CurrentCulture.CompareInfo.GetSortKey(str1); - sk2 = CultureInfo.CurrentCulture.CompareInfo.GetSortKey(str2); - return SortKey.Compare(sk1, sk2); - } + public int Compare(string str1, string str2) + { + SortKey sk1, sk2; + sk1 = CultureInfo.CurrentCulture.CompareInfo.GetSortKey(str1); + sk2 = CultureInfo.CurrentCulture.CompareInfo.GetSortKey(str2); + return SortKey.Compare(sk1, sk2); + } } public class Example19 { - public static void Main19() - { - string[] values = { "able", "ångström", "apple", "Æble", + public static void Main19() + { + string[] values = { "able", "ångström", "apple", "Æble", "Windows", "Visual Studio" }; - SortKeyComparer comparer = new SortKeyComparer(); + SortKeyComparer comparer = new SortKeyComparer(); - // Change thread to en-US. - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); - // Sort the array and copy it to a new array to preserve the order. - Array.Sort(values, comparer); - string[] enValues = (String[]) values.Clone(); + // Change thread to en-US. + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); + // Sort the array and copy it to a new array to preserve the order. + Array.Sort(values, comparer); + string[] enValues = (String[])values.Clone(); - // Change culture to Swedish (Sweden). - Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("sv-SE"); - Array.Sort(values, comparer); - string[] svValues = (String[]) values.Clone(); + // Change culture to Swedish (Sweden). + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("sv-SE"); + Array.Sort(values, comparer); + string[] svValues = (String[])values.Clone(); - // Compare the sorted arrays. - Console.WriteLine("{0,-8} {1,-15} {2,-15}\n", "Position", "en-US", "sv-SE"); - for (int ctr = 0; ctr <= values.GetUpperBound(0); ctr++) - Console.WriteLine("{0,-8} {1,-15} {2,-15}", ctr, enValues[ctr], svValues[ctr]); - } + // Compare the sorted arrays. + Console.WriteLine("{0,-8} {1,-15} {2,-15}\n", "Position", "en-US", "sv-SE"); + for (int ctr = 0; ctr <= values.GetUpperBound(0); ctr++) + Console.WriteLine("{0,-8} {1,-15} {2,-15}", ctr, enValues[ctr], svValues[ctr]); + } } + // The example displays the following output: // Position en-US sv-SE // diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.regularexpressions.backtracking/cs/backtracking2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.regularexpressions.backtracking/cs/backtracking2.cs index 93d1a5f766e8f..ca8e084f5d1f3 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.regularexpressions.backtracking/cs/backtracking2.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.regularexpressions.backtracking/cs/backtracking2.cs @@ -17,6 +17,6 @@ public static void Main() } } } -// 'Essential services are provided by regular expres' found at position 0 +// 'Essential services are provided by regular expressions found at position 0 // 'es' found at position 47 // </Snippet2> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/api1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/api1.cs deleted file mode 100644 index fd039fa965b50..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/api1.cs +++ /dev/null @@ -1,47 +0,0 @@ -// <Snippet6> -using System; - -public class FileName : IComparable -{ - string fname; - StringComparer comparer; - - public FileName(string name, StringComparer comparer) - { - if (String.IsNullOrEmpty(name)) - throw new ArgumentNullException("name"); - - this.fname = name; - - if (comparer != null) - this.comparer = comparer; - else - this.comparer = StringComparer.OrdinalIgnoreCase; - } - - public string Name - { - get { return fname; } - } - - public int CompareTo(object obj) - { - if (obj == null) return 1; - - if (! (obj is FileName)) - return comparer.Compare(this.fname, obj.ToString()); - else - return comparer.Compare(this.fname, ((FileName) obj).Name); - } -} -// </Snippet6> - -public class Class1 -{ - public static void Main() - { - FileName file1 = new FileName("autoexec.bat", null); - FileName file2 = new FileName("AutoExec.BAT", null); - Console.WriteLine(file1.CompareTo(file2)); - } -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison1.cs deleted file mode 100644 index 2707495225354..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison1.cs +++ /dev/null @@ -1,51 +0,0 @@ -// <Snippet3> -using System; -using System.Globalization; -using System.Threading; - -public class Example -{ - public static void Main() - { - string[] values= { "able", "ångström", "apple", "Æble", - "Windows", "Visual Studio" }; - Array.Sort(values); - DisplayArray(values); - - // Change culture to Swedish (Sweden). - string originalCulture = CultureInfo.CurrentCulture.Name; - Thread.CurrentThread.CurrentCulture = new CultureInfo("sv-SE"); - Array.Sort(values); - DisplayArray(values); - - // Restore the original culture. - Thread.CurrentThread.CurrentCulture = new CultureInfo(originalCulture); - } - - private static void DisplayArray(string[] values) - { - Console.WriteLine("Sorting using the {0} culture:", - CultureInfo.CurrentCulture.Name); - foreach (string value in values) - Console.WriteLine(" {0}", value); - - Console.WriteLine(); - } -} -// The example displays the following output: -// Sorting using the en-US culture: -// able -// Æble -// ångström -// apple -// Visual Studio -// Windows -// -// Sorting using the sv-SE culture: -// able -// Æble -// apple -// Windows -// Visual Studio -// ångström -// </Snippet3> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison2.cs deleted file mode 100644 index ecc43bb3acdba..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison2.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -public class Class1 -{ - public static void Main() - { - string strA = "Владимир"; - string strB = "ВЛАДИМИР"; - - // <Snippet4> - String.Compare(strA, strB, StringComparison.OrdinalIgnoreCase); - // </Snippet4> - Console.WriteLine(String.Compare(strA, strB, StringComparison.OrdinalIgnoreCase)); - - // <Snippet5> - String.Compare(strA.ToUpperInvariant(), strB.ToUpperInvariant(), - StringComparison.Ordinal); - // </Snippet5> - Console.WriteLine(String.Compare(strA.ToUpperInvariant(), strB.ToUpperInvariant(), - StringComparison.Ordinal)); - } -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison3.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison3.cs deleted file mode 100644 index 6186d33f0ba1e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/comparison3.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -public class Class1 -{ - public static void Main() - { - // <Snippet15> - string separated = "\u0061\u030a"; - string combined = "\u00e5"; - - Console.WriteLine("Equal sort weight of {0} and {1} using InvariantCulture: {2}", - separated, combined, - String.Compare(separated, combined, - StringComparison.InvariantCulture) == 0); - - Console.WriteLine("Equal sort weight of {0} and {1} using Ordinal: {2}", - separated, combined, - String.Compare(separated, combined, - StringComparison.Ordinal) == 0); - // The example displays the following output: - // Equal sort weight of a° and å using InvariantCulture: True - // Equal sort weight of a° and å using Ordinal: False - // </Snippet15> - } -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/embeddednulls1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/embeddednulls1.cs deleted file mode 100644 index 938ab7b987447..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/embeddednulls1.cs +++ /dev/null @@ -1,46 +0,0 @@ -// <Snippet19> -using System; - -public class Example -{ - public static void Main() - { - string str1 = "Aa"; - string str2 = "A" + new String('\u0000', 3) + "a"; - Console.WriteLine("Comparing '{0}' ({1}) and '{2}' ({3}):", - str1, ShowBytes(str1), str2, ShowBytes(str2)); - Console.WriteLine(" With String.Compare:"); - Console.WriteLine(" Current Culture: {0}", - String.Compare(str1, str2, StringComparison.CurrentCulture)); - Console.WriteLine(" Invariant Culture: {0}", - String.Compare(str1, str2, StringComparison.InvariantCulture)); - - Console.WriteLine(" With String.Equals:"); - Console.WriteLine(" Current Culture: {0}", - String.Equals(str1, str2, StringComparison.CurrentCulture)); - Console.WriteLine(" Invariant Culture: {0}", - String.Equals(str1, str2, StringComparison.InvariantCulture)); - } - - private static string ShowBytes(string str) - { - string hexString = String.Empty; - for (int ctr = 0; ctr < str.Length; ctr++) - { - string result = String.Empty; - result = Convert.ToInt32(str[ctr]).ToString("X4"); - result = " " + result.Substring(0,2) + " " + result.Substring(2, 2); - hexString += result; - } - return hexString.Trim(); - } -} -// The example displays the following output: -// Comparing 'Aa' (00 41 00 61) and 'A a' (00 41 00 00 00 00 00 00 00 61): -// With String.Compare: -// Current Culture: 0 -// Invariant Culture: 0 -// With String.Equals: -// Current Culture: True -// Invariant Culture: True -// </Snippet19> diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/embeddednulls2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/embeddednulls2.cs deleted file mode 100644 index d57d2059b8ab6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/embeddednulls2.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; - -public class Example -{ - public static void Main() - { - string str1 = "Aa"; - string str2 = "A" + new String('\u0000', 3) + "a"; - // <Snippet20> - Console.WriteLine("Comparing '{0}' ({1}) and '{2}' ({3}):", - str1, ShowBytes(str1), str2, ShowBytes(str2)); - Console.WriteLine(" With String.Compare:"); - Console.WriteLine(" Ordinal: {0}", - String.Compare(str1, str2, StringComparison.Ordinal)); - - Console.WriteLine(" With String.Equals:"); - Console.WriteLine(" Ordinal: {0}", - String.Equals(str1, str2, StringComparison.Ordinal)); - // The example displays the following output: - // Comparing 'Aa' (00 41 00 61) and 'A a' (00 41 00 00 00 00 00 00 00 61): - // With String.Compare: - // Ordinal: 97 - // With String.Equals: - // Ordinal: False - // </Snippet20> - } - - private static string ShowBytes(string str) - { - string hexString = String.Empty; - for (int ctr = 0; ctr < str.Length; ctr++) - { - string result = String.Empty; - result = Convert.ToInt32(str[ctr]).ToString("X4"); - result = " " + result.Substring(0,2) + " " + result.Substring(2, 2); - hexString += result; - } - return hexString.Trim(); - } -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/explicitargs1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/explicitargs1.cs deleted file mode 100644 index db7238e29228e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/explicitargs1.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; - -public class Example -{ - public static void Main() - { - CompareWithDefaults(); - CompareExplicit(); - } - - private static void CompareWithDefaults() - { - Uri url = new Uri("http://msdn.microsoft.com"); - // <Snippet1> - string protocol = GetProtocol(url); - if (String.Equals(protocol, "http")) { - // ...Code to handle HTTP protocol. - } - else { - throw new InvalidOperationException(); - } - // </Snippet1> - } - - private static void CompareExplicit() - { - Uri url = new Uri("http://msdn.microsoft.com"); - // <Snippet2> - string protocol = GetProtocol(url); - if (String.Equals(protocol, "http", StringComparison.OrdinalIgnoreCase)) { - // ...Code to handle HTTP protocol. - } - else { - throw new InvalidOperationException(); - } - // </Snippet2> - } - - private static string GetProtocol(Uri url) - { - return url.Scheme; - } -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect1.cs deleted file mode 100644 index c91fc31ae22a6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect1.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; - -public class Class1 -{ - public static void Main() - { - } - - // <Snippet7> - // Incorrect. - string []storedNames; - - public void StoreNames(string [] names) - { - int index = 0; - storedNames = new string[names.Length]; - - foreach (string name in names) - { - this.storedNames[index++] = name; - } - - Array.Sort(names); // Line A. - } - - public bool DoesNameExist(string name) - { - return (Array.BinarySearch(this.storedNames, name) >= 0); // Line B. - } - // </Snippet7> -} - -public class Class8 -{ - // <Snippet8> - // Correct. - string []storedNames; - - public void StoreNames(string [] names) - { - int index = 0; - storedNames = new string[names.Length]; - - foreach (string name in names) - { - this.storedNames[index++] = name; - } - - Array.Sort(names, StringComparer.Ordinal); // Line A. - } - - public bool DoesNameExist(string name) - { - return (Array.BinarySearch(this.storedNames, name, StringComparer.Ordinal) >= 0); // Line B. - } - // </Snippet8> -} - -public class Class9 -{ - // <Snippet9> - // Correct. - string []storedNames; - - public void StoreNames(string [] names) - { - int index = 0; - storedNames = new string[names.Length]; - - foreach (string name in names) - { - this.storedNames[index++] = name; - } - - Array.Sort(names, StringComparer.InvariantCulture); // Line A. - } - - public bool DoesNameExist(string name) - { - return (Array.BinarySearch(this.storedNames, name, StringComparer.InvariantCulture) >= 0); // Line B. - } - // </Snippet9> -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect2.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect2.cs deleted file mode 100644 index b2fb054aec2c9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/indirect2.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections; -using System.IO; - -public class Test -{ - // <Snippet10> - const int initialTableCapacity = 100; - Hashtable h; - - public void PopulateFileTable(string directory) - { - h = new Hashtable(initialTableCapacity, - StringComparer.OrdinalIgnoreCase); - - foreach (string file in Directory.GetFiles(directory)) - h.Add(file, File.GetCreationTime(file)); - } - - public void PrintCreationTime(string targetFile) - { - Object dt = h[targetFile]; - if (dt != null) - { - Console.WriteLine("File {0} was created at time {1}.", - targetFile, - (DateTime) dt); - } - else - { - Console.WriteLine("File {0} does not exist.", targetFile); - } - } - // </Snippet10> -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/turkish1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/turkish1.cs deleted file mode 100644 index bc162328a2855..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.strings.bestpractices/cs/turkish1.cs +++ /dev/null @@ -1,64 +0,0 @@ -// <Snippet11> -using System; -using System.Globalization; -using System.Threading; - -public class Example -{ - public static void Main() - { - string fileUrl = "file"; - Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); - Console.WriteLine("Culture = {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - Console.WriteLine("(file == FILE) = {0}", - fileUrl.StartsWith("FILE", true, null)); - Console.WriteLine(); - - Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR"); - Console.WriteLine("Culture = {0}", - Thread.CurrentThread.CurrentCulture.DisplayName); - Console.WriteLine("(file == FILE) = {0}", - fileUrl.StartsWith("FILE", true, null)); - } -} -// The example displays the following output: -// Culture = English (United States) -// (file == FILE) = True -// -// Culture = Turkish (Turkey) -// (file == FILE) = False -// </Snippet11> - -public class Example2 -{ - // <Snippet12> - public static bool IsFileURI(String path) - { - return path.StartsWith("FILE:", true, null); - } - // </Snippet12> -} - -public class Example3 -{ - // <Snippet13> - public static bool IsFileURI(string path) - { - return path.StartsWith("FILE:", StringComparison.OrdinalIgnoreCase); - } - // </Snippet13> -} - -public class Example4 -{ - // <Snippet14> - public static bool IsFileURI(string path) - { - if (path.Length < 5) return false; - - return String.Equals(path.Substring(0, 5), "FILE:", - StringComparison.OrdinalIgnoreCase); - } - // </Snippet14> -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source4.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source4.cs index 16e042c357301..3ba6f875c2a56 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source4.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.types.viewinfo/cs/source4.cs @@ -49,7 +49,7 @@ public static void Main() Console.WriteLine("// Instance Fields"); PrintMembers(fi); - // Instance properites. + // Instance properties. pi = t.GetProperties(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); Console.WriteLine ("// Instance Properties"); diff --git a/samples/snippets/csharp/VS_Snippets_CLR/regularexpressions.language.escapes/cs/escape1.cs b/samples/snippets/csharp/VS_Snippets_CLR/regularexpressions.language.escapes/cs/escape1.cs index 5bcee7fa08b8a..df4dc173cfe99 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/regularexpressions.language.escapes/cs/escape1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/regularexpressions.language.escapes/cs/escape1.cs @@ -11,7 +11,7 @@ public static void Main() "Shanghai, China\t13,831,900\n" + "Karachi, Pakistan|12,991,000\n" + "Delhi, India\t12,259,230\n" + - "Istanbul, Turkey|11,372,613\n"; + "Istanbul, Türkiye|11,372,613\n"; Console.WriteLine("Population of the World's Largest Cities, 2009"); Console.WriteLine(); Console.WriteLine("{0,-20} {1,10}", "City", "Population"); @@ -30,5 +30,5 @@ public static void Main() // Shanghai, China 13,831,900 // Karachi, Pakistan 12,991,000 // Delhi, India 12,259,230 -// Istanbul, Turkey 11,372,613 +// Istanbul, Türkiye 11,372,613 // </Snippet1> diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestorageextensions/cs/blankpage2.xaml b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestorageextensions/cs/blankpage2.xaml deleted file mode 100644 index ef83b690d8274..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestorageextensions/cs/blankpage2.xaml +++ /dev/null @@ -1,16 +0,0 @@ -<!-- <snippet3> --> -<Page - x:Class="ExampleApplication.BlankPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:ExampleApplication" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d"> - - <StackPanel Background="{StaticResource ApplicationPageBackgroundBrush}" VerticalAlignment="Center" HorizontalAlignment="Center"> - <Button Content="Open File" Click="Button_Click_1"></Button> - <TextBlock Name="DisplayContentsBlock"></TextBlock> - </StackPanel> -</Page> -<!-- </snippet3> --> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestorageextensions/cs/blankpage3.xaml b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestorageextensions/cs/blankpage3.xaml deleted file mode 100644 index 09943a457dce6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestorageextensions/cs/blankpage3.xaml +++ /dev/null @@ -1,19 +0,0 @@ -<!-- <snippet5> --> -<Page - x:Class="ExampleApplication.BlankPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:ExampleApplication" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d"> - - <StackPanel Background="{StaticResource ApplicationPageBackgroundBrush}" VerticalAlignment="Center" HorizontalAlignment="Center"> - <TextBlock Text="Provide text to write to file:"></TextBlock> - <TextBox Name="UserText" Width="400"></TextBox> - <Button Name="CreateButton" Content="Create File" Click="CreateButton_Click"></Button> - <Button Name="VerifyButton" Content="Verify Contents" Click="VerifyButton_Click"></Button> - <TextBlock Name="Results"></TextBlock> - </StackPanel> -</Page> -<!-- </snippet5> --> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestorageextensions/cs/blankpage4.xaml b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestorageextensions/cs/blankpage4.xaml deleted file mode 100644 index eebb3ddc5dc9f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestorageextensions/cs/blankpage4.xaml +++ /dev/null @@ -1,19 +0,0 @@ -<!-- <snippet7> --> -<Page - x:Class="ExampleApplication.BlankPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:ExampleApplication" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d"> - - <StackPanel Background="{StaticResource ApplicationPageBackgroundBrush}" VerticalAlignment="Center" HorizontalAlignment="Center"> - <TextBlock Text="Provide text to write to file:"></TextBlock> - <TextBox Name="UserText" Width="400"></TextBox> - <Button Name="CreateButton" Content="Create File" Click="CreateButton_Click"></Button> - <Button Name="VerifyButton" Content="Verify Contents" Click="VerifyButton_Click"></Button> - <TextBlock Name="Results"></TextBlock> - </StackPanel> -</Page> -<!-- </snippet7> --> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensions/cs/blankpage.xaml b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensions/cs/blankpage.xaml deleted file mode 100644 index dc29fffb44c76..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensions/cs/blankpage.xaml +++ /dev/null @@ -1,19 +0,0 @@ -<!-- <snippet1> --> -<Page - x:Class="ExampleApplication.BlankPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:ExampleApplication" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d"> - - <StackPanel Background="{StaticResource ApplicationPageBackgroundBrush}" VerticalAlignment="Center" HorizontalAlignment="Center"> - <TextBlock Text="Provide text to write to file:"></TextBlock> - <TextBox Name="UserText" Width="400"></TextBox> - <Button Name="CreateButton" Content="Create File" Click="CreateButton_Click"></Button> - <Button Name="VerifyButton" Content="Verify Contents" Click="VerifyButton_Click"></Button> - <TextBlock Name="Results"></TextBlock> - </StackPanel> -</Page> -<!-- </snippet1> --> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensions/cs/blankpage2.xaml b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensions/cs/blankpage2.xaml deleted file mode 100644 index ccb452fbd3967..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensions/cs/blankpage2.xaml +++ /dev/null @@ -1,16 +0,0 @@ -<!-- <snippet3> --> -<Page - x:Class="ExampleApplication.BlankPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:ExampleApplication" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d"> - - <StackPanel Background="{StaticResource ApplicationPageBackgroundBrush}" VerticalAlignment="Center" HorizontalAlignment="Center"> - <Button Name="CreateButton" Content="Write and read with stream" Click="CreateButton_Click"></Button> - <TextBlock Name="Results"></TextBlock> - </StackPanel> -</Page> -<!-- </snippet3> --> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/app.xaml b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/app.xaml deleted file mode 100644 index cae4602f5aefc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/app.xaml +++ /dev/null @@ -1,7 +0,0 @@ -<Application - x:Class="TextFile.App" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:TextFile"> - -</Application> diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/app.xaml.cs b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/app.xaml.cs deleted file mode 100644 index 8d40cf9d646cc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/app.xaml.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227 - -namespace TextFile -{ - /// <summary> - /// Provides application-specific behavior to supplement the default Application class. - /// </summary> - sealed partial class App : Application - { - /// <summary> - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// </summary> - public App() - { - this.InitializeComponent(); - this.Suspending += OnSuspending; - } - - /// <summary> - /// Invoked when the application is launched normally by the end user. Other entry points - /// will be used such as when the application is launched to open a specific file. - /// </summary> - /// <param name="e">Details about the launch request and process.</param> - protected override void OnLaunched(LaunchActivatedEventArgs e) - { - -#if DEBUG - if (System.Diagnostics.Debugger.IsAttached) - { - this.DebugSettings.EnableFrameRateCounter = true; - } -#endif - - Frame rootFrame = Window.Current.Content as Frame; - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == null) - { - // Create a Frame to act as the navigation context and navigate to the first page - rootFrame = new Frame(); - // Set the default language - rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; - - rootFrame.NavigationFailed += OnNavigationFailed; - - if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Load state from previously suspended application - } - - // Place the frame in the current Window - Window.Current.Content = rootFrame; - } - - if (rootFrame.Content == null) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - rootFrame.Navigate(typeof(MainPage), e.Arguments); - } - // Ensure the current window is active - Window.Current.Activate(); - } - - /// <summary> - /// Invoked when Navigation to a certain page fails - /// </summary> - /// <param name="sender">The Frame which failed navigation</param> - /// <param name="e">Details about the navigation failure</param> - void OnNavigationFailed(object sender, NavigationFailedEventArgs e) - { - throw new Exception("Failed to load Page " + e.SourcePageType.FullName); - } - - /// <summary> - /// Invoked when application execution is being suspended. Application state is saved - /// without knowing whether the application will be terminated or resumed with the contents - /// of memory still intact. - /// </summary> - /// <param name="sender">The source of the suspend request.</param> - /// <param name="e">Details about the suspend request.</param> - private void OnSuspending(object sender, SuspendingEventArgs e) - { - var deferral = e.SuspendingOperation.GetDeferral(); - //TODO: Save application state and stop any background activity - deferral.Complete(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/logo.scale-100.png b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/logo.scale-100.png deleted file mode 100644 index e26771cb33a49..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/logo.scale-100.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/smalllogo.scale-100.png b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/smalllogo.scale-100.png deleted file mode 100644 index 1eb0d9d528c42..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/smalllogo.scale-100.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/splashscreen.scale-100.png b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/splashscreen.scale-100.png deleted file mode 100644 index c951e031bdfa0..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/splashscreen.scale-100.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/storelogo.scale-100.png b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/storelogo.scale-100.png deleted file mode 100644 index dcb672712c682..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/assets/storelogo.scale-100.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage.xaml b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage.xaml deleted file mode 100644 index f66ed94db25bc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage.xaml +++ /dev/null @@ -1,17 +0,0 @@ -<Page - x:Class="TextFile.MainPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:TextFile" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d"> - - <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - <TextBlock Name="TextBlock1" HorizontalAlignment="Left" Margin="106,210,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="362" Width="914"/> - <Button x:Name="button1" Content=".NET to WinRT" HorizontalAlignment="Left" Margin="509,237,0,0" VerticalAlignment="Top" Click="button1_Click" Height="94" Width="243"/> - <Button x:Name="button2" Click="button2_Click" Content="WinRT to .NET" HorizontalAlignment="Left" Margin="512,330,0,0" VerticalAlignment="Top" Height="142" Width="240"/> - <Image Name="image1" HorizontalAlignment="Left" Height="230" Margin="73,240,0,0" VerticalAlignment="Top" Width="400"/> - - </Grid> -</Page> diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage.xaml.cs b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage.xaml.cs deleted file mode 100644 index 8606a45aa5197..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage.xaml.cs +++ /dev/null @@ -1,84 +0,0 @@ -// <snippetImports> -using System; -using System.IO; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media.Imaging; -using Windows.Storage; -using System.Net.Http; -using Windows.Storage.Pickers; -// </snippetImports> - -/// <summary> -/// An empty page that can be used on its own or navigated to within a Frame. -/// </summary> -public sealed partial class MainPage : Page -{ - public MainPage() - { - this.InitializeComponent(); - } - - // <snippet1> - private async void button1_Click(object sender, RoutedEventArgs e) - { - // Create a file picker. - FileOpenPicker picker = new FileOpenPicker(); - - // Set properties on the file picker such as start location and the type - // of files to display. - picker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; - picker.ViewMode = PickerViewMode.List; - picker.FileTypeFilter.Add(".txt"); - - // Show picker enabling user to pick one file. - StorageFile result = await picker.PickSingleFileAsync(); - - if (result != null) - { - try - { - // Retrieve the stream. This method returns a IRandomAccessStreamWithContentType. - var stream = await result.OpenReadAsync(); - - // Convert the stream to a .NET stream using AsStream, pass to a - // StreamReader and read the stream. - using (StreamReader sr = new StreamReader(stream.AsStream())) - { - TextBlock1.Text = sr.ReadToEnd(); - } - } - catch (Exception ex) - { - TextBlock1.Text = "Error occurred reading the file. " + ex.Message; - } - } - else - { - TextBlock1.Text = "User did not pick a file"; - } - } - // </snippet1> - - // <snippet2> - private async void button2_Click(object sender, RoutedEventArgs e) - { - // Create an HttpClient and access an image as a stream. - var client = new HttpClient(); - Stream stream = await client.GetStreamAsync("https://docs.microsoft.com/en-us/dotnet/images/hub/featured-1.png"); - // Create a .NET memory stream. - var memStream = new MemoryStream(); - // Convert the stream to the memory stream, because a memory stream supports seeking. - await stream.CopyToAsync(memStream); - // Set the start position. - memStream.Position = 0; - // Create a new bitmap image. - var bitmap = new BitmapImage(); - // Set the bitmap source to the stream, which is converted to a IRandomAccessStream. - bitmap.SetSource(memStream.AsRandomAccessStream()); - // Set the image control source to the bitmap. - image1.Source = bitmap; - } - // </snippet2> -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage1.xaml.cs b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage1.xaml.cs deleted file mode 100644 index 7540e49aa3792..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage1.xaml.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.IO; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media.Imaging; -using Windows.Storage; -using System.Net.Http; -using Windows.Storage.Pickers; - -private async void button1_Click(object sender, RoutedEventArgs e) -{ - // Create a file picker. - FileOpenPicker picker = new FileOpenPicker(); - - // Set properties on the file picker such as start location and the type - // of files to display. - picker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; - picker.ViewMode = PickerViewMode.List; - picker.FileTypeFilter.Add(".txt"); - - // Show picker enabling user to pick one file. - StorageFile result = await picker.PickSingleFileAsync(); - - if (result != null) - { - try - { - // Retrieve the stream. This method returns a IRandomAccessStreamWithContentType. - var stream = await result.OpenReadAsync(); - - // Convert the stream to a .NET stream using AsStream, pass to a - // StreamReader and read the stream. - using (StreamReader sr = new StreamReader(stream.AsStream())) - { - TextBlock1.Text = sr.ReadToEnd(); - } - } - catch (Exception ex) - { - TextBlock1.Text = "Error occurred reading the file. " + ex.Message; - } - } - else - { - TextBlock1.Text = "User did not pick a file"; - } -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage2.xaml.cs b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage2.xaml.cs deleted file mode 100644 index 4b07e55556d3d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/mainpage2.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.IO; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media.Imaging; -using Windows.Storage; -using System.Net.Http; -using Windows.Storage.Pickers; - -private async void button2_Click(object sender, RoutedEventArgs e) -{ - // Create an HttpClient and access an image as a stream. - var client = new HttpClient(); - Stream stream = await client.GetStreamAsync("https://docs.microsoft.com/en-us/dotnet/images/hub/featured-1.png"); - // Create a .NET memory stream. - var memStream = new MemoryStream(); - // Convert the stream to the memory stream, because a memory stream supports seeking. - await stream.CopyToAsync(memStream); - // Set the start position. - memStream.Position = 0; - // Create a new bitmap image. - var bitmap = new BitmapImage(); - // Set the bitmap source to the stream, which is converted to a IRandomAccessStream. - bitmap.SetSource(memStream.AsRandomAccessStream()); - // Set the image control source to the bitmap. - image1.Source = bitmap; -} diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/package.appxmanifest b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/package.appxmanifest deleted file mode 100644 index 8da0435a76ff5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/package.appxmanifest +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest"> - <Identity Name="e6404d5b-6f05-40d0-8411-d328f6e2d84f" Publisher="CN=cherylsi" Version="1.0.0.0" /> - <Properties> - <DisplayName>TextFile</DisplayName> - <PublisherDisplayName>cherylsi</PublisherDisplayName> - <Logo>Assets\StoreLogo.png</Logo> - </Properties> - <Prerequisites> - <OSMinVersion>6.3.0</OSMinVersion> - <OSMaxVersionTested>6.3.0</OSMaxVersionTested> - </Prerequisites> - <Resources> - <Resource Language="x-generate" /> - </Resources> - <Applications> - <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="TextFile.App"> - <m2:VisualElements DisplayName="TextFile" - Square150x150Logo="Assets\Logo.png" - Square30x30Logo="Assets\SmallLogo.png" - Description="TextFile" - ForegroundText="light" - BackgroundColor="#464646"> - <m2:SplashScreen Image="Assets\SplashScreen.png" /> - </m2:VisualElements> - <!--<snippetManifest>--> - <Extensions> - <Extension Category="windows.fileTypeAssociation"> - <FileTypeAssociation Name="txt"> - <DisplayName>Text</DisplayName> - <SupportedFileTypes> - <FileType>.txt</FileType> - </SupportedFileTypes> - </FileTypeAssociation> - </Extension> - </Extensions> - </Application> - </Applications> - <Capabilities> - <Capability Name="internetClient" /> - <Capability Name="documentsLibrary" /> - </Capabilities> - <!--</snippetManifest>--> -</Package> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/properties/assemblyinfo.cs deleted file mode 100644 index 58310106d74bd..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/properties/assemblyinfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TextFile")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TextFile")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/textfile.csproj b/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/textfile.csproj deleted file mode 100644 index b7bb738723f53..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.io.windowsruntimestreamextensionsex/cs/textfile.csproj +++ /dev/null @@ -1,149 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{ec86fb0d-53ed-4460-bd87-e65872318131}</ProjectGuid> - <OutputType>AppContainerExe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>TextFile</RootNamespace> - <AssemblyName>TextFile</AssemblyName> - <DefaultLanguage>en-US</DefaultLanguage> - <TargetPlatformVersion>8.1</TargetPlatformVersion> - <MinimumVisualStudioVersion>12</MinimumVisualStudioVersion> - <FileAlignment>512</FileAlignment> - <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE;NETFX_CORE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\ARM\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants> - <NoWarn>;2008</NoWarn> - <DebugType>full</DebugType> - <PlatformTarget>ARM</PlatformTarget> - <UseVSHostingProcess>false</UseVSHostingProcess> - <ErrorReport>prompt</ErrorReport> - <Prefer32Bit>true</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'"> - <OutputPath>bin\ARM\Release\</OutputPath> - <DefineConstants>TRACE;NETFX_CORE</DefineConstants> - <Optimize>true</Optimize> - <NoWarn>;2008</NoWarn> - <DebugType>pdbonly</DebugType> - <PlatformTarget>ARM</PlatformTarget> - <UseVSHostingProcess>false</UseVSHostingProcess> - <ErrorReport>prompt</ErrorReport> - <Prefer32Bit>true</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x64\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants> - <NoWarn>;2008</NoWarn> - <DebugType>full</DebugType> - <PlatformTarget>x64</PlatformTarget> - <UseVSHostingProcess>false</UseVSHostingProcess> - <ErrorReport>prompt</ErrorReport> - <Prefer32Bit>true</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> - <OutputPath>bin\x64\Release\</OutputPath> - <DefineConstants>TRACE;NETFX_CORE</DefineConstants> - <Optimize>true</Optimize> - <NoWarn>;2008</NoWarn> - <DebugType>pdbonly</DebugType> - <PlatformTarget>x64</PlatformTarget> - <UseVSHostingProcess>false</UseVSHostingProcess> - <ErrorReport>prompt</ErrorReport> - <Prefer32Bit>true</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants> - <NoWarn>;2008</NoWarn> - <DebugType>full</DebugType> - <PlatformTarget>x86</PlatformTarget> - <UseVSHostingProcess>false</UseVSHostingProcess> - <ErrorReport>prompt</ErrorReport> - <Prefer32Bit>true</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> - <OutputPath>bin\x86\Release\</OutputPath> - <DefineConstants>TRACE;NETFX_CORE</DefineConstants> - <Optimize>true</Optimize> - <NoWarn>;2008</NoWarn> - <DebugType>pdbonly</DebugType> - <PlatformTarget>x86</PlatformTarget> - <UseVSHostingProcess>false</UseVSHostingProcess> - <ErrorReport>prompt</ErrorReport> - <Prefer32Bit>true</Prefer32Bit> - </PropertyGroup> - <ItemGroup> - <!-- A reference to the entire .Net Framework and Windows SDK are automatically included --> - </ItemGroup> - <ItemGroup> - <Compile Include="App.xaml.cs"> - <DependentUpon>App.xaml</DependentUpon> - </Compile> - <Compile Include="MainPage.xaml.cs"> - <DependentUpon>MainPage.xaml</DependentUpon> - </Compile> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <AppxManifest Include="Package.appxmanifest"> - <SubType>Designer</SubType> - </AppxManifest> - </ItemGroup> - <ItemGroup> - <Content Include="Assets\Logo.scale-100.png" /> - <Content Include="Assets\SmallLogo.scale-100.png" /> - <Content Include="Assets\SplashScreen.scale-100.png" /> - <Content Include="Assets\StoreLogo.scale-100.png" /> - </ItemGroup> - <ItemGroup> - <ApplicationDefinition Include="App.xaml"> - <Generator>MSBuild:Compile</Generator> - <SubType>Designer</SubType> - </ApplicationDefinition> - <Page Include="MainPage.xaml"> - <Generator>MSBuild:Compile</Generator> - <SubType>Designer</SubType> - </Page> - </ItemGroup> - - <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' "> - <VisualStudioVersion>12.0</VisualStudioVersion> - </PropertyGroup> - - <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> diff --git a/samples/snippets/csharp/VS_Snippets_Data/DLinqCascadeWorkaround/cs/Program.cs b/samples/snippets/csharp/VS_Snippets_Data/DLinqCascadeWorkaround/cs/Program.cs index eb476ae0a02e7..0c32902183c23 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/DLinqCascadeWorkaround/cs/Program.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/DLinqCascadeWorkaround/cs/Program.cs @@ -38,7 +38,7 @@ from odq in db.OrderDetails // Determine from Detail collection whether parent exists. if (ordDetailQuery.Any()) { - Console.WriteLine("The parent is presesnt in the Orders collection."); + Console.WriteLine("The parent is present in the Orders collection."); // Fetch Order. try { diff --git a/samples/snippets/csharp/VS_Snippets_Data/DLinqWalk4CS/cs/Form1.Designer.cs b/samples/snippets/csharp/VS_Snippets_Data/DLinqWalk4CS/cs/Form1.Designer.cs index cb18a8fb21bbe..39cfb39573220 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/DLinqWalk4CS/cs/Form1.Designer.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/DLinqWalk4CS/cs/Form1.Designer.cs @@ -86,7 +86,7 @@ private void InitializeComponent() this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(99, 13); this.label2.TabIndex = 5; - this.label2.Text = "Enter CustgomerID:"; + this.label2.Text = "Enter CustomerID:"; // // Form1 // diff --git a/samples/snippets/csharp/VS_Snippets_Data/DP L2E Conceptual Examples/CS/Program.cs b/samples/snippets/csharp/VS_Snippets_Data/DP L2E Conceptual Examples/CS/Program.cs index 48e99179e8ec3..b28017db62508 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/DP L2E Conceptual Examples/CS/Program.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/DP L2E Conceptual Examples/CS/Program.cs @@ -72,7 +72,7 @@ static void Main(string[] args) //*** Query results examples ***// //QueryResults1(); - //*** Canoncial Function Mapping***// + //*** Canonical Function Mapping***// // FunctionMapping(); // FunctionMapping2(); // Not used in docs. // FunctionMappingWorkAround(); @@ -273,7 +273,7 @@ static void NullComparison() ObjectQuery<SalesOrderHeader> sales = context.SalesOrderHeaders; //Throws a NotSupportedException - /* var orders = from c in edm.Cusomters + /* var orders = from c in edm.Customers join c2 in edm.Orders on c.Region == c2.ShipRegion where c.Region == null diff --git a/samples/snippets/csharp/VS_Snippets_Data/DP L2E Examples/CS/Program.cs b/samples/snippets/csharp/VS_Snippets_Data/DP L2E Examples/CS/Program.cs index e14f3e6cfb90b..dc0beac2f22ce 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/DP L2E Examples/CS/Program.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/DP L2E Examples/CS/Program.cs @@ -650,7 +650,7 @@ static void WhereNavProperty_MQ() } # endregion - #region "Partioning Operators" + #region "Partitioning Operators" static void TakeSimple() { @@ -795,7 +795,7 @@ static void SkipWhileSimple_MQ() */ } - # endregion //"Partioning Operators" + # endregion //"Partitioning Operators" # region Ordering Operators @@ -1810,7 +1810,7 @@ group order by order.Contact.ContactID into g Console.WriteLine("ContactID: {0}", orderGroup.Category); foreach (var order in orderGroup.smallestTotalDue) { - Console.WriteLine("Mininum TotalDue {0} for SalesOrderID {1}: ", + Console.WriteLine("Minimum TotalDue {0} for SalesOrderID {1}: ", order.TotalDue, order.SalesOrderID); } diff --git a/samples/snippets/csharp/VS_Snippets_Data/DP ObjectServices Concepts/CS/Source.cs b/samples/snippets/csharp/VS_Snippets_Data/DP ObjectServices Concepts/CS/Source.cs index 9b1f52e59d280..aaf791ccddf59 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/DP ObjectServices Concepts/CS/Source.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/DP ObjectServices Concepts/CS/Source.cs @@ -299,8 +299,8 @@ static public void ObjectStateEntry_CurrentValueGetModifiedPropertiesEntity() s, oldPurchaseOrderNumber, newPurchaseOrderNumber); // Get the Entity that is associated with this ObjectStateEntry. - SalesOrderHeader associatedEnity = (SalesOrderHeader)stateEntry.Entity; - Console.WriteLine("Associated Enity's ID: {0}", associatedEnity.SalesOrderID); + SalesOrderHeader associatedEntity = (SalesOrderHeader)stateEntry.Entity; + Console.WriteLine("Associated Entity's ID: {0}", associatedEntity.SalesOrderID); } //</snippetObjectStateEntry_GetModifiedProperties> } @@ -1240,7 +1240,7 @@ static public void ObjectParameterClass_Value_Name_Type() ObjectParameter param = new ObjectParameter("fn", typeof(System.String)); param.Value = "Frances"; - Console.WriteLine("Parame Name: {0}, Param Value: {1} Param Type: {2}", + Console.WriteLine("Param Name: {0}, Param Value: {1} Param Type: {2}", param.Name, param.Value, param.ParameterType); } //</snippetObjectParameter_Value_Name_Type> @@ -2323,7 +2323,7 @@ private static void ApplyItemUpdates(SalesOrderDetail originalItem, { context.SalesOrderDetails.Attach(updatedItem); // Check if the ID is 0, if it is the item is new. - // In this case we need to chage the state to Added. + // In this case we need to change the state to Added. if (updatedItem.SalesOrderDetailID == 0) { // Because the ID is generated by the database we do not need to @@ -2463,7 +2463,7 @@ public static void ChangeObjectRelationshipUsingFKProperty() // Get the order being changed. SalesOrderHeader order = context.SalesOrderHeaders.First(o => o.SalesOrderID == orderId); - // Chage the billing address. + // Change the billing address. order.BillToAddressID = addressId; // Write the current billing street address. @@ -2533,7 +2533,7 @@ public static void AddObjectUsingKey() SalesOrderHeader order = new SalesOrderHeader(); order.EntityKey = orderKey; - // Assign the ID to the SalesOrderID property to matche the key. + // Assign the ID to the SalesOrderID property to match the key. order.SalesOrderID = (int)orderKey.EntityKeyValues[0].Value; // Attach the stand-in SalesOrderHeader object. @@ -3057,7 +3057,7 @@ private static int AddObject() // Add the new object to the context. context.Products.AddObject(newProduct); - // Persist the new produc to the data source. + // Persist the new product to the data source. context.SaveChanges(); // Return the identity of the new product. @@ -3067,7 +3067,7 @@ private static int AddObject() { throw new InvalidOperationException(string.Format( "The object could not be added. Make sure that a " - + "product with a product number '{0}' does not aleady exist.\n", + + "product with a product number '{0}' does not already exist.\n", newProduct.ProductNumber), ex); } } @@ -3436,7 +3436,7 @@ static public void AddNewObjectsWithFK() static public void CreateNewObjectSetFKAndRef() { //<snippetFKvsRef> - //<snippetExistingPrincipaltoNewDependentFK> + //<snippetExistingPrincipalToNewDependentFK> // The following example creates a new StudentGrade object and associates // the StudentGrade with the Course and Person by @@ -3468,9 +3468,9 @@ static public void CreateNewObjectSetFKAndRef() context.SaveChanges(); } - //</snippetExistingPrincipaltoNewDependentFK> + //</snippetExistingPrincipalToNewDependentFK> - //<snippetExistingPrincipaltoNewDependentRef> + //<snippetExistingPrincipalToNewDependentRef> // The following example creates a new StudentGrade and associates // the StudentGrade with the Course and Person by // setting the navigation properties to the Course and Person objects that were returned @@ -3478,7 +3478,7 @@ static public void CreateNewObjectSetFKAndRef() // You do not need to call AddObject() in order to add the grade object // to the context, because when you assign the reference // to the navigation property the objects on both ends get synchronized by the Entity Framework. - // Note, that the Entity Framework will not synchronize the ends untill the SaveChanges method + // Note, that the Entity Framework will not synchronize the ends until the SaveChanges method // is called if your objects do not meet the change tracking requirements. using (var context = new SchoolEntities()) { @@ -3502,7 +3502,7 @@ static public void CreateNewObjectSetFKAndRef() }; context.SaveChanges(); } - //</snippetExistingPrincipaltoNewDependentRef> + //</snippetExistingPrincipalToNewDependentRef> //</snippetFKvsRef> } @@ -3905,7 +3905,7 @@ private static void context_SavingChanges(object sender, EventArgs e) #endregion public class UpdateScenario { - //<snippetFKUpateService> + //<snippetFKUpdateService> static private StudentGrade GetOriginalValue(int ID) { StudentGrade originalItem; @@ -3937,11 +3937,11 @@ static private void SaveUpdates(StudentGrade updatedItem) context.SaveChanges(); } } - //</snippetFKUpateService> + //</snippetFKUpdateService> static public void ManipulateObjects() { - //<snippetFKUpateClient> + //<snippetFKUpdateClient> // A client calls a service to get the original object. StudentGrade studentGrade = GetOriginalValue(3); // Change the relationships. @@ -3949,7 +3949,7 @@ static public void ManipulateObjects() studentGrade.StudentID = 10; // The client calls a method on a service to save the updates. SaveUpdates(studentGrade); - //</snippetFKUpateClient> + //</snippetFKUpdateClient> } } diff --git a/samples/snippets/csharp/VS_Snippets_Data/DP ObjectServices Concepts/CS/fkvsref.cs b/samples/snippets/csharp/VS_Snippets_Data/DP ObjectServices Concepts/CS/fkvsref.cs index 944abfc685088..dd0099e566363 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/DP ObjectServices Concepts/CS/fkvsref.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/DP ObjectServices Concepts/CS/fkvsref.cs @@ -421,7 +421,7 @@ public void Initialize_data_and_fixup_using_AcceptChanges() // The following example creates a new order for existing Contact using the reference assignment. // Notice that to set the reference, we need to load the contact. // You do not need to call AddObject() because when you assign the reference -// to the navigation property the objects on both ends get synronized in the state manager. +// to the navigation property the objects on both ends get synchronized in the state manager. using (var context = new AdventureWorksEntities()) { SalesOrderHeader order = new SalesOrderHeader @@ -435,4 +435,4 @@ public void Initialize_data_and_fixup_using_AcceptChanges() } -*/ \ No newline at end of file +*/ diff --git a/samples/snippets/csharp/VS_Snippets_Data/PsciSample/CS/PsciSample.cs b/samples/snippets/csharp/VS_Snippets_Data/PsciSample/CS/PsciSample.cs index bf5e3acc0b8a1..907c67e8106fc 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/PsciSample/CS/PsciSample.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/PsciSample/CS/PsciSample.cs @@ -33,7 +33,7 @@ public static void Main(string[] args) // After compilation of the schema, the ElementSchemaType property of the // XmlSchemaElement will contain a reference to a valid object because the - // SchemaTypeName refered to a valid type. + // SchemaTypeName referred to a valid type. Console.WriteLine("After compilation the ElementSchemaType of Price is " + priceElem.ElementSchemaType); } @@ -43,4 +43,4 @@ private static void ValidationCallbackOne(object sender, ValidationEventArgs arg Console.WriteLine(args.Message); } } -//</snippet1> \ No newline at end of file +//</snippet1> diff --git a/samples/snippets/csharp/VS_Snippets_Data/XmlSchemaValidatorExamples/CS/XmlSchemaValidatorExamples.cs b/samples/snippets/csharp/VS_Snippets_Data/XmlSchemaValidatorExamples/CS/XmlSchemaValidatorExamples.cs index c36ca4c493334..fc13f7ee7fd43 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/XmlSchemaValidatorExamples/CS/XmlSchemaValidatorExamples.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/XmlSchemaValidatorExamples/CS/XmlSchemaValidatorExamples.cs @@ -38,7 +38,7 @@ static void Main() validator.GetUnspecifiedDefaultAttributes(new ArrayList()); validator.ValidateEndOfAttributes(null); - // Get the next exptected element in the bookstore context. + // Get the next expected element in the bookstore context. XmlSchemaParticle[] particles = validator.GetExpectedParticles(); XmlSchemaElement nextElement = particles[0] as XmlSchemaElement; Console.WriteLine("Expected Element: '{0}'", nextElement.Name); @@ -48,7 +48,7 @@ static void Main() // Validate the book element. validator.ValidateElement("book", "http://www.contoso.com/books", null); - // Get the exptected attributes for the book element. + // Get the expected attributes for the book element. Console.Write("\nExpected attributes: "); XmlSchemaAttribute[] attributes = validator.GetExpectedAttributes(); foreach (XmlSchemaAttribute attribute in attributes) @@ -217,4 +217,4 @@ public class BookAuthor public string LastName; } } -//</snippet1> \ No newline at end of file +//</snippet1> diff --git a/samples/snippets/csharp/VS_Snippets_Data/dp entityservices concepts 2/cs/entitysql.cs b/samples/snippets/csharp/VS_Snippets_Data/dp entityservices concepts 2/cs/entitysql.cs index c23efddd9786c..d12c5b1fc9696 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/dp entityservices concepts 2/cs/entitysql.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/dp entityservices concepts 2/cs/entitysql.cs @@ -920,7 +920,7 @@ FROM AdventureWorksEntities.SalesOrderHeaders pc.Clear(); } - static void TestProduct(string esqlQuery, Dictionary<string, object> parametes) + static void TestProduct(string esqlQuery, Dictionary<string, object> parameters) { using (EntityConnection conn = new EntityConnection("name=AdventureWorksEntities")) @@ -933,7 +933,7 @@ static void TestProduct(string esqlQuery, Dictionary<string, object> parametes) using (EntityCommand cmd = conn.CreateCommand()) { cmd.CommandText = esqlQuery; - foreach (KeyValuePair<string, object> kvp in parametes) + foreach (KeyValuePair<string, object> kvp in parameters) { cmd.Parameters.AddWithValue(kvp.Key, kvp.Value); } @@ -975,4 +975,4 @@ static void TestProduct(string esqlQuery, Dictionary<string, object> parametes) } } } -} \ No newline at end of file +} diff --git a/samples/snippets/csharp/VS_Snippets_Data/dp entityservices concepts/cs/entitysql.cs b/samples/snippets/csharp/VS_Snippets_Data/dp entityservices concepts/cs/entitysql.cs index 3494251eb7efa..dfb1e20c1a237 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/dp entityservices concepts/cs/entitysql.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/dp entityservices concepts/cs/entitysql.cs @@ -845,7 +845,7 @@ AS order pc.Clear(); } - static void TestProduct(string esqlQuery, Dictionary<string, object> parametes) + static void TestProduct(string esqlQuery, Dictionary<string, object> parameters) { using (EntityConnection conn = new EntityConnection("name=AdventureWorksEntities")) @@ -858,7 +858,7 @@ static void TestProduct(string esqlQuery, Dictionary<string, object> parametes) using (EntityCommand cmd = conn.CreateCommand()) { cmd.CommandText = esqlQuery; - foreach (KeyValuePair<string, object> kvp in parametes) + foreach (KeyValuePair<string, object> kvp in parameters) { cmd.Parameters.AddWithValue(kvp.Key, kvp.Value); } diff --git a/samples/snippets/csharp/VS_Snippets_Data/xpathextensionfunctions/cs/xpathextensionfunctions.cs b/samples/snippets/csharp/VS_Snippets_Data/xpathextensionfunctions/cs/xpathextensionfunctions.cs index 567dddf3a9bad..09936c567b22e 100644 --- a/samples/snippets/csharp/VS_Snippets_Data/xpathextensionfunctions/cs/xpathextensionfunctions.cs +++ b/samples/snippets/csharp/VS_Snippets_Data/xpathextensionfunctions/cs/xpathextensionfunctions.cs @@ -42,7 +42,7 @@ static void Main(string[] args) context.AddNamespace("Extensions", "http://xpathExtensions"); // Create the XPath expression using extension function to select nodes - // that contain 2 occurences of the character entered by user. + // that contain 2 occurrences of the character entered by user. XPathExpression xpath = XPathExpression.Compile( "/Tasks/Name[Extensions:CountChar(., $charToCount) = 2]"); diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/astoria custom feeds.sln b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/astoria custom feeds.sln deleted file mode 100644 index 1f936fb8a7c7b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/astoria custom feeds.sln +++ /dev/null @@ -1,32 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Astoria Custom Feeds", "CS\Astoria Custom Feeds.csproj", "{71409BBB-9710-483C-A297-34C1946841ED}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Custom Feed Client", "Custom Feed Client\Custom Feed Client.csproj", "{6673812E-CA91-4FFB-9247-9D58F4A68305}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Astoria Custom Feeds VB", "VB\Astoria Custom Feeds VB.vbproj", "{3B883B5E-9F81-41F7-A313-DCDA4D77F1E0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {71409BBB-9710-483C-A297-34C1946841ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {71409BBB-9710-483C-A297-34C1946841ED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {71409BBB-9710-483C-A297-34C1946841ED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {71409BBB-9710-483C-A297-34C1946841ED}.Release|Any CPU.Build.0 = Release|Any CPU - {6673812E-CA91-4FFB-9247-9D58F4A68305}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6673812E-CA91-4FFB-9247-9D58F4A68305}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6673812E-CA91-4FFB-9247-9D58F4A68305}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6673812E-CA91-4FFB-9247-9D58F4A68305}.Release|Any CPU.Build.0 = Release|Any CPU - {3B883B5E-9F81-41F7-A313-DCDA4D77F1E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B883B5E-9F81-41F7-A313-DCDA4D77F1E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B883B5E-9F81-41F7-A313-DCDA4D77F1E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B883B5E-9F81-41F7-A313-DCDA4D77F1E0}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/astoria custom feeds.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/astoria custom feeds.csproj deleted file mode 100644 index 680879676f899..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/astoria custom feeds.csproj +++ /dev/null @@ -1,167 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{71409BBB-9710-483C-A297-34C1946841ED}</ProjectGuid> - <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>NorthwindService</RootNamespace> - <AssemblyName>NorthwindService</AssemblyName> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <FileUpgradeFlags> - </FileUpgradeFlags> - <OldToolsVersion>3.5</OldToolsVersion> - <UpgradeBackupLocation /> - <TargetFrameworkProfile /> - <UseIISExpress>false</UseIISExpress> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Data.DataSetExtensions"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Data.Entity"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Data.Services" /> - <Reference Include="System.Data.Services.Client" /> - <Reference Include="System.Runtime.Serialization"> - <RequiredTargetFramework>3.0</RequiredTargetFramework> - </Reference> - <Reference Include="System.Security" /> - <Reference Include="System.ServiceModel"> - <RequiredTargetFramework>3.0</RequiredTargetFramework> - </Reference> - <Reference Include="System.ServiceModel.Web"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Web.Extensions"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Xml.Linq"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Drawing" /> - <Reference Include="System.Web" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Configuration" /> - <Reference Include="System.Web.Services" /> - <Reference Include="System.EnterpriseServices" /> - <Reference Include="System.Web.Mobile" /> - </ItemGroup> - <ItemGroup> - <Content Include="..\XML\AtomPubConditional.xml"> - <Link>AtomPubConditional.xml</Link> - </Content> - <Content Include="..\XML\AtomPubDeferred.xml"> - <Link>AtomPubDeferred.xml</Link> - </Content> - <Content Include="..\XML\AtomPubInlineLink.xml"> - <Link>AtomPubInlineLink.xml</Link> - </Content> - <Content Include="..\XML\AtomPubWithLink.xml"> - <Link>AtomPubWithLink.xml</Link> - </Content> - <Content Include="..\XML\EdmFeedResult.xml"> - <Link>EdmFeedResult.xml</Link> - </Content> - <Content Include="CustomerAddress.svc" /> - <Content Include="Default.aspx" /> - <Content Include="Northwind.svc" /> - <Content Include="OrderItems.svc" /> - <Content Include="Web.config" /> - </ItemGroup> - <ItemGroup> - <Compile Include="..\XML\Northwind1.Designer.cs"> - <Link>Northwind1.Designer.cs</Link> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>Northwind.edmx</DependentUpon> - </Compile> - <Compile Include="CustomerAddress.svc.cs"> - <DependentUpon>CustomerAddress.svc</DependentUpon> - </Compile> - <Compile Include="Default.aspx.cs"> - <SubType>ASPXCodeBehind</SubType> - <DependentUpon>Default.aspx</DependentUpon> - </Compile> - <Compile Include="Default.aspx.designer.cs"> - <DependentUpon>Default.aspx</DependentUpon> - </Compile> - <Compile Include="IUpdatable.cs" /> - <Compile Include="Northwind.svc.cs"> - <DependentUpon>Northwind.svc</DependentUpon> - </Compile> - <Compile Include="OrderItems.svc.cs"> - <DependentUpon>OrderItems.svc</DependentUpon> - </Compile> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <EntityDeploy Include="..\XML\Northwind.edmx"> - <Link>Northwind.edmx</Link> - <Generator>EntityModelCodeGenerator</Generator> - <CustomToolNamespace> - </CustomToolNamespace> - <LastGenOutput>Northwind1.Designer.cs</LastGenOutput> - </EntityDeploy> - </ItemGroup> - <ItemGroup> - <Folder Include="App_Data\" /> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> - <ProjectExtensions> - <VisualStudio> - <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> - <WebProjectProperties> - <UseIIS>False</UseIIS> - <AutoAssignPort>False</AutoAssignPort> - <DevelopmentServerPort>12345</DevelopmentServerPort> - <DevelopmentServerVPath>/</DevelopmentServerVPath> - <IISUrl> - </IISUrl> - <NTLMAuthentication>False</NTLMAuthentication> - <UseCustomServer>False</UseCustomServer> - <CustomServerUrl> - </CustomServerUrl> - <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> - </WebProjectProperties> - </FlavorProperties> - </VisualStudio> - </ProjectExtensions> -</Project> \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/default.aspx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/default.aspx deleted file mode 100644 index 67ce05db70f3c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/default.aspx +++ /dev/null @@ -1,19 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="NorthwindService._Default" %> - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" > -<head runat="server"> - <title> - - -
- -
- - diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/default.aspx.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/default.aspx.cs deleted file mode 100644 index 26a604b400e31..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/default.aspx.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace NorthwindService -{ - public partial class _Default : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/default.aspx.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/default.aspx.designer.cs deleted file mode 100644 index 082e9f0f419a6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/default.aspx.designer.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace NorthwindService { - - - public partial class _Default { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/iupdatable.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/iupdatable.cs deleted file mode 100644 index 74c4cd5917818..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/iupdatable.cs +++ /dev/null @@ -1,115 +0,0 @@ -// -using System; -using System.Collections; -using System.Reflection; -using System.Data.Services; -using System.Linq; - -namespace CustomDataService -{ - public partial class OrderItemData : IUpdatable - { - // Creates an object in the container. - object IUpdatable.CreateResource(string containerName, string fullTypeName) - { - Type t = Type.GetType(fullTypeName, true); - object resource = Activator.CreateInstance(t); - return resource; - } - - // Gets the object referenced by the resource. - object IUpdatable.GetResource(IQueryable query, string fullTypeName) - { - object resource = query.Cast().SingleOrDefault(); - - // fullTypeName can be null for deletes - if (fullTypeName != null && resource.GetType().FullName != fullTypeName) - throw new ApplicationException("Unexpected type for this resource."); - return resource; - } - - // Resets the value of the object to its default value. - object IUpdatable.ResetResource(object resource) - { - // Nothing to do for this in-memory provider. - return resource; - } - - // Sets the value of the given property on the object. - void IUpdatable.SetValue(object targetResource, string propertyName, object propertyValue) - { - // Use reflection to set the property on the object. - Type t = targetResource.GetType(); - PropertyInfo p = t.GetProperty(propertyName); - p.SetValue(targetResource, propertyValue, null); - } - - // Gets the value of a property on an object. - object IUpdatable.GetValue(object targetResource, string propertyName) - { - // Use reflection to get the property to set. - Type t = targetResource.GetType(); - PropertyInfo p = t.GetProperty(propertyName); - return p.GetValue(targetResource, null); - } - - // Sets the related object for a reference. - void IUpdatable.SetReference( - object targetResource, string propertyName, object propertyValue) - { - ((IUpdatable)this).SetValue(targetResource, propertyName, propertyValue); - } - - // Adds the object to the related objects collection. - void IUpdatable.AddReferenceToCollection( - object targetResource, string propertyName, object resourceToBeAdded) - { - PropertyInfo pi = targetResource.GetType().GetProperty(propertyName); - if (pi == null) - throw new Exception("Can't find property"); - IList collection = (IList)pi.GetValue(targetResource, null); - collection.Add(resourceToBeAdded); - } - - // Removes the object from the related objects collection. - void IUpdatable.RemoveReferenceFromCollection( - object targetResource, string propertyName, object resourceToBeRemoved) - { - PropertyInfo pi = targetResource.GetType().GetProperty(propertyName); - if (pi == null) - throw new Exception("Can't find property"); - IList collection = (IList)pi.GetValue(targetResource, null); - collection.Remove(resourceToBeRemoved); - } - - // Deletes the resource. - void IUpdatable.DeleteResource(object targetResource) - { - // Nothing to do for this provider. - } - - // Saves all the pending changes. - void IUpdatable.SaveChanges() - { - //// Nothing to do for this in-memory provider (uncomment to raise an exception). - //throw new NotSupportedException( - // "The save changes functionality is not supported by this in-memory provider"); - } - - // Returns the actual instance of the resource represented - // by the resource object. - object IUpdatable.ResolveResource(object resource) - { - return resource; - } - - // Reverts all the pending changes. - void IUpdatable.ClearChanges() - { - //// Nothing to do for this in-memory provider (uncomment to raise an exception). - //throw new NotSupportedException( - // "The clear changes functionality is not supported by this in-memory provider"); - } - } -} -// \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.designer.cs deleted file mode 100644 index f488161dc24c2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.designer.cs +++ /dev/null @@ -1,1477 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated from a template. -// -// Manual changes to this file may cause unexpected behavior in your application. -// Manual changes to this file will be overwritten if the code is regenerated. -// -//------------------------------------------------------------------------------ - -using System; -using System.Data.Objects; -using System.Data.Objects.DataClasses; -using System.Data.EntityClient; -using System.ComponentModel; -using System.Xml.Serialization; -using System.Runtime.Serialization; - -[assembly: EdmSchemaAttribute()] -#region EDM Relationship Metadata - -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Orders_Customers", "Customers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindModel.Customer), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindModel.Order), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Order_Details_Orders", "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindModel.Order), "Order_Details", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindModel.Order_Detail), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Order_Details_Products", "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindModel.Product), "Order_Details", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindModel.Order_Detail), true)] - -#endregion - -namespace NorthwindModel -{ - #region Contexts - - /// - /// No Metadata Documentation available. - /// - public partial class NorthwindEntities : ObjectContext - { - #region Constructors - - /// - /// Initializes a new NorthwindEntities object using the connection string found in the 'NorthwindEntities' section of the application configuration file. - /// - public NorthwindEntities() : base("name=NorthwindEntities", "NorthwindEntities") - { - this.ContextOptions.LazyLoadingEnabled = true; - OnContextCreated(); - } - - /// - /// Initialize a new NorthwindEntities object. - /// - public NorthwindEntities(string connectionString) : base(connectionString, "NorthwindEntities") - { - this.ContextOptions.LazyLoadingEnabled = true; - OnContextCreated(); - } - - /// - /// Initialize a new NorthwindEntities object. - /// - public NorthwindEntities(EntityConnection connection) : base(connection, "NorthwindEntities") - { - this.ContextOptions.LazyLoadingEnabled = true; - OnContextCreated(); - } - - #endregion - - #region Partial Methods - - partial void OnContextCreated(); - - #endregion - - #region ObjectSet Properties - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Customers - { - get - { - if ((_Customers == null)) - { - _Customers = base.CreateObjectSet("Customers"); - } - return _Customers; - } - } - private ObjectSet _Customers; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Order_Details - { - get - { - if ((_Order_Details == null)) - { - _Order_Details = base.CreateObjectSet("Order_Details"); - } - return _Order_Details; - } - } - private ObjectSet _Order_Details; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Orders - { - get - { - if ((_Orders == null)) - { - _Orders = base.CreateObjectSet("Orders"); - } - return _Orders; - } - } - private ObjectSet _Orders; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Products - { - get - { - if ((_Products == null)) - { - _Products = base.CreateObjectSet("Products"); - } - return _Products; - } - } - private ObjectSet _Products; - - #endregion - #region AddTo Methods - - /// - /// Deprecated Method for adding a new object to the Customers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToCustomers(Customer customer) - { - base.AddObject("Customers", customer); - } - - /// - /// Deprecated Method for adding a new object to the Order_Details EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToOrder_Details(Order_Detail order_Detail) - { - base.AddObject("Order_Details", order_Detail); - } - - /// - /// Deprecated Method for adding a new object to the Orders EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToOrders(Order order) - { - base.AddObject("Orders", order); - } - - /// - /// Deprecated Method for adding a new object to the Products EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToProducts(Product product) - { - base.AddObject("Products", product); - } - - #endregion - } - - - #endregion - - #region Entities - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Customer")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Customer : EntityObject - { - #region Factory Method - - /// - /// Create a new Customer object. - /// - /// Initial value of the CustomerID property. - /// Initial value of the CompanyName property. - public static Customer CreateCustomer(global::System.String customerID, global::System.String companyName) - { - Customer customer = new Customer(); - customer.CustomerID = customerID; - customer.CompanyName = companyName; - return customer; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CustomerID - { - get - { - return _CustomerID; - } - set - { - if (_CustomerID != value) - { - OnCustomerIDChanging(value); - ReportPropertyChanging("CustomerID"); - _CustomerID = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CustomerID"); - OnCustomerIDChanged(); - } - } - } - private global::System.String _CustomerID; - partial void OnCustomerIDChanging(global::System.String value); - partial void OnCustomerIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactName - { - get - { - return _ContactName; - } - set - { - OnContactNameChanging(value); - ReportPropertyChanging("ContactName"); - _ContactName = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactName"); - OnContactNameChanged(); - } - } - private global::System.String _ContactName; - partial void OnContactNameChanging(global::System.String value); - partial void OnContactNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CompanyName - { - get - { - return _CompanyName; - } - set - { - OnCompanyNameChanging(value); - ReportPropertyChanging("CompanyName"); - _CompanyName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CompanyName"); - OnCompanyNameChanged(); - } - } - private global::System.String _CompanyName; - partial void OnCompanyNameChanging(global::System.String value); - partial void OnCompanyNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactTitle - { - get - { - return _ContactTitle; - } - set - { - OnContactTitleChanging(value); - ReportPropertyChanging("ContactTitle"); - _ContactTitle = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactTitle"); - OnContactTitleChanged(); - } - } - private global::System.String _ContactTitle; - partial void OnContactTitleChanging(global::System.String value); - partial void OnContactTitleChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Address - { - get - { - return _Address; - } - set - { - OnAddressChanging(value); - ReportPropertyChanging("Address"); - _Address = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Address"); - OnAddressChanged(); - } - } - private global::System.String _Address; - partial void OnAddressChanging(global::System.String value); - partial void OnAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String City - { - get - { - return _City; - } - set - { - OnCityChanging(value); - ReportPropertyChanging("City"); - _City = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("City"); - OnCityChanged(); - } - } - private global::System.String _City; - partial void OnCityChanging(global::System.String value); - partial void OnCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Region - { - get - { - return _Region; - } - set - { - OnRegionChanging(value); - ReportPropertyChanging("Region"); - _Region = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Region"); - OnRegionChanged(); - } - } - private global::System.String _Region; - partial void OnRegionChanging(global::System.String value); - partial void OnRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String PostalCode - { - get - { - return _PostalCode; - } - set - { - OnPostalCodeChanging(value); - ReportPropertyChanging("PostalCode"); - _PostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("PostalCode"); - OnPostalCodeChanged(); - } - } - private global::System.String _PostalCode; - partial void OnPostalCodeChanging(global::System.String value); - partial void OnPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Country - { - get - { - return _Country; - } - set - { - OnCountryChanging(value); - ReportPropertyChanging("Country"); - _Country = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Country"); - OnCountryChanged(); - } - } - private global::System.String _Country; - partial void OnCountryChanging(global::System.String value); - partial void OnCountryChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Phone - { - get - { - return _Phone; - } - set - { - OnPhoneChanging(value); - ReportPropertyChanging("Phone"); - _Phone = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Phone"); - OnPhoneChanged(); - } - } - private global::System.String _Phone; - partial void OnPhoneChanging(global::System.String value); - partial void OnPhoneChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Fax - { - get - { - return _Fax; - } - set - { - OnFaxChanging(value); - ReportPropertyChanging("Fax"); - _Fax = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Fax"); - OnFaxChanged(); - } - } - private global::System.String _Fax; - partial void OnFaxChanging(global::System.String value); - partial void OnFaxChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Customers", "Orders")] - public EntityCollection Orders - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Orders_Customers", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Orders_Customers", "Orders", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Order")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Order : EntityObject - { - #region Factory Method - - /// - /// Create a new Order object. - /// - /// Initial value of the OrderID property. - public static Order CreateOrder(global::System.Int32 orderID) - { - Order order = new Order(); - order.OrderID = orderID; - return order; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 OrderID - { - get - { - return _OrderID; - } - set - { - if (_OrderID != value) - { - OnOrderIDChanging(value); - ReportPropertyChanging("OrderID"); - _OrderID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("OrderID"); - OnOrderIDChanged(); - } - } - } - private global::System.Int32 _OrderID; - partial void OnOrderIDChanging(global::System.Int32 value); - partial void OnOrderIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String CustomerID - { - get - { - return _CustomerID; - } - set - { - OnCustomerIDChanging(value); - ReportPropertyChanging("CustomerID"); - _CustomerID = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("CustomerID"); - OnCustomerIDChanged(); - } - } - private global::System.String _CustomerID; - partial void OnCustomerIDChanging(global::System.String value); - partial void OnCustomerIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable EmployeeID - { - get - { - return _EmployeeID; - } - set - { - OnEmployeeIDChanging(value); - ReportPropertyChanging("EmployeeID"); - _EmployeeID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("EmployeeID"); - OnEmployeeIDChanged(); - } - } - private Nullable _EmployeeID; - partial void OnEmployeeIDChanging(Nullable value); - partial void OnEmployeeIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable OrderDate - { - get - { - return _OrderDate; - } - set - { - OnOrderDateChanging(value); - ReportPropertyChanging("OrderDate"); - _OrderDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("OrderDate"); - OnOrderDateChanged(); - } - } - private Nullable _OrderDate; - partial void OnOrderDateChanging(Nullable value); - partial void OnOrderDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable RequiredDate - { - get - { - return _RequiredDate; - } - set - { - OnRequiredDateChanging(value); - ReportPropertyChanging("RequiredDate"); - _RequiredDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("RequiredDate"); - OnRequiredDateChanged(); - } - } - private Nullable _RequiredDate; - partial void OnRequiredDateChanging(Nullable value); - partial void OnRequiredDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ShippedDate - { - get - { - return _ShippedDate; - } - set - { - OnShippedDateChanging(value); - ReportPropertyChanging("ShippedDate"); - _ShippedDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ShippedDate"); - OnShippedDateChanged(); - } - } - private Nullable _ShippedDate; - partial void OnShippedDateChanging(Nullable value); - partial void OnShippedDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ShipVia - { - get - { - return _ShipVia; - } - set - { - OnShipViaChanging(value); - ReportPropertyChanging("ShipVia"); - _ShipVia = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ShipVia"); - OnShipViaChanged(); - } - } - private Nullable _ShipVia; - partial void OnShipViaChanging(Nullable value); - partial void OnShipViaChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable Freight - { - get - { - return _Freight; - } - set - { - OnFreightChanging(value); - ReportPropertyChanging("Freight"); - _Freight = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Freight"); - OnFreightChanged(); - } - } - private Nullable _Freight; - partial void OnFreightChanging(Nullable value); - partial void OnFreightChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipName - { - get - { - return _ShipName; - } - set - { - OnShipNameChanging(value); - ReportPropertyChanging("ShipName"); - _ShipName = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipName"); - OnShipNameChanged(); - } - } - private global::System.String _ShipName; - partial void OnShipNameChanging(global::System.String value); - partial void OnShipNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipAddress - { - get - { - return _ShipAddress; - } - set - { - OnShipAddressChanging(value); - ReportPropertyChanging("ShipAddress"); - _ShipAddress = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipAddress"); - OnShipAddressChanged(); - } - } - private global::System.String _ShipAddress; - partial void OnShipAddressChanging(global::System.String value); - partial void OnShipAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipCity - { - get - { - return _ShipCity; - } - set - { - OnShipCityChanging(value); - ReportPropertyChanging("ShipCity"); - _ShipCity = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipCity"); - OnShipCityChanged(); - } - } - private global::System.String _ShipCity; - partial void OnShipCityChanging(global::System.String value); - partial void OnShipCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipRegion - { - get - { - return _ShipRegion; - } - set - { - OnShipRegionChanging(value); - ReportPropertyChanging("ShipRegion"); - _ShipRegion = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipRegion"); - OnShipRegionChanged(); - } - } - private global::System.String _ShipRegion; - partial void OnShipRegionChanging(global::System.String value); - partial void OnShipRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipPostalCode - { - get - { - return _ShipPostalCode; - } - set - { - OnShipPostalCodeChanging(value); - ReportPropertyChanging("ShipPostalCode"); - _ShipPostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipPostalCode"); - OnShipPostalCodeChanged(); - } - } - private global::System.String _ShipPostalCode; - partial void OnShipPostalCodeChanging(global::System.String value); - partial void OnShipPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipCountry - { - get - { - return _ShipCountry; - } - set - { - OnShipCountryChanging(value); - ReportPropertyChanging("ShipCountry"); - _ShipCountry = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipCountry"); - OnShipCountryChanged(); - } - } - private global::System.String _ShipCountry; - partial void OnShipCountryChanging(global::System.String value); - partial void OnShipCountryChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Customers", "Customers")] - public Customer Customer - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference CustomerReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Orders", "Order_Details")] - public EntityCollection Order_Details - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Order_Details_Orders", "Order_Details"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Order_Details_Orders", "Order_Details", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Order_Detail")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Order_Detail : EntityObject - { - #region Factory Method - - /// - /// Create a new Order_Detail object. - /// - /// Initial value of the OrderID property. - /// Initial value of the ProductID property. - /// Initial value of the UnitPrice property. - /// Initial value of the Quantity property. - /// Initial value of the Discount property. - public static Order_Detail CreateOrder_Detail(global::System.Int32 orderID, global::System.Int32 productID, global::System.Decimal unitPrice, global::System.Int16 quantity, global::System.Single discount) - { - Order_Detail order_Detail = new Order_Detail(); - order_Detail.OrderID = orderID; - order_Detail.ProductID = productID; - order_Detail.UnitPrice = unitPrice; - order_Detail.Quantity = quantity; - order_Detail.Discount = discount; - return order_Detail; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 OrderID - { - get - { - return _OrderID; - } - set - { - if (_OrderID != value) - { - OnOrderIDChanging(value); - ReportPropertyChanging("OrderID"); - _OrderID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("OrderID"); - OnOrderIDChanged(); - } - } - } - private global::System.Int32 _OrderID; - partial void OnOrderIDChanging(global::System.Int32 value); - partial void OnOrderIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 ProductID - { - get - { - return _ProductID; - } - set - { - if (_ProductID != value) - { - OnProductIDChanging(value); - ReportPropertyChanging("ProductID"); - _ProductID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ProductID"); - OnProductIDChanged(); - } - } - } - private global::System.Int32 _ProductID; - partial void OnProductIDChanging(global::System.Int32 value); - partial void OnProductIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Decimal UnitPrice - { - get - { - return _UnitPrice; - } - set - { - OnUnitPriceChanging(value); - ReportPropertyChanging("UnitPrice"); - _UnitPrice = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitPrice"); - OnUnitPriceChanged(); - } - } - private global::System.Decimal _UnitPrice; - partial void OnUnitPriceChanging(global::System.Decimal value); - partial void OnUnitPriceChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int16 Quantity - { - get - { - return _Quantity; - } - set - { - OnQuantityChanging(value); - ReportPropertyChanging("Quantity"); - _Quantity = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Quantity"); - OnQuantityChanged(); - } - } - private global::System.Int16 _Quantity; - partial void OnQuantityChanging(global::System.Int16 value); - partial void OnQuantityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Single Discount - { - get - { - return _Discount; - } - set - { - OnDiscountChanging(value); - ReportPropertyChanging("Discount"); - _Discount = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Discount"); - OnDiscountChanged(); - } - } - private global::System.Single _Discount; - partial void OnDiscountChanging(global::System.Single value); - partial void OnDiscountChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Orders", "Orders")] - public Order Order - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference OrderReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Products", "Products")] - public Product Product - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference ProductReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Product")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Product : EntityObject - { - #region Factory Method - - /// - /// Create a new Product object. - /// - /// Initial value of the ProductID property. - /// Initial value of the ProductName property. - /// Initial value of the Discontinued property. - public static Product CreateProduct(global::System.Int32 productID, global::System.String productName, global::System.Boolean discontinued) - { - Product product = new Product(); - product.ProductID = productID; - product.ProductName = productName; - product.Discontinued = discontinued; - return product; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 ProductID - { - get - { - return _ProductID; - } - set - { - if (_ProductID != value) - { - OnProductIDChanging(value); - ReportPropertyChanging("ProductID"); - _ProductID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ProductID"); - OnProductIDChanged(); - } - } - } - private global::System.Int32 _ProductID; - partial void OnProductIDChanging(global::System.Int32 value); - partial void OnProductIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String ProductName - { - get - { - return _ProductName; - } - set - { - OnProductNameChanging(value); - ReportPropertyChanging("ProductName"); - _ProductName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("ProductName"); - OnProductNameChanged(); - } - } - private global::System.String _ProductName; - partial void OnProductNameChanging(global::System.String value); - partial void OnProductNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable UnitsInStock - { - get - { - return _UnitsInStock; - } - set - { - OnUnitsInStockChanging(value); - ReportPropertyChanging("UnitsInStock"); - _UnitsInStock = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitsInStock"); - OnUnitsInStockChanged(); - } - } - private Nullable _UnitsInStock; - partial void OnUnitsInStockChanging(Nullable value); - partial void OnUnitsInStockChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ReorderLevel - { - get - { - return _ReorderLevel; - } - set - { - OnReorderLevelChanging(value); - ReportPropertyChanging("ReorderLevel"); - _ReorderLevel = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ReorderLevel"); - OnReorderLevelChanged(); - } - } - private Nullable _ReorderLevel; - partial void OnReorderLevelChanging(Nullable value); - partial void OnReorderLevelChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable SupplierID - { - get - { - return _SupplierID; - } - set - { - OnSupplierIDChanging(value); - ReportPropertyChanging("SupplierID"); - _SupplierID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("SupplierID"); - OnSupplierIDChanged(); - } - } - private Nullable _SupplierID; - partial void OnSupplierIDChanging(Nullable value); - partial void OnSupplierIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable CategoryID - { - get - { - return _CategoryID; - } - set - { - OnCategoryIDChanging(value); - ReportPropertyChanging("CategoryID"); - _CategoryID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("CategoryID"); - OnCategoryIDChanged(); - } - } - private Nullable _CategoryID; - partial void OnCategoryIDChanging(Nullable value); - partial void OnCategoryIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String QuantityPerUnit - { - get - { - return _QuantityPerUnit; - } - set - { - OnQuantityPerUnitChanging(value); - ReportPropertyChanging("QuantityPerUnit"); - _QuantityPerUnit = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("QuantityPerUnit"); - OnQuantityPerUnitChanged(); - } - } - private global::System.String _QuantityPerUnit; - partial void OnQuantityPerUnitChanging(global::System.String value); - partial void OnQuantityPerUnitChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable UnitPrice - { - get - { - return _UnitPrice; - } - set - { - OnUnitPriceChanging(value); - ReportPropertyChanging("UnitPrice"); - _UnitPrice = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitPrice"); - OnUnitPriceChanged(); - } - } - private Nullable _UnitPrice; - partial void OnUnitPriceChanging(Nullable value); - partial void OnUnitPriceChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable UnitsOnOrder - { - get - { - return _UnitsOnOrder; - } - set - { - OnUnitsOnOrderChanging(value); - ReportPropertyChanging("UnitsOnOrder"); - _UnitsOnOrder = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitsOnOrder"); - OnUnitsOnOrderChanged(); - } - } - private Nullable _UnitsOnOrder; - partial void OnUnitsOnOrderChanging(Nullable value); - partial void OnUnitsOnOrderChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Boolean Discontinued - { - get - { - return _Discontinued; - } - set - { - OnDiscontinuedChanging(value); - ReportPropertyChanging("Discontinued"); - _Discontinued = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Discontinued"); - OnDiscontinuedChanged(); - } - } - private global::System.Boolean _Discontinued; - partial void OnDiscontinuedChanging(global::System.Boolean value); - partial void OnDiscontinuedChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Products", "Order_Details")] - public EntityCollection Order_Details - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Order_Details_Products", "Order_Details"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Order_Details_Products", "Order_Details", value); - } - } - } - - #endregion - } - - #endregion - -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.objects.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.objects.cs deleted file mode 100644 index 310866cca99c2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.objects.cs +++ /dev/null @@ -1,1314 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3074 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()] -[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("NorthwindModel", "FK_Orders_Customers", "Customers", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindService.Customers), "Orders", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Orders))] -[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("NorthwindModel", "FK_Order_Details_Orders", "Orders", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindService.Orders), "Order_Details", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Order_Details))] -[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("NorthwindModel", "FK_Order_Details_Products", "Products", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindService.Products), "Order_Details", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Order_Details))] - -// Original file name: Northwind.Objects.cs -// Generation date: 7/20/2009 11:57:04 PM -namespace NorthwindService -{ - - /// - /// There are no comments for NorthwindEntities in the schema. - /// - public partial class NorthwindEntities : global::System.Data.Objects.ObjectContext - { - /// - /// Initializes a new NorthwindEntities object using the connection string found in the 'NorthwindEntities' section of the application configuration file. - /// - public NorthwindEntities() : - base("name=NorthwindEntities", "NorthwindEntities") - { - this.OnContextCreated(); - } - /// - /// Initialize a new NorthwindEntities object. - /// - public NorthwindEntities(string connectionString) : - base(connectionString, "NorthwindEntities") - { - this.OnContextCreated(); - } - /// - /// Initialize a new NorthwindEntities object. - /// - public NorthwindEntities(global::System.Data.EntityClient.EntityConnection connection) : - base(connection, "NorthwindEntities") - { - this.OnContextCreated(); - } - partial void OnContextCreated(); - /// - /// There are no comments for Customers in the schema. - /// - public global::System.Data.Objects.ObjectQuery Customers - { - get - { - if ((this._Customers == null)) - { - this._Customers = base.CreateQuery("[Customers]"); - } - return this._Customers; - } - } - private global::System.Data.Objects.ObjectQuery _Customers; - /// - /// There are no comments for Order_Details in the schema. - /// - public global::System.Data.Objects.ObjectQuery Order_Details - { - get - { - if ((this._Order_Details == null)) - { - this._Order_Details = base.CreateQuery("[Order_Details]"); - } - return this._Order_Details; - } - } - private global::System.Data.Objects.ObjectQuery _Order_Details; - /// - /// There are no comments for Orders in the schema. - /// - public global::System.Data.Objects.ObjectQuery Orders - { - get - { - if ((this._Orders == null)) - { - this._Orders = base.CreateQuery("[Orders]"); - } - return this._Orders; - } - } - private global::System.Data.Objects.ObjectQuery _Orders; - /// - /// There are no comments for Products in the schema. - /// - public global::System.Data.Objects.ObjectQuery Products - { - get - { - if ((this._Products == null)) - { - this._Products = base.CreateQuery("[Products]"); - } - return this._Products; - } - } - private global::System.Data.Objects.ObjectQuery _Products; - /// - /// There are no comments for Customers in the schema. - /// - public void AddToCustomers(Customers customers) - { - base.AddObject("Customers", customers); - } - /// - /// There are no comments for Order_Details in the schema. - /// - public void AddToOrder_Details(Order_Details order_Details) - { - base.AddObject("Order_Details", order_Details); - } - /// - /// There are no comments for Orders in the schema. - /// - public void AddToOrders(Orders orders) - { - base.AddObject("Orders", orders); - } - /// - /// There are no comments for Products in the schema. - /// - public void AddToProducts(Products products) - { - base.AddObject("Products", products); - } - } - /// - /// There are no comments for NorthwindModel.Customers in the schema. - /// - /// - /// CustomerID - /// - [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Customers")] - [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] - [global::System.Serializable()] - public partial class Customers : global::System.Data.Objects.DataClasses.EntityObject - { - /// - /// Create a new Customers object. - /// - /// Initial value of CustomerID. - /// Initial value of CompanyName. - public static Customers CreateCustomers(string customerID, string companyName) - { - Customers customers = new Customers(); - customers.CustomerID = customerID; - customers.CompanyName = companyName; - return customers; - } - /// - /// There are no comments for Property CustomerID in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string CustomerID - { - get - { - return this._CustomerID; - } - set - { - this.OnCustomerIDChanging(value); - this.ReportPropertyChanging("CustomerID"); - this._CustomerID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false); - this.ReportPropertyChanged("CustomerID"); - this.OnCustomerIDChanged(); - } - } - private string _CustomerID; - partial void OnCustomerIDChanging(string value); - partial void OnCustomerIDChanged(); - /// - /// There are no comments for Property CompanyName in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string CompanyName - { - get - { - return this._CompanyName; - } - set - { - this.OnCompanyNameChanging(value); - this.ReportPropertyChanging("CompanyName"); - this._CompanyName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false); - this.ReportPropertyChanged("CompanyName"); - this.OnCompanyNameChanged(); - } - } - private string _CompanyName; - partial void OnCompanyNameChanging(string value); - partial void OnCompanyNameChanged(); - /// - /// There are no comments for Property ContactName in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string ContactName - { - get - { - return this._ContactName; - } - set - { - this.OnContactNameChanging(value); - this.ReportPropertyChanging("ContactName"); - this._ContactName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("ContactName"); - this.OnContactNameChanged(); - } - } - private string _ContactName; - partial void OnContactNameChanging(string value); - partial void OnContactNameChanged(); - /// - /// There are no comments for Property ContactTitle in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string ContactTitle - { - get - { - return this._ContactTitle; - } - set - { - this.OnContactTitleChanging(value); - this.ReportPropertyChanging("ContactTitle"); - this._ContactTitle = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("ContactTitle"); - this.OnContactTitleChanged(); - } - } - private string _ContactTitle; - partial void OnContactTitleChanging(string value); - partial void OnContactTitleChanged(); - /// - /// There are no comments for Property Address in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string Address - { - get - { - return this._Address; - } - set - { - this.OnAddressChanging(value); - this.ReportPropertyChanging("Address"); - this._Address = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("Address"); - this.OnAddressChanged(); - } - } - private string _Address; - partial void OnAddressChanging(string value); - partial void OnAddressChanged(); - /// - /// There are no comments for Property City in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string City - { - get - { - return this._City; - } - set - { - this.OnCityChanging(value); - this.ReportPropertyChanging("City"); - this._City = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("City"); - this.OnCityChanged(); - } - } - private string _City; - partial void OnCityChanging(string value); - partial void OnCityChanged(); - /// - /// There are no comments for Property Region in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string Region - { - get - { - return this._Region; - } - set - { - this.OnRegionChanging(value); - this.ReportPropertyChanging("Region"); - this._Region = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("Region"); - this.OnRegionChanged(); - } - } - private string _Region; - partial void OnRegionChanging(string value); - partial void OnRegionChanged(); - /// - /// There are no comments for Property PostalCode in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string PostalCode - { - get - { - return this._PostalCode; - } - set - { - this.OnPostalCodeChanging(value); - this.ReportPropertyChanging("PostalCode"); - this._PostalCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("PostalCode"); - this.OnPostalCodeChanged(); - } - } - private string _PostalCode; - partial void OnPostalCodeChanging(string value); - partial void OnPostalCodeChanged(); - /// - /// There are no comments for Property Country in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string Country - { - get - { - return this._Country; - } - set - { - this.OnCountryChanging(value); - this.ReportPropertyChanging("Country"); - this._Country = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("Country"); - this.OnCountryChanged(); - } - } - private string _Country; - partial void OnCountryChanging(string value); - partial void OnCountryChanged(); - /// - /// There are no comments for Property Phone in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string Phone - { - get - { - return this._Phone; - } - set - { - this.OnPhoneChanging(value); - this.ReportPropertyChanging("Phone"); - this._Phone = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("Phone"); - this.OnPhoneChanged(); - } - } - private string _Phone; - partial void OnPhoneChanging(string value); - partial void OnPhoneChanged(); - /// - /// There are no comments for Property Fax in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string Fax - { - get - { - return this._Fax; - } - set - { - this.OnFaxChanging(value); - this.ReportPropertyChanging("Fax"); - this._Fax = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("Fax"); - this.OnFaxChanged(); - } - } - private string _Fax; - partial void OnFaxChanging(string value); - partial void OnFaxChanged(); - /// - /// There are no comments for Orders in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Customers", "Orders")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityCollection Orders - { - get - { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Orders_Customers", "Orders"); - } - set - { - if ((value != null)) - { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Orders_Customers", "Orders", value); - } - } - } - } - /// - /// There are no comments for NorthwindModel.Order_Details in the schema. - /// - /// - /// OrderID - /// ProductID - /// - [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Order_Details")] - [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] - [global::System.Serializable()] - public partial class Order_Details : global::System.Data.Objects.DataClasses.EntityObject - { - /// - /// Create a new Order_Details object. - /// - /// Initial value of OrderID. - /// Initial value of ProductID. - /// Initial value of UnitPrice. - /// Initial value of Quantity. - /// Initial value of Discount. - public static Order_Details CreateOrder_Details(int orderID, int productID, decimal unitPrice, short quantity, float discount) - { - Order_Details order_Details = new Order_Details(); - order_Details.OrderID = orderID; - order_Details.ProductID = productID; - order_Details.UnitPrice = unitPrice; - order_Details.Quantity = quantity; - order_Details.Discount = discount; - return order_Details; - } - /// - /// There are no comments for Property OrderID in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public int OrderID - { - get - { - return this._OrderID; - } - set - { - this.OnOrderIDChanging(value); - this.ReportPropertyChanging("OrderID"); - this._OrderID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("OrderID"); - this.OnOrderIDChanged(); - } - } - private int _OrderID; - partial void OnOrderIDChanging(int value); - partial void OnOrderIDChanged(); - /// - /// There are no comments for Property ProductID in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public int ProductID - { - get - { - return this._ProductID; - } - set - { - this.OnProductIDChanging(value); - this.ReportPropertyChanging("ProductID"); - this._ProductID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("ProductID"); - this.OnProductIDChanged(); - } - } - private int _ProductID; - partial void OnProductIDChanging(int value); - partial void OnProductIDChanged(); - /// - /// There are no comments for Property UnitPrice in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public decimal UnitPrice - { - get - { - return this._UnitPrice; - } - set - { - this.OnUnitPriceChanging(value); - this.ReportPropertyChanging("UnitPrice"); - this._UnitPrice = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("UnitPrice"); - this.OnUnitPriceChanged(); - } - } - private decimal _UnitPrice; - partial void OnUnitPriceChanging(decimal value); - partial void OnUnitPriceChanged(); - /// - /// There are no comments for Property Quantity in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public short Quantity - { - get - { - return this._Quantity; - } - set - { - this.OnQuantityChanging(value); - this.ReportPropertyChanging("Quantity"); - this._Quantity = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("Quantity"); - this.OnQuantityChanged(); - } - } - private short _Quantity; - partial void OnQuantityChanging(short value); - partial void OnQuantityChanged(); - /// - /// There are no comments for Property Discount in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public float Discount - { - get - { - return this._Discount; - } - set - { - this.OnDiscountChanging(value); - this.ReportPropertyChanging("Discount"); - this._Discount = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("Discount"); - this.OnDiscountChanged(); - } - } - private float _Discount; - partial void OnDiscountChanging(float value); - partial void OnDiscountChanged(); - /// - /// There are no comments for Orders in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Orders", "Orders")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public Orders Orders - { - get - { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders").Value; - } - set - { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders").Value = value; - } - } - /// - /// There are no comments for Orders in the schema. - /// - [global::System.ComponentModel.BrowsableAttribute(false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityReference OrdersReference - { - get - { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders"); - } - set - { - if ((value != null)) - { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders", value); - } - } - } - /// - /// There are no comments for Products in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Products", "Products")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public Products Products - { - get - { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products").Value; - } - set - { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products").Value = value; - } - } - /// - /// There are no comments for Products in the schema. - /// - [global::System.ComponentModel.BrowsableAttribute(false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityReference ProductsReference - { - get - { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products"); - } - set - { - if ((value != null)) - { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products", value); - } - } - } - } - /// - /// There are no comments for NorthwindModel.Orders in the schema. - /// - /// - /// OrderID - /// - [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Orders")] - [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] - [global::System.Serializable()] - public partial class Orders : global::System.Data.Objects.DataClasses.EntityObject - { - /// - /// Create a new Orders object. - /// - /// Initial value of OrderID. - public static Orders CreateOrders(int orderID) - { - Orders orders = new Orders(); - orders.OrderID = orderID; - return orders; - } - /// - /// There are no comments for Property OrderID in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public int OrderID - { - get - { - return this._OrderID; - } - set - { - this.OnOrderIDChanging(value); - this.ReportPropertyChanging("OrderID"); - this._OrderID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("OrderID"); - this.OnOrderIDChanged(); - } - } - private int _OrderID; - partial void OnOrderIDChanging(int value); - partial void OnOrderIDChanged(); - /// - /// There are no comments for Property EmployeeID in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable EmployeeID - { - get - { - return this._EmployeeID; - } - set - { - this.OnEmployeeIDChanging(value); - this.ReportPropertyChanging("EmployeeID"); - this._EmployeeID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("EmployeeID"); - this.OnEmployeeIDChanged(); - } - } - private global::System.Nullable _EmployeeID; - partial void OnEmployeeIDChanging(global::System.Nullable value); - partial void OnEmployeeIDChanged(); - /// - /// There are no comments for Property OrderDate in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable OrderDate - { - get - { - return this._OrderDate; - } - set - { - this.OnOrderDateChanging(value); - this.ReportPropertyChanging("OrderDate"); - this._OrderDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("OrderDate"); - this.OnOrderDateChanged(); - } - } - private global::System.Nullable _OrderDate; - partial void OnOrderDateChanging(global::System.Nullable value); - partial void OnOrderDateChanged(); - /// - /// There are no comments for Property RequiredDate in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable RequiredDate - { - get - { - return this._RequiredDate; - } - set - { - this.OnRequiredDateChanging(value); - this.ReportPropertyChanging("RequiredDate"); - this._RequiredDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("RequiredDate"); - this.OnRequiredDateChanged(); - } - } - private global::System.Nullable _RequiredDate; - partial void OnRequiredDateChanging(global::System.Nullable value); - partial void OnRequiredDateChanged(); - /// - /// There are no comments for Property ShippedDate in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable ShippedDate - { - get - { - return this._ShippedDate; - } - set - { - this.OnShippedDateChanging(value); - this.ReportPropertyChanging("ShippedDate"); - this._ShippedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("ShippedDate"); - this.OnShippedDateChanged(); - } - } - private global::System.Nullable _ShippedDate; - partial void OnShippedDateChanging(global::System.Nullable value); - partial void OnShippedDateChanged(); - /// - /// There are no comments for Property ShipVia in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable ShipVia - { - get - { - return this._ShipVia; - } - set - { - this.OnShipViaChanging(value); - this.ReportPropertyChanging("ShipVia"); - this._ShipVia = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("ShipVia"); - this.OnShipViaChanged(); - } - } - private global::System.Nullable _ShipVia; - partial void OnShipViaChanging(global::System.Nullable value); - partial void OnShipViaChanged(); - /// - /// There are no comments for Property Freight in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable Freight - { - get - { - return this._Freight; - } - set - { - this.OnFreightChanging(value); - this.ReportPropertyChanging("Freight"); - this._Freight = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("Freight"); - this.OnFreightChanged(); - } - } - private global::System.Nullable _Freight; - partial void OnFreightChanging(global::System.Nullable value); - partial void OnFreightChanged(); - /// - /// There are no comments for Property ShipName in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string ShipName - { - get - { - return this._ShipName; - } - set - { - this.OnShipNameChanging(value); - this.ReportPropertyChanging("ShipName"); - this._ShipName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("ShipName"); - this.OnShipNameChanged(); - } - } - private string _ShipName; - partial void OnShipNameChanging(string value); - partial void OnShipNameChanged(); - /// - /// There are no comments for Property ShipAddress in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string ShipAddress - { - get - { - return this._ShipAddress; - } - set - { - this.OnShipAddressChanging(value); - this.ReportPropertyChanging("ShipAddress"); - this._ShipAddress = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("ShipAddress"); - this.OnShipAddressChanged(); - } - } - private string _ShipAddress; - partial void OnShipAddressChanging(string value); - partial void OnShipAddressChanged(); - /// - /// There are no comments for Property ShipCity in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string ShipCity - { - get - { - return this._ShipCity; - } - set - { - this.OnShipCityChanging(value); - this.ReportPropertyChanging("ShipCity"); - this._ShipCity = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("ShipCity"); - this.OnShipCityChanged(); - } - } - private string _ShipCity; - partial void OnShipCityChanging(string value); - partial void OnShipCityChanged(); - /// - /// There are no comments for Property ShipRegion in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string ShipRegion - { - get - { - return this._ShipRegion; - } - set - { - this.OnShipRegionChanging(value); - this.ReportPropertyChanging("ShipRegion"); - this._ShipRegion = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("ShipRegion"); - this.OnShipRegionChanged(); - } - } - private string _ShipRegion; - partial void OnShipRegionChanging(string value); - partial void OnShipRegionChanged(); - /// - /// There are no comments for Property ShipPostalCode in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string ShipPostalCode - { - get - { - return this._ShipPostalCode; - } - set - { - this.OnShipPostalCodeChanging(value); - this.ReportPropertyChanging("ShipPostalCode"); - this._ShipPostalCode = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("ShipPostalCode"); - this.OnShipPostalCodeChanged(); - } - } - private string _ShipPostalCode; - partial void OnShipPostalCodeChanging(string value); - partial void OnShipPostalCodeChanged(); - /// - /// There are no comments for Property ShipCountry in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string ShipCountry - { - get - { - return this._ShipCountry; - } - set - { - this.OnShipCountryChanging(value); - this.ReportPropertyChanging("ShipCountry"); - this._ShipCountry = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("ShipCountry"); - this.OnShipCountryChanged(); - } - } - private string _ShipCountry; - partial void OnShipCountryChanging(string value); - partial void OnShipCountryChanged(); - /// - /// There are no comments for Customers in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Customers", "Customers")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public Customers Customers - { - get - { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers").Value; - } - set - { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers").Value = value; - } - } - /// - /// There are no comments for Customers in the schema. - /// - [global::System.ComponentModel.BrowsableAttribute(false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityReference CustomersReference - { - get - { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers"); - } - set - { - if ((value != null)) - { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers", value); - } - } - } - /// - /// There are no comments for Order_Details in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Orders", "Order_Details")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityCollection Order_Details - { - get - { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Order_Details_Orders", "Order_Details"); - } - set - { - if ((value != null)) - { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Order_Details_Orders", "Order_Details", value); - } - } - } - } - /// - /// There are no comments for NorthwindModel.Products in the schema. - /// - /// - /// ProductID - /// - [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Products")] - [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] - [global::System.Serializable()] - public partial class Products : global::System.Data.Objects.DataClasses.EntityObject - { - /// - /// Create a new Products object. - /// - /// Initial value of ProductID. - /// Initial value of ProductName. - /// Initial value of Discontinued. - public static Products CreateProducts(int productID, string productName, bool discontinued) - { - Products products = new Products(); - products.ProductID = productID; - products.ProductName = productName; - products.Discontinued = discontinued; - return products; - } - /// - /// There are no comments for Property ProductID in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public int ProductID - { - get - { - return this._ProductID; - } - set - { - this.OnProductIDChanging(value); - this.ReportPropertyChanging("ProductID"); - this._ProductID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("ProductID"); - this.OnProductIDChanged(); - } - } - private int _ProductID; - partial void OnProductIDChanging(int value); - partial void OnProductIDChanged(); - /// - /// There are no comments for Property ProductName in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string ProductName - { - get - { - return this._ProductName; - } - set - { - this.OnProductNameChanging(value); - this.ReportPropertyChanging("ProductName"); - this._ProductName = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false); - this.ReportPropertyChanged("ProductName"); - this.OnProductNameChanged(); - } - } - private string _ProductName; - partial void OnProductNameChanging(string value); - partial void OnProductNameChanged(); - /// - /// There are no comments for Property SupplierID in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable SupplierID - { - get - { - return this._SupplierID; - } - set - { - this.OnSupplierIDChanging(value); - this.ReportPropertyChanging("SupplierID"); - this._SupplierID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("SupplierID"); - this.OnSupplierIDChanged(); - } - } - private global::System.Nullable _SupplierID; - partial void OnSupplierIDChanging(global::System.Nullable value); - partial void OnSupplierIDChanged(); - /// - /// There are no comments for Property CategoryID in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable CategoryID - { - get - { - return this._CategoryID; - } - set - { - this.OnCategoryIDChanging(value); - this.ReportPropertyChanging("CategoryID"); - this._CategoryID = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("CategoryID"); - this.OnCategoryIDChanged(); - } - } - private global::System.Nullable _CategoryID; - partial void OnCategoryIDChanging(global::System.Nullable value); - partial void OnCategoryIDChanged(); - /// - /// There are no comments for Property QuantityPerUnit in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string QuantityPerUnit - { - get - { - return this._QuantityPerUnit; - } - set - { - this.OnQuantityPerUnitChanging(value); - this.ReportPropertyChanging("QuantityPerUnit"); - this._QuantityPerUnit = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("QuantityPerUnit"); - this.OnQuantityPerUnitChanged(); - } - } - private string _QuantityPerUnit; - partial void OnQuantityPerUnitChanging(string value); - partial void OnQuantityPerUnitChanged(); - /// - /// There are no comments for Property UnitPrice in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable UnitPrice - { - get - { - return this._UnitPrice; - } - set - { - this.OnUnitPriceChanging(value); - this.ReportPropertyChanging("UnitPrice"); - this._UnitPrice = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("UnitPrice"); - this.OnUnitPriceChanged(); - } - } - private global::System.Nullable _UnitPrice; - partial void OnUnitPriceChanging(global::System.Nullable value); - partial void OnUnitPriceChanged(); - /// - /// There are no comments for Property UnitsInStock in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable UnitsInStock - { - get - { - return this._UnitsInStock; - } - set - { - this.OnUnitsInStockChanging(value); - this.ReportPropertyChanging("UnitsInStock"); - this._UnitsInStock = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("UnitsInStock"); - this.OnUnitsInStockChanged(); - } - } - private global::System.Nullable _UnitsInStock; - partial void OnUnitsInStockChanging(global::System.Nullable value); - partial void OnUnitsInStockChanged(); - /// - /// There are no comments for Property UnitsOnOrder in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable UnitsOnOrder - { - get - { - return this._UnitsOnOrder; - } - set - { - this.OnUnitsOnOrderChanging(value); - this.ReportPropertyChanging("UnitsOnOrder"); - this._UnitsOnOrder = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("UnitsOnOrder"); - this.OnUnitsOnOrderChanged(); - } - } - private global::System.Nullable _UnitsOnOrder; - partial void OnUnitsOnOrderChanging(global::System.Nullable value); - partial void OnUnitsOnOrderChanged(); - /// - /// There are no comments for Property ReorderLevel in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Nullable ReorderLevel - { - get - { - return this._ReorderLevel; - } - set - { - this.OnReorderLevelChanging(value); - this.ReportPropertyChanging("ReorderLevel"); - this._ReorderLevel = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("ReorderLevel"); - this.OnReorderLevelChanged(); - } - } - private global::System.Nullable _ReorderLevel; - partial void OnReorderLevelChanging(global::System.Nullable value); - partial void OnReorderLevelChanged(); - /// - /// There are no comments for Property Discontinued in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public bool Discontinued - { - get - { - return this._Discontinued; - } - set - { - this.OnDiscontinuedChanging(value); - this.ReportPropertyChanging("Discontinued"); - this._Discontinued = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("Discontinued"); - this.OnDiscontinuedChanged(); - } - } - private bool _Discontinued; - partial void OnDiscontinuedChanging(bool value); - partial void OnDiscontinuedChanged(); - /// - /// There are no comments for Order_Details in the schema. - /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Products", "Order_Details")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityCollection Order_Details - { - get - { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Order_Details_Products", "Order_Details"); - } - set - { - if ((value != null)) - { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Order_Details_Products", "Order_Details", value); - } - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.svc b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.svc deleted file mode 100644 index 1579f9f9e8b56..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.svc +++ /dev/null @@ -1 +0,0 @@ -<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Service="NorthwindService.Northwind" %> diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.svc.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.svc.cs deleted file mode 100644 index 7688ab3e9232d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/northwind.svc.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Services; -using System.Linq; -using System.ServiceModel.Web; -using System.Web; - -namespace NorthwindService -{ - [System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)] - public class Northwind : DataService - { - // This method is called only once to initialize service-wide policies. - public static void InitializeService(DataServiceConfiguration config) - { - // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc. - // Examples: - config.SetEntitySetAccessRule("*", EntitySetRights.All); - config.DataServiceBehavior.MaxProtocolVersion = - System.Data.Services.Common.DataServiceProtocolVersion.V2; - // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/orderitems.svc b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/orderitems.svc deleted file mode 100644 index c5b0c24e0ac20..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/orderitems.svc +++ /dev/null @@ -1,3 +0,0 @@ - - -<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Service="CustomDataService.OrderItems" %> diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/orderitems.svc.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/orderitems.svc.cs deleted file mode 100644 index e58c0cf9cf381..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/orderitems.svc.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.Data.Services; -using System.Data.Services.Common; -using System.Linq; - -namespace CustomDataService -{ - // - [EntityPropertyMappingAttribute("Customer", - SyndicationItemProperty.AuthorName, - SyndicationTextContentKind.Plaintext, true)] - [EntityPropertyMapping("OrderId", - SyndicationItemProperty.Title, - SyndicationTextContentKind.Plaintext, false)] - [DataServiceKeyAttribute("OrderId")] - public class Order - // - { - public int OrderId { get; set; } - public string Customer { get; set; } - public IList Items { get; set; } - } - [EntityPropertyMappingAttribute("Product", "productname", - "orders", "http://schema.examples.microsoft.com/dataservices", true)] - [DataServiceKeyAttribute("Product")] - public class Item - { - public string Product { get; set; } - public int Quantity { get; set; } - } - public partial class OrderItemData - { - #region Populate Service Data - static IList _orders; - static IList _items; - static OrderItemData() - { - _orders = new Order[]{ - new Order(){ OrderId=0, Customer = "Peter Franken", Items = new List()}, - new Order(){ OrderId=1, Customer = "Ana Trujillo", Items = new List()}}; - _items = new Item[]{ - new Item(){ Product="Chai", Quantity=10 }, - new Item(){ Product="Chang", Quantity=25 }, - new Item(){ Product="Aniseed Syrup", Quantity = 5 }, - new Item(){ Product="Chef Anton's Cajun Seasoning", Quantity=30}}; - _orders[0].Items.Add(_items[0]); - _orders[0].Items.Add(_items[1]); - _orders[1].Items.Add(_items[2]); - _orders[1].Items.Add(_items[3]); - } - #endregion - public IQueryable Orders - { - get { return _orders.AsQueryable(); } - } - public IQueryable Items - { - get { return _items.AsQueryable(); } - } - } - - public class OrderItems : DataService - { - // This method is called only once to initialize - //service-wide policies. - public static void InitializeService(DataServiceConfiguration - config) - { - config.SetEntitySetAccessRule("Orders", - EntitySetRights.AllRead | - EntitySetRights.AllWrite); - config.SetEntitySetAccessRule("Items", - EntitySetRights.AllRead | - EntitySetRights.AllWrite); - config.DataServiceBehavior.MaxProtocolVersion = - DataServiceProtocolVersion.V2; - } - } -} -// diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/properties/assemblyinfo.cs deleted file mode 100644 index 3d1558390a18f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/properties/assemblyinfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NorthwindService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NorthwindService")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/web.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/web.config deleted file mode 100644 index 2958b07b0bb73..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/cs/web.config +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/app.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/app.config deleted file mode 100644 index 2f7cce784b99e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/app.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/custom feed client.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/custom feed client.csproj deleted file mode 100644 index ef55aff404bed..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/custom feed client.csproj +++ /dev/null @@ -1,144 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {6673812E-CA91-4FFB-9247-9D58F4A68305} - Exe - Properties - Custom_Feed_Client - Custom Feed Client - v4.0 - 512 - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - Client - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - 3.0 - - - 3.0 - - - - 3.5 - - - False - ..\..\..\..\..\..\..\Program Files (x86)\ADO.NET Data Services V1.5 CTP2\bin\System.Data.Services.Client.dll - 3.5 - - - 3.0 - - - 3.0 - - - 3.5 - - - 3.5 - - - - - 3.0 - - - 3.0 - - - - - - - True - True - Reference.datasvcmap - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - datasvcmap - - - - - DataServiceClientGenerator - Reference.cs - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/program.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/program.cs deleted file mode 100644 index f13fd96a2ded2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/program.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Custom_Feed_Client.Northwind; - -namespace Custom_Feed_Client -{ - class Program - { - static void Main(string[] args) - { - try - { - //NorthwindEntities context = new NorthwindEntities(new Uri("http://localhost:12345/Northwind.svc")); - NorthwindEntities context = new NorthwindEntities(new Uri("http://localhost:54321/Northwind.svc")); - - var cust = from customers in context.Customers - where customers.CustomerID == "ALFKI" - select customers; - - foreach (Customer c in cust) - { - Console.WriteLine(c.CompanyName.ToString()); - } - } - catch (Exception ex) - { - Console.WriteLine(ex.ToString()); - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/properties/assemblyinfo.cs deleted file mode 100644 index d9fa46f494f41..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/properties/assemblyinfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Custom Feed Client")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Custom Feed Client")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("903886d4-0f5f-44ff-b428-41cf8668ad74")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/service references/northwind/reference.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/service references/northwind/reference.cs deleted file mode 100644 index ab3f08a571325..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/service references/northwind/reference.cs +++ /dev/null @@ -1,1299 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.235 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Original file name: -// Generation date: 8/9/2011 12:17:07 AM -namespace Custom_Feed_Client.Northwind -{ - - /// - /// There are no comments for NorthwindEntities in the schema. - /// - public partial class NorthwindEntities : global::System.Data.Services.Client.DataServiceContext - { - /// - /// Initialize a new NorthwindEntities object. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public NorthwindEntities(global::System.Uri serviceRoot) : - base(serviceRoot) - { - this.ResolveName = new global::System.Func(this.ResolveNameFromType); - this.ResolveType = new global::System.Func(this.ResolveTypeFromName); - this.OnContextCreated(); - } - partial void OnContextCreated(); - /// - /// Since the namespace configured for this service reference - /// in Visual Studio is different from the one indicated in the - /// server schema, use type-mappers to map between the two. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected global::System.Type ResolveTypeFromName(string typeName) - { - if (typeName.StartsWith("NorthwindModel", global::System.StringComparison.Ordinal)) - { - return this.GetType().Assembly.GetType(string.Concat("Custom_Feed_Client.Northwind", typeName.Substring(14)), false); - } - return null; - } - /// - /// Since the namespace configured for this service reference - /// in Visual Studio is different from the one indicated in the - /// server schema, use type-mappers to map between the two. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected string ResolveNameFromType(global::System.Type clientType) - { - if (clientType.Namespace.Equals("Custom_Feed_Client.Northwind", global::System.StringComparison.Ordinal)) - { - return string.Concat("NorthwindModel.", clientType.Name); - } - return null; - } - /// - /// There are no comments for Customers in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Customers - { - get - { - if ((this._Customers == null)) - { - this._Customers = base.CreateQuery("Customers"); - } - return this._Customers; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Customers; - /// - /// There are no comments for Order_Details in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Order_Details - { - get - { - if ((this._Order_Details == null)) - { - this._Order_Details = base.CreateQuery("Order_Details"); - } - return this._Order_Details; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Order_Details; - /// - /// There are no comments for Orders in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Orders - { - get - { - if ((this._Orders == null)) - { - this._Orders = base.CreateQuery("Orders"); - } - return this._Orders; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Orders; - /// - /// There are no comments for Products in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Products - { - get - { - if ((this._Products == null)) - { - this._Products = base.CreateQuery("Products"); - } - return this._Products; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Products; - /// - /// There are no comments for Customers in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToCustomers(Customer customer) - { - base.AddObject("Customers", customer); - } - /// - /// There are no comments for Order_Details in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToOrder_Details(Order_Detail order_Detail) - { - base.AddObject("Order_Details", order_Detail); - } - /// - /// There are no comments for Orders in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToOrders(Order order) - { - base.AddObject("Orders", order); - } - /// - /// There are no comments for Products in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToProducts(Product product) - { - base.AddObject("Products", product); - } - } - /// - /// There are no comments for NorthwindModel.Customer in the schema. - /// - /// - /// CustomerID - /// - [global::System.Data.Services.Common.EntitySetAttribute("Customers")] - [global::System.Data.Services.Common.EntityPropertyMappingAttribute("CustomerID", System.Data.Services.Common.SyndicationItemProperty.Title, System.Data.Services.Common.SyndicationTextContentKind.Plaintext, true)] - [global::System.Data.Services.Common.EntityPropertyMappingAttribute("ContactName", System.Data.Services.Common.SyndicationItemProperty.AuthorName, System.Data.Services.Common.SyndicationTextContentKind.Plaintext, true)] - [global::System.Data.Services.Common.EntityPropertyMappingAttribute("CompanyName", "CompanyName", "Northwind", "http://schemas.examples.microsoft.com/dataservices", true)] - [global::System.Data.Services.Common.DataServiceKeyAttribute("CustomerID")] - public partial class Customer : global::System.ComponentModel.INotifyPropertyChanged - { - /// - /// Create a new Customer object. - /// - /// Initial value of CustomerID. - /// Initial value of CompanyName. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Customer CreateCustomer(string customerID, string companyName) - { - Customer customer = new Customer(); - customer.CustomerID = customerID; - customer.CompanyName = companyName; - return customer; - } - /// - /// There are no comments for Property CustomerID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string CustomerID - { - get - { - return this._CustomerID; - } - set - { - this.OnCustomerIDChanging(value); - this._CustomerID = value; - this.OnCustomerIDChanged(); - this.OnPropertyChanged("CustomerID"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _CustomerID; - partial void OnCustomerIDChanging(string value); - partial void OnCustomerIDChanged(); - /// - /// There are no comments for Property ContactName in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ContactName - { - get - { - return this._ContactName; - } - set - { - this.OnContactNameChanging(value); - this._ContactName = value; - this.OnContactNameChanged(); - this.OnPropertyChanged("ContactName"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ContactName; - partial void OnContactNameChanging(string value); - partial void OnContactNameChanged(); - /// - /// There are no comments for Property CompanyName in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string CompanyName - { - get - { - return this._CompanyName; - } - set - { - this.OnCompanyNameChanging(value); - this._CompanyName = value; - this.OnCompanyNameChanged(); - this.OnPropertyChanged("CompanyName"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _CompanyName; - partial void OnCompanyNameChanging(string value); - partial void OnCompanyNameChanged(); - /// - /// There are no comments for Property ContactTitle in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ContactTitle - { - get - { - return this._ContactTitle; - } - set - { - this.OnContactTitleChanging(value); - this._ContactTitle = value; - this.OnContactTitleChanged(); - this.OnPropertyChanged("ContactTitle"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ContactTitle; - partial void OnContactTitleChanging(string value); - partial void OnContactTitleChanged(); - /// - /// There are no comments for Property Address in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Address - { - get - { - return this._Address; - } - set - { - this.OnAddressChanging(value); - this._Address = value; - this.OnAddressChanged(); - this.OnPropertyChanged("Address"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Address; - partial void OnAddressChanging(string value); - partial void OnAddressChanged(); - /// - /// There are no comments for Property City in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string City - { - get - { - return this._City; - } - set - { - this.OnCityChanging(value); - this._City = value; - this.OnCityChanged(); - this.OnPropertyChanged("City"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _City; - partial void OnCityChanging(string value); - partial void OnCityChanged(); - /// - /// There are no comments for Property Region in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Region - { - get - { - return this._Region; - } - set - { - this.OnRegionChanging(value); - this._Region = value; - this.OnRegionChanged(); - this.OnPropertyChanged("Region"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Region; - partial void OnRegionChanging(string value); - partial void OnRegionChanged(); - /// - /// There are no comments for Property PostalCode in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string PostalCode - { - get - { - return this._PostalCode; - } - set - { - this.OnPostalCodeChanging(value); - this._PostalCode = value; - this.OnPostalCodeChanged(); - this.OnPropertyChanged("PostalCode"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _PostalCode; - partial void OnPostalCodeChanging(string value); - partial void OnPostalCodeChanged(); - /// - /// There are no comments for Property Country in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Country - { - get - { - return this._Country; - } - set - { - this.OnCountryChanging(value); - this._Country = value; - this.OnCountryChanged(); - this.OnPropertyChanged("Country"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Country; - partial void OnCountryChanging(string value); - partial void OnCountryChanged(); - /// - /// There are no comments for Property Phone in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Phone - { - get - { - return this._Phone; - } - set - { - this.OnPhoneChanging(value); - this._Phone = value; - this.OnPhoneChanged(); - this.OnPropertyChanged("Phone"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Phone; - partial void OnPhoneChanging(string value); - partial void OnPhoneChanged(); - /// - /// There are no comments for Property Fax in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Fax - { - get - { - return this._Fax; - } - set - { - this.OnFaxChanging(value); - this._Fax = value; - this.OnFaxChanged(); - this.OnPropertyChanged("Fax"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Fax; - partial void OnFaxChanging(string value); - partial void OnFaxChanged(); - /// - /// There are no comments for Orders in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceCollection Orders - { - get - { - return this._Orders; - } - set - { - this._Orders = value; - this.OnPropertyChanged("Orders"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceCollection _Orders = new global::System.Data.Services.Client.DataServiceCollection(null, System.Data.Services.Client.TrackingMode.None); - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected virtual void OnPropertyChanged(string property) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); - } - } - } - /// - /// There are no comments for NorthwindModel.Order_Detail in the schema. - /// - /// - /// OrderID - /// ProductID - /// - [global::System.Data.Services.Common.EntitySetAttribute("Order_Details")] - [global::System.Data.Services.Common.DataServiceKeyAttribute("OrderID", "ProductID")] - public partial class Order_Detail : global::System.ComponentModel.INotifyPropertyChanged - { - /// - /// Create a new Order_Detail object. - /// - /// Initial value of OrderID. - /// Initial value of ProductID. - /// Initial value of UnitPrice. - /// Initial value of Quantity. - /// Initial value of Discount. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Order_Detail CreateOrder_Detail(int orderID, int productID, decimal unitPrice, short quantity, float discount) - { - Order_Detail order_Detail = new Order_Detail(); - order_Detail.OrderID = orderID; - order_Detail.ProductID = productID; - order_Detail.UnitPrice = unitPrice; - order_Detail.Quantity = quantity; - order_Detail.Discount = discount; - return order_Detail; - } - /// - /// There are no comments for Property OrderID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int OrderID - { - get - { - return this._OrderID; - } - set - { - this.OnOrderIDChanging(value); - this._OrderID = value; - this.OnOrderIDChanged(); - this.OnPropertyChanged("OrderID"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _OrderID; - partial void OnOrderIDChanging(int value); - partial void OnOrderIDChanged(); - /// - /// There are no comments for Property ProductID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int ProductID - { - get - { - return this._ProductID; - } - set - { - this.OnProductIDChanging(value); - this._ProductID = value; - this.OnProductIDChanged(); - this.OnPropertyChanged("ProductID"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _ProductID; - partial void OnProductIDChanging(int value); - partial void OnProductIDChanged(); - /// - /// There are no comments for Property UnitPrice in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public decimal UnitPrice - { - get - { - return this._UnitPrice; - } - set - { - this.OnUnitPriceChanging(value); - this._UnitPrice = value; - this.OnUnitPriceChanged(); - this.OnPropertyChanged("UnitPrice"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private decimal _UnitPrice; - partial void OnUnitPriceChanging(decimal value); - partial void OnUnitPriceChanged(); - /// - /// There are no comments for Property Quantity in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public short Quantity - { - get - { - return this._Quantity; - } - set - { - this.OnQuantityChanging(value); - this._Quantity = value; - this.OnQuantityChanged(); - this.OnPropertyChanged("Quantity"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private short _Quantity; - partial void OnQuantityChanging(short value); - partial void OnQuantityChanged(); - /// - /// There are no comments for Property Discount in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public float Discount - { - get - { - return this._Discount; - } - set - { - this.OnDiscountChanging(value); - this._Discount = value; - this.OnDiscountChanged(); - this.OnPropertyChanged("Discount"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private float _Discount; - partial void OnDiscountChanging(float value); - partial void OnDiscountChanged(); - /// - /// There are no comments for Order in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public Order Order - { - get - { - return this._Order; - } - set - { - this._Order = value; - this.OnPropertyChanged("Order"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private Order _Order; - /// - /// There are no comments for Product in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public Product Product - { - get - { - return this._Product; - } - set - { - this._Product = value; - this.OnPropertyChanged("Product"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private Product _Product; - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected virtual void OnPropertyChanged(string property) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); - } - } - } - /// - /// There are no comments for NorthwindModel.Order in the schema. - /// - /// - /// OrderID - /// - [global::System.Data.Services.Common.EntitySetAttribute("Orders")] - [global::System.Data.Services.Common.DataServiceKeyAttribute("OrderID")] - public partial class Order : global::System.ComponentModel.INotifyPropertyChanged - { - /// - /// Create a new Order object. - /// - /// Initial value of OrderID. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Order CreateOrder(int orderID) - { - Order order = new Order(); - order.OrderID = orderID; - return order; - } - /// - /// There are no comments for Property OrderID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int OrderID - { - get - { - return this._OrderID; - } - set - { - this.OnOrderIDChanging(value); - this._OrderID = value; - this.OnOrderIDChanged(); - this.OnPropertyChanged("OrderID"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _OrderID; - partial void OnOrderIDChanging(int value); - partial void OnOrderIDChanged(); - /// - /// There are no comments for Property CustomerID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string CustomerID - { - get - { - return this._CustomerID; - } - set - { - this.OnCustomerIDChanging(value); - this._CustomerID = value; - this.OnCustomerIDChanged(); - this.OnPropertyChanged("CustomerID"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _CustomerID; - partial void OnCustomerIDChanging(string value); - partial void OnCustomerIDChanged(); - /// - /// There are no comments for Property EmployeeID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable EmployeeID - { - get - { - return this._EmployeeID; - } - set - { - this.OnEmployeeIDChanging(value); - this._EmployeeID = value; - this.OnEmployeeIDChanged(); - this.OnPropertyChanged("EmployeeID"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _EmployeeID; - partial void OnEmployeeIDChanging(global::System.Nullable value); - partial void OnEmployeeIDChanged(); - /// - /// There are no comments for Property OrderDate in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable OrderDate - { - get - { - return this._OrderDate; - } - set - { - this.OnOrderDateChanging(value); - this._OrderDate = value; - this.OnOrderDateChanged(); - this.OnPropertyChanged("OrderDate"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _OrderDate; - partial void OnOrderDateChanging(global::System.Nullable value); - partial void OnOrderDateChanged(); - /// - /// There are no comments for Property RequiredDate in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable RequiredDate - { - get - { - return this._RequiredDate; - } - set - { - this.OnRequiredDateChanging(value); - this._RequiredDate = value; - this.OnRequiredDateChanged(); - this.OnPropertyChanged("RequiredDate"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _RequiredDate; - partial void OnRequiredDateChanging(global::System.Nullable value); - partial void OnRequiredDateChanged(); - /// - /// There are no comments for Property ShippedDate in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable ShippedDate - { - get - { - return this._ShippedDate; - } - set - { - this.OnShippedDateChanging(value); - this._ShippedDate = value; - this.OnShippedDateChanged(); - this.OnPropertyChanged("ShippedDate"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _ShippedDate; - partial void OnShippedDateChanging(global::System.Nullable value); - partial void OnShippedDateChanged(); - /// - /// There are no comments for Property ShipVia in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable ShipVia - { - get - { - return this._ShipVia; - } - set - { - this.OnShipViaChanging(value); - this._ShipVia = value; - this.OnShipViaChanged(); - this.OnPropertyChanged("ShipVia"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _ShipVia; - partial void OnShipViaChanging(global::System.Nullable value); - partial void OnShipViaChanged(); - /// - /// There are no comments for Property Freight in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable Freight - { - get - { - return this._Freight; - } - set - { - this.OnFreightChanging(value); - this._Freight = value; - this.OnFreightChanged(); - this.OnPropertyChanged("Freight"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _Freight; - partial void OnFreightChanging(global::System.Nullable value); - partial void OnFreightChanged(); - /// - /// There are no comments for Property ShipName in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipName - { - get - { - return this._ShipName; - } - set - { - this.OnShipNameChanging(value); - this._ShipName = value; - this.OnShipNameChanged(); - this.OnPropertyChanged("ShipName"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipName; - partial void OnShipNameChanging(string value); - partial void OnShipNameChanged(); - /// - /// There are no comments for Property ShipAddress in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipAddress - { - get - { - return this._ShipAddress; - } - set - { - this.OnShipAddressChanging(value); - this._ShipAddress = value; - this.OnShipAddressChanged(); - this.OnPropertyChanged("ShipAddress"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipAddress; - partial void OnShipAddressChanging(string value); - partial void OnShipAddressChanged(); - /// - /// There are no comments for Property ShipCity in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipCity - { - get - { - return this._ShipCity; - } - set - { - this.OnShipCityChanging(value); - this._ShipCity = value; - this.OnShipCityChanged(); - this.OnPropertyChanged("ShipCity"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipCity; - partial void OnShipCityChanging(string value); - partial void OnShipCityChanged(); - /// - /// There are no comments for Property ShipRegion in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipRegion - { - get - { - return this._ShipRegion; - } - set - { - this.OnShipRegionChanging(value); - this._ShipRegion = value; - this.OnShipRegionChanged(); - this.OnPropertyChanged("ShipRegion"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipRegion; - partial void OnShipRegionChanging(string value); - partial void OnShipRegionChanged(); - /// - /// There are no comments for Property ShipPostalCode in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipPostalCode - { - get - { - return this._ShipPostalCode; - } - set - { - this.OnShipPostalCodeChanging(value); - this._ShipPostalCode = value; - this.OnShipPostalCodeChanged(); - this.OnPropertyChanged("ShipPostalCode"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipPostalCode; - partial void OnShipPostalCodeChanging(string value); - partial void OnShipPostalCodeChanged(); - /// - /// There are no comments for Property ShipCountry in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipCountry - { - get - { - return this._ShipCountry; - } - set - { - this.OnShipCountryChanging(value); - this._ShipCountry = value; - this.OnShipCountryChanged(); - this.OnPropertyChanged("ShipCountry"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipCountry; - partial void OnShipCountryChanging(string value); - partial void OnShipCountryChanged(); - /// - /// There are no comments for Customer in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public Customer Customer - { - get - { - return this._Customer; - } - set - { - this._Customer = value; - this.OnPropertyChanged("Customer"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private Customer _Customer; - /// - /// There are no comments for Order_Details in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceCollection Order_Details - { - get - { - return this._Order_Details; - } - set - { - this._Order_Details = value; - this.OnPropertyChanged("Order_Details"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceCollection _Order_Details = new global::System.Data.Services.Client.DataServiceCollection(null, System.Data.Services.Client.TrackingMode.None); - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected virtual void OnPropertyChanged(string property) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); - } - } - } - /// - /// There are no comments for NorthwindModel.Product in the schema. - /// - /// - /// ProductID - /// - [global::System.Data.Services.Common.EntitySetAttribute("Products")] - [global::System.Data.Services.Common.EntityPropertyMappingAttribute("ProductName", System.Data.Services.Common.SyndicationItemProperty.AuthorName, System.Data.Services.Common.SyndicationTextContentKind.Plaintext, true)] - [global::System.Data.Services.Common.EntityPropertyMappingAttribute("UnitsInStock", "UnitsInStock", "Northwind", "http://schemas.examples.microsoft.com/dataservices", true)] - [global::System.Data.Services.Common.EntityPropertyMappingAttribute("ReorderLevel", "UnitsInStock/@ReorderLevel", "Northwind", "http://schemas.examples.microsoft.com/dataservices", false)] - [global::System.Data.Services.Common.DataServiceKeyAttribute("ProductID")] - public partial class Product : global::System.ComponentModel.INotifyPropertyChanged - { - /// - /// Create a new Product object. - /// - /// Initial value of ProductID. - /// Initial value of ProductName. - /// Initial value of Discontinued. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Product CreateProduct(int productID, string productName, bool discontinued) - { - Product product = new Product(); - product.ProductID = productID; - product.ProductName = productName; - product.Discontinued = discontinued; - return product; - } - /// - /// There are no comments for Property ProductID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int ProductID - { - get - { - return this._ProductID; - } - set - { - this.OnProductIDChanging(value); - this._ProductID = value; - this.OnProductIDChanged(); - this.OnPropertyChanged("ProductID"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _ProductID; - partial void OnProductIDChanging(int value); - partial void OnProductIDChanged(); - /// - /// There are no comments for Property ProductName in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ProductName - { - get - { - return this._ProductName; - } - set - { - this.OnProductNameChanging(value); - this._ProductName = value; - this.OnProductNameChanged(); - this.OnPropertyChanged("ProductName"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ProductName; - partial void OnProductNameChanging(string value); - partial void OnProductNameChanged(); - /// - /// There are no comments for Property UnitsInStock in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable UnitsInStock - { - get - { - return this._UnitsInStock; - } - set - { - this.OnUnitsInStockChanging(value); - this._UnitsInStock = value; - this.OnUnitsInStockChanged(); - this.OnPropertyChanged("UnitsInStock"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _UnitsInStock; - partial void OnUnitsInStockChanging(global::System.Nullable value); - partial void OnUnitsInStockChanged(); - /// - /// There are no comments for Property ReorderLevel in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable ReorderLevel - { - get - { - return this._ReorderLevel; - } - set - { - this.OnReorderLevelChanging(value); - this._ReorderLevel = value; - this.OnReorderLevelChanged(); - this.OnPropertyChanged("ReorderLevel"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _ReorderLevel; - partial void OnReorderLevelChanging(global::System.Nullable value); - partial void OnReorderLevelChanged(); - /// - /// There are no comments for Property SupplierID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable SupplierID - { - get - { - return this._SupplierID; - } - set - { - this.OnSupplierIDChanging(value); - this._SupplierID = value; - this.OnSupplierIDChanged(); - this.OnPropertyChanged("SupplierID"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _SupplierID; - partial void OnSupplierIDChanging(global::System.Nullable value); - partial void OnSupplierIDChanged(); - /// - /// There are no comments for Property CategoryID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable CategoryID - { - get - { - return this._CategoryID; - } - set - { - this.OnCategoryIDChanging(value); - this._CategoryID = value; - this.OnCategoryIDChanged(); - this.OnPropertyChanged("CategoryID"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _CategoryID; - partial void OnCategoryIDChanging(global::System.Nullable value); - partial void OnCategoryIDChanged(); - /// - /// There are no comments for Property QuantityPerUnit in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string QuantityPerUnit - { - get - { - return this._QuantityPerUnit; - } - set - { - this.OnQuantityPerUnitChanging(value); - this._QuantityPerUnit = value; - this.OnQuantityPerUnitChanged(); - this.OnPropertyChanged("QuantityPerUnit"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _QuantityPerUnit; - partial void OnQuantityPerUnitChanging(string value); - partial void OnQuantityPerUnitChanged(); - /// - /// There are no comments for Property UnitPrice in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable UnitPrice - { - get - { - return this._UnitPrice; - } - set - { - this.OnUnitPriceChanging(value); - this._UnitPrice = value; - this.OnUnitPriceChanged(); - this.OnPropertyChanged("UnitPrice"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _UnitPrice; - partial void OnUnitPriceChanging(global::System.Nullable value); - partial void OnUnitPriceChanged(); - /// - /// There are no comments for Property UnitsOnOrder in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable UnitsOnOrder - { - get - { - return this._UnitsOnOrder; - } - set - { - this.OnUnitsOnOrderChanging(value); - this._UnitsOnOrder = value; - this.OnUnitsOnOrderChanged(); - this.OnPropertyChanged("UnitsOnOrder"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _UnitsOnOrder; - partial void OnUnitsOnOrderChanging(global::System.Nullable value); - partial void OnUnitsOnOrderChanged(); - /// - /// There are no comments for Property Discontinued in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public bool Discontinued - { - get - { - return this._Discontinued; - } - set - { - this.OnDiscontinuedChanging(value); - this._Discontinued = value; - this.OnDiscontinuedChanged(); - this.OnPropertyChanged("Discontinued"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private bool _Discontinued; - partial void OnDiscontinuedChanging(bool value); - partial void OnDiscontinuedChanged(); - /// - /// There are no comments for Order_Details in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceCollection Order_Details - { - get - { - return this._Order_Details; - } - set - { - this._Order_Details = value; - this.OnPropertyChanged("Order_Details"); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceCollection _Order_Details = new global::System.Data.Services.Client.DataServiceCollection(null, System.Data.Services.Client.TrackingMode.None); - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected virtual void OnPropertyChanged(string property) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/service references/northwind/reference.datasvcmap b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/service references/northwind/reference.datasvcmap deleted file mode 100644 index bd0c336b09159..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/service references/northwind/reference.datasvcmap +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/service references/northwind/service.edmx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/service references/northwind/service.edmx deleted file mode 100644 index 59d69684a5250..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_custom_feeds/custom feed client/service references/northwind/service.edmx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/astoria linq provider.sln b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/astoria linq provider.sln deleted file mode 100644 index 6eecfb625142d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/astoria linq provider.sln +++ /dev/null @@ -1,54 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqProviderCS", "CS\LinqProviderCS.csproj", "{D52F0C68-0D94-4438-8E2D-400194CB8A97}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqProviderClientCS", "LinqProviderClientCS\LinqProviderClientCS.csproj", "{81BFBEDE-5DCD-4D51-8DD0-9114739A1562}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "LinqProviderVB", "VB\LinqProviderVB.vbproj", "{ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Debug|x86.ActiveCfg = Debug|Any CPU - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Release|Any CPU.Build.0 = Release|Any CPU - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {D52F0C68-0D94-4438-8E2D-400194CB8A97}.Release|x86.ActiveCfg = Release|Any CPU - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Debug|Any CPU.ActiveCfg = Debug|x86 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Debug|x86.ActiveCfg = Debug|x86 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Debug|x86.Build.0 = Debug|x86 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Release|Any CPU.ActiveCfg = Release|x86 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Release|Mixed Platforms.Build.0 = Release|x86 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Release|x86.ActiveCfg = Release|x86 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562}.Release|x86.Build.0 = Release|x86 - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Debug|x86.ActiveCfg = Debug|Any CPU - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Release|Any CPU.Build.0 = Release|Any CPU - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {ECEB64FC-6F96-4BEB-A89A-3D18283DD2B4}.Release|x86.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/default.aspx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/default.aspx deleted file mode 100644 index b934434ab1cab..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/default.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="NorthwindService._Default" %> - - - - - - - - -
-
- -
-
- - diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/default.aspx.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/default.aspx.cs deleted file mode 100644 index 554cc45891e6e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/default.aspx.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace NorthwindService -{ - public partial class _Default : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/default.aspx.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/default.aspx.designer.cs deleted file mode 100644 index 0beebe50f7ab4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/default.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:3.5.20604.3 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace NorthwindService { - - - public partial class _Default { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/linqprovidercs.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/linqprovidercs.csproj deleted file mode 100644 index d83632d036591..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/linqprovidercs.csproj +++ /dev/null @@ -1,153 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D52F0C68-0D94-4438-8E2D-400194CB8A97} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - NorthwindService - NorthwindLinqProvider - v4.0 - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - 3.5 - - - 3.5 - - - - - False - ..\..\..\..\..\..\..\Program Files (x86)\ADO.NET Data Services V1.5 CTP2\bin\System.Data.Services.dll - 3.5 - - - False - ..\..\..\..\..\..\..\Program Files (x86)\ADO.NET Data Services V1.5 CTP2\bin\System.Data.Services.Client.dll - 3.5 - - - - - 3.5 - - - 3.5 - - - - - - - - - - - - - - - Web.config - - - Web.config - - - - - Northwind.dbml - - - ASPXCodeBehind - Default.aspx - - - Default.aspx - - - True - True - Northwind.dbml - - - Northwind.svc - - - - - - - - - MSLinqToSQLGenerator - Northwind.designer.cs - Designer - - - Northwind.dbml - - - - - Northwind.dbml - - - - - - - - - - - - False - False - 12345 - / - - - False - False - - - False - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.cs deleted file mode 100644 index fd73f6906ed9e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.cs +++ /dev/null @@ -1,150 +0,0 @@ -// -using System; -using System.ComponentModel; -using System.Collections; -using System.Linq; -using System.Reflection; -using System.Data.Linq; -using System.Data.Linq.Mapping; -using System.Data.Services; -using System.Data.Services.Common; - -namespace NorthwindService -{ - // - // Define the key properties for the LINQ to SQL data classes. - [DataServiceKeyAttribute("CustomerID")] - public partial class Customer { } - - [DataServiceKeyAttribute("ProductID")] - public partial class Product { } - - [DataServiceKeyAttribute("OrderID")] - public partial class Order { } - - [DataServiceKeyAttribute("OrderID", "ProductID")] - public partial class Order_Detail { } - // - - // - #region IUpdatable implementation - // Define the IUpdatable implementation for LINQ to SQL. - public partial class NorthwindDataContext : IUpdatable - { - // Creates an object in the container. - object IUpdatable.CreateResource(string containerName, string fullTypeName) - { - Type t = Type.GetType(fullTypeName, true); - ITable table = GetTable(t); - object resource = Activator.CreateInstance(t); - table.InsertOnSubmit(resource); - return resource; - } - - // Gets the object referenced by the resource. - object IUpdatable.GetResource(IQueryable query, string fullTypeName) - { - object resource = query.Cast().SingleOrDefault(); - - // fullTypeName can be null for deletes - if (fullTypeName != null && resource.GetType().FullName != fullTypeName) - throw new ApplicationException("Unexpected type for this resource."); - return resource; - } - - // Resets the value of the object to its default value. - object IUpdatable.ResetResource(object resource) - { - Type t = resource.GetType(); - MetaTable table = Mapping.GetTable(t); - object dummyResource = Activator.CreateInstance(t); - foreach (var member in table.RowType.DataMembers) - { - if (!member.IsPrimaryKey && !member.IsDeferred && - !member.IsAssociation && !member.IsDbGenerated) - { - object defaultValue = member.MemberAccessor.GetBoxedValue(dummyResource); - member.MemberAccessor.SetBoxedValue(ref resource, defaultValue); - } - } - return resource; - } - - // Sets the value of the given property on the object. - void IUpdatable.SetValue(object targetResource, string propertyName, object propertyValue) - { - MetaTable table = Mapping.GetTable(targetResource.GetType()); - MetaDataMember member = table.RowType.DataMembers.Single(x => x.Name == propertyName); - member.MemberAccessor.SetBoxedValue(ref targetResource, propertyValue); - } - - // Gets the value of a property on an object. - object IUpdatable.GetValue(object targetResource, string propertyName) - { - MetaTable table = Mapping.GetTable(targetResource.GetType()); - MetaDataMember member = - table.RowType.DataMembers.Single(x => x.Name == propertyName); - return member.MemberAccessor.GetBoxedValue(targetResource); - } - - // Sets the related object for a reference. - void IUpdatable.SetReference( - object targetResource, string propertyName, object propertyValue) - { - ((IUpdatable)this).SetValue(targetResource, propertyName, propertyValue); - } - - // Adds the object to the related objects collection. - void IUpdatable.AddReferenceToCollection( - object targetResource, string propertyName, object resourceToBeAdded) - { - PropertyInfo pi = targetResource.GetType().GetProperty(propertyName); - if (pi == null) - throw new Exception("Can't find property"); - IList collection = (IList)pi.GetValue(targetResource, null); - collection.Add(resourceToBeAdded); - } - - // Removes the object from the related objects collection. - void IUpdatable.RemoveReferenceFromCollection( - object targetResource, string propertyName, object resourceToBeRemoved) - { - PropertyInfo pi = targetResource.GetType().GetProperty(propertyName); - if (pi == null) - throw new Exception("Can't find property"); - IList collection = (IList)pi.GetValue(targetResource, null); - collection.Remove(resourceToBeRemoved); - } - - // Deletes the resource. - void IUpdatable.DeleteResource(object targetResource) - { - ITable table = GetTable(targetResource.GetType()); - table.DeleteOnSubmit(targetResource); - } - - // Saves all the pending changes. - void IUpdatable.SaveChanges() - { - SubmitChanges(); - } - - // Returns the actual instance of the resource represented - // by the resource object. - object IUpdatable.ResolveResource(object resource) - { - return resource; - } - - // Reverts all the pending changes. - void IUpdatable.ClearChanges() - { - // Raise an exception as there is no real way to do this with LINQ to SQL. - // Comment out the following line if you'd prefer a silent failure - throw new NotSupportedException(); - } - #endregion - // - } -} -// \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.dbml b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.dbml deleted file mode 100644 index 2d1b48e04f5fb..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.dbml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
- - - - - - - - - - - - - - -
-
\ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.dbml.diagram b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.dbml.diagram deleted file mode 100644 index 60263e5dcad4a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.dbml.diagram +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.dbml.layout b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.dbml.layout deleted file mode 100644 index 5f282702bb03e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.dbml.layout +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.designer.cs deleted file mode 100644 index c873bc764ee4c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.designer.cs +++ /dev/null @@ -1,1429 +0,0 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:3.5.20604.3 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace NorthwindService -{ - using System.Data.Linq; - using System.Data.Linq.Mapping; - using System.Data; - using System.Collections.Generic; - using System.Reflection; - using System.Linq; - using System.Linq.Expressions; - using System.ComponentModel; - using System; - - - [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="Northwind")] - public partial class NorthwindDataContext : System.Data.Linq.DataContext - { - - private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); - - #region Extensibility Method Definitions - partial void OnCreated(); - partial void InsertCustomer(Customer instance); - partial void UpdateCustomer(Customer instance); - partial void DeleteCustomer(Customer instance); - partial void InsertOrder(Order instance); - partial void UpdateOrder(Order instance); - partial void DeleteOrder(Order instance); - partial void InsertOrder_Detail(Order_Detail instance); - partial void UpdateOrder_Detail(Order_Detail instance); - partial void DeleteOrder_Detail(Order_Detail instance); - partial void InsertProduct(Product instance); - partial void UpdateProduct(Product instance); - partial void DeleteProduct(Product instance); - #endregion - - public NorthwindDataContext() : - base(global::System.Configuration.ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString, mappingSource) - { - OnCreated(); - } - - public NorthwindDataContext(string connection) : - base(connection, mappingSource) - { - OnCreated(); - } - - public NorthwindDataContext(System.Data.IDbConnection connection) : - base(connection, mappingSource) - { - OnCreated(); - } - - public NorthwindDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : - base(connection, mappingSource) - { - OnCreated(); - } - - public NorthwindDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : - base(connection, mappingSource) - { - OnCreated(); - } - - public System.Data.Linq.Table Customers - { - get - { - return this.GetTable(); - } - } - - public System.Data.Linq.Table Orders - { - get - { - return this.GetTable(); - } - } - - public System.Data.Linq.Table Order_Details - { - get - { - return this.GetTable(); - } - } - - public System.Data.Linq.Table Products - { - get - { - return this.GetTable(); - } - } - } - - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Customers")] - public partial class Customer : INotifyPropertyChanging, INotifyPropertyChanged - { - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private string _CustomerID; - - private string _CompanyName; - - private string _ContactName; - - private string _ContactTitle; - - private string _Address; - - private string _City; - - private string _Region; - - private string _PostalCode; - - private string _Country; - - private string _Phone; - - private string _Fax; - - private EntitySet _Orders; - - #region Extensibility Method Definitions - partial void OnLoaded(); - partial void OnValidate(System.Data.Linq.ChangeAction action); - partial void OnCreated(); - partial void OnCustomerIDChanging(string value); - partial void OnCustomerIDChanged(); - partial void OnCompanyNameChanging(string value); - partial void OnCompanyNameChanged(); - partial void OnContactNameChanging(string value); - partial void OnContactNameChanged(); - partial void OnContactTitleChanging(string value); - partial void OnContactTitleChanged(); - partial void OnAddressChanging(string value); - partial void OnAddressChanged(); - partial void OnCityChanging(string value); - partial void OnCityChanged(); - partial void OnRegionChanging(string value); - partial void OnRegionChanged(); - partial void OnPostalCodeChanging(string value); - partial void OnPostalCodeChanged(); - partial void OnCountryChanging(string value); - partial void OnCountryChanged(); - partial void OnPhoneChanging(string value); - partial void OnPhoneChanged(); - partial void OnFaxChanging(string value); - partial void OnFaxChanged(); - #endregion - - public Customer() - { - this._Orders = new EntitySet(new Action(this.attach_Orders), new Action(this.detach_Orders)); - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerID", DbType="NChar(5) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] - public string CustomerID - { - get - { - return this._CustomerID; - } - set - { - if ((this._CustomerID != value)) - { - this.OnCustomerIDChanging(value); - this.SendPropertyChanging(); - this._CustomerID = value; - this.SendPropertyChanged("CustomerID"); - this.OnCustomerIDChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyName", DbType="NVarChar(40) NOT NULL", CanBeNull=false)] - public string CompanyName - { - get - { - return this._CompanyName; - } - set - { - if ((this._CompanyName != value)) - { - this.OnCompanyNameChanging(value); - this.SendPropertyChanging(); - this._CompanyName = value; - this.SendPropertyChanged("CompanyName"); - this.OnCompanyNameChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContactName", DbType="NVarChar(30)")] - public string ContactName - { - get - { - return this._ContactName; - } - set - { - if ((this._ContactName != value)) - { - this.OnContactNameChanging(value); - this.SendPropertyChanging(); - this._ContactName = value; - this.SendPropertyChanged("ContactName"); - this.OnContactNameChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContactTitle", DbType="NVarChar(30)")] - public string ContactTitle - { - get - { - return this._ContactTitle; - } - set - { - if ((this._ContactTitle != value)) - { - this.OnContactTitleChanging(value); - this.SendPropertyChanging(); - this._ContactTitle = value; - this.SendPropertyChanged("ContactTitle"); - this.OnContactTitleChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(60)")] - public string Address - { - get - { - return this._Address; - } - set - { - if ((this._Address != value)) - { - this.OnAddressChanging(value); - this.SendPropertyChanging(); - this._Address = value; - this.SendPropertyChanged("Address"); - this.OnAddressChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_City", DbType="NVarChar(15)")] - public string City - { - get - { - return this._City; - } - set - { - if ((this._City != value)) - { - this.OnCityChanging(value); - this.SendPropertyChanging(); - this._City = value; - this.SendPropertyChanged("City"); - this.OnCityChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Region", DbType="NVarChar(15)")] - public string Region - { - get - { - return this._Region; - } - set - { - if ((this._Region != value)) - { - this.OnRegionChanging(value); - this.SendPropertyChanging(); - this._Region = value; - this.SendPropertyChanged("Region"); - this.OnRegionChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostalCode", DbType="NVarChar(10)")] - public string PostalCode - { - get - { - return this._PostalCode; - } - set - { - if ((this._PostalCode != value)) - { - this.OnPostalCodeChanging(value); - this.SendPropertyChanging(); - this._PostalCode = value; - this.SendPropertyChanged("PostalCode"); - this.OnPostalCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Country", DbType="NVarChar(15)")] - public string Country - { - get - { - return this._Country; - } - set - { - if ((this._Country != value)) - { - this.OnCountryChanging(value); - this.SendPropertyChanging(); - this._Country = value; - this.SendPropertyChanged("Country"); - this.OnCountryChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Phone", DbType="NVarChar(24)")] - public string Phone - { - get - { - return this._Phone; - } - set - { - if ((this._Phone != value)) - { - this.OnPhoneChanging(value); - this.SendPropertyChanging(); - this._Phone = value; - this.SendPropertyChanged("Phone"); - this.OnPhoneChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Fax", DbType="NVarChar(24)")] - public string Fax - { - get - { - return this._Fax; - } - set - { - if ((this._Fax != value)) - { - this.OnFaxChanging(value); - this.SendPropertyChanging(); - this._Fax = value; - this.SendPropertyChanged("Fax"); - this.OnFaxChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Customer_Order", Storage="_Orders", ThisKey="CustomerID", OtherKey="CustomerID")] - public EntitySet Orders - { - get - { - return this._Orders; - } - set - { - this._Orders.Assign(value); - } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) - { - this.PropertyChanging(this, emptyChangingEventArgs); - } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - } - - private void attach_Orders(Order entity) - { - this.SendPropertyChanging(); - entity.Customer = this; - } - - private void detach_Orders(Order entity) - { - this.SendPropertyChanging(); - entity.Customer = null; - } - } - - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Orders")] - public partial class Order : INotifyPropertyChanging, INotifyPropertyChanged - { - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private int _OrderID; - - private string _CustomerID; - - private System.Nullable _EmployeeID; - - private System.Nullable _OrderDate; - - private System.Nullable _RequiredDate; - - private System.Nullable _ShippedDate; - - private System.Nullable _ShipVia; - - private System.Nullable _Freight; - - private string _ShipName; - - private string _ShipAddress; - - private string _ShipCity; - - private string _ShipRegion; - - private string _ShipPostalCode; - - private string _ShipCountry; - - private EntitySet _Order_Details; - - private EntityRef _Customer; - - #region Extensibility Method Definitions - partial void OnLoaded(); - partial void OnValidate(System.Data.Linq.ChangeAction action); - partial void OnCreated(); - partial void OnOrderIDChanging(int value); - partial void OnOrderIDChanged(); - partial void OnCustomerIDChanging(string value); - partial void OnCustomerIDChanged(); - partial void OnEmployeeIDChanging(System.Nullable value); - partial void OnEmployeeIDChanged(); - partial void OnOrderDateChanging(System.Nullable value); - partial void OnOrderDateChanged(); - partial void OnRequiredDateChanging(System.Nullable value); - partial void OnRequiredDateChanged(); - partial void OnShippedDateChanging(System.Nullable value); - partial void OnShippedDateChanged(); - partial void OnShipViaChanging(System.Nullable value); - partial void OnShipViaChanged(); - partial void OnFreightChanging(System.Nullable value); - partial void OnFreightChanged(); - partial void OnShipNameChanging(string value); - partial void OnShipNameChanged(); - partial void OnShipAddressChanging(string value); - partial void OnShipAddressChanged(); - partial void OnShipCityChanging(string value); - partial void OnShipCityChanged(); - partial void OnShipRegionChanging(string value); - partial void OnShipRegionChanged(); - partial void OnShipPostalCodeChanging(string value); - partial void OnShipPostalCodeChanged(); - partial void OnShipCountryChanging(string value); - partial void OnShipCountryChanged(); - #endregion - - public Order() - { - this._Order_Details = new EntitySet(new Action(this.attach_Order_Details), new Action(this.detach_Order_Details)); - this._Customer = default(EntityRef); - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] - public int OrderID - { - get - { - return this._OrderID; - } - set - { - if ((this._OrderID != value)) - { - this.OnOrderIDChanging(value); - this.SendPropertyChanging(); - this._OrderID = value; - this.SendPropertyChanged("OrderID"); - this.OnOrderIDChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerID", DbType="NChar(5)")] - public string CustomerID - { - get - { - return this._CustomerID; - } - set - { - if ((this._CustomerID != value)) - { - if (this._Customer.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } - this.OnCustomerIDChanging(value); - this.SendPropertyChanging(); - this._CustomerID = value; - this.SendPropertyChanged("CustomerID"); - this.OnCustomerIDChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EmployeeID", DbType="Int")] - public System.Nullable EmployeeID - { - get - { - return this._EmployeeID; - } - set - { - if ((this._EmployeeID != value)) - { - this.OnEmployeeIDChanging(value); - this.SendPropertyChanging(); - this._EmployeeID = value; - this.SendPropertyChanged("EmployeeID"); - this.OnEmployeeIDChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderDate", DbType="DateTime")] - public System.Nullable OrderDate - { - get - { - return this._OrderDate; - } - set - { - if ((this._OrderDate != value)) - { - this.OnOrderDateChanging(value); - this.SendPropertyChanging(); - this._OrderDate = value; - this.SendPropertyChanged("OrderDate"); - this.OnOrderDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RequiredDate", DbType="DateTime")] - public System.Nullable RequiredDate - { - get - { - return this._RequiredDate; - } - set - { - if ((this._RequiredDate != value)) - { - this.OnRequiredDateChanging(value); - this.SendPropertyChanging(); - this._RequiredDate = value; - this.SendPropertyChanged("RequiredDate"); - this.OnRequiredDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShippedDate", DbType="DateTime")] - public System.Nullable ShippedDate - { - get - { - return this._ShippedDate; - } - set - { - if ((this._ShippedDate != value)) - { - this.OnShippedDateChanging(value); - this.SendPropertyChanging(); - this._ShippedDate = value; - this.SendPropertyChanged("ShippedDate"); - this.OnShippedDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShipVia", DbType="Int")] - public System.Nullable ShipVia - { - get - { - return this._ShipVia; - } - set - { - if ((this._ShipVia != value)) - { - this.OnShipViaChanging(value); - this.SendPropertyChanging(); - this._ShipVia = value; - this.SendPropertyChanged("ShipVia"); - this.OnShipViaChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Freight", DbType="Money")] - public System.Nullable Freight - { - get - { - return this._Freight; - } - set - { - if ((this._Freight != value)) - { - this.OnFreightChanging(value); - this.SendPropertyChanging(); - this._Freight = value; - this.SendPropertyChanged("Freight"); - this.OnFreightChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShipName", DbType="NVarChar(40)")] - public string ShipName - { - get - { - return this._ShipName; - } - set - { - if ((this._ShipName != value)) - { - this.OnShipNameChanging(value); - this.SendPropertyChanging(); - this._ShipName = value; - this.SendPropertyChanged("ShipName"); - this.OnShipNameChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShipAddress", DbType="NVarChar(60)")] - public string ShipAddress - { - get - { - return this._ShipAddress; - } - set - { - if ((this._ShipAddress != value)) - { - this.OnShipAddressChanging(value); - this.SendPropertyChanging(); - this._ShipAddress = value; - this.SendPropertyChanged("ShipAddress"); - this.OnShipAddressChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShipCity", DbType="NVarChar(15)")] - public string ShipCity - { - get - { - return this._ShipCity; - } - set - { - if ((this._ShipCity != value)) - { - this.OnShipCityChanging(value); - this.SendPropertyChanging(); - this._ShipCity = value; - this.SendPropertyChanged("ShipCity"); - this.OnShipCityChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShipRegion", DbType="NVarChar(15)")] - public string ShipRegion - { - get - { - return this._ShipRegion; - } - set - { - if ((this._ShipRegion != value)) - { - this.OnShipRegionChanging(value); - this.SendPropertyChanging(); - this._ShipRegion = value; - this.SendPropertyChanged("ShipRegion"); - this.OnShipRegionChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShipPostalCode", DbType="NVarChar(10)")] - public string ShipPostalCode - { - get - { - return this._ShipPostalCode; - } - set - { - if ((this._ShipPostalCode != value)) - { - this.OnShipPostalCodeChanging(value); - this.SendPropertyChanging(); - this._ShipPostalCode = value; - this.SendPropertyChanged("ShipPostalCode"); - this.OnShipPostalCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShipCountry", DbType="NVarChar(15)")] - public string ShipCountry - { - get - { - return this._ShipCountry; - } - set - { - if ((this._ShipCountry != value)) - { - this.OnShipCountryChanging(value); - this.SendPropertyChanging(); - this._ShipCountry = value; - this.SendPropertyChanged("ShipCountry"); - this.OnShipCountryChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Order_Order_Detail", Storage="_Order_Details", ThisKey="OrderID", OtherKey="OrderID")] - public EntitySet Order_Details - { - get - { - return this._Order_Details; - } - set - { - this._Order_Details.Assign(value); - } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Customer_Order", Storage="_Customer", ThisKey="CustomerID", OtherKey="CustomerID", IsForeignKey=true)] - public Customer Customer - { - get - { - return this._Customer.Entity; - } - set - { - Customer previousValue = this._Customer.Entity; - if (((previousValue != value) - || (this._Customer.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Customer.Entity = null; - previousValue.Orders.Remove(this); - } - this._Customer.Entity = value; - if ((value != null)) - { - value.Orders.Add(this); - this._CustomerID = value.CustomerID; - } - else - { - this._CustomerID = default(string); - } - this.SendPropertyChanged("Customer"); - } - } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) - { - this.PropertyChanging(this, emptyChangingEventArgs); - } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - } - - private void attach_Order_Details(Order_Detail entity) - { - this.SendPropertyChanging(); - entity.Order = this; - } - - private void detach_Order_Details(Order_Detail entity) - { - this.SendPropertyChanging(); - entity.Order = null; - } - } - - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.[Order Details]")] - public partial class Order_Detail : INotifyPropertyChanging, INotifyPropertyChanged - { - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private int _OrderID; - - private int _ProductID; - - private decimal _UnitPrice; - - private short _Quantity; - - private float _Discount; - - private EntityRef _Order; - - private EntityRef _Product; - - #region Extensibility Method Definitions - partial void OnLoaded(); - partial void OnValidate(System.Data.Linq.ChangeAction action); - partial void OnCreated(); - partial void OnOrderIDChanging(int value); - partial void OnOrderIDChanged(); - partial void OnProductIDChanging(int value); - partial void OnProductIDChanged(); - partial void OnUnitPriceChanging(decimal value); - partial void OnUnitPriceChanged(); - partial void OnQuantityChanging(short value); - partial void OnQuantityChanged(); - partial void OnDiscountChanging(float value); - partial void OnDiscountChanged(); - #endregion - - public Order_Detail() - { - this._Order = default(EntityRef); - this._Product = default(EntityRef); - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderID", DbType="Int NOT NULL", IsPrimaryKey=true)] - public int OrderID - { - get - { - return this._OrderID; - } - set - { - if ((this._OrderID != value)) - { - if (this._Order.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } - this.OnOrderIDChanging(value); - this.SendPropertyChanging(); - this._OrderID = value; - this.SendPropertyChanged("OrderID"); - this.OnOrderIDChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductID", DbType="Int NOT NULL", IsPrimaryKey=true)] - public int ProductID - { - get - { - return this._ProductID; - } - set - { - if ((this._ProductID != value)) - { - if (this._Product.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } - this.OnProductIDChanging(value); - this.SendPropertyChanging(); - this._ProductID = value; - this.SendPropertyChanged("ProductID"); - this.OnProductIDChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitPrice", DbType="Money NOT NULL")] - public decimal UnitPrice - { - get - { - return this._UnitPrice; - } - set - { - if ((this._UnitPrice != value)) - { - this.OnUnitPriceChanging(value); - this.SendPropertyChanging(); - this._UnitPrice = value; - this.SendPropertyChanged("UnitPrice"); - this.OnUnitPriceChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quantity", DbType="SmallInt NOT NULL")] - public short Quantity - { - get - { - return this._Quantity; - } - set - { - if ((this._Quantity != value)) - { - this.OnQuantityChanging(value); - this.SendPropertyChanging(); - this._Quantity = value; - this.SendPropertyChanged("Quantity"); - this.OnQuantityChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Discount", DbType="Real NOT NULL")] - public float Discount - { - get - { - return this._Discount; - } - set - { - if ((this._Discount != value)) - { - this.OnDiscountChanging(value); - this.SendPropertyChanging(); - this._Discount = value; - this.SendPropertyChanged("Discount"); - this.OnDiscountChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Order_Order_Detail", Storage="_Order", ThisKey="OrderID", OtherKey="OrderID", IsForeignKey=true)] - public Order Order - { - get - { - return this._Order.Entity; - } - set - { - Order previousValue = this._Order.Entity; - if (((previousValue != value) - || (this._Order.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Order.Entity = null; - previousValue.Order_Details.Remove(this); - } - this._Order.Entity = value; - if ((value != null)) - { - value.Order_Details.Add(this); - this._OrderID = value.OrderID; - } - else - { - this._OrderID = default(int); - } - this.SendPropertyChanged("Order"); - } - } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Product_Order_Detail", Storage="_Product", ThisKey="ProductID", OtherKey="ProductID", IsForeignKey=true)] - public Product Product - { - get - { - return this._Product.Entity; - } - set - { - Product previousValue = this._Product.Entity; - if (((previousValue != value) - || (this._Product.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Product.Entity = null; - previousValue.Order_Details.Remove(this); - } - this._Product.Entity = value; - if ((value != null)) - { - value.Order_Details.Add(this); - this._ProductID = value.ProductID; - } - else - { - this._ProductID = default(int); - } - this.SendPropertyChanged("Product"); - } - } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) - { - this.PropertyChanging(this, emptyChangingEventArgs); - } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - } - } - - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Products")] - public partial class Product : INotifyPropertyChanging, INotifyPropertyChanged - { - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private int _ProductID; - - private string _ProductName; - - private System.Nullable _SupplierID; - - private System.Nullable _CategoryID; - - private string _QuantityPerUnit; - - private System.Nullable _UnitPrice; - - private System.Nullable _UnitsInStock; - - private System.Nullable _UnitsOnOrder; - - private System.Nullable _ReorderLevel; - - private bool _Discontinued; - - private EntitySet _Order_Details; - - #region Extensibility Method Definitions - partial void OnLoaded(); - partial void OnValidate(System.Data.Linq.ChangeAction action); - partial void OnCreated(); - partial void OnProductIDChanging(int value); - partial void OnProductIDChanged(); - partial void OnProductNameChanging(string value); - partial void OnProductNameChanged(); - partial void OnSupplierIDChanging(System.Nullable value); - partial void OnSupplierIDChanged(); - partial void OnCategoryIDChanging(System.Nullable value); - partial void OnCategoryIDChanged(); - partial void OnQuantityPerUnitChanging(string value); - partial void OnQuantityPerUnitChanged(); - partial void OnUnitPriceChanging(System.Nullable value); - partial void OnUnitPriceChanged(); - partial void OnUnitsInStockChanging(System.Nullable value); - partial void OnUnitsInStockChanged(); - partial void OnUnitsOnOrderChanging(System.Nullable value); - partial void OnUnitsOnOrderChanged(); - partial void OnReorderLevelChanging(System.Nullable value); - partial void OnReorderLevelChanged(); - partial void OnDiscontinuedChanging(bool value); - partial void OnDiscontinuedChanged(); - #endregion - - public Product() - { - this._Order_Details = new EntitySet(new Action(this.attach_Order_Details), new Action(this.detach_Order_Details)); - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] - public int ProductID - { - get - { - return this._ProductID; - } - set - { - if ((this._ProductID != value)) - { - this.OnProductIDChanging(value); - this.SendPropertyChanging(); - this._ProductID = value; - this.SendPropertyChanged("ProductID"); - this.OnProductIDChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductName", DbType="NVarChar(40) NOT NULL", CanBeNull=false)] - public string ProductName - { - get - { - return this._ProductName; - } - set - { - if ((this._ProductName != value)) - { - this.OnProductNameChanging(value); - this.SendPropertyChanging(); - this._ProductName = value; - this.SendPropertyChanged("ProductName"); - this.OnProductNameChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupplierID", DbType="Int")] - public System.Nullable SupplierID - { - get - { - return this._SupplierID; - } - set - { - if ((this._SupplierID != value)) - { - this.OnSupplierIDChanging(value); - this.SendPropertyChanging(); - this._SupplierID = value; - this.SendPropertyChanged("SupplierID"); - this.OnSupplierIDChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CategoryID", DbType="Int")] - public System.Nullable CategoryID - { - get - { - return this._CategoryID; - } - set - { - if ((this._CategoryID != value)) - { - this.OnCategoryIDChanging(value); - this.SendPropertyChanging(); - this._CategoryID = value; - this.SendPropertyChanged("CategoryID"); - this.OnCategoryIDChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuantityPerUnit", DbType="NVarChar(20)")] - public string QuantityPerUnit - { - get - { - return this._QuantityPerUnit; - } - set - { - if ((this._QuantityPerUnit != value)) - { - this.OnQuantityPerUnitChanging(value); - this.SendPropertyChanging(); - this._QuantityPerUnit = value; - this.SendPropertyChanged("QuantityPerUnit"); - this.OnQuantityPerUnitChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitPrice", DbType="Money")] - public System.Nullable UnitPrice - { - get - { - return this._UnitPrice; - } - set - { - if ((this._UnitPrice != value)) - { - this.OnUnitPriceChanging(value); - this.SendPropertyChanging(); - this._UnitPrice = value; - this.SendPropertyChanged("UnitPrice"); - this.OnUnitPriceChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitsInStock", DbType="SmallInt")] - public System.Nullable UnitsInStock - { - get - { - return this._UnitsInStock; - } - set - { - if ((this._UnitsInStock != value)) - { - this.OnUnitsInStockChanging(value); - this.SendPropertyChanging(); - this._UnitsInStock = value; - this.SendPropertyChanged("UnitsInStock"); - this.OnUnitsInStockChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitsOnOrder", DbType="SmallInt")] - public System.Nullable UnitsOnOrder - { - get - { - return this._UnitsOnOrder; - } - set - { - if ((this._UnitsOnOrder != value)) - { - this.OnUnitsOnOrderChanging(value); - this.SendPropertyChanging(); - this._UnitsOnOrder = value; - this.SendPropertyChanged("UnitsOnOrder"); - this.OnUnitsOnOrderChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReorderLevel", DbType="SmallInt")] - public System.Nullable ReorderLevel - { - get - { - return this._ReorderLevel; - } - set - { - if ((this._ReorderLevel != value)) - { - this.OnReorderLevelChanging(value); - this.SendPropertyChanging(); - this._ReorderLevel = value; - this.SendPropertyChanged("ReorderLevel"); - this.OnReorderLevelChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Discontinued", DbType="Bit NOT NULL")] - public bool Discontinued - { - get - { - return this._Discontinued; - } - set - { - if ((this._Discontinued != value)) - { - this.OnDiscontinuedChanging(value); - this.SendPropertyChanging(); - this._Discontinued = value; - this.SendPropertyChanged("Discontinued"); - this.OnDiscontinuedChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Product_Order_Detail", Storage="_Order_Details", ThisKey="ProductID", OtherKey="ProductID")] - public EntitySet Order_Details - { - get - { - return this._Order_Details; - } - set - { - this._Order_Details.Assign(value); - } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) - { - this.PropertyChanging(this, emptyChangingEventArgs); - } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - } - - private void attach_Order_Details(Order_Detail entity) - { - this.SendPropertyChanging(); - entity.Product = this; - } - - private void detach_Order_Details(Order_Detail entity) - { - this.SendPropertyChanging(); - entity.Product = null; - } - } -} -#pragma warning restore 1591 diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.svc b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.svc deleted file mode 100644 index c1e188fbd40bd..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.svc +++ /dev/null @@ -1,4 +0,0 @@ - - -<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=4.0.0.0, -Culture=neutral, PublicKeyToken=b77a5c561934e089" Service="NorthwindService.Northwind" %> diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.svc.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.svc.cs deleted file mode 100644 index 76a763bdbb20a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/northwind.svc.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Services; -using System.Linq; -using System.ServiceModel.Web; -using System.Web; - -namespace NorthwindService -{ - [System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)] - public class Northwind : DataService - { - // This method is called only once to initialize service-wide policies. - public static void InitializeService(DataServiceConfiguration config) - { - // - config.SetEntitySetAccessRule("Customers", EntitySetRights.ReadMultiple); - config.SetEntitySetAccessRule("Orders", EntitySetRights.AllRead - | EntitySetRights.WriteMerge); - config.SetEntitySetAccessRule("Order_Details", EntitySetRights.AllRead - | EntitySetRights.AllWrite); - config.SetEntitySetAccessRule("Products", EntitySetRights.ReadMultiple); - // - config.SetEntitySetAccessRule("MyTypes", EntitySetRights.AllRead); - } - } - - #region ProofOfConcept - // Proof of concept code that I added to support the forum post: - // http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/5c3134e5-3edf-4eb1-b36c-90e280e775f0/#b387da56-13f5-4261-ac34-d4283b0871e8 - public partial class NorthwindDataContext - { - public IQueryable MyTypes - { - get - { - List types = new List(); - for (int i=0; i <2; i++) - { - types.Add(new SomeType(i, "string"+i.ToString())); - } - return types.AsQueryable(); - } - } - } - - [System.Data.Services.Common.DataServiceKey("Key")] - public class SomeType - { - public SomeType(int key, string prop) - { - this.Key = key; - this.Prop = prop; - } - - public int Key {get; set;} - - public string Prop { get; set;} - } -#endregion -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/properties/assemblyinfo.cs deleted file mode 100644 index 28e1b84f8cc12..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/properties/assemblyinfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NorthwindService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NorthwindService")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7de26ef7-1af1-4401-a396-b70da519d85b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/web.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/web.config deleted file mode 100644 index fa723f397ff00..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/web.config +++ /dev/null @@ -1,95 +0,0 @@ - - - - - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/web.debug.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/web.debug.config deleted file mode 100644 index 2c6dd51a70558..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/web.debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/web.release.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/web.release.config deleted file mode 100644 index 4122d79bfe246..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/cs/web.release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/linqproviderclientcs.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/linqproviderclientcs.csproj deleted file mode 100644 index 8ed689cc8536e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/linqproviderclientcs.csproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - Debug - x86 - 9.0.30729 - 2.0 - {81BFBEDE-5DCD-4D51-8DD0-9114739A1562} - Exe - Properties - NorthwindClient - LinqProviderClient - v4.0 - 512 - x86 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - 3.5 - - - False - ..\..\..\..\..\..\..\Program Files (x86)\ADO.NET Data Services V1.5 CTP2\bin\System.Data.Services.Client.dll - 3.5 - - - - - 3.5 - - - 3.5 - - - - - - - - - True - True - Reference.datasvcmap - - - - - - - - datasvcmap - - - - - - - - DataServiceClientGenerator - Reference.cs - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/program.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/program.cs deleted file mode 100644 index 390ff549bb653..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/program.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NorthwindClient.Northwind; - -namespace NorthwindClient -{ - class Program - { - static void Main(string[] args) - { - //NorthwindDataContext context = new NorthwindDataContext(new Uri("http://localhost:12345/Northwind.svc")); - NorthwindDataContext context = new NorthwindDataContext(new Uri("http://localhost:54321/Northwind.svc")); - - var order = (from o in context.Orders.Expand("Order_Details") - where o.OrderID == 10248 - select o).FirstOrDefault(); - - var item = order.Order_Details.FirstOrDefault(); - - item.Quantity += 1; - context.UpdateObject(item); - context.SaveChanges(); - - context.DeleteObject(item); - context.SaveChanges(); - - context.AddRelatedObject(order, "Order_Details", item); - context.SaveChanges(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/properties/assemblyinfo.cs deleted file mode 100644 index 9d285e54de03b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/properties/assemblyinfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("LinqProviderClientCS")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("LinqProviderClientCS")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("1e384ffe-9968-4ce5-aeda-4806b44d8862")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/service references/northwind/reference.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/service references/northwind/reference.cs deleted file mode 100644 index 1729e9a8e1998..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/service references/northwind/reference.cs +++ /dev/null @@ -1,1208 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.21030.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Original file name: -// Generation date: 11/20/2009 1:43:51 PM -namespace NorthwindClient.Northwind -{ - - /// - /// There are no comments for NorthwindDataContext in the schema. - /// - public partial class NorthwindDataContext : global::System.Data.Services.Client.DataServiceContext - { - /// - /// Initialize a new NorthwindDataContext object. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public NorthwindDataContext(global::System.Uri serviceRoot) : - base(serviceRoot) - { - this.ResolveName = new global::System.Func(this.ResolveNameFromType); - this.ResolveType = new global::System.Func(this.ResolveTypeFromName); - this.OnContextCreated(); - } - partial void OnContextCreated(); - /// - /// Since the namespace configured for this service reference - /// in Visual Studio is different from the one indicated in the - /// server schema, use type-mappers to map between the two. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected global::System.Type ResolveTypeFromName(string typeName) - { - if (typeName.StartsWith("NorthwindService", global::System.StringComparison.Ordinal)) - { - return this.GetType().Assembly.GetType(string.Concat("NorthwindClient.Northwind", typeName.Substring(16)), false); - } - return null; - } - /// - /// Since the namespace configured for this service reference - /// in Visual Studio is different from the one indicated in the - /// server schema, use type-mappers to map between the two. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected string ResolveNameFromType(global::System.Type clientType) - { - if (clientType.Namespace.Equals("NorthwindClient.Northwind", global::System.StringComparison.Ordinal)) - { - return string.Concat("NorthwindService.", clientType.Name); - } - return null; - } - /// - /// There are no comments for Customers in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Customers - { - get - { - if ((this._Customers == null)) - { - this._Customers = base.CreateQuery("Customers"); - } - return this._Customers; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Customers; - /// - /// There are no comments for Orders in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Orders - { - get - { - if ((this._Orders == null)) - { - this._Orders = base.CreateQuery("Orders"); - } - return this._Orders; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Orders; - /// - /// There are no comments for Order_Details in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Order_Details - { - get - { - if ((this._Order_Details == null)) - { - this._Order_Details = base.CreateQuery("Order_Details"); - } - return this._Order_Details; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Order_Details; - /// - /// There are no comments for Products in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Products - { - get - { - if ((this._Products == null)) - { - this._Products = base.CreateQuery("Products"); - } - return this._Products; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Products; - /// - /// There are no comments for Customers in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToCustomers(Customer customer) - { - base.AddObject("Customers", customer); - } - /// - /// There are no comments for Orders in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToOrders(Order order) - { - base.AddObject("Orders", order); - } - /// - /// There are no comments for Order_Details in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToOrder_Details(Order_Detail order_Detail) - { - base.AddObject("Order_Details", order_Detail); - } - /// - /// There are no comments for Products in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToProducts(Product product) - { - base.AddObject("Products", product); - } - } - /// - /// There are no comments for NorthwindService.Customer in the schema. - /// - /// - /// CustomerID - /// - [global::System.Data.Services.Common.DataServiceKeyAttribute("CustomerID")] - public partial class Customer - { - /// - /// Create a new Customer object. - /// - /// Initial value of CustomerID. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Customer CreateCustomer(string customerID) - { - Customer customer = new Customer(); - customer.CustomerID = customerID; - return customer; - } - /// - /// There are no comments for Property CustomerID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string CustomerID - { - get - { - return this._CustomerID; - } - set - { - this.OnCustomerIDChanging(value); - this._CustomerID = value; - this.OnCustomerIDChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _CustomerID; - partial void OnCustomerIDChanging(string value); - partial void OnCustomerIDChanged(); - /// - /// There are no comments for Property CompanyName in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string CompanyName - { - get - { - return this._CompanyName; - } - set - { - this.OnCompanyNameChanging(value); - this._CompanyName = value; - this.OnCompanyNameChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _CompanyName; - partial void OnCompanyNameChanging(string value); - partial void OnCompanyNameChanged(); - /// - /// There are no comments for Property ContactName in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ContactName - { - get - { - return this._ContactName; - } - set - { - this.OnContactNameChanging(value); - this._ContactName = value; - this.OnContactNameChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ContactName; - partial void OnContactNameChanging(string value); - partial void OnContactNameChanged(); - /// - /// There are no comments for Property ContactTitle in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ContactTitle - { - get - { - return this._ContactTitle; - } - set - { - this.OnContactTitleChanging(value); - this._ContactTitle = value; - this.OnContactTitleChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ContactTitle; - partial void OnContactTitleChanging(string value); - partial void OnContactTitleChanged(); - /// - /// There are no comments for Property Address in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Address - { - get - { - return this._Address; - } - set - { - this.OnAddressChanging(value); - this._Address = value; - this.OnAddressChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Address; - partial void OnAddressChanging(string value); - partial void OnAddressChanged(); - /// - /// There are no comments for Property City in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string City - { - get - { - return this._City; - } - set - { - this.OnCityChanging(value); - this._City = value; - this.OnCityChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _City; - partial void OnCityChanging(string value); - partial void OnCityChanged(); - /// - /// There are no comments for Property Region in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Region - { - get - { - return this._Region; - } - set - { - this.OnRegionChanging(value); - this._Region = value; - this.OnRegionChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Region; - partial void OnRegionChanging(string value); - partial void OnRegionChanged(); - /// - /// There are no comments for Property PostalCode in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string PostalCode - { - get - { - return this._PostalCode; - } - set - { - this.OnPostalCodeChanging(value); - this._PostalCode = value; - this.OnPostalCodeChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _PostalCode; - partial void OnPostalCodeChanging(string value); - partial void OnPostalCodeChanged(); - /// - /// There are no comments for Property Country in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Country - { - get - { - return this._Country; - } - set - { - this.OnCountryChanging(value); - this._Country = value; - this.OnCountryChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Country; - partial void OnCountryChanging(string value); - partial void OnCountryChanged(); - /// - /// There are no comments for Property Phone in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Phone - { - get - { - return this._Phone; - } - set - { - this.OnPhoneChanging(value); - this._Phone = value; - this.OnPhoneChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Phone; - partial void OnPhoneChanging(string value); - partial void OnPhoneChanged(); - /// - /// There are no comments for Property Fax in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Fax - { - get - { - return this._Fax; - } - set - { - this.OnFaxChanging(value); - this._Fax = value; - this.OnFaxChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Fax; - partial void OnFaxChanging(string value); - partial void OnFaxChanged(); - /// - /// There are no comments for Orders in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Collections.ObjectModel.Collection Orders - { - get - { - return this._Orders; - } - set - { - if ((value != null)) - { - this._Orders = value; - } - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Collections.ObjectModel.Collection _Orders = new global::System.Collections.ObjectModel.Collection(); - } - /// - /// There are no comments for NorthwindService.Order in the schema. - /// - /// - /// OrderID - /// - [global::System.Data.Services.Common.DataServiceKeyAttribute("OrderID")] - public partial class Order - { - /// - /// Create a new Order object. - /// - /// Initial value of OrderID. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Order CreateOrder(int orderID) - { - Order order = new Order(); - order.OrderID = orderID; - return order; - } - /// - /// There are no comments for Property OrderID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int OrderID - { - get - { - return this._OrderID; - } - set - { - this.OnOrderIDChanging(value); - this._OrderID = value; - this.OnOrderIDChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _OrderID; - partial void OnOrderIDChanging(int value); - partial void OnOrderIDChanged(); - /// - /// There are no comments for Property CustomerID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string CustomerID - { - get - { - return this._CustomerID; - } - set - { - this.OnCustomerIDChanging(value); - this._CustomerID = value; - this.OnCustomerIDChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _CustomerID; - partial void OnCustomerIDChanging(string value); - partial void OnCustomerIDChanged(); - /// - /// There are no comments for Property EmployeeID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable EmployeeID - { - get - { - return this._EmployeeID; - } - set - { - this.OnEmployeeIDChanging(value); - this._EmployeeID = value; - this.OnEmployeeIDChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _EmployeeID; - partial void OnEmployeeIDChanging(global::System.Nullable value); - partial void OnEmployeeIDChanged(); - /// - /// There are no comments for Property OrderDate in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable OrderDate - { - get - { - return this._OrderDate; - } - set - { - this.OnOrderDateChanging(value); - this._OrderDate = value; - this.OnOrderDateChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _OrderDate; - partial void OnOrderDateChanging(global::System.Nullable value); - partial void OnOrderDateChanged(); - /// - /// There are no comments for Property RequiredDate in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable RequiredDate - { - get - { - return this._RequiredDate; - } - set - { - this.OnRequiredDateChanging(value); - this._RequiredDate = value; - this.OnRequiredDateChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _RequiredDate; - partial void OnRequiredDateChanging(global::System.Nullable value); - partial void OnRequiredDateChanged(); - /// - /// There are no comments for Property ShippedDate in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable ShippedDate - { - get - { - return this._ShippedDate; - } - set - { - this.OnShippedDateChanging(value); - this._ShippedDate = value; - this.OnShippedDateChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _ShippedDate; - partial void OnShippedDateChanging(global::System.Nullable value); - partial void OnShippedDateChanged(); - /// - /// There are no comments for Property ShipVia in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable ShipVia - { - get - { - return this._ShipVia; - } - set - { - this.OnShipViaChanging(value); - this._ShipVia = value; - this.OnShipViaChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _ShipVia; - partial void OnShipViaChanging(global::System.Nullable value); - partial void OnShipViaChanged(); - /// - /// There are no comments for Property Freight in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable Freight - { - get - { - return this._Freight; - } - set - { - this.OnFreightChanging(value); - this._Freight = value; - this.OnFreightChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _Freight; - partial void OnFreightChanging(global::System.Nullable value); - partial void OnFreightChanged(); - /// - /// There are no comments for Property ShipName in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipName - { - get - { - return this._ShipName; - } - set - { - this.OnShipNameChanging(value); - this._ShipName = value; - this.OnShipNameChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipName; - partial void OnShipNameChanging(string value); - partial void OnShipNameChanged(); - /// - /// There are no comments for Property ShipAddress in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipAddress - { - get - { - return this._ShipAddress; - } - set - { - this.OnShipAddressChanging(value); - this._ShipAddress = value; - this.OnShipAddressChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipAddress; - partial void OnShipAddressChanging(string value); - partial void OnShipAddressChanged(); - /// - /// There are no comments for Property ShipCity in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipCity - { - get - { - return this._ShipCity; - } - set - { - this.OnShipCityChanging(value); - this._ShipCity = value; - this.OnShipCityChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipCity; - partial void OnShipCityChanging(string value); - partial void OnShipCityChanged(); - /// - /// There are no comments for Property ShipRegion in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipRegion - { - get - { - return this._ShipRegion; - } - set - { - this.OnShipRegionChanging(value); - this._ShipRegion = value; - this.OnShipRegionChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipRegion; - partial void OnShipRegionChanging(string value); - partial void OnShipRegionChanged(); - /// - /// There are no comments for Property ShipPostalCode in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipPostalCode - { - get - { - return this._ShipPostalCode; - } - set - { - this.OnShipPostalCodeChanging(value); - this._ShipPostalCode = value; - this.OnShipPostalCodeChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipPostalCode; - partial void OnShipPostalCodeChanging(string value); - partial void OnShipPostalCodeChanged(); - /// - /// There are no comments for Property ShipCountry in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ShipCountry - { - get - { - return this._ShipCountry; - } - set - { - this.OnShipCountryChanging(value); - this._ShipCountry = value; - this.OnShipCountryChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ShipCountry; - partial void OnShipCountryChanging(string value); - partial void OnShipCountryChanged(); - /// - /// There are no comments for Order_Details in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Collections.ObjectModel.Collection Order_Details - { - get - { - return this._Order_Details; - } - set - { - if ((value != null)) - { - this._Order_Details = value; - } - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Collections.ObjectModel.Collection _Order_Details = new global::System.Collections.ObjectModel.Collection(); - /// - /// There are no comments for Customer in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public Customer Customer - { - get - { - return this._Customer; - } - set - { - this._Customer = value; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private Customer _Customer; - } - /// - /// There are no comments for NorthwindService.Order_Detail in the schema. - /// - /// - /// OrderID - /// ProductID - /// - [global::System.Data.Services.Common.DataServiceKeyAttribute("OrderID", "ProductID")] - public partial class Order_Detail - { - /// - /// Create a new Order_Detail object. - /// - /// Initial value of OrderID. - /// Initial value of ProductID. - /// Initial value of UnitPrice. - /// Initial value of Quantity. - /// Initial value of Discount. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Order_Detail CreateOrder_Detail(int orderID, int productID, decimal unitPrice, short quantity, float discount) - { - Order_Detail order_Detail = new Order_Detail(); - order_Detail.OrderID = orderID; - order_Detail.ProductID = productID; - order_Detail.UnitPrice = unitPrice; - order_Detail.Quantity = quantity; - order_Detail.Discount = discount; - return order_Detail; - } - /// - /// There are no comments for Property OrderID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int OrderID - { - get - { - return this._OrderID; - } - set - { - this.OnOrderIDChanging(value); - this._OrderID = value; - this.OnOrderIDChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _OrderID; - partial void OnOrderIDChanging(int value); - partial void OnOrderIDChanged(); - /// - /// There are no comments for Property ProductID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int ProductID - { - get - { - return this._ProductID; - } - set - { - this.OnProductIDChanging(value); - this._ProductID = value; - this.OnProductIDChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _ProductID; - partial void OnProductIDChanging(int value); - partial void OnProductIDChanged(); - /// - /// There are no comments for Property UnitPrice in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public decimal UnitPrice - { - get - { - return this._UnitPrice; - } - set - { - this.OnUnitPriceChanging(value); - this._UnitPrice = value; - this.OnUnitPriceChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private decimal _UnitPrice; - partial void OnUnitPriceChanging(decimal value); - partial void OnUnitPriceChanged(); - /// - /// There are no comments for Property Quantity in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public short Quantity - { - get - { - return this._Quantity; - } - set - { - this.OnQuantityChanging(value); - this._Quantity = value; - this.OnQuantityChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private short _Quantity; - partial void OnQuantityChanging(short value); - partial void OnQuantityChanged(); - /// - /// There are no comments for Property Discount in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public float Discount - { - get - { - return this._Discount; - } - set - { - this.OnDiscountChanging(value); - this._Discount = value; - this.OnDiscountChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private float _Discount; - partial void OnDiscountChanging(float value); - partial void OnDiscountChanged(); - /// - /// There are no comments for Order in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public Order Order - { - get - { - return this._Order; - } - set - { - this._Order = value; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private Order _Order; - /// - /// There are no comments for Product in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public Product Product - { - get - { - return this._Product; - } - set - { - this._Product = value; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private Product _Product; - } - /// - /// There are no comments for NorthwindService.Product in the schema. - /// - /// - /// ProductID - /// - [global::System.Data.Services.Common.DataServiceKeyAttribute("ProductID")] - public partial class Product - { - /// - /// Create a new Product object. - /// - /// Initial value of ProductID. - /// Initial value of Discontinued. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Product CreateProduct(int productID, bool discontinued) - { - Product product = new Product(); - product.ProductID = productID; - product.Discontinued = discontinued; - return product; - } - /// - /// There are no comments for Property ProductID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int ProductID - { - get - { - return this._ProductID; - } - set - { - this.OnProductIDChanging(value); - this._ProductID = value; - this.OnProductIDChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _ProductID; - partial void OnProductIDChanging(int value); - partial void OnProductIDChanged(); - /// - /// There are no comments for Property ProductName in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string ProductName - { - get - { - return this._ProductName; - } - set - { - this.OnProductNameChanging(value); - this._ProductName = value; - this.OnProductNameChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _ProductName; - partial void OnProductNameChanging(string value); - partial void OnProductNameChanged(); - /// - /// There are no comments for Property SupplierID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable SupplierID - { - get - { - return this._SupplierID; - } - set - { - this.OnSupplierIDChanging(value); - this._SupplierID = value; - this.OnSupplierIDChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _SupplierID; - partial void OnSupplierIDChanging(global::System.Nullable value); - partial void OnSupplierIDChanged(); - /// - /// There are no comments for Property CategoryID in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable CategoryID - { - get - { - return this._CategoryID; - } - set - { - this.OnCategoryIDChanging(value); - this._CategoryID = value; - this.OnCategoryIDChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _CategoryID; - partial void OnCategoryIDChanging(global::System.Nullable value); - partial void OnCategoryIDChanged(); - /// - /// There are no comments for Property QuantityPerUnit in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string QuantityPerUnit - { - get - { - return this._QuantityPerUnit; - } - set - { - this.OnQuantityPerUnitChanging(value); - this._QuantityPerUnit = value; - this.OnQuantityPerUnitChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _QuantityPerUnit; - partial void OnQuantityPerUnitChanging(string value); - partial void OnQuantityPerUnitChanged(); - /// - /// There are no comments for Property UnitPrice in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable UnitPrice - { - get - { - return this._UnitPrice; - } - set - { - this.OnUnitPriceChanging(value); - this._UnitPrice = value; - this.OnUnitPriceChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _UnitPrice; - partial void OnUnitPriceChanging(global::System.Nullable value); - partial void OnUnitPriceChanged(); - /// - /// There are no comments for Property UnitsInStock in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable UnitsInStock - { - get - { - return this._UnitsInStock; - } - set - { - this.OnUnitsInStockChanging(value); - this._UnitsInStock = value; - this.OnUnitsInStockChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _UnitsInStock; - partial void OnUnitsInStockChanging(global::System.Nullable value); - partial void OnUnitsInStockChanged(); - /// - /// There are no comments for Property UnitsOnOrder in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable UnitsOnOrder - { - get - { - return this._UnitsOnOrder; - } - set - { - this.OnUnitsOnOrderChanging(value); - this._UnitsOnOrder = value; - this.OnUnitsOnOrderChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _UnitsOnOrder; - partial void OnUnitsOnOrderChanging(global::System.Nullable value); - partial void OnUnitsOnOrderChanged(); - /// - /// There are no comments for Property ReorderLevel in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Nullable ReorderLevel - { - get - { - return this._ReorderLevel; - } - set - { - this.OnReorderLevelChanging(value); - this._ReorderLevel = value; - this.OnReorderLevelChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Nullable _ReorderLevel; - partial void OnReorderLevelChanging(global::System.Nullable value); - partial void OnReorderLevelChanged(); - /// - /// There are no comments for Property Discontinued in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public bool Discontinued - { - get - { - return this._Discontinued; - } - set - { - this.OnDiscontinuedChanging(value); - this._Discontinued = value; - this.OnDiscontinuedChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private bool _Discontinued; - partial void OnDiscontinuedChanging(bool value); - partial void OnDiscontinuedChanged(); - /// - /// There are no comments for Order_Details in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Collections.ObjectModel.Collection Order_Details - { - get - { - return this._Order_Details; - } - set - { - if ((value != null)) - { - this._Order_Details = value; - } - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Collections.ObjectModel.Collection _Order_Details = new global::System.Collections.ObjectModel.Collection(); - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/service references/northwind/reference.datasvcmap b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/service references/northwind/reference.datasvcmap deleted file mode 100644 index 4d94eef25dc83..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/service references/northwind/reference.datasvcmap +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/service references/northwind/service.edmx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/service references/northwind/service.edmx deleted file mode 100644 index 0c6dbce600df9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_linq_provider/linqproviderclientcs/service references/northwind/service.edmx +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoria.sln b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoria.sln deleted file mode 100644 index 115b1d85b3378..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoria.sln +++ /dev/null @@ -1,99 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3D659CEE-C162-4A7C-ABC6-EED556E9B741}" - ProjectSection(SolutionItems) = preProject - Astoria1.vsmdi = Astoria1.vsmdi - LocalTestRun.testrunconfig = LocalTestRun.testrunconfig - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NorthwindDataServiceCS", "CS\NorthwindDataServiceCS.csproj", "{98D3AD65-3885-4104-B856-B481EDCA1E0F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NorthwindClientCS", "..\Astoria Northwind Client\CS\NorthwindClientCS.csproj", "{E12CD45C-7CA8-4130-9309-B1A465FC16CF}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NorthwindDataServiceVB", "VB\NorthwindDataServiceVB.vbproj", "{F4B76D1A-0917-4237-B267-878A10DB1325}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NorthwindClientVB", "..\Astoria Northwind Client\VB\NorthwindClientVB.vbproj", "{9FB79FAA-1BB3-426F-82F0-074D45E67B21}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AstoriaSnippetsVB", "AstoriaSnippetsVB\AstoriaSnippetsVB.csproj", "{16FFFE3E-F660-415A-A7C0-BAA65580B2DD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AstoriaSnippetsCS", "AstoriaSnippetsCS\AstoriaSnippetsCS.csproj", "{738FF72F-820D-41D8-A3CB-8B178E676009}" -EndProject -Global - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = Astoria1.vsmdi - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Debug|x86.ActiveCfg = Debug|Any CPU - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Release|Any CPU.Build.0 = Release|Any CPU - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {98D3AD65-3885-4104-B856-B481EDCA1E0F}.Release|x86.ActiveCfg = Release|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Debug|x86.ActiveCfg = Debug|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Release|Any CPU.Build.0 = Release|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {E12CD45C-7CA8-4130-9309-B1A465FC16CF}.Release|x86.ActiveCfg = Release|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Debug|x86.ActiveCfg = Debug|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Release|Any CPU.Build.0 = Release|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {F4B76D1A-0917-4237-B267-878A10DB1325}.Release|x86.ActiveCfg = Release|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Debug|x86.ActiveCfg = Debug|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Release|Any CPU.Build.0 = Release|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {9FB79FAA-1BB3-426F-82F0-074D45E67B21}.Release|x86.ActiveCfg = Release|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Debug|x86.ActiveCfg = Debug|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Release|Any CPU.Build.0 = Release|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {16FFFE3E-F660-415A-A7C0-BAA65580B2DD}.Release|x86.ActiveCfg = Release|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Debug|Any CPU.Build.0 = Debug|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Debug|x86.ActiveCfg = Debug|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Release|Any CPU.ActiveCfg = Release|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Release|Any CPU.Build.0 = Release|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {738FF72F-820D-41D8-A3CB-8B178E676009}.Release|x86.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoria.vsmdi b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoria.vsmdi deleted file mode 100644 index 2ba718a094dd0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoria.vsmdi +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoria1.vsmdi b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoria1.vsmdi deleted file mode 100644 index 9199c24f49b1c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoria1.vsmdi +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/astoriasnippetscs.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/astoriasnippetscs.csproj deleted file mode 100644 index 7e9380168f8fc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/astoriasnippetscs.csproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - Debug - AnyCPU - - - 2.0 - {738FF72F-820D-41D8-A3CB-8B178E676009} - Library - Properties - AstoriaSnippetsCS - AstoriaSnippetsCS - v4.0 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - 3.5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {E12CD45C-7CA8-4130-9309-B1A465FC16CF} - NorthwindClientCS - - - {98D3AD65-3885-4104-B856-B481EDCA1E0F} - NorthwindDataServiceCS - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customeraddressnonentitytest.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customeraddressnonentitytest.cs deleted file mode 100644 index c0bc25d6adb9b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customeraddressnonentitytest.cs +++ /dev/null @@ -1,157 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for CustomerAddressNonEntityTest and is intended - ///to contain all CustomerAddressNonEntityTest Unit Tests - /// - [TestClass()] - public class CustomerAddressNonEntityTest - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for Region - /// - [TestMethod()] - public void RegionTest() - { - CustomerAddressNonEntity target = new CustomerAddressNonEntity(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.Region = expected; - actual = target.Region; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for PostalCode - /// - [TestMethod()] - public void PostalCodeTest() - { - CustomerAddressNonEntity target = new CustomerAddressNonEntity(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.PostalCode = expected; - actual = target.PostalCode; - Assert.AreEqual(expected, actual); - } - - /// - /// A test for country/region. - /// - [TestMethod()] - public void CountryTest() - { - CustomerAddressNonEntity target = new CustomerAddressNonEntity(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.Country = expected; - actual = target.Country; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for CompanyName - /// - [TestMethod()] - public void CompanyNameTest() - { - CustomerAddressNonEntity target = new CustomerAddressNonEntity(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.CompanyName = expected; - actual = target.CompanyName; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for City - /// - [TestMethod()] - public void CityTest() - { - CustomerAddressNonEntity target = new CustomerAddressNonEntity(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.City = expected; - actual = target.City; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for Address - /// - [TestMethod()] - public void AddressTest() - { - CustomerAddressNonEntity target = new CustomerAddressNonEntity(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.Address = expected; - actual = target.Address; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for CustomerAddressNonEntity Constructor - /// - [TestMethod()] - public void CustomerAddressNonEntityConstructorTest() - { - CustomerAddressNonEntity target = new CustomerAddressNonEntity(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customeraddresstest.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customeraddresstest.cs deleted file mode 100644 index de59f6885885f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customeraddresstest.cs +++ /dev/null @@ -1,172 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for CustomerAddressTest and is intended - ///to contain all CustomerAddressTest Unit Tests - /// - [TestClass()] - public class CustomerAddressTest - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for Region - /// - [TestMethod()] - public void RegionTest() - { - CustomerAddress target = new CustomerAddress(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.Region = expected; - actual = target.Region; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for PostalCode - /// - [TestMethod()] - public void PostalCodeTest() - { - CustomerAddress target = new CustomerAddress(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.PostalCode = expected; - actual = target.PostalCode; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for CustomerID - /// - [TestMethod()] - public void CustomerIDTest() - { - CustomerAddress target = new CustomerAddress(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.CustomerID = expected; - actual = target.CustomerID; - Assert.AreEqual(expected, actual); - } - - /// - /// A test for country/region. - /// - [TestMethod()] - public void CountryTest() - { - CustomerAddress target = new CustomerAddress(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.Country = expected; - actual = target.Country; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for City - /// - [TestMethod()] - public void CityTest() - { - CustomerAddress target = new CustomerAddress(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.City = expected; - actual = target.City; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for Address - /// - [TestMethod()] - public void AddressTest() - { - CustomerAddress target = new CustomerAddress(); // TODO: Initialize to an appropriate value - string expected = string.Empty; // TODO: Initialize to an appropriate value - string actual; - target.Address = expected; - actual = target.Address; - Assert.AreEqual(expected, actual); - } - - /// - ///A test for CustomerAddress Constructor - /// - [TestMethod()] - public void CustomerAddressConstructorTest() - { - CustomerAddress target = new CustomerAddress(); - } - - /// - ///A test for CustomerAddress Constructor - /// - [TestMethod()] - public void CustomerAddressConstructorTest1() - { - string customerID = string.Empty; // TODO: Initialize to an appropriate value - string address = string.Empty; // TODO: Initialize to an appropriate value - string city = string.Empty; // TODO: Initialize to an appropriate value - string region = string.Empty; // TODO: Initialize to an appropriate value - string postalCode = string.Empty; // TODO: Initialize to an appropriate value - string country = string.Empty; // TODO: Initialize to an appropriate value - CustomerAddress target = new CustomerAddress(customerID, address, city, region, postalCode, country); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorders2test.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorders2test.cs deleted file mode 100644 index 4a4acb762e169..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorders2test.cs +++ /dev/null @@ -1,73 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for CustomerOrders2Test and is intended - ///to contain all CustomerOrders2Test Unit Tests - /// - [TestClass()] - public class CustomerOrders2Test - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for CustomerOrders2 Constructor - /// - [TestMethod()] - public void CustomerOrders2ConstructorTest() - { - CustomerOrders2 target = new CustomerOrders2(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerordersasynctest.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerordersasynctest.cs deleted file mode 100644 index 99990174a1c9d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerordersasynctest.cs +++ /dev/null @@ -1,83 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for CustomerOrdersAsyncTest and is intended - ///to contain all CustomerOrdersAsyncTest Unit Tests - /// - [TestClass()] - public class CustomerOrdersAsyncTest - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for InitializeComponent - /// - [TestMethod()] - public void InitializeComponentTest() - { - CustomerOrdersAsync target = new CustomerOrdersAsync(); // TODO: Initialize to an appropriate value - target.InitializeComponent(); - } - - /// - ///A test for CustomerOrdersAsync Constructor - /// - [TestMethod()] - public void CustomerOrdersAsyncConstructorTest() - { - CustomerOrdersAsync target = new CustomerOrdersAsync(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderscustomtest.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderscustomtest.cs deleted file mode 100644 index 882915e9af7f1..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderscustomtest.cs +++ /dev/null @@ -1,83 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for CustomerOrdersCustomTest and is intended - ///to contain all CustomerOrdersCustomTest Unit Tests - /// - [TestClass()] - public class CustomerOrdersCustomTest - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for InitializeComponent - /// - [TestMethod()] - public void InitializeComponentTest() - { - CustomerOrdersCustom target = new CustomerOrdersCustom(); // TODO: Initialize to an appropriate value - target.InitializeComponent(); - } - - /// - ///A test for CustomerOrdersCustom Constructor - /// - [TestMethod()] - public void CustomerOrdersCustomConstructorTest() - { - CustomerOrdersCustom target = new CustomerOrdersCustom(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderstest.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderstest.cs deleted file mode 100644 index 0a4d72d4cc793..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderstest.cs +++ /dev/null @@ -1,73 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for CustomerOrdersTest and is intended - ///to contain all CustomerOrdersTest Unit Tests - /// - [TestClass()] - public class CustomerOrdersTest - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for CustomerOrders Constructor - /// - [TestMethod()] - public void CustomerOrdersConstructorTest() - { - CustomerOrders target = new CustomerOrders(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderswpf2test.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderswpf2test.cs deleted file mode 100644 index 791450e3bde18..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderswpf2test.cs +++ /dev/null @@ -1,83 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for CustomerOrdersWpf2Test and is intended - ///to contain all CustomerOrdersWpf2Test Unit Tests - /// - [TestClass()] - public class CustomerOrdersWpf2Test - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for InitializeComponent - /// - [TestMethod()] - public void InitializeComponentTest() - { - CustomerOrdersWpf2 target = new CustomerOrdersWpf2(); // TODO: Initialize to an appropriate value - target.InitializeComponent(); - } - - /// - ///A test for CustomerOrdersWpf2 Constructor - /// - [TestMethod()] - public void CustomerOrdersWpf2ConstructorTest() - { - CustomerOrdersWpf2 target = new CustomerOrdersWpf2(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderswpf3test.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderswpf3test.cs deleted file mode 100644 index 70008c6f6bb0f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderswpf3test.cs +++ /dev/null @@ -1,83 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for CustomerOrdersWpf3Test and is intended - ///to contain all CustomerOrdersWpf3Test Unit Tests - /// - [TestClass()] - public class CustomerOrdersWpf3Test - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for InitializeComponent - /// - [TestMethod()] - public void InitializeComponentTest() - { - CustomerOrdersWpf3 target = new CustomerOrdersWpf3(); // TODO: Initialize to an appropriate value - target.InitializeComponent(); - } - - /// - ///A test for CustomerOrdersWpf3 Constructor - /// - [TestMethod()] - public void CustomerOrdersWpf3ConstructorTest() - { - CustomerOrdersWpf3 target = new CustomerOrdersWpf3(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderswpftest.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderswpftest.cs deleted file mode 100644 index be9cbc760efb8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/customerorderswpftest.cs +++ /dev/null @@ -1,83 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for CustomerOrdersWpfTest and is intended - ///to contain all CustomerOrdersWpfTest Unit Tests - /// - [TestClass()] - public class CustomerOrdersWpfTest - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for InitializeComponent - /// - [TestMethod()] - public void InitializeComponentTest() - { - CustomerOrdersWpf target = new CustomerOrdersWpf(); // TODO: Initialize to an appropriate value - target.InitializeComponent(); - } - - /// - ///A test for CustomerOrdersWpf Constructor - /// - [TestMethod()] - public void CustomerOrdersWpfConstructorTest() - { - CustomerOrdersWpf target = new CustomerOrdersWpf(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/properties/assemblyinfo.cs deleted file mode 100644 index e1f2ab9d432a0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/properties/assemblyinfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AstoriaSnippetsCS")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("AstoriaSnippetsCS")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM componenets. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b2436947-10c7-4743-bba4-20ff418a9e62")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/salesorderstest.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/salesorderstest.cs deleted file mode 100644 index e84e380a01056..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/salesorderstest.cs +++ /dev/null @@ -1,83 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for SalesOrdersTest and is intended - ///to contain all SalesOrdersTest Unit Tests - /// - [TestClass()] - public class SalesOrdersTest - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for InitializeComponent - /// - [TestMethod()] - public void InitializeComponentTest() - { - SalesOrders target = new SalesOrders(); // TODO: Initialize to an appropriate value - target.InitializeComponent(); - } - - /// - ///A test for SalesOrders Constructor - /// - [TestMethod()] - public void SalesOrdersConstructorTest() - { - SalesOrders target = new SalesOrders(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/sourcetest.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/sourcetest.cs deleted file mode 100644 index d9e86a1fc22e3..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/astoriasnippetscs/sourcetest.cs +++ /dev/null @@ -1,534 +0,0 @@ -using NorthwindClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; - -namespace AstoriaSnippetsCS -{ - - /// - ///This is a test class for SourceTest and is intended - ///to contain all SourceTest Unit Tests - /// - [TestClass()] - public class SourceTest - { - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - /// - ///A test for SelectCustomerAddressNonEntity - /// - [TestMethod()] - public void SelectCustomerAddressNonEntityTest() - { - Source.SelectCustomerAddressNonEntity(); - } - - /// - ///A test for SelectCustomerAddress - /// - [TestMethod()] - public void SelectCustomerAddressTest() - { - Source.SelectCustomerAddress(); - } - - /// - ///A test for ProjectWithTransform - /// - [TestMethod()] - [ExpectedException(typeof(ApplicationException))] - public void ProjectWithTransformTest() - { - Source.ProjectWithTransform(); - } - - /// - ///A test for ProjectWithConvertion - /// - [TestMethod()] - public void ProjectWithConvertionTest() - { - Source.ProjectWithConvertion(); - } - - /// - ///A test for ProjectWithConstructor - /// - [TestMethod()] - [ExpectedException(typeof(ApplicationException))] - public void ProjectWithConstructorTest() - { - Source.ProjectWithConstructor(); - } - - /// - ///A test for OrderWithFilter - /// - [TestMethod()] - public void OrderWithFilterTest() - { - Source.OrderWithFilter(); - } - - /// - ///A test for ModifyCustomer - /// - [TestMethod()] - public void ModifyCustomerTest() - { - Source.ModifyCustomer(); - } - - /// - ///A test for LoadRelatedOrderDetails - /// - [TestMethod()] - public void LoadRelatedOrderDetailsTest() - { - Source.LoadRelatedOrderDetails(); - } - - /// - ///A test for LoadRelatedOrderCustomer - /// - [TestMethod()] - public void LoadRelatedOrderCustomerTest() - { - Source.LoadRelatedOrderCustomer(); - } - - /// - ///A test for GetCustomersPagedNested - /// - [TestMethod()] - public void GetCustomersPagedNestedTest() - { - Source.GetCustomersPagedNested(); - } - - /// - ///A test for GetCustomersPaged - /// - [TestMethod()] - public void GetCustomersPagedTest() - { - Source.GetCustomersPaged(); - } - - /// - ///A test for GetAllCustomersQuery - /// - [TestMethod()] - public void GetAllCustomersQueryTest() - { - Source.GetAllCustomersQuery(); - } - - /// - ///A test for GetAllCustomersLinq - /// - [TestMethod()] - public void GetAllCustomersLinqTest() - { - Source.GetAllCustomersLinq(); - } - - /// - ///A test for GetAllCustomersFromContext - /// - [TestMethod()] - public void GetAllCustomersFromContextTest() - { - Source.GetAllCustomersFromContext(); - } - - /// - ///A test for GetAllCustomersExplicit - /// - [TestMethod()] - public void GetAllCustomersExplicitTest() - { - Source.GetAllCustomersExplicit(); - } - - /// - ///A test for GetAllCustomers - /// - [TestMethod()] - public void GetAllCustomersTest() - { - Source.GetAllCustomers(); - } - - /// - ///A test for ExpandOrderDetails - /// - [TestMethod()] - public void ExpandOrderDetailsTest() - { - Source.ExpandOrderDetails(); - } - - /// - ///A test for DeleteProduct - /// - [TestMethod()] - public void DeleteProductTest() - { - Source.DeleteProduct(); - } - - /// - ///A test for CountAllCustomersValueOnly - /// - [TestMethod()] - public void CountAllCustomersValueOnlyTest() - { - Source.CountAllCustomersValueOnly(); - } - - /// - ///A test for CountAllCustomers - /// - [TestMethod()] - public void CountAllCustomersTest() - { - Source.CountAllCustomers(); - } - - /// - ///A test for BeginExecuteCustomersQuery - /// - [TestMethod()] - public void BeginExecuteCustomersQueryTest() - { - Source.BeginExecuteCustomersQuery(); - } - - /// - ///A test for BatchQuery - /// - [TestMethod()] - public void BatchQueryTest() - { - Source.BatchQuery(); - } - - /// - ///A test for AttachObject - /// - [TestMethod()] - public void AttachObjectTest() - { - Source.AttachObject(); - } - - /// - ///A test for AddQueryOptionsLinqExpression - /// - [TestMethod()] - public void AddQueryOptionsLinqExpressionTest() - { - Source.AddQueryOptionsLinqExpression(); - } - - /// - ///A test for AddQueryOptionsLinq - /// - [TestMethod()] - public void AddQueryOptionsLinqTest() - { - Source.AddQueryOptionsLinq(); - } - - /// - ///A test for AddQueryOptions - /// - [TestMethod()] - public void AddQueryOptionsTest() - { - Source.AddQueryOptions(); - } - - /// - ///A test for AddProduct - /// - [TestMethod()] - public void AddProductTest() - { - Source.AddProduct(); - } - - /// - ///A test for AddOrderDetailToOrderAuto - /// - [TestMethod()] - public void AddOrderDetailToOrderAutoTest() - { - Source.AddOrderDetailToOrderAuto(); - } - - /// - ///A test for AddOrderDetailToOrder - /// - [TestMethod()] - public void AddOrderDetailToOrderTest() - { - Source.AddOrderDetailToOrder(); - } - - /// - ///A test for LinqWhereClause - /// - [TestMethod()] - public void LinqWhereClauseTest() - { - Source.LinqWhereClause(); - } - - /// - ///A test for LinqWhereMethod - /// - [TestMethod()] - public void LinqWhereMethodTest() - { - Source.LinqWhereMethod(); - } - - /// - ///A test for ExplicitQueryWhereMethod - /// - [TestMethod()] - public void ExplicitQueryWhereMethodTest() - { - Source.ExplicitQueryWhereMethod(); - } - - /// - ///A test for LinqSelectClause - /// - [TestMethod()] - public void LinqSelectClauseTest() - { - Source.LinqSelectClause(); - } - - /// - ///A test for LinqSelectMethod - /// - [TestMethod()] - public void LinqSelectMethodTest() - { - Source.LinqSelectMethod(); - } - - /// - ///A test for LinqMethodPrecedence - /// - [TestMethod()] - public void LinqMethodPrecedenceTest() - { - Source.LinqMethodPrecedence(); - } - - /// - ///A test for LinqQueryPrecedence - /// - [TestMethod()] - public void LinqQueryPrecedenceTest() - { - Source.LinqQueryPrecedence(); - } - - /// - ///A test for ExplicitQueryOrderByMethod - /// - [TestMethod()] - public void ExplicitQueryOrderByMethodTest() - { - Source.ExplicitQueryOrderByMethod(); - } - - /// - ///A test for ExplicitQuerySkipTakeMethod - /// - [TestMethod()] - public void ExplicitQuerySkipTakeMethodTest() - { - Source.ExplicitQuerySkipTakeMethod(); - } - - /// - ///A test for LinqOrderByClause - /// - [TestMethod()] - public void LinqOrderByClauseTest() - { - Source.LinqOrderByClause(); - } - - /// - ///A test for LinqOrderByMethod - /// - [TestMethod()] - public void LinqOrderByMethodTest() - { - Source.LinqOrderByMethod(); - } - - /// - ///A test for LinqQueryClientEval - /// - [TestMethod()] - public void LinqQueryClientEvalTest() - { - Source.LinqQueryClientEval(); - } - - /// - ///A test for LinqQueryExpand - /// - [TestMethod()] - public void LinqQueryExpandTest() - { - Source.LinqQueryExpand(); - } - - /// - ///A test for LinqQueryExpandMethod - /// - [TestMethod()] - public void LinqQueryExpandMethodTest() - { - Source.LinqQueryExpandMethod(); - } - - /// - ///A test for LinqSkipTakeMethod - /// - [TestMethod()] - public void LinqSkipTakeMethodTest() - { - Source.LinqSkipTakeMethod(); - } - - /// - ///A test for RegisterHeadersQuery - /// - [TestMethod()] - public void RegisterHeadersQueryTest() - { - Source.RegisterHeadersQuery(); - } - - /// - ///A test for CallServiceOperationAsync - /// - [TestMethod()] - public void CallServiceOperationAsyncTest() - { - Source.CallServiceOperationAsync(); - } - - /// - ///A test for CallServiceOperationCreateQuery - /// - [TestMethod()] - public void CallServiceOperationCreateQueryTest() - { - Source.CallServiceOperationCreateQuery(); - } - - /// - ///A test for CallServiceOperationEnumString - /// - [TestMethod()] - public void CallServiceOperationEnumStringTest() - { - Source.CallServiceOperationEnumString(); - } - - /// - ///A test for CallServiceOperationIQueryable - /// - [TestMethod()] - public void CallServiceOperationIQueryableTest() - { - Source.CallServiceOperationIQueryable(); - } - - /// - ///A test for CallServiceOperationSingleEntity - /// - [TestMethod()] - public void CallServiceOperationSingleEntityTest() - { - Source.CallServiceOperationSingleEntity(); - } - - /// - ///A test for CallServiceOperationSingleInt - /// - [TestMethod()] - public void CallServiceOperationSingleIntTest() - { - Source.CallServiceOperationSingleInt(); - } - - /// - ///A test for CallServiceOperationVoid - /// - [TestMethod()] - public void CallServiceOperationVoidTest() - { - Source.CallServiceOperationVoid(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/default.aspx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/default.aspx deleted file mode 100644 index 14813c64ff873..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/default.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="NorthwindDataService._Default" %> - - - - - - - - -
-
- -
-
- - diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/default.aspx.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/default.aspx.cs deleted file mode 100644 index 4384a955c62e5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/default.aspx.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace NorthwindDataService -{ - public partial class _Default : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/default.aspx.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/default.aspx.designer.cs deleted file mode 100644 index 6ad6a425b7651..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/default.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.20604.3 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace NorthwindDataService { - - - public partial class _Default { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.designer.cs deleted file mode 100644 index 783f2bdaa84f4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.designer.cs +++ /dev/null @@ -1,3411 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated from a template. -// -// Manual changes to this file may cause unexpected behavior in your application. -// Manual changes to this file will be overwritten if the code is regenerated. -// -//------------------------------------------------------------------------------ - -using System; -using System.Data.Objects; -using System.Data.Objects.DataClasses; -using System.Data.EntityClient; -using System.ComponentModel; -using System.Xml.Serialization; -using System.Runtime.Serialization; - -[assembly: EdmSchemaAttribute()] -#region EDM Relationship Metadata - -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Products_Categories", "Categories", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindDataService.Category), "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Product), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Orders_Customers", "Customers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindDataService.Customer), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Order), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Employees_Employees", "Employees", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindDataService.Employee), "Employees1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Employee), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Orders_Employees", "Employees", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindDataService.Employee), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Order), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Order_Details_Orders", "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindDataService.Order), "Order_Details", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Order_Detail), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Order_Details_Products", "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindDataService.Product), "Order_Details", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Order_Detail), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Orders_Shippers", "Shippers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindDataService.Shipper), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Order), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Products_Suppliers", "Suppliers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindDataService.Supplier), "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Product), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Territories_Region", "Region", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindDataService.Region), "Territories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Territory), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "CustomerCustomerDemo", "CustomerDemographics", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.CustomerDemographic), "Customers", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Customer))] -[assembly: EdmRelationshipAttribute("NorthwindModel", "EmployeeTerritories", "Employees", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Employee), "Territories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindDataService.Territory))] - -#endregion - -namespace NorthwindDataService -{ - #region Contexts - - /// - /// No Metadata Documentation available. - /// - public partial class NorthwindEntities : ObjectContext - { - #region Constructors - - /// - /// Initializes a new NorthwindEntities object using the connection string found in the 'NorthwindEntities' section of the application configuration file. - /// - public NorthwindEntities() : base("name=NorthwindEntities", "NorthwindEntities") - { - this.ContextOptions.LazyLoadingEnabled = true; - OnContextCreated(); - } - - /// - /// Initialize a new NorthwindEntities object. - /// - public NorthwindEntities(string connectionString) : base(connectionString, "NorthwindEntities") - { - this.ContextOptions.LazyLoadingEnabled = true; - OnContextCreated(); - } - - /// - /// Initialize a new NorthwindEntities object. - /// - public NorthwindEntities(EntityConnection connection) : base(connection, "NorthwindEntities") - { - this.ContextOptions.LazyLoadingEnabled = true; - OnContextCreated(); - } - - #endregion - - #region Partial Methods - - partial void OnContextCreated(); - - #endregion - - #region ObjectSet Properties - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Categories - { - get - { - if ((_Categories == null)) - { - _Categories = base.CreateObjectSet("Categories"); - } - return _Categories; - } - } - private ObjectSet _Categories; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet CustomerDemographics - { - get - { - if ((_CustomerDemographics == null)) - { - _CustomerDemographics = base.CreateObjectSet("CustomerDemographics"); - } - return _CustomerDemographics; - } - } - private ObjectSet _CustomerDemographics; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Customers - { - get - { - if ((_Customers == null)) - { - _Customers = base.CreateObjectSet("Customers"); - } - return _Customers; - } - } - private ObjectSet _Customers; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Employees - { - get - { - if ((_Employees == null)) - { - _Employees = base.CreateObjectSet("Employees"); - } - return _Employees; - } - } - private ObjectSet _Employees; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Order_Details - { - get - { - if ((_Order_Details == null)) - { - _Order_Details = base.CreateObjectSet("Order_Details"); - } - return _Order_Details; - } - } - private ObjectSet _Order_Details; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Orders - { - get - { - if ((_Orders == null)) - { - _Orders = base.CreateObjectSet("Orders"); - } - return _Orders; - } - } - private ObjectSet _Orders; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Products - { - get - { - if ((_Products == null)) - { - _Products = base.CreateObjectSet("Products"); - } - return _Products; - } - } - private ObjectSet _Products; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Regions - { - get - { - if ((_Regions == null)) - { - _Regions = base.CreateObjectSet("Regions"); - } - return _Regions; - } - } - private ObjectSet _Regions; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Suppliers - { - get - { - if ((_Suppliers == null)) - { - _Suppliers = base.CreateObjectSet("Suppliers"); - } - return _Suppliers; - } - } - private ObjectSet _Suppliers; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Shippers - { - get - { - if ((_Shippers == null)) - { - _Shippers = base.CreateObjectSet("Shippers"); - } - return _Shippers; - } - } - private ObjectSet _Shippers; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Territories - { - get - { - if ((_Territories == null)) - { - _Territories = base.CreateObjectSet("Territories"); - } - return _Territories; - } - } - private ObjectSet _Territories; - - #endregion - #region AddTo Methods - - /// - /// Deprecated Method for adding a new object to the Categories EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToCategories(Category category) - { - base.AddObject("Categories", category); - } - - /// - /// Deprecated Method for adding a new object to the CustomerDemographics EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToCustomerDemographics(CustomerDemographic customerDemographic) - { - base.AddObject("CustomerDemographics", customerDemographic); - } - - /// - /// Deprecated Method for adding a new object to the Customers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToCustomers(Customer customer) - { - base.AddObject("Customers", customer); - } - - /// - /// Deprecated Method for adding a new object to the Employees EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToEmployees(Employee employee) - { - base.AddObject("Employees", employee); - } - - /// - /// Deprecated Method for adding a new object to the Order_Details EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToOrder_Details(Order_Detail order_Detail) - { - base.AddObject("Order_Details", order_Detail); - } - - /// - /// Deprecated Method for adding a new object to the Orders EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToOrders(Order order) - { - base.AddObject("Orders", order); - } - - /// - /// Deprecated Method for adding a new object to the Products EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToProducts(Product product) - { - base.AddObject("Products", product); - } - - /// - /// Deprecated Method for adding a new object to the Regions EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToRegions(Region region) - { - base.AddObject("Regions", region); - } - - /// - /// Deprecated Method for adding a new object to the Suppliers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToSuppliers(Supplier supplier) - { - base.AddObject("Suppliers", supplier); - } - - /// - /// Deprecated Method for adding a new object to the Shippers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToShippers(Shipper shipper) - { - base.AddObject("Shippers", shipper); - } - - /// - /// Deprecated Method for adding a new object to the Territories EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToTerritories(Territory territory) - { - base.AddObject("Territories", territory); - } - - #endregion - } - - - #endregion - - #region Entities - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Category")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Category : EntityObject - { - #region Factory Method - - /// - /// Create a new Category object. - /// - /// Initial value of the CategoryID property. - /// Initial value of the CategoryName property. - public static Category CreateCategory(global::System.Int32 categoryID, global::System.String categoryName) - { - Category category = new Category(); - category.CategoryID = categoryID; - category.CategoryName = categoryName; - return category; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 CategoryID - { - get - { - return _CategoryID; - } - set - { - if (_CategoryID != value) - { - OnCategoryIDChanging(value); - ReportPropertyChanging("CategoryID"); - _CategoryID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("CategoryID"); - OnCategoryIDChanged(); - } - } - } - private global::System.Int32 _CategoryID; - partial void OnCategoryIDChanging(global::System.Int32 value); - partial void OnCategoryIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CategoryName - { - get - { - return _CategoryName; - } - set - { - OnCategoryNameChanging(value); - ReportPropertyChanging("CategoryName"); - _CategoryName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CategoryName"); - OnCategoryNameChanged(); - } - } - private global::System.String _CategoryName; - partial void OnCategoryNameChanging(global::System.String value); - partial void OnCategoryNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Description - { - get - { - return _Description; - } - set - { - OnDescriptionChanging(value); - ReportPropertyChanging("Description"); - _Description = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Description"); - OnDescriptionChanged(); - } - } - private global::System.String _Description; - partial void OnDescriptionChanging(global::System.String value); - partial void OnDescriptionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.Byte[] Picture - { - get - { - return StructuralObject.GetValidValue(_Picture); - } - set - { - OnPictureChanging(value); - ReportPropertyChanging("Picture"); - _Picture = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Picture"); - OnPictureChanged(); - } - } - private global::System.Byte[] _Picture; - partial void OnPictureChanging(global::System.Byte[] value); - partial void OnPictureChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Products_Categories", "Products")] - public EntityCollection Products - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Products_Categories", "Products"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Products_Categories", "Products", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Customer")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Customer : EntityObject - { - #region Factory Method - - /// - /// Create a new Customer object. - /// - /// Initial value of the CustomerID property. - /// Initial value of the CompanyName property. - public static Customer CreateCustomer(global::System.String customerID, global::System.String companyName) - { - Customer customer = new Customer(); - customer.CustomerID = customerID; - customer.CompanyName = companyName; - return customer; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CustomerID - { - get - { - return _CustomerID; - } - set - { - if (_CustomerID != value) - { - OnCustomerIDChanging(value); - ReportPropertyChanging("CustomerID"); - _CustomerID = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CustomerID"); - OnCustomerIDChanged(); - } - } - } - private global::System.String _CustomerID; - partial void OnCustomerIDChanging(global::System.String value); - partial void OnCustomerIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CompanyName - { - get - { - return _CompanyName; - } - set - { - OnCompanyNameChanging(value); - ReportPropertyChanging("CompanyName"); - _CompanyName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CompanyName"); - OnCompanyNameChanged(); - } - } - private global::System.String _CompanyName; - partial void OnCompanyNameChanging(global::System.String value); - partial void OnCompanyNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactName - { - get - { - return _ContactName; - } - set - { - OnContactNameChanging(value); - ReportPropertyChanging("ContactName"); - _ContactName = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactName"); - OnContactNameChanged(); - } - } - private global::System.String _ContactName; - partial void OnContactNameChanging(global::System.String value); - partial void OnContactNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactTitle - { - get - { - return _ContactTitle; - } - set - { - OnContactTitleChanging(value); - ReportPropertyChanging("ContactTitle"); - _ContactTitle = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactTitle"); - OnContactTitleChanged(); - } - } - private global::System.String _ContactTitle; - partial void OnContactTitleChanging(global::System.String value); - partial void OnContactTitleChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Address - { - get - { - return _Address; - } - set - { - OnAddressChanging(value); - ReportPropertyChanging("Address"); - _Address = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Address"); - OnAddressChanged(); - } - } - private global::System.String _Address; - partial void OnAddressChanging(global::System.String value); - partial void OnAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String City - { - get - { - return _City; - } - set - { - OnCityChanging(value); - ReportPropertyChanging("City"); - _City = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("City"); - OnCityChanged(); - } - } - private global::System.String _City; - partial void OnCityChanging(global::System.String value); - partial void OnCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Region - { - get - { - return _Region; - } - set - { - OnRegionChanging(value); - ReportPropertyChanging("Region"); - _Region = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Region"); - OnRegionChanged(); - } - } - private global::System.String _Region; - partial void OnRegionChanging(global::System.String value); - partial void OnRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String PostalCode - { - get - { - return _PostalCode; - } - set - { - OnPostalCodeChanging(value); - ReportPropertyChanging("PostalCode"); - _PostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("PostalCode"); - OnPostalCodeChanged(); - } - } - private global::System.String _PostalCode; - partial void OnPostalCodeChanging(global::System.String value); - partial void OnPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Country - { - get - { - return _Country; - } - set - { - OnCountryChanging(value); - ReportPropertyChanging("Country"); - _Country = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Country"); - OnCountryChanged(); - } - } - private global::System.String _Country; - partial void OnCountryChanging(global::System.String value); - partial void OnCountryChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Phone - { - get - { - return _Phone; - } - set - { - OnPhoneChanging(value); - ReportPropertyChanging("Phone"); - _Phone = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Phone"); - OnPhoneChanged(); - } - } - private global::System.String _Phone; - partial void OnPhoneChanging(global::System.String value); - partial void OnPhoneChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Fax - { - get - { - return _Fax; - } - set - { - OnFaxChanging(value); - ReportPropertyChanging("Fax"); - _Fax = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Fax"); - OnFaxChanged(); - } - } - private global::System.String _Fax; - partial void OnFaxChanging(global::System.String value); - partial void OnFaxChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Customers", "Orders")] - public EntityCollection Orders - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Orders_Customers", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Orders_Customers", "Orders", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "CustomerCustomerDemo", "CustomerDemographics")] - public EntityCollection CustomerDemographics - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.CustomerCustomerDemo", "CustomerDemographics"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.CustomerCustomerDemo", "CustomerDemographics", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="CustomerDemographic")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class CustomerDemographic : EntityObject - { - #region Factory Method - - /// - /// Create a new CustomerDemographic object. - /// - /// Initial value of the CustomerTypeID property. - public static CustomerDemographic CreateCustomerDemographic(global::System.String customerTypeID) - { - CustomerDemographic customerDemographic = new CustomerDemographic(); - customerDemographic.CustomerTypeID = customerTypeID; - return customerDemographic; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CustomerTypeID - { - get - { - return _CustomerTypeID; - } - set - { - if (_CustomerTypeID != value) - { - OnCustomerTypeIDChanging(value); - ReportPropertyChanging("CustomerTypeID"); - _CustomerTypeID = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CustomerTypeID"); - OnCustomerTypeIDChanged(); - } - } - } - private global::System.String _CustomerTypeID; - partial void OnCustomerTypeIDChanging(global::System.String value); - partial void OnCustomerTypeIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String CustomerDesc - { - get - { - return _CustomerDesc; - } - set - { - OnCustomerDescChanging(value); - ReportPropertyChanging("CustomerDesc"); - _CustomerDesc = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("CustomerDesc"); - OnCustomerDescChanged(); - } - } - private global::System.String _CustomerDesc; - partial void OnCustomerDescChanging(global::System.String value); - partial void OnCustomerDescChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "CustomerCustomerDemo", "Customers")] - public EntityCollection Customers - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.CustomerCustomerDemo", "Customers"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.CustomerCustomerDemo", "Customers", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Employee")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Employee : EntityObject - { - #region Factory Method - - /// - /// Create a new Employee object. - /// - /// Initial value of the EmployeeID property. - /// Initial value of the LastName property. - /// Initial value of the FirstName property. - public static Employee CreateEmployee(global::System.Int32 employeeID, global::System.String lastName, global::System.String firstName) - { - Employee employee = new Employee(); - employee.EmployeeID = employeeID; - employee.LastName = lastName; - employee.FirstName = firstName; - return employee; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 EmployeeID - { - get - { - return _EmployeeID; - } - set - { - if (_EmployeeID != value) - { - OnEmployeeIDChanging(value); - ReportPropertyChanging("EmployeeID"); - _EmployeeID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("EmployeeID"); - OnEmployeeIDChanged(); - } - } - } - private global::System.Int32 _EmployeeID; - partial void OnEmployeeIDChanging(global::System.Int32 value); - partial void OnEmployeeIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String LastName - { - get - { - return _LastName; - } - set - { - OnLastNameChanging(value); - ReportPropertyChanging("LastName"); - _LastName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("LastName"); - OnLastNameChanged(); - } - } - private global::System.String _LastName; - partial void OnLastNameChanging(global::System.String value); - partial void OnLastNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String FirstName - { - get - { - return _FirstName; - } - set - { - OnFirstNameChanging(value); - ReportPropertyChanging("FirstName"); - _FirstName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("FirstName"); - OnFirstNameChanged(); - } - } - private global::System.String _FirstName; - partial void OnFirstNameChanging(global::System.String value); - partial void OnFirstNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Title - { - get - { - return _Title; - } - set - { - OnTitleChanging(value); - ReportPropertyChanging("Title"); - _Title = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Title"); - OnTitleChanged(); - } - } - private global::System.String _Title; - partial void OnTitleChanging(global::System.String value); - partial void OnTitleChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String TitleOfCourtesy - { - get - { - return _TitleOfCourtesy; - } - set - { - OnTitleOfCourtesyChanging(value); - ReportPropertyChanging("TitleOfCourtesy"); - _TitleOfCourtesy = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("TitleOfCourtesy"); - OnTitleOfCourtesyChanged(); - } - } - private global::System.String _TitleOfCourtesy; - partial void OnTitleOfCourtesyChanging(global::System.String value); - partial void OnTitleOfCourtesyChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable BirthDate - { - get - { - return _BirthDate; - } - set - { - OnBirthDateChanging(value); - ReportPropertyChanging("BirthDate"); - _BirthDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("BirthDate"); - OnBirthDateChanged(); - } - } - private Nullable _BirthDate; - partial void OnBirthDateChanging(Nullable value); - partial void OnBirthDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable HireDate - { - get - { - return _HireDate; - } - set - { - OnHireDateChanging(value); - ReportPropertyChanging("HireDate"); - _HireDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("HireDate"); - OnHireDateChanged(); - } - } - private Nullable _HireDate; - partial void OnHireDateChanging(Nullable value); - partial void OnHireDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Address - { - get - { - return _Address; - } - set - { - OnAddressChanging(value); - ReportPropertyChanging("Address"); - _Address = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Address"); - OnAddressChanged(); - } - } - private global::System.String _Address; - partial void OnAddressChanging(global::System.String value); - partial void OnAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String City - { - get - { - return _City; - } - set - { - OnCityChanging(value); - ReportPropertyChanging("City"); - _City = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("City"); - OnCityChanged(); - } - } - private global::System.String _City; - partial void OnCityChanging(global::System.String value); - partial void OnCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Region - { - get - { - return _Region; - } - set - { - OnRegionChanging(value); - ReportPropertyChanging("Region"); - _Region = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Region"); - OnRegionChanged(); - } - } - private global::System.String _Region; - partial void OnRegionChanging(global::System.String value); - partial void OnRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String PostalCode - { - get - { - return _PostalCode; - } - set - { - OnPostalCodeChanging(value); - ReportPropertyChanging("PostalCode"); - _PostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("PostalCode"); - OnPostalCodeChanged(); - } - } - private global::System.String _PostalCode; - partial void OnPostalCodeChanging(global::System.String value); - partial void OnPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Country - { - get - { - return _Country; - } - set - { - OnCountryChanging(value); - ReportPropertyChanging("Country"); - _Country = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Country"); - OnCountryChanged(); - } - } - private global::System.String _Country; - partial void OnCountryChanging(global::System.String value); - partial void OnCountryChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String HomePhone - { - get - { - return _HomePhone; - } - set - { - OnHomePhoneChanging(value); - ReportPropertyChanging("HomePhone"); - _HomePhone = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("HomePhone"); - OnHomePhoneChanged(); - } - } - private global::System.String _HomePhone; - partial void OnHomePhoneChanging(global::System.String value); - partial void OnHomePhoneChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Extension - { - get - { - return _Extension; - } - set - { - OnExtensionChanging(value); - ReportPropertyChanging("Extension"); - _Extension = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Extension"); - OnExtensionChanged(); - } - } - private global::System.String _Extension; - partial void OnExtensionChanging(global::System.String value); - partial void OnExtensionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.Byte[] Photo - { - get - { - return StructuralObject.GetValidValue(_Photo); - } - set - { - OnPhotoChanging(value); - ReportPropertyChanging("Photo"); - _Photo = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Photo"); - OnPhotoChanged(); - } - } - private global::System.Byte[] _Photo; - partial void OnPhotoChanging(global::System.Byte[] value); - partial void OnPhotoChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Notes - { - get - { - return _Notes; - } - set - { - OnNotesChanging(value); - ReportPropertyChanging("Notes"); - _Notes = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Notes"); - OnNotesChanged(); - } - } - private global::System.String _Notes; - partial void OnNotesChanging(global::System.String value); - partial void OnNotesChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ReportsTo - { - get - { - return _ReportsTo; - } - set - { - OnReportsToChanging(value); - ReportPropertyChanging("ReportsTo"); - _ReportsTo = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ReportsTo"); - OnReportsToChanged(); - } - } - private Nullable _ReportsTo; - partial void OnReportsToChanging(Nullable value); - partial void OnReportsToChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String PhotoPath - { - get - { - return _PhotoPath; - } - set - { - OnPhotoPathChanging(value); - ReportPropertyChanging("PhotoPath"); - _PhotoPath = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("PhotoPath"); - OnPhotoPathChanged(); - } - } - private global::System.String _PhotoPath; - partial void OnPhotoPathChanging(global::System.String value); - partial void OnPhotoPathChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Employees_Employees", "Employees1")] - public EntityCollection Employees1 - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Employees_Employees", "Employees1"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Employees_Employees", "Employees1", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Employees_Employees", "Employees")] - public Employee Employee1 - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Employees_Employees", "Employees").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Employees_Employees", "Employees").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference Employee1Reference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Employees_Employees", "Employees"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Employees_Employees", "Employees", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Employees", "Orders")] - public EntityCollection Orders - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Orders_Employees", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Orders_Employees", "Orders", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "EmployeeTerritories", "Territories")] - public EntityCollection Territories - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.EmployeeTerritories", "Territories"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.EmployeeTerritories", "Territories", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Order")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Order : EntityObject - { - #region Factory Method - - /// - /// Create a new Order object. - /// - /// Initial value of the OrderID property. - public static Order CreateOrder(global::System.Int32 orderID) - { - Order order = new Order(); - order.OrderID = orderID; - return order; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 OrderID - { - get - { - return _OrderID; - } - set - { - if (_OrderID != value) - { - OnOrderIDChanging(value); - ReportPropertyChanging("OrderID"); - _OrderID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("OrderID"); - OnOrderIDChanged(); - } - } - } - private global::System.Int32 _OrderID; - partial void OnOrderIDChanging(global::System.Int32 value); - partial void OnOrderIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String CustomerID - { - get - { - return _CustomerID; - } - set - { - OnCustomerIDChanging(value); - ReportPropertyChanging("CustomerID"); - _CustomerID = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("CustomerID"); - OnCustomerIDChanged(); - } - } - private global::System.String _CustomerID; - partial void OnCustomerIDChanging(global::System.String value); - partial void OnCustomerIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable EmployeeID - { - get - { - return _EmployeeID; - } - set - { - OnEmployeeIDChanging(value); - ReportPropertyChanging("EmployeeID"); - _EmployeeID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("EmployeeID"); - OnEmployeeIDChanged(); - } - } - private Nullable _EmployeeID; - partial void OnEmployeeIDChanging(Nullable value); - partial void OnEmployeeIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable OrderDate - { - get - { - return _OrderDate; - } - set - { - OnOrderDateChanging(value); - ReportPropertyChanging("OrderDate"); - _OrderDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("OrderDate"); - OnOrderDateChanged(); - } - } - private Nullable _OrderDate; - partial void OnOrderDateChanging(Nullable value); - partial void OnOrderDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable RequiredDate - { - get - { - return _RequiredDate; - } - set - { - OnRequiredDateChanging(value); - ReportPropertyChanging("RequiredDate"); - _RequiredDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("RequiredDate"); - OnRequiredDateChanged(); - } - } - private Nullable _RequiredDate; - partial void OnRequiredDateChanging(Nullable value); - partial void OnRequiredDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ShippedDate - { - get - { - return _ShippedDate; - } - set - { - OnShippedDateChanging(value); - ReportPropertyChanging("ShippedDate"); - _ShippedDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ShippedDate"); - OnShippedDateChanged(); - } - } - private Nullable _ShippedDate; - partial void OnShippedDateChanging(Nullable value); - partial void OnShippedDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ShipVia - { - get - { - return _ShipVia; - } - set - { - OnShipViaChanging(value); - ReportPropertyChanging("ShipVia"); - _ShipVia = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ShipVia"); - OnShipViaChanged(); - } - } - private Nullable _ShipVia; - partial void OnShipViaChanging(Nullable value); - partial void OnShipViaChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable Freight - { - get - { - return _Freight; - } - set - { - OnFreightChanging(value); - ReportPropertyChanging("Freight"); - _Freight = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Freight"); - OnFreightChanged(); - } - } - private Nullable _Freight; - partial void OnFreightChanging(Nullable value); - partial void OnFreightChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipName - { - get - { - return _ShipName; - } - set - { - OnShipNameChanging(value); - ReportPropertyChanging("ShipName"); - _ShipName = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipName"); - OnShipNameChanged(); - } - } - private global::System.String _ShipName; - partial void OnShipNameChanging(global::System.String value); - partial void OnShipNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipAddress - { - get - { - return _ShipAddress; - } - set - { - OnShipAddressChanging(value); - ReportPropertyChanging("ShipAddress"); - _ShipAddress = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipAddress"); - OnShipAddressChanged(); - } - } - private global::System.String _ShipAddress; - partial void OnShipAddressChanging(global::System.String value); - partial void OnShipAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipCity - { - get - { - return _ShipCity; - } - set - { - OnShipCityChanging(value); - ReportPropertyChanging("ShipCity"); - _ShipCity = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipCity"); - OnShipCityChanged(); - } - } - private global::System.String _ShipCity; - partial void OnShipCityChanging(global::System.String value); - partial void OnShipCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipRegion - { - get - { - return _ShipRegion; - } - set - { - OnShipRegionChanging(value); - ReportPropertyChanging("ShipRegion"); - _ShipRegion = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipRegion"); - OnShipRegionChanged(); - } - } - private global::System.String _ShipRegion; - partial void OnShipRegionChanging(global::System.String value); - partial void OnShipRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipPostalCode - { - get - { - return _ShipPostalCode; - } - set - { - OnShipPostalCodeChanging(value); - ReportPropertyChanging("ShipPostalCode"); - _ShipPostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipPostalCode"); - OnShipPostalCodeChanged(); - } - } - private global::System.String _ShipPostalCode; - partial void OnShipPostalCodeChanging(global::System.String value); - partial void OnShipPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipCountry - { - get - { - return _ShipCountry; - } - set - { - OnShipCountryChanging(value); - ReportPropertyChanging("ShipCountry"); - _ShipCountry = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipCountry"); - OnShipCountryChanged(); - } - } - private global::System.String _ShipCountry; - partial void OnShipCountryChanging(global::System.String value); - partial void OnShipCountryChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Customers", "Customers")] - public Customer Customer - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference CustomerReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Employees", "Employees")] - public Employee Employee - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Employees", "Employees").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Employees", "Employees").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference EmployeeReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Employees", "Employees"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Orders_Employees", "Employees", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Orders", "Order_Details")] - public EntityCollection Order_Details - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Order_Details_Orders", "Order_Details"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Order_Details_Orders", "Order_Details", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Shippers", "Shippers")] - public Shipper Shipper - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Shippers", "Shippers").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Shippers", "Shippers").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference ShipperReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Shippers", "Shippers"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Orders_Shippers", "Shippers", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Order_Detail")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Order_Detail : EntityObject - { - #region Factory Method - - /// - /// Create a new Order_Detail object. - /// - /// Initial value of the OrderID property. - /// Initial value of the ProductID property. - /// Initial value of the UnitPrice property. - /// Initial value of the Quantity property. - /// Initial value of the Discount property. - public static Order_Detail CreateOrder_Detail(global::System.Int32 orderID, global::System.Int32 productID, global::System.Decimal unitPrice, global::System.Int16 quantity, global::System.Single discount) - { - Order_Detail order_Detail = new Order_Detail(); - order_Detail.OrderID = orderID; - order_Detail.ProductID = productID; - order_Detail.UnitPrice = unitPrice; - order_Detail.Quantity = quantity; - order_Detail.Discount = discount; - return order_Detail; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 OrderID - { - get - { - return _OrderID; - } - set - { - if (_OrderID != value) - { - OnOrderIDChanging(value); - ReportPropertyChanging("OrderID"); - _OrderID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("OrderID"); - OnOrderIDChanged(); - } - } - } - private global::System.Int32 _OrderID; - partial void OnOrderIDChanging(global::System.Int32 value); - partial void OnOrderIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 ProductID - { - get - { - return _ProductID; - } - set - { - if (_ProductID != value) - { - OnProductIDChanging(value); - ReportPropertyChanging("ProductID"); - _ProductID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ProductID"); - OnProductIDChanged(); - } - } - } - private global::System.Int32 _ProductID; - partial void OnProductIDChanging(global::System.Int32 value); - partial void OnProductIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Decimal UnitPrice - { - get - { - return _UnitPrice; - } - set - { - OnUnitPriceChanging(value); - ReportPropertyChanging("UnitPrice"); - _UnitPrice = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitPrice"); - OnUnitPriceChanged(); - } - } - private global::System.Decimal _UnitPrice; - partial void OnUnitPriceChanging(global::System.Decimal value); - partial void OnUnitPriceChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int16 Quantity - { - get - { - return _Quantity; - } - set - { - OnQuantityChanging(value); - ReportPropertyChanging("Quantity"); - _Quantity = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Quantity"); - OnQuantityChanged(); - } - } - private global::System.Int16 _Quantity; - partial void OnQuantityChanging(global::System.Int16 value); - partial void OnQuantityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Single Discount - { - get - { - return _Discount; - } - set - { - OnDiscountChanging(value); - ReportPropertyChanging("Discount"); - _Discount = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Discount"); - OnDiscountChanged(); - } - } - private global::System.Single _Discount; - partial void OnDiscountChanging(global::System.Single value); - partial void OnDiscountChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Orders", "Orders")] - public Order Order - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference OrderReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Products", "Products")] - public Product Product - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference ProductReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Product")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Product : EntityObject - { - #region Factory Method - - /// - /// Create a new Product object. - /// - /// Initial value of the ProductID property. - /// Initial value of the ProductName property. - /// Initial value of the Discontinued property. - public static Product CreateProduct(global::System.Int32 productID, global::System.String productName, global::System.Boolean discontinued) - { - Product product = new Product(); - product.ProductID = productID; - product.ProductName = productName; - product.Discontinued = discontinued; - return product; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 ProductID - { - get - { - return _ProductID; - } - set - { - if (_ProductID != value) - { - OnProductIDChanging(value); - ReportPropertyChanging("ProductID"); - _ProductID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ProductID"); - OnProductIDChanged(); - } - } - } - private global::System.Int32 _ProductID; - partial void OnProductIDChanging(global::System.Int32 value); - partial void OnProductIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String ProductName - { - get - { - return _ProductName; - } - set - { - OnProductNameChanging(value); - ReportPropertyChanging("ProductName"); - _ProductName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("ProductName"); - OnProductNameChanged(); - } - } - private global::System.String _ProductName; - partial void OnProductNameChanging(global::System.String value); - partial void OnProductNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable SupplierID - { - get - { - return _SupplierID; - } - set - { - OnSupplierIDChanging(value); - ReportPropertyChanging("SupplierID"); - _SupplierID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("SupplierID"); - OnSupplierIDChanged(); - } - } - private Nullable _SupplierID; - partial void OnSupplierIDChanging(Nullable value); - partial void OnSupplierIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable CategoryID - { - get - { - return _CategoryID; - } - set - { - OnCategoryIDChanging(value); - ReportPropertyChanging("CategoryID"); - _CategoryID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("CategoryID"); - OnCategoryIDChanged(); - } - } - private Nullable _CategoryID; - partial void OnCategoryIDChanging(Nullable value); - partial void OnCategoryIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String QuantityPerUnit - { - get - { - return _QuantityPerUnit; - } - set - { - OnQuantityPerUnitChanging(value); - ReportPropertyChanging("QuantityPerUnit"); - _QuantityPerUnit = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("QuantityPerUnit"); - OnQuantityPerUnitChanged(); - } - } - private global::System.String _QuantityPerUnit; - partial void OnQuantityPerUnitChanging(global::System.String value); - partial void OnQuantityPerUnitChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable UnitPrice - { - get - { - return _UnitPrice; - } - set - { - OnUnitPriceChanging(value); - ReportPropertyChanging("UnitPrice"); - _UnitPrice = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitPrice"); - OnUnitPriceChanged(); - } - } - private Nullable _UnitPrice; - partial void OnUnitPriceChanging(Nullable value); - partial void OnUnitPriceChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable UnitsInStock - { - get - { - return _UnitsInStock; - } - set - { - OnUnitsInStockChanging(value); - ReportPropertyChanging("UnitsInStock"); - _UnitsInStock = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitsInStock"); - OnUnitsInStockChanged(); - } - } - private Nullable _UnitsInStock; - partial void OnUnitsInStockChanging(Nullable value); - partial void OnUnitsInStockChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable UnitsOnOrder - { - get - { - return _UnitsOnOrder; - } - set - { - OnUnitsOnOrderChanging(value); - ReportPropertyChanging("UnitsOnOrder"); - _UnitsOnOrder = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitsOnOrder"); - OnUnitsOnOrderChanged(); - } - } - private Nullable _UnitsOnOrder; - partial void OnUnitsOnOrderChanging(Nullable value); - partial void OnUnitsOnOrderChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ReorderLevel - { - get - { - return _ReorderLevel; - } - set - { - OnReorderLevelChanging(value); - ReportPropertyChanging("ReorderLevel"); - _ReorderLevel = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ReorderLevel"); - OnReorderLevelChanged(); - } - } - private Nullable _ReorderLevel; - partial void OnReorderLevelChanging(Nullable value); - partial void OnReorderLevelChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Boolean Discontinued - { - get - { - return _Discontinued; - } - set - { - OnDiscontinuedChanging(value); - ReportPropertyChanging("Discontinued"); - _Discontinued = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Discontinued"); - OnDiscontinuedChanged(); - } - } - private global::System.Boolean _Discontinued; - partial void OnDiscontinuedChanging(global::System.Boolean value); - partial void OnDiscontinuedChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Products_Categories", "Categories")] - public Category Category - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Categories", "Categories").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Categories", "Categories").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference CategoryReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Categories", "Categories"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Products_Categories", "Categories", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Products", "Order_Details")] - public EntityCollection Order_Details - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Order_Details_Products", "Order_Details"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Order_Details_Products", "Order_Details", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Products_Suppliers", "Suppliers")] - public Supplier Supplier - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Suppliers", "Suppliers").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Suppliers", "Suppliers").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference SupplierReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Suppliers", "Suppliers"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Products_Suppliers", "Suppliers", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Region")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Region : EntityObject - { - #region Factory Method - - /// - /// Create a new Region object. - /// - /// Initial value of the RegionID property. - /// Initial value of the RegionDescription property. - public static Region CreateRegion(global::System.Int32 regionID, global::System.String regionDescription) - { - Region region = new Region(); - region.RegionID = regionID; - region.RegionDescription = regionDescription; - return region; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 RegionID - { - get - { - return _RegionID; - } - set - { - if (_RegionID != value) - { - OnRegionIDChanging(value); - ReportPropertyChanging("RegionID"); - _RegionID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("RegionID"); - OnRegionIDChanged(); - } - } - } - private global::System.Int32 _RegionID; - partial void OnRegionIDChanging(global::System.Int32 value); - partial void OnRegionIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String RegionDescription - { - get - { - return _RegionDescription; - } - set - { - OnRegionDescriptionChanging(value); - ReportPropertyChanging("RegionDescription"); - _RegionDescription = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("RegionDescription"); - OnRegionDescriptionChanged(); - } - } - private global::System.String _RegionDescription; - partial void OnRegionDescriptionChanging(global::System.String value); - partial void OnRegionDescriptionChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Territories_Region", "Territories")] - public EntityCollection Territories - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Territories_Region", "Territories"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Territories_Region", "Territories", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Shipper")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Shipper : EntityObject - { - #region Factory Method - - /// - /// Create a new Shipper object. - /// - /// Initial value of the ShipperID property. - /// Initial value of the CompanyName property. - public static Shipper CreateShipper(global::System.Int32 shipperID, global::System.String companyName) - { - Shipper shipper = new Shipper(); - shipper.ShipperID = shipperID; - shipper.CompanyName = companyName; - return shipper; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 ShipperID - { - get - { - return _ShipperID; - } - set - { - if (_ShipperID != value) - { - OnShipperIDChanging(value); - ReportPropertyChanging("ShipperID"); - _ShipperID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ShipperID"); - OnShipperIDChanged(); - } - } - } - private global::System.Int32 _ShipperID; - partial void OnShipperIDChanging(global::System.Int32 value); - partial void OnShipperIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CompanyName - { - get - { - return _CompanyName; - } - set - { - OnCompanyNameChanging(value); - ReportPropertyChanging("CompanyName"); - _CompanyName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CompanyName"); - OnCompanyNameChanged(); - } - } - private global::System.String _CompanyName; - partial void OnCompanyNameChanging(global::System.String value); - partial void OnCompanyNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Phone - { - get - { - return _Phone; - } - set - { - OnPhoneChanging(value); - ReportPropertyChanging("Phone"); - _Phone = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Phone"); - OnPhoneChanged(); - } - } - private global::System.String _Phone; - partial void OnPhoneChanging(global::System.String value); - partial void OnPhoneChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Shippers", "Orders")] - public EntityCollection Orders - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Orders_Shippers", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Orders_Shippers", "Orders", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Supplier")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Supplier : EntityObject - { - #region Factory Method - - /// - /// Create a new Supplier object. - /// - /// Initial value of the SupplierID property. - /// Initial value of the CompanyName property. - public static Supplier CreateSupplier(global::System.Int32 supplierID, global::System.String companyName) - { - Supplier supplier = new Supplier(); - supplier.SupplierID = supplierID; - supplier.CompanyName = companyName; - return supplier; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 SupplierID - { - get - { - return _SupplierID; - } - set - { - if (_SupplierID != value) - { - OnSupplierIDChanging(value); - ReportPropertyChanging("SupplierID"); - _SupplierID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("SupplierID"); - OnSupplierIDChanged(); - } - } - } - private global::System.Int32 _SupplierID; - partial void OnSupplierIDChanging(global::System.Int32 value); - partial void OnSupplierIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CompanyName - { - get - { - return _CompanyName; - } - set - { - OnCompanyNameChanging(value); - ReportPropertyChanging("CompanyName"); - _CompanyName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CompanyName"); - OnCompanyNameChanged(); - } - } - private global::System.String _CompanyName; - partial void OnCompanyNameChanging(global::System.String value); - partial void OnCompanyNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactName - { - get - { - return _ContactName; - } - set - { - OnContactNameChanging(value); - ReportPropertyChanging("ContactName"); - _ContactName = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactName"); - OnContactNameChanged(); - } - } - private global::System.String _ContactName; - partial void OnContactNameChanging(global::System.String value); - partial void OnContactNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactTitle - { - get - { - return _ContactTitle; - } - set - { - OnContactTitleChanging(value); - ReportPropertyChanging("ContactTitle"); - _ContactTitle = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactTitle"); - OnContactTitleChanged(); - } - } - private global::System.String _ContactTitle; - partial void OnContactTitleChanging(global::System.String value); - partial void OnContactTitleChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Address - { - get - { - return _Address; - } - set - { - OnAddressChanging(value); - ReportPropertyChanging("Address"); - _Address = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Address"); - OnAddressChanged(); - } - } - private global::System.String _Address; - partial void OnAddressChanging(global::System.String value); - partial void OnAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String City - { - get - { - return _City; - } - set - { - OnCityChanging(value); - ReportPropertyChanging("City"); - _City = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("City"); - OnCityChanged(); - } - } - private global::System.String _City; - partial void OnCityChanging(global::System.String value); - partial void OnCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Region - { - get - { - return _Region; - } - set - { - OnRegionChanging(value); - ReportPropertyChanging("Region"); - _Region = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Region"); - OnRegionChanged(); - } - } - private global::System.String _Region; - partial void OnRegionChanging(global::System.String value); - partial void OnRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String PostalCode - { - get - { - return _PostalCode; - } - set - { - OnPostalCodeChanging(value); - ReportPropertyChanging("PostalCode"); - _PostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("PostalCode"); - OnPostalCodeChanged(); - } - } - private global::System.String _PostalCode; - partial void OnPostalCodeChanging(global::System.String value); - partial void OnPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Country - { - get - { - return _Country; - } - set - { - OnCountryChanging(value); - ReportPropertyChanging("Country"); - _Country = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Country"); - OnCountryChanged(); - } - } - private global::System.String _Country; - partial void OnCountryChanging(global::System.String value); - partial void OnCountryChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Phone - { - get - { - return _Phone; - } - set - { - OnPhoneChanging(value); - ReportPropertyChanging("Phone"); - _Phone = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Phone"); - OnPhoneChanged(); - } - } - private global::System.String _Phone; - partial void OnPhoneChanging(global::System.String value); - partial void OnPhoneChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Fax - { - get - { - return _Fax; - } - set - { - OnFaxChanging(value); - ReportPropertyChanging("Fax"); - _Fax = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Fax"); - OnFaxChanged(); - } - } - private global::System.String _Fax; - partial void OnFaxChanging(global::System.String value); - partial void OnFaxChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String HomePage - { - get - { - return _HomePage; - } - set - { - OnHomePageChanging(value); - ReportPropertyChanging("HomePage"); - _HomePage = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("HomePage"); - OnHomePageChanged(); - } - } - private global::System.String _HomePage; - partial void OnHomePageChanging(global::System.String value); - partial void OnHomePageChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Products_Suppliers", "Products")] - public EntityCollection Products - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Products_Suppliers", "Products"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Products_Suppliers", "Products", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Territory")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Territory : EntityObject - { - #region Factory Method - - /// - /// Create a new Territory object. - /// - /// Initial value of the TerritoryID property. - /// Initial value of the TerritoryDescription property. - /// Initial value of the RegionID property. - public static Territory CreateTerritory(global::System.String territoryID, global::System.String territoryDescription, global::System.Int32 regionID) - { - Territory territory = new Territory(); - territory.TerritoryID = territoryID; - territory.TerritoryDescription = territoryDescription; - territory.RegionID = regionID; - return territory; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String TerritoryID - { - get - { - return _TerritoryID; - } - set - { - if (_TerritoryID != value) - { - OnTerritoryIDChanging(value); - ReportPropertyChanging("TerritoryID"); - _TerritoryID = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("TerritoryID"); - OnTerritoryIDChanged(); - } - } - } - private global::System.String _TerritoryID; - partial void OnTerritoryIDChanging(global::System.String value); - partial void OnTerritoryIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String TerritoryDescription - { - get - { - return _TerritoryDescription; - } - set - { - OnTerritoryDescriptionChanging(value); - ReportPropertyChanging("TerritoryDescription"); - _TerritoryDescription = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("TerritoryDescription"); - OnTerritoryDescriptionChanged(); - } - } - private global::System.String _TerritoryDescription; - partial void OnTerritoryDescriptionChanging(global::System.String value); - partial void OnTerritoryDescriptionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 RegionID - { - get - { - return _RegionID; - } - set - { - OnRegionIDChanging(value); - ReportPropertyChanging("RegionID"); - _RegionID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("RegionID"); - OnRegionIDChanged(); - } - } - private global::System.Int32 _RegionID; - partial void OnRegionIDChanging(global::System.Int32 value); - partial void OnRegionIDChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Territories_Region", "Region")] - public Region Region - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Territories_Region", "Region").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Territories_Region", "Region").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference RegionReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Territories_Region", "Region"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Territories_Region", "Region", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "EmployeeTerritories", "Employees")] - public EntityCollection Employees - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.EmployeeTerritories", "Employees"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.EmployeeTerritories", "Employees", value); - } - } - } - - #endregion - } - - #endregion - -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.edmx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.edmx deleted file mode 100644 index 8582f5413c047..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.edmx +++ /dev/null @@ -1,985 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.svc b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.svc deleted file mode 100644 index 2de31cc016d55..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.svc +++ /dev/null @@ -1 +0,0 @@ -<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Service="NorthwindDataService.Northwind" %> diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.svc.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.svc.cs deleted file mode 100644 index 1fdfa84fe3bf8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind.svc.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Data.Services; -using System.Linq; -using System.ServiceModel.Web; -using System.Web; -using System.Data.Services.Common; -using System.IO; - -namespace NorthwindDataService -{ - [System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)] - // - public class Northwind : DataService - // - { - // - // This method is called only once to initialize service-wide policies. - public static void InitializeService(DataServiceConfiguration config) - { - // - // Set the access rules of feeds exposed by the data service, which is - // based on the requirements of client applications. - config.SetEntitySetAccessRule("Customers", EntitySetRights.AllRead); - config.SetEntitySetAccessRule("Employees", EntitySetRights.ReadSingle); - config.SetEntitySetAccessRule("Orders", EntitySetRights.All - | EntitySetRights.WriteAppend - | EntitySetRights.WriteMerge); - config.SetEntitySetAccessRule("Order_Details", EntitySetRights.All); - config.SetEntitySetAccessRule("Products", EntitySetRights.All); - // - - // - // Set page size defaults for the data service. - config.SetEntitySetPageSize("Orders", 20); - config.SetEntitySetPageSize("Order_Details", 50); - config.SetEntitySetPageSize("Products", 50); - - // Paging requires v2 of the OData protocol. - config.DataServiceBehavior.MaxProtocolVersion = - System.Data.Services.Common.DataServiceProtocolVersion.V2; - // - } - // - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind2.svc b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind2.svc deleted file mode 100644 index 7cb49c993af29..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind2.svc +++ /dev/null @@ -1,3 +0,0 @@ -<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, -System.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" -Service="NorthwindDataService.Northwind2" %> diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind2.svc.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind2.svc.cs deleted file mode 100644 index 6ea1ea389c210..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwind2.svc.cs +++ /dev/null @@ -1,382 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Services; -using System.Linq; -using System.ServiceModel.Web; -using System.Web; -using System.Data.Services.Common; -// -using System.Linq.Expressions; -// -using System.Reflection; -using System.Data.Objects; -using System.Data; -using System.IO; -using System.Runtime.Serialization; -using System.Xml.Serialization; -using System.ServiceModel; -namespace NorthwindDataService -{ - [ServiceBehavior(IncludeExceptionDetailInFaults = true)] - public class Northwind2 : DataService - { - Northwind2() - { - this.ProcessingPipeline.ProcessingChangeset += new EventHandler(ProcessingPipeline_ProcessingChangeset); - this.ProcessingPipeline.ProcessingRequest += new EventHandler(ProcessingPipeline_ProcessingRequest); - } - - void ProcessingPipeline_ProcessingRequest(object sender, DataServiceProcessingPipelineEventArgs e) - { - HttpRequest req = HttpContext.Current.Request; - - if (req.HttpMethod == "POST" && req.PathInfo == @"/GetCustomerNames") - { - StreamReader reader = new StreamReader(req.InputStream); - string body = reader.ReadToEnd(); - } - } - - void ProcessingPipeline_ProcessingChangeset(object sender, EventArgs e) - { - HttpRequest req = HttpContext.Current.Request; - - if (req.HttpMethod == "POST") - { - StreamReader reader = new StreamReader(req.InputStream); - string body = reader.ReadToEnd(); - } - - //if (HttpContext.Current.Request.HttpMethod == "PUT" | - // HttpContext.Current.Request.HttpMethod == "MERGE") - //{ - // string path = HttpContext.Current.Request.Path; - // string[] sep = new string[]{"(",",",")"}; - // string[] keys = path.Split(sep,StringSplitOptions.RemoveEmptyEntries); - - // List> keyCol = new List>(); - - // for (int i=1; i < keys.Length; i++) - // { - // string[] pairs = keys[i].Split(new char[]{'='}); - // KeyValuePair kv = new KeyValuePair(pairs[0],int.Parse(pairs[1])); - - // keyCol.Add(kv); - // } - - // object entity; - // EntityKey ek = new EntityKey("NorthwindEntities.Order_Details", keyCol); - - // this.CurrentDataSource.TryGetObjectByKey(ek, out entity); - - // Order_Detail item = (Order_Detail)entity; - - // item.Discount = 0.5f; - - // this.CurrentDataSource.SaveChanges(); - - //} - } - - // This method is called only once to initialize service-wide policies. - public static void InitializeService(DataServiceConfiguration config) - { - config.SetEntitySetAccessRule("Employees", EntitySetRights.AllRead); - config.SetEntitySetAccessRule("Customers", EntitySetRights.All); - config.SetEntitySetAccessRule("Orders", EntitySetRights.All); - config.SetEntitySetAccessRule("Order_Details", EntitySetRights.All); - config.SetEntitySetAccessRule("Products", EntitySetRights.All); - config.UseVerboseErrors = true; - config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; - - // - config.SetServiceOperationAccessRule( - "GetOrdersByCity", ServiceOperationRights.AllRead); - // - - config.SetServiceOperationAccessRule("RaiseError", ServiceOperationRights.AllRead); - config.SetServiceOperationAccessRule("GetNewestOrder", ServiceOperationRights.AllRead); - config.SetServiceOperationAccessRule("CountOpenOrders", ServiceOperationRights.AllRead); - config.SetServiceOperationAccessRule("ReturnsNoData", ServiceOperationRights.AllRead); - config.SetServiceOperationAccessRule("GetCustomerNames", ServiceOperationRights.AllRead); - config.SetServiceOperationAccessRule("GetCustomerNamesPost", ServiceOperationRights.AllRead); - config.SetServiceOperationAccessRule("CloneCustomer", ServiceOperationRights.AllRead); - config.SetServiceOperationAccessRule("GetOrdersByState", ServiceOperationRights.AllRead); - config.SetEntitySetPageSize("Customers", 10); - config.SetEntitySetPageSize("Orders", 10); - } - // - // - [WebGet] - public IQueryable GetOrdersByCity(string city) - // - { - if (string.IsNullOrEmpty(city)) - { - throw new ArgumentNullException("city", - "You must provide a value for the parameter'city'."); - } - - // Get the ObjectContext that is the data source for the service. - NorthwindEntities context = this.CurrentDataSource; - - try - { - - var selectedOrders = from order in context.Orders.Include("Order_Details") - where order.Customer.City == city - select order; - - return selectedOrders; - } - catch (Exception ex) - { - throw new ApplicationException(string.Format( - "An error occurred: {0}", ex.Message)); - } - } - // - - [WebGet] - [SingleResult] - public Order GetNewestOrder() - { - // Get the ObjectContext that is the data source for the service. - NorthwindEntities context = this.CurrentDataSource; - - try - { - var orders = from order in context.Orders - where order.OrderDate != null - orderby order.OrderDate descending - select order; - - return orders.First(); - } - catch (Exception ex) - { - throw new ApplicationException(string.Format("An error occurred: {0}", ex.Message)); - } - } - - [WebGet] - public int CountOpenOrders() - { - // Get the ObjectContext that is the data source for the service. - NorthwindEntities context = this.CurrentDataSource; - - try - { - var orders = from order in context.Orders - where order.ShippedDate == null - select order; - - return orders.Count(); - } - catch (Exception ex) - { - throw new ApplicationException(string.Format("An error occurred: {0}", ex.Message)); - } - } - - [WebGet] - public void ReturnsNoData() - { - // This method returns no data (it also doesn't do anything). - } - - // - // - // Define a query interceptor for the Orders entity set. - [QueryInterceptor("Orders")] - public Expression> OnQueryOrders() - // - { - // Filter the returned orders to only orders - // that belong to a customer that is the current user. - return o => o.Customer.ContactName == - HttpContext.Current.User.Identity.Name; - } - // - - // - // - // Define a change interceptor for the Products entity set. - [ChangeInterceptor("Products")] - public void OnChangeProducts(Product product, UpdateOperations operations) - // - { - if (operations == UpdateOperations.Change) - { - System.Data.Objects.ObjectStateEntry entry; - - if (this.CurrentDataSource.ObjectStateManager - .TryGetObjectStateEntry(product, out entry)) - { - // Reject changes to a discontinued Product. - // Because the update is already made to the entity by the time the - // change interceptor in invoked, check the original value of the Discontinued - // property in the state entry and reject the change if 'true'. - if ((bool)entry.OriginalValues["Discontinued"]) - { - throw new DataServiceException(400, string.Format( - "A discontinued {0} cannot be modified.", product.ToString())); - } - } - else - { - throw new DataServiceException(string.Format( - "The requested {0} could not be found in the data source.", product.ToString())); - } - } - else if (operations == UpdateOperations.Delete) - { - // Block the delete and instead set the Discontinued flag. - throw new DataServiceException(400, - "Products cannot be deleted; instead set the Discontinued flag to 'true'"); - } - } - - // - - // - // Override to manage returned exceptions. - protected override void HandleException(HandleExceptionArgs args) - { - // Handle exceptions raised in service operations. - if (args.Exception.GetType() == - typeof(TargetInvocationException) - && args.Exception.InnerException != null) - { - if (args.Exception.InnerException.GetType() - == typeof(DataServiceException)) - { - - // Unpack the DataServiceException. - args.Exception = args.Exception.InnerException as DataServiceException; - } - else - { - // Return a new DataServiceException as "400: bad request." - args.Exception = - new DataServiceException(400, - args.Exception.InnerException.Message); - } - } - } - // - - // - [WebGet] - public void RaiseError() - { - throw new DataServiceException(500, "My custom error message."); - } - // - - [WebInvoke(Method = "POST")] - public IEnumerable GetCustomerNamesPost() - { - // Get the ObjectContext that is the data source for the service. - NorthwindEntities context = this.CurrentDataSource; - - var customers = from cust in context.Customers - orderby cust.ContactName - select cust; - - foreach (Customer cust in customers) - { - yield return cust.ContactName; - } - } - [WebGet] - public IEnumerable GetCustomerNames() - { - // Get the ObjectContext that is the data source for the service. - NorthwindEntities context = this.CurrentDataSource; - - var customers = from cust in context.Customers - orderby cust.ContactName - select cust; - - foreach (Customer cust in customers) - { - yield return cust.ContactName; - } - } - // Used in the Service Operations topic to demo multiple params. - [WebGet] - public IQueryable GetOrdersByState(string state, bool includeItems) - { - if (string.IsNullOrEmpty(state)) - { - throw new ArgumentNullException("state", - "You must provide a value for the parameter'state'."); - } - - // Get the ObjectContext that is the data source for the service. - NorthwindEntities context = this.CurrentDataSource; - - try - { - ObjectQuery selectedOrders = context.Orders; - - if (includeItems) - { - selectedOrders = selectedOrders.Include("Order_Details"); - } - return selectedOrders.Where(o => o.ShipRegion.Equals(state)); - } - catch (Exception ex) - { - throw new ApplicationException(string.Format( - "An error occurred: {0}", ex.Message)); - } - } - -[WebGet] -public Customer CloneCustomer(string serializedCustomer) -{ - NorthwindEntities context = this.CurrentDataSource; - - XmlSerializer xmlSerializer = - new System.Xml.Serialization.XmlSerializer(typeof(Customer)); - - TextReader reader = new StringReader(serializedCustomer); - - // Get a customer created with a property-wise clone - // of the supplied entity, with a new ID. - Customer clone = CloneCustomer(xmlSerializer.Deserialize(reader) as Customer); - - try - { - // Note that this bypasses the service ops restrictions. - context.AddToCustomers(clone); - context.SaveChanges(); - } - catch (Exception ex) - { - throw new DataServiceException( - "The Customer could not be cloned.", ex.GetBaseException()); - } - return clone; -} - - private static Customer CloneCustomer(Customer customer) - { - Customer clone = Customer.CreateCustomer("AAAAA", customer.CompanyName); - clone.Address = customer.Address; - clone.City = customer.City; - clone.CompanyName = customer.CompanyName; - clone.ContactName = customer.ContactName; - clone.ContactTitle = customer.ContactTitle; - clone.Country = customer.Country; - clone.Fax = customer.Fax; - clone.Phone = customer.Phone; - clone.PostalCode = customer.PostalCode; - clone.Region = customer.Region; - - return clone; - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwinddataservicecs.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwinddataservicecs.csproj deleted file mode 100644 index 75d795b7124ff..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwinddataservicecs.csproj +++ /dev/null @@ -1,148 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {98D3AD65-3885-4104-B856-B481EDCA1E0F} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - NorthwindDataService - NorthwindDataService - v4.0 - - - - - 4.0 - - - false - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - 3.5 - - - 3.5 - - - - - - 3.0 - - - - 3.0 - - - 3.5 - - - - - - 3.5 - - - - 3.5 - - - - - - - - - - - - - - - - - Northwind2.svc - - - ASPXCodeBehind - Default.aspx - - - Default.aspx - - - Northwind.svc - - - - - - - - Designer - - - - - - - - Northwind.edmx - EntityModelCodeGenerator - Northwind1.Designer.cs - - - - - - - - - - True - False - 12345 - / - http://localhost/Northwind - False - False - - - False - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwinddataservicecs.csproj.bad.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwinddataservicecs.csproj.bad.csproj deleted file mode 100644 index eea2e7eae709c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/northwinddataservicecs.csproj.bad.csproj +++ /dev/null @@ -1,157 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {98D3AD65-3885-4104-B856-B481EDCA1E0F} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - NorthwindDataService - NorthwindDataService - v4.0 - - - - - 4.0 - - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - 3.5 - - - 3.5 - - - - - - 3.0 - - - - 3.0 - - - 3.5 - - - - - - 3.5 - - - - 3.5 - - - - - - - - - - - - - - - - - Northwind2.svc - - - ASPXCodeBehind - Default.aspx - - - Default.aspx - - - Northwind.svc - - - - True - True - Resources.resx - - - - - - - - - - - - - Northwind.edmx - EntityModelCodeGenerator - Northwind.Designer.cs - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - - - - False - False - 12345 - / - - - False - False - - - False - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/properties/assemblyinfo.cs deleted file mode 100644 index a142f36461bdd..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/properties/assemblyinfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NorthwindDataService")] -[assembly: AssemblyDescription("Example data service for Silverlight")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NorthwindDataService")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/properties/resources.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/properties/resources.designer.cs deleted file mode 100644 index abc7442a64d76..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/properties/resources.designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.21030.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace NorthwindDataService.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NorthwindDataService.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/properties/resources.resx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/properties/resources.resx deleted file mode 100644 index 4fdb1b6aff69b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/properties/resources.resx +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/web.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/web.config deleted file mode 100644 index c9ebfc3973137..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/cs/web.config +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/localtestrun.testrunconfig b/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/localtestrun.testrunconfig deleted file mode 100644 index e18b69b3b8031..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_service/localtestrun.testrunconfig +++ /dev/null @@ -1,5 +0,0 @@ - - - This is a default test run configuration for a local test run. - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image1 b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image1 deleted file mode 100644 index 0a92830bda714..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image1 and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image1_thumb b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image1_thumb deleted file mode 100644 index e527dea5b0a13..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image1_thumb and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image2 b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image2 deleted file mode 100644 index 7967c2fb87d78..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image2 and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image2_thumb b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image2_thumb deleted file mode 100644 index aefd49b0a6509..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image2_thumb and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image3 b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image3 deleted file mode 100644 index c4624135671b9..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image3 and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image3_thumb b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image3_thumb deleted file mode 100644 index 4a3216ae1d08b..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image3_thumb and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image4 b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image4 deleted file mode 100644 index c9f6c2cc359be..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image4 and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image4_thumb b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image4_thumb deleted file mode 100644 index 7a23ce9273aa7..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image4_thumb and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image5 b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image5 deleted file mode 100644 index 8983d7497e25c..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image5 and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image5_thumb b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image5_thumb deleted file mode 100644 index 2a9bb966ac75a..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/app_data/image5_thumb and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/customcompression.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/customcompression.cs deleted file mode 100644 index 07f771d96468e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/customcompression.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using System.ServiceModel; -using System.ServiceModel.Channels; -using System.ServiceModel.Description; -using System.ServiceModel.Dispatcher; -using System.Text; -using System.Xml; - -namespace PhotoService -{ - class CustomCompressionInspector : IDispatchMessageInspector - { - // Assume utf-8, note that Data Services supports - // charset negotation, so this needs to be more - // sophisticated (and per-request) if clients will - // use multiple charsets - private static Encoding encoding = Encoding.UTF8; - - #region IDispatchMessageInspector Members - - public object AfterReceiveRequest(ref System.ServiceModel.Channels.Message request, IClientChannel channel, InstanceContext instanceContext) - { - if (request.Properties.ContainsKey(HttpRequestMessageProperty.Name)) - { - HttpRequestMessageProperty httpmsg = (HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name]; - //UriTemplateMatch match = (UriTemplateMatch)request.Properties["UriTemplateMatchResults"]; - - //string format = match.QueryParameters["$format"]; - //if ("json".Equals(format, StringComparison.InvariantCultureIgnoreCase)) - if (httpmsg.Headers["Compress-Data"] != null) - { - //// strip out $format from the query options to avoid an error - //// due to use of a reserved option (starts with "$") - //match.QueryParameters.Remove("$format"); - - // replace the Accept header so that the Data Services runtime - // assumes the client asked for a JSON representation - if (httpmsg.Headers["Compress-Data"] == "true") - { - httpmsg.Headers["Accept-Encoding"] = "gzip, deflate"; - } - httpmsg.Headers.Remove("Compress-Data"); - - //string callback = match.QueryParameters["$callback"]; - //if (!string.IsNullOrEmpty(callback)) - //{ - // match.QueryParameters.Remove("$callback"); - // return callback; - //} - } - //if ("atom".Equals(format, StringComparison.InvariantCultureIgnoreCase)) - //{ - // // strip out $format from the query options to avoid an error - // // due to use of a reserved option (starts with "$") - // match.QueryParameters.Remove("$format"); - //} - } - return null; - } - - public void BeforeSendReply(ref System.ServiceModel.Channels.Message reply, object correlationState) - { - // if (correlationState != null && correlationState is string) - // { - // // if we have a JSONP callback then buffer the response, wrap it with the - // // callback call and then re-create the response message - - // string callback = (string)correlationState; - - // XmlDictionaryReader reader = reply.GetReaderAtBodyContents(); - // reader.ReadStartElement(); - // string content = CustomCompressionInspector.encoding.GetString(reader.ReadContentAsBase64()); - - // content = callback + "(" + content + ")"; - - // Message newreply = Message.CreateMessage(MessageVersion.None, "", new Writer(content)); - // newreply.Properties.CopyProperties(reply.Properties); - - // reply = newreply; - // } - } - - #endregion - - //class Writer : BodyWriter - //{ - // private string content; - - // public Writer(string content) - // : base(false) - // { - // this.content = content; - // } - - // protected override void OnWriteBodyContents(XmlDictionaryWriter writer) - // { - // writer.WriteStartElement("Binary"); - // byte[] buffer = CustomCompressionInspector.encoding.GetBytes(this.content); - // writer.WriteBase64(buffer, 0, buffer.Length); - // writer.WriteEndElement(); - // } - //} - } - - // Simply apply this attribute to a DataService-derived class to get - // JSONP support in that service - [AttributeUsage(AttributeTargets.Class)] - public class CustomCompressionInspectorAttribute : Attribute, IServiceBehavior - { - #region IServiceBehavior Members - - void IServiceBehavior.AddBindingParameters(ServiceDescription serviceDescription, - ServiceHostBase serviceHostBase, System.Collections.ObjectModel.Collection endpoints, - System.ServiceModel.Channels.BindingParameterCollection bindingParameters) - { - } - - void IServiceBehavior.ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) - { - foreach (ChannelDispatcher cd in serviceHostBase.ChannelDispatchers) - { - foreach (EndpointDispatcher ed in cd.Endpoints) - { - ed.DispatchRuntime.MessageInspectors.Add(new CustomCompressionInspector()); - } - } - } - - void IServiceBehavior.Validate(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) - { - } - - #endregion - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photodata.svc b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photodata.svc deleted file mode 100644 index 7aab949e72241..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photodata.svc +++ /dev/null @@ -1,3 +0,0 @@ - - -<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Service="PhotoService.PhotoData" %> diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photodata.svc.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photodata.svc.cs deleted file mode 100644 index 380373fdf5e3a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photodata.svc.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Services; -using System.Data.Services.Common; -using System.Linq; -using System.ServiceModel.Web; -using System.Web; -using System.Data.Services.Providers; -using PhotoService; -using System.ServiceModel; - -namespace PhotoService -{ - [System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)] - // - public partial class PhotoData : DataService, IServiceProvider - { - // This method is called only once to initialize service-wide policies. - public static void InitializeService(DataServiceConfiguration config) - { - config.SetEntitySetAccessRule("PhotoInfo", - EntitySetRights.ReadMultiple | - EntitySetRights.ReadSingle | - EntitySetRights.AllWrite); - - config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; - } - public object GetService(Type serviceType) - { - if (serviceType == typeof(IDataServiceStreamProvider)) - { - // Return the stream provider to the data service. - return new PhotoServiceStreamProvider(this.CurrentDataSource); - } - - return null; - } - } - // -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photoinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photoinfo.cs deleted file mode 100644 index c9e3e217a27da..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photoinfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace PhotoService -{ - //[System.Data.Services.Common.NamedStream("Thumbnail")] - //public partial class PhotoInfo - //{ - //} -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photoservice.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photoservice.csproj deleted file mode 100644 index 36da20341eb6d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photoservice.csproj +++ /dev/null @@ -1,134 +0,0 @@ - - - - Debug - AnyCPU - - - 2.0 - {318E25FC-1DE8-4E26-A6F9-EA61237A562B} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - PhotoService - PhotoService - v4.0 - false - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - - - - - - - - - - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ServiceMetadata.xml - - - - Designer - - - - - PhotoData.Designer.cs - True - True - PhotoData.edmx - - - PhotoData.svc - - - - - - - - PhotoData.edmx - EntityModelCodeGenerator - PhotoData.Designer.cs - - - - - - - - - - - - - - - True - True - 55963 - / - http://localhost/PhotoService2 - False - False - - - False - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photoservicestreamprovider.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photoservicestreamprovider.cs deleted file mode 100644 index 42cfa241ad710..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/photoservicestreamprovider.cs +++ /dev/null @@ -1,219 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; -using System.Data.Services; -using System.Data.Services.Providers; -using System.Data.Objects; -using System.Web.Hosting; -using System.Drawing; - -namespace PhotoService -{ - class PhotoServiceStreamProvider : IDataServiceStreamProvider, IDisposable - { - private string imageFilePath; - private PhotoInfo cachedEntity; - private PhotoDataContainer context; - - private string tempFile; - - public PhotoServiceStreamProvider(PhotoDataContainer context) - { - this.context = context; - - // Get the physical path to the app_data directory used to store the image files. - imageFilePath = HostingEnvironment.MapPath("~/App_Data/"); - - // Create a temp file to store the new images during POST operations. - tempFile = Path.GetTempFileName(); - } - - #region IDataServiceStreamProvider Members - public void DeleteStream(object entity, DataServiceOperationContext operationContext) - { - PhotoInfo image = entity as PhotoInfo; - if (image == null) - { - throw new DataServiceException(500, "Internal Server Error."); - } - - try - { - // Delete the requested file by using the key value. - File.Delete(imageFilePath + "image" + image.PhotoId.ToString()); - } - catch (IOException ex) - { - throw new DataServiceException("The image could not be found.", ex); - } - } - public Stream GetReadStream(object entity, string etag, bool? - checkETagForEquality, DataServiceOperationContext operationContext) - { - if (checkETagForEquality != null) - { - // This stream provider implementation does not support - // ETag headers for media resources. This means that we do not track - // concurrency for a media resource and last-in wins on updates. - throw new DataServiceException(400, - "This sample service does not support the ETag header for a media resource."); - } - - PhotoInfo image = entity as PhotoInfo; - if (image == null) - { - throw new DataServiceException(500, "Internal Server Error."); - } - - // Build the full path to the stored image file, which includes the entity key. - string fullImageFilePath = imageFilePath + "image" + image.PhotoId; - - if (!File.Exists(fullImageFilePath)) - { - throw new DataServiceException(500, "The image could not be found."); - } - - // Return a stream that contains the requested file. - return new FileStream(fullImageFilePath, FileMode.Open); - } - public Uri GetReadStreamUri(object entity, DataServiceOperationContext operationContext) - { - // Allow the runtime set the URI of the Media Resource. - return null; - } - public string GetStreamContentType(object entity, DataServiceOperationContext operationContext) - { - // Get the PhotoInfo entity instance. - PhotoInfo image = entity as PhotoInfo; - if (image == null) - { - throw new DataServiceException(500, "Internal Server Error."); - } - - return image.ContentType; - } - public string GetStreamETag(object entity, DataServiceOperationContext operationContext) - { - // This sample provider does not support the eTag header with media resources. - // This means that we do not track concurrency for a media resource - // and last-in wins on updates. - return null; - } - public Stream GetWriteStream(object entity, string etag, bool? - checkETagForEquality, DataServiceOperationContext operationContext) - { - if (checkETagForEquality != null) - { - // This stream provider implementation does not support ETags associated with BLOBs. - // This means that we do not track concurrency for a media resource - // and last-in wins on updates. - throw new DataServiceException(400, - "This demo does not support ETags associated with BLOBs"); - } - - PhotoInfo image = entity as PhotoInfo; - - if (image == null) - { - throw new DataServiceException(500, "Internal Server Error: " - + "the Media Link Entry could not be determined."); - } - - // Handle the POST request. - if (operationContext.RequestMethod == "POST") - { - // Set the file name from the Slug header; if we don't have a - // Slug header, just set a temporary name which is overwritten - // by the subsequent MERGE request from the client. - image.FileName = operationContext.RequestHeaders["Slug"] ?? "newFile"; - - // Set the required DateTime values. - image.DateModified = DateTime.Today; - image.DateAdded = DateTime.Today; - - // Set the content type, which cannot be null. - image.ContentType = operationContext.RequestHeaders["Content-Type"]; - - // Cache the current entity to enable us to both create a key based storage file name - // and to maintain transactional integrity in the disposer; we do this only for a POST request. - cachedEntity = image; - - return new FileStream(tempFile, FileMode.Open); - } - // Handle the PUT request - else - { - // Return a stream to write to an existing file. - return new FileStream(imageFilePath + "image" + image.PhotoId.ToString(), - FileMode.Open, FileAccess.Write); - } - } - public string ResolveType(string entitySetName, DataServiceOperationContext operationContext) - { - // We should only be handling PhotoInfo types. - if (entitySetName == "PhotoInfo") - { - return "PhotoService.PhotoInfo"; - } - else - { - // This will raise an DataServiceException. - return null; - } - } - public int StreamBufferSize - { - // Use a buffer size of 64K bytes. - get { return 64000; } - } - #endregion - - #region IDisposable Members - - public void Dispose() - { - // If we have a cached entity, it must be a POST request. - if (cachedEntity != null) - { - string newImageFileName = imageFilePath + "image" + cachedEntity.PhotoId.ToString(); - string newImageThumbnailName = - imageFilePath + "image" + cachedEntity.PhotoId.ToString() + "_thumb"; - - // Get the new entity from the Entity Framework object state manager. - ObjectStateEntry entry = this.context.ObjectStateManager.GetObjectStateEntry(cachedEntity); - - if (entry.State == System.Data.EntityState.Unchanged) - { - // Since the entity was created successfully, move the temp file into the - // storage directory and rename the file based on the new entity key. - File.Move(tempFile, newImageFileName); - - // Delete the temp file. - File.Delete(tempFile); - - // Create a bitmap for the new image. - Bitmap newImage = new Bitmap(newImageFileName); - - // Generate the 100px thumbnail of the image. - Image thumbnail = newImage.GetThumbnailImage(100, 100, null, IntPtr.Zero); - - // Save the thumbnail. - thumbnail.Save(newImageThumbnailName); - } - else - { - // A problem must have occurred when saving the entity to the database, - // so we should delete the entity and temp file. - context.DeleteObject(cachedEntity); - File.Delete(tempFile); - - throw new DataServiceException("An error occurred. The photo could not be saved."); - } - } - } - #endregion - - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/properties/assemblyinfo.cs deleted file mode 100644 index 1976382973863..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/properties/assemblyinfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("PhotoService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("PhotoService")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c23f61d3-cf17-44bd-9f91-901987ce8226")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/settings.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/settings.cs deleted file mode 100644 index 44f6142e36cbe..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/settings.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace PhotoService.Properties { - - // This class allows you to handle specific events on the settings class: - // The SettingChanging event is raised before a setting's value is changed. - // The PropertyChanged event is raised after a setting's value is changed. - // The SettingsLoaded event is raised after the setting values are loaded. - // The SettingsSaving event is raised before the setting values are saved. - internal sealed partial class Settings { - - public Settings() { - // // To add event handlers for saving and changing settings, uncomment the lines below: - // - // this.SettingChanging += this.SettingChangingEventHandler; - // - // this.SettingsSaving += this.SettingsSavingEventHandler; - // - } - - private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { - // Add code to handle the SettingChangingEvent event here. - } - - private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { - // Add code to handle the SettingsSaving event here. - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/web.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/web.config deleted file mode 100644 index a40176a3c7496..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/cs/web.config +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/photoservice.sln b/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/photoservice.sln deleted file mode 100644 index 33867bb2283d3..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_photo_streaming_service/photoservice.sln +++ /dev/null @@ -1,65 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhotoService", "CS\PhotoService.csproj", "{318E25FC-1DE8-4E26-A6F9-EA61237A562B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhotoStreamingClient", "..\Astoria Photo Streaming Client\CS\PhotoStreamingClient.csproj", "{455EE0A5-63D5-4380-8B85-8F5BF505BEF0}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PhotoServiceVB", "VB\PhotoServiceVB.vbproj", "{0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PhotoStreamingClientVB", "..\Astoria Photo Streaming Client\VB\PhotoStreamingClientVB.vbproj", "{C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Debug|x86.ActiveCfg = Debug|Any CPU - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Release|Any CPU.Build.0 = Release|Any CPU - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {318E25FC-1DE8-4E26-A6F9-EA61237A562B}.Release|x86.ActiveCfg = Release|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Debug|x86.ActiveCfg = Debug|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Release|Any CPU.Build.0 = Release|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {455EE0A5-63D5-4380-8B85-8F5BF505BEF0}.Release|x86.ActiveCfg = Release|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Debug|x86.ActiveCfg = Debug|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Release|Any CPU.Build.0 = Release|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {0BA53D10-0B84-4735-AF58-9D0C3DFADBFF}.Release|x86.ActiveCfg = Release|Any CPU - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Debug|Any CPU.ActiveCfg = Debug|x86 - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Debug|x86.ActiveCfg = Debug|x86 - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Debug|x86.Build.0 = Debug|x86 - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Release|Any CPU.ActiveCfg = Release|x86 - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Release|Mixed Platforms.Build.0 = Release|x86 - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Release|x86.ActiveCfg = Release|x86 - {C32BFAEA-1BAB-4038-904D-E8E79E4D33AE}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/astoria quickstart.sln b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/astoria quickstart.sln deleted file mode 100644 index f709753009ae2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/astoria quickstart.sln +++ /dev/null @@ -1,66 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NorthwindService", "CS\NorthwindService.csproj", "{66054490-20CD-4CDB-97F2-DBD59D679827}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NorthwindClient", "..\Astoria Quickstart Client\CS\NorthwindClient.csproj", "{77E6890D-9FD2-48AF-8564-90DBAAD03E0B}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NorthwindServiceVB", "VB\NorthwindServiceVB.vbproj", "{ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NorthwindClientVB", "..\Astoria Quickstart Client\VB\NorthwindClientVB.vbproj", "{A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {66054490-20CD-4CDB-97F2-DBD59D679827}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {66054490-20CD-4CDB-97F2-DBD59D679827}.Debug|Any CPU.Build.0 = Debug|Any CPU - {66054490-20CD-4CDB-97F2-DBD59D679827}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {66054490-20CD-4CDB-97F2-DBD59D679827}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {66054490-20CD-4CDB-97F2-DBD59D679827}.Debug|x86.ActiveCfg = Debug|Any CPU - {66054490-20CD-4CDB-97F2-DBD59D679827}.Release|Any CPU.ActiveCfg = Release|Any CPU - {66054490-20CD-4CDB-97F2-DBD59D679827}.Release|Any CPU.Build.0 = Release|Any CPU - {66054490-20CD-4CDB-97F2-DBD59D679827}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {66054490-20CD-4CDB-97F2-DBD59D679827}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {66054490-20CD-4CDB-97F2-DBD59D679827}.Release|x86.ActiveCfg = Release|Any CPU - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Debug|Any CPU.ActiveCfg = Debug|x86 - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Debug|x86.ActiveCfg = Debug|x86 - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Debug|x86.Build.0 = Debug|x86 - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Release|Any CPU.ActiveCfg = Release|x86 - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Release|Mixed Platforms.Build.0 = Release|x86 - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Release|x86.ActiveCfg = Release|x86 - {77E6890D-9FD2-48AF-8564-90DBAAD03E0B}.Release|x86.Build.0 = Release|x86 - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Debug|x86.ActiveCfg = Debug|Any CPU - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Release|Any CPU.Build.0 = Release|Any CPU - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {ED2542F6-3E1A-4AFD-BF35-59B8209B3ADC}.Release|x86.ActiveCfg = Release|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Debug|x86.ActiveCfg = Debug|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Release|Any CPU.Build.0 = Release|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {A5EF00B6-C5BF-4AE7-BD77-1625B30178A3}.Release|x86.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/default.aspx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/default.aspx deleted file mode 100644 index b934434ab1cab..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/default.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="NorthwindService._Default" %> - - - - - - - - -
-
- -
-
- - diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/default.aspx.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/default.aspx.cs deleted file mode 100644 index 554cc45891e6e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/default.aspx.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace NorthwindService -{ - public partial class _Default : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/default.aspx.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/default.aspx.designer.cs deleted file mode 100644 index f8652f9f57a21..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/default.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.20604.3 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace NorthwindService { - - - public partial class _Default { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/genserviceclient.bat b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/genserviceclient.bat deleted file mode 100644 index ffdef82716416..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/genserviceclient.bat +++ /dev/null @@ -1,14 +0,0 @@ -REM -"%windir%\Microsoft.NET\Framework\v4.0.20217\DataSvcUtil.exe" /language:CSharp /out:northwind.cs /uri:http://localhost:12345/Northwind.svc -REM - -REM -"%windir%\Microsoft.NET\Framework\v4.0.20217\DataSvcUtil.exe" /language:CSharp /in:Northwind.csdl /out:northwind.cs -REM - -REM -rem "%windir%\Microsoft.NET\Framework\v4.0.20217\DataSvcUtil.exe" /language:CSharp /in:Northwind.edmx /out:northwind.cs -REM - -pause - diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.cs deleted file mode 100644 index 1a5573ca2fcc6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.cs +++ /dev/null @@ -1,10 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.20217.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.csdl b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.csdl deleted file mode 100644 index 634e251a03dcc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.csdl +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.designer.cs deleted file mode 100644 index 0554724515a4e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.designer.cs +++ /dev/null @@ -1,3411 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated from a template. -// -// Manual changes to this file may cause unexpected behavior in your application. -// Manual changes to this file will be overwritten if the code is regenerated. -// -//------------------------------------------------------------------------------ - -using System; -using System.Data.Objects; -using System.Data.Objects.DataClasses; -using System.Data.EntityClient; -using System.ComponentModel; -using System.Xml.Serialization; -using System.Runtime.Serialization; - -[assembly: EdmSchemaAttribute()] -#region EDM Relationship Metadata - -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Products_Categories", "Categories", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindService.Category), "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Product), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Orders_Customers", "Customers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindService.Customer), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Order), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Employees_Employees", "Employees", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindService.Employee), "Employees1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Employee), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Orders_Employees", "Employees", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindService.Employee), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Order), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Order_Details_Orders", "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindService.Order), "Order_Details", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Order_Detail), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Order_Details_Products", "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindService.Product), "Order_Details", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Order_Detail), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Orders_Shippers", "Shippers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindService.Shipper), "Orders", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Order), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Products_Suppliers", "Suppliers", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(NorthwindService.Supplier), "Products", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Product), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "FK_Territories_Region", "Region", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(NorthwindService.Region), "Territories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Territory), true)] -[assembly: EdmRelationshipAttribute("NorthwindModel", "CustomerCustomerDemo", "CustomerDemographics", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.CustomerDemographic), "Customers", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Customer))] -[assembly: EdmRelationshipAttribute("NorthwindModel", "EmployeeTerritories", "Employees", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Employee), "Territories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(NorthwindService.Territory))] - -#endregion - -namespace NorthwindService -{ - #region Contexts - - /// - /// No Metadata Documentation available. - /// - public partial class NorthwindEntities : ObjectContext - { - #region Constructors - - /// - /// Initializes a new NorthwindEntities object using the connection string found in the 'NorthwindEntities' section of the application configuration file. - /// - public NorthwindEntities() : base("name=NorthwindEntities", "NorthwindEntities") - { - this.ContextOptions.LazyLoadingEnabled = true; - OnContextCreated(); - } - - /// - /// Initialize a new NorthwindEntities object. - /// - public NorthwindEntities(string connectionString) : base(connectionString, "NorthwindEntities") - { - this.ContextOptions.LazyLoadingEnabled = true; - OnContextCreated(); - } - - /// - /// Initialize a new NorthwindEntities object. - /// - public NorthwindEntities(EntityConnection connection) : base(connection, "NorthwindEntities") - { - this.ContextOptions.LazyLoadingEnabled = true; - OnContextCreated(); - } - - #endregion - - #region Partial Methods - - partial void OnContextCreated(); - - #endregion - - #region ObjectSet Properties - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Categories - { - get - { - if ((_Categories == null)) - { - _Categories = base.CreateObjectSet("Categories"); - } - return _Categories; - } - } - private ObjectSet _Categories; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet CustomerDemographics - { - get - { - if ((_CustomerDemographics == null)) - { - _CustomerDemographics = base.CreateObjectSet("CustomerDemographics"); - } - return _CustomerDemographics; - } - } - private ObjectSet _CustomerDemographics; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Customers - { - get - { - if ((_Customers == null)) - { - _Customers = base.CreateObjectSet("Customers"); - } - return _Customers; - } - } - private ObjectSet _Customers; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Employees - { - get - { - if ((_Employees == null)) - { - _Employees = base.CreateObjectSet("Employees"); - } - return _Employees; - } - } - private ObjectSet _Employees; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Order_Details - { - get - { - if ((_Order_Details == null)) - { - _Order_Details = base.CreateObjectSet("Order_Details"); - } - return _Order_Details; - } - } - private ObjectSet _Order_Details; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Orders - { - get - { - if ((_Orders == null)) - { - _Orders = base.CreateObjectSet("Orders"); - } - return _Orders; - } - } - private ObjectSet _Orders; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Products - { - get - { - if ((_Products == null)) - { - _Products = base.CreateObjectSet("Products"); - } - return _Products; - } - } - private ObjectSet _Products; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Regions - { - get - { - if ((_Regions == null)) - { - _Regions = base.CreateObjectSet("Regions"); - } - return _Regions; - } - } - private ObjectSet _Regions; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Suppliers - { - get - { - if ((_Suppliers == null)) - { - _Suppliers = base.CreateObjectSet("Suppliers"); - } - return _Suppliers; - } - } - private ObjectSet _Suppliers; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Shippers - { - get - { - if ((_Shippers == null)) - { - _Shippers = base.CreateObjectSet("Shippers"); - } - return _Shippers; - } - } - private ObjectSet _Shippers; - - /// - /// No Metadata Documentation available. - /// - public ObjectSet Territories - { - get - { - if ((_Territories == null)) - { - _Territories = base.CreateObjectSet("Territories"); - } - return _Territories; - } - } - private ObjectSet _Territories; - - #endregion - #region AddTo Methods - - /// - /// Deprecated Method for adding a new object to the Categories EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToCategories(Category category) - { - base.AddObject("Categories", category); - } - - /// - /// Deprecated Method for adding a new object to the CustomerDemographics EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToCustomerDemographics(CustomerDemographic customerDemographic) - { - base.AddObject("CustomerDemographics", customerDemographic); - } - - /// - /// Deprecated Method for adding a new object to the Customers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToCustomers(Customer customer) - { - base.AddObject("Customers", customer); - } - - /// - /// Deprecated Method for adding a new object to the Employees EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToEmployees(Employee employee) - { - base.AddObject("Employees", employee); - } - - /// - /// Deprecated Method for adding a new object to the Order_Details EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToOrder_Details(Order_Detail order_Detail) - { - base.AddObject("Order_Details", order_Detail); - } - - /// - /// Deprecated Method for adding a new object to the Orders EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToOrders(Order order) - { - base.AddObject("Orders", order); - } - - /// - /// Deprecated Method for adding a new object to the Products EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToProducts(Product product) - { - base.AddObject("Products", product); - } - - /// - /// Deprecated Method for adding a new object to the Regions EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToRegions(Region region) - { - base.AddObject("Regions", region); - } - - /// - /// Deprecated Method for adding a new object to the Suppliers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToSuppliers(Supplier supplier) - { - base.AddObject("Suppliers", supplier); - } - - /// - /// Deprecated Method for adding a new object to the Shippers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToShippers(Shipper shipper) - { - base.AddObject("Shippers", shipper); - } - - /// - /// Deprecated Method for adding a new object to the Territories EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. - /// - public void AddToTerritories(Territory territory) - { - base.AddObject("Territories", territory); - } - - #endregion - } - - - #endregion - - #region Entities - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Category")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Category : EntityObject - { - #region Factory Method - - /// - /// Create a new Category object. - /// - /// Initial value of the CategoryID property. - /// Initial value of the CategoryName property. - public static Category CreateCategory(global::System.Int32 categoryID, global::System.String categoryName) - { - Category category = new Category(); - category.CategoryID = categoryID; - category.CategoryName = categoryName; - return category; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 CategoryID - { - get - { - return _CategoryID; - } - set - { - if (_CategoryID != value) - { - OnCategoryIDChanging(value); - ReportPropertyChanging("CategoryID"); - _CategoryID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("CategoryID"); - OnCategoryIDChanged(); - } - } - } - private global::System.Int32 _CategoryID; - partial void OnCategoryIDChanging(global::System.Int32 value); - partial void OnCategoryIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CategoryName - { - get - { - return _CategoryName; - } - set - { - OnCategoryNameChanging(value); - ReportPropertyChanging("CategoryName"); - _CategoryName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CategoryName"); - OnCategoryNameChanged(); - } - } - private global::System.String _CategoryName; - partial void OnCategoryNameChanging(global::System.String value); - partial void OnCategoryNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Description - { - get - { - return _Description; - } - set - { - OnDescriptionChanging(value); - ReportPropertyChanging("Description"); - _Description = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Description"); - OnDescriptionChanged(); - } - } - private global::System.String _Description; - partial void OnDescriptionChanging(global::System.String value); - partial void OnDescriptionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.Byte[] Picture - { - get - { - return StructuralObject.GetValidValue(_Picture); - } - set - { - OnPictureChanging(value); - ReportPropertyChanging("Picture"); - _Picture = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Picture"); - OnPictureChanged(); - } - } - private global::System.Byte[] _Picture; - partial void OnPictureChanging(global::System.Byte[] value); - partial void OnPictureChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Products_Categories", "Products")] - public EntityCollection Products - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Products_Categories", "Products"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Products_Categories", "Products", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Customer")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Customer : EntityObject - { - #region Factory Method - - /// - /// Create a new Customer object. - /// - /// Initial value of the CustomerID property. - /// Initial value of the CompanyName property. - public static Customer CreateCustomer(global::System.String customerID, global::System.String companyName) - { - Customer customer = new Customer(); - customer.CustomerID = customerID; - customer.CompanyName = companyName; - return customer; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CustomerID - { - get - { - return _CustomerID; - } - set - { - if (_CustomerID != value) - { - OnCustomerIDChanging(value); - ReportPropertyChanging("CustomerID"); - _CustomerID = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CustomerID"); - OnCustomerIDChanged(); - } - } - } - private global::System.String _CustomerID; - partial void OnCustomerIDChanging(global::System.String value); - partial void OnCustomerIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CompanyName - { - get - { - return _CompanyName; - } - set - { - OnCompanyNameChanging(value); - ReportPropertyChanging("CompanyName"); - _CompanyName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CompanyName"); - OnCompanyNameChanged(); - } - } - private global::System.String _CompanyName; - partial void OnCompanyNameChanging(global::System.String value); - partial void OnCompanyNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactName - { - get - { - return _ContactName; - } - set - { - OnContactNameChanging(value); - ReportPropertyChanging("ContactName"); - _ContactName = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactName"); - OnContactNameChanged(); - } - } - private global::System.String _ContactName; - partial void OnContactNameChanging(global::System.String value); - partial void OnContactNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactTitle - { - get - { - return _ContactTitle; - } - set - { - OnContactTitleChanging(value); - ReportPropertyChanging("ContactTitle"); - _ContactTitle = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactTitle"); - OnContactTitleChanged(); - } - } - private global::System.String _ContactTitle; - partial void OnContactTitleChanging(global::System.String value); - partial void OnContactTitleChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Address - { - get - { - return _Address; - } - set - { - OnAddressChanging(value); - ReportPropertyChanging("Address"); - _Address = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Address"); - OnAddressChanged(); - } - } - private global::System.String _Address; - partial void OnAddressChanging(global::System.String value); - partial void OnAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String City - { - get - { - return _City; - } - set - { - OnCityChanging(value); - ReportPropertyChanging("City"); - _City = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("City"); - OnCityChanged(); - } - } - private global::System.String _City; - partial void OnCityChanging(global::System.String value); - partial void OnCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Region - { - get - { - return _Region; - } - set - { - OnRegionChanging(value); - ReportPropertyChanging("Region"); - _Region = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Region"); - OnRegionChanged(); - } - } - private global::System.String _Region; - partial void OnRegionChanging(global::System.String value); - partial void OnRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String PostalCode - { - get - { - return _PostalCode; - } - set - { - OnPostalCodeChanging(value); - ReportPropertyChanging("PostalCode"); - _PostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("PostalCode"); - OnPostalCodeChanged(); - } - } - private global::System.String _PostalCode; - partial void OnPostalCodeChanging(global::System.String value); - partial void OnPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Country - { - get - { - return _Country; - } - set - { - OnCountryChanging(value); - ReportPropertyChanging("Country"); - _Country = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Country"); - OnCountryChanged(); - } - } - private global::System.String _Country; - partial void OnCountryChanging(global::System.String value); - partial void OnCountryChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Phone - { - get - { - return _Phone; - } - set - { - OnPhoneChanging(value); - ReportPropertyChanging("Phone"); - _Phone = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Phone"); - OnPhoneChanged(); - } - } - private global::System.String _Phone; - partial void OnPhoneChanging(global::System.String value); - partial void OnPhoneChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Fax - { - get - { - return _Fax; - } - set - { - OnFaxChanging(value); - ReportPropertyChanging("Fax"); - _Fax = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Fax"); - OnFaxChanged(); - } - } - private global::System.String _Fax; - partial void OnFaxChanging(global::System.String value); - partial void OnFaxChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Customers", "Orders")] - public EntityCollection Orders - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Orders_Customers", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Orders_Customers", "Orders", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "CustomerCustomerDemo", "CustomerDemographics")] - public EntityCollection CustomerDemographics - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.CustomerCustomerDemo", "CustomerDemographics"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.CustomerCustomerDemo", "CustomerDemographics", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="CustomerDemographic")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class CustomerDemographic : EntityObject - { - #region Factory Method - - /// - /// Create a new CustomerDemographic object. - /// - /// Initial value of the CustomerTypeID property. - public static CustomerDemographic CreateCustomerDemographic(global::System.String customerTypeID) - { - CustomerDemographic customerDemographic = new CustomerDemographic(); - customerDemographic.CustomerTypeID = customerTypeID; - return customerDemographic; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CustomerTypeID - { - get - { - return _CustomerTypeID; - } - set - { - if (_CustomerTypeID != value) - { - OnCustomerTypeIDChanging(value); - ReportPropertyChanging("CustomerTypeID"); - _CustomerTypeID = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CustomerTypeID"); - OnCustomerTypeIDChanged(); - } - } - } - private global::System.String _CustomerTypeID; - partial void OnCustomerTypeIDChanging(global::System.String value); - partial void OnCustomerTypeIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String CustomerDesc - { - get - { - return _CustomerDesc; - } - set - { - OnCustomerDescChanging(value); - ReportPropertyChanging("CustomerDesc"); - _CustomerDesc = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("CustomerDesc"); - OnCustomerDescChanged(); - } - } - private global::System.String _CustomerDesc; - partial void OnCustomerDescChanging(global::System.String value); - partial void OnCustomerDescChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "CustomerCustomerDemo", "Customers")] - public EntityCollection Customers - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.CustomerCustomerDemo", "Customers"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.CustomerCustomerDemo", "Customers", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Employee")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Employee : EntityObject - { - #region Factory Method - - /// - /// Create a new Employee object. - /// - /// Initial value of the EmployeeID property. - /// Initial value of the LastName property. - /// Initial value of the FirstName property. - public static Employee CreateEmployee(global::System.Int32 employeeID, global::System.String lastName, global::System.String firstName) - { - Employee employee = new Employee(); - employee.EmployeeID = employeeID; - employee.LastName = lastName; - employee.FirstName = firstName; - return employee; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 EmployeeID - { - get - { - return _EmployeeID; - } - set - { - if (_EmployeeID != value) - { - OnEmployeeIDChanging(value); - ReportPropertyChanging("EmployeeID"); - _EmployeeID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("EmployeeID"); - OnEmployeeIDChanged(); - } - } - } - private global::System.Int32 _EmployeeID; - partial void OnEmployeeIDChanging(global::System.Int32 value); - partial void OnEmployeeIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String LastName - { - get - { - return _LastName; - } - set - { - OnLastNameChanging(value); - ReportPropertyChanging("LastName"); - _LastName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("LastName"); - OnLastNameChanged(); - } - } - private global::System.String _LastName; - partial void OnLastNameChanging(global::System.String value); - partial void OnLastNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String FirstName - { - get - { - return _FirstName; - } - set - { - OnFirstNameChanging(value); - ReportPropertyChanging("FirstName"); - _FirstName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("FirstName"); - OnFirstNameChanged(); - } - } - private global::System.String _FirstName; - partial void OnFirstNameChanging(global::System.String value); - partial void OnFirstNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Title - { - get - { - return _Title; - } - set - { - OnTitleChanging(value); - ReportPropertyChanging("Title"); - _Title = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Title"); - OnTitleChanged(); - } - } - private global::System.String _Title; - partial void OnTitleChanging(global::System.String value); - partial void OnTitleChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String TitleOfCourtesy - { - get - { - return _TitleOfCourtesy; - } - set - { - OnTitleOfCourtesyChanging(value); - ReportPropertyChanging("TitleOfCourtesy"); - _TitleOfCourtesy = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("TitleOfCourtesy"); - OnTitleOfCourtesyChanged(); - } - } - private global::System.String _TitleOfCourtesy; - partial void OnTitleOfCourtesyChanging(global::System.String value); - partial void OnTitleOfCourtesyChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable BirthDate - { - get - { - return _BirthDate; - } - set - { - OnBirthDateChanging(value); - ReportPropertyChanging("BirthDate"); - _BirthDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("BirthDate"); - OnBirthDateChanged(); - } - } - private Nullable _BirthDate; - partial void OnBirthDateChanging(Nullable value); - partial void OnBirthDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable HireDate - { - get - { - return _HireDate; - } - set - { - OnHireDateChanging(value); - ReportPropertyChanging("HireDate"); - _HireDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("HireDate"); - OnHireDateChanged(); - } - } - private Nullable _HireDate; - partial void OnHireDateChanging(Nullable value); - partial void OnHireDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Address - { - get - { - return _Address; - } - set - { - OnAddressChanging(value); - ReportPropertyChanging("Address"); - _Address = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Address"); - OnAddressChanged(); - } - } - private global::System.String _Address; - partial void OnAddressChanging(global::System.String value); - partial void OnAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String City - { - get - { - return _City; - } - set - { - OnCityChanging(value); - ReportPropertyChanging("City"); - _City = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("City"); - OnCityChanged(); - } - } - private global::System.String _City; - partial void OnCityChanging(global::System.String value); - partial void OnCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Region - { - get - { - return _Region; - } - set - { - OnRegionChanging(value); - ReportPropertyChanging("Region"); - _Region = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Region"); - OnRegionChanged(); - } - } - private global::System.String _Region; - partial void OnRegionChanging(global::System.String value); - partial void OnRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String PostalCode - { - get - { - return _PostalCode; - } - set - { - OnPostalCodeChanging(value); - ReportPropertyChanging("PostalCode"); - _PostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("PostalCode"); - OnPostalCodeChanged(); - } - } - private global::System.String _PostalCode; - partial void OnPostalCodeChanging(global::System.String value); - partial void OnPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Country - { - get - { - return _Country; - } - set - { - OnCountryChanging(value); - ReportPropertyChanging("Country"); - _Country = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Country"); - OnCountryChanged(); - } - } - private global::System.String _Country; - partial void OnCountryChanging(global::System.String value); - partial void OnCountryChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String HomePhone - { - get - { - return _HomePhone; - } - set - { - OnHomePhoneChanging(value); - ReportPropertyChanging("HomePhone"); - _HomePhone = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("HomePhone"); - OnHomePhoneChanged(); - } - } - private global::System.String _HomePhone; - partial void OnHomePhoneChanging(global::System.String value); - partial void OnHomePhoneChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Extension - { - get - { - return _Extension; - } - set - { - OnExtensionChanging(value); - ReportPropertyChanging("Extension"); - _Extension = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Extension"); - OnExtensionChanged(); - } - } - private global::System.String _Extension; - partial void OnExtensionChanging(global::System.String value); - partial void OnExtensionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.Byte[] Photo - { - get - { - return StructuralObject.GetValidValue(_Photo); - } - set - { - OnPhotoChanging(value); - ReportPropertyChanging("Photo"); - _Photo = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Photo"); - OnPhotoChanged(); - } - } - private global::System.Byte[] _Photo; - partial void OnPhotoChanging(global::System.Byte[] value); - partial void OnPhotoChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Notes - { - get - { - return _Notes; - } - set - { - OnNotesChanging(value); - ReportPropertyChanging("Notes"); - _Notes = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Notes"); - OnNotesChanged(); - } - } - private global::System.String _Notes; - partial void OnNotesChanging(global::System.String value); - partial void OnNotesChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ReportsTo - { - get - { - return _ReportsTo; - } - set - { - OnReportsToChanging(value); - ReportPropertyChanging("ReportsTo"); - _ReportsTo = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ReportsTo"); - OnReportsToChanged(); - } - } - private Nullable _ReportsTo; - partial void OnReportsToChanging(Nullable value); - partial void OnReportsToChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String PhotoPath - { - get - { - return _PhotoPath; - } - set - { - OnPhotoPathChanging(value); - ReportPropertyChanging("PhotoPath"); - _PhotoPath = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("PhotoPath"); - OnPhotoPathChanged(); - } - } - private global::System.String _PhotoPath; - partial void OnPhotoPathChanging(global::System.String value); - partial void OnPhotoPathChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Employees_Employees", "Employees1")] - public EntityCollection Employees1 - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Employees_Employees", "Employees1"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Employees_Employees", "Employees1", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Employees_Employees", "Employees")] - public Employee Employee1 - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Employees_Employees", "Employees").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Employees_Employees", "Employees").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference Employee1Reference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Employees_Employees", "Employees"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Employees_Employees", "Employees", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Employees", "Orders")] - public EntityCollection Orders - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Orders_Employees", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Orders_Employees", "Orders", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "EmployeeTerritories", "Territories")] - public EntityCollection Territories - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.EmployeeTerritories", "Territories"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.EmployeeTerritories", "Territories", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Order")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Order : EntityObject - { - #region Factory Method - - /// - /// Create a new Order object. - /// - /// Initial value of the OrderID property. - public static Order CreateOrder(global::System.Int32 orderID) - { - Order order = new Order(); - order.OrderID = orderID; - return order; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 OrderID - { - get - { - return _OrderID; - } - set - { - if (_OrderID != value) - { - OnOrderIDChanging(value); - ReportPropertyChanging("OrderID"); - _OrderID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("OrderID"); - OnOrderIDChanged(); - } - } - } - private global::System.Int32 _OrderID; - partial void OnOrderIDChanging(global::System.Int32 value); - partial void OnOrderIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String CustomerID - { - get - { - return _CustomerID; - } - set - { - OnCustomerIDChanging(value); - ReportPropertyChanging("CustomerID"); - _CustomerID = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("CustomerID"); - OnCustomerIDChanged(); - } - } - private global::System.String _CustomerID; - partial void OnCustomerIDChanging(global::System.String value); - partial void OnCustomerIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable EmployeeID - { - get - { - return _EmployeeID; - } - set - { - OnEmployeeIDChanging(value); - ReportPropertyChanging("EmployeeID"); - _EmployeeID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("EmployeeID"); - OnEmployeeIDChanged(); - } - } - private Nullable _EmployeeID; - partial void OnEmployeeIDChanging(Nullable value); - partial void OnEmployeeIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable OrderDate - { - get - { - return _OrderDate; - } - set - { - OnOrderDateChanging(value); - ReportPropertyChanging("OrderDate"); - _OrderDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("OrderDate"); - OnOrderDateChanged(); - } - } - private Nullable _OrderDate; - partial void OnOrderDateChanging(Nullable value); - partial void OnOrderDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable RequiredDate - { - get - { - return _RequiredDate; - } - set - { - OnRequiredDateChanging(value); - ReportPropertyChanging("RequiredDate"); - _RequiredDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("RequiredDate"); - OnRequiredDateChanged(); - } - } - private Nullable _RequiredDate; - partial void OnRequiredDateChanging(Nullable value); - partial void OnRequiredDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ShippedDate - { - get - { - return _ShippedDate; - } - set - { - OnShippedDateChanging(value); - ReportPropertyChanging("ShippedDate"); - _ShippedDate = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ShippedDate"); - OnShippedDateChanged(); - } - } - private Nullable _ShippedDate; - partial void OnShippedDateChanging(Nullable value); - partial void OnShippedDateChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ShipVia - { - get - { - return _ShipVia; - } - set - { - OnShipViaChanging(value); - ReportPropertyChanging("ShipVia"); - _ShipVia = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ShipVia"); - OnShipViaChanged(); - } - } - private Nullable _ShipVia; - partial void OnShipViaChanging(Nullable value); - partial void OnShipViaChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable Freight - { - get - { - return _Freight; - } - set - { - OnFreightChanging(value); - ReportPropertyChanging("Freight"); - _Freight = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Freight"); - OnFreightChanged(); - } - } - private Nullable _Freight; - partial void OnFreightChanging(Nullable value); - partial void OnFreightChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipName - { - get - { - return _ShipName; - } - set - { - OnShipNameChanging(value); - ReportPropertyChanging("ShipName"); - _ShipName = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipName"); - OnShipNameChanged(); - } - } - private global::System.String _ShipName; - partial void OnShipNameChanging(global::System.String value); - partial void OnShipNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipAddress - { - get - { - return _ShipAddress; - } - set - { - OnShipAddressChanging(value); - ReportPropertyChanging("ShipAddress"); - _ShipAddress = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipAddress"); - OnShipAddressChanged(); - } - } - private global::System.String _ShipAddress; - partial void OnShipAddressChanging(global::System.String value); - partial void OnShipAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipCity - { - get - { - return _ShipCity; - } - set - { - OnShipCityChanging(value); - ReportPropertyChanging("ShipCity"); - _ShipCity = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipCity"); - OnShipCityChanged(); - } - } - private global::System.String _ShipCity; - partial void OnShipCityChanging(global::System.String value); - partial void OnShipCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipRegion - { - get - { - return _ShipRegion; - } - set - { - OnShipRegionChanging(value); - ReportPropertyChanging("ShipRegion"); - _ShipRegion = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipRegion"); - OnShipRegionChanged(); - } - } - private global::System.String _ShipRegion; - partial void OnShipRegionChanging(global::System.String value); - partial void OnShipRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipPostalCode - { - get - { - return _ShipPostalCode; - } - set - { - OnShipPostalCodeChanging(value); - ReportPropertyChanging("ShipPostalCode"); - _ShipPostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipPostalCode"); - OnShipPostalCodeChanged(); - } - } - private global::System.String _ShipPostalCode; - partial void OnShipPostalCodeChanging(global::System.String value); - partial void OnShipPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ShipCountry - { - get - { - return _ShipCountry; - } - set - { - OnShipCountryChanging(value); - ReportPropertyChanging("ShipCountry"); - _ShipCountry = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ShipCountry"); - OnShipCountryChanged(); - } - } - private global::System.String _ShipCountry; - partial void OnShipCountryChanging(global::System.String value); - partial void OnShipCountryChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Customers", "Customers")] - public Customer Customer - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference CustomerReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Orders_Customers", "Customers", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Employees", "Employees")] - public Employee Employee - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Employees", "Employees").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Employees", "Employees").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference EmployeeReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Employees", "Employees"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Orders_Employees", "Employees", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Orders", "Order_Details")] - public EntityCollection Order_Details - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Order_Details_Orders", "Order_Details"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Order_Details_Orders", "Order_Details", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Shippers", "Shippers")] - public Shipper Shipper - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Shippers", "Shippers").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Shippers", "Shippers").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference ShipperReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Orders_Shippers", "Shippers"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Orders_Shippers", "Shippers", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Order_Detail")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Order_Detail : EntityObject - { - #region Factory Method - - /// - /// Create a new Order_Detail object. - /// - /// Initial value of the OrderID property. - /// Initial value of the ProductID property. - /// Initial value of the UnitPrice property. - /// Initial value of the Quantity property. - /// Initial value of the Discount property. - public static Order_Detail CreateOrder_Detail(global::System.Int32 orderID, global::System.Int32 productID, global::System.Decimal unitPrice, global::System.Int16 quantity, global::System.Single discount) - { - Order_Detail order_Detail = new Order_Detail(); - order_Detail.OrderID = orderID; - order_Detail.ProductID = productID; - order_Detail.UnitPrice = unitPrice; - order_Detail.Quantity = quantity; - order_Detail.Discount = discount; - return order_Detail; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 OrderID - { - get - { - return _OrderID; - } - set - { - if (_OrderID != value) - { - OnOrderIDChanging(value); - ReportPropertyChanging("OrderID"); - _OrderID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("OrderID"); - OnOrderIDChanged(); - } - } - } - private global::System.Int32 _OrderID; - partial void OnOrderIDChanging(global::System.Int32 value); - partial void OnOrderIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 ProductID - { - get - { - return _ProductID; - } - set - { - if (_ProductID != value) - { - OnProductIDChanging(value); - ReportPropertyChanging("ProductID"); - _ProductID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ProductID"); - OnProductIDChanged(); - } - } - } - private global::System.Int32 _ProductID; - partial void OnProductIDChanging(global::System.Int32 value); - partial void OnProductIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Decimal UnitPrice - { - get - { - return _UnitPrice; - } - set - { - OnUnitPriceChanging(value); - ReportPropertyChanging("UnitPrice"); - _UnitPrice = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitPrice"); - OnUnitPriceChanged(); - } - } - private global::System.Decimal _UnitPrice; - partial void OnUnitPriceChanging(global::System.Decimal value); - partial void OnUnitPriceChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int16 Quantity - { - get - { - return _Quantity; - } - set - { - OnQuantityChanging(value); - ReportPropertyChanging("Quantity"); - _Quantity = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Quantity"); - OnQuantityChanged(); - } - } - private global::System.Int16 _Quantity; - partial void OnQuantityChanging(global::System.Int16 value); - partial void OnQuantityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Single Discount - { - get - { - return _Discount; - } - set - { - OnDiscountChanging(value); - ReportPropertyChanging("Discount"); - _Discount = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Discount"); - OnDiscountChanged(); - } - } - private global::System.Single _Discount; - partial void OnDiscountChanging(global::System.Single value); - partial void OnDiscountChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Orders", "Orders")] - public Order Order - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference OrderReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Order_Details_Orders", "Orders", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Products", "Products")] - public Product Product - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference ProductReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Order_Details_Products", "Products", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Product")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Product : EntityObject - { - #region Factory Method - - /// - /// Create a new Product object. - /// - /// Initial value of the ProductID property. - /// Initial value of the ProductName property. - /// Initial value of the Discontinued property. - public static Product CreateProduct(global::System.Int32 productID, global::System.String productName, global::System.Boolean discontinued) - { - Product product = new Product(); - product.ProductID = productID; - product.ProductName = productName; - product.Discontinued = discontinued; - return product; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 ProductID - { - get - { - return _ProductID; - } - set - { - if (_ProductID != value) - { - OnProductIDChanging(value); - ReportPropertyChanging("ProductID"); - _ProductID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ProductID"); - OnProductIDChanged(); - } - } - } - private global::System.Int32 _ProductID; - partial void OnProductIDChanging(global::System.Int32 value); - partial void OnProductIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String ProductName - { - get - { - return _ProductName; - } - set - { - OnProductNameChanging(value); - ReportPropertyChanging("ProductName"); - _ProductName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("ProductName"); - OnProductNameChanged(); - } - } - private global::System.String _ProductName; - partial void OnProductNameChanging(global::System.String value); - partial void OnProductNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable SupplierID - { - get - { - return _SupplierID; - } - set - { - OnSupplierIDChanging(value); - ReportPropertyChanging("SupplierID"); - _SupplierID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("SupplierID"); - OnSupplierIDChanged(); - } - } - private Nullable _SupplierID; - partial void OnSupplierIDChanging(Nullable value); - partial void OnSupplierIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable CategoryID - { - get - { - return _CategoryID; - } - set - { - OnCategoryIDChanging(value); - ReportPropertyChanging("CategoryID"); - _CategoryID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("CategoryID"); - OnCategoryIDChanged(); - } - } - private Nullable _CategoryID; - partial void OnCategoryIDChanging(Nullable value); - partial void OnCategoryIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String QuantityPerUnit - { - get - { - return _QuantityPerUnit; - } - set - { - OnQuantityPerUnitChanging(value); - ReportPropertyChanging("QuantityPerUnit"); - _QuantityPerUnit = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("QuantityPerUnit"); - OnQuantityPerUnitChanged(); - } - } - private global::System.String _QuantityPerUnit; - partial void OnQuantityPerUnitChanging(global::System.String value); - partial void OnQuantityPerUnitChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable UnitPrice - { - get - { - return _UnitPrice; - } - set - { - OnUnitPriceChanging(value); - ReportPropertyChanging("UnitPrice"); - _UnitPrice = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitPrice"); - OnUnitPriceChanged(); - } - } - private Nullable _UnitPrice; - partial void OnUnitPriceChanging(Nullable value); - partial void OnUnitPriceChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable UnitsInStock - { - get - { - return _UnitsInStock; - } - set - { - OnUnitsInStockChanging(value); - ReportPropertyChanging("UnitsInStock"); - _UnitsInStock = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitsInStock"); - OnUnitsInStockChanged(); - } - } - private Nullable _UnitsInStock; - partial void OnUnitsInStockChanging(Nullable value); - partial void OnUnitsInStockChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable UnitsOnOrder - { - get - { - return _UnitsOnOrder; - } - set - { - OnUnitsOnOrderChanging(value); - ReportPropertyChanging("UnitsOnOrder"); - _UnitsOnOrder = StructuralObject.SetValidValue(value); - ReportPropertyChanged("UnitsOnOrder"); - OnUnitsOnOrderChanged(); - } - } - private Nullable _UnitsOnOrder; - partial void OnUnitsOnOrderChanging(Nullable value); - partial void OnUnitsOnOrderChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public Nullable ReorderLevel - { - get - { - return _ReorderLevel; - } - set - { - OnReorderLevelChanging(value); - ReportPropertyChanging("ReorderLevel"); - _ReorderLevel = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ReorderLevel"); - OnReorderLevelChanged(); - } - } - private Nullable _ReorderLevel; - partial void OnReorderLevelChanging(Nullable value); - partial void OnReorderLevelChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Boolean Discontinued - { - get - { - return _Discontinued; - } - set - { - OnDiscontinuedChanging(value); - ReportPropertyChanging("Discontinued"); - _Discontinued = StructuralObject.SetValidValue(value); - ReportPropertyChanged("Discontinued"); - OnDiscontinuedChanged(); - } - } - private global::System.Boolean _Discontinued; - partial void OnDiscontinuedChanging(global::System.Boolean value); - partial void OnDiscontinuedChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Products_Categories", "Categories")] - public Category Category - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Categories", "Categories").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Categories", "Categories").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference CategoryReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Categories", "Categories"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Products_Categories", "Categories", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Order_Details_Products", "Order_Details")] - public EntityCollection Order_Details - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Order_Details_Products", "Order_Details"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Order_Details_Products", "Order_Details", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Products_Suppliers", "Suppliers")] - public Supplier Supplier - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Suppliers", "Suppliers").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Suppliers", "Suppliers").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference SupplierReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Products_Suppliers", "Suppliers"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Products_Suppliers", "Suppliers", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Region")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Region : EntityObject - { - #region Factory Method - - /// - /// Create a new Region object. - /// - /// Initial value of the RegionID property. - /// Initial value of the RegionDescription property. - public static Region CreateRegion(global::System.Int32 regionID, global::System.String regionDescription) - { - Region region = new Region(); - region.RegionID = regionID; - region.RegionDescription = regionDescription; - return region; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 RegionID - { - get - { - return _RegionID; - } - set - { - if (_RegionID != value) - { - OnRegionIDChanging(value); - ReportPropertyChanging("RegionID"); - _RegionID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("RegionID"); - OnRegionIDChanged(); - } - } - } - private global::System.Int32 _RegionID; - partial void OnRegionIDChanging(global::System.Int32 value); - partial void OnRegionIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String RegionDescription - { - get - { - return _RegionDescription; - } - set - { - OnRegionDescriptionChanging(value); - ReportPropertyChanging("RegionDescription"); - _RegionDescription = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("RegionDescription"); - OnRegionDescriptionChanged(); - } - } - private global::System.String _RegionDescription; - partial void OnRegionDescriptionChanging(global::System.String value); - partial void OnRegionDescriptionChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Territories_Region", "Territories")] - public EntityCollection Territories - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Territories_Region", "Territories"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Territories_Region", "Territories", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Shipper")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Shipper : EntityObject - { - #region Factory Method - - /// - /// Create a new Shipper object. - /// - /// Initial value of the ShipperID property. - /// Initial value of the CompanyName property. - public static Shipper CreateShipper(global::System.Int32 shipperID, global::System.String companyName) - { - Shipper shipper = new Shipper(); - shipper.ShipperID = shipperID; - shipper.CompanyName = companyName; - return shipper; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 ShipperID - { - get - { - return _ShipperID; - } - set - { - if (_ShipperID != value) - { - OnShipperIDChanging(value); - ReportPropertyChanging("ShipperID"); - _ShipperID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("ShipperID"); - OnShipperIDChanged(); - } - } - } - private global::System.Int32 _ShipperID; - partial void OnShipperIDChanging(global::System.Int32 value); - partial void OnShipperIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CompanyName - { - get - { - return _CompanyName; - } - set - { - OnCompanyNameChanging(value); - ReportPropertyChanging("CompanyName"); - _CompanyName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CompanyName"); - OnCompanyNameChanged(); - } - } - private global::System.String _CompanyName; - partial void OnCompanyNameChanging(global::System.String value); - partial void OnCompanyNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Phone - { - get - { - return _Phone; - } - set - { - OnPhoneChanging(value); - ReportPropertyChanging("Phone"); - _Phone = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Phone"); - OnPhoneChanged(); - } - } - private global::System.String _Phone; - partial void OnPhoneChanging(global::System.String value); - partial void OnPhoneChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Orders_Shippers", "Orders")] - public EntityCollection Orders - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Orders_Shippers", "Orders"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Orders_Shippers", "Orders", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Supplier")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Supplier : EntityObject - { - #region Factory Method - - /// - /// Create a new Supplier object. - /// - /// Initial value of the SupplierID property. - /// Initial value of the CompanyName property. - public static Supplier CreateSupplier(global::System.Int32 supplierID, global::System.String companyName) - { - Supplier supplier = new Supplier(); - supplier.SupplierID = supplierID; - supplier.CompanyName = companyName; - return supplier; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 SupplierID - { - get - { - return _SupplierID; - } - set - { - if (_SupplierID != value) - { - OnSupplierIDChanging(value); - ReportPropertyChanging("SupplierID"); - _SupplierID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("SupplierID"); - OnSupplierIDChanged(); - } - } - } - private global::System.Int32 _SupplierID; - partial void OnSupplierIDChanging(global::System.Int32 value); - partial void OnSupplierIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String CompanyName - { - get - { - return _CompanyName; - } - set - { - OnCompanyNameChanging(value); - ReportPropertyChanging("CompanyName"); - _CompanyName = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("CompanyName"); - OnCompanyNameChanged(); - } - } - private global::System.String _CompanyName; - partial void OnCompanyNameChanging(global::System.String value); - partial void OnCompanyNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactName - { - get - { - return _ContactName; - } - set - { - OnContactNameChanging(value); - ReportPropertyChanging("ContactName"); - _ContactName = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactName"); - OnContactNameChanged(); - } - } - private global::System.String _ContactName; - partial void OnContactNameChanging(global::System.String value); - partial void OnContactNameChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String ContactTitle - { - get - { - return _ContactTitle; - } - set - { - OnContactTitleChanging(value); - ReportPropertyChanging("ContactTitle"); - _ContactTitle = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("ContactTitle"); - OnContactTitleChanged(); - } - } - private global::System.String _ContactTitle; - partial void OnContactTitleChanging(global::System.String value); - partial void OnContactTitleChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Address - { - get - { - return _Address; - } - set - { - OnAddressChanging(value); - ReportPropertyChanging("Address"); - _Address = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Address"); - OnAddressChanged(); - } - } - private global::System.String _Address; - partial void OnAddressChanging(global::System.String value); - partial void OnAddressChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String City - { - get - { - return _City; - } - set - { - OnCityChanging(value); - ReportPropertyChanging("City"); - _City = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("City"); - OnCityChanged(); - } - } - private global::System.String _City; - partial void OnCityChanging(global::System.String value); - partial void OnCityChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Region - { - get - { - return _Region; - } - set - { - OnRegionChanging(value); - ReportPropertyChanging("Region"); - _Region = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Region"); - OnRegionChanged(); - } - } - private global::System.String _Region; - partial void OnRegionChanging(global::System.String value); - partial void OnRegionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String PostalCode - { - get - { - return _PostalCode; - } - set - { - OnPostalCodeChanging(value); - ReportPropertyChanging("PostalCode"); - _PostalCode = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("PostalCode"); - OnPostalCodeChanged(); - } - } - private global::System.String _PostalCode; - partial void OnPostalCodeChanging(global::System.String value); - partial void OnPostalCodeChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Country - { - get - { - return _Country; - } - set - { - OnCountryChanging(value); - ReportPropertyChanging("Country"); - _Country = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Country"); - OnCountryChanged(); - } - } - private global::System.String _Country; - partial void OnCountryChanging(global::System.String value); - partial void OnCountryChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Phone - { - get - { - return _Phone; - } - set - { - OnPhoneChanging(value); - ReportPropertyChanging("Phone"); - _Phone = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Phone"); - OnPhoneChanged(); - } - } - private global::System.String _Phone; - partial void OnPhoneChanging(global::System.String value); - partial void OnPhoneChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String Fax - { - get - { - return _Fax; - } - set - { - OnFaxChanging(value); - ReportPropertyChanging("Fax"); - _Fax = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("Fax"); - OnFaxChanged(); - } - } - private global::System.String _Fax; - partial void OnFaxChanging(global::System.String value); - partial void OnFaxChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] - [DataMemberAttribute()] - public global::System.String HomePage - { - get - { - return _HomePage; - } - set - { - OnHomePageChanging(value); - ReportPropertyChanging("HomePage"); - _HomePage = StructuralObject.SetValidValue(value, true); - ReportPropertyChanged("HomePage"); - OnHomePageChanged(); - } - } - private global::System.String _HomePage; - partial void OnHomePageChanging(global::System.String value); - partial void OnHomePageChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Products_Suppliers", "Products")] - public EntityCollection Products - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.FK_Products_Suppliers", "Products"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.FK_Products_Suppliers", "Products", value); - } - } - } - - #endregion - } - - /// - /// No Metadata Documentation available. - /// - [EdmEntityTypeAttribute(NamespaceName="NorthwindModel", Name="Territory")] - [Serializable()] - [DataContractAttribute(IsReference=true)] - public partial class Territory : EntityObject - { - #region Factory Method - - /// - /// Create a new Territory object. - /// - /// Initial value of the TerritoryID property. - /// Initial value of the TerritoryDescription property. - /// Initial value of the RegionID property. - public static Territory CreateTerritory(global::System.String territoryID, global::System.String territoryDescription, global::System.Int32 regionID) - { - Territory territory = new Territory(); - territory.TerritoryID = territoryID; - territory.TerritoryDescription = territoryDescription; - territory.RegionID = regionID; - return territory; - } - - #endregion - #region Primitive Properties - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String TerritoryID - { - get - { - return _TerritoryID; - } - set - { - if (_TerritoryID != value) - { - OnTerritoryIDChanging(value); - ReportPropertyChanging("TerritoryID"); - _TerritoryID = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("TerritoryID"); - OnTerritoryIDChanged(); - } - } - } - private global::System.String _TerritoryID; - partial void OnTerritoryIDChanging(global::System.String value); - partial void OnTerritoryIDChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.String TerritoryDescription - { - get - { - return _TerritoryDescription; - } - set - { - OnTerritoryDescriptionChanging(value); - ReportPropertyChanging("TerritoryDescription"); - _TerritoryDescription = StructuralObject.SetValidValue(value, false); - ReportPropertyChanged("TerritoryDescription"); - OnTerritoryDescriptionChanged(); - } - } - private global::System.String _TerritoryDescription; - partial void OnTerritoryDescriptionChanging(global::System.String value); - partial void OnTerritoryDescriptionChanged(); - - /// - /// No Metadata Documentation available. - /// - [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] - [DataMemberAttribute()] - public global::System.Int32 RegionID - { - get - { - return _RegionID; - } - set - { - OnRegionIDChanging(value); - ReportPropertyChanging("RegionID"); - _RegionID = StructuralObject.SetValidValue(value); - ReportPropertyChanged("RegionID"); - OnRegionIDChanged(); - } - } - private global::System.Int32 _RegionID; - partial void OnRegionIDChanging(global::System.Int32 value); - partial void OnRegionIDChanged(); - - #endregion - - #region Navigation Properties - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "FK_Territories_Region", "Region")] - public Region Region - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Territories_Region", "Region").Value; - } - set - { - ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Territories_Region", "Region").Value = value; - } - } - /// - /// No Metadata Documentation available. - /// - [BrowsableAttribute(false)] - [DataMemberAttribute()] - public EntityReference RegionReference - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("NorthwindModel.FK_Territories_Region", "Region"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("NorthwindModel.FK_Territories_Region", "Region", value); - } - } - } - - /// - /// No Metadata Documentation available. - /// - [XmlIgnoreAttribute()] - [SoapIgnoreAttribute()] - [DataMemberAttribute()] - [EdmRelationshipNavigationPropertyAttribute("NorthwindModel", "EmployeeTerritories", "Employees")] - public EntityCollection Employees - { - get - { - return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("NorthwindModel.EmployeeTerritories", "Employees"); - } - set - { - if ((value != null)) - { - ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("NorthwindModel.EmployeeTerritories", "Employees", value); - } - } - } - - #endregion - } - - #endregion - -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.edmx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.edmx deleted file mode 100644 index 72591d04a9918..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.edmx +++ /dev/null @@ -1,933 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.svc b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.svc deleted file mode 100644 index 1579f9f9e8b56..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.svc +++ /dev/null @@ -1 +0,0 @@ -<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Service="NorthwindService.Northwind" %> diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.svc.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.svc.cs deleted file mode 100644 index ec87f38ebfbd5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwind.svc.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -using System.Data.Services; -using System.Linq; -using System.ServiceModel.Web; - -namespace NorthwindService -{ - // - // - public class Northwind : DataService - // - { - // This method is called only once to initialize service-wide policies. - public static void InitializeService(DataServiceConfiguration config) - { - // - // Grant only the rights needed to support the client application. - config.SetEntitySetAccessRule("Orders", EntitySetRights.AllRead - | EntitySetRights.WriteMerge - | EntitySetRights.WriteReplace ); - config.SetEntitySetAccessRule("Order_Details", EntitySetRights.AllRead - | EntitySetRights.AllWrite); - config.SetEntitySetAccessRule("Customers", EntitySetRights.AllRead); - // - } - } - // -} -// \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwindservice.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwindservice.csproj deleted file mode 100644 index 41ea0d5e16438..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/northwindservice.csproj +++ /dev/null @@ -1,150 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {66054490-20CD-4CDB-97F2-DBD59D679827} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - NorthwindService - NorthwindServiceCS - v4.0 - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - 3.5 - - - 3.5 - - - 3.5 - - - False - ..\..\..\..\..\..\..\Program Files (x86)\ADO.NET Data Services V1.5 CTP2\bin\System.Data.Services.dll - 3.5 - - - False - ..\..\..\..\..\..\..\Program Files (x86)\ADO.NET Data Services V1.5 CTP2\bin\System.Data.Services.Client.dll - 3.5 - - - 3.0 - - - - - - - - - False - - - False - - - 3.5 - - - - - - - - - - - - - - - Web.config - - - Web.config - - - - - ASPXCodeBehind - Default.aspx - - - Default.aspx - - - True - True - Northwind.edmx - - - Northwind.svc - - - - - - - - - EntityModelCodeGenerator - Northwind.Designer.cs - - - - - - - - - False - False - 12345 - / - - - False - False - - - False - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/properties/assemblyinfo.cs deleted file mode 100644 index e782cb17e9a3e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/properties/assemblyinfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NorthwindService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NorthwindService")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7eb5735d-821b-45e4-ab75-36675f3d4550")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/web.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/web.config deleted file mode 100644 index f921d9f8b13fe..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/web.config +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/web.debug.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/web.debug.config deleted file mode 100644 index 214c1c780ad1d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/web.debug.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/web.release.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/web.release.config deleted file mode 100644 index 8df3ca121f3e0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_quickstart_service/cs/web.release.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/astoria reflection provider.sln b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/astoria reflection provider.sln deleted file mode 100644 index 4e80fa4f9910a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/astoria reflection provider.sln +++ /dev/null @@ -1,54 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomDataService", "CS\CustomDataService.csproj", "{41DCA39D-144D-4459-AB1E-1AF4C66C0232}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomDataServiceClient", "CustomDataServiceClient\CustomDataServiceClient.csproj", "{DEBD92E3-5886-4B84-9401-F29C3EFB0233}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CustomDataServiceVB", "VB\CustomDataServiceVB.vbproj", "{1FCCAAAA-93E2-40DD-9B08-26F164D6568F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Debug|Any CPU.Build.0 = Debug|Any CPU - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Debug|x86.ActiveCfg = Debug|Any CPU - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Release|Any CPU.ActiveCfg = Release|Any CPU - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Release|Any CPU.Build.0 = Release|Any CPU - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {41DCA39D-144D-4459-AB1E-1AF4C66C0232}.Release|x86.ActiveCfg = Release|Any CPU - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Debug|Any CPU.ActiveCfg = Debug|x86 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Debug|x86.ActiveCfg = Debug|x86 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Debug|x86.Build.0 = Debug|x86 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Release|Any CPU.ActiveCfg = Release|x86 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Release|Mixed Platforms.Build.0 = Release|x86 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Release|x86.ActiveCfg = Release|x86 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233}.Release|x86.Build.0 = Release|x86 - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Debug|x86.ActiveCfg = Debug|Any CPU - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Release|Any CPU.Build.0 = Release|Any CPU - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {1FCCAAAA-93E2-40DD-9B08-26F164D6568F}.Release|x86.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/customdataservice.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/customdataservice.csproj deleted file mode 100644 index 9a7aacbce930a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/customdataservice.csproj +++ /dev/null @@ -1,127 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {41DCA39D-144D-4459-AB1E-1AF4C66C0232} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - CustomDataServiceClient - CustomDataService - v4.0 - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - 3.5 - - - 3.5 - - - - False - ..\..\..\..\..\..\..\Program Files (x86)\ADO.NET Data Services V1.5 CTP2\bin\System.Data.Services.dll - 3.5 - - - False - ..\..\..\..\..\..\..\Program Files (x86)\ADO.NET Data Services V1.5 CTP2\bin\System.Data.Services.Client.dll - 3.5 - - - - - 3.5 - - - 3.5 - - - - - - - - - - - - - - - Web.config - - - Web.config - - - - - ASPXCodeBehind - Default.aspx - - - Default.aspx - - - - OrderItems.svc - - - - - - - - - - - - - False - False - 12345 - / - - - False - False - - - False - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/default.aspx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/default.aspx deleted file mode 100644 index 7a5424849107c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/default.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CustomDataService._Default" %> - - - - - - - - -
-
- -
-
- - diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/default.aspx.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/default.aspx.cs deleted file mode 100644 index ceb470491c049..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/default.aspx.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace CustomDataServiceClient -{ - public partial class _Default : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/default.aspx.designer.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/default.aspx.designer.cs deleted file mode 100644 index 676b01af47210..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/default.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.20604.3 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace CustomDataServiceClient { - - - public partial class _Default { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/iupdatable.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/iupdatable.cs deleted file mode 100644 index a643e62977d3e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/iupdatable.cs +++ /dev/null @@ -1,115 +0,0 @@ -// -using System; -using System.Collections; -using System.Reflection; -using System.Data.Services; -using System.Linq; - -namespace CustomDataServiceClient -{ - public partial class OrderItemData : IUpdatable - { - // Creates an object in the container. - object IUpdatable.CreateResource(string containerName, string fullTypeName) - { - Type t = Type.GetType(fullTypeName, true); - object resource = Activator.CreateInstance(t); - return resource; - } - - // Gets the object referenced by the resource. - object IUpdatable.GetResource(IQueryable query, string fullTypeName) - { - object resource = query.Cast().SingleOrDefault(); - - // fullTypeName can be null for deletes - if (fullTypeName != null && resource.GetType().FullName != fullTypeName) - throw new ApplicationException("Unexpected type for this resource."); - return resource; - } - - // Resets the value of the object to its default value. - object IUpdatable.ResetResource(object resource) - { - // Nothing to do for this in-memory provider. - return resource; - } - - // Sets the value of the given property on the object. - void IUpdatable.SetValue(object targetResource, string propertyName, object propertyValue) - { - // Use reflection to set the property on the object. - Type t = targetResource.GetType(); - PropertyInfo p = t.GetProperty(propertyName); - p.SetValue(targetResource, propertyValue, null); - } - - // Gets the value of a property on an object. - object IUpdatable.GetValue(object targetResource, string propertyName) - { - // Use reflection to get the property to set. - Type t = targetResource.GetType(); - PropertyInfo p = t.GetProperty(propertyName); - return p.GetValue(targetResource, null); - } - - // Sets the related object for a reference. - void IUpdatable.SetReference( - object targetResource, string propertyName, object propertyValue) - { - ((IUpdatable)this).SetValue(targetResource, propertyName, propertyValue); - } - - // Adds the object to the related objects collection. - void IUpdatable.AddReferenceToCollection( - object targetResource, string propertyName, object resourceToBeAdded) - { - PropertyInfo pi = targetResource.GetType().GetProperty(propertyName); - if (pi == null) - throw new Exception("Can't find property"); - IList collection = (IList)pi.GetValue(targetResource, null); - collection.Add(resourceToBeAdded); - } - - // Removes the object from the related objects collection. - void IUpdatable.RemoveReferenceFromCollection( - object targetResource, string propertyName, object resourceToBeRemoved) - { - PropertyInfo pi = targetResource.GetType().GetProperty(propertyName); - if (pi == null) - throw new Exception("Can't find property"); - IList collection = (IList)pi.GetValue(targetResource, null); - collection.Remove(resourceToBeRemoved); - } - - // Deletes the resource. - void IUpdatable.DeleteResource(object targetResource) - { - // Nothing to do for this provider. - } - - // Saves all the pending changes. - void IUpdatable.SaveChanges() - { - //// Nothing to do for this in-memory provider (uncomment to raise an exception). - //throw new NotSupportedException( - // "The save changes functionality is not supported by this in-memory provider"); - } - - // Returns the actual instance of the resource represented - // by the resource object. - object IUpdatable.ResolveResource(object resource) - { - return resource; - } - - // Reverts all the pending changes. - void IUpdatable.ClearChanges() - { - //// Nothing to do for this in-memory provider (uncomment to raise an exception). - //throw new NotSupportedException( - // "The clear changes functionality is not supported by this in-memory provider"); - } - } -} -// \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/orderitems.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/orderitems.cs deleted file mode 100644 index 08bd5dde4a720..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/orderitems.cs +++ /dev/null @@ -1,211 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3074 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Original file name: OrderItems.cs -// Generation date: 7/27/2009 11:32:34 AM -namespace CustomDataService -{ - - /// - /// There are no comments for OrderItemData in the schema. - /// - public partial class OrderItemData : global::System.Data.Services.Client.DataServiceContext - { - /// - /// Initialize a new OrderItemData object. - /// - public OrderItemData(global::System.Uri serviceRoot) : - base(serviceRoot) - { - this.OnContextCreated(); - } - partial void OnContextCreated(); - /// - /// There are no comments for Orders in the schema. - /// - public global::System.Data.Services.Client.DataServiceQuery Orders - { - get - { - if ((this._Orders == null)) - { - this._Orders = base.CreateQuery("Orders"); - } - return this._Orders; - } - } - private global::System.Data.Services.Client.DataServiceQuery _Orders; - /// - /// There are no comments for Items in the schema. - /// - public global::System.Data.Services.Client.DataServiceQuery Items - { - get - { - if ((this._Items == null)) - { - this._Items = base.CreateQuery("Items"); - } - return this._Items; - } - } - private global::System.Data.Services.Client.DataServiceQuery _Items; - /// - /// There are no comments for Orders in the schema. - /// - public void AddToOrders(Order order) - { - base.AddObject("Orders", order); - } - /// - /// There are no comments for Items in the schema. - /// - public void AddToItems(Item item) - { - base.AddObject("Items", item); - } - } - /// - /// There are no comments for CustomDataService.Order in the schema. - /// - /// - /// OrderId - /// - [global::System.Data.Services.Common.DataServiceKeyAttribute("OrderId")] - public partial class Order - { - /// - /// Create a new Order object. - /// - /// Initial value of OrderId. - public static Order CreateOrder(int orderId) - { - Order order = new Order(); - order.OrderId = orderId; - return order; - } - /// - /// There are no comments for Property OrderId in the schema. - /// - public int OrderId - { - get - { - return this._OrderId; - } - set - { - this.OnOrderIdChanging(value); - this._OrderId = value; - this.OnOrderIdChanged(); - } - } - private int _OrderId; - partial void OnOrderIdChanging(int value); - partial void OnOrderIdChanged(); - /// - /// There are no comments for Property Customer in the schema. - /// - public string Customer - { - get - { - return this._Customer; - } - set - { - this.OnCustomerChanging(value); - this._Customer = value; - this.OnCustomerChanged(); - } - } - private string _Customer; - partial void OnCustomerChanging(string value); - partial void OnCustomerChanged(); - /// - /// There are no comments for Items in the schema. - /// - public global::System.Data.Services.Client.DataServiceCollection Items - { - get - { - return this._Items; - } - set - { - if ((value != null)) - { - this._Items = value; - } - } - } - private global::System.Data.Services.Client.DataServiceCollection _Items = System.Data.Services.Client.DataServiceCollection.Create(); - } - /// - /// There are no comments for CustomDataService.Item in the schema. - /// - /// - /// Product - /// - [global::System.Data.Services.Common.DataServiceKeyAttribute("Product")] - public partial class Item - { - /// - /// Create a new Item object. - /// - /// Initial value of Product. - /// Initial value of Quantity. - public static Item CreateItem(string product, int quantity) - { - Item item = new Item(); - item.Product = product; - item.Quantity = quantity; - return item; - } - /// - /// There are no comments for Property Product in the schema. - /// - public string Product - { - get - { - return this._Product; - } - set - { - this.OnProductChanging(value); - this._Product = value; - this.OnProductChanged(); - } - } - private string _Product; - partial void OnProductChanging(string value); - partial void OnProductChanged(); - /// - /// There are no comments for Property Quantity in the schema. - /// - public int Quantity - { - get - { - return this._Quantity; - } - set - { - this.OnQuantityChanging(value); - this._Quantity = value; - this.OnQuantityChanged(); - } - } - private int _Quantity; - partial void OnQuantityChanging(int value); - partial void OnQuantityChanged(); - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/orderitems.svc b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/orderitems.svc deleted file mode 100644 index 266467f1b7db2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/orderitems.svc +++ /dev/null @@ -1,3 +0,0 @@ - - -<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, System.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Service="CustomDataServiceClient.OrderItems" %> diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/orderitems.svc.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/orderitems.svc.cs deleted file mode 100644 index 3e967188aef46..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/orderitems.svc.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.Data.Services; -using System.Data.Services.Common; -using System.Linq; - -namespace CustomDataServiceClient -{ - [DataServiceKeyAttribute("OrderId")] - public class Order - { - public int OrderId { get; set; } - public string Customer { get; set; } - public IList Items { get; set; } - } - [DataServiceKeyAttribute("Product")] - public class Item - { - public string Product { get; set; } - public int Quantity { get; set; } - } - public partial class OrderItemData - { - #region Populate Service Data - static IList _orders; - static IList _items; - static OrderItemData() - { - _orders = new Order[]{ - new Order(){ OrderId=0, Customer = "Peter Franken", Items = new List()}, - new Order(){ OrderId=1, Customer = "Ana Trujillo", Items = new List()}}; - _items = new Item[]{ - new Item(){ Product="Chai", Quantity=10 }, - new Item(){ Product="Chang", Quantity=25 }, - new Item(){ Product="Aniseed Syrup", Quantity = 5 }, - new Item(){ Product="Chef Anton's Cajun Seasoning", Quantity=30}}; - _orders[0].Items.Add(_items[0]); - _orders[0].Items.Add(_items[1]); - _orders[1].Items.Add(_items[2]); - _orders[1].Items.Add(_items[3]); - } - #endregion - public IQueryable Orders - { - get { return _orders.AsQueryable(); } - } - public IQueryable Items - { - get { return _items.AsQueryable(); } - } - } - public class OrderItems : DataService - { - // This method is called only once to initialize - //service-wide policies. - public static void InitializeService(IDataServiceConfiguration - config) - { - config.SetEntitySetAccessRule("Orders", EntitySetRights.All); - config.SetEntitySetAccessRule("Items", EntitySetRights.All); - } - } -} -// diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/properties/assemblyinfo.cs deleted file mode 100644 index 4579f2598f095..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/properties/assemblyinfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("CustomDataService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("CustomDataService")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("2ba526ff-85b6-4a38-9f94-321936a43bf5")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/regendataservicereference.bat b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/regendataservicereference.bat deleted file mode 100644 index 2056e18611a17..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/regendataservicereference.bat +++ /dev/null @@ -1 +0,0 @@ -"C:\Program Files (x86)\ADO.NET Data Services V1.5 CTP1\bin\DataSvcUtil.exe" /language:CSharp /out:OrderItems.cs /uri:http://localhost:40731/OrderItems.svc/ \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/web.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/web.config deleted file mode 100644 index ac92d87e0b39c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/web.config +++ /dev/null @@ -1,92 +0,0 @@ - - - - - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/web.debug.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/web.debug.config deleted file mode 100644 index 2c6dd51a70558..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/web.debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/web.release.config b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/web.release.config deleted file mode 100644 index 4122d79bfe246..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/cs/web.release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/customdataserviceclient.csproj b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/customdataserviceclient.csproj deleted file mode 100644 index 1499e8e7e0293..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/customdataserviceclient.csproj +++ /dev/null @@ -1,85 +0,0 @@ - - - - Debug - x86 - 9.0.30729 - 2.0 - {DEBD92E3-5886-4B84-9401-F29C3EFB0233} - Exe - Properties - CustomDataServiceClient - CustomDataServiceClient - v4.0 - 512 - x86 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - - - - 3.5 - - - 3.5 - - - - - - - - - True - True - Reference.datasvcmap - - - - - - - - datasvcmap - - - - - - - - DataServiceClientGenerator - Reference.cs - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/program.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/program.cs deleted file mode 100644 index 425d6631cd9d7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/program.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using CustomDataServiceClient.OrderItems; - -namespace CustomDataServiceClient -{ - class Program - { - static void Main(string[] args) - { - - //OrderItemData context = new OrderItemData(new Uri("http://localhost:12345/OrderItems.svc/")); - OrderItemData context = new OrderItemData(new Uri("http://localhost:54321/OrderItems.svc/")); - - Order selectedOrder = GetOrderWithItems(context); - - PrintItems(selectedOrder); - - Item selectedItem = selectedOrder.Items.FirstOrDefault(); - selectedItem.Quantity += 1; - context.UpdateObject(selectedItem); - - PrintItems(selectedOrder); - - Item newItem = new Item() { Product = "Grandma's Boysenberry Spread", Quantity = 30 }; - //context.AddToItems(newItem); - selectedOrder.Items.Add(newItem); - context.AddRelatedObject(selectedOrder, "Items", newItem); - - selectedOrder = GetOrderWithItems(context); - - PrintItems(selectedOrder); - - context.DeleteObject(newItem); - - selectedOrder = GetOrderWithItems(context); - - PrintItems(selectedOrder); - } - static Order GetOrderWithItems(OrderItemData context) - { - var selectedOrder = (from orders in context.Orders.Expand("Items") - select orders).FirstOrDefault(); - return selectedOrder; - } - static void PrintItems(Order selectedOrder) - { - Console.WriteLine("Order: {0}", selectedOrder.Customer); - foreach (Item i in selectedOrder.Items) - { - Console.WriteLine("Product: {0} ({1})", i.Product, i.Quantity); - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/properties/assemblyinfo.cs deleted file mode 100644 index 9d2242419dac1..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/properties/assemblyinfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("CustomDataServiceClient")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("CustomDataServiceClient")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5697fb35-8cb0-4ed8-9360-d7ce66f07d2a")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/service references/orderitems/reference.cs b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/service references/orderitems/reference.cs deleted file mode 100644 index b1b3248305db1..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/service references/orderitems/reference.cs +++ /dev/null @@ -1,260 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.21030.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Original file name: -// Generation date: 11/20/2009 1:47:48 PM -namespace CustomDataServiceClient.OrderItems -{ - - /// - /// There are no comments for OrderItemData in the schema. - /// - public partial class OrderItemData : global::System.Data.Services.Client.DataServiceContext - { - /// - /// Initialize a new OrderItemData object. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public OrderItemData(global::System.Uri serviceRoot) : - base(serviceRoot) - { - this.ResolveName = new global::System.Func(this.ResolveNameFromType); - this.ResolveType = new global::System.Func(this.ResolveTypeFromName); - this.OnContextCreated(); - } - partial void OnContextCreated(); - /// - /// Since the namespace configured for this service reference - /// in Visual Studio is different from the one indicated in the - /// server schema, use type-mappers to map between the two. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected global::System.Type ResolveTypeFromName(string typeName) - { - if (typeName.StartsWith("CustomDataServiceClient", global::System.StringComparison.Ordinal)) - { - return this.GetType().Assembly.GetType(string.Concat("CustomDataServiceClient.OrderItems", typeName.Substring(23)), false); - } - return null; - } - /// - /// Since the namespace configured for this service reference - /// in Visual Studio is different from the one indicated in the - /// server schema, use type-mappers to map between the two. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - protected string ResolveNameFromType(global::System.Type clientType) - { - if (clientType.Namespace.Equals("CustomDataServiceClient.OrderItems", global::System.StringComparison.Ordinal)) - { - return string.Concat("CustomDataServiceClient.", clientType.Name); - } - return null; - } - /// - /// There are no comments for Orders in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Orders - { - get - { - if ((this._Orders == null)) - { - this._Orders = base.CreateQuery("Orders"); - } - return this._Orders; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Orders; - /// - /// There are no comments for Items in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Data.Services.Client.DataServiceQuery Items - { - get - { - if ((this._Items == null)) - { - this._Items = base.CreateQuery("Items"); - } - return this._Items; - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Data.Services.Client.DataServiceQuery _Items; - /// - /// There are no comments for Orders in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToOrders(Order order) - { - base.AddObject("Orders", order); - } - /// - /// There are no comments for Items in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public void AddToItems(Item item) - { - base.AddObject("Items", item); - } - } - /// - /// There are no comments for CustomDataServiceClient.Order in the schema. - /// - /// - /// OrderId - /// - [global::System.Data.Services.Common.DataServiceKeyAttribute("OrderId")] - public partial class Order - { - /// - /// Create a new Order object. - /// - /// Initial value of OrderId. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Order CreateOrder(int orderId) - { - Order order = new Order(); - order.OrderId = orderId; - return order; - } - /// - /// There are no comments for Property OrderId in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int OrderId - { - get - { - return this._OrderId; - } - set - { - this.OnOrderIdChanging(value); - this._OrderId = value; - this.OnOrderIdChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _OrderId; - partial void OnOrderIdChanging(int value); - partial void OnOrderIdChanged(); - /// - /// There are no comments for Property Customer in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Customer - { - get - { - return this._Customer; - } - set - { - this.OnCustomerChanging(value); - this._Customer = value; - this.OnCustomerChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Customer; - partial void OnCustomerChanging(string value); - partial void OnCustomerChanged(); - /// - /// There are no comments for Items in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public global::System.Collections.ObjectModel.Collection Items - { - get - { - return this._Items; - } - set - { - if ((value != null)) - { - this._Items = value; - } - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private global::System.Collections.ObjectModel.Collection _Items = new global::System.Collections.ObjectModel.Collection(); - } - /// - /// There are no comments for CustomDataServiceClient.Item in the schema. - /// - /// - /// Product - /// - [global::System.Data.Services.Common.DataServiceKeyAttribute("Product")] - public partial class Item - { - /// - /// Create a new Item object. - /// - /// Initial value of Product. - /// Initial value of Quantity. - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public static Item CreateItem(string product, int quantity) - { - Item item = new Item(); - item.Product = product; - item.Quantity = quantity; - return item; - } - /// - /// There are no comments for Property Product in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public string Product - { - get - { - return this._Product; - } - set - { - this.OnProductChanging(value); - this._Product = value; - this.OnProductChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private string _Product; - partial void OnProductChanging(string value); - partial void OnProductChanged(); - /// - /// There are no comments for Property Quantity in the schema. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - public int Quantity - { - get - { - return this._Quantity; - } - set - { - this.OnQuantityChanging(value); - this._Quantity = value; - this.OnQuantityChanged(); - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] - private int _Quantity; - partial void OnQuantityChanging(int value); - partial void OnQuantityChanged(); - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/service references/orderitems/reference.datasvcmap b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/service references/orderitems/reference.datasvcmap deleted file mode 100644 index 1608d2ebfd111..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/service references/orderitems/reference.datasvcmap +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/service references/orderitems/service.edmx b/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/service references/orderitems/service.edmx deleted file mode 100644 index 0679fc10c9f07..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Misc/astoria_reflection_provider/customdataserviceclient/service references/orderitems/service.edmx +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Misc/cds/cs/cds2.cs b/samples/snippets/csharp/VS_Snippets_Misc/cds/cs/cds2.cs index d5c2105b2cfa1..c9b51bfa998ee 100644 --- a/samples/snippets/csharp/VS_Snippets_Misc/cds/cs/cds2.cs +++ b/samples/snippets/csharp/VS_Snippets_Misc/cds/cs/cds2.cs @@ -133,7 +133,7 @@ class Blocking private static BlockingCollection blockingCollection = new BlockingCollection(10); // Some data to add. - static string[] cities = new string[10] { "London", "Mumbai", "Beijing", "Badgad", "Paris", "Berlin", "Moscow", "Sydney", "Buenos Aires", "Tokyo" }; + static string[] cities = new string[10] { "London", "Mumbai", "Beijing", "Baghdad", "Paris", "Berlin", "Moscow", "Sydney", "Buenos Aires", "Tokyo" }; static double[] population = new double[10] { 7.65, 18.041, 12.037, 4.795, 9.642, 3.339, 9.3, 3.664, 12.435, 38.027 }; static void Main() diff --git a/samples/snippets/csharp/VS_Snippets_Misc/cds_countdownevent/cs/countdownevent.cs b/samples/snippets/csharp/VS_Snippets_Misc/cds_countdownevent/cs/countdownevent.cs index 1ce75b99baeb3..753ed136f3d9c 100644 --- a/samples/snippets/csharp/VS_Snippets_Misc/cds_countdownevent/cs/countdownevent.cs +++ b/samples/snippets/csharp/VS_Snippets_Misc/cds_countdownevent/cs/countdownevent.cs @@ -188,7 +188,7 @@ static void EventWithCancel() } //end class // - class CancelSempahore + class CancelSemaphore { static IEnumerable GetData() { diff --git a/samples/snippets/csharp/VS_Snippets_Misc/fromasync/cs/fromasync.cs b/samples/snippets/csharp/VS_Snippets_Misc/fromasync/cs/fromasync.cs index 2e58f13c1d5f6..3a2f5eed0946a 100644 --- a/samples/snippets/csharp/VS_Snippets_Misc/fromasync/cs/fromasync.cs +++ b/samples/snippets/csharp/VS_Snippets_Misc/fromasync/cs/fromasync.cs @@ -14,7 +14,7 @@ namespace specialNamespaceForOneMethodSignature using System; class Task { - public TResult Tvalue; + public TResult TValue; } class Dummy { @@ -288,7 +288,7 @@ public string Compute(int numPlaces) // Simulating some heavy work. Thread.SpinWait(500000000); - // Actual implemenation left as exercise for the reader. + // Actual implementation left as exercise for the reader. // Several examples are available on the Web. return "3.14159265358979323846264338327950288"; } @@ -311,7 +311,7 @@ public static void Main() AsyncCallback callBack = new AsyncCallback(PrintResult); IAsyncResult ar = calc.BeginCalculate(places, callBack, calc); - // Do some work on this thread while the calulator is busy. + // Do some work on this thread while the calculator is busy. Console.WriteLine("Working..."); Thread.SpinWait(500000); Console.ReadLine(); diff --git a/samples/snippets/csharp/VS_Snippets_Misc/plinq/cs/plinqsamples.cs b/samples/snippets/csharp/VS_Snippets_Misc/plinq/cs/plinqsamples.cs index d289ee2ae1ec6..a04bbdff394f2 100644 --- a/samples/snippets/csharp/VS_Snippets_Misc/plinq/cs/plinqsamples.cs +++ b/samples/snippets/csharp/VS_Snippets_Misc/plinq/cs/plinqsamples.cs @@ -836,7 +836,7 @@ static void PLINQExceptions_1() // Using the raw string array here. See PLINQ Data Sample. string[] customers = GetCustomersAsStrings().ToArray(); - // First, we must simulate some currupt input. + // First, we must simulate some corrupt input. customers[54] = "###"; var parallelQuery = from cust in customers.AsParallel() @@ -869,7 +869,7 @@ static void PLINQExceptions_2() { var customers = GetCustomersAsStrings().ToArray(); // Using the raw string array here. - // First, we must simulate some currupt input + // First, we must simulate some corrupt input customers[54] = "###"; // Assume that in this app, we expect malformed data diff --git a/samples/snippets/csharp/VS_Snippets_Misc/tpl/cs/tpl.cs b/samples/snippets/csharp/VS_Snippets_Misc/tpl/cs/tpl.cs index fd9b2e8539696..bd990ba954ed0 100644 --- a/samples/snippets/csharp/VS_Snippets_Misc/tpl/cs/tpl.cs +++ b/samples/snippets/csharp/VS_Snippets_Misc/tpl/cs/tpl.cs @@ -157,7 +157,7 @@ public class Tree public T Data; } - // By using tasks explcitly. + // By using tasks explicitly. public static void DoTree(Tree tree, Action action) { if (tree == null) return; diff --git a/samples/snippets/csharp/VS_Snippets_Misc/tpl_partitioners/cs/00/partitioners.cs b/samples/snippets/csharp/VS_Snippets_Misc/tpl_partitioners/cs/00/partitioners.cs index 927538e4f3f90..91e5a3a41d3c0 100644 --- a/samples/snippets/csharp/VS_Snippets_Misc/tpl_partitioners/cs/00/partitioners.cs +++ b/samples/snippets/csharp/VS_Snippets_Misc/tpl_partitioners/cs/00/partitioners.cs @@ -254,7 +254,7 @@ public override IList> GetPartitions(int partitionCount) _list.Add(GetItemsForPartition(start, end)); - // For demonstratation. + // For demonstration. Console.WriteLine("start = {0} b (end) = {1}", start, end); } return (IList>)_list; @@ -302,7 +302,7 @@ private int[] CalculatePartitions(int partitionCount, int sourceLength) IEnumerator GetItemsForPartition(int start, int end) { - // For demonstration purpsoes. Each thread receives its own enumerator. + // For demonstration purposes. Each thread receives its own enumerator. Console.WriteLine("called on thread {0}", Thread.CurrentThread.ManagedThreadId); for (int i = start; i < end; i++) yield return source[i]; diff --git a/samples/snippets/csharp/VS_Snippets_Misc/tpl_unwrap/cs/unwrapprogram.cs b/samples/snippets/csharp/VS_Snippets_Misc/tpl_unwrap/cs/unwrapprogram.cs index 43fbff0bdedb4..1a4a060ca98d4 100644 --- a/samples/snippets/csharp/VS_Snippets_Misc/tpl_unwrap/cs/unwrapprogram.cs +++ b/samples/snippets/csharp/VS_Snippets_Misc/tpl_unwrap/cs/unwrapprogram.cs @@ -96,15 +96,15 @@ static void Main() // and the following method will not compile. // With Unwrap: antecedent.Result = byte and // we can work directly with the result of the Compute method. - var lastStep = stepTwo.ContinueWith( (antecedant) => + var lastStep = stepTwo.ContinueWith( (antecedent) => { - if (antecedant.Result >= threshold) + if (antecedent.Result >= threshold) { return Task.Factory.StartNew( () => Console.WriteLine("Program complete. Final = 0x{0:x} threshold = 0x{1:x}", stepTwo.Result, threshold)); } else { - return DoSomeOtherAsyncronousWork(stepTwo.Result, threshold); + return DoSomeOtherAsynchronousWork(stepTwo.Result, threshold); } }); @@ -122,7 +122,7 @@ private static byte[] GetData() return bytes; } - static Task DoSomeOtherAsyncronousWork(int i, byte b2) + static Task DoSomeOtherAsynchronousWork(int i, byte b2) { return Task.Factory.StartNew(() => { diff --git a/samples/snippets/csharp/VS_Snippets_Misc/tpldataflow_cancellationwinforms/cs/cancellationwinforms/form1.cs b/samples/snippets/csharp/VS_Snippets_Misc/tpldataflow_cancellationwinforms/cs/cancellationwinforms/form1.cs index 318a92d79ff08..f4e0b6686ff82 100644 --- a/samples/snippets/csharp/VS_Snippets_Misc/tpldataflow_cancellationwinforms/cs/cancellationwinforms/form1.cs +++ b/samples/snippets/csharp/VS_Snippets_Misc/tpldataflow_cancellationwinforms/cs/cancellationwinforms/form1.cs @@ -48,7 +48,7 @@ public Form1() { InitializeComponent(); - // Create the UI task scheduler from the current sychronization + // Create the UI task scheduler from the current synchronization // context. uiTaskScheduler = TaskScheduler.FromCurrentSynchronizationContext(); } @@ -198,4 +198,4 @@ await Task.WhenAll( } } } -// \ No newline at end of file +// diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs deleted file mode 100644 index 7728f96f5b5b9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/FileIteration.cs +++ /dev/null @@ -1,616 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -//using System.Text; -//using System.IO; -using System.Diagnostics; - -namespace FileIteration -{ - //How to: Iterate Through Folders Recursively (C# Programming Guide) - //add starting tag 1 here - #region snip1 - // - public class RecursiveFileSearch - { - static System.Collections.Specialized.StringCollection log = new System.Collections.Specialized.StringCollection(); - - static void Main() - { - // Start with drives if you have to search the entire computer. - string[] drives = System.Environment.GetLogicalDrives(); - - foreach (string dr in drives) - { - System.IO.DriveInfo di = new System.IO.DriveInfo(dr); - - // Here we skip the drive if it is not ready to be read. This - // is not necessarily the appropriate action in all scenarios. - if (!di.IsReady) - { - Console.WriteLine("The drive {0} could not be read", di.Name); - continue; - } - System.IO.DirectoryInfo rootDir = di.RootDirectory; - WalkDirectoryTree(rootDir); - } - - // Write out all the files that could not be processed. - Console.WriteLine("Files with restricted access:"); - foreach (string s in log) - { - Console.WriteLine(s); - } - // Keep the console window open in debug mode. - Console.WriteLine("Press any key"); - Console.ReadKey(); - } - - static void WalkDirectoryTree(System.IO.DirectoryInfo root) - { - System.IO.FileInfo[] files = null; - System.IO.DirectoryInfo[] subDirs = null; - - // First, process all the files directly under this folder - try - { - files = root.GetFiles("*.*"); - } - // This is thrown if even one of the files requires permissions greater - // than the application provides. - catch (UnauthorizedAccessException e) - { - // This code just writes out the message and continues to recurse. - // You may decide to do something different here. For example, you - // can try to elevate your privileges and access the file again. - log.Add(e.Message); - } - - catch (System.IO.DirectoryNotFoundException e) - { - Console.WriteLine(e.Message); - } - - if (files != null) - { - foreach (System.IO.FileInfo fi in files) - { - // In this example, we only access the existing FileInfo object. If we - // want to open, delete or modify the file, then - // a try-catch block is required here to handle the case - // where the file has been deleted since the call to TraverseTree(). - Console.WriteLine(fi.FullName); - } - - // Now find all the subdirectories under this directory. - subDirs = root.GetDirectories(); - - foreach (System.IO.DirectoryInfo dirInfo in subDirs) - { - // Resursive call for each subdirectory. - WalkDirectoryTree(dirInfo); - } - } - } - } - // - #endregion - - // How to: Iterate Through Folders without Using Recursion (C# Programming Guide) - // - public class StackBasedIteration - { - static void Main(string[] args) - { - // Specify the starting folder on the command line, or in - // Visual Studio in the Project > Properties > Debug pane. - TraverseTree(args[0]); - - Console.WriteLine("Press any key"); - Console.ReadKey(); - } - - public static void TraverseTree(string root) - { - // Data structure to hold names of subfolders to be - // examined for files. - Stack dirs = new Stack(20); - - if (!System.IO.Directory.Exists(root)) - { - throw new ArgumentException(); - } - dirs.Push(root); - - while (dirs.Count > 0) - { - string currentDir = dirs.Pop(); - string[] subDirs; - try - { - subDirs = System.IO.Directory.GetDirectories(currentDir); - } - // An UnauthorizedAccessException exception will be thrown if we do not have - // discovery permission on a folder or file. It may or may not be acceptable - // to ignore the exception and continue enumerating the remaining files and - // folders. It is also possible (but unlikely) that a DirectoryNotFound exception - // will be raised. This will happen if currentDir has been deleted by - // another application or thread after our call to Directory.Exists. The - // choice of which exceptions to catch depends entirely on the specific task - // you are intending to perform and also on how much you know with certainty - // about the systems on which this code will run. - catch (UnauthorizedAccessException e) - { - Console.WriteLine(e.Message); - continue; - } - catch (System.IO.DirectoryNotFoundException e) - { - Console.WriteLine(e.Message); - continue; - } - - string[] files = null; - try - { - files = System.IO.Directory.GetFiles(currentDir); - } - - catch (UnauthorizedAccessException e) - { - - Console.WriteLine(e.Message); - continue; - } - - catch (System.IO.DirectoryNotFoundException e) - { - Console.WriteLine(e.Message); - continue; - } - // Perform the required action on each file here. - // Modify this block to perform your required task. - foreach (string file in files) - { - try - { - // Perform whatever action is required in your scenario. - System.IO.FileInfo fi = new System.IO.FileInfo(file); - Console.WriteLine("{0}: {1}, {2}", fi.Name, fi.Length, fi.CreationTime); - } - catch (System.IO.FileNotFoundException e) - { - // If file was deleted by a separate application - // or thread since the call to TraverseTree() - // then just continue. - Console.WriteLine(e.Message); - continue; - } - } - - // Push the subdirectories onto the stack for traversal. - // This could also be done before handing the files. - foreach (string str in subDirs) - dirs.Push(str); - } - } - } - // - - // How to: Read From a Text File - // - class ReadFromFile - { - static void Main() - { - // The files used in this example are created in the topic - // How to: Write to a Text File. You can change the path and - // file name to substitute text files of your own. - - // Example #1 - // Read the file as one string. - string text = System.IO.File.ReadAllText(@"C:\Users\Public\TestFolder\WriteText.txt"); - - // Display the file contents to the console. Variable text is a string. - System.Console.WriteLine("Contents of WriteText.txt = {0}", text); - - // Example #2 - // Read each line of the file into a string array. Each element - // of the array is one line of the file. - string[] lines = System.IO.File.ReadAllLines(@"C:\Users\Public\TestFolder\WriteLines2.txt"); - - // Display the file contents by using a foreach loop. - System.Console.WriteLine("Contents of WriteLines2.txt = "); - foreach (string line in lines) - { - // Use a tab to indent each line of the file. - Console.WriteLine("\t" + line); - } - - // Keep the console window open in debug mode. - Console.WriteLine("Press any key to exit."); - System.Console.ReadKey(); - } - } - // - - // - class FileTest - { - static void Main() - { - bool exists; - string fileName = @"c:\users\public\TestFolder\test.txt"; - exists = System.IO.File.Exists(fileName); - System.Console.Write(exists); - - string s = System.IO.File.ReadAllText(fileName); - - System.IO.StreamWriter sw = System.IO.File.AppendText(fileName); - sw.WriteLine("new text"); - sw.Close(); - - Console.WriteLine(s); - - // Keep the console window open in debug mode. - Console.WriteLine("Press any key to exit."); - System.Console.ReadKey(); - } - } - // - - // - class FileSysInfo - { - static void Main() - { - // You can also use System.Environment.GetLogicalDrives to - // obtain names of all logical drives on the computer. - System.IO.DriveInfo di = new System.IO.DriveInfo(@"C:\"); - Console.WriteLine(di.TotalFreeSpace); - Console.WriteLine(di.VolumeLabel); - - // Get the root directory and print out some information about it. - System.IO.DirectoryInfo dirInfo = di.RootDirectory; - Console.WriteLine(dirInfo.Attributes.ToString()); - - // Get the files in the directory and print out some information about them. - System.IO.FileInfo[] fileNames = dirInfo.GetFiles("*.*"); - - foreach (System.IO.FileInfo fi in fileNames) - { - Console.WriteLine("{0}: {1}: {2}", fi.Name, fi.LastAccessTime, fi.Length); - } - - // Get the subdirectories directly that is under the root. - // See "How to: Iterate Through a Directory Tree" for an example of how to - // iterate through an entire tree. - System.IO.DirectoryInfo[] dirInfos = dirInfo.GetDirectories("*.*"); - - foreach (System.IO.DirectoryInfo d in dirInfos) - { - Console.WriteLine(d.Name); - } - - // The Directory and File classes provide several static methods - // for accessing files and directories. - - // Get the current application directory. - string currentDirName = System.IO.Directory.GetCurrentDirectory(); - Console.WriteLine(currentDirName); - - // Get an array of file names as strings rather than FileInfo objects. - // Use this method when storage space is an issue, and when you might - // hold on to the file name reference for a while before you try to access - // the file. - string[] files = System.IO.Directory.GetFiles(currentDirName, "*.txt"); - - foreach (string s in files) - { - // Create the FileInfo object only when needed to ensure - // the information is as current as possible. - System.IO.FileInfo fi = null; - try - { - fi = new System.IO.FileInfo(s); - } - catch (System.IO.FileNotFoundException e) - { - // To inform the user and continue is - // sufficient for this demonstration. - // Your application may require different behavior. - Console.WriteLine(e.Message); - continue; - } - Console.WriteLine("{0} : {1}",fi.Name, fi.Directory); - } - - // Change the directory. In this case, first check to see - // whether it already exists, and create it if it does not. - // If this is not appropriate for your application, you can - // handle the System.IO.IOException that will be raised if the - // directory cannot be found. - if (!System.IO.Directory.Exists(@"C:\Users\Public\TestFolder\")) - { - System.IO.Directory.CreateDirectory(@"C:\Users\Public\TestFolder\"); - } - - System.IO.Directory.SetCurrentDirectory(@"C:\Users\Public\TestFolder\"); - - currentDirName = System.IO.Directory.GetCurrentDirectory(); - Console.WriteLine(currentDirName); - - // Keep the console window open in debug mode. - Console.WriteLine("Press any key to exit."); - Console.ReadKey(); - } - } - // - - // - // Simple synchronous file copy operations with no user interface. - // To run this sample, first create the following directories and files: - // C:\Users\Public\TestFolder - // C:\Users\Public\TestFolder\test.txt - // C:\Users\Public\TestFolder\SubDir\test.txt - public class SimpleFileCopy - { - static void Main() - { - string fileName = "test.txt"; - string sourcePath = @"C:\Users\Public\TestFolder"; - string targetPath = @"C:\Users\Public\TestFolder\SubDir"; - - // Use Path class to manipulate file and directory paths. - string sourceFile = System.IO.Path.Combine(sourcePath, fileName); - string destFile = System.IO.Path.Combine(targetPath, fileName); - - // To copy a folder's contents to a new location: - // Create a new target folder. - // If the directory already exists, this method does not create a new directory. - System.IO.Directory.CreateDirectory(targetPath); - - // To copy a file to another location and - // overwrite the destination file if it already exists. - System.IO.File.Copy(sourceFile, destFile, true); - - // To copy all the files in one directory to another directory. - // Get the files in the source folder. (To recursively iterate through - // all subfolders under the current directory, see - // "How to: Iterate Through a Directory Tree.") - // Note: Check for target path was performed previously - // in this code example. - if (System.IO.Directory.Exists(sourcePath)) - { - string[] files = System.IO.Directory.GetFiles(sourcePath); - - // Copy the files and overwrite destination files if they already exist. - foreach (string s in files) - { - // Use static Path methods to extract only the file name from the path. - fileName = System.IO.Path.GetFileName(s); - destFile = System.IO.Path.Combine(targetPath, fileName); - System.IO.File.Copy(s, destFile, true); - } - } - else - { - Console.WriteLine("Source path does not exist!"); - } - - // Keep console window open in debug mode. - Console.WriteLine("Press any key to exit."); - Console.ReadKey(); - } - } - // - - // - // Simple synchronous file move operations with no user interface. - public class SimpleFileMove - { - static void Main() - { - string sourceFile = @"C:\Users\Public\public\test.txt"; - string destinationFile = @"C:\Users\Public\private\test.txt"; - - // To move a file or folder to a new location: - System.IO.File.Move(sourceFile, destinationFile); - - // To move an entire directory. To programmatically modify or combine - // path strings, use the System.IO.Path class. - System.IO.Directory.Move(@"C:\Users\Public\public\test\", @"C:\Users\Public\private"); - } - } - // - - // - // Simple synchronous file deletion operations with no user interface. - // To run this sample, create the following files on your drive: - // C:\Users\Public\DeleteTest\test1.txt - // C:\Users\Public\DeleteTest\test2.txt - // C:\Users\Public\DeleteTest\SubDir\test2.txt - - public class SimpleFileDelete - { - static void Main() - { - // Delete a file by using File class static method... - if(System.IO.File.Exists(@"C:\Users\Public\DeleteTest\test.txt")) - { - // Use a try block to catch IOExceptions, to - // handle the case of the file already being - // opened by another process. - try - { - System.IO.File.Delete(@"C:\Users\Public\DeleteTest\test.txt"); - } - catch (System.IO.IOException e) - { - Console.WriteLine(e.Message); - return; - } - } - - // ...or by using FileInfo instance method. - System.IO.FileInfo fi = new System.IO.FileInfo(@"C:\Users\Public\DeleteTest\test2.txt"); - try - { - fi.Delete(); - } - catch (System.IO.IOException e) - { - Console.WriteLine(e.Message); - } - - // Delete a directory. Must be writable or empty. - try - { - System.IO.Directory.Delete(@"C:\Users\Public\DeleteTest"); - } - catch (System.IO.IOException e) - { - Console.WriteLine(e.Message); - } - // Delete a directory and all subdirectories with Directory static method... - if(System.IO.Directory.Exists(@"C:\Users\Public\DeleteTest")) - { - try - { - System.IO.Directory.Delete(@"C:\Users\Public\DeleteTest", true); - } - - catch (System.IO.IOException e) - { - Console.WriteLine(e.Message); - } - } - - // ...or with DirectoryInfo instance method. - System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(@"C:\Users\Public\public"); - // Delete this dir and all subdirs. - try - { - di.Delete(true); - } - catch (System.IO.IOException e) - { - Console.WriteLine(e.Message); - } - } - } - // - - // -public class CreateFileOrFolder -{ - static void Main() - { - // Specify a name for your top-level folder. - string folderName = @"c:\Top-Level Folder"; - - // To create a string that specifies the path to a subfolder under your - // top-level folder, add a name for the subfolder to folderName. - string pathString = System.IO.Path.Combine(folderName, "SubFolder"); - - // You can write out the path name directly instead of using the Combine - // method. Combine just makes the process easier. - string pathString2 = @"c:\Top-Level Folder\SubFolder2"; - - // You can extend the depth of your path if you want to. - //pathString = System.IO.Path.Combine(pathString, "SubSubFolder"); - - // Create the subfolder. You can verify in File Explorer that you have this - // structure in the C: drive. - // Local Disk (C:) - // Top-Level Folder - // SubFolder - System.IO.Directory.CreateDirectory(pathString); - - // Create a file name for the file you want to create. - string fileName = System.IO.Path.GetRandomFileName(); - - // This example uses a random string for the name, but you also can specify - // a particular name. - //string fileName = "MyNewFile.txt"; - - // Use Combine again to add the file name to the path. - pathString = System.IO.Path.Combine(pathString, fileName); - - // Verify the path that you have constructed. - Console.WriteLine("Path to my file: {0}\n", pathString); - - // Check that the file doesn't already exist. If it doesn't exist, create - // the file and write integers 0 - 99 to it. - // DANGER: System.IO.File.Create will overwrite the file if it already exists. - // This could happen even with random file names, although it is unlikely. - if (!System.IO.File.Exists(pathString)) - { - using (System.IO.FileStream fs = System.IO.File.Create(pathString)) - { - for (byte i = 0; i < 100; i++) - { - fs.WriteByte(i); - } - } - } - else - { - Console.WriteLine("File \"{0}\" already exists.", fileName); - return; - } - - // Read and display the data from your file. - try - { - byte[] readBuffer = System.IO.File.ReadAllBytes(pathString); - foreach (byte b in readBuffer) - { - Console.Write(b + " "); - } - Console.WriteLine(); - } - catch (System.IO.IOException e) - { - Console.WriteLine(e.Message); - } - - // Keep the console window open in debug mode. - System.Console.WriteLine("Press any key to exit."); - System.Console.ReadKey(); - } - // Sample output: - - // Path to my file: c:\Top-Level Folder\SubFolder\ttxvauxe.vv0 - - //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 - //30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 - // 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 8 - //3 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 -} - // - - namespace FileProgressNamespace - { - - // - // The following using directive requires a project reference to Microsoft.VisualBasic. - using Microsoft.VisualBasic.FileIO; - - class FileProgress - { - static void Main() - { - // Specify the path to a folder that you want to copy. If the folder is small, - // you won't have time to see the progress dialog box. - string sourcePath = @"C:\Windows\symbols\"; - // Choose a destination for the copied files. - string destinationPath = @"C:\TestFolder"; - - FileSystem.CopyDirectory(sourcePath, destinationPath, - UIOption.AllDialogs); - } - } - // - } -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/csFilesFolders.csproj b/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/csFilesFolders.csproj deleted file mode 100644 index 7d0d739d21463..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csFilesAndFolders/CS/csFilesFolders.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net48 - - FileIteration.FileProgressNamespace.FileProgress - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideGenerics/CS/Generics3.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideGenerics/CS/Generics3.cs index aa3146575f626..b185f869bd8a1 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideGenerics/CS/Generics3.cs +++ b/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideGenerics/CS/Generics3.cs @@ -21,7 +21,7 @@ public static void Add(List source, List destination) // // Workaround for interface - // Variance in one direction only so type expressinos are natural + // Variance in one direction only so type expressions are natural public static IEnumerable Convert(IEnumerable source) where S : D { diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/WinSound.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/WinSound.cs deleted file mode 100644 index 4ac1e9da51c90..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideInterop/CS/WinSound.cs +++ /dev/null @@ -1,133 +0,0 @@ -//----------------------------------------------------------------------------- -// -using System.Windows.Forms; -using System.Runtime.InteropServices; - -namespace WinSound -{ - public partial class Form1 : Form - { - private TextBox textBox1; - private Button button1; - - public Form1() // Constructor. - { - InitializeComponent(); - } - - [DllImport("winmm.DLL", EntryPoint = "PlaySound", SetLastError = true, CharSet = CharSet.Unicode, ThrowOnUnmappableChar = true)] - private static extern bool PlaySound(string szSound, System.IntPtr hMod, PlaySoundFlags flags); - - [System.Flags] - public enum PlaySoundFlags : int - { - SND_SYNC = 0x0000, - SND_ASYNC = 0x0001, - SND_NODEFAULT = 0x0002, - SND_LOOP = 0x0008, - SND_NOSTOP = 0x0010, - SND_NOWAIT = 0x00002000, - SND_FILENAME = 0x00020000, - SND_RESOURCE = 0x00040004 - } - - private void button1_Click(object sender, System.EventArgs e) - { - var dialog1 = new OpenFileDialog(); - - dialog1.Title = "Browse to find sound file to play"; - dialog1.InitialDirectory = @"c:\"; - // - dialog1.Filter = "Wav Files (*.wav)|*.wav"; - // - dialog1.FilterIndex = 2; - dialog1.RestoreDirectory = true; - - if (dialog1.ShowDialog() == DialogResult.OK) - { - textBox1.Text = dialog1.FileName; - PlaySound(dialog1.FileName, new System.IntPtr(), PlaySoundFlags.SND_SYNC); - } - } - - private void Form1_Load(object sender, EventArgs e) - { - // Including this empty method in the sample because in the IDE, - // when users click on the form, generates code that looks for a default method - // with this name. We add it here to prevent confusion for those using the samples. - } - } -} -// - -//----------------------------------------------------------------------------- -// Form1.Designer.cs -//----------------------------------------------------------------------------- -namespace WinSound -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components=null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing&&(components!=null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components=new System.ComponentModel.Container(); - this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font; - this.Text="WinSound"; - - // - this.button1 = new System.Windows.Forms.Button(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(192, 40); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(88, 24); - this.button1.TabIndex = 0; - this.button1.Text = "Browse"; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(8, 40); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(168, 20); - this.textBox1.TabIndex = 1; - this.textBox1.Text = "FIle path"; - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(5, 13); - this.ClientSize = new System.Drawing.Size(292, 266); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.button1); - this.Name = "Form1"; - this.Text = "Platform Invoke WinSound C#"; - this.ResumeLayout(false); - this.PerformLayout(); - // - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideLINQ/CS/csRef30LangFeatures_2.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideLINQ/CS/csRef30LangFeatures_2.cs index adabf15bea831..8cdb507066d9b 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideLINQ/CS/csRef30LangFeatures_2.cs +++ b/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideLINQ/CS/csRef30LangFeatures_2.cs @@ -347,7 +347,7 @@ static void Method() } } - //Object and collection intializers + //Object and collection initializers // // The following code consolidates examples from the topic. @@ -650,7 +650,7 @@ static void Main() // class MQ { - // QueryMethhod1 returns a query as its value. + // QueryMethod1 returns a query as its value. IEnumerable QueryMethod1(ref int[] ints) { var intsToStrings = from i in ints diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideProperties/CS/Properties.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideProperties/CS/Properties.cs index 6afa3ad76eb85..0a93af9ca52cd 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideProperties/CS/Properties.cs +++ b/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideProperties/CS/Properties.cs @@ -214,7 +214,7 @@ where s.Contains('x') Console.WriteLine("RemoveAt is not implemented in ReadOnlyCollection"); } - //add name then interate private list + //add name then iterate private list List badList = ro.BadProp; badList.Add("Ha ha"); diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/account.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/account.cs deleted file mode 100644 index 22e56f007add8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/account.cs +++ /dev/null @@ -1,16 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace OfficeWalkthroughCS -{ - // - class Account - { - public int ID { get; set; } - public double Balance { get; set; } - } - // -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/officewalkthroughcs.csproj b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/officewalkthroughcs.csproj deleted file mode 100644 index 2f7a0c3e5e27c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/officewalkthroughcs.csproj +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - {BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - AnyCPU - {4E123DE4-B7B1-4FFF-A4A6-75843359CB59} - Library - false - OfficeWalkthroughCS - OfficeWalkthroughCS - v4.0 - Client - VSTO40 - - - - - 4.0 - true - False - true - publish\ - - en - 1.0.0.0 - true - true - 7 - days - OfficeWalkthroughCS - - - OfficeWalkthroughCS - - 3 - - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Microsoft Office 2007 Primary Interop Assemblies - true - - - False - Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29 - true - - - False - Windows Installer 3.1 - true - - - - - Excel - - - - true - full - false - bin\Debug\ - false - $(DefineConstants);DEBUG;TRACE - 4 - AllRules.ruleset - - - - pdbonly - true - bin\Release\ - false - $(DefineConstants);TRACE - 4 - AllRules.ruleset - - - - - - - - - - - - - True - - - True - - - True - - - True - - - - True - - - True - - - - - - - - - - - - - - - - - - True - - - - - - - Code - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - Code - - - ThisAddIn.cs - - - ThisAddIn.Designer.xml - - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/assemblyinfo.cs deleted file mode 100644 index abb53bb28b6fb..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/assemblyinfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OfficeWalkthroughCS")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft IT")] -[assembly: AssemblyProduct("OfficeWalkthroughCS")] -[assembly: AssemblyCopyright("Copyright © Microsoft IT 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c62bbe65-1b38-4f56-95ca-adb8a0e1cd09")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] - -internal static class DesignTimeConstants { - internal const string Version = "10.0.0.0"; - internal const string DesignerAssembly = "Microsoft.VisualStudio.Tools.Office.Designer, Version=" + Version + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; - internal const string TypeCodeDomSerializer = "System.ComponentModel.Design.Serialization.TypeCodeDomSerializer, System.Design"; - internal const string RibbonTypeSerializer = "Microsoft.VisualStudio.Tools.Office.Ribbon.Serialization.RibbonTypeCodeDomSerializer, " + DesignerAssembly; -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/resources.designer.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/resources.designer.cs deleted file mode 100644 index 993177c31c3d8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/resources.designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OfficeWalkthroughCS.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OfficeWalkthroughCS.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/resources.resx b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/resources.resx deleted file mode 100644 index af7dbebbacef5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/settings.designer.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/settings.designer.cs deleted file mode 100644 index fc60b4acc9089..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/settings.designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OfficeWalkthroughCS.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/settings.settings b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/settings.settings deleted file mode 100644 index 39645652af629..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/properties/settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs deleted file mode 100644 index 8a0997c8001fd..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.cs +++ /dev/null @@ -1,184 +0,0 @@ -// -using System; -using System.Linq; -using System.Text; -using System.Xml.Linq; -// -using System.Collections.Generic; -using Excel = Microsoft.Office.Interop.Excel; -using Word = Microsoft.Office.Interop.Word; -// -using Office = Microsoft.Office.Core; -using Microsoft.Office.Tools.Excel; - -namespace OfficeWalkthroughCS -{ - public partial class ThisAddIn - { - private void ThisAddIn_Startup(object sender, System.EventArgs e) - { - // - var bankAccounts = new List - { - new Account - { - ID = 345, - Balance = 541.27 - }, - new Account - { - ID = 123, - Balance = -127.44 - } - }; - // - - // - DisplayInExcel(bankAccounts, (account, cell) => - // This multiline lambda expression sets custom processing rules - // for the bankAccounts. - { - cell.Value = account.ID; - cell.Offset[0, 1].Value = account.Balance; - if (account.Balance < 0) - { - cell.Interior.Color = 255; - cell.Offset[0, 1].Interior.Color = 255; - } - }); - // - - // - var wordApp = new Word.Application(); - wordApp.Visible = true; - wordApp.Documents.Add(); - wordApp.Selection.PasteSpecial(Link: true, DisplayAsIcon: true); - // - } - - // - void DisplayInExcel(IEnumerable accounts, - Action DisplayFunc) - { - var excelApp = this.Application; - // Add a new Excel workbook. - excelApp.Workbooks.Add(); - excelApp.Visible = true; - excelApp.Range["A1"].Value = "ID"; - excelApp.Range["B1"].Value = "Balance"; - excelApp.Range["A2"].Select(); - - foreach (var ac in accounts) - { - DisplayFunc(ac, excelApp.ActiveCell); - excelApp.ActiveCell.Offset[1, 0].Select(); - } - // Copy the results to the Clipboard. - excelApp.Range["A1:B3"].Copy(); - } - // - - void Pieces(IEnumerable accounts, - Action DisplayFunc) - { - var excelApp = this.Application; - // Add a new Excel workbook. - excelApp.Workbooks.Add(); - excelApp.Visible = true; - excelApp.Range["A1"].Value = "ID"; - excelApp.Range["B1"].Value = "Balance"; - excelApp.Range["A2"].Select(); - - foreach (var ac in accounts) - { - DisplayFunc(ac, excelApp.ActiveCell); - excelApp.ActiveCell.Offset[1, 0].Select(); - } - // Copy the results to the Clipboard. - excelApp.Range["A1:B3"].Copy(); - - // - excelApp.Columns[1].AutoFit(); - excelApp.Columns[2].AutoFit(); - // - - // - // Visual C# 2010 provides indexed properties for COM programming. - excelApp.Range["A1"].Value = "ID"; - excelApp.ActiveCell.Offset[1, 0].Select(); - // - - // - // In Visual C# 2008, you cannot access the Range, Offset, and Value - // properties directly. - excelApp.get_Range("A1").Value2 = "ID"; - excelApp.ActiveCell.get_Offset(1, 0).Select(); - // - - // - // Casting is required in Visual C# 2008. - ((Excel.Range)excelApp.Columns[1]).AutoFit(); - - // Casting is not required in Visual C# 2010. - excelApp.Columns[1].AutoFit(); - // - - var wordApp = new Word.Application(); - wordApp.Visible = true; - wordApp.Documents.Add(); - - // - // Call to PasteSpecial in Visual C# 2008. - object iconIndex = Type.Missing; - object link = true; - object placement = Type.Missing; - object displayAsIcon = true; - object dataType = Type.Missing; - object iconFileName = Type.Missing; - object iconLabel = Type.Missing; - wordApp.Selection.PasteSpecial(ref iconIndex, - ref link, - ref placement, - ref displayAsIcon, - ref dataType, - ref iconFileName, - ref iconLabel); - - // Call to PasteSpecial in Visual C# 2010. - wordApp.Selection.PasteSpecial(Link: true, DisplayAsIcon: true); - // - - // Snippets 12 and 13 are from Using Type dynamic. - // - // Before the introduction of dynamic. - ((Excel.Range)excelApp.Cells[1, 1]).Value2 = "Name"; - Excel.Range range2008 = (Excel.Range)excelApp.Cells[1, 1]; - // - - // - // After the introduction of dynamic, the access to the Value property and - // the conversion to Excel.Range are handled by the run-time COM binder. - excelApp.Cells[1, 1].Value = "Name"; - Excel.Range range2010 = excelApp.Cells[1, 1]; - // - } - - private void ThisAddIn_Shutdown(object sender, System.EventArgs e) - { - } - - #region VSTO generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InternalStartup() - { - this.Startup += new System.EventHandler(ThisAddIn_Startup); - this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); - } - - #endregion - } -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.designer.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.designer.cs deleted file mode 100644 index dae437a800331..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.designer.cs +++ /dev/null @@ -1,237 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#pragma warning disable 414 -namespace OfficeWalkthroughCS { - - - /// - [Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(0)] - [global::System.Security.Permissions.PermissionSetAttribute(global::System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")] - public sealed partial class ThisAddIn : Microsoft.Office.Tools.AddInBase { - - internal Microsoft.Office.Tools.CustomTaskPaneCollection CustomTaskPanes; - - internal Microsoft.Office.Tools.SmartTagCollection VstoSmartTags; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - private global::System.Object missing = global::System.Type.Missing; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - internal Microsoft.Office.Interop.Excel.Application Application; - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - public ThisAddIn(global::Microsoft.Office.Tools.Excel.ApplicationFactory factory, global::System.IServiceProvider serviceProvider) : - base(factory, serviceProvider, "AddIn", "ThisAddIn") { - Globals.Factory = factory; - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - protected override void Initialize() { - base.Initialize(); - this.Application = this.GetHostItem(typeof(Microsoft.Office.Interop.Excel.Application), "Application"); - Globals.ThisAddIn = this; - global::System.Windows.Forms.Application.EnableVisualStyles(); - this.InitializeCachedData(); - this.InitializeControls(); - this.InitializeComponents(); - this.InitializeData(); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - protected override void FinishInitialization() { - this.InternalStartup(); - this.OnStartup(); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - protected override void InitializeDataBindings() { - this.BeginInitialization(); - this.BindToData(); - this.EndInitialization(); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - private void InitializeCachedData() { - if ((this.DataHost == null)) { - return; - } - if (this.DataHost.IsCacheInitialized) { - this.DataHost.FillCachedData(this); - } - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - private void InitializeData() { - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - private void BindToData() { - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - private void StartCaching(string MemberName) { - this.DataHost.StartCaching(this, MemberName); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - private void StopCaching(string MemberName) { - this.DataHost.StopCaching(this, MemberName); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - private bool IsCached(string MemberName) { - return this.DataHost.IsCached(this, MemberName); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - private void BeginInitialization() { - this.BeginInit(); - this.CustomTaskPanes.BeginInit(); - this.VstoSmartTags.BeginInit(); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - private void EndInitialization() { - this.VstoSmartTags.EndInit(); - this.CustomTaskPanes.EndInit(); - this.EndInit(); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - private void InitializeControls() { - this.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(null, null, "CustomTaskPanes", "CustomTaskPanes", this); - this.VstoSmartTags = Globals.Factory.CreateSmartTagCollection(null, null, "VstoSmartTags", "VstoSmartTags", this); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - private void InitializeComponents() { - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - private bool NeedsFill(string MemberName) { - return this.DataHost.NeedsFill(this, MemberName); - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] - protected override void OnShutdown() { - this.VstoSmartTags.Dispose(); - this.CustomTaskPanes.Dispose(); - base.OnShutdown(); - } - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - internal sealed partial class Globals { - - /// - private Globals() { - } - - private static ThisAddIn _ThisAddIn; - - private static global::Microsoft.Office.Tools.Excel.ApplicationFactory _factory; - - private static ThisRibbonCollection _ThisRibbonCollection; - - internal static ThisAddIn ThisAddIn { - get { - return _ThisAddIn; - } - set { - if ((_ThisAddIn == null)) { - _ThisAddIn = value; - } - else { - throw new System.NotSupportedException(); - } - } - } - - internal static global::Microsoft.Office.Tools.Excel.ApplicationFactory Factory { - get { - return _factory; - } - set { - if ((_factory == null)) { - _factory = value; - } - else { - throw new System.NotSupportedException(); - } - } - } - - internal static ThisRibbonCollection Ribbons { - get { - if ((_ThisRibbonCollection == null)) { - _ThisRibbonCollection = new ThisRibbonCollection(_factory.GetRibbonFactory()); - } - return _ThisRibbonCollection; - } - } - } - - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")] - internal sealed partial class ThisRibbonCollection : Microsoft.Office.Tools.Ribbon.RibbonCollectionBase { - - /// - internal ThisRibbonCollection(global::Microsoft.Office.Tools.Ribbon.RibbonFactory factory) : - base(factory) { - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.designer.xml b/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.designer.xml deleted file mode 100644 index 4ac908e9c4420..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csofficewalkthrough/cs/thisaddin.designer.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/snippets.5000.json b/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/snippets.5000.json deleted file mode 100644 index e806749a1991d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/snippets.5000.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "host": "visualstudio", - "expectederrors": [ - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideindexedproperties/cs/Program.cs", - "line": 5, - "column": 25, - "error": "CS0234" - } - ] -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/namedandoptionalsnippets.csproj b/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/namedandoptionalsnippets.csproj deleted file mode 100644 index 2d77b4d0db23a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/namedandoptionalsnippets.csproj +++ /dev/null @@ -1,93 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20319 - 2.0 - {595F32EC-B330-4DA1-9D79-9E5E1EA6DDAB} - Exe - Properties - NamedAndOptionalSnippets - NamedAndOptionalSnippets - v4.8 - 512 - OfficeHowTo.WordProgram - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - - - - - - - - - - {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52} - 2 - 8 - 0 - primary - False - True - - - {00020813-0000-0000-C000-000000000046} - 1 - 9 - 0 - primary - False - True - - - {00020905-0000-0000-C000-000000000046} - 8 - 7 - 0 - primary - False - True - - - {0002E157-0000-0000-C000-000000000046} - 5 - 3 - 0 - primary - False - True - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/program.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/program.cs deleted file mode 100644 index c33087a508f26..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/program.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Snippets 5000 Note: -// The container used for building our samples doesn't include the Office assemblies. -// This sample will generate a few errors in the CI build. Those are expected, -// so the build passes. -// -// If you update this sample, make sure to build it locally. -// Then, make sure no new errors are added. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace NamedAndOptionalSnippets -{ - // - class NamedExample - { - static void Main(string[] args) - { - // The method can be called in the normal way, by using positional arguments. - PrintOrderDetails("Gift Shop", 31, "Red Mug"); - - // Named arguments can be supplied for the parameters in any order. - PrintOrderDetails(orderNum: 31, productName: "Red Mug", sellerName: "Gift Shop"); - PrintOrderDetails(productName: "Red Mug", sellerName: "Gift Shop", orderNum: 31); - - // Named arguments mixed with positional arguments are valid - // as long as they are used in their correct position. - PrintOrderDetails("Gift Shop", 31, productName: "Red Mug"); - PrintOrderDetails(sellerName: "Gift Shop", 31, productName: "Red Mug"); - PrintOrderDetails("Gift Shop", orderNum: 31, "Red Mug"); - - // However, mixed arguments are invalid if used out-of-order. - // The following statements will cause a compiler error. - // PrintOrderDetails(productName: "Red Mug", 31, "Gift Shop"); - // PrintOrderDetails(31, sellerName: "Gift Shop", "Red Mug"); - // PrintOrderDetails(31, "Red Mug", sellerName: "Gift Shop"); - } - - static void PrintOrderDetails(string sellerName, int orderNum, string productName) - { - if (string.IsNullOrWhiteSpace(sellerName)) - { - throw new ArgumentException(message: "Seller name cannot be null or empty.", paramName: nameof(sellerName)); - } - - Console.WriteLine($"Seller: {sellerName}, Order #: {orderNum}, Product: {productName}"); - } - } -// -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/snippets.5000.json b/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/snippets.5000.json deleted file mode 100644 index 7e7fdb56f58ec..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/snippets.5000.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "host": "visualstudio", - "expectederrors": [ - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/Program.cs", - "line": 6, - "column": 25, - "error": "CS0234" - }, - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguidenamedandoptional/cs/WordProgram.cs", - "line": 8, - "column": 24, - "error": "CS0234" - } - ] -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs deleted file mode 100644 index c3ee1fbcd673b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/program.cs +++ /dev/null @@ -1,198 +0,0 @@ -// Snippets 5000 Note: -// The container used for building our samples doesn't include the Office assemblies. -// This sample will generate a few errors in the CI build. Those are expected, -// so the build passes. -// -// If you update this sample, make sure to build it locally. -// Then, make sure no new errors are added. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -// -using Excel = Microsoft.Office.Interop.Excel; -using Word = Microsoft.Office.Interop.Word; -// - -namespace OfficeProgrammingWalkthrough -{ - class Program - { - static void Main(string[] args) - { - // - // Create a list of accounts. - var bankAccounts = new List { - new Account { - ID = 345678, - Balance = 541.27 - }, - new Account { - ID = 1230221, - Balance = -127.44 - } - }; - // - - // - // Display the list in an Excel spreadsheet. - DisplayInExcel(bankAccounts); - // - - // - // Create a Word document that contains an icon that links to - // the spreadsheet. - CreateIconInWordDoc(); - // - } - - // - static void DisplayInExcel(IEnumerable accounts) - { - var excelApp = new Excel.Application(); - // Make the object visible. - excelApp.Visible = true; - - // Create a new, empty workbook and add it to the collection returned - // by property Workbooks. The new workbook becomes the active workbook. - // Add has an optional parameter for specifying a particular template. - // Because no argument is sent in this example, Add creates a new workbook. - excelApp.Workbooks.Add(); - - // This example uses a single workSheet. The explicit type casting is - // removed in a later procedure. - Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet; - } - // - - // - static void CreateIconInWordDoc() - { - var wordApp = new Word.Application(); - wordApp.Visible = true; - - // The Add method has four reference parameters, all of which are - // optional. Visual C# allows you to omit arguments for them if - // the default values are what you want. - wordApp.Documents.Add(); - - // PasteSpecial has seven reference parameters, all of which are - // optional. This example uses named arguments to specify values - // for two of the parameters. Although these are reference - // parameters, you do not need to use the ref keyword, or to create - // variables to send in as arguments. You can send the values directly. - wordApp.Selection.PasteSpecial( Link: true, DisplayAsIcon: true); - } - // - - static void DisplayInExcelFull(IEnumerable accounts) - { - var excelApp = new Excel.Application(); - // Make the object visible. - excelApp.Visible = true; - - // Create a new, empty workbook and add it to the collection returned - // by property Workbooks. The new workbook becomes the active workbook. - // Add has an optional parameter for specifying a particular template. - // Because no argument is sent in this example, Add creates a new workbook. - excelApp.Workbooks.Add(); - - // This example uses a single workSheet. - Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet; - - // - // Establish column headings in cells A1 and B1. - workSheet.Cells[1, "A"] = "ID Number"; - workSheet.Cells[1, "B"] = "Current Balance"; - // - - // - // Establish column headings. Both parameters must be supplied in - // Visual C# 2008 or earlier versions. - //workSheet.get_Range("A1", Type.Missing).Value2 = "ID Number"; - //workSheet.get_Range("B1", Type.Missing).Value2 = "Current Balance"; - // Move to the next row. - //workSheet.get_Range("A2", Type.Missing).Select(); - // - - // - - var row = 1; - foreach (var acct in accounts) - { - row++; - workSheet.Cells[row, "A"] = acct.ID; - workSheet.Cells[row, "B"] = acct.Balance; - } - // - - // Columns returns a Range object that represents all the columns - // on the active worksheet. AutoFit fits the width of the columns - // to their content. - //ExcelApp.Columns.AutoFit(); - - // - workSheet.Columns[1].AutoFit(); - workSheet.Columns[2].AutoFit(); - // - - // - ((Excel.Range)workSheet.Columns[1]).AutoFit(); - ((Excel.Range)workSheet.Columns[2]).AutoFit(); - // - - // - // Call to AutoFormat in Visual C# 2010. - workSheet.Range["A1", "B3"].AutoFormat( - Excel.XlRangeAutoFormat.xlRangeAutoFormatClassic2); - // - - // - // Call to AutoFormat in Visual C# 2010. - workSheet.Range["A1", "B3"].AutoFormat(Format: - Excel.XlRangeAutoFormat.xlRangeAutoFormatClassic2); - // - - // - // Put the spreadsheet contents on the clipboard. The Copy method has one - // optional parameter for specifying a destination. Because no argument - // is sent, the destination is the Clipboard. - workSheet.Range["A1:B3"].Copy(); - // - - //ExcelApp.get_Range("A5:C6").PasteSpecial( Transpose: true); - //dynamic val = Type.Missing; - //ExcelApp.get_Range("A5:C6").PasteSpecial(val, val, val, Transpose: true); - //ExcelApp.get_Range("A5:C6").Copy(); - } - - // These examples are in Named and Optional, main topic. Can be deleted here. - static void TestExcelCom() - { - var excelApp = new Microsoft.Office.Interop.Excel.Application(); - var myFormat = Microsoft.Office.Interop.Excel.XlRangeAutoFormat.xlRangeAutoFormatAccounting1; - - // Using named and optional arguments, you can supply arguments for - // only the parameters for which you do not want to use the default - // value, and omit arguments for the other parameters. In the following - // call, a value is sent for only one parameter. - excelApp.get_Range("A1", "B4").AutoFormat( Format: myFormat ); - - // In Visual C# 2008 and earlier versions, you need to supply an argument for - // every parameter. The following call supplies a value for the first - // parameter, and sends a placeholder value for the other six. The - // default values are used for those parameters. - excelApp.get_Range("A1", "B4").AutoFormat(myFormat, Type.Missing, - Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); - } - } - - // - public class Account - { - public int ID { get; set; } - public double Balance { get; set; } - } - // -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/snippets.5000.json b/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/snippets.5000.json deleted file mode 100644 index a94f0d3398fd9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/snippets.5000.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "host": "visualstudio", - "expectederrors": [ - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/Program.cs", - "line": 6, - "column": 25, - "error": "CS0234" - }, - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/Program.cs", - "line": 7, - "column": 24, - "error": "CS0234" - }, - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/Walkthrough.cs", - "line": 5, - "column": 25, - "error": "CS0234" - }, - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/Walkthrough.cs", - "line": 6, - "column": 24, - "error": "CS0234" - }, - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/Program.cs(6,25)", - "line": 6, - "column": 25, - "error": "CS0234" - }, - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/Program.cs(7,24)", - "line": 7, - "column": 24, - "error": "CS0234" - }, - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/Walkthrough.cs(5,25)", - "line": 5, - "column": 25, - "error": "CS0234" - }, - { - "file": "samples/snippets/csharp/VS_Snippets_VBCSharp/csprogguideofficehowto/cs/Walkthrough.cs(6,24)", - "line": 6, - "column": 24, - "error": "CS0234" - } - ] -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsMethodParams/CS/csrefKeywordsMethodParams.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsMethodParams/CS/csrefKeywordsMethodParams.cs index acf36bc0b3b62..46c2b92970737 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsMethodParams/CS/csrefKeywordsMethodParams.cs +++ b/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsMethodParams/CS/csrefKeywordsMethodParams.cs @@ -19,7 +19,7 @@ static void Main() } // - /* Commented out because this delibarately produces a compile error. + /* Commented out because this deliberately produces a compile error. // class CS0663_Example { diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsOperator/CS/csrefKeywordsOperators.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsOperator/CS/csrefKeywordsOperators.cs index ebee4f81c5d63..5acc12e8ae3d7 100644 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsOperator/CS/csrefKeywordsOperators.cs +++ b/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsOperator/CS/csrefKeywordsOperators.cs @@ -33,7 +33,7 @@ public class DerivedC : BaseC } // - namespace newModifier //to allow resuse of BaseC and DerivedC + namespace newModifier //to allow reuse of BaseC and DerivedC { // public class BaseC diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/program.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/program.cs deleted file mode 100644 index cb0df823df0b8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthrough/cs/program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DynamicWalkthrough -{ - class Program - { - static void Main(string[] args) - { - // - dynamic rFile = new ReadOnlyFile(@"..\..\..\TextFile1.txt"); - foreach (string line in rFile.Customer) - { - Console.WriteLine(line); - } - Console.WriteLine("----------------------------"); - foreach (string line in rFile.Customer(StringSearchOption.Contains, true)) - { - Console.WriteLine(line); - } - // - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs/program.cs b/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs/program.cs deleted file mode 100644 index 0ccb72d357f45..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_VBCSharp/vbdynamicwalkthroughironpython/cs/program.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -// -using System.Linq; -using Microsoft.Scripting.Hosting; -using IronPython.Hosting; -// - -namespace IronPythonSample -{ - class Program - { - static void Main(string[] args) - { - // - // Set the current directory to the IronPython libraries. - System.IO.Directory.SetCurrentDirectory( - Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + - @"\IronPython 2.7\Lib"); - - // Create an instance of the random.py IronPython library. - Console.WriteLine("Loading random.py"); - ScriptRuntime py = Python.CreateRuntime(); - dynamic random = py.UseFile("random.py"); - Console.WriteLine("random.py loaded."); - // - - // - // Initialize an enumerable set of integers. - int[] items = Enumerable.Range(1, 7).ToArray(); - - // Randomly shuffle the array of integers by using IronPython. - for (int i = 0; i < 5; i++) - { - random.shuffle(items); - foreach (int item in items) - { - Console.WriteLine(item); - } - Console.WriteLine("-------------------"); - } - // - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/AnimatedPopup/CS/AnimatedPopup.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/AnimatedPopup/CS/AnimatedPopup.csproj deleted file mode 100644 index 453ceabc0b8ce..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/AnimatedPopup/CS/AnimatedPopup.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - WinExe - net48 - true - SDKSample - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/AnimatedPopup/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/AnimatedPopup/CS/Window1.xaml deleted file mode 100644 index 606eadf04f31a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/AnimatedPopup/CS/Window1.xaml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - Rotating Popup - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/AnimatedPopup/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/AnimatedPopup/CS/app.xaml deleted file mode 100644 index aba23a5ab28e7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/AnimatedPopup/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/BindDPtoDP/CS/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/BindDPtoDP/CS/App.xaml deleted file mode 100644 index e1ed6bfc330c9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/BindDPtoDP/CS/App.xaml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/BindDPtoDP/CS/BindDPtoDP.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/BindDPtoDP/CS/BindDPtoDP.csproj deleted file mode 100644 index 87a1d4ad14187..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/BindDPtoDP/CS/BindDPtoDP.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - WinExe - net48 - true - SDKSample - BindDPtoDP - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/BindDPtoDP/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/BindDPtoDP/CS/Window1.xaml deleted file mode 100644 index dadbd5047ba45..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/BindDPtoDP/CS/Window1.xaml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - Choose a Color: - - Green - Blue - Red - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/BindToEnum/CS/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/BindToEnum/CS/App.xaml deleted file mode 100644 index 098ab1b8fff54..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/BindToEnum/CS/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/BindToEnum/CS/BindtoEnum.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/BindToEnum/CS/BindtoEnum.csproj deleted file mode 100644 index ebdca2e031887..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/BindToEnum/CS/BindtoEnum.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - WinExe - net48 - true - SDKSample - BindtoEnum - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/BindToEnum/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/BindToEnum/CS/Window1.xaml deleted file mode 100644 index c68b4d5d0a6c4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/BindToEnum/CS/Window1.xaml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - Choose the HorizontalAlignment value of the Button: - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/ExpenseItHome.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/ExpenseItHome.xaml.cs deleted file mode 100644 index 4d6ec594e0467..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/ExpenseItHome.xaml.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseItHome.xaml - /// - public partial class ExpenseItHome : Page - { - public ExpenseItHome() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/ExpenseReportPage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/ExpenseReportPage.xaml deleted file mode 100644 index d2505a43c2e8d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/ExpenseReportPage.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/ExpenseReportPage.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/ExpenseReportPage.xaml.cs deleted file mode 100644 index 90571ecadce56..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/ExpenseReportPage.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseReportPage.xaml - /// - public partial class ExpenseReportPage : Page - { - public ExpenseReportPage() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/MainWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/MainWindow.xaml deleted file mode 100644 index 2e7231688083a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/MainWindow.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/MainWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/MainWindow.xaml.cs deleted file mode 100644 index cdbd1e9b232a7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/MainWindow.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : NavigationWindow - { - public MainWindow() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/watermark.png b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/watermark.png deleted file mode 100644 index 82b2f637f20e9..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt4/watermark.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/App.xaml deleted file mode 100644 index 620d1e29e91d7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/App.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/App.xaml.cs deleted file mode 100644 index 1a7166361dab2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Windows; - -namespace ExpenseIt4 -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseIt5.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseIt5.csproj deleted file mode 100644 index d975cfca8f154..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseIt5.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - WinExe - net48 - true - ExpenseIt5 - ExpenseIt5 - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseItHome.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseItHome.xaml deleted file mode 100644 index 3e10d44cde346..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseItHome.xaml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mike - Lisa - John - Mary - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseItHome.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseItHome.xaml.cs deleted file mode 100644 index 4d6ec594e0467..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseItHome.xaml.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseItHome.xaml - /// - public partial class ExpenseItHome : Page - { - public ExpenseItHome() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseReportPage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseReportPage.xaml deleted file mode 100644 index d2505a43c2e8d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseReportPage.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseReportPage.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseReportPage.xaml.cs deleted file mode 100644 index 90571ecadce56..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/ExpenseReportPage.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseReportPage.xaml - /// - public partial class ExpenseReportPage : Page - { - public ExpenseReportPage() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/MainWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/MainWindow.xaml deleted file mode 100644 index 2e7231688083a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/MainWindow.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/MainWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/MainWindow.xaml.cs deleted file mode 100644 index cdbd1e9b232a7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/MainWindow.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : NavigationWindow - { - public MainWindow() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/watermark.png b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/watermark.png deleted file mode 100644 index 82b2f637f20e9..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt5/watermark.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/App.xaml deleted file mode 100644 index ad01d80363cd8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/App.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/App.xaml.cs deleted file mode 100644 index 3dd79bf2a65a3..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Windows; - -namespace ExpenseIt6 -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseIt6.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseIt6.csproj deleted file mode 100644 index 4be38158183e1..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseIt6.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - WinExe - net48 - true - ExpenseIt6 - ExpenseIt6 - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseItHome.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseItHome.xaml deleted file mode 100644 index c64b11234d6be..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseItHome.xaml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mike - Lisa - John - Mary - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseItHome.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseItHome.xaml.cs deleted file mode 100644 index 4f90cdc5fb57c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseItHome.xaml.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseItHome.xaml - /// - public partial class ExpenseItHome : Page - { - public ExpenseItHome() - { - InitializeComponent(); - } - - // - private void Button_Click(object sender, RoutedEventArgs e) - { - // View Expense Report - ExpenseReportPage expenseReportPage = new ExpenseReportPage(); - this.NavigationService.Navigate(expenseReportPage); - } - // - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseReportPage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseReportPage.xaml deleted file mode 100644 index cfd0c1270c899..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseReportPage.xaml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseReportPage.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseReportPage.xaml.cs deleted file mode 100644 index 90571ecadce56..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/ExpenseReportPage.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseReportPage.xaml - /// - public partial class ExpenseReportPage : Page - { - public ExpenseReportPage() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/MainWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/MainWindow.xaml deleted file mode 100644 index 2e7231688083a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/MainWindow.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/MainWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/MainWindow.xaml.cs deleted file mode 100644 index cdbd1e9b232a7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/MainWindow.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : NavigationWindow - { - public MainWindow() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/watermark.png b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/watermark.png deleted file mode 100644 index 82b2f637f20e9..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt6/watermark.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/App.xaml deleted file mode 100644 index fde5353f8efc3..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/App.xaml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/App.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/App.xaml.cs deleted file mode 100644 index 63435644d994e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Windows; - -namespace ExpenseIt7 -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseIt7.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseIt7.csproj deleted file mode 100644 index 505c3658e6f10..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseIt7.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - WinExe - net48 - true - ExpenseIt7 - ExpenseIt7 - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseItHome.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseItHome.xaml deleted file mode 100644 index 3afa2f987fdff..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseItHome.xaml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mike - Lisa - John - Mary - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseItHome.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseItHome.xaml.cs deleted file mode 100644 index 81ebc332f0821..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseItHome.xaml.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseItHome.xaml - /// - public partial class ExpenseItHome : Page - { - public ExpenseItHome() - { - InitializeComponent(); - } - - private void Button_Click(object sender, RoutedEventArgs e) - { - // View Expense Report - ExpenseReportPage expenseReportPage = new ExpenseReportPage(); - this.NavigationService.Navigate(expenseReportPage); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseReportPage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseReportPage.xaml deleted file mode 100644 index 9f43355d62e03..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseReportPage.xaml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseReportPage.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseReportPage.xaml.cs deleted file mode 100644 index 90571ecadce56..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/ExpenseReportPage.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseReportPage.xaml - /// - public partial class ExpenseReportPage : Page - { - public ExpenseReportPage() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/MainWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/MainWindow.xaml deleted file mode 100644 index 2e7231688083a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/MainWindow.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/MainWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/MainWindow.xaml.cs deleted file mode 100644 index cdbd1e9b232a7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/MainWindow.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : NavigationWindow - { - public MainWindow() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/watermark.png b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/watermark.png deleted file mode 100644 index 82b2f637f20e9..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt7/watermark.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/App.xaml deleted file mode 100644 index bedf6f37fbd6f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/App.xaml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/App.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/App.xaml.cs deleted file mode 100644 index 39bc4d582592e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Windows; - -namespace ExpenseIt8 -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseIt8.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseIt8.csproj deleted file mode 100644 index 09a0cc8758ae8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseIt8.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - WinExe - net48 - true - ExpenseIt8 - ExpenseIt8 - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseItHome.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseItHome.xaml deleted file mode 100644 index 542fd95597114..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseItHome.xaml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseItHome.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseItHome.xaml.cs deleted file mode 100644 index fbf537e014d81..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseItHome.xaml.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseItHome.xaml - /// - public partial class ExpenseItHome : Page - { - public ExpenseItHome() - { - InitializeComponent(); - } - - // - private void Button_Click(object sender, RoutedEventArgs e) - { - // View Expense Report - ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); - this.NavigationService.Navigate(expenseReportPage); - } - // - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseReportPage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseReportPage.xaml deleted file mode 100644 index 632225febf591..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseReportPage.xaml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseReportPage.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseReportPage.xaml.cs deleted file mode 100644 index 6088a71b43faf..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/ExpenseReportPage.xaml.cs +++ /dev/null @@ -1,37 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseReportPage.xaml - /// - // - public partial class ExpenseReportPage : Page - { - public ExpenseReportPage() - { - InitializeComponent(); - } - - // Custom constructor to pass expense report data - public ExpenseReportPage(object data):this() - { - // Bind to expense report data. - this.DataContext = data; - } - } - // -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/MainWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/MainWindow.xaml deleted file mode 100644 index 2e7231688083a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/MainWindow.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/MainWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/MainWindow.xaml.cs deleted file mode 100644 index cdbd1e9b232a7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/MainWindow.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : NavigationWindow - { - public MainWindow() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/access-by-line.txt b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/access-by-line.txt deleted file mode 100644 index 70f4f841e753f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/access-by-line.txt +++ /dev/null @@ -1 +0,0 @@ -ExpenseItHome.xaml: ~/docs/framework/wpf/getting-started/walkthrough-my-first-wpf-desktop-application.md diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/watermark.png b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/watermark.png deleted file mode 100644 index 82b2f637f20e9..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt8/watermark.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/App.xaml deleted file mode 100644 index aea8dbd4a3706..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/App.xaml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/App.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/App.xaml.cs deleted file mode 100644 index 1f1886998d6a8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/App.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Windows; - -namespace ExpenseIt9 -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseIt9.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseIt9.csproj deleted file mode 100644 index 1bec056e51201..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseIt9.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - WinExe - net48 - true - ExpenseIt9 - ExpenseIt9 - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseItHome.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseItHome.xaml deleted file mode 100644 index 4b7ceee13c93e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseItHome.xaml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseItHome.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseItHome.xaml.cs deleted file mode 100644 index b36807ac7fbd0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseItHome.xaml.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseItHome.xaml - /// - public partial class ExpenseItHome : Page - { - public ExpenseItHome() - { - InitializeComponent(); - } - - private void Button_Click(object sender, RoutedEventArgs e) - { - // View Expense Report - ExpenseReportPage expenseReportPage = new ExpenseReportPage(this.peopleListBox.SelectedItem); - this.NavigationService.Navigate(expenseReportPage); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseReportPage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseReportPage.xaml deleted file mode 100644 index 5f7142a97f8c5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseReportPage.xaml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseReportPage.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseReportPage.xaml.cs deleted file mode 100644 index ba0796b1f3306..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/ExpenseReportPage.xaml.cs +++ /dev/null @@ -1,36 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for ExpenseReportPage.xaml - /// - - public partial class ExpenseReportPage : Page - { - public ExpenseReportPage() - { - InitializeComponent(); - } - - // Custom constructor to pass expense report data - public ExpenseReportPage(object data):this() - { - // Bind to expense report data. - this.DataContext = data; - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/MainWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/MainWindow.xaml deleted file mode 100644 index 2e7231688083a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/MainWindow.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/MainWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/MainWindow.xaml.cs deleted file mode 100644 index cdbd1e9b232a7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/MainWindow.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ExpenseIt -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : NavigationWindow - { - public MainWindow() - { - InitializeComponent(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/access-by-line.txt b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/access-by-line.txt deleted file mode 100644 index c92f6fbf9f9f6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/access-by-line.txt +++ /dev/null @@ -1 +0,0 @@ -MainWindow.xaml.cs: ~/docs/framework/wpf/getting-started/walkthrough-my-first-wpf-desktop-application.md diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/watermark.png b/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/watermark.png deleted file mode 100644 index 82b2f637f20e9..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ExpenseIt/CSharp/ExpenseIt9/watermark.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/FEFocusVisualStyle.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/FEFocusVisualStyle.csproj deleted file mode 100644 index e084c80a00684..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/FEFocusVisualStyle.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - FEFocusVisualStyle - winexe - Debug - bin\$(Configuration)\ - v4.0 - Client - 10.0.20821 - - - - - - - - - - - - - - - - - 4.0 - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/app.xaml deleted file mode 100644 index 5d2533c73812b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/app.xaml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/page1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/page1.xaml deleted file mode 100644 index ab8c82207cf64..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/page1.xaml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/sampleid.txt b/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/sampleid.txt deleted file mode 100644 index 168dc5baa8395..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/FEFocusVisualStyle/CS/sampleid.txt +++ /dev/null @@ -1 +0,0 @@ -wcpsamp_core_focusvisualstyle diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FindText/CSharp/Content/FlowDocumentSample3.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/FindText/CSharp/Content/FlowDocumentSample3.xaml index 8bab8a2b3aae5..4f8609e2ccac7 100644 --- a/samples/snippets/csharp/VS_Snippets_Wpf/FindText/CSharp/Content/FlowDocumentSample3.xaml +++ b/samples/snippets/csharp/VS_Snippets_Wpf/FindText/CSharp/Content/FlowDocumentSample3.xaml @@ -1,6 +1,6 @@ - Planetary + Planetary @@ -9,7 +9,7 @@ Information Table - + @@ -111,14 +111,14 @@ - + The Major Outer Planets - + Jupiter diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FindText/CSharp/SearchWindow.cs b/samples/snippets/csharp/VS_Snippets_Wpf/FindText/CSharp/SearchWindow.cs index bc9041857879b..9887072679bf7 100644 --- a/samples/snippets/csharp/VS_Snippets_Wpf/FindText/CSharp/SearchWindow.cs +++ b/samples/snippets/csharp/VS_Snippets_Wpf/FindText/CSharp/SearchWindow.cs @@ -644,7 +644,7 @@ private void FindTextProvider_Click(object src, RoutedEventArgs e) // An instance of TextPatternRange will become invalid if // one of the following occurs: // 1) The text in the provider changes via some user activity. - // 2) ValuePattern.SetValue is used to programatically change + // 2) ValuePattern.SetValue is used to programmatically change // the value of the text in the provider. // The only way the client application can detect if the text // has changed (to ensure that the ranges are still valid), @@ -936,7 +936,7 @@ void SearchDirection_Click(object sender, RoutedEventArgs e) } // End of document (either the start or end of the document // range depending on search direction) was reached before - // finding another occurence of the search string. + // finding another occurrence of the search string. else { targetResult.Content = "End of document reached."; @@ -1013,7 +1013,7 @@ private void Navigate_Click(object sender, RoutedEventArgs e) TextPatternRange[] selectionRanges = targetTextPattern.GetSelection(); - // Iterate throught the ranges for a text control that supports + // Iterate through the ranges for a text control that supports // multiple selections and move the selections the specified text // unit and direction. foreach (TextPatternRange textRange in selectionRanges) @@ -1260,4 +1260,4 @@ private void CloseApp() } #endregion Target Listeners } -} \ No newline at end of file +} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/FlowDirectionApp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/FlowDirectionApp.csproj deleted file mode 100644 index d8d01f825448e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/FlowDirectionApp.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - FlowDirectionApp - winexe - en-US - Debug - AnyCPU - App.ico - 10.0.20821 - 2.0 - FlowDirectionApp - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/Window1.xaml deleted file mode 100644 index 548d9f45441c0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/Window1.xaml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - This is a right-to-left TextBlock - - - - This is a left-to-right TextBlock - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/app.xaml deleted file mode 100644 index 2e4a6df7b108b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/FlowDirection/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/GradientApp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/GradientApp.csproj deleted file mode 100644 index 480b1aa878a7a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/GradientApp.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - GradientApp - winexe - en-US - Debug - AnyCPU - App.ico - 10.0.20821 - 2.0 - GradientApp - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/Window1.xaml deleted file mode 100644 index 1f449b6b1b1ec..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/Window1.xaml and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/app.xaml deleted file mode 100644 index f6cafc0687e93..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Gradient/CS/app.xaml and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/GridSplitterRowColumn.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/GridSplitterRowColumn.csproj deleted file mode 100644 index 9be27c20d0d96..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/GridSplitterRowColumn.csproj +++ /dev/null @@ -1,57 +0,0 @@ - - - Debug - AnyCPU - {57C9C9FC-0696-4879-A078-09246FD34C93} - SDKSample - GridSplitterRowColumn - 4 - winexe - 1.0.0.* - - 10.0.20821 - 2.0 - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/Window1.xaml deleted file mode 100644 index 9a26dca6845d4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/Window1.xaml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GridSplitter That Overlays Grid: - - This example shows Grid with 3 rows and 3 columns - and 2 GridSplitters that overlay a small portion of - the row(s) or column(s) to which they are assigned. - For this reason, it is important to apply the - GridSplitter controls after the content of the Grid is - defined. The horizontal GridSplitter resizes the first - and second rows. The HorizontalAlignment property for - this GridSplitter is set to "Stretch" and the - VerticalAlignment property is set to "Top". If the - VerticalAlignment property was set to "Bottom" instead, - the GridSplitter would resize the second and third rows. - The vertical GridSplitter resizes the first and second column - in the Grid. The VerticalAlignment property for this GridSplitter - is set to "Stretch" and the HorizontalAlignment property is set - to "Left". If the HorizontalAlignment property was set to "Right" - instead of "Left", the GridSplitter would resize the second - and third columns. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GridSplitter as Entire Column or Row: - - This example shows a Grid with three columns and an - embedded Grid with three rows that is inserted into the - third column of the parent Grid. The GridSplitters in - this example occupy the middle column and middle row - respectively. The vertical GridSplitter is assigned to - the middle column of the parent Grid with the HorizontalAlignment - property set to "Center", the VerticalAlignment property - set to "Stretch" and the Width of the column containing the - GridSplitter set to "Auto". The horizontal GridSplitter is assigned to - the middle row in the embedded Grid with the - HorizontalAlignment property set to "Stretch", the - VerticalAlignment property set to "Center" and the Height of - the row containing the GridSplitter set to "Auto". - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/app.xaml deleted file mode 100644 index 40bb8665b4ad2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/GridSplitterRowColumn/CS/app.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewRowPresenterSample/CS/GridViewHeaderRowPresenterExample.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/GridViewRowPresenterSample/CS/GridViewHeaderRowPresenterExample.csproj deleted file mode 100644 index e4b340c425202..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewRowPresenterSample/CS/GridViewHeaderRowPresenterExample.csproj +++ /dev/null @@ -1,48 +0,0 @@ - - - Debug - AnyCPU - {48FC4244-068D-4EA1-A0EC-F7D72D16B203} - SDKSample - GridViewHeaderRowPresenterExample - 4 - winexe - 1.0.0.* - - 2.0 - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewRowPresenterSample/CS/MyApp.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/GridViewRowPresenterSample/CS/MyApp.xaml deleted file mode 100644 index a5888b3ef8641..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewRowPresenterSample/CS/MyApp.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewRowPresenterSample/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/GridViewRowPresenterSample/CS/Window1.xaml deleted file mode 100644 index 72ab08cf98309..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewRowPresenterSample/CS/Window1.xaml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - 2005/2/1 - - - - - 2006/10/12 - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewWithGroups/CS/GridViewWithGroups.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/GridViewWithGroups/CS/GridViewWithGroups.csproj deleted file mode 100644 index 2b3d7214ad147..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewWithGroups/CS/GridViewWithGroups.csproj +++ /dev/null @@ -1,55 +0,0 @@ - - - Debug - AnyCPU - {48FC4244-068D-4EA1-A0EC-F7D72D16B203} - SDKSample - GridViewWithGroups - 4 - winexe - 1.0.0.* - - 2.0 - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewWithGroups/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/GridViewWithGroups/CS/Window1.xaml deleted file mode 100644 index f4870f9295190..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewWithGroups/CS/Window1.xaml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewWithGroups/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/GridViewWithGroups/CS/app.xaml deleted file mode 100644 index 9712c76c6bd77..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/GridViewWithGroups/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/App.xaml deleted file mode 100644 index 2223a04a57b27..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/App.xaml +++ /dev/null @@ -1,5 +0,0 @@ - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/HOWTONavigationMailTo.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/HOWTONavigationMailTo.csproj deleted file mode 100644 index 640d0390ac590..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/HOWTONavigationMailTo.csproj +++ /dev/null @@ -1,69 +0,0 @@ - - - Debug - AnyCPU - {8C8EFEF2-846A-49F8-8F1D-FC46D1EDE5A4} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - HOWTONavigationMailTo - HOWTONavigationMailTo - 4 - winexe - false - False - Internet - Program - $(WINDIR)\System32\PresentationHost.exe - .xbap - -debug "$(MSBuildProjectDirectory)\bin\$(Configuration)\$(AssemblyName)$(ApplicationExtension)" - 3.0 - true - Web - false - 1.0.0.* - true - true - Publish\ - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - 4.0 - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/HomePage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/HomePage.xaml deleted file mode 100644 index a467f75d97f9d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/HomePage.xaml +++ /dev/null @@ -1,13 +0,0 @@ - - - - mailto: With Email Address - mailto: With Email Address and Subject - mailto: With Email Address, Subject, and Body - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/Properties/app.manifest b/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/Properties/app.manifest deleted file mode 100644 index 5373583adf5b5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/Properties/app.manifest +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/Readme.txt b/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/Readme.txt deleted file mode 100644 index 7652ec8fb24ff..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationMailToSnippet/CS/Readme.txt +++ /dev/null @@ -1,17 +0,0 @@ -.NET Framework 3.0 XAML Browser Application Readme ----------------------------------- -XAML Browser Applications run in a sandbox with "Internet Permissions". -Only those .NET Framework 3.0 features that have been successfully security reviewed and validated as safe by the .NET Framework 3.0 team will run inside the sandbox. - -.NET Framework 3.0 Item Templates - which work in the sandbox? --------------------------------------------------------- -Won't work by design - .NET Framework 3.0 Window - In the internet zone, you don't have the permission to "popup" new windows. - -Debugging XAML Browser Applications - (F5) --------------------------------------------------------- -In order to successfully debug an XAML Browser Application in Visual Studio, you must enable unmanaged code debugging -via the Debug page in the Properties view. Developers using Visual C# and Visual Basic Express do not need to do this. - -The first time that this project is debugged, a dialog may appear stating that there -is no debug information available for PresentationHost.exe. This dialog can be -safely dismissed. diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/Properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/Properties/assemblyinfo.cs deleted file mode 100644 index 0623f6204e968..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/Properties/assemblyinfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AxControl")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("AxControl")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2005")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM componenets. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("cf2c4cc0-f88d-445e-bf1c-9ac3f174af74")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxcontrol.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxcontrol.cs deleted file mode 100644 index 9d8ef0298dfb4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxcontrol.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Text; -using System.Windows.Forms; - -namespace WmpAxLib -{ - public partial class WmpAxControl : UserControl - { - public WmpAxControl() - { - InitializeComponent(); - } - - // - public void Play(string url) - { - this.axWindowsMediaPlayer1.URL = url; - } - // - } -} -// diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxcontrol.designer.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxcontrol.designer.cs deleted file mode 100644 index 3f9af95d586b1..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxcontrol.designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace WmpAxLib -{ - partial class WmpAxControl - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WmpAxControl)); - this.axWindowsMediaPlayer1 = new AxWMPLib.AxWindowsMediaPlayer(); - ((System.ComponentModel.ISupportInitialize)(this.axWindowsMediaPlayer1)).BeginInit(); - this.SuspendLayout(); - // - // axWindowsMediaPlayer1 - // - this.axWindowsMediaPlayer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.axWindowsMediaPlayer1.Enabled = true; - this.axWindowsMediaPlayer1.Location = new System.Drawing.Point(0, 0); - this.axWindowsMediaPlayer1.Name = "axWindowsMediaPlayer1"; - this.axWindowsMediaPlayer1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWindowsMediaPlayer1.OcxState"))); - this.axWindowsMediaPlayer1.Size = new System.Drawing.Size(337, 359); - this.axWindowsMediaPlayer1.TabIndex = 0; - this.axWindowsMediaPlayer1.Text = "axWindowsMediaPlayer1"; - // - // WmpAxControl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.axWindowsMediaPlayer1); - this.Name = "WmpAxControl"; - this.Size = new System.Drawing.Size(337, 359); - ((System.ComponentModel.ISupportInitialize)(this.axWindowsMediaPlayer1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private AxWMPLib.AxWindowsMediaPlayer axWindowsMediaPlayer1; - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxcontrol.resx b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxcontrol.resx deleted file mode 100644 index 29125c65dad7d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxcontrol.resx +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAtwAAAAIB - AAAAAQAAAAAAAAAAAAAAAKIAAAAAAwAACAAAAAAABQAAAAAAAADwPwMAAAAAAAUAAAAAAAAAAAAIAAIA - AAAAAAMAAQAAAAsA//8DAAAAAAALAP//CAACAAAAAAADADIAAAALAAAACAAKAAAAZgB1AGwAbAAAAAsA - AAALAAAACwD//wsA//8LAAAACAACAAAAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAALAAAA1CIAABsl - AAAL - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxlib.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxlib.csproj deleted file mode 100644 index 9612928933882..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/AxControl/wmpaxlib.csproj +++ /dev/null @@ -1,84 +0,0 @@ - - - Debug - AnyCPU - 10.0.20821 - 2.0 - {4788D423-0FFB-4778-905A-76610471029F} - Library - Properties - WmpAxLib - WmpAxLib - v4.8 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - - - - - - - UserControl - - - WmpAxControl.cs - - - - - - - WmpAxControl.cs - - - - - {6BF52A50-394A-11D3-B153-00C04F79FAA6} - 1 - 0 - 0 - aximp - False - - - {00020430-0000-0000-C000-000000000046} - 2 - 0 - 0 - primary - False - - - {6BF52A50-394A-11D3-B153-00C04F79FAA6} - 1 - 0 - 0 - tlbimp - False - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/Properties/assemblyinfo.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/Properties/assemblyinfo.cs deleted file mode 100644 index 4661277103728..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/Properties/assemblyinfo.cs +++ /dev/null @@ -1,52 +0,0 @@ -#region Using directives - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Resources; -using System.Globalization; -using System.Windows; -using System.Runtime.InteropServices; - -#endregion - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HostingAxInWpf")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("HostingAxInWpf")] -[assembly: AssemblyCopyright("Copyright @ Microsoft 2005")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/app.xaml deleted file mode 100644 index ac8b7df6c5689..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/app.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/app.xaml.cs deleted file mode 100644 index b9f2bd197e4a2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/app.xaml.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Windows; - -namespace HostingAxInWpf -{ - /// - /// Interaction logic for app.xaml - /// - - public partial class app : Application - { - void AppStartup(object sender, StartupEventArgs args) - { - Window mainWindow = new Window(); - mainWindow.Show(); - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/hostingaxinwpf.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/hostingaxinwpf.csproj deleted file mode 100644 index 89cb917afb9f1..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/hostingaxinwpf.csproj +++ /dev/null @@ -1,76 +0,0 @@ - - - Debug - AnyCPU - {0D7059BB-6DC1-47A5-8E7D-FAFC25A264AF} - HostingAxInWpf - HostingAxInWpf - 4 - winexe - 1.0.0.* - - 10.0.20821 - 2.0 - v4.8 - - - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false - - - - ..\AxControl\bin\Debug\AxInterop.WMPLib.dll - - - - - 4.0 - - - - - - - - - - - - - - app.xaml - Code - - - Window1.xaml - Code - - - - - - - - - - - - {4788d423-0ffb-4778-905a-76610471029f} - WmpAxLib - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/window1.xaml deleted file mode 100644 index c2b5c91e7595a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/window1.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/window1.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/window1.xaml.cs deleted file mode 100644 index 0940ea9c8ef16..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/HostingAxInWpf/window1.xaml.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -using System.Windows; - -namespace HostingAxInWpf -{ - public partial class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); - } - - // - private void Window_Loaded(object sender, RoutedEventArgs e) - { - // Create the interop host control. - System.Windows.Forms.Integration.WindowsFormsHost host = - new System.Windows.Forms.Integration.WindowsFormsHost(); - - // Create the ActiveX control. - AxWMPLib.AxWindowsMediaPlayer axWmp = new AxWMPLib.AxWindowsMediaPlayer(); - - // Assign the ActiveX control as the host control's child. - host.Child = axWmp; - - // Add the interop host control to the Grid - // control's collection of child controls. - this.grid1.Children.Add(host); - - // Play a .wav file with the ActiveX control. - axWmp.URL = @"C:\Windows\Media\tada.wav"; - } - // - } -} -// diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/hostingaxinwpf.sln b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/hostingaxinwpf.sln deleted file mode 100644 index 289ae238843bc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/hostingaxinwpf.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HostingAxInWpf", "HostingAxInWpf\HostingAxInWpf.csproj", "{0D7059BB-6DC1-47A5-8E7D-FAFC25A264AF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WmpAxLib", "AxControl\WmpAxLib.csproj", "{4788D423-0FFB-4778-905A-76610471029F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0D7059BB-6DC1-47A5-8E7D-FAFC25A264AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0D7059BB-6DC1-47A5-8E7D-FAFC25A264AF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0D7059BB-6DC1-47A5-8E7D-FAFC25A264AF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0D7059BB-6DC1-47A5-8E7D-FAFC25A264AF}.Release|Any CPU.Build.0 = Release|Any CPU - {4788D423-0FFB-4778-905A-76610471029F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4788D423-0FFB-4778-905A-76610471029F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4788D423-0FFB-4778-905A-76610471029F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4788D423-0FFB-4778-905A-76610471029F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/sampleid.txt b/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/sampleid.txt deleted file mode 100644 index 0d9c9aecc711e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingAxInWpf/CSharp/sampleid.txt +++ /dev/null @@ -1 +0,0 @@ -Hosting_Ax_In_Wpf_cs \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf.sln b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf.sln deleted file mode 100644 index 154da16ec1dcd..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HostingWpfUserControlInWf", "HostingWpfUserControlInWf\HostingWpfUserControlInWf.csproj", "{AC6C2739-E6CC-40EC-90BE-5DB65906CE56}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfUserControlHost", "WpfUserControlHost\WpfUserControlHost.csproj", "{954A4BBE-D326-4F34-8B20-0F1437145A98}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AC6C2739-E6CC-40EC-90BE-5DB65906CE56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC6C2739-E6CC-40EC-90BE-5DB65906CE56}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC6C2739-E6CC-40EC-90BE-5DB65906CE56}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC6C2739-E6CC-40EC-90BE-5DB65906CE56}.Release|Any CPU.Build.0 = Release|Any CPU - {954A4BBE-D326-4F34-8B20-0F1437145A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {954A4BBE-D326-4F34-8B20-0F1437145A98}.Debug|Any CPU.Build.0 = Debug|Any CPU - {954A4BBE-D326-4F34-8B20-0F1437145A98}.Release|Any CPU.ActiveCfg = Release|Any CPU - {954A4BBE-D326-4F34-8B20-0F1437145A98}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/ConeControl.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/ConeControl.xaml deleted file mode 100644 index d389e70c3b0be..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/ConeControl.xaml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/ConeControl.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/ConeControl.xaml.cs deleted file mode 100644 index 2aaa1d3e774fc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/ConeControl.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace HostingWpfUserControlInWf -{ - /// - /// Interaction logic for UserControl1.xaml - /// - - public partial class UserControl1 : UserControl - { - public UserControl1() - { - InitializeComponent(); - } - - // To use this handler put Loaded="UserControlLoaded" in root element of .xaml file. - // private void UserControlLoaded(object sender, RoutedEventArgs e) {} - // Sample event handler: - // private void ButtonClick(object sender, RoutedEventArgs e) {} - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/HostingWpfUserControlInWf.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/HostingWpfUserControlInWf.csproj deleted file mode 100644 index 8b80a23bfca37..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/HostingWpfUserControlInWf.csproj +++ /dev/null @@ -1,68 +0,0 @@ - - - Debug - AnyCPU - {AC6C2739-E6CC-40EC-90BE-5DB65906CE56} - HostingWpfUserControlInWf - HostingWpfUserControlInWf - 4 - library - 1.0.0.* - - en-US - 10.0.20821 - 2.0 - v4.0 - Client - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - 4.0 - - - - - - - - - - - - - - - ResXFileCodeGenerator - Resources.cs - - - True - Resources.resx - - - SettingsSingleFileGenerator - Settings.cs - - - True - Settings.settings - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/AssemblyInfo.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/AssemblyInfo.cs deleted file mode 100644 index 5a6c7b2b672fc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,52 +0,0 @@ -#region Using directives - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Resources; -using System.Globalization; -using System.Windows; -using System.Runtime.InteropServices; - -#endregion - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HostingWpfUserControlInWf")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("HostingWpfUserControlInWf")] -[assembly: AssemblyCopyright("Copyright @ Microsoft 2005")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Resources.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Resources.cs deleted file mode 100644 index 9c59b0f1962dc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Resources.cs +++ /dev/null @@ -1,70 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50215.322 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace HostingWpfUserControlInWf.Properties -{ - using System; - using System.IO; - using System.Resources; - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the Strongly Typed Resource Builder - // class via a tool like ResGen or Visual Studio.NET. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - class Resources - { - - private static System.Resources.ResourceManager _resMgr; - - private static System.Globalization.CultureInfo _resCulture; - - /*FamANDAssem*/ - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - public static System.Resources.ResourceManager ResourceManager - { - get - { - if ((_resMgr == null)) - { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Resources", typeof(Resources).Assembly); - _resMgr = temp; - } - return _resMgr; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - public static System.Globalization.CultureInfo Culture - { - get - { - return _resCulture; - } - set - { - _resCulture = value; - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Resources.resx b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Resources.resx deleted file mode 100644 index 3e18af958a282..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Settings.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Settings.cs deleted file mode 100644 index 2b95c9c540e19..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Settings.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50215.322 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace HostingWpfUserControlInWf.Properties -{ - public partial class Settings : System.Configuration.ApplicationSettingsBase - { - private static Settings m_Value; - - private static object m_SyncObject = new object(); - - public static Settings Value - { - get - { - if ((Settings.m_Value == null)) - { - System.Threading.Monitor.Enter(Settings.m_SyncObject); - if ((Settings.m_Value == null)) - { - try - { - Settings.m_Value = new Settings(); - } - finally - { - System.Threading.Monitor.Exit(Settings.m_SyncObject); - } - } - } - return Settings.m_Value; - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Settings.settings b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Settings.settings deleted file mode 100644 index 4024694778b04..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/HostingWpfUserControlInWf/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/SampleID.txt b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/SampleID.txt deleted file mode 100644 index 55cd1811725b7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/SampleID.txt +++ /dev/null @@ -1 +0,0 @@ -Hosting_Wpf_UserControl_In_Wf_cs \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Form1.Designer.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Form1.Designer.cs deleted file mode 100644 index d34c203541ce4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Form1.Designer.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace WpfUserControlHost -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(292, 266); - this.Name = "Form1"; - this.Text = "Form1"; - this.Load += new System.EventHandler(this.Form1_Load); - this.ResumeLayout(false); - - } - - #endregion - } -} - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Form1.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Form1.cs deleted file mode 100644 index 334f887e1b718..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Form1.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using System.Windows.Forms.Integration; - -namespace WpfUserControlHost -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - - // - private void Form1_Load(object sender, EventArgs e) - { - // Create the ElementHost control for hosting the - // WPF UserControl. - ElementHost host = new ElementHost(); - host.Dock = DockStyle.Fill; - - // Create the WPF UserControl. - HostingWpfUserControlInWf.UserControl1 uc = - new HostingWpfUserControlInWf.UserControl1(); - - // Assign the WPF UserControl to the ElementHost control's - // Child property. - host.Child = uc; - - // Add the ElementHost control to the form's - // collection of child controls. - this.Controls.Add(host); - } - // - } -} -// \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Form1.resx b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Form1.resx deleted file mode 100644 index 02bbfa2c72260..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Form1.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Program.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Program.cs deleted file mode 100644 index 74595db2d8817..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Program.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; - -namespace WpfUserControlHost -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.Run(new Form1()); - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/AssemblyInfo.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/AssemblyInfo.cs deleted file mode 100644 index a6b983788e835..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WpfUserControlHost")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("WpfUserControlHost")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2005")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM componenets. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a5461aef-eb05-4d6c-ac94-2dfeb5c9af30")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Resources.Designer.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Resources.Designer.cs deleted file mode 100644 index 2850836513347..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Resources.Designer.cs +++ /dev/null @@ -1,74 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50215.322 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "WpfUserControlHost.Properties.Resources.get_ResourceManager():System.Resources.ResourceManager")] -[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "WpfUserControlHost.Properties.Resources.get_Culture():System.Globalization.CultureInfo")] -[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "WpfUserControlHost.Properties.Resources.set_Culture(System.Globalization.CultureInfo):Void")] - -namespace WpfUserControlHost.Properties -{ - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WpfUserControlHost.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Settings.Designer.cs b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Settings.Designer.cs deleted file mode 100644 index 9e118075b96c6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/Properties/Settings.Designer.cs +++ /dev/null @@ -1,31 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50215.322 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "WpfUserControlHost.Properties.Settings.get_Default():WpfUserControlHost.Properties.Settings")] - -namespace WpfUserControlHost.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = new Settings(); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/WpfUserControlHost.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/WpfUserControlHost.csproj deleted file mode 100644 index 28332b7fb7d1d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/HostingWpfUserControlInWf/CSharp/WpfUserControlHost/WpfUserControlHost.csproj +++ /dev/null @@ -1,86 +0,0 @@ - - - Debug - AnyCPU - 10.0.20821 - 2.0 - {954A4BBE-D326-4F34-8B20-0F1437145A98} - WinExe - Properties - WpfUserControlHost - WpfUserControlHost - v4.0 - Client - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - 4.0 - - - - - - - - - - - - - Form - - - Form1.cs - - - - - Form1.cs - Designer - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - {AC6C2739-E6CC-40EC-90BE-5DB65906CE56} - HostingWpfUserControlInWf - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/ImageApp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/ImageApp.csproj deleted file mode 100644 index 326061a0d6fe3..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/ImageApp.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - ImageApp - winexe - en-US - Debug - AnyCPU - App.ico - 10.0.20821 - 2.0 - ImageApp - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/Window1.xaml deleted file mode 100644 index ddd2acfd9a0fb..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/Window1.xaml and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/app.xaml deleted file mode 100644 index 3ae6fe87281f7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/ms_logo.jpg b/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/ms_logo.jpg deleted file mode 100644 index aa337d07555cc..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Image/CS/ms_logo.jpg and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/App.xaml deleted file mode 100644 index 54e2039c2171e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/App.xaml +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/CSharp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/CSharp.csproj deleted file mode 100644 index 1c05072120a37..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/CSharp.csproj +++ /dev/null @@ -1,76 +0,0 @@ - - - Debug - AnyCPU - {D4F9E8A9-DF89-4B9A-ABA9-6EEE5593C9BC} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Microsoft.Samples.WPF.ImageSample - Microsoft.Samples.WPF.ImageSample - 4 - winexe - 3.0 - true - Web - true - Foreground - 7 - Days - false - false - false - 1.0.0.* - true - true - Publish\ - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - - - Always - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/HomePage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/HomePage.xaml deleted file mode 100644 index ed5a7e7b2b8dd..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/HomePage.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/Images/Watermark.png b/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/Images/Watermark.png deleted file mode 100644 index 82b2f637f20e9..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ImageSample/CS/Images/Watermark.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/LTRRTL.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/LTRRTL.csproj deleted file mode 100644 index 261fd4c4b03f4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/LTRRTL.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - AccessTextSimple - winexe - Debug - App.ico - 10.0.20821 - 2.0 - AccessTextSimple - {32AAFFC0-6E41-44E8-87FA-D82F6C1601E7} - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - true - full - false - .\bin\Debug\ - DEBUG - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/Pane1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/Pane1.xaml deleted file mode 100644 index 9240f71893561..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/Pane1.xaml +++ /dev/null @@ -1,26 +0,0 @@ - - -Bidirectional Text - - The following examples demonstrate: - - - - - This is a left-to-right TextBlock - - - - - - This is a right-to-left TextBlock - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/app.xaml deleted file mode 100644 index c0991ba8ffc70..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LTRRTL/CS/app.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/Label.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/Label.csproj deleted file mode 100644 index def8510ff5e7e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/Label.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - LabelSimple - winexe - Debug - App.ico - 10.0.20821 - 2.0 - SDKSamples - {32AAFFC0-6E41-44E8-87FA-D82F6C1601E7} - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - true - full - false - .\bin\Debug\ - DEBUG - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/Pane1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/Pane1.xaml deleted file mode 100644 index 6d293544f8eef..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/Pane1.xaml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Labels - - - - The following label examples demonstrate: - - - - - - - - - - Binding a label to a text box target. - - - - - - - - - Using the an element that - supports text wrapping inside a label. - - - - - - - - - - Using the AccessText element - to create a label that has an access key and supports text wrapping. - - - - NOTE: Press the ALT key to activate the access keys in the examples. - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/app.xaml deleted file mode 100644 index ce9faea058f91..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LabelSnippet/CS/app.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/LangAttributeApp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/LangAttributeApp.csproj deleted file mode 100644 index 7139e1174d1b1..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/LangAttributeApp.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - LangAttributeApp - winexe - en-US - Debug - AnyCPU - App.ico - 10.0.20821 - 2.0 - LangAttributeApp - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/Window1.xaml deleted file mode 100644 index b71101d98167d..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/Window1.xaml and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/app.xaml deleted file mode 100644 index 11436019eb3b0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LangAttribute/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ListViewItemStyleSnippet/CS/ListViewItemStyle.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/ListViewItemStyleSnippet/CS/ListViewItemStyle.csproj deleted file mode 100644 index 67374039f73fb..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ListViewItemStyleSnippet/CS/ListViewItemStyle.csproj +++ /dev/null @@ -1,55 +0,0 @@ - - - Debug - AnyCPU - {48FC4244-068D-4EA1-A0EC-F7D72D16B203} - SDKSample - ListViewItemStyle - 4 - winexe - 1.0.0.* - - 2.0 - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ListViewItemStyleSnippet/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ListViewItemStyleSnippet/CS/Window1.xaml deleted file mode 100644 index d2bcb56e9724f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ListViewItemStyleSnippet/CS/Window1.xaml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ListViewItemStyleSnippet/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ListViewItemStyleSnippet/CS/app.xaml deleted file mode 100644 index 9712c76c6bd77..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ListViewItemStyleSnippet/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/Button_Loc.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/Button_Loc.csproj deleted file mode 100644 index 6af537e4773c0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/Button_Loc.csproj +++ /dev/null @@ -1,49 +0,0 @@ - - - ButtonLoc - winexe - Debug - App.ico - 10.0.20821 - 2.0 - ButtonLoc - {32AAFFC0-6E41-44E8-87FA-D82F6C1601E7} - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/Pane1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/Pane1.xaml deleted file mode 100644 index 770502837a405..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/Pane1.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/app.xaml deleted file mode 100644 index 25318fab9989a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn/CS/app.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/Button_Loc.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/Button_Loc.csproj deleted file mode 100644 index bb1d6ce491777..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/Button_Loc.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - ButtonLoc - winexe - Debug - App.ico - 10.0.20821 - 2.0 - ButtonLoc - {32AAFFC0-6E41-44E8-87FA-D82F6C1601E7} - bin\$(Configuration)\ - v4.0 - Client - - - - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/MyApp.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/MyApp.xaml deleted file mode 100644 index 643e2afbc93f9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/MyApp.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/Pane1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/Pane1.xaml deleted file mode 100644 index 4326c6e287f16..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationBtn_snip/CS/Pane1.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/Grid_Loc.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/Grid_Loc.csproj deleted file mode 100644 index 98f15fc5c74cb..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/Grid_Loc.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - Grid_Loc - winexe - Debug - App.ico - 10.0.20821 - 2.0 - Grid_Loc - {32AAFFC0-6E41-44E8-87FA-D82F6C1601E7} - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/Pane1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/Pane1.xaml deleted file mode 100644 index f6ecee93b47ff..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/Pane1.xaml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - -Grid - -The following buttons and text are positioned using a Grid. - - -Sets the background - color. - - -Sets the foreground - color. - - -Adds an image as - the button's content. - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/app.xaml deleted file mode 100644 index ef76d2ccae1c4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/app.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/data/flower.jpg b/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/data/flower.jpg deleted file mode 100644 index 7b4ccc47adb16..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/LocalizationGrid/CS/data/flower.jpg and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/App.xaml deleted file mode 100644 index 54e2039c2171e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/App.xaml +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/CSharp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/CSharp.csproj deleted file mode 100644 index b0ac339a41a7c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/CSharp.csproj +++ /dev/null @@ -1,77 +0,0 @@ - - - Debug - AnyCPU - {3F755533-7E41-441D-9D1D-70AC3783BA5D} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Microsoft.Samples.WPF.MediaPlayerAudioSample - Microsoft.Samples.WPF.MediaPlayerAudioSample - 4 - winexe - 3.0 - true - Web - true - Foreground - 7 - Days - false - false - false - 1.0.0.* - true - true - Publish\ - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - - - Always - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/HomePage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/HomePage.xaml deleted file mode 100644 index 66ac2f349b5d5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/HomePage.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/Media/ringin.wav b/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/Media/ringin.wav deleted file mode 100644 index f8d4292d0fb41..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerAudioSample/CS/Media/ringin.wav and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerVideoSample/CS/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerVideoSample/CS/App.xaml deleted file mode 100644 index 54e2039c2171e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerVideoSample/CS/App.xaml +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerVideoSample/CS/CSharp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerVideoSample/CS/CSharp.csproj deleted file mode 100644 index 0b5bba9a4dbd9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerVideoSample/CS/CSharp.csproj +++ /dev/null @@ -1,79 +0,0 @@ - - - Debug - AnyCPU - {CEED6657-AF73-4E33-BD8B-BDDAD7C9484B} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Microsoft.Samples.WPF.MediaPlayerVideoSample - Microsoft.Samples.WPF.MediaPlayerVideoSample - 4 - winexe - 3.0 - true - Web - true - Foreground - 7 - Days - false - false - false - 1.0.0.* - true - true - Publish\ - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - - - - - Always - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerVideoSample/CS/HomePage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerVideoSample/CS/HomePage.xaml deleted file mode 100644 index bbe3f44eb253c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/MediaPlayerVideoSample/CS/HomePage.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MenuItemCommandTask_XAML/CS/MenuItemCommandTask.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/MenuItemCommandTask_XAML/CS/MenuItemCommandTask.csproj deleted file mode 100644 index 738cadac65188..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/MenuItemCommandTask_XAML/CS/MenuItemCommandTask.csproj +++ /dev/null @@ -1,46 +0,0 @@ - - - Debug - AnyCPU - SDKSamples - MenuItemCommandTask - 4 - winexe - 1.0.0.* - - false - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - 4.0 - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MenuItemCommandTask_XAML/CS/MyApp.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/MenuItemCommandTask_XAML/CS/MyApp.xaml deleted file mode 100644 index 4eaa5719892e4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/MenuItemCommandTask_XAML/CS/MyApp.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/MenuItemCommandTask_XAML/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/MenuItemCommandTask_XAML/CS/Window1.xaml deleted file mode 100644 index b89814480ac56..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/MenuItemCommandTask_XAML/CS/Window1.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - The MenuItem will not be enabled until - this TextBox gets keyboard focus - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/App.xaml deleted file mode 100644 index aac42816788bc..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/App.xaml +++ /dev/null @@ -1,4 +0,0 @@ - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/NavigationTopologiesOverviewSnippets.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/NavigationTopologiesOverviewSnippets.csproj deleted file mode 100644 index 1734a4807e2fd..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/NavigationTopologiesOverviewSnippets.csproj +++ /dev/null @@ -1,75 +0,0 @@ - - - Debug - AnyCPU - {08668775-74DD-488E-8C51-1DC253BC16CD} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - NavigationTopologiesOverviewSnippets - NavigationTopologiesOverviewSnippets - 4 - winexe - 3.0 - true - Web - true - Foreground - 7 - Days - false - false - false - 1.0.0.* - true - true - Publish\ - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/Page1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/Page1.xaml deleted file mode 100644 index 50ebacbdf1a81..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/Page1.xaml +++ /dev/null @@ -1,5 +0,0 @@ - - - Navigate to Page2 - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/Page2.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/Page2.xaml deleted file mode 100644 index 2ecc8800471a2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/NavigationTopologiesOverviewSnippets/CS/Page2.xaml +++ /dev/null @@ -1,5 +0,0 @@ - - - Navigate to Page1 - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/NumbersApp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/NumbersApp.csproj deleted file mode 100644 index 410fa461bd5a9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/NumbersApp.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - NumbersApp - winexe - en-US - Debug - AnyCPU - App.ico - 10.0.20821 - 2.0 - NumbersApp - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/Window1.xaml deleted file mode 100644 index 2f5305650e56c..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/Window1.xaml and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/app.xaml deleted file mode 100644 index 7325ec319f6d5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/NumbersApp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/NumbersApp.csproj deleted file mode 100644 index 410fa461bd5a9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/NumbersApp.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - NumbersApp - winexe - en-US - Debug - AnyCPU - App.ico - 10.0.20821 - 2.0 - NumbersApp - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/Window1.xaml deleted file mode 100644 index a57d5c0ab11ee..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/Window1.xaml and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/app.xaml deleted file mode 100644 index 7325ec319f6d5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers2/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/NumbersApp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/NumbersApp.csproj deleted file mode 100644 index 410fa461bd5a9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/NumbersApp.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - NumbersApp - winexe - en-US - Debug - AnyCPU - App.ico - 10.0.20821 - 2.0 - NumbersApp - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/Window1.xaml deleted file mode 100644 index 4f3adad6aeb2c..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/Window1.xaml and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/app.xaml deleted file mode 100644 index 7325ec319f6d5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Numbers3/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/DrawingBrushExample.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/DrawingBrushExample.xaml deleted file mode 100644 index 261b5d4fac5ea..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/DrawingBrushExample.xaml +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Using a DrawingBrush as an Opacity Mask - - - Without Opacity Mask - - - The Opacity Mask - - - With Opacity Mask - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/GradientBrushExample.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/GradientBrushExample.xaml deleted file mode 100644 index 4f81b81891da9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/GradientBrushExample.xaml +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - Use a Gradient as an Opacity Mask - - - - - - - - - - - - - - - - - - Without Opacity Mask - The Opacity Mask - With Opacity Mask - - - - - - - - - - - - - - - - - - - - Lorem ipsum dolor sit amet, consectetuer adipiscing elit, - sed diam nonummy nibh euismod tincidunt - ut laoreet dolore magna aliquam erat volutpat. - Ut wisi enim ad minim veniam, quis nostrud exerci - tation ullamcorper suscipit lobortis nisl ut aliquip ex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Lorem ipsum dolor sit amet, consectetuer adipiscing elit, - sed diam nonummy nibh euismod tincidunt - ut laoreet dolore magna aliquam erat volutpat. - Ut wisi enim ad minim veniam, quis nostrud exerci - tation ullamcorper suscipit lobortis nisl ut aliquip ex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/ImageBrushExample.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/ImageBrushExample.xaml deleted file mode 100644 index cd6a7e0022fe6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/ImageBrushExample.xaml +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - Using an Image as an Opacity Mask - - - - - - - - - - - - - - - - - - - Without Opacity Mask - The Opacity Mask - With Opacity Mask - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/OpacityMasking_markup.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/OpacityMasking_markup.csproj deleted file mode 100644 index be5c4dced4280..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/OpacityMasking_markup.csproj +++ /dev/null @@ -1,57 +0,0 @@ - - - OpacityMaskingExamples - winexe - Release - App.ico - 10.0.20821 - 2.0 - Microsoft.Samples.Graphics.OpacityMask - {25F0CAC3-E0BC-40E6-9E3F-A592D23CF6F0} - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - - - - - - - - - 4.0 - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/SampleViewer.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/SampleViewer.xaml deleted file mode 100644 index 01b7516a99773..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/SampleViewer.xaml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/app.xaml deleted file mode 100644 index 8212aaab19def..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/app.xaml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/sampleImages/Waterlilies.jpg b/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/sampleImages/Waterlilies.jpg deleted file mode 100644 index 8edf2834fa5e4..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/sampleImages/Waterlilies.jpg and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/sampleImages/tornedges.png b/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/sampleImages/tornedges.png deleted file mode 100644 index 4fd3a0a6d756e..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/OpacityMasksSnippet/CS/sampleImages/tornedges.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/MyApp.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/MyApp.xaml deleted file mode 100644 index 2892c57fc11e3..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/MyApp.xaml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/OpenTypeFontSnippets.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/OpenTypeFontSnippets.csproj deleted file mode 100644 index 8104e07e31937..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/OpenTypeFontSnippets.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - Debug - AnyCPU - SDKSample - SDKSample.OpenTypeFontSnippets - 4 - winexe - 1.0.0.* - 2.0 - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - 4.0 - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/PageOne.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/PageOne.xaml deleted file mode 100644 index 919269cc11809..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/PageOne.xaml +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - ANCIENT GREEK MYTHOLOGY - - - - - - ANCIENT - GREEK - MYTHOLOGY - - - - - - A - A - A - C - E - G - O - Q - R - R - S - Y - - - - - - FI - FL - TH - TT - TV - TW - TY - VT - WT - YT - - - - - - CO - LA - LE - LI - LL - LO - LU - - - - - - fi ff fl - - - - - - fi ff fl - - - - - A B C D E F G H I J K L M N - - - A B C D E F G H I J K L M N - - - - - Wishing you a - Happy New Year! - - - - - - Boston, Massachusetts - - - - - - CAPITALS - Capitals - Capitals - - - - - - 1/8 1/4 3/8 1/2 5/8 3/4 7/8 - - - 1/8 1/4 3/8 1/2 5/8 3/4 7/8 - - - - - - 1234567890 - 1234567890 - - - - - - 23 - 14th - - - - - - H2O - Footnote4 - - - - - - Chapter One - - - Chapter One - - - - - - Order #0048-OTC-390 - - Order #0048-OTC-390 - - - - - - Lyon Lyon - - - - - - chapter one - - - - - - CHAPTER ONE - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/Window1.xaml deleted file mode 100644 index e49655edee701..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/Window1.xaml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - 114,131 - - - 114,131 - - - - - - - a banana in a cabana - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/sampleid.txt b/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/sampleid.txt deleted file mode 100644 index 857461c5770ac..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/OpenTypeFontSamples/CS/sampleid.txt +++ /dev/null @@ -1 +0,0 @@ -wcpsamp_mmgraphics_text_opentypefontsnippets_xaml \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/PathsApp.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/PathsApp.csproj deleted file mode 100644 index ddacdbef7c98b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/PathsApp.csproj +++ /dev/null @@ -1,37 +0,0 @@ - - - ImageApp - winexe - en-US - Debug - AnyCPU - App.ico - 10.0.20821 - 2.0 - ImageApp - bin\$(Configuration)\ - v4.0 - Client - - - - - - - - - - - 4.0 - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/Window1.xaml deleted file mode 100644 index 8c1efc746caf6..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/Window1.xaml and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/app.xaml deleted file mode 100644 index f955183e29cee..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/Paths/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ResourcesApplication/CS/ResourcesApplication.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/ResourcesApplication/CS/ResourcesApplication.csproj deleted file mode 100644 index 2f861f949c773..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ResourcesApplication/CS/ResourcesApplication.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - ResourcesApplication - winexe - Debug - bin\$(Configuration)\ - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - 10.0.20821 - - - - - - MSBuild:Compile - Designer - - - - MSBuild:Compile - Designer - - - - - - - - - - - 4.0 - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ResourcesApplication/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ResourcesApplication/CS/app.xaml deleted file mode 100644 index e1d2e38f3e64f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ResourcesApplication/CS/app.xaml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ResourcesApplication/CS/page1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ResourcesApplication/CS/page1.xaml deleted file mode 100644 index ca7973040fbec..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ResourcesApplication/CS/page1.xaml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - - - - - - - - - - Tool bar with one - band and one band index. - - - - - - - - - - - - - - - - - - - - - - - - - - Tool bar with - two bands. The second band has two band indexes. - - - - - - - - - - Times New Roman - - Arial - - Arial Rounded MT Bold - - - - - Normal - Bold - Black - - - - 8 - 10 - 12 - - - - - - Tool bar with - combo boxes as content. - - - - - - - - - - - - - - - - - - Vertical tool - bars. - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/Toolbar.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/Toolbar.csproj deleted file mode 100644 index b1c34c34a265f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/Toolbar.csproj +++ /dev/null @@ -1,43 +0,0 @@ - - - ToolBar - winexe - Debug - App.ico - 10.0.20821 - 2.0 - ToolBar - {32AAFFC0-6E41-44E8-87FA-D82F6C1601E7} - bin\$(Configuration)\ - v4.0 - Client - - - - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/COPY.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/COPY.BMP deleted file mode 100644 index dcbfa45e41143..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/COPY.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/CUT.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/CUT.BMP deleted file mode 100644 index 1c18479eef164..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/CUT.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/HELP.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/HELP.BMP deleted file mode 100644 index 783e8e443c9de..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/HELP.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/NEW.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/NEW.BMP deleted file mode 100644 index 0ab876ed30b3d..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/NEW.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/OPEN.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/OPEN.BMP deleted file mode 100644 index fdeeb23f0b591..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/OPEN.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PAINT.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PAINT.BMP deleted file mode 100644 index fcb6a6e633db4..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PAINT.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PASTE.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PASTE.BMP deleted file mode 100644 index 7b18cf4fa88a4..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PASTE.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PREVIEW.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PREVIEW.BMP deleted file mode 100644 index dbecb2a88a013..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PREVIEW.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PRINT.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PRINT.BMP deleted file mode 100644 index a2cf13fc8aa34..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/PRINT.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/REDO.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/REDO.BMP deleted file mode 100644 index 14df7e6a7e27c..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/REDO.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/SAVE.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/SAVE.BMP deleted file mode 100644 index d5ce955e732d5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/SAVE.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/SPELL.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/SPELL.BMP deleted file mode 100644 index c57ac90a2fd9b..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/SPELL.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/UNDO.BMP b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/UNDO.BMP deleted file mode 100644 index b7b0afe024b04..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/ToolbarGraphics/UNDO.BMP and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/app.xaml deleted file mode 100644 index 6b88707bcd59f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/ToolBarExample/CS/app.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/TreeViewSelectedValue.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/TreeViewSelectedValue.csproj deleted file mode 100644 index f845fcb95d986..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/TreeViewSelectedValue.csproj +++ /dev/null @@ -1,61 +0,0 @@ - - - Debug - AnyCPU - {6569962D-7021-42B5-82DC-D49E698AEF78} - SDKSample - TreeViewSelectedValue - 4 - winexe - 1.0.0.* - - 10.0.20821 - 2.0 - v4.0 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Client - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - False - ..\..\..\..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\Cider\Draft.PresentationDesignMarkup.DLL - - - - - - - - - 4.0 - - - - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/Window1.xaml deleted file mode 100644 index 879618bd6939e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/Window1.xaml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - Jesper Aabergy - Monday - Wednesday - Friday - 8:00am - 12345 - - - Dominik Paiha - Monday - Tuesday - 6:30am - 98765 - - - - - - - - - - - - - - - - - - How SelectedValuePath property determines the SelectedValue - - - - The first-level nodes in this TreeView represent EmployeeInfo data - items in an XMLDataProvider. The SelectedValuePath property of the - TreeView is set to the EmployeeNumber data field that is not - displayed. Because the SelectedValuePath determines the value of the - SelectedValue property, when you select a top-level node, the - SelectedValue property is set to the value of the EmployeeNumber - field and not the displayed EmployeeName field. - - - - - SelectedValuePath: - - - SelectedValue: - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/app.xaml deleted file mode 100644 index 1efc6e217d350..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/data/cat.png b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/data/cat.png deleted file mode 100644 index 01b68cb255a29..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/data/cat.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/data/dog.png b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/data/dog.png deleted file mode 100644 index 8a240c1f61455..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/data/dog.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/data/fish.png b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/data/fish.png deleted file mode 100644 index fcf9a9bc15ea1..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSelectedValue/CS/data/fish.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/SimpleTreeView.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/SimpleTreeView.csproj deleted file mode 100644 index 2681e950a03b7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/SimpleTreeView.csproj +++ /dev/null @@ -1,61 +0,0 @@ - - - Debug - AnyCPU - {6569962D-7021-42B5-82DC-D49E698AEF78} - SimpleTreeView - SimpleTreeView - 4 - winexe - 1.0.0.* - - 10.0.20821 - 2.0 - v4.0 - Client - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/Window1.xaml deleted file mode 100644 index 89b30de511419..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/Window1.xaml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - Employee1 - Jesper - Aaberg - 12345 - - - Employee2 - Dominik - Paiha - 98765 - - - - - - - - - - - - - - - - TreeView control with TreeViewItem content explicitly - defined as Header strings - - - - - - - - - - - - - - - - - TreeView control with leaf nodes specified as - Items that are Buttons - - - - - - - - - - - - - - - - - - - - - TreeView control with root nodes - defined as Buttons and leaf nodes - that are Header strings - - - - - - - - - - - - - - - - - - - - - - - TreeView control created - by databinding with an XMLDataProvider and using a - HierarchicalDataTemplate - - - - - - TreeView control whose Items contain DockPanel controls - with embedded Image and TextBlock content - - - - - - - - Fish - - - - Dog - - - - Cat - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/app.xaml deleted file mode 100644 index 1efc6e217d350..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/app.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/data/cat.png b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/data/cat.png deleted file mode 100644 index 01b68cb255a29..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/data/cat.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/data/dog.png b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/data/dog.png deleted file mode 100644 index 8a240c1f61455..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/data/dog.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/data/fish.png b/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/data/fish.png deleted file mode 100644 index fcf9a9bc15ea1..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/TreeViewSimple/CS/data/fish.png and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/UIAAutomationID_snip/CSharp/FindByAutomationID.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/UIAAutomationID_snip/CSharp/FindByAutomationID.xaml.cs index acb06763548f3..5989d2e6a5383 100644 --- a/samples/snippets/csharp/VS_Snippets_Wpf/UIAAutomationID_snip/CSharp/FindByAutomationID.xaml.cs +++ b/samples/snippets/csharp/VS_Snippets_Wpf/UIAAutomationID_snip/CSharp/FindByAutomationID.xaml.cs @@ -376,7 +376,7 @@ public void CreateUIAWorker() /// interactions in a volatile UI is the probability of catastrophic /// change in the UI. For example, the //Processes// dialog where items /// in the listbox container can change with no input from the user. - /// This mandates thtat a record and playback application must be + /// This mandates that a record and playback application must be /// reliant on the tester owning the UI being tested. In other words, /// there has to be a contract between the provider and client that /// excludes uncontrolled, external applications. The added benefit @@ -507,4 +507,4 @@ private AutomationElement StartTargetApp() } } } -} \ No newline at end of file +} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/UIAFocusTracker_snip/CSharp/FocusTracker.cs b/samples/snippets/csharp/VS_Snippets_Wpf/UIAFocusTracker_snip/CSharp/FocusTracker.cs index d66872229bfd8..d8306c8259f7a 100644 --- a/samples/snippets/csharp/VS_Snippets_Wpf/UIAFocusTracker_snip/CSharp/FocusTracker.cs +++ b/samples/snippets/csharp/VS_Snippets_Wpf/UIAFocusTracker_snip/CSharp/FocusTracker.cs @@ -156,7 +156,7 @@ private void OnStructureChanged(object sender, StructureChangedEventArgs e) /// Object that raised the event. /// Event arguments. /// - /// runtimteIds is an ArrayList that contains the runtime IDs of all top-level windows. + /// runtimeIds is an ArrayList that contains the runtime IDs of all top-level windows. /// private void WindowClosedHandler(object sender, AutomationEventArgs e) { @@ -176,7 +176,7 @@ private void WindowClosedHandler(object sender, AutomationEventArgs e) /// Runtime ID of the window. /// Index of the ID in the list, or -1 if it is not listed. /// - /// runtimteIds is an ArrayList that contains the runtime IDs of all top-level windows. + /// runtimeIds is an ArrayList that contains the runtime IDs of all top-level windows. /// // private int RuntimeIdListed(int[] runtimeId, ArrayList runtimeIds) diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/UIAFragmentProvider_snip/CSharp/ListFragment.cs b/samples/snippets/csharp/VS_Snippets_Wpf/UIAFragmentProvider_snip/CSharp/ListFragment.cs index fff2a0674a092..bc86f016407cc 100644 --- a/samples/snippets/csharp/VS_Snippets_Wpf/UIAFragmentProvider_snip/CSharp/ListFragment.cs +++ b/samples/snippets/csharp/VS_Snippets_Wpf/UIAFragmentProvider_snip/CSharp/ListFragment.cs @@ -500,7 +500,7 @@ IRawElementProviderSimple[] IRawElementProviderFragment.GetEmbeddedFragmentRoots /// /// Gets the runtime identifier of the UI Automation element. /// - /// Fragement roots return null. + /// Fragment roots return null. int[] IRawElementProviderFragment.GetRuntimeId() { return null; diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/UIATextPattern_snip/CSharp/SearchWindow.cs b/samples/snippets/csharp/VS_Snippets_Wpf/UIATextPattern_snip/CSharp/SearchWindow.cs index 8625e8936b393..6a41820287b83 100644 --- a/samples/snippets/csharp/VS_Snippets_Wpf/UIATextPattern_snip/CSharp/SearchWindow.cs +++ b/samples/snippets/csharp/VS_Snippets_Wpf/UIATextPattern_snip/CSharp/SearchWindow.cs @@ -728,7 +728,7 @@ private AutomationElement GetTextElement(AutomationElement targetApp) /// Outputs the FontNameAttribute value for a range of text. /// /// - /// The AutomationElment that represents a text control. + /// The AutomationElement that represents a text control. /// /// ------------------------------------------------------------------- private void GetFontNameAttribute(AutomationElement targetTextElement) @@ -2135,9 +2135,9 @@ private TextPatternRange RangeFromAttribute(AutomationElement target) Console.WriteLine("Root element does not contain a descendant that supports TextPattern."); return null; } - TextPatternRange[] currentSelelction = textpatternPattern.GetSelection(); + TextPatternRange[] currentSelection = textpatternPattern.GetSelection(); // Find 'italic' range - return currentSelelction[0].FindAttribute(TextPattern.IsItalicAttribute, true, false); + return currentSelection[0].FindAttribute(TextPattern.IsItalicAttribute, true, false); } // // @@ -2209,7 +2209,7 @@ private Rect[] BoundingRectanglesFromSelection(AutomationElement target) /// Retrieves the embedded children of a document control. /// /// - /// The AutomationElment that represents a text control. + /// The AutomationElement that represents a text control. /// /// ------------------------------------------------------------------- private void GetEmbeddedObjects(AutomationElement targetTextElement) @@ -2243,7 +2243,7 @@ private void GetEmbeddedObjects(AutomationElement targetTextElement) /// of a document control and displays the content of the range. /// /// - /// The AutomationElment that represents a text control. + /// The AutomationElement that represents a text control. /// /// ------------------------------------------------------------------- private void GetRangeFromChild(AutomationElement targetTextElement) @@ -2333,7 +2333,7 @@ private String TextFromSelection(AutomationElement target, Int32 length) /// is the current selection. /// /// - /// The AutomationElment that represents a text control. + /// The AutomationElement that represents a text control. /// /// /// The text unit value. @@ -2494,4 +2494,4 @@ private TextPattern TextPatternFromSelection(AutomationElement target) } // } -} \ No newline at end of file +} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/VectorGraphicsSnippets/CS/MyApp.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/VectorGraphicsSnippets/CS/MyApp.xaml deleted file mode 100644 index ad8e7191196e6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/VectorGraphicsSnippets/CS/MyApp.xaml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/VectorGraphicsSnippets/CS/PageOne.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/VectorGraphicsSnippets/CS/PageOne.xaml deleted file mode 100644 index 580b3ccf3d11a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/VectorGraphicsSnippets/CS/PageOne.xaml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/VectorGraphicsSnippets/CS/VectorGraphicsSnippets.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/VectorGraphicsSnippets/CS/VectorGraphicsSnippets.csproj deleted file mode 100644 index c8949bce2f12b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/VectorGraphicsSnippets/CS/VectorGraphicsSnippets.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - Debug - AnyCPU - SDKSample - SDKSample.OpenTypeFontSnippets - 4 - winexe - 1.0.0.* - 2.0 - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - 4.0 - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/EmbeddedResource.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/EmbeddedResource.bmp deleted file mode 100644 index 11025b9e06bcc..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/EmbeddedResource.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/LooseResource.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/LooseResource.bmp deleted file mode 100644 index 11025b9e06bcc..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/LooseResource.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Page1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Page1.xaml deleted file mode 100644 index a7892514c438e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Page1.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Page1.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Page1.xaml.cs deleted file mode 100644 index d07c10a9e96fb..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Page1.xaml.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ResourceLibrary -{ - /// - /// Interaction logic for Page1.xaml - /// - - public partial class Page1 : Page - { - public Page1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/AssemblyInfo.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/AssemblyInfo.cs deleted file mode 100644 index 3e7b56095c643..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,52 +0,0 @@ -#region Using directives - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Resources; -using System.Globalization; -using System.Windows; -using System.Runtime.InteropServices; - -#endregion - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ResourceLibrary")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("ResourceLibrary")] -[assembly: AssemblyCopyright("Copyright @ Microsoft 2006")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Resources.Designer.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Resources.Designer.cs deleted file mode 100644 index 98f43dceed071..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ResourceLibrary.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ResourceLibrary.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Resources.resx b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Resources.resx deleted file mode 100644 index 3e18af958a282..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Settings.Designer.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Settings.Designer.cs deleted file mode 100644 index 6352b441aebcf..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ResourceLibrary.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Settings.settings b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Settings.settings deleted file mode 100644 index 4024694778b04..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/ResourceLibrary.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/ResourceLibrary.csproj deleted file mode 100644 index db30951b9b670..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourceLibrary/ResourceLibrary.csproj +++ /dev/null @@ -1,91 +0,0 @@ - - - Debug - AnyCPU - {7FF6879D-830D-4AD6-8244-2C23228E6A73} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - ResourceLibrary - ResourceLibrary - 4 - Library - 1.0.0.* - - false - - - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - - - - - - Code - Page1.xaml - - - - ResXFileCodeGenerator - Designer - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - True - Resources.resx - - - True - True - Settings.settings - - - - - - - - - - - - - PreserveNewest - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample.sln b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample.sln deleted file mode 100644 index 2983d529cc9dd..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourcesSample", "ResourcesSample\ResourcesSample.csproj", "{07CCA7B8-D813-43B3-8F77-E56FE8F9875D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceLibrary", "ResourceLibrary\ResourceLibrary.csproj", "{7FF6879D-830D-4AD6-8244-2C23228E6A73}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {07CCA7B8-D813-43B3-8F77-E56FE8F9875D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {07CCA7B8-D813-43B3-8F77-E56FE8F9875D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {07CCA7B8-D813-43B3-8F77-E56FE8F9875D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {07CCA7B8-D813-43B3-8F77-E56FE8F9875D}.Release|Any CPU.Build.0 = Release|Any CPU - {7FF6879D-830D-4AD6-8244-2C23228E6A73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7FF6879D-830D-4AD6-8244-2C23228E6A73}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7FF6879D-830D-4AD6-8244-2C23228E6A73}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7FF6879D-830D-4AD6-8244-2C23228E6A73}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/AbsolutePackUriPage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/AbsolutePackUriPage.xaml deleted file mode 100644 index 7eed69d8f532a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/AbsolutePackUriPage.xaml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/AbsolutePackUriPage.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/AbsolutePackUriPage.xaml.cs deleted file mode 100644 index 50bea86d7d5d8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/AbsolutePackUriPage.xaml.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ResourcesSample -{ - /// - /// Interaction logic for AbsolutePackUriPage.xaml - /// - - public partial class AbsolutePackUriPage : Page - { - public AbsolutePackUriPage() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/App.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/App.xaml deleted file mode 100644 index d0450136a688d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/App.xaml +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetContentStreamSnippetWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetContentStreamSnippetWindow.xaml deleted file mode 100644 index f4ec1fc93bfcf..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetContentStreamSnippetWindow.xaml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetContentStreamSnippetWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetContentStreamSnippetWindow.xaml.cs deleted file mode 100644 index 505f4cd8e5284..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetContentStreamSnippetWindow.xaml.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -using System; -using System.IO; -using System.Windows.Resources; -// -using System.Windows; -using System.Windows.Controls; - -namespace ResourcesSample -{ - public partial class ApplicationGetContentStreamSnippetWindow : Window - { - public ApplicationGetContentStreamSnippetWindow() - { - InitializeComponent(); - - Method1(); - Method2(); - Method3(); - } - -void Method1() -{ -// -// Create a URI that identifies the compiled content file -Uri uri = new Uri("/ContentFile.xaml", UriKind.Relative); -// Load resource file -StreamResourceInfo info = Application.GetContentStream(uri); -string resourceType = info.ContentType; // Content file type -Stream resourceStream = info.Stream; // Content file stream -// -} - -void Method2() -{ -// -// Navigate to xaml page -Uri uri = new Uri("/PageContentFile.xaml", UriKind.Relative); -StreamResourceInfo info = Application.GetContentStream(uri); -System.Windows.Markup.XamlReader reader = new System.Windows.Markup.XamlReader(); -Page page = (Page)reader.LoadAsync(info.Stream); -this.pageFrame.Content = page; -// -} - -void Method3() -{ -// -Uri pageUri = new Uri("/PageContentFile.xaml", UriKind.Relative); -this.pageFrame.Source = pageUri; -// -} - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetResourceStreamSnippetWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetResourceStreamSnippetWindow.xaml deleted file mode 100644 index 644752a94e710..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetResourceStreamSnippetWindow.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetResourceStreamSnippetWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetResourceStreamSnippetWindow.xaml.cs deleted file mode 100644 index 3c94cddd275de..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ApplicationGetResourceStreamSnippetWindow.xaml.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -using System; -using System.IO; -using System.Windows.Resources; -// -using System.Windows; -using System.Windows.Controls; -namespace ResourcesSample -{ - /// - /// Interaction logic for ApplicationGetResourceStreamSnippetWindow.xaml - /// - - public partial class ApplicationGetResourceStreamSnippetWindow : Window - { - - public ApplicationGetResourceStreamSnippetWindow() - { - InitializeComponent(); - - Method1(); - Method2(); - Method3(); - } -void Method1() -{ -// -// Create a URI that identifies the compiled resource file -Uri uri = new Uri("/ResourceFile.xaml", UriKind.Relative); -// Load resource file -StreamResourceInfo info = Application.GetResourceStream(uri); -string resourceType = info.ContentType; // Resource file type -Stream resourceStream = info.Stream; // Resource file stream -// -} - -void Method2() -{ -// -// Navigate to xaml page -Uri uri = new Uri("/PageResourceFile.xaml", UriKind.Relative); -StreamResourceInfo info = Application.GetResourceStream(uri); -System.Windows.Markup.XamlReader reader = new System.Windows.Markup.XamlReader(); -Page page = (Page)reader.LoadAsync(info.Stream); -this.pageFrame.Content = page; -// -} - -void Method3() -{ -// -Uri pageUri = new Uri("/PageResourceFile.xaml", UriKind.Relative); -this.pageFrame.Source = pageUri; -// -} - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ContentFile.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ContentFile.xaml deleted file mode 100644 index c08beb314b4c0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ContentFile.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - Page Resource File - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/EmbeddedOrLooseResource.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/EmbeddedOrLooseResource.bmp deleted file mode 100644 index 7413c2fb65782..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/EmbeddedOrLooseResource.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/EmbeddedResource.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/EmbeddedResource.bmp deleted file mode 100644 index 7413c2fb65782..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/EmbeddedResource.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ImageSourceSnippetWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ImageSourceSnippetWindow.xaml deleted file mode 100644 index 5216ec48c3f02..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ImageSourceSnippetWindow.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ImageSourceSnippetWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ImageSourceSnippetWindow.xaml.cs deleted file mode 100644 index 1ba19eb8b72de..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ImageSourceSnippetWindow.xaml.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -using System; -using System.Windows.Media.Imaging; -// -using System.IO; -using System.Windows.Resources; -using System.Windows; -using System.Windows.Controls; - -namespace ResourcesSample -{ - public partial class ImageSourceSnippetWindow : Window - { - public ImageSourceSnippetWindow() - { - InitializeComponent(); -// -// Create Uri that maps to a resource -Uri uri = new Uri("EmbeddedOrLooseResource.bmp", UriKind.Relative); -// Load embedded resource -this.resourceImage.Source = new System.Windows.Media.Imaging.BitmapImage(uri); -// - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ImageSourceXAMLONLYSnippetWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ImageSourceXAMLONLYSnippetWindow.xaml deleted file mode 100644 index cef52126d6fcb..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ImageSourceXAMLONLYSnippetWindow.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/LooseDataFile.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/LooseDataFile.bmp deleted file mode 100644 index 7413c2fb65782..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/LooseDataFile.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/LooseResource.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/LooseResource.bmp deleted file mode 100644 index 7413c2fb65782..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/LooseResource.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/MainWindow.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/MainWindow.xaml deleted file mode 100644 index 6c48324f8c99b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/MainWindow.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/MainWindow.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/MainWindow.xaml.cs deleted file mode 100644 index def6831ff013c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/MainWindow.xaml.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; - -namespace ResourcesSample -{ - /// - /// Interaction logic for MainWindow.xaml - /// - - public partial class MainWindow : Window - { - - public MainWindow() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Page1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Page1.xaml deleted file mode 100644 index f19d0d2965df6..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Page1.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Page2.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Page2.xaml deleted file mode 100644 index 8948f083d07d8..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Page2.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Page2.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Page2.xaml.cs deleted file mode 100644 index 76556c4ccdb3c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Page2.xaml.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ResourcesSample -{ - /// - /// Interaction logic for Page2.xaml - /// - - public partial class Page2 : Page - { - public Page2() - { - //InitializeComponent(); - } - - void a(object sender, RoutedEventArgs e) - { - MessageBox.Show("asdf"); - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/PageContentFile.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/PageContentFile.xaml deleted file mode 100644 index e4d3005196120..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/PageContentFile.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - Page Content File - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/PageResourceFile.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/PageResourceFile.xaml deleted file mode 100644 index 252bab0915c0f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/PageResourceFile.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - Page Resource File - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/PageSiteOfOriginFile.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/PageSiteOfOriginFile.xaml deleted file mode 100644 index 252bab0915c0f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/PageSiteOfOriginFile.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - Page Resource File - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Properties/AssemblyInfo.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Properties/AssemblyInfo.cs deleted file mode 100644 index 172a4651387a5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,52 +0,0 @@ -#region Using directives - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Resources; -using System.Globalization; -using System.Windows; -using System.Runtime.InteropServices; - -#endregion - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ResourcesSample")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("ResourcesSample")] -[assembly: AssemblyCopyright("Copyright @ Microsoft 2006")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ResourceFile.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ResourceFile.xaml deleted file mode 100644 index 2f0796a7ab437..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ResourceFile.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - File - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ResourcesSample.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ResourcesSample.csproj deleted file mode 100644 index 81fb39b699342..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/ResourcesSample.csproj +++ /dev/null @@ -1,152 +0,0 @@ - - - Debug - AnyCPU - {07CCA7B8-D813-43B3-8F77-E56FE8F9875D} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - ResourcesSample - ResourcesSample - 4 - winexe - 1.0.0.* - - false - v4.0 - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - Always - - - Always - - - - Always - - - Always - - - - - - PreserveNewest - - - - Always - - - - - - Window1.xaml - Code - - - - - Code - AbsolutePackUriPage.xaml - - - Code - ApplicationGetResourceStreamSnippetWindow.xaml - - - ApplicationGetContentStreamSnippetWindow.xaml - - - ImageSourceSnippetWindow.xaml - - - Code - MainWindow.xaml - - - Code - Page2.xaml - - - - Code - SOOPage.xaml - - - Code - UriClassSnippetPage.xaml - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - PreserveNewest - - - PreserveNewest - - - - - {7FF6879D-830D-4AD6-8244-2C23228E6A73} - ResourceLibrary - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/SOOPage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/SOOPage.xaml deleted file mode 100644 index af1fdd9e286fe..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/SOOPage.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/SOOPage.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/SOOPage.xaml.cs deleted file mode 100644 index c4376fef9e37d..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/SOOPage.xaml.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -using System.Windows.Resources; -using System.IO; - -namespace ResourcesSample -{ - /// - /// Interaction logic for SOOPage.xaml - /// - - public partial class SOOPage : Page - { - public SOOPage() - { - InitializeComponent(); - - Method1(); - Method2(); - Method3(); - Method4(); - Method5(); - } - -void Method1() -{ -// -// Load file from site of origin (application launch location) -Uri uri = new Uri("SiteOfOriginFile.xaml", UriKind.Relative); -StreamResourceInfo rootFolderInfo = Application.GetRemoteStream(uri); -// -} - -void Method2() -{ -// -// Load file from site of origin (application launch location) -Uri uri = new Uri("/SiteOfOriginFile.xaml", UriKind.Relative); -StreamResourceInfo subFolderInfo = Application.GetRemoteStream(uri); -// -} - -void Method3() -{ -// -// Create a URI that identifies the compiled resource file -Uri uri = new Uri("/SiteOfOriginFile.xaml", UriKind.Relative); -// Load resource file -StreamResourceInfo info = Application.GetRemoteStream(uri); -string resourceType = info.ContentType; // Resource file type -Stream resourceStream = info.Stream; // Resource file stream -// -} - -void Method4() -{ -// -// Navigate to xaml page -Uri uri = new Uri("/SiteOfOriginFile.xaml", UriKind.Relative); -StreamResourceInfo info = Application.GetRemoteStream(uri); -System.Windows.Markup.XamlReader reader = new System.Windows.Markup.XamlReader(); -Page page = (Page)reader.LoadAsync(info.Stream); -this.pageFrame.Content = page; -// -} - -void Method5() -{ -// -Uri pageUri = new Uri("pack://siteoforigin:,,,/SiteOfOriginFile.xaml", UriKind.Absolute); -this.pageFrame.Source = pageUri; -// -} - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/SiteOfOriginFile.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/SiteOfOriginFile.xaml deleted file mode 100644 index 252bab0915c0f..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/SiteOfOriginFile.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - Page Resource File - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/EmbeddedOrLooseResource.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/EmbeddedOrLooseResource.bmp deleted file mode 100644 index 11025b9e06bcc..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/EmbeddedOrLooseResource.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/EmbeddedResource.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/EmbeddedResource.bmp deleted file mode 100644 index 7413c2fb65782..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/EmbeddedResource.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/LooseDataFile.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/LooseDataFile.bmp deleted file mode 100644 index 7413c2fb65782..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/LooseDataFile.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/LooseResource.bmp b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/LooseResource.bmp deleted file mode 100644 index 7413c2fb65782..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/LooseResource.bmp and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/SiteOfOriginFile.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/SiteOfOriginFile.xaml deleted file mode 100644 index 5d24bd9d17582..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Subfolder/SiteOfOriginFile.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - Page Site of Origin File - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/UriClassSnippetPage.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/UriClassSnippetPage.xaml deleted file mode 100644 index 677a05e9bca66..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/UriClassSnippetPage.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/UriClassSnippetPage.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/UriClassSnippetPage.xaml.cs deleted file mode 100644 index 69d3b89e5ceb7..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/UriClassSnippetPage.xaml.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace ResourcesSample -{ - /// - /// Interaction logic for UriClassSnippetPage.xaml - /// - - public partial class UriClassSnippetPage : Page - { - public UriClassSnippetPage() - { - InitializeComponent(); - } - - void bob(object sender, RoutedEventArgs e) - { - //Uri uri = new Uri("pack://application:,,,/File.xaml"); // Absolute - //Uri uri = new Uri("/File.xaml", UriKind.Absolute);// Relative - - TextBox userProvidedUriTextBox = new TextBox(); - userProvidedUriTextBox.Text = "pack://application:,,,/File.xaml"; - Uri uri = new Uri(userProvidedUriTextBox.Text, UriKind.RelativeOrAbsolute);// RelativeOrAbsoluteAbsolute - this.NavigationService.Navigate(uri); - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Window1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Window1.xaml deleted file mode 100644 index 3b93088aa2bf5..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Window1.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Window1.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Window1.xaml.cs deleted file mode 100644 index 2726a15726420..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WPFAssemblyResourcesSnippets/CSharp/ResourcesSample/Window1.xaml.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Resources; -using System.Reflection; -using System.Resources; -using System.Threading; -using System.Collections; - -namespace ResourcesSample -{ - /// - /// Interaction logic for Window1.xaml - /// - - public partial class Window1 : Window - { - - public Window1() - { - InitializeComponent(); - - Button button = new Button(); - button.Content = "Click Me"; - button.Click += delegate - { - //// default is absolute - //Uri relativeUri = new Uri("/Subfolder/LooseResource.bmp", UriKind.Relative); - Uri bob = new Uri("pack://application:,,,/EmbeddedResource.bmp"); - - //// For embedded resource - ////StreamResourceInfo info = Application.GetResourceStream(relativeUri); - - // For loose resource - //StreamResourceInfo info = Application.GetContentStream(bob); - - //// For resources at the site of origin - //StreamResourceInfo info = Application.GetRemoteStream(relativeUri); - - //this.Title = info.ContentType; - - // - //// Enumerate and list all WPF embedded resources - //Assembly asm = Assembly.GetExecutingAssembly(); - //string resourceName = asm.GetName().Name + ".g"; - //ResourceManager rm = new ResourceManager(resourceName, asm); - //ResourceSet resourceSet = rm.GetResourceSet(Thread.CurrentThread.CurrentCulture, true, true); - //foreach (DictionaryEntry resource in resourceSet) - //{ - // Console.WriteLine("Key:" + resource.Key.ToString()); - //} - //rm.ReleaseAllResources(); - // - - //Page page = new Page(); - ////object bob = new object(); - //page = (Page)Application.LoadComponent(new Uri("Page2.xaml", UriKind.Relative)); - ////Application.LoadComponent(page, new Uri("Page2.xaml", UriKind.Relative)); - //this.Content = page; - }; - this.Content = button; - - //// Absolute embedded resource - //Uri uri = new Uri("pack://application:,,,/EmbeddedResource.bmp"); // Works - //Uri uri = new Uri("pack://application:,,,/EmbeddedResource.bmp", UriKind.Relative); // Doesn't work - uri isn't relative - //Uri uri = new Uri("pack://application:,,,/EmbeddedResource.bmp", UriKind.Absolute); // Works - //Uri uri = new Uri("pack://application:,,,/EmbeddedResource.bmp", UriKind.RelativeOrAbsolute); // Works - //StreamResourceInfo info = Application.GetResourceStream(uri); - - //// Absolute loose resource - //Uri uri = new Uri("pack://application:,,,/LooseResource.bmp"); // Doesn't work - exception=cannot use absolute uri - //Uri uri = new Uri("pack://application:,,,/LooseResource.bmp", UriKind.Relative); // Doesn't work - uri isn't relative - //Uri uri = new Uri("pack://application:,,,/LooseResource.bmp", UriKind.Absolute); // Doesn't work - exception=cannot use absolute uri - //Uri uri = new Uri("pack://application:,,,/LooseResource.bmp", UriKind.RelativeOrAbsolute); // Doesn't work - exception=cannot use absolute uri - //StreamResourceInfo info = Application.GetContentStream(uri); - - //// Absolute site of origin resource - //Uri uri = new Uri("pack://siteoforigin:,,,/LooseResource.bmp"); // Works - //Uri uri = new Uri("pack://siteoforigin:,,,/LooseResource.bmp", UriKind.Relative); // Doesn't work - uri isn't relative - //Uri uri = new Uri("pack://siteoforigin:,,,/LooseResource.bmp", UriKind.Absolute); // Works - //Uri uri = new Uri("pack://siteoforigin:,,,/LooseResource.bmp", UriKind.RelativeOrAbsolute); // Works - //StreamResourceInfo info = Application.GetRemoteStream(uri); - - // Get embedded resource in referenced assembly - Uri uri = new Uri("pack://application:,,,/ResourceLibrary;component/ReferencedEmbeddedResource.bmp", UriKind.RelativeOrAbsolute); // Works - StreamResourceInfo info = Application.GetResourceStream(uri); - // Get loose resource in referenced assembly - doesn't work - //Uri uri = new Uri("pack://application:,,,/ResourceLibrary;component/ReferencedLooseResource.bmp", UriKind.RelativeOrAbsolute); // Works - //StreamResourceInfo info = Application.GetContentStream(uri); - Console.Write(info.ContentType + " -> "); Console.WriteLine(info.Stream.ToString()); - } - - protected override void OnActivated(EventArgs e) - { - base.OnActivated(e); - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowMove/CSharp/WindowMove.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WindowMove/CSharp/WindowMove.cs index 49a967981a79c..2ac522746b2aa 100644 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowMove/CSharp/WindowMove.cs +++ b/samples/snippets/csharp/VS_Snippets_Wpf/WindowMove/CSharp/WindowMove.cs @@ -149,7 +149,7 @@ protected override void OnStartup(StartupEventArgs e) } else { - Feedback("Wndow is not moveable."); + Feedback("Window is not moveable."); } } catch (ElementNotAvailableException) diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/MyControls/MyControls.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/MyControls/MyControls.csproj deleted file mode 100644 index d102434b22570..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/MyControls/MyControls.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - MyControls - library - Debug - - - 10.0.20821 - 2.0 - MyControls - {006940D9-17E0-4628-9087-8C01B03D2153} - Library - - - bin\$(Configuration)\ - v4.0 - Client - - - - - - - - - - - - Page1.xaml - Code - - - - - - - - - - 4.0 - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/MyControls/Page1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/MyControls/Page1.xaml deleted file mode 100644 index 00a75bed69a1b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/MyControls/Page1.xaml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Simple WPF Control - - Name - - - Street Address - - - City - - - State - - - Zip - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/MyControls/Page1.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/MyControls/Page1.xaml.cs deleted file mode 100644 index 8933e9622cb4a..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/MyControls/Page1.xaml.cs +++ /dev/null @@ -1,191 +0,0 @@ -// -using System; -using System.Windows; -using System.Windows.Navigation; -using System.Windows.Controls; -using System.Windows.Media; - -namespace MyControls -{ - // - public partial class MyControl1 : Grid - // - { - // - public delegate void MyControlEventHandler(object sender, MyControlEventArgs args); - public event MyControlEventHandler OnButtonClick; - private FontWeight _fontWeight; - private double _fontSize; - private FontFamily _fontFamily; - private FontStyle _fontStyle; - private SolidColorBrush _foreground; - private SolidColorBrush _background; - - private void Init(object sender, EventArgs e) - { - //They all have the same style, so use nameLabel to set initial values. - _fontWeight = nameLabel.FontWeight; - _fontSize = nameLabel.FontSize; - _fontFamily = nameLabel.FontFamily; - _fontStyle = nameLabel.FontStyle; - _foreground = (SolidColorBrush)nameLabel.Foreground; - _background = (SolidColorBrush)rootElement.Background; - } - // - - // - private void ButtonClicked(object sender, RoutedEventArgs e) - { - MyControlEventArgs retvals = new MyControlEventArgs(true, - txtName.Text, - txtAddress.Text, - txtCity.Text, - txtState.Text, - txtZip.Text); - if (sender == btnCancel) - { - retvals.IsOK = false; - } - if (OnButtonClick != null) - OnButtonClick(this, retvals); - } - // - - // - public FontWeight MyControl_FontWeight - { - get { return _fontWeight; } - set - { - _fontWeight = value; - nameLabel.FontWeight = value; - addressLabel.FontWeight = value; - cityLabel.FontWeight = value; - stateLabel.FontWeight = value; - zipLabel.FontWeight = value; - } - } - public double MyControl_FontSize - { - get { return _fontSize; } - set - { - _fontSize = value; - nameLabel.FontSize = value; - addressLabel.FontSize = value; - cityLabel.FontSize = value; - stateLabel.FontSize = value; - zipLabel.FontSize = value; - } - } - public FontStyle MyControl_FontStyle - { - get { return _fontStyle; } - set - { - _fontStyle = value; - nameLabel.FontStyle = value; - addressLabel.FontStyle = value; - cityLabel.FontStyle = value; - stateLabel.FontStyle = value; - zipLabel.FontStyle = value; - } - } - public FontFamily MyControl_FontFamily - { - get { return _fontFamily; } - set - { - _fontFamily = value; - nameLabel.FontFamily = value; - addressLabel.FontFamily = value; - cityLabel.FontFamily = value; - stateLabel.FontFamily = value; - zipLabel.FontFamily = value; - } - } - - public SolidColorBrush MyControl_Background - { - get { return _background; } - set - { - _background = value; - rootElement.Background = value; - } - } - public SolidColorBrush MyControl_Foreground - { - get { return _foreground; } - set - { - _foreground = value; - nameLabel.Foreground = value; - addressLabel.Foreground = value; - cityLabel.Foreground = value; - stateLabel.Foreground = value; - zipLabel.Foreground = value; - } - } - // - } - - // - public class MyControlEventArgs : EventArgs - { - private string _Name; - private string _StreetAddress; - private string _City; - private string _State; - private string _Zip; - private bool _IsOK; - - public MyControlEventArgs(bool result, - string name, - string address, - string city, - string state, - string zip) - { - _IsOK = result; - _Name = name; - _StreetAddress = address; - _City = city; - _State = state; - _Zip = zip; - } - - public string MyName - { - get { return _Name; } - set { _Name = value; } - } - public string MyStreetAddress - { - get { return _StreetAddress; } - set { _StreetAddress = value; } - } - public string MyCity - { - get { return _City; } - set { _City = value; } - } - public string MyState - { - get { return _State; } - set { _State = value; } - } - public string MyZip - { - get { return _Zip; } - set { _Zip = value; } - } - public bool IsOK - { - get { return _IsOK; } - set { _IsOK = value; } - } - } - // -} -// \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/SampleID.txt b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/SampleID.txt deleted file mode 100644 index 30ca223c72fa1..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/SampleID.txt +++ /dev/null @@ -1 +0,0 @@ -windowsforms_hosting_wpf_control_cs \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Form1.Designer.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Form1.Designer.cs deleted file mode 100644 index bc13c5af0793e..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Form1.Designer.cs +++ /dev/null @@ -1,472 +0,0 @@ -namespace WFHost -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.panel1 = new System.Windows.Forms.Panel(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.radioBackgroundLightSalmon = new System.Windows.Forms.RadioButton(); - this.radioBackgroundLightGreen = new System.Windows.Forms.RadioButton(); - this.radioBackgroundOriginal = new System.Windows.Forms.RadioButton(); - this.radioForegroundYellow = new System.Windows.Forms.RadioButton(); - this.radioForegroundRed = new System.Windows.Forms.RadioButton(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.radioForegroundOriginal = new System.Windows.Forms.RadioButton(); - this.radioFamilyWingDings = new System.Windows.Forms.RadioButton(); - this.radioFamilyTimes = new System.Windows.Forms.RadioButton(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.radioFamilyOriginal = new System.Windows.Forms.RadioButton(); - this.radioSizeTwelve = new System.Windows.Forms.RadioButton(); - this.radioSizeTen = new System.Windows.Forms.RadioButton(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.radioSizeOriginal = new System.Windows.Forms.RadioButton(); - this.radioStyleItalic = new System.Windows.Forms.RadioButton(); - this.groupBox5 = new System.Windows.Forms.GroupBox(); - this.radioStyleOriginal = new System.Windows.Forms.RadioButton(); - this.radioWeightBold = new System.Windows.Forms.RadioButton(); - this.groupBox6 = new System.Windows.Forms.GroupBox(); - this.radioWeightOriginal = new System.Windows.Forms.RadioButton(); - this.lblName = new System.Windows.Forms.Label(); - this.lblAddress = new System.Windows.Forms.Label(); - this.lblState = new System.Windows.Forms.Label(); - this.lblZip = new System.Windows.Forms.Label(); - this.lblCity = new System.Windows.Forms.Label(); - this.groupBox7 = new System.Windows.Forms.GroupBox(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.groupBox4.SuspendLayout(); - this.groupBox5.SuspendLayout(); - this.groupBox6.SuspendLayout(); - this.groupBox7.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(333, 3); - this.panel1.Name = "panel1"; - this.tableLayoutPanel1.SetRowSpan(this.panel1, 3); - this.panel1.Size = new System.Drawing.Size(325, 285); - this.panel1.TabIndex = 0; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.radioBackgroundLightSalmon); - this.groupBox1.Controls.Add(this.radioBackgroundLightGreen); - this.groupBox1.Controls.Add(this.radioBackgroundOriginal); - this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox1.Location = new System.Drawing.Point(3, 3); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(324, 91); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Background Color"; - // - // radioBackgroundLightSalmon - // - this.radioBackgroundLightSalmon.AutoSize = true; - this.radioBackgroundLightSalmon.Location = new System.Drawing.Point(11, 66); - this.radioBackgroundLightSalmon.Name = "radioBackgroundLightSalmon"; - this.radioBackgroundLightSalmon.Size = new System.Drawing.Size(94, 17); - this.radioBackgroundLightSalmon.TabIndex = 2; - this.radioBackgroundLightSalmon.Text = "LightSalmon"; - this.radioBackgroundLightSalmon.CheckedChanged += new System.EventHandler(this.radioBackgroundLightSalmon_CheckedChanged); - // - // radioBackgroundLightGreen - // - this.radioBackgroundLightGreen.AutoSize = true; - this.radioBackgroundLightGreen.Location = new System.Drawing.Point(11, 43); - this.radioBackgroundLightGreen.Name = "radioBackgroundLightGreen"; - this.radioBackgroundLightGreen.Size = new System.Drawing.Size(87, 17); - this.radioBackgroundLightGreen.TabIndex = 1; - this.radioBackgroundLightGreen.Text = "LightGreen"; - this.radioBackgroundLightGreen.CheckedChanged += new System.EventHandler(this.radioBackgroundLightGreen_CheckedChanged); - // - // radioBackgroundOriginal - // - this.radioBackgroundOriginal.AutoSize = true; - this.radioBackgroundOriginal.Location = new System.Drawing.Point(11, 20); - this.radioBackgroundOriginal.Name = "radioBackgroundOriginal"; - this.radioBackgroundOriginal.Size = new System.Drawing.Size(68, 17); - this.radioBackgroundOriginal.TabIndex = 0; - this.radioBackgroundOriginal.Text = "Original"; - this.radioBackgroundOriginal.CheckedChanged += new System.EventHandler(this.radioBackgroundOriginal_CheckedChanged); - // - // radioForegroundYellow - // - this.radioForegroundYellow.AutoSize = true; - this.radioForegroundYellow.Location = new System.Drawing.Point(11, 66); - this.radioForegroundYellow.Name = "radioForegroundYellow"; - this.radioForegroundYellow.Size = new System.Drawing.Size(62, 17); - this.radioForegroundYellow.TabIndex = 2; - this.radioForegroundYellow.Text = "Yellow"; - this.radioForegroundYellow.CheckedChanged += new System.EventHandler(this.radioForegroundYellow_CheckedChanged); - // - // radioForegroundRed - // - this.radioForegroundRed.AutoSize = true; - this.radioForegroundRed.Location = new System.Drawing.Point(11, 43); - this.radioForegroundRed.Name = "radioForegroundRed"; - this.radioForegroundRed.Size = new System.Drawing.Size(48, 17); - this.radioForegroundRed.TabIndex = 1; - this.radioForegroundRed.Text = "Red"; - this.radioForegroundRed.CheckedChanged += new System.EventHandler(this.radioForegroundRed_CheckedChanged); - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.radioForegroundYellow); - this.groupBox2.Controls.Add(this.radioForegroundRed); - this.groupBox2.Controls.Add(this.radioForegroundOriginal); - this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox2.Location = new System.Drawing.Point(3, 100); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(324, 91); - this.groupBox2.TabIndex = 1; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Foreground Color"; - // - // radioForegroundOriginal - // - this.radioForegroundOriginal.AutoSize = true; - this.radioForegroundOriginal.Location = new System.Drawing.Point(11, 19); - this.radioForegroundOriginal.Name = "radioForegroundOriginal"; - this.radioForegroundOriginal.Size = new System.Drawing.Size(68, 17); - this.radioForegroundOriginal.TabIndex = 0; - this.radioForegroundOriginal.Text = "Original"; - this.radioForegroundOriginal.CheckedChanged += new System.EventHandler(this.radioForegroundOriginal_CheckedChanged); - // - // radioFamilyWingDings - // - this.radioFamilyWingDings.AutoSize = true; - this.radioFamilyWingDings.Location = new System.Drawing.Point(11, 66); - this.radioFamilyWingDings.Name = "radioFamilyWingDings"; - this.radioFamilyWingDings.Size = new System.Drawing.Size(86, 17); - this.radioFamilyWingDings.TabIndex = 2; - this.radioFamilyWingDings.Text = "WingDings"; - this.radioFamilyWingDings.CheckedChanged += new System.EventHandler(this.radioFamilyWingDings_CheckedChanged); - // - // radioFamilyTimes - // - this.radioFamilyTimes.AutoSize = true; - this.radioFamilyTimes.Location = new System.Drawing.Point(11, 43); - this.radioFamilyTimes.Name = "radioFamilyTimes"; - this.radioFamilyTimes.Size = new System.Drawing.Size(130, 17); - this.radioFamilyTimes.TabIndex = 1; - this.radioFamilyTimes.Text = "Times New Roman"; - this.radioFamilyTimes.CheckedChanged += new System.EventHandler(this.radioFamilyTimes_CheckedChanged); - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.radioFamilyWingDings); - this.groupBox3.Controls.Add(this.radioFamilyTimes); - this.groupBox3.Controls.Add(this.radioFamilyOriginal); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox3.Location = new System.Drawing.Point(3, 294); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(324, 91); - this.groupBox3.TabIndex = 2; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "Font Family"; - // - // radioFamilyOriginal - // - this.radioFamilyOriginal.AutoSize = true; - this.radioFamilyOriginal.Location = new System.Drawing.Point(11, 20); - this.radioFamilyOriginal.Name = "radioFamilyOriginal"; - this.radioFamilyOriginal.Size = new System.Drawing.Size(68, 17); - this.radioFamilyOriginal.TabIndex = 0; - this.radioFamilyOriginal.Text = "Original"; - this.radioFamilyOriginal.CheckedChanged += new System.EventHandler(this.radioFamilyOriginal_CheckedChanged); - // - // radioSizeTwelve - // - this.radioSizeTwelve.AutoSize = true; - this.radioSizeTwelve.Location = new System.Drawing.Point(11, 66); - this.radioSizeTwelve.Name = "radioSizeTwelve"; - this.radioSizeTwelve.Size = new System.Drawing.Size(39, 17); - this.radioSizeTwelve.TabIndex = 2; - this.radioSizeTwelve.Text = "12"; - this.radioSizeTwelve.CheckedChanged += new System.EventHandler(this.radioSizeTwelve_CheckedChanged); - // - // radioSizeTen - // - this.radioSizeTen.AutoSize = true; - this.radioSizeTen.Location = new System.Drawing.Point(11, 43); - this.radioSizeTen.Name = "radioSizeTen"; - this.radioSizeTen.Size = new System.Drawing.Size(39, 17); - this.radioSizeTen.TabIndex = 1; - this.radioSizeTen.Text = "10"; - this.radioSizeTen.CheckedChanged += new System.EventHandler(this.radioSizeTen_CheckedChanged); - // - // groupBox4 - // - this.groupBox4.Controls.Add(this.radioSizeTwelve); - this.groupBox4.Controls.Add(this.radioSizeTen); - this.groupBox4.Controls.Add(this.radioSizeOriginal); - this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox4.Location = new System.Drawing.Point(3, 197); - this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(324, 91); - this.groupBox4.TabIndex = 3; - this.groupBox4.TabStop = false; - this.groupBox4.Text = "Font Size"; - // - // radioSizeOriginal - // - this.radioSizeOriginal.AutoSize = true; - this.radioSizeOriginal.Location = new System.Drawing.Point(11, 20); - this.radioSizeOriginal.Name = "radioSizeOriginal"; - this.radioSizeOriginal.Size = new System.Drawing.Size(68, 17); - this.radioSizeOriginal.TabIndex = 0; - this.radioSizeOriginal.Text = "Original"; - this.radioSizeOriginal.CheckedChanged += new System.EventHandler(this.radioSizeOriginal_CheckedChanged); - // - // radioStyleItalic - // - this.radioStyleItalic.AutoSize = true; - this.radioStyleItalic.Location = new System.Drawing.Point(11, 43); - this.radioStyleItalic.Name = "radioStyleItalic"; - this.radioStyleItalic.Size = new System.Drawing.Size(53, 17); - this.radioStyleItalic.TabIndex = 1; - this.radioStyleItalic.Text = "Italic"; - this.radioStyleItalic.CheckedChanged += new System.EventHandler(this.radioStyleItalic_CheckedChanged); - // - // groupBox5 - // - this.groupBox5.Controls.Add(this.radioStyleItalic); - this.groupBox5.Controls.Add(this.radioStyleOriginal); - this.groupBox5.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox5.Location = new System.Drawing.Point(3, 391); - this.groupBox5.Name = "groupBox5"; - this.groupBox5.Size = new System.Drawing.Size(324, 66); - this.groupBox5.TabIndex = 4; - this.groupBox5.TabStop = false; - this.groupBox5.Text = "Font Style"; - // - // radioStyleOriginal - // - this.radioStyleOriginal.AutoSize = true; - this.radioStyleOriginal.Location = new System.Drawing.Point(11, 20); - this.radioStyleOriginal.Name = "radioStyleOriginal"; - this.radioStyleOriginal.Size = new System.Drawing.Size(64, 17); - this.radioStyleOriginal.TabIndex = 0; - this.radioStyleOriginal.Text = "Normal"; - this.radioStyleOriginal.CheckedChanged += new System.EventHandler(this.radioStyleOriginal_CheckedChanged); - // - // radioWeightBold - // - this.radioWeightBold.AutoSize = true; - this.radioWeightBold.Location = new System.Drawing.Point(11, 43); - this.radioWeightBold.Name = "radioWeightBold"; - this.radioWeightBold.Size = new System.Drawing.Size(50, 17); - this.radioWeightBold.TabIndex = 1; - this.radioWeightBold.Text = "Bold"; - this.radioWeightBold.CheckedChanged += new System.EventHandler(this.radioWeightBold_CheckedChanged); - // - // groupBox6 - // - this.groupBox6.Controls.Add(this.radioWeightBold); - this.groupBox6.Controls.Add(this.radioWeightOriginal); - this.groupBox6.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox6.Location = new System.Drawing.Point(3, 463); - this.groupBox6.Name = "groupBox6"; - this.groupBox6.Size = new System.Drawing.Size(324, 84); - this.groupBox6.TabIndex = 5; - this.groupBox6.TabStop = false; - this.groupBox6.Text = "Font Weight"; - // - // radioWeightOriginal - // - this.radioWeightOriginal.AutoSize = true; - this.radioWeightOriginal.Location = new System.Drawing.Point(11, 20); - this.radioWeightOriginal.Name = "radioWeightOriginal"; - this.radioWeightOriginal.Size = new System.Drawing.Size(68, 17); - this.radioWeightOriginal.TabIndex = 0; - this.radioWeightOriginal.Text = "Original"; - this.radioWeightOriginal.CheckedChanged += new System.EventHandler(this.radioWeightOriginal_CheckedChanged); - // - // lblName - // - this.lblName.AutoSize = true; - this.lblName.Location = new System.Drawing.Point(6, 24); - this.lblName.Name = "lblName"; - this.lblName.Size = new System.Drawing.Size(43, 13); - this.lblName.TabIndex = 7; - this.lblName.Text = "Name:"; - // - // lblAddress - // - this.lblAddress.AutoSize = true; - this.lblAddress.Location = new System.Drawing.Point(6, 47); - this.lblAddress.Margin = new System.Windows.Forms.Padding(3, 3, 3, 1); - this.lblAddress.Name = "lblAddress"; - this.lblAddress.Size = new System.Drawing.Size(94, 13); - this.lblAddress.TabIndex = 8; - this.lblAddress.Text = "Street Address:"; - // - // lblState - // - this.lblState.AutoSize = true; - this.lblState.Location = new System.Drawing.Point(8, 97); - this.lblState.Margin = new System.Windows.Forms.Padding(3, 1, 3, 3); - this.lblState.Name = "lblState"; - this.lblState.Size = new System.Drawing.Size(41, 13); - this.lblState.TabIndex = 10; - this.lblState.Text = "State:"; - // - // lblZip - // - this.lblZip.AutoSize = true; - this.lblZip.Location = new System.Drawing.Point(9, 121); - this.lblZip.Margin = new System.Windows.Forms.Padding(3, 1, 3, 3); - this.lblZip.Name = "lblZip"; - this.lblZip.Size = new System.Drawing.Size(29, 13); - this.lblZip.TabIndex = 11; - this.lblZip.Text = "Zip:"; - // - // lblCity - // - this.lblCity.AutoSize = true; - this.lblCity.Location = new System.Drawing.Point(6, 70); - this.lblCity.Margin = new System.Windows.Forms.Padding(3, 1, 2, 1); - this.lblCity.Name = "lblCity"; - this.lblCity.Size = new System.Drawing.Size(32, 13); - this.lblCity.TabIndex = 9; - this.lblCity.Text = "City:"; - // - // groupBox7 - // - this.groupBox7.Controls.Add(this.lblZip); - this.groupBox7.Controls.Add(this.lblState); - this.groupBox7.Controls.Add(this.lblCity); - this.groupBox7.Controls.Add(this.lblAddress); - this.groupBox7.Controls.Add(this.lblName); - this.groupBox7.Location = new System.Drawing.Point(333, 294); - this.groupBox7.Name = "groupBox7"; - this.tableLayoutPanel1.SetRowSpan(this.groupBox7, 3); - this.groupBox7.Size = new System.Drawing.Size(186, 155); - this.groupBox7.TabIndex = 12; - this.groupBox7.TabStop = false; - this.groupBox7.Text = "Data from control"; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.AutoSize = true; - this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.Controls.Add(this.groupBox6, 0, 5); - this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.groupBox2, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.groupBox4, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.groupBox3, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.groupBox5, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.groupBox7, 1, 3); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 6; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.Size = new System.Drawing.Size(661, 550); - this.tableLayoutPanel1.TabIndex = 13; - // - // Form1 - // - this.AutoScaleBaseSize = new System.Drawing.Size(6, 13); - this.AutoSize = true; - this.ClientSize = new System.Drawing.Size(661, 550); - this.Controls.Add(this.tableLayoutPanel1); - this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "Form1"; - this.Text = "Windows Form Hosting Wpf Control"; - this.Load += new System.EventHandler(this.Form1_Load); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.groupBox4.ResumeLayout(false); - this.groupBox4.PerformLayout(); - this.groupBox5.ResumeLayout(false); - this.groupBox5.PerformLayout(); - this.groupBox6.ResumeLayout(false); - this.groupBox6.PerformLayout(); - this.groupBox7.ResumeLayout(false); - this.groupBox7.PerformLayout(); - this.tableLayoutPanel1.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.RadioButton radioBackgroundOriginal; - private System.Windows.Forms.RadioButton radioBackgroundLightGreen; - private System.Windows.Forms.RadioButton radioBackgroundLightSalmon; - private System.Windows.Forms.RadioButton radioForegroundYellow; - private System.Windows.Forms.RadioButton radioForegroundRed; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.RadioButton radioForegroundOriginal; - private System.Windows.Forms.RadioButton radioFamilyWingDings; - private System.Windows.Forms.RadioButton radioFamilyTimes; - private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.RadioButton radioFamilyOriginal; - private System.Windows.Forms.GroupBox groupBox4; - private System.Windows.Forms.RadioButton radioSizeTwelve; - private System.Windows.Forms.RadioButton radioSizeTen; - private System.Windows.Forms.RadioButton radioSizeOriginal; - private System.Windows.Forms.RadioButton radioStyleItalic; - private System.Windows.Forms.GroupBox groupBox5; - private System.Windows.Forms.RadioButton radioStyleOriginal; - private System.Windows.Forms.RadioButton radioWeightBold; - private System.Windows.Forms.GroupBox groupBox6; - private System.Windows.Forms.RadioButton radioWeightOriginal; - private System.Windows.Forms.Label lblName; - private System.Windows.Forms.Label lblAddress; - private System.Windows.Forms.Label lblState; - private System.Windows.Forms.Label lblZip; - private System.Windows.Forms.Label lblCity; - private System.Windows.Forms.GroupBox groupBox7; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - - } -} - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Form1.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Form1.cs deleted file mode 100644 index 65a81dc23a4f9..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Form1.cs +++ /dev/null @@ -1,167 +0,0 @@ -// -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows.Forms; -using System.Windows.Controls; - -// -using System.Windows; -using System.Windows.Forms.Integration; -using System.Windows.Media; -// - -namespace WFHost -{ - partial class Form1 : Form - { - // - private ElementHost ctrlHost; - private MyControls.MyControl1 wpfAddressCtrl; - System.Windows.FontWeight initFontWeight; - double initFontSize; - System.Windows.FontStyle initFontStyle; - System.Windows.Media.SolidColorBrush initBackBrush; - System.Windows.Media.SolidColorBrush initForeBrush; - System.Windows.Media.FontFamily initFontFamily; - - public Form1() - { - InitializeComponent(); - } - - private void Form1_Load(object sender, EventArgs e) - { - ctrlHost = new ElementHost(); - ctrlHost.Dock = DockStyle.Fill; - panel1.Controls.Add(ctrlHost); - wpfAddressCtrl = new MyControls.MyControl1(); - wpfAddressCtrl.InitializeComponent(); - ctrlHost.Child = wpfAddressCtrl; - - wpfAddressCtrl.OnButtonClick += - new MyControls.MyControl1.MyControlEventHandler( - avAddressCtrl_OnButtonClick); - wpfAddressCtrl.Loaded += new RoutedEventHandler( - avAddressCtrl_Loaded); - } - - void avAddressCtrl_Loaded(object sender, EventArgs e) - { - initBackBrush = (SolidColorBrush)wpfAddressCtrl.MyControl_Background; - initForeBrush = wpfAddressCtrl.MyControl_Foreground; - initFontFamily = wpfAddressCtrl.MyControl_FontFamily; - initFontSize = wpfAddressCtrl.MyControl_FontSize; - initFontWeight = wpfAddressCtrl.MyControl_FontWeight; - initFontStyle = wpfAddressCtrl.MyControl_FontStyle; - } - // - - // - void avAddressCtrl_OnButtonClick( - object sender, - MyControls.MyControl1.MyControlEventArgs args) - { - if (args.IsOK) - { - lblAddress.Text = "Street Address: " + args.MyStreetAddress; - lblCity.Text = "City: " + args.MyCity; - lblName.Text = "Name: " + args.MyName; - lblState.Text = "State: " + args.MyState; - lblZip.Text = "Zip: " + args.MyZip; - } - else - { - lblAddress.Text = "Street Address: "; - lblCity.Text = "City: "; - lblName.Text = "Name: "; - lblState.Text = "State: "; - lblZip.Text = "Zip: "; - } - } - // - - // - private void radioBackgroundOriginal_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_Background = initBackBrush; - } - - private void radioBackgroundLightGreen_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_Background = new SolidColorBrush(Colors.LightGreen); - } - - private void radioBackgroundLightSalmon_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_Background = new SolidColorBrush(Colors.LightSalmon); - } - - private void radioForegroundOriginal_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_Foreground = initForeBrush; - } - - private void radioForegroundRed_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_Foreground = new System.Windows.Media.SolidColorBrush(Colors.Red); - } - - private void radioForegroundYellow_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_Foreground = new System.Windows.Media.SolidColorBrush(Colors.Yellow); - } - - private void radioFamilyOriginal_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontFamily = initFontFamily; - } - - private void radioFamilyTimes_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontFamily = new System.Windows.Media.FontFamily("Times New Roman"); - } - - private void radioFamilyWingDings_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontFamily = new System.Windows.Media.FontFamily("WingDings"); - } - - private void radioSizeOriginal_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontSize = initFontSize; - } - - private void radioSizeTen_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontSize = 10; - } - - private void radioSizeTwelve_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontSize = 12; - } - - private void radioStyleOriginal_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontStyle = initFontStyle; - } - - private void radioStyleItalic_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontStyle = System.Windows.FontStyles.Italic; - } - - private void radioWeightOriginal_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontWeight = initFontWeight; - } - - private void radioWeightBold_CheckedChanged(object sender, EventArgs e) - { - wpfAddressCtrl.MyControl_FontWeight = FontWeights.Bold; - } - // - } -} -// \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Form1.resx b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Form1.resx deleted file mode 100644 index 19dc0dd8b3964..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Form1.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Program.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Program.cs deleted file mode 100644 index 21a0aca207d14..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/Program.cs +++ /dev/null @@ -1,24 +0,0 @@ -#region Using directives - -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using System.Threading; -using System.Windows; - -#endregion - -namespace WFHost -{ - static class Program - { - [STAThread] - static void Main() - { - //Run the application - System.Windows.Forms.Application.EnableVisualStyles(); - //System.Windows.Forms.Application.EnableRTLMirroring(); - System.Windows.Forms.Application.Run(new Form1()); - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/WFHost.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/WFHost.csproj deleted file mode 100644 index 0061a7dcab8b2..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WFHost/WFHost.csproj +++ /dev/null @@ -1,71 +0,0 @@ - - - Debug - AnyCPU - 10.0.20821 - 2.0 - {7B9EE74C-FAE5-4CBC-9E0F-C88989D7316C} - WinExe - WFHost - WFHost - 4 - v4.0 - Client - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - False - C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationCore.dll - - - False - C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.dll - - - - - - False - C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsBase.dll - - - False - C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsFormsIntegration.dll - - - - - Form - - - Form1.cs - - - - - - Designer - Form1.cs - - - - - {006940D9-17E0-4628-9087-8C01B03D2153} - MyControls - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WindowsFormsHostingWpfControl.sln b/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WindowsFormsHostingWpfControl.sln deleted file mode 100644 index 0aa23632cd667..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WindowsFormsHostingWpfControl/CSharp/WindowsFormsHostingWpfControl.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyControls", "MyControls\MyControls.csproj", "{006940D9-17E0-4628-9087-8C01B03D2153}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WFHost", "WFHost\WFHost.csproj", "{7B9EE74C-FAE5-4CBC-9E0F-C88989D7316C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {006940D9-17E0-4628-9087-8C01B03D2153}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {006940D9-17E0-4628-9087-8C01B03D2153}.Debug|Any CPU.Build.0 = Debug|Any CPU - {006940D9-17E0-4628-9087-8C01B03D2153}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {006940D9-17E0-4628-9087-8C01B03D2153}.Release|Any CPU.Build.0 = Debug|Any CPU - {7B9EE74C-FAE5-4CBC-9E0F-C88989D7316C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7B9EE74C-FAE5-4CBC-9E0F-C88989D7316C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7B9EE74C-FAE5-4CBC-9E0F-C88989D7316C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7B9EE74C-FAE5-4CBC-9E0F-C88989D7316C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/MyControls/MyControl1.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/MyControls/MyControl1.cs deleted file mode 100644 index 66208336ccafb..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/MyControls/MyControl1.cs +++ /dev/null @@ -1,296 +0,0 @@ -// -using System; -using System.Collections; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Windows.Forms; - -namespace MyControls -{ - /// - /// Summary description for UserControl1. - /// - public class MyControl1 : System.Windows.Forms.UserControl - { - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox txtName; - private System.Windows.Forms.TextBox txtAddress; - private System.Windows.Forms.TextBox txtCity; - private System.Windows.Forms.TextBox txtState; - private System.Windows.Forms.TextBox txtZip; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Button btnOK; - private System.Windows.Forms.Button btnCancel; - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - public MyControl1() - { - // This call is required by the Windows.Forms Form Designer. - InitializeComponent(); - - // TODO: Add any initialization after the InitComponent call - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (components != null) - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.txtName = new System.Windows.Forms.TextBox(); - this.txtAddress = new System.Windows.Forms.TextBox(); - this.txtCity = new System.Windows.Forms.TextBox(); - this.txtState = new System.Windows.Forms.TextBox(); - this.txtZip = new System.Windows.Forms.TextBox(); - this.btnOK = new System.Windows.Forms.Button(); - this.btnCancel = new System.Windows.Forms.Button(); - this.label6 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // label1 - // - this.label1.Location = new System.Drawing.Point(20, 46); - this.label1.Margin = new System.Windows.Forms.Padding(3, 3, 3, 1); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(65, 16); - this.label1.TabIndex = 8; - this.label1.Text = "Name"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label2 - // - this.label2.Location = new System.Drawing.Point(20, 88); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(94, 13); - this.label2.TabIndex = 9; - this.label2.Text = "Street Address"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label3 - // - this.label3.Location = new System.Drawing.Point(20, 127); - this.label3.Margin = new System.Windows.Forms.Padding(3, 3, 3, 2); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(49, 13); - this.label3.TabIndex = 10; - this.label3.Text = "City"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label4 - // - this.label4.Location = new System.Drawing.Point(246, 127); - this.label4.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(47, 13); - this.label4.TabIndex = 11; - this.label4.Text = "State"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label5 - // - this.label5.Location = new System.Drawing.Point(23, 167); - this.label5.Margin = new System.Windows.Forms.Padding(3, 3, 2, 3); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(46, 13); - this.label5.TabIndex = 12; - this.label5.Text = "Zip"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // txtName - // - this.txtName.Location = new System.Drawing.Point(135, 44); - this.txtName.Margin = new System.Windows.Forms.Padding(3, 2, 3, 3); - this.txtName.Name = "txtName"; - this.txtName.Size = new System.Drawing.Size(199, 20); - this.txtName.TabIndex = 0; - // - // txtAddress - // - this.txtAddress.Location = new System.Drawing.Point(136, 84); - this.txtAddress.Margin = new System.Windows.Forms.Padding(3, 1, 3, 3); - this.txtAddress.Name = "txtAddress"; - this.txtAddress.Size = new System.Drawing.Size(198, 20); - this.txtAddress.TabIndex = 1; - // - // txtCity - // - this.txtCity.Location = new System.Drawing.Point(136, 123); - this.txtCity.Name = "txtCity"; - this.txtCity.TabIndex = 2; - // - // txtState - // - this.txtState.Location = new System.Drawing.Point(300, 123); - this.txtState.Name = "txtState"; - this.txtState.Size = new System.Drawing.Size(33, 20); - this.txtState.TabIndex = 3; - // - // txtZip - // - this.txtZip.Location = new System.Drawing.Point(135, 163); - this.txtZip.Margin = new System.Windows.Forms.Padding(1, 3, 3, 3); - this.txtZip.Name = "txtZip"; - this.txtZip.TabIndex = 4; - // - // btnOK - // - this.btnOK.Location = new System.Drawing.Point(23, 207); - this.btnOK.Margin = new System.Windows.Forms.Padding(3, 3, 3, 1); - this.btnOK.Name = "btnOK"; - this.btnOK.TabIndex = 5; - this.btnOK.Text = "OK"; - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - // - // btnCancel - // - this.btnCancel.Location = new System.Drawing.Point(157, 207); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.TabIndex = 6; - this.btnCancel.Text = "Cancel"; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // label6 - // - this.label6.Location = new System.Drawing.Point(66, 12); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(226, 23); - this.label6.TabIndex = 13; - this.label6.Text = "Simple Windows Forms Control"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // MyControl1 - // - this.Controls.Add(this.label6); - this.Controls.Add(this.btnCancel); - this.Controls.Add(this.btnOK); - this.Controls.Add(this.txtZip); - this.Controls.Add(this.txtState); - this.Controls.Add(this.txtCity); - this.Controls.Add(this.txtAddress); - this.Controls.Add(this.txtName); - this.Controls.Add(this.label5); - this.Controls.Add(this.label4); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Name = "MyControl1"; - this.Size = new System.Drawing.Size(359, 244); - this.ResumeLayout(false); - this.PerformLayout(); - } - #endregion - - // - public delegate void MyControlEventHandler(object sender, MyControlEventArgs args); - public event MyControlEventHandler OnButtonClick; - // - - // - private void btnOK_Click(object sender, System.EventArgs e) - { - - MyControlEventArgs retvals = new MyControlEventArgs(true, - txtName.Text, - txtAddress.Text, - txtCity.Text, - txtState.Text, - txtZip.Text); - OnButtonClick(this, retvals); - } - - private void btnCancel_Click(object sender, System.EventArgs e) - { - MyControlEventArgs retvals = new MyControlEventArgs(false, - txtName.Text, - txtAddress.Text, - txtCity.Text, - txtState.Text, - txtZip.Text); - OnButtonClick(this, retvals); - } - // - } - - // - public class MyControlEventArgs : EventArgs - { - private string _Name; - private string _StreetAddress; - private string _City; - private string _State; - private string _Zip; - private bool _IsOK; - - public MyControlEventArgs(bool result, - string name, - string address, - string city, - string state, - string zip) - { - _IsOK = result; - _Name = name; - _StreetAddress = address; - _City = city; - _State = state; - _Zip = zip; - } - - public string MyName - { - get { return _Name; } - set { _Name = value; } - } - public string MyStreetAddress - { - get { return _StreetAddress; } - set { _StreetAddress = value; } - } - public string MyCity - { - get { return _City; } - set { _City = value; } - } - public string MyState - { - get { return _State; } - set { _State = value; } - } - public string MyZip - { - get { return _Zip; } - set { _Zip = value; } - } - public bool IsOK - { - get { return _IsOK; } - set { _IsOK = value; } - } - } - // -} -// \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/MyControls/MyControls.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/MyControls/MyControls.csproj deleted file mode 100644 index e6d6294288c8c..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/MyControls/MyControls.csproj +++ /dev/null @@ -1,48 +0,0 @@ - - - Debug - AnyCPU - 10.0.20821 - 2.0 - {BEF5A4F7-2136-4C9B-B5D0-D08C6995CC3B} - Library - - - MyControls - false - MyControls - v4.0 - Client - - - true - false - .\bin\Debug\ - false - DEBUG;TRACE - 4 - false - - - false - true - .\bin\Release\ - false - TRACE - 4 - false - - - - - - - - - - - - UserControl - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/SampleID.txt b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/SampleID.txt deleted file mode 100644 index 8dc1f84f35843..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/SampleID.txt +++ /dev/null @@ -1 +0,0 @@ -Wpf_Hosting_WindowsForms_Control_cs \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/App.ico b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/App.ico deleted file mode 100644 index dd4273af38eb5..0000000000000 Binary files a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/App.ico and /dev/null differ diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/Page1.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/Page1.xaml deleted file mode 100644 index c2bc4340dc492..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/Page1.xaml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - Control Properties - Background Color - - Original - LightGreen - LightSalmon - - - Foreground Color - - Original - Red - Yellow - - - Font Family - - Original - Times New Roman - Wingdings - - - Font Size - - Original - 10 - 12 - - - Font Style - - Original - Italic - - - Font Weight - - - Original - - Bold - - - - - - - - - - - Data From Control - - Name: - - - Street Address: - - - City: - - - State: - - - Zip: - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/Page1.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/Page1.xaml.cs deleted file mode 100644 index 5f8b862734c05..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/Page1.xaml.cs +++ /dev/null @@ -1,119 +0,0 @@ -// -using System; -using System.Windows; -using System.Windows.Media; -using System.Windows.Controls; -using System.Windows.Navigation; -using MyControls; -using System.Windows.Forms.Integration; - -namespace WpfHost -{ - public partial class MainWindow : Window - { - // - private Application app; - private Window myWindow; - FontWeight initFontWeight; - Double initFontSize; - FontStyle initFontStyle; - SolidColorBrush initBackBrush; - SolidColorBrush initForeBrush; - FontFamily initFontFamily; - bool UIIsReady = false; - - private void Init(object sender, EventArgs e) - { - app = System.Windows.Application.Current; - myWindow = (Window)app.MainWindow; - myWindow.SizeToContent = SizeToContent.WidthAndHeight; - wfh.TabIndex = 10; - initFontSize = wfh.FontSize; - initFontWeight = wfh.FontWeight; - initFontFamily = wfh.FontFamily; - initFontStyle = wfh.FontStyle; - initBackBrush = (SolidColorBrush)wfh.Background; - initForeBrush = (SolidColorBrush)wfh.Foreground; - (wfh.Child as MyControl1).OnButtonClick += new MyControl1.MyControlEventHandler(Pane1_OnButtonClick); - UIIsReady = true; - } - // - - // - private void BackColorChanged(object sender, RoutedEventArgs e) - { - if (sender == rdbtnBackGreen) - wfh.Background = new SolidColorBrush(Colors.LightGreen); - else if (sender == rdbtnBackSalmon) - wfh.Background = new SolidColorBrush(Colors.LightSalmon); - else if (UIIsReady == true) - wfh.Background = initBackBrush; - } - - private void ForeColorChanged(object sender, RoutedEventArgs e) - { - if (sender == rdbtnForeRed) - wfh.Foreground = new SolidColorBrush(Colors.Red); - else if (sender == rdbtnForeYellow) - wfh.Foreground = new SolidColorBrush(Colors.Yellow); - else if (UIIsReady == true) - wfh.Foreground = initForeBrush; - } - - private void FontChanged(object sender, RoutedEventArgs e) - { - if (sender == rdbtnTimes) - wfh.FontFamily = new FontFamily("Times New Roman"); - else if (sender == rdbtnWingdings) - wfh.FontFamily = new FontFamily("Wingdings"); - else if (UIIsReady == true) - wfh.FontFamily = initFontFamily; - } - private void FontSizeChanged(object sender, RoutedEventArgs e) - { - if (sender == rdbtnTen) - wfh.FontSize = 10; - else if (sender == rdbtnTwelve) - wfh.FontSize = 12; - else if (UIIsReady == true) - wfh.FontSize = initFontSize; - } - private void StyleChanged(object sender, RoutedEventArgs e) - { - if (sender == rdbtnItalic) - wfh.FontStyle = FontStyles.Italic; - else if (UIIsReady == true) - wfh.FontStyle = initFontStyle; - } - private void WeightChanged(object sender, RoutedEventArgs e) - { - if (sender == rdbtnBold) - wfh.FontWeight = FontWeights.Bold; - else if (UIIsReady == true) - wfh.FontWeight = initFontWeight; - } - // - - // - //Handle button clicks on the Windows Form control - private void Pane1_OnButtonClick(object sender, MyControlEventArgs args) - { - txtName.Inlines.Clear(); - txtAddress.Inlines.Clear(); - txtCity.Inlines.Clear(); - txtState.Inlines.Clear(); - txtZip.Inlines.Clear(); - - if (args.IsOK) - { - txtName.Inlines.Add( " " + args.MyName ); - txtAddress.Inlines.Add( " " + args.MyStreetAddress ); - txtCity.Inlines.Add( " " + args.MyCity ); - txtState.Inlines.Add( " " + args.MyState ); - txtZip.Inlines.Add( " " + args.MyZip ); - } - } - // - } -} -// \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/WpfHost.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/WpfHost.csproj deleted file mode 100644 index 6136e721cb1ae..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/WpfHost.csproj +++ /dev/null @@ -1,48 +0,0 @@ - - - WpfHost - winexe - Debug - App.ico - 10.0.20821 - 2.0 - WpfHost - {2CDE711B-CC0D-409A-B46B-149BB6F40003} - WinExe - - - bin\$(Configuration)\ - v4.0 - Client - - - - - - - - 4.0 - - - - - - - - - - - - - - - - app.xaml - Code - - - Page1.xaml - Code - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/app.xaml deleted file mode 100644 index dc7f448a9eeb4..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/app.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/app.xaml.cs b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/app.xaml.cs deleted file mode 100644 index cb65c732f9459..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHost/app.xaml.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Navigation; -using System.Data; -using System.Xml; -using System.Configuration; - -namespace WpfHost -{ - /// - /// Interaction logic for app.xaml - /// - - public partial class app : Application - { - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHostingWindowsFormsControl.sln b/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHostingWindowsFormsControl.sln deleted file mode 100644 index bcb7536337aeb..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/WpfHostingWindowsFormsControl/CSharp/WpfHostingWindowsFormsControl.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyControls", "MyControls\MyControls.csproj", "{BEF5A4F7-2136-4C9B-B5D0-D08C6995CC3B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfHost", "WpfHost\WpfHost.csproj", "{2CDE711B-CC0D-409A-B46B-149BB6F40003}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BEF5A4F7-2136-4C9B-B5D0-D08C6995CC3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BEF5A4F7-2136-4C9B-B5D0-D08C6995CC3B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BEF5A4F7-2136-4C9B-B5D0-D08C6995CC3B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BEF5A4F7-2136-4C9B-B5D0-D08C6995CC3B}.Release|Any CPU.Build.0 = Release|Any CPU - {2CDE711B-CC0D-409A-B46B-149BB6F40003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2CDE711B-CC0D-409A-B46B-149BB6F40003}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2CDE711B-CC0D-409A-B46B-149BB6F40003}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {2CDE711B-CC0D-409A-B46B-149BB6F40003}.Release|Any CPU.Build.0 = Debug|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/animatepath_snip_XAML/CS/EllipseGeometryExample.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/animatepath_snip_XAML/CS/EllipseGeometryExample.xaml deleted file mode 100644 index b659a73ffcfc0..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/animatepath_snip_XAML/CS/EllipseGeometryExample.xaml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/animatepath_snip_XAML/CS/animatepath.csproj b/samples/snippets/csharp/VS_Snippets_Wpf/animatepath_snip_XAML/CS/animatepath.csproj deleted file mode 100644 index 063d10546b5fa..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/animatepath_snip_XAML/CS/animatepath.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - WinExe - net48 - true - Microsoft.Samples.Animation.AnimatePathShapeSample - AnimatePathShapeSample_markup - - - diff --git a/samples/snippets/csharp/VS_Snippets_Wpf/animatepath_snip_XAML/CS/app.xaml b/samples/snippets/csharp/VS_Snippets_Wpf/animatepath_snip_XAML/CS/app.xaml deleted file mode 100644 index be1af1232476b..0000000000000 --- a/samples/snippets/csharp/VS_Snippets_Wpf/animatepath_snip_XAML/CS/app.xaml +++ /dev/null @@ -1,4 +0,0 @@ - - diff --git a/samples/snippets/csharp/attributes/AttributesOverview.cs b/samples/snippets/csharp/attributes/AttributesOverview.cs deleted file mode 100644 index 31f2328c935c4..0000000000000 --- a/samples/snippets/csharp/attributes/AttributesOverview.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -// -using System.Runtime.InteropServices; -// -using System.Text; - -namespace attributes -{ - public class ValidatedContractAttribute : System.Attribute - { - } - - // - [Serializable] - public class SampleClass - { - // Objects of this type can be serialized. - } - // - - class AttributesOverview - { - // - [System.Runtime.InteropServices.DllImport("user32.dll")] - extern static void SampleMethod(); - // - - // - void MethodA([In][Out] ref double x) { } - void MethodB([Out][In] ref double x) { } - void MethodC([In, Out] ref double x) { } - // - - // - [Conditional("DEBUG"), Conditional("TEST1")] - void TraceMethod() - { - // ... - } - // - - // - // default: applies to method - [ValidatedContract] - int Method1() { return 0; } - - // applies to method - [method: ValidatedContract] - int Method2() { return 0; } - - // applies to parameter - int Method3([ValidatedContract] string contract) { return 0; } - - // applies to return value - [return: ValidatedContract] - int Method4() { return 0; } - // - } -} diff --git a/samples/snippets/csharp/attributes/Program.cs b/samples/snippets/csharp/attributes/Program.cs deleted file mode 100644 index 38705cde4e0b8..0000000000000 --- a/samples/snippets/csharp/attributes/Program.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -using System; - -// Create some custom attributes: -[AttributeUsage(AttributeTargets.Class, Inherited = false)] -class FirstAttribute : Attribute { } - -[AttributeUsage(AttributeTargets.Class)] -class SecondAttribute : Attribute { } - -[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] -class ThirdAttribute : Attribute { } - -// Apply custom attributes to classes: -[First, Second] -class BaseClass { } - -[Third, Third] -class DerivedClass : BaseClass { } - -public class TestAttributeUsage -{ - static void Main() - { - BaseClass b = new BaseClass(); - DerivedClass d = new DerivedClass(); - - // Display custom attributes for each class. - Console.WriteLine("Attributes on Base Class:"); - object[] attrs = b.GetType().GetCustomAttributes(true); - foreach (Attribute attr in attrs) - { - Console.WriteLine(attr); - } - - Console.WriteLine("Attributes on Derived Class:"); - attrs = d.GetType().GetCustomAttributes(true); - foreach (Attribute attr in attrs) - { - Console.WriteLine(attr); - } - } -} -// diff --git a/samples/snippets/csharp/attributes/attributes.csproj b/samples/snippets/csharp/attributes/attributes.csproj deleted file mode 100644 index 41f1d5ad4b264..0000000000000 --- a/samples/snippets/csharp/attributes/attributes.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net6.0 - - - diff --git a/samples/snippets/csharp/concepts/linq/LinqSamples.Test/LinqSamples.Test.csproj b/samples/snippets/csharp/concepts/linq/LinqSamples.Test/LinqSamples.Test.csproj index 6406be617a03f..f5a3c0ba624ab 100644 --- a/samples/snippets/csharp/concepts/linq/LinqSamples.Test/LinqSamples.Test.csproj +++ b/samples/snippets/csharp/concepts/linq/LinqSamples.Test/LinqSamples.Test.csproj @@ -8,7 +8,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/snippets/csharp/concepts/linq/LinqSamples.Test/Shared.cs b/samples/snippets/csharp/concepts/linq/LinqSamples.Test/Shared.cs index 5e8f03039f8be..3640e7fb162ec 100644 --- a/samples/snippets/csharp/concepts/linq/LinqSamples.Test/Shared.cs +++ b/samples/snippets/csharp/concepts/linq/LinqSamples.Test/Shared.cs @@ -2,7 +2,7 @@ using System.IO; using Xunit; -// Tests need to be carried out syinchronously, otherwise the console output for different tests gets intermingled +// Tests need to be carried out synchronously, otherwise the console output for different tests gets intermingled [assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)] namespace LinqSamples.Test; diff --git a/samples/snippets/csharp/getting-started/console-teleprompter/Program.cs b/samples/snippets/csharp/getting-started/console-teleprompter/Program.cs deleted file mode 100644 index 11a58317996fd..0000000000000 --- a/samples/snippets/csharp/getting-started/console-teleprompter/Program.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; - -namespace TeleprompterConsole -{ - public class Program - { - public static void Main(string[] args) - { - RunTeleprompter().Wait(); - } - - private static async Task RunTeleprompter() - { - var config = new TelePrompterConfig(); - var displayTask = ShowTeleprompter(config); - - var speedTask = GetInput(config); - await Task.WhenAny(displayTask, speedTask); - } - - private static async Task ShowTeleprompter(TelePrompterConfig config) - { - var words = ReadFrom("SampleQuotes.txt"); - foreach (var word in words) - { - Console.Write(word); - if (!string.IsNullOrWhiteSpace(word)) - { - await Task.Delay(config.DelayInMilliseconds); - } - } - config.SetDone(); - } - - private static async Task GetInput(TelePrompterConfig config) - { - Action work = () => - { - do { - var key = Console.ReadKey(true); - if (key.KeyChar == '>') - config.UpdateDelay(-10); - else if (key.KeyChar == '<') - config.UpdateDelay(10); - else if (key.KeyChar == 'X' || key.KeyChar == 'x') - config.SetDone(); - } while (!config.Done); - }; - await Task.Run(work); - } - static IEnumerable ReadFrom(string file) - { - string line; - using (var reader = File.OpenText(file)) - { - while ((line = reader.ReadLine()) != null) - { - var words = line.Split(' '); - var lineLength = 0; - foreach (var word in words) - { - yield return word + " "; - lineLength += word.Length + 1; - if (lineLength > 70) - { - yield return Environment.NewLine; - lineLength = 0; - } - } - yield return Environment.NewLine; - } - } - } - } -} diff --git a/samples/snippets/csharp/getting-started/console-teleprompter/README.md b/samples/snippets/csharp/getting-started/console-teleprompter/README.md deleted file mode 100644 index 52582e3c00b31..0000000000000 --- a/samples/snippets/csharp/getting-started/console-teleprompter/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# C# Console Application Sample - -This sample is created during the [Console Application Tutorial](https://learn.microsoft.com/dotnet/csharp/tutorials/console-teleprompter) -for learning C# features. Please see that topic for detailed steps on the code -for this sample. - -## Key Features - -This sample demonstrates File I/O, async features, and terminal input and output. - -## Build and Run - -To build and run the sample, type the following command: - -`dotnet run` diff --git a/samples/snippets/csharp/getting-started/console-teleprompter/config.cs b/samples/snippets/csharp/getting-started/console-teleprompter/config.cs deleted file mode 100644 index e593c9e4dfa6b..0000000000000 --- a/samples/snippets/csharp/getting-started/console-teleprompter/config.cs +++ /dev/null @@ -1,27 +0,0 @@ -using static System.Math; - -namespace TeleprompterConsole -{ - internal class TelePrompterConfig - { - private object lockHandle = new object(); - public int DelayInMilliseconds { get; private set; } = 200; - - public void UpdateDelay(int increment) // negative to speed up - { - var newDelay = Min(DelayInMilliseconds + increment, 1000); - newDelay = Max(newDelay, 20); - lock (lockHandle) - { - DelayInMilliseconds = newDelay; - } - } - - public bool Done { get; private set; } - - public void SetDone() - { - Done = true; - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/getting-started/console-teleprompter/console-teleprompter.csproj b/samples/snippets/csharp/getting-started/console-teleprompter/console-teleprompter.csproj deleted file mode 100644 index 41f1d5ad4b264..0000000000000 --- a/samples/snippets/csharp/getting-started/console-teleprompter/console-teleprompter.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net6.0 - - - diff --git a/samples/snippets/csharp/getting-started/console-teleprompter/sampleQuotes.txt b/samples/snippets/csharp/getting-started/console-teleprompter/sampleQuotes.txt deleted file mode 100644 index c11a23ed91765..0000000000000 --- a/samples/snippets/csharp/getting-started/console-teleprompter/sampleQuotes.txt +++ /dev/null @@ -1,291 +0,0 @@ -1. You can do anything, but not everything. - --David Allen - - -2. Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. - --Antoine de Saint-Exupéry - - -3. The richest man is not he who has the most, but he who needs the least. - --Unknown Author - - -4. You miss 100 percent of the shots you never take. - --Wayne Gretzky - - -5. Courage is not the absence of fear, but rather the judgement that something else is more important than fear. - --Ambrose Redmoon - - -6. You must be the change you wish to see in the world. - --Gandhi - - -7. When hungry, eat your rice; when tired, close your eyes. Fools may laugh at me, but wise men will know what I mean. - --Lin-Chi - - -8. The third-rate mind is only happy when it is thinking with the majority. The second-rate mind is only happy when it is thinking with the minority. The first-rate mind is only happy when it is thinking. - --A. A. Milne - - -9. To the man who only has a hammer, everything he encounters begins to look like a nail. - --Abraham Maslow - - -10. We are what we repeatedly do; excellence, then, is not an act but a habit. - --Aristotle - - -11. A wise man gets more use from his enemies than a fool from his friends. - --Baltasar Gracian - - -12. Do not seek to follow in the footsteps of the men of old; seek what they sought. - --Basho - - -13. Watch your thoughts; they become words. -Watch your words; they become actions. -Watch your actions; they become habits. -Watch your habits; they become character. -Watch your character; it becomes your destiny. - --Lao-Tze - - -14. Everyone is a genius at least once a year. The real geniuses simply have their bright ideas closer together. - --Georg Christoph Lichtenberg - - -15. What we think, or what we know, or what we believe is, in the end, of little consequence. The only consequence is what we do. - --John Ruskin - - -16. The real voyage of discovery consists not in seeking new lands but seeing with new eyes. - --Marcel Proust - - -17. Work like you don't need money, love like you've never been hurt, and dance like no one's watching - --Unknown Author - - -18. Try a thing you haven't done three times. Once, to get over the fear of doing it. Twice, to learn how to do it. And a third time, to figure out whether you like it or not. - --Virgil Garnett Thomson - - -19. Even if you're on the right track, you'll get run over if you just sit there. - --Will Rogers - - -20. People often say that motivation doesn't last. Well, neither does bathing – that's why we recommend it daily. - --Zig Ziglar - - -21. Before I got married I had six theories about bringing up children; now I have six children and no theories. - --John Wilmot - - -22. What the world needs is more geniuses with humility, there are so few of us left. - --Oscar Levant - - -23. Always forgive your enemies; nothing annoys them so much. - --Oscar Wilde - - -24. I've gone into hundreds of [fortune-teller's parlors], and have been told thousands of things, but nobody ever told me I was a policewoman getting ready to arrest her. - --New York City detective - - -25. When you go into court you are putting your fate into the hands of twelve people who weren't smart enough to get out of jury duty. - --Norm Crosby - - -26. Those who believe in telekinetics, raise my hand. - --Kurt Vonnegut - - -27. Just the fact that some geniuses were laughed at does not imply that all who are laughed at are geniuses. They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown. - --Carl Sagan - - -28. My pessimism extends to the point of even suspecting the sincerity of the pessimists. - --Jean Rostand - - -29. Sometimes I worry about being a success in a mediocre world. - --Lily Tomlin - - -30. I quit therapy because my analyst was trying to help me behind my back. - --Richard Lewis - - -31. We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true. - --Robert Wilensky - - -32. If there are no stupid questions, then what kind of questions do stupid people ask? Do they get smart just in time to ask questions? - --Scott Adams - - -33. If the lessons of history teach us anything it is that nobody learns the lessons that history teaches us. - --Anon - - -34. When I was a boy I was told that anybody could become President. Now I'm beginning to believe it. - --Clarence Darrow - - -35. Laughing at our mistakes can lengthen our own life. Laughing at someone else's can shorten it. - --Cullen Hightower - - -36. There are many who dare not kill themselves for fear of what the neighbors will say. - --Cyril Connolly - - -37. There's so much comedy on television. Does that cause comedy in the streets? - --Dick Cavett - - -38. All men are frauds. The only difference between them is that some admit it. I myself deny it. - --H. L. Mencken - - -39. I don't mind what Congress does, as long as they don't do it in the streets and frighten the horses. - --Victor Hugo - - -40. I took a speed reading course and read "War and Peace" in twenty minutes. It involves Russia. - --Woody Allen - -41. The person who reads too much and uses his brain too little will fall into lazy habits of thinking. - --Albert Einstein - - -42. Believe those who are seeking the truth. Doubt those who find it. - --André Gide - - -43. It is the mark of an educated mind to be able to entertain a thought without accepting it. - --Aristotle - - -44. I'd rather live with a good question than a bad answer. - --Aryeh Frimer - - -45. We learn something every day, and lots of times it's that what we learned the day before was wrong. - --Bill Vaughan - - -46. I have made this letter longer than usual because I lack the time to make it shorter. - --Blaise Pascal - - -47. An inventor is simply a fellow who doesn't take his education too seriously. - --Charles F. Kettering - - -48. Asking a working writer what he thinks about critics is like asking a lamppost how it feels about dogs. - --Christopher Hampton - - -49. Better to write for yourself and have no public, than to write for the public and have no self. - --Cyril Connolly - - -50. Never be afraid to laugh at yourself, after all, you could be missing out on the joke of the century. - --Dame Edna Everage - - -51. I am patient with stupidity but not with those who are proud of it. - --Edith Sitwell - - -52. Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for – in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it. - --Ellen Goodman - - -53. The cure for boredom is curiosity. There is no cure for curiosity. - --Ellen Parr - - -54. Advice is what we ask for when we already know the answer but wish we didn't. - --Erica Jong - - -55. Some people like my advice so much that they frame it upon the wall instead of using it. - --Gordon R. Dickson - - -56. Never ascribe to malice, that which can be explained by incompetence. - --Napoleon (Hanlon's Razor) - - -57. Imagination was given to man to compensate him for what he is not, and a sense of humor was provided to console him for what he is. - --Oscar Wilde - - -58. When a person can no longer laugh at himself, it is time for others to laugh at him. - --Thomas Szasz diff --git a/samples/snippets/csharp/getting-started/console-webapiclient/Program.cs b/samples/snippets/csharp/getting-started/console-webapiclient/Program.cs deleted file mode 100644 index caa2bdb34a50c..0000000000000 --- a/samples/snippets/csharp/getting-started/console-webapiclient/Program.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text.Json; -using System.Threading.Tasks; - -namespace WebAPIClient -{ - class Program - { - private static readonly HttpClient client = new HttpClient(); - - static async Task Main(string[] args) - { - var repositories = await ProcessRepositories(); - - foreach (var repo in repositories) - { - Console.WriteLine(repo.Name); - Console.WriteLine(repo.Description); - Console.WriteLine(repo.GitHubHomeUrl); - Console.WriteLine(repo.Homepage); - Console.WriteLine(repo.Watchers); - Console.WriteLine(repo.LastPush); - Console.WriteLine(); - } - } - - private static async Task> ProcessRepositories() - { - client.DefaultRequestHeaders.Accept.Clear(); - client.DefaultRequestHeaders.Accept.Add( - new MediaTypeWithQualityHeaderValue("application/vnd.github.v3+json")); - client.DefaultRequestHeaders.Add("User-Agent", ".NET Foundation Repository Reporter"); - - var streamTask = client.GetStreamAsync("https://api.github.com/orgs/dotnet/repos"); - var repositories = await JsonSerializer.DeserializeAsync>(await streamTask); - return repositories; - } - } -} diff --git a/samples/snippets/csharp/getting-started/console-webapiclient/README.md b/samples/snippets/csharp/getting-started/console-webapiclient/README.md deleted file mode 100644 index 46d657c9e2dd3..0000000000000 --- a/samples/snippets/csharp/getting-started/console-webapiclient/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# C# REST Client Sample - -This sample is created during the [REST client tutorial](https://learn.microsoft.com/dotnet/csharp/tutorials/console-webapiclient) -for learning C# features. Please see that topic for detailed steps on the code -for this sample. - -## Key Features - -This sample demonstrates making HTTP requests to a web server, using `async` -and `await`, converting JSON objects into C# objects, and terminal output. - -## Build and Run - -To build and run the sample, type the following two commands: - -```dotnetcli -dotnet restore -dotnet run -``` - -`dotnet restore` restores the dependencies for this sample. - -`dotnet run` builds the sample and runs the output assembly. - -**Note:** Starting with .NET Core 2.0 SDK, you don't have to run [`dotnet restore`](https://learn.microsoft.com/dotnet/core/tools/dotnet-restore) because it's run implicitly by all commands that require a restore to occur, such as `dotnet new`, `dotnet build` and `dotnet run`. -It's still a valid command in certain scenarios where doing an explicit restore makes sense, such as [continuous integration builds in Azure DevOps Services](https://learn.microsoft.com/azure/devops/build-release/apps/aspnet/build-aspnet-core) or in build systems that need to explicitly control the time at which the restore occurs. diff --git a/samples/snippets/csharp/getting-started/console-webapiclient/Repository.cs b/samples/snippets/csharp/getting-started/console-webapiclient/Repository.cs deleted file mode 100644 index f49191ba6797f..0000000000000 --- a/samples/snippets/csharp/getting-started/console-webapiclient/Repository.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Globalization; -using System.Text.Json.Serialization; - -namespace WebAPIClient -{ - public class Repository - { - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("description")] - public string Description { get; set; } - - [JsonPropertyName("html_url")] - public Uri GitHubHomeUrl { get; set; } - - [JsonPropertyName("homepage")] - public Uri Homepage { get; set; } - - [JsonPropertyName("watchers")] - public int Watchers { get; set; } - - [JsonPropertyName("pushed_at")] - public string JsonDate { get; set; } - - public DateTime LastPush => - DateTime.ParseExact(JsonDate, "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture); - } -} diff --git a/samples/snippets/csharp/getting-started/console-webapiclient/webapiclient.csproj b/samples/snippets/csharp/getting-started/console-webapiclient/webapiclient.csproj deleted file mode 100644 index 0dd85e6f504cd..0000000000000 --- a/samples/snippets/csharp/getting-started/console-webapiclient/webapiclient.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Exe - net6.0 - - - - - - - diff --git a/samples/snippets/csharp/getting_started/ClassLibraryProjects/ClassLibraryProjects.sln b/samples/snippets/csharp/getting_started/ClassLibraryProjects/ClassLibraryProjects.sln deleted file mode 100644 index 4d0408c7370d3..0000000000000 --- a/samples/snippets/csharp/getting_started/ClassLibraryProjects/ClassLibraryProjects.sln +++ /dev/null @@ -1,37 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29613.14 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShowCase", "ShowCase\ShowCase.csproj", "{F96858A2-D91D-4904-9ADB-13B561C5C6AC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StringLibrary", "StringLibrary\StringLibrary.csproj", "{BF190197-7AD1-44A7-BD44-6B4ACF457E8B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StringLibraryTest", "StringLibraryTest\StringLibraryTest.csproj", "{1EA13D1F-0D7B-4BF6-8122-DEDBC97BFDE1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F96858A2-D91D-4904-9ADB-13B561C5C6AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F96858A2-D91D-4904-9ADB-13B561C5C6AC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F96858A2-D91D-4904-9ADB-13B561C5C6AC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F96858A2-D91D-4904-9ADB-13B561C5C6AC}.Release|Any CPU.Build.0 = Release|Any CPU - {BF190197-7AD1-44A7-BD44-6B4ACF457E8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BF190197-7AD1-44A7-BD44-6B4ACF457E8B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BF190197-7AD1-44A7-BD44-6B4ACF457E8B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BF190197-7AD1-44A7-BD44-6B4ACF457E8B}.Release|Any CPU.Build.0 = Release|Any CPU - {1EA13D1F-0D7B-4BF6-8122-DEDBC97BFDE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1EA13D1F-0D7B-4BF6-8122-DEDBC97BFDE1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1EA13D1F-0D7B-4BF6-8122-DEDBC97BFDE1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1EA13D1F-0D7B-4BF6-8122-DEDBC97BFDE1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E4732236-4A31-4BE0-881B-E5EA96608C56} - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/getting_started/ClassLibraryProjects/ShowCase/Program.cs b/samples/snippets/csharp/getting_started/ClassLibraryProjects/ShowCase/Program.cs deleted file mode 100644 index 6c35f94cb6edb..0000000000000 --- a/samples/snippets/csharp/getting_started/ClassLibraryProjects/ShowCase/Program.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using UtilityLibraries; - -class Program -{ - static void Main(string[] args) - { - int row = 0; - - do - { - if (row == 0 || row >= 25) - ResetConsole(); - - string input = Console.ReadLine(); - if (String.IsNullOrEmpty(input)) break; - Console.WriteLine($"Input: {input} {"Begins with uppercase? ",30}: {(input.StartsWithUpper() ? "Yes" : "No")}"); - row += 3; - } while (true); - return; - - // Declare a ResetConsole local method - void ResetConsole() - { - if (row > 0) - { - Console.WriteLine("Press any key to continue..."); - Console.ReadKey(); - } - Console.Clear(); - Console.WriteLine("\nPress only to exit; otherwise, enter a string and press :\n"); - row = 3; - } - } -} diff --git a/samples/snippets/csharp/getting_started/ClassLibraryProjects/ShowCase/ShowCase.csproj b/samples/snippets/csharp/getting_started/ClassLibraryProjects/ShowCase/ShowCase.csproj deleted file mode 100644 index 551bb25c83c81..0000000000000 --- a/samples/snippets/csharp/getting_started/ClassLibraryProjects/ShowCase/ShowCase.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Exe - net6.0 - - - - - - - diff --git a/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibrary/Class1.cs b/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibrary/Class1.cs deleted file mode 100644 index 2517131345613..0000000000000 --- a/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibrary/Class1.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace UtilityLibraries -{ - public static class StringLibrary - { - public static bool StartsWithUpper(this String str) - { - if (String.IsNullOrWhiteSpace(str)) - return false; - - Char ch = str[0]; - return Char.IsUpper(ch); - } - } -} diff --git a/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibrary/StringLibrary.csproj b/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibrary/StringLibrary.csproj deleted file mode 100644 index 9f5c4f4abb611..0000000000000 --- a/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibrary/StringLibrary.csproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - netstandard2.0 - - - diff --git a/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibraryTest/StringLibraryTest.csproj b/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibraryTest/StringLibraryTest.csproj deleted file mode 100644 index 9c643e6765ce1..0000000000000 --- a/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibraryTest/StringLibraryTest.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - net6.0 - - false - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibraryTest/UnitTest1.cs b/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibraryTest/UnitTest1.cs deleted file mode 100644 index b2891e2833bbe..0000000000000 --- a/samples/snippets/csharp/getting_started/ClassLibraryProjects/StringLibraryTest/UnitTest1.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using UtilityLibraries; - -namespace StringLibraryTest -{ - [TestClass] - public class UnitTest1 - { - [TestMethod] - public void TestStartsWithUpper() - { - // Tests that we expect to return true. - string[] words = { "Alphabet", "Zebra", "ABC", "Αθήνα", "Москва" }; - foreach (var word in words) - { - bool result = word.StartsWithUpper(); - Assert.IsTrue(result, - $"Expected for '{word}': true; Actual: {result}"); - } - } - - [TestMethod] - public void TestDoesNotStartWithUpper() - { - // Tests that we expect to return false. - string[] words = { "alphabet", "zebra", "abc", "αυτοκινητοβιομηχανία", "государство", - "1234", ".", ";", " " }; - foreach (var word in words) - { - bool result = word.StartsWithUpper(); - Assert.IsFalse(result, - $"Expected for '{word}': false; Actual: {result}"); - } - } - - [TestMethod] - public void DirectCallWithNullOrEmpty() - { - // Tests that we expect to return false. - string[] words = { string.Empty, null }; - foreach (var word in words) - { - bool result = StringLibrary.StartsWithUpper(word); - Assert.IsFalse(result, - String.Format("Expected for '{0}': false; Actual: {1}", - word == null ? "" : word, result)); - } - } - } -} diff --git a/samples/snippets/csharp/misc/cs4009-3.cs b/samples/snippets/csharp/misc/cs4009-3.cs index d3fb6ba035f9e..73303053b966c 100644 --- a/samples/snippets/csharp/misc/cs4009-3.cs +++ b/samples/snippets/csharp/misc/cs4009-3.cs @@ -7,7 +7,7 @@ public static void Main() { Console.WriteLine("About to wait two seconds"); int value = WaitTwoSeconds().Result; - Console.WriteLine($"Value returned from the aynnc operation: {value}"); + Console.WriteLine($"Value returned from the async operation: {value}"); Console.WriteLine("About to exit the program"); } @@ -21,5 +21,5 @@ private static async Task WaitTwoSeconds() // The example displays the following output: // About to wait two seconds // Returning from an asynchronous method -// Value returned from the aynnc operation: 100 +// Value returned from the async operation: 100 // About to exit the program diff --git a/samples/snippets/csharp/programming-guide/dynamic-linq-expression-trees/dynamic-linq-expression-trees.csproj b/samples/snippets/csharp/programming-guide/dynamic-linq-expression-trees/dynamic-linq-expression-trees.csproj index 63e6fbe983eba..e4246e0c3b65a 100644 --- a/samples/snippets/csharp/programming-guide/dynamic-linq-expression-trees/dynamic-linq-expression-trees.csproj +++ b/samples/snippets/csharp/programming-guide/dynamic-linq-expression-trees/dynamic-linq-expression-trees.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/samples/snippets/csharp/roslyn-sdk/SemanticQuickStart/SemanticQuickStart.csproj b/samples/snippets/csharp/roslyn-sdk/SemanticQuickStart/SemanticQuickStart.csproj index b2a1f8ee3e893..f92952e6f8434 100644 --- a/samples/snippets/csharp/roslyn-sdk/SemanticQuickStart/SemanticQuickStart.csproj +++ b/samples/snippets/csharp/roslyn-sdk/SemanticQuickStart/SemanticQuickStart.csproj @@ -6,7 +6,7 @@ - + diff --git a/samples/snippets/csharp/roslyn-sdk/SyntaxQuickStart/HelloSyntaxTree/HelloSyntaxTree.csproj b/samples/snippets/csharp/roslyn-sdk/SyntaxQuickStart/HelloSyntaxTree/HelloSyntaxTree.csproj index 56ea7a4f06461..49a379ec0e2f6 100644 --- a/samples/snippets/csharp/roslyn-sdk/SyntaxQuickStart/HelloSyntaxTree/HelloSyntaxTree.csproj +++ b/samples/snippets/csharp/roslyn-sdk/SyntaxQuickStart/HelloSyntaxTree/HelloSyntaxTree.csproj @@ -6,7 +6,7 @@ - + diff --git a/samples/snippets/csharp/roslyn-sdk/SyntaxQuickStart/SyntaxWalker/SyntaxWalker.csproj b/samples/snippets/csharp/roslyn-sdk/SyntaxQuickStart/SyntaxWalker/SyntaxWalker.csproj index b2a1f8ee3e893..f92952e6f8434 100644 --- a/samples/snippets/csharp/roslyn-sdk/SyntaxQuickStart/SyntaxWalker/SyntaxWalker.csproj +++ b/samples/snippets/csharp/roslyn-sdk/SyntaxQuickStart/SyntaxWalker/SyntaxWalker.csproj @@ -6,7 +6,7 @@ - + diff --git a/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/ConstructionCS/ConstructionCS.csproj b/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/ConstructionCS/ConstructionCS.csproj index 3af85ea8884c2..d4c520751a711 100644 --- a/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/ConstructionCS/ConstructionCS.csproj +++ b/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/ConstructionCS/ConstructionCS.csproj @@ -6,7 +6,7 @@ - + diff --git a/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/TransformationCS/TransformationCS.csproj b/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/TransformationCS/TransformationCS.csproj index 7e2919bb0584b..0105dd6e77ffd 100644 --- a/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/TransformationCS/TransformationCS.csproj +++ b/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/TransformationCS/TransformationCS.csproj @@ -6,7 +6,7 @@ - + diff --git a/samples/snippets/csharp/safe-efficient-code/benchmark/Program.cs b/samples/snippets/csharp/safe-efficient-code/benchmark/Program.cs deleted file mode 100644 index ea01e0cebbd90..0000000000000 --- a/samples/snippets/csharp/safe-efficient-code/benchmark/Program.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Running; - -namespace benchmark -{ - public readonly struct MyImmutableStruct - { - public double X { get; } - public double Y { get; } - public double Z { get; } - - private readonly double a; - private readonly double b; - private readonly double c; - private readonly double d; - private readonly double e; - private readonly double f; - private readonly double g; - private readonly double h; - public MyImmutableStruct(double x, double y=0, double z=0) - { - X = x; - Y = y; - Z = z; - a = 1; - b = 2; - c = 3; - d = 4; - e = 5; - f = 6; - g = 7; - h = 8; - } - } - - public struct MyMutableStruct - { - public double X { get; } - public double Y { get; } - public double Z { get; } - - private double a; - private double b; - private double c; - private double d; - private double e; - private double f; - private double g; - private double h; - public MyMutableStruct(double x, double y = 0, double z = 0) - { - X = x; - Y = y; - Z = z; - a = 1; - b = 2; - c = 3; - d = 4; - e = 5; - f = 6; - g = 7; - h = 8; - } - } - - public class Benchmarks - { - MyImmutableStruct sStruct = new MyImmutableStruct(1.1, 2.2); - MyMutableStruct mStruct = new MyMutableStruct(1.1, 2.2); - - [Benchmark] - public void ImmutableAddByType() - { - add_by_type(sStruct); - } - - [Benchmark] - public void ImmutableAddByRefType() - { - add_by_reftype(in sStruct); - } - public double add_by_type(MyImmutableStruct s) - { - return s.X + s.Y; - } - public double add_by_reftype(in MyImmutableStruct s) - { - return s.X + s.Y; - } - - [Benchmark] - public void MutableAddByType() - { - add_by_type(mStruct); - } - - [Benchmark] - public void MutableAddByRefType() - { - add_by_reftype(in mStruct); - } - - public double add_by_type(MyMutableStruct s) - { - return s.X + s.Y; - } - public double add_by_reftype(in MyMutableStruct s) - { - return s.X + s.Y; - } - } - - class Program - { - static void Main(string[] args) - { - var Summary = BenchmarkRunner.Run(); - } - } -} diff --git a/samples/snippets/csharp/safe-efficient-code/benchmark/benchmark.csproj b/samples/snippets/csharp/safe-efficient-code/benchmark/benchmark.csproj deleted file mode 100644 index 78b06ab253cdb..0000000000000 --- a/samples/snippets/csharp/safe-efficient-code/benchmark/benchmark.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Exe - net6.0 - - - - - - - diff --git a/samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Point3D.cs b/samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Point3D.cs deleted file mode 100644 index f3a2d375b5dba..0000000000000 --- a/samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Point3D.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; - -namespace SafeEfficientCode -{ - public struct Point3D - { - public double X; - public double Y; - public double Z; - -#region OriginReference - private static Point3D origin = new Point3D(); - public static ref readonly Point3D Origin => ref origin; -#endregion - } - -#region ReadonlyOnlyPoint3D - readonly public struct ReadonlyPoint3D - { - public ReadonlyPoint3D(double x, double y, double z) - { - this.X = x; - this.Y = y; - this.Z = z; - } - - public double X { get; } - public double Y { get; } - public double Z { get; } - - private static readonly ReadonlyPoint3D origin = new ReadonlyPoint3D(); - public static ref readonly ReadonlyPoint3D Origin => ref origin; - } -#endregion -} diff --git a/samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs b/samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs deleted file mode 100644 index b794105334891..0000000000000 --- a/samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/Program.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; - -namespace SafeEfficientCode -{ - class Program - { - static void Main(string[] args) - { - var pt1 = new Point3D{X = 3, Y = 4, Z = 5}; - var pt2 = new Point3D{X = 10, Y = 8, Z = 5}; - -#region UseInArgument - var distance = CalculateDistance(pt1, pt2); - var fromOrigin = CalculateDistance(pt1, new Point3D()); - #endregion - - #region ExplicitInArgument - distance = CalculateDistance(in pt1, in pt2); - distance = CalculateDistance(in pt1, new Point3D()); - distance = CalculateDistance(pt1, in Point3D.Origin); - #endregion - - fromOrigin = CalculateDistance2(pt1); - - #region AssignRefReadonly - var originValue = Point3D.Origin; - ref readonly var originReference = ref Point3D.Origin; -#endregion - } - - #region ByValue - private static double CalculateDistance(Point3D point1, Point3D point2) - { - double xDifference = point1.X - point2.X; - double yDifference = point1.Y - point2.Y; - double zDifference = point1.Z - point2.Z; - - return Math.Sqrt(xDifference * xDifference + yDifference * yDifference + zDifference * zDifference); - } - #endregion - - #region InArgument - private static double CalculateDistance(in Point3D point1, in Point3D point2) - { - double xDifference = point1.X - point2.X; - double yDifference = point1.Y - point2.Y; - double zDifference = point1.Z - point2.Z; - - return Math.Sqrt(xDifference * xDifference + yDifference * yDifference + zDifference * zDifference); - } -#endregion - -#region InArgumentDefault - private static double CalculateDistance2(in Point3D point1, in Point3D point2 = default) - { - double xDifference = point1.X - point2.X; - double yDifference = point1.Y - point2.Y; - double zDifference = point1.Z - point2.Z; - - return Math.Sqrt(xDifference * xDifference + yDifference * yDifference + zDifference * zDifference); - } - #endregion - - #region ReadOnlyInArgument - private static double CalculateDistance3(in ReadonlyPoint3D point1, in ReadonlyPoint3D point2 = default) - { - double xDifference = point1.X - point2.X; - double yDifference = point1.Y - point2.Y; - double zDifference = point1.Z - point2.Z; - - return Math.Sqrt(xDifference * xDifference + yDifference * yDifference + zDifference * zDifference); - } - #endregion - } -} diff --git a/samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/ref-readonly-struct.csproj b/samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/ref-readonly-struct.csproj deleted file mode 100644 index bd5ff6ca3796f..0000000000000 --- a/samples/snippets/csharp/safe-efficient-code/ref-readonly-struct/ref-readonly-struct.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Exe - net6.0 - - - - 7.2 - - - diff --git a/samples/snippets/csharp/safe-efficient-code/safe-efficient-code.sln b/samples/snippets/csharp/safe-efficient-code/safe-efficient-code.sln deleted file mode 100644 index 30540618d61ce..0000000000000 --- a/samples/snippets/csharp/safe-efficient-code/safe-efficient-code.sln +++ /dev/null @@ -1,48 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ref-readonly-struct", "ref-readonly-struct\ref-readonly-struct.csproj", "{82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "benchmark", "benchmark\benchmark.csproj", "{2751AB9C-EADD-48A6-8F16-F03509AE5128}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Debug|Any CPU.Build.0 = Debug|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Debug|x64.ActiveCfg = Debug|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Debug|x64.Build.0 = Debug|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Debug|x86.ActiveCfg = Debug|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Debug|x86.Build.0 = Debug|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Release|Any CPU.ActiveCfg = Release|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Release|Any CPU.Build.0 = Release|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Release|x64.ActiveCfg = Release|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Release|x64.Build.0 = Release|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Release|x86.ActiveCfg = Release|Any CPU - {82BFCEA8-A6FA-43E0-892B-C9E5FF4DC858}.Release|x86.Build.0 = Release|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Debug|x64.ActiveCfg = Debug|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Debug|x64.Build.0 = Debug|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Debug|x86.ActiveCfg = Debug|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Debug|x86.Build.0 = Debug|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Release|Any CPU.Build.0 = Release|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Release|x64.ActiveCfg = Release|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Release|x64.Build.0 = Release|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Release|x86.ActiveCfg = Release|Any CPU - {2751AB9C-EADD-48A6-8F16-F03509AE5128}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/serialization/Loan.cs b/samples/snippets/csharp/serialization/Loan.cs deleted file mode 100644 index 6b9e58a7bafbf..0000000000000 --- a/samples/snippets/csharp/serialization/Loan.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.ComponentModel; -using System.Text.Json.Serialization; - -namespace serialization -{ - // - public class Loan : INotifyPropertyChanged - { - public double LoanAmount { get; set; } - public double InterestRate { get; set; } - - // - [JsonIgnore] - public DateTime TimeLastLoaded { get; set; } - // - - public int Term { get; set; } - - private string _customer; - public string Customer - { - get { return _customer; } - set - { - _customer = value; - PropertyChanged?.Invoke(this, - new PropertyChangedEventArgs(nameof(Customer))); - } - } - - public event PropertyChangedEventHandler? PropertyChanged; - - public Loan(double loanAmount, - double interestRate, - int term, - string customer) - { - LoanAmount = loanAmount; - InterestRate = interestRate; - Term = term; - _customer = customer; - } - } - // -} diff --git a/samples/snippets/csharp/serialization/Program.cs b/samples/snippets/csharp/serialization/Program.cs deleted file mode 100644 index 82993bbf00163..0000000000000 --- a/samples/snippets/csharp/serialization/Program.cs +++ /dev/null @@ -1,38 +0,0 @@ -using serialization; -// -using System.IO; -using System.Text.Json; -// - -// -const string fileName = @"../../../SavedLoan.json"; -// - -// -Loan testLoan = new(10_000.0, 7.5, 36, "Neil Black"); -// - -// -if (File.Exists(fileName)) -{ - Console.WriteLine("Reading saved file"); - string jsonFromFile = File.ReadAllText(fileName); - testLoan = JsonSerializer.Deserialize(jsonFromFile); - testLoan.TimeLastLoaded = DateTime.Now; -} -// - -// -testLoan.PropertyChanged += (_, __) => Console.WriteLine($"New customer value: {testLoan.Customer}"); - -testLoan.Customer = "Henry Clay"; -Console.WriteLine(testLoan.InterestRate); -testLoan.InterestRate = 7.1; -Console.WriteLine(testLoan.InterestRate); -// - -// -// Serialize it. -string json = JsonSerializer.Serialize(testLoan); -File.WriteAllText(fileName, json); -// diff --git a/samples/snippets/csharp/serialization/serialization.csproj b/samples/snippets/csharp/serialization/serialization.csproj deleted file mode 100644 index 780397f264590..0000000000000 --- a/samples/snippets/csharp/serialization/serialization.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net7.0 - enable - enable - - - diff --git a/samples/snippets/csharp/tutorials/attributes/Program.cs b/samples/snippets/csharp/tutorials/attributes/Program.cs deleted file mode 100644 index 5c9554e24b4ef..0000000000000 --- a/samples/snippets/csharp/tutorials/attributes/Program.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.CompilerServices; - -namespace ConsoleApplication -{ -#pragma warning disable CS0612 - public class Program - { - public static void Main(string[] args) - { - var c = new MyClass(); // this should trigger a warning at compile time since MyClass has an Obsolete attribute - - // this code enumerates all the possible targets of an attributes - // for purposes of compile time checking - var targets = new List(); - targets.Add(AttributeTargets.All); - targets.Add(AttributeTargets.Assembly); - targets.Add(AttributeTargets.Class); - targets.Add(AttributeTargets.Constructor); - targets.Add(AttributeTargets.Delegate); - targets.Add(AttributeTargets.Enum); - targets.Add(AttributeTargets.Event); - targets.Add(AttributeTargets.Field); - targets.Add(AttributeTargets.GenericParameter); - targets.Add(AttributeTargets.Interface); - targets.Add(AttributeTargets.Method); - targets.Add(AttributeTargets.Module); - targets.Add(AttributeTargets.Parameter); - targets.Add(AttributeTargets.Property); - targets.Add(AttributeTargets.ReturnValue); - targets.Add(AttributeTargets.Struct); - - // - TypeInfo typeInfo = typeof(MyClass).GetTypeInfo(); - Console.WriteLine("The assembly qualified name of MyClass is " + typeInfo.AssemblyQualifiedName); - // - - // - var attrs = typeInfo.GetCustomAttributes(); - foreach(var attr in attrs) - Console.WriteLine("Attribute on MyClass: " + attr.GetType().Name); - // - } - } - - // - [Obsolete] - public class MyClass - { - } - // - - // - [Obsolete("ThisClass is obsolete. Use ThisClass2 instead.")] - public class ThisClass - { - } - // -#pragma warning restore CS0612 - // - public class MySpecialAttribute : Attribute - { - } - // - - // - [MySpecial] - public class SomeOtherClass - { - } - // - - // - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] - public class MyAttributeForClassAndStructOnly : Attribute - { - } - // - - // - public class Foo - { - // if the below attribute was uncommented, it would cause a compiler error - // [MyAttributeForClassAndStructOnly] - public Foo() - { } - } - // - - // - public class MyUIClass : INotifyPropertyChanged - { - public event PropertyChangedEventHandler PropertyChanged; - - public void RaisePropertyChanged([CallerMemberName] string propertyName = null) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } - - private string _name; - public string Name - { - get { return _name;} - set - { - if (value != _name) - { - _name = value; - RaisePropertyChanged(); // notice that "Name" is not needed here explicitly - } - } - } - } - // - -/* - // - public class GotchaAttribute : Attribute - { - public GotchaAttribute(Foo myClass, string str) - { - } - } - // - - // - [Gotcha(new Foo(), "test")] // does not compile - public class AttributeFail - { - } - // -*/ -} diff --git a/samples/snippets/csharp/tutorials/attributes/attributes.csproj b/samples/snippets/csharp/tutorials/attributes/attributes.csproj deleted file mode 100644 index adbde6e0619fe..0000000000000 --- a/samples/snippets/csharp/tutorials/attributes/attributes.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net6.0 - - - \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.Tests/Services/NewsServiceTests.cs b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.Tests/Services/NewsServiceTests.cs deleted file mode 100644 index 0ff8b5650e480..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.Tests/Services/NewsServiceTests.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Threading.Tasks; -using AutoMapper; -using SimpleFeedReader.Services; -using SimpleFeedReader.ViewModels; -using Xunit; - -namespace SimpleFeedReader.Tests.Services -{ -#nullable enable - public class NewsServiceTests - { - private readonly NewsService _newsService; - - public NewsServiceTests() - { - var mockMapper = new MapperConfiguration(cfg => cfg.AddProfile()); - mockMapper.AssertConfigurationIsValid(); - IMapper mapper = mockMapper.CreateMapper(); - - _newsService = new NewsService(mapper); - } - - [Fact] - public async Task Returns_News_Stories_Given_Valid_Uri() - { - // Arrange - var feedUrl = "https://azure.microsoft.com/en-us/blog/feed/"; - - // - // Act - IEnumerable result = - await _newsService.GetNews(feedUrl); - - // Assert - Assert.True(result.Any()); - // - } - - [Fact] - public void Throws_UriFormatException_Given_Malformed_Uri() - { - // Arrange - var feedUrl = "invalid_url"; - - // Act & Assert - Assert.ThrowsAsync(async () => - await _newsService.GetNews(feedUrl)); - } - - [Fact] - public void Throws_WebException_Given_Unknown_Host_Uri() - { - // Arrange - var feedUrl = "https://fail/test.rss"; - - // Act & Assert - Assert.ThrowsAsync(async () => - await _newsService.GetNews(feedUrl)); - } - } -} diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.Tests/SimpleFeedReader.Tests.csproj b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.Tests/SimpleFeedReader.Tests.csproj deleted file mode 100644 index c9421434dc9a2..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.Tests/SimpleFeedReader.Tests.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net6.0 - 8.0 - enable - false - - - - - - - - - - - - - - - diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.sln b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.sln deleted file mode 100644 index c87a7c4a9b862..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27428.2037 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleFeedReader", "SimpleFeedReader\SimpleFeedReader.csproj", "{9396044C-E61F-4CC2-9805-F859FF4640F6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleFeedReader.Tests", "SimpleFeedReader.Tests\SimpleFeedReader.Tests.csproj", "{18167449-DCC4-4D2E-BCCB-30AA40098C05}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9396044C-E61F-4CC2-9805-F859FF4640F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9396044C-E61F-4CC2-9805-F859FF4640F6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9396044C-E61F-4CC2-9805-F859FF4640F6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9396044C-E61F-4CC2-9805-F859FF4640F6}.Release|Any CPU.Build.0 = Release|Any CPU - {18167449-DCC4-4D2E-BCCB-30AA40098C05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {18167449-DCC4-4D2E-BCCB-30AA40098C05}.Debug|Any CPU.Build.0 = Debug|Any CPU - {18167449-DCC4-4D2E-BCCB-30AA40098C05}.Release|Any CPU.ActiveCfg = Release|Any CPU - {18167449-DCC4-4D2E-BCCB-30AA40098C05}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {CDD224D8-92AA-4166-8399-8D19B6BFF3CD} - EndGlobalSection -EndGlobal diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Error.cshtml b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Error.cshtml deleted file mode 100644 index b1f3143a42e94..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Error.cshtml +++ /dev/null @@ -1,23 +0,0 @@ -@page -@model ErrorModel -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

- -@if (Model.ShowRequestId) -{ -

- Request ID: @Model.RequestId -

-} - -

Development Mode

-

- Swapping to Development environment will display more detailed information about the error that occurred. -

-

- Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. -

diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Error.cshtml.cs b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Error.cshtml.cs deleted file mode 100644 index a4dd8663edf19..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Error.cshtml.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.RazorPages; - -namespace SimpleFeedReader.Pages -{ - // -#nullable enable - public class ErrorModel : PageModel - { - public string? RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - public void OnGet() - { - RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; - } - } -#nullable restore - // -} diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Index.cshtml b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Index.cshtml deleted file mode 100644 index 023ee379f2c55..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Index.cshtml +++ /dev/null @@ -1,54 +0,0 @@ -@page -@model IndexModel -@{ - ViewData["Title"] = "Home page"; -} -

Simple Feed Reader

-
-
-
-
-
- -
-
- -
- -
- - @if (!string.IsNullOrEmpty(Model.ErrorText)) - { -
-

@Model.ErrorText

-
- } - - @if (Model.NewsItems?.Count > 0) - { -
- - - - - - - - @foreach (var item in Model.NewsItems) - { - - - - - } - -
TitlePublished
- @item.Title - - @item.Published.ToString("MMM dd, yyyy HH:mm:ss") -
- } - diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Index.cshtml.cs b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Index.cshtml.cs deleted file mode 100644 index 39737243a735e..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/Index.cshtml.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Net; -using System.Threading.Tasks; -using System.Xml; -using Microsoft.AspNetCore.Mvc.RazorPages; -using SimpleFeedReader.Services; -using SimpleFeedReader.ViewModels; - -namespace SimpleFeedReader.Pages -{ -#nullable enable - public class IndexModel : PageModel - { - private readonly NewsService _newsService; - - public IndexModel(NewsService newsService) - { - _newsService = newsService; - } - - // - public string? ErrorText { get; private set; } - // - - // - public List NewsItems { get; } = new List(); - // - - public async Task OnGet() - { - string feedUrl = Request.Query["feedurl"]; - - if (!string.IsNullOrEmpty(feedUrl)) - { - try - { - // - NewsItems.AddRange(await _newsService.GetNews(feedUrl)); - // - } - catch (UriFormatException) - { - ErrorText = "There was a problem parsing the URL."; - return; - } - catch (WebException ex) when (ex.Status == WebExceptionStatus.NameResolutionFailure) - { - ErrorText = "Unknown host name."; - return; - } - catch (WebException ex) when (ex.Status == WebExceptionStatus.ProtocolError) - { - ErrorText = "Syndication feed not found."; - return; - } - catch (AggregateException ae) - { - ae.Handle((x) => - { - if (x is XmlException) - { - ErrorText = "There was a problem parsing the feed. Are you sure that URL is a syndication feed?"; - return true; - } - return false; - }); - } - } - } - } -#nullable restore -} diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/_Layout.cshtml b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/_Layout.cshtml deleted file mode 100644 index 2f2f094b4e826..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/_Layout.cshtml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - @ViewData["Title"] - SimpleFeedReader - - - - - - - - - - - - -
- @RenderBody() -
-
-

© 2017 - SimpleFeedReader

-
-
- - - - - - - - - - - @RenderSection("Scripts", required: false) - - diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/_ViewImports.cshtml b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/_ViewImports.cshtml deleted file mode 100644 index d19c97a41fb3e..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using SimpleFeedReader -@namespace SimpleFeedReader.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/_ViewStart.cshtml b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/_ViewStart.cshtml deleted file mode 100644 index a5f10045db974..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Pages/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Program.cs b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Program.cs deleted file mode 100644 index 30e8e12fd7b50..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Program.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; - -namespace SimpleFeedReader -{ - public class Program - { - public static void Main(string[] args) - { - CreateWebHostBuilder(args).Build().Run(); - } - - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup(); - } -} diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Properties/launchSettings.json b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Properties/launchSettings.json deleted file mode 100644 index 1114f6a3957b3..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Properties/launchSettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:57451/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "SimpleFeedReader": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "http://localhost:57452/" - } - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Services/NewsService.cs b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Services/NewsService.cs deleted file mode 100644 index 018c2a6b2ad08..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Services/NewsService.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Xml; -using AutoMapper; -using Microsoft.SyndicationFeed; -using Microsoft.SyndicationFeed.Rss; -using SimpleFeedReader.ViewModels; - -namespace SimpleFeedReader.Services -{ -#nullable enable - public class NewsService - { - private readonly IMapper _mapper; - - // - public NewsService(IMapper mapper) - { - _mapper = mapper; - } - // - - // - public async Task> GetNews(string feedUrl) - { - var news = new List(); - var feedUri = new Uri(feedUrl); - - using (var xmlReader = XmlReader.Create(feedUri.ToString(), - new XmlReaderSettings { Async = true })) - { - try - { - var feedReader = new RssFeedReader(xmlReader); - - while (await feedReader.Read()) - { - switch (feedReader.ElementType) - { - // RSS Item - case SyndicationElementType.Item: - ISyndicationItem item = await feedReader.ReadItem(); - var newsStory = _mapper.Map(item); - news.Add(newsStory); - break; - - // Something else - default: - break; - } - } - } - catch (AggregateException ae) - { - throw ae.Flatten(); - } - } - - return news.OrderByDescending(story => story.Published); - } - // - } -#nullable restore - - // -#nullable enable - public class NewsStoryProfile : Profile - { - public NewsStoryProfile() - { - // Create the AutoMapper mapping profile between the 2 objects. - // ISyndicationItem.Id maps to NewsStoryViewModel.Uri. - CreateMap() - .ForCtorParam("uri", opt => opt.MapFrom(src => src.Id)); - } - // - } -#nullable restore -} diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/SimpleFeedReader.csproj b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/SimpleFeedReader.csproj deleted file mode 100644 index 72dabd8da2763..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/SimpleFeedReader.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - net6.0 - 8.0 - enable - - - - - - - - - diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Startup.cs b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Startup.cs deleted file mode 100644 index 647f1729c58ef..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/Startup.cs +++ /dev/null @@ -1,42 +0,0 @@ -using AutoMapper; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using SimpleFeedReader.Services; - -namespace SimpleFeedReader -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - public void ConfigureServices(IServiceCollection services) - { - services.AddScoped(); - services.AddAutoMapper(typeof(NewsStoryProfile)); - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); - } - - public void Configure(IApplicationBuilder app, IHostingEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseExceptionHandler("/Error"); - } - - app.UseStaticFiles(); - app.UseMvc(); - } - } -} diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/ViewModels/NewsStoryViewModel.cs b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/ViewModels/NewsStoryViewModel.cs deleted file mode 100644 index f11a3e9f3fee8..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/ViewModels/NewsStoryViewModel.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace SimpleFeedReader.ViewModels -{ - // -#nullable enable - public class NewsStoryViewModel - { - public NewsStoryViewModel(DateTimeOffset published, string title, string uri) => - (Published, Title, Uri) = (published, title, uri); - - public DateTimeOffset Published { get; } - public string Title { get; } - public string Uri { get; } - } -#nullable restore - // -} diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/appsettings.Development.json b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/appsettings.Development.json deleted file mode 100644 index fa8ce71a97a34..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/appsettings.Development.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/appsettings.json b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/appsettings.json deleted file mode 100644 index 4ba39ba2fd985..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/appsettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Warning" - } - }, - "ConnectionStrings": { - "SimpleFeedReaderContext": "Server=(localdb)\\mssqllocaldb;Database=SimpleFeedReaderContext-2cab5024-4edd-474f-bdc2-d05037edd8fa;Trusted_Connection=True;MultipleActiveResultSets=true" - } -} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/bundleconfig.json b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/bundleconfig.json deleted file mode 100644 index cd2c255effa77..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/bundleconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -// Configure bundling and minification for the project. -// More info at https://go.microsoft.com/fwlink/?LinkId=808241 -[ - { - "outputFileName": "wwwroot/css/site.min.css", - // An array of relative input file paths. Globbing patterns supported - "inputFiles": [ - "wwwroot/css/site.css" - ] - } -] diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/css/site.css b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/css/site.css deleted file mode 100644 index 8f4728b71f942..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/css/site.css +++ /dev/null @@ -1,11 +0,0 @@ -body { - padding-top: 50px; - padding-bottom: 20px; -} - -/* Wrapping element */ -/* Set some basic padding to keep content from hitting the edges */ -.body-content { - padding-left: 15px; - padding-right: 15px; -} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/css/site.min.css b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/css/site.min.css deleted file mode 100644 index 5e93e30ae3fa2..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/css/site.min.css +++ /dev/null @@ -1 +0,0 @@ -body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/favicon.ico b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/favicon.ico deleted file mode 100644 index a3a799985c43b..0000000000000 Binary files a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/favicon.ico and /dev/null differ diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/.bower.json b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/.bower.json deleted file mode 100644 index 1e99b629942ce..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/.bower.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "bootstrap", - "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", - "keywords": [ - "css", - "js", - "less", - "mobile-first", - "responsive", - "front-end", - "framework", - "web" - ], - "homepage": "http://getbootstrap.com", - "license": "MIT", - "moduleType": "globals", - "main": [ - "less/bootstrap.less", - "dist/js/bootstrap.js" - ], - "ignore": [ - "/.*", - "_config.yml", - "CNAME", - "composer.json", - "CONTRIBUTING.md", - "docs", - "js/tests", - "test-infra" - ], - "dependencies": { - "jquery": "1.9.1 - 3" - }, - "version": "3.3.7", - "_release": "3.3.7", - "_resolution": { - "type": "version", - "tag": "v3.3.7", - "commit": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" - }, - "_source": "https://github.com/twbs/bootstrap.git", - "_target": "v3.3.7", - "_originalSource": "bootstrap", - "_direct": true -} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/LICENSE b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/LICENSE deleted file mode 100644 index 7a300022c3efb..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2011-2016 Twitter, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css deleted file mode 100644 index 31d8882661324..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css +++ /dev/null @@ -1,587 +0,0 @@ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ -.btn-default, -.btn-primary, -.btn-success, -.btn-info, -.btn-warning, -.btn-danger { - text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); -} -.btn-default:active, -.btn-primary:active, -.btn-success:active, -.btn-info:active, -.btn-warning:active, -.btn-danger:active, -.btn-default.active, -.btn-primary.active, -.btn-success.active, -.btn-info.active, -.btn-warning.active, -.btn-danger.active { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn-default.disabled, -.btn-primary.disabled, -.btn-success.disabled, -.btn-info.disabled, -.btn-warning.disabled, -.btn-danger.disabled, -.btn-default[disabled], -.btn-primary[disabled], -.btn-success[disabled], -.btn-info[disabled], -.btn-warning[disabled], -.btn-danger[disabled], -fieldset[disabled] .btn-default, -fieldset[disabled] .btn-primary, -fieldset[disabled] .btn-success, -fieldset[disabled] .btn-info, -fieldset[disabled] .btn-warning, -fieldset[disabled] .btn-danger { - -webkit-box-shadow: none; - box-shadow: none; -} -.btn-default .badge, -.btn-primary .badge, -.btn-success .badge, -.btn-info .badge, -.btn-warning .badge, -.btn-danger .badge { - text-shadow: none; -} -.btn:active, -.btn.active { - background-image: none; -} -.btn-default { - text-shadow: 0 1px 0 #fff; - background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); - background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); - background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #dbdbdb; - border-color: #ccc; -} -.btn-default:hover, -.btn-default:focus { - background-color: #e0e0e0; - background-position: 0 -15px; -} -.btn-default:active, -.btn-default.active { - background-color: #e0e0e0; - border-color: #dbdbdb; -} -.btn-default.disabled, -.btn-default[disabled], -fieldset[disabled] .btn-default, -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled.focus, -.btn-default[disabled].focus, -fieldset[disabled] .btn-default.focus, -.btn-default.disabled:active, -.btn-default[disabled]:active, -fieldset[disabled] .btn-default:active, -.btn-default.disabled.active, -.btn-default[disabled].active, -fieldset[disabled] .btn-default.active { - background-color: #e0e0e0; - background-image: none; -} -.btn-primary { - background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); - background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #245580; -} -.btn-primary:hover, -.btn-primary:focus { - background-color: #265a88; - background-position: 0 -15px; -} -.btn-primary:active, -.btn-primary.active { - background-color: #265a88; - border-color: #245580; -} -.btn-primary.disabled, -.btn-primary[disabled], -fieldset[disabled] .btn-primary, -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled.focus, -.btn-primary[disabled].focus, -fieldset[disabled] .btn-primary.focus, -.btn-primary.disabled:active, -.btn-primary[disabled]:active, -fieldset[disabled] .btn-primary:active, -.btn-primary.disabled.active, -.btn-primary[disabled].active, -fieldset[disabled] .btn-primary.active { - background-color: #265a88; - background-image: none; -} -.btn-success { - background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); - background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); - background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #3e8f3e; -} -.btn-success:hover, -.btn-success:focus { - background-color: #419641; - background-position: 0 -15px; -} -.btn-success:active, -.btn-success.active { - background-color: #419641; - border-color: #3e8f3e; -} -.btn-success.disabled, -.btn-success[disabled], -fieldset[disabled] .btn-success, -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled.focus, -.btn-success[disabled].focus, -fieldset[disabled] .btn-success.focus, -.btn-success.disabled:active, -.btn-success[disabled]:active, -fieldset[disabled] .btn-success:active, -.btn-success.disabled.active, -.btn-success[disabled].active, -fieldset[disabled] .btn-success.active { - background-color: #419641; - background-image: none; -} -.btn-info { - background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); - background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); - background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #28a4c9; -} -.btn-info:hover, -.btn-info:focus { - background-color: #2aabd2; - background-position: 0 -15px; -} -.btn-info:active, -.btn-info.active { - background-color: #2aabd2; - border-color: #28a4c9; -} -.btn-info.disabled, -.btn-info[disabled], -fieldset[disabled] .btn-info, -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled.focus, -.btn-info[disabled].focus, -fieldset[disabled] .btn-info.focus, -.btn-info.disabled:active, -.btn-info[disabled]:active, -fieldset[disabled] .btn-info:active, -.btn-info.disabled.active, -.btn-info[disabled].active, -fieldset[disabled] .btn-info.active { - background-color: #2aabd2; - background-image: none; -} -.btn-warning { - background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); - background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); - background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #e38d13; -} -.btn-warning:hover, -.btn-warning:focus { - background-color: #eb9316; - background-position: 0 -15px; -} -.btn-warning:active, -.btn-warning.active { - background-color: #eb9316; - border-color: #e38d13; -} -.btn-warning.disabled, -.btn-warning[disabled], -fieldset[disabled] .btn-warning, -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled.focus, -.btn-warning[disabled].focus, -fieldset[disabled] .btn-warning.focus, -.btn-warning.disabled:active, -.btn-warning[disabled]:active, -fieldset[disabled] .btn-warning:active, -.btn-warning.disabled.active, -.btn-warning[disabled].active, -fieldset[disabled] .btn-warning.active { - background-color: #eb9316; - background-image: none; -} -.btn-danger { - background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); - background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); - background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #b92c28; -} -.btn-danger:hover, -.btn-danger:focus { - background-color: #c12e2a; - background-position: 0 -15px; -} -.btn-danger:active, -.btn-danger.active { - background-color: #c12e2a; - border-color: #b92c28; -} -.btn-danger.disabled, -.btn-danger[disabled], -fieldset[disabled] .btn-danger, -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled.focus, -.btn-danger[disabled].focus, -fieldset[disabled] .btn-danger.focus, -.btn-danger.disabled:active, -.btn-danger[disabled]:active, -fieldset[disabled] .btn-danger:active, -.btn-danger.disabled.active, -.btn-danger[disabled].active, -fieldset[disabled] .btn-danger.active { - background-color: #c12e2a; - background-image: none; -} -.thumbnail, -.img-thumbnail { - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); - box-shadow: 0 1px 2px rgba(0, 0, 0, .075); -} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - background-color: #e8e8e8; - background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); - background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); - background-repeat: repeat-x; -} -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - background-color: #2e6da4; - background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); - background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); - background-repeat: repeat-x; -} -.navbar-default { - background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); - background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); - background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); -} -.navbar-default .navbar-nav > .open > a, -.navbar-default .navbar-nav > .active > a { - background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); - background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); - background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); - background-repeat: repeat-x; - -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); - box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); -} -.navbar-brand, -.navbar-nav > li > a { - text-shadow: 0 1px 0 rgba(255, 255, 255, .25); -} -.navbar-inverse { - background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); - background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); - background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-radius: 4px; -} -.navbar-inverse .navbar-nav > .open > a, -.navbar-inverse .navbar-nav > .active > a { - background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); - background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); - background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); - background-repeat: repeat-x; - -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); - box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); -} -.navbar-inverse .navbar-brand, -.navbar-inverse .navbar-nav > li > a { - text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); -} -.navbar-static-top, -.navbar-fixed-top, -.navbar-fixed-bottom { - border-radius: 0; -} -@media (max-width: 767px) { - .navbar .navbar-nav .open .dropdown-menu > .active > a, - .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #fff; - background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); - background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); - background-repeat: repeat-x; - } -} -.alert { - text-shadow: 0 1px 0 rgba(255, 255, 255, .2); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); -} -.alert-success { - background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); - background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); - background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); - background-repeat: repeat-x; - border-color: #b2dba1; -} -.alert-info { - background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); - background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); - background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); - background-repeat: repeat-x; - border-color: #9acfea; -} -.alert-warning { - background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); - background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); - background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); - background-repeat: repeat-x; - border-color: #f5e79e; -} -.alert-danger { - background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); - background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); - background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); - background-repeat: repeat-x; - border-color: #dca7a7; -} -.progress { - background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); - background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); - background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar { - background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); - background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-success { - background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); - background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); - background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-info { - background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); - background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); - background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-warning { - background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); - background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); - background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-danger { - background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); - background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); - background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.list-group { - border-radius: 4px; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); - box-shadow: 0 1px 2px rgba(0, 0, 0, .075); -} -.list-group-item.active, -.list-group-item.active:hover, -.list-group-item.active:focus { - text-shadow: 0 -1px 0 #286090; - background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); - background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); - background-repeat: repeat-x; - border-color: #2b669a; -} -.list-group-item.active .badge, -.list-group-item.active:hover .badge, -.list-group-item.active:focus .badge { - text-shadow: none; -} -.panel { - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); - box-shadow: 0 1px 2px rgba(0, 0, 0, .05); -} -.panel-default > .panel-heading { - background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); - background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); - background-repeat: repeat-x; -} -.panel-primary > .panel-heading { - background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); - background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); - background-repeat: repeat-x; -} -.panel-success > .panel-heading { - background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); - background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); - background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); - background-repeat: repeat-x; -} -.panel-info > .panel-heading { - background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); - background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); - background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); - background-repeat: repeat-x; -} -.panel-warning > .panel-heading { - background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); - background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); - background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); - background-repeat: repeat-x; -} -.panel-danger > .panel-heading { - background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); - background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); - background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); - background-repeat: repeat-x; -} -.well { - background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); - background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); - background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); - background-repeat: repeat-x; - border-color: #dcdcdc; - -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); - box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); -} -/*# sourceMappingURL=bootstrap-theme.css.map */ diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map deleted file mode 100644 index d876f60fb4fd2..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["bootstrap-theme.css","less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAAA;;;;GAIG;ACeH;;;;;;EAME,yCAAA;EC2CA,4FAAA;EACQ,oFAAA;CFvDT;ACgBC;;;;;;;;;;;;ECsCA,yDAAA;EACQ,iDAAA;CFxCT;ACMC;;;;;;;;;;;;;;;;;;ECiCA,yBAAA;EACQ,iBAAA;CFnBT;AC/BD;;;;;;EAuBI,kBAAA;CDgBH;ACyBC;;EAEE,uBAAA;CDvBH;AC4BD;EErEI,sEAAA;EACA,iEAAA;EACA,2FAAA;EAAA,oEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;EAuC2C,0BAAA;EAA2B,mBAAA;CDjBvE;ACpBC;;EAEE,0BAAA;EACA,6BAAA;CDsBH;ACnBC;;EAEE,0BAAA;EACA,sBAAA;CDqBH;ACfG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6BL;ACbD;EEtEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8DD;AC5DC;;EAEE,0BAAA;EACA,6BAAA;CD8DH;AC3DC;;EAEE,0BAAA;EACA,sBAAA;CD6DH;ACvDG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqEL;ACpDD;EEvEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CDsGD;ACpGC;;EAEE,0BAAA;EACA,6BAAA;CDsGH;ACnGC;;EAEE,0BAAA;EACA,sBAAA;CDqGH;AC/FG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6GL;AC3FD;EExEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8ID;AC5IC;;EAEE,0BAAA;EACA,6BAAA;CD8IH;AC3IC;;EAEE,0BAAA;EACA,sBAAA;CD6IH;ACvIG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqJL;AClID;EEzEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CDsLD;ACpLC;;EAEE,0BAAA;EACA,6BAAA;CDsLH;ACnLC;;EAEE,0BAAA;EACA,sBAAA;CDqLH;AC/KG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6LL;ACzKD;EE1EI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8ND;AC5NC;;EAEE,0BAAA;EACA,6BAAA;CD8NH;AC3NC;;EAEE,0BAAA;EACA,sBAAA;CD6NH;ACvNG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqOL;AC1MD;;EClCE,mDAAA;EACQ,2CAAA;CFgPT;ACrMD;;EE3FI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF0FF,0BAAA;CD2MD;ACzMD;;;EEhGI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFgGF,0BAAA;CD+MD;ACtMD;EE7GI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ECnBF,oEAAA;EH+HA,mBAAA;ECjEA,4FAAA;EACQ,oFAAA;CF8QT;ACjND;;EE7GI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ED2CF,yDAAA;EACQ,iDAAA;CFwRT;AC9MD;;EAEE,+CAAA;CDgND;AC5MD;EEhII,sEAAA;EACA,iEAAA;EACA,2FAAA;EAAA,oEAAA;EACA,4BAAA;EACA,uHAAA;ECnBF,oEAAA;EHkJA,mBAAA;CDkND;ACrND;;EEhII,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ED2CF,wDAAA;EACQ,gDAAA;CF+ST;AC/ND;;EAYI,0CAAA;CDuNH;AClND;;;EAGE,iBAAA;CDoND;AC/LD;EAfI;;;IAGE,YAAA;IE7JF,yEAAA;IACA,oEAAA;IACA,8FAAA;IAAA,uEAAA;IACA,4BAAA;IACA,uHAAA;GH+WD;CACF;AC3MD;EACE,8CAAA;EC3HA,2FAAA;EACQ,mFAAA;CFyUT;ACnMD;EEtLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CD+MD;AC1MD;EEvLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CDuND;ACjND;EExLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CD+ND;ACxND;EEzLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CDuOD;ACxND;EEjMI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH4ZH;ACrND;EE3MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHmaH;AC3ND;EE5MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH0aH;ACjOD;EE7MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHibH;ACvOD;EE9MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHwbH;AC7OD;EE/MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH+bH;AChPD;EElLI,8MAAA;EACA,yMAAA;EACA,sMAAA;CHqaH;AC5OD;EACE,mBAAA;EC9KA,mDAAA;EACQ,2CAAA;CF6ZT;AC7OD;;;EAGE,8BAAA;EEnOE,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFiOF,sBAAA;CDmPD;ACxPD;;;EAQI,kBAAA;CDqPH;AC3OD;ECnME,kDAAA;EACQ,0CAAA;CFibT;ACrOD;EE5PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHoeH;AC3OD;EE7PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH2eH;ACjPD;EE9PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHkfH;ACvPD;EE/PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHyfH;AC7PD;EEhQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHggBH;ACnQD;EEjQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHugBH;ACnQD;EExQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFsQF,sBAAA;EC3NA,0FAAA;EACQ,kFAAA;CFqeT","file":"bootstrap-theme.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default.disabled,\n.btn-primary.disabled,\n.btn-success.disabled,\n.btn-info.disabled,\n.btn-warning.disabled,\n.btn-danger.disabled,\n.btn-default[disabled],\n.btn-primary[disabled],\n.btn-success[disabled],\n.btn-info[disabled],\n.btn-warning[disabled],\n.btn-danger[disabled],\nfieldset[disabled] .btn-default,\nfieldset[disabled] .btn-primary,\nfieldset[disabled] .btn-success,\nfieldset[disabled] .btn-info,\nfieldset[disabled] .btn-warning,\nfieldset[disabled] .btn-danger {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #265a88;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #265a88;\n border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n background-color: #265a88;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n background-color: #2e6da4;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n@media (max-width: 767px) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n }\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-info {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #286090;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map deleted file mode 100644 index 94813e9006074..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAgBN,aEtEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAiBN,aEvEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAkBN,UExEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,gBAAA,gBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,iBAAA,iBAEE,iBAAA,QACA,aAAA,QAMA,mBAAA,0BAAA,yBAAA,0BAAA,yBAAA,yBAAA,oBAAA,2BAAA,0BAAA,2BAAA,0BAAA,0BAAA,6BAAA,oCAAA,mCAAA,oCAAA,mCAAA,mCAME,iBAAA,QACA,iBAAA,KAmBN,aEzEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAoBN,YE1EI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,kBAAA,kBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,mBAAA,mBAEE,iBAAA,QACA,aAAA,QAMA,qBAAA,4BAAA,2BAAA,4BAAA,2BAAA,2BAAA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,+BAAA,sCAAA,qCAAA,sCAAA,qCAAA,qCAME,iBAAA,QACA,iBAAA,KA2BN,eAAA,WClCE,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBD2CV,0BAAA,0BE3FI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GF0FF,kBAAA,SAEF,yBAAA,+BAAA,+BEhGI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GFgGF,kBAAA,SASF,gBE7GI,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SH+HA,cAAA,ICjEA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBD6DV,sCAAA,oCE7GI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBD0EV,cAAA,iBAEE,YAAA,EAAA,IAAA,EAAA,sBAIF,gBEhII,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SHkJA,cAAA,IAHF,sCAAA,oCEhII,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBDgFV,8BAAA,iCAYI,YAAA,EAAA,KAAA,EAAA,gBAKJ,qBAAA,kBAAA,mBAGE,cAAA,EAqBF,yBAfI,mDAAA,yDAAA,yDAGE,MAAA,KE7JF,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,UFqKJ,OACE,YAAA,EAAA,IAAA,EAAA,qBC3HA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBDsIV,eEtLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAKF,YEvLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAMF,eExLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAOF,cEzLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAeF,UEjMI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFuMJ,cE3MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFwMJ,sBE5MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyMJ,mBE7MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0MJ,sBE9MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2MJ,qBE/MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF+MJ,sBElLI,iBAAA,yKACA,iBAAA,oKACA,iBAAA,iKFyLJ,YACE,cAAA,IC9KA,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBDgLV,wBAAA,8BAAA,8BAGE,YAAA,EAAA,KAAA,EAAA,QEnOE,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFiOF,aAAA,QALF,+BAAA,qCAAA,qCAQI,YAAA,KAUJ,OCnME,mBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,EAAA,IAAA,IAAA,gBD4MV,8BE5PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyPJ,8BE7PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap.css b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap.css deleted file mode 100644 index 6167622cecfb5..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap.css +++ /dev/null @@ -1,6757 +0,0 @@ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ -/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ -html { - font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} -body { - margin: 0; -} -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; -} -audio:not([controls]) { - display: none; - height: 0; -} -[hidden], -template { - display: none; -} -a { - background-color: transparent; -} -a:active, -a:hover { - outline: 0; -} -abbr[title] { - border-bottom: 1px dotted; -} -b, -strong { - font-weight: bold; -} -dfn { - font-style: italic; -} -h1 { - margin: .67em 0; - font-size: 2em; -} -mark { - color: #000; - background: #ff0; -} -small { - font-size: 80%; -} -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} -sup { - top: -.5em; -} -sub { - bottom: -.25em; -} -img { - border: 0; -} -svg:not(:root) { - overflow: hidden; -} -figure { - margin: 1em 40px; -} -hr { - height: 0; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} -pre { - overflow: auto; -} -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} -button, -input, -optgroup, -select, -textarea { - margin: 0; - font: inherit; - color: inherit; -} -button { - overflow: visible; -} -button, -select { - text-transform: none; -} -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; - cursor: pointer; -} -button[disabled], -html input[disabled] { - cursor: default; -} -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} -input { - line-height: normal; -} -input[type="checkbox"], -input[type="radio"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 0; -} -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} -fieldset { - padding: .35em .625em .75em; - margin: 0 2px; - border: 1px solid #c0c0c0; -} -legend { - padding: 0; - border: 0; -} -textarea { - overflow: auto; -} -optgroup { - font-weight: bold; -} -table { - border-spacing: 0; - border-collapse: collapse; -} -td, -th { - padding: 0; -} -/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ -@media print { - *, - *:before, - *:after { - color: #000 !important; - text-shadow: none !important; - background: transparent !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - a[href^="#"]:after, - a[href^="javascript:"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } - .navbar { - display: none; - } - .btn > .caret, - .dropup > .btn > .caret { - border-top-color: #000 !important; - } - .label { - border: 1px solid #000; - } - .table { - border-collapse: collapse !important; - } - .table td, - .table th { - background-color: #fff !important; - } - .table-bordered th, - .table-bordered td { - border: 1px solid #ddd !important; - } -} -@font-face { - font-family: 'Glyphicons Halflings'; - - src: url('../fonts/glyphicons-halflings-regular.eot'); - src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); -} -.glyphicon { - position: relative; - top: 1px; - display: inline-block; - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: normal; - line-height: 1; - - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.glyphicon-asterisk:before { - content: "\002a"; -} -.glyphicon-plus:before { - content: "\002b"; -} -.glyphicon-euro:before, -.glyphicon-eur:before { - content: "\20ac"; -} -.glyphicon-minus:before { - content: "\2212"; -} -.glyphicon-cloud:before { - content: "\2601"; -} -.glyphicon-envelope:before { - content: "\2709"; -} -.glyphicon-pencil:before { - content: "\270f"; -} -.glyphicon-glass:before { - content: "\e001"; -} -.glyphicon-music:before { - content: "\e002"; -} -.glyphicon-search:before { - content: "\e003"; -} -.glyphicon-heart:before { - content: "\e005"; -} -.glyphicon-star:before { - content: "\e006"; -} -.glyphicon-star-empty:before { - content: "\e007"; -} -.glyphicon-user:before { - content: "\e008"; -} -.glyphicon-film:before { - content: "\e009"; -} -.glyphicon-th-large:before { - content: "\e010"; -} -.glyphicon-th:before { - content: "\e011"; -} -.glyphicon-th-list:before { - content: "\e012"; -} -.glyphicon-ok:before { - content: "\e013"; -} -.glyphicon-remove:before { - content: "\e014"; -} -.glyphicon-zoom-in:before { - content: "\e015"; -} -.glyphicon-zoom-out:before { - content: "\e016"; -} -.glyphicon-off:before { - content: "\e017"; -} -.glyphicon-signal:before { - content: "\e018"; -} -.glyphicon-cog:before { - content: "\e019"; -} -.glyphicon-trash:before { - content: "\e020"; -} -.glyphicon-home:before { - content: "\e021"; -} -.glyphicon-file:before { - content: "\e022"; -} -.glyphicon-time:before { - content: "\e023"; -} -.glyphicon-road:before { - content: "\e024"; -} -.glyphicon-download-alt:before { - content: "\e025"; -} -.glyphicon-download:before { - content: "\e026"; -} -.glyphicon-upload:before { - content: "\e027"; -} -.glyphicon-inbox:before { - content: "\e028"; -} -.glyphicon-play-circle:before { - content: "\e029"; -} -.glyphicon-repeat:before { - content: "\e030"; -} -.glyphicon-refresh:before { - content: "\e031"; -} -.glyphicon-list-alt:before { - content: "\e032"; -} -.glyphicon-lock:before { - content: "\e033"; -} -.glyphicon-flag:before { - content: "\e034"; -} -.glyphicon-headphones:before { - content: "\e035"; -} -.glyphicon-volume-off:before { - content: "\e036"; -} -.glyphicon-volume-down:before { - content: "\e037"; -} -.glyphicon-volume-up:before { - content: "\e038"; -} -.glyphicon-qrcode:before { - content: "\e039"; -} -.glyphicon-barcode:before { - content: "\e040"; -} -.glyphicon-tag:before { - content: "\e041"; -} -.glyphicon-tags:before { - content: "\e042"; -} -.glyphicon-book:before { - content: "\e043"; -} -.glyphicon-bookmark:before { - content: "\e044"; -} -.glyphicon-print:before { - content: "\e045"; -} -.glyphicon-camera:before { - content: "\e046"; -} -.glyphicon-font:before { - content: "\e047"; -} -.glyphicon-bold:before { - content: "\e048"; -} -.glyphicon-italic:before { - content: "\e049"; -} -.glyphicon-text-height:before { - content: "\e050"; -} -.glyphicon-text-width:before { - content: "\e051"; -} -.glyphicon-align-left:before { - content: "\e052"; -} -.glyphicon-align-center:before { - content: "\e053"; -} -.glyphicon-align-right:before { - content: "\e054"; -} -.glyphicon-align-justify:before { - content: "\e055"; -} -.glyphicon-list:before { - content: "\e056"; -} -.glyphicon-indent-left:before { - content: "\e057"; -} -.glyphicon-indent-right:before { - content: "\e058"; -} -.glyphicon-facetime-video:before { - content: "\e059"; -} -.glyphicon-picture:before { - content: "\e060"; -} -.glyphicon-map-marker:before { - content: "\e062"; -} -.glyphicon-adjust:before { - content: "\e063"; -} -.glyphicon-tint:before { - content: "\e064"; -} -.glyphicon-edit:before { - content: "\e065"; -} -.glyphicon-share:before { - content: "\e066"; -} -.glyphicon-check:before { - content: "\e067"; -} -.glyphicon-move:before { - content: "\e068"; -} -.glyphicon-step-backward:before { - content: "\e069"; -} -.glyphicon-fast-backward:before { - content: "\e070"; -} -.glyphicon-backward:before { - content: "\e071"; -} -.glyphicon-play:before { - content: "\e072"; -} -.glyphicon-pause:before { - content: "\e073"; -} -.glyphicon-stop:before { - content: "\e074"; -} -.glyphicon-forward:before { - content: "\e075"; -} -.glyphicon-fast-forward:before { - content: "\e076"; -} -.glyphicon-step-forward:before { - content: "\e077"; -} -.glyphicon-eject:before { - content: "\e078"; -} -.glyphicon-chevron-left:before { - content: "\e079"; -} -.glyphicon-chevron-right:before { - content: "\e080"; -} -.glyphicon-plus-sign:before { - content: "\e081"; -} -.glyphicon-minus-sign:before { - content: "\e082"; -} -.glyphicon-remove-sign:before { - content: "\e083"; -} -.glyphicon-ok-sign:before { - content: "\e084"; -} -.glyphicon-question-sign:before { - content: "\e085"; -} -.glyphicon-info-sign:before { - content: "\e086"; -} -.glyphicon-screenshot:before { - content: "\e087"; -} -.glyphicon-remove-circle:before { - content: "\e088"; -} -.glyphicon-ok-circle:before { - content: "\e089"; -} -.glyphicon-ban-circle:before { - content: "\e090"; -} -.glyphicon-arrow-left:before { - content: "\e091"; -} -.glyphicon-arrow-right:before { - content: "\e092"; -} -.glyphicon-arrow-up:before { - content: "\e093"; -} -.glyphicon-arrow-down:before { - content: "\e094"; -} -.glyphicon-share-alt:before { - content: "\e095"; -} -.glyphicon-resize-full:before { - content: "\e096"; -} -.glyphicon-resize-small:before { - content: "\e097"; -} -.glyphicon-exclamation-sign:before { - content: "\e101"; -} -.glyphicon-gift:before { - content: "\e102"; -} -.glyphicon-leaf:before { - content: "\e103"; -} -.glyphicon-fire:before { - content: "\e104"; -} -.glyphicon-eye-open:before { - content: "\e105"; -} -.glyphicon-eye-close:before { - content: "\e106"; -} -.glyphicon-warning-sign:before { - content: "\e107"; -} -.glyphicon-plane:before { - content: "\e108"; -} -.glyphicon-calendar:before { - content: "\e109"; -} -.glyphicon-random:before { - content: "\e110"; -} -.glyphicon-comment:before { - content: "\e111"; -} -.glyphicon-magnet:before { - content: "\e112"; -} -.glyphicon-chevron-up:before { - content: "\e113"; -} -.glyphicon-chevron-down:before { - content: "\e114"; -} -.glyphicon-retweet:before { - content: "\e115"; -} -.glyphicon-shopping-cart:before { - content: "\e116"; -} -.glyphicon-folder-close:before { - content: "\e117"; -} -.glyphicon-folder-open:before { - content: "\e118"; -} -.glyphicon-resize-vertical:before { - content: "\e119"; -} -.glyphicon-resize-horizontal:before { - content: "\e120"; -} -.glyphicon-hdd:before { - content: "\e121"; -} -.glyphicon-bullhorn:before { - content: "\e122"; -} -.glyphicon-bell:before { - content: "\e123"; -} -.glyphicon-certificate:before { - content: "\e124"; -} -.glyphicon-thumbs-up:before { - content: "\e125"; -} -.glyphicon-thumbs-down:before { - content: "\e126"; -} -.glyphicon-hand-right:before { - content: "\e127"; -} -.glyphicon-hand-left:before { - content: "\e128"; -} -.glyphicon-hand-up:before { - content: "\e129"; -} -.glyphicon-hand-down:before { - content: "\e130"; -} -.glyphicon-circle-arrow-right:before { - content: "\e131"; -} -.glyphicon-circle-arrow-left:before { - content: "\e132"; -} -.glyphicon-circle-arrow-up:before { - content: "\e133"; -} -.glyphicon-circle-arrow-down:before { - content: "\e134"; -} -.glyphicon-globe:before { - content: "\e135"; -} -.glyphicon-wrench:before { - content: "\e136"; -} -.glyphicon-tasks:before { - content: "\e137"; -} -.glyphicon-filter:before { - content: "\e138"; -} -.glyphicon-briefcase:before { - content: "\e139"; -} -.glyphicon-fullscreen:before { - content: "\e140"; -} -.glyphicon-dashboard:before { - content: "\e141"; -} -.glyphicon-paperclip:before { - content: "\e142"; -} -.glyphicon-heart-empty:before { - content: "\e143"; -} -.glyphicon-link:before { - content: "\e144"; -} -.glyphicon-phone:before { - content: "\e145"; -} -.glyphicon-pushpin:before { - content: "\e146"; -} -.glyphicon-usd:before { - content: "\e148"; -} -.glyphicon-gbp:before { - content: "\e149"; -} -.glyphicon-sort:before { - content: "\e150"; -} -.glyphicon-sort-by-alphabet:before { - content: "\e151"; -} -.glyphicon-sort-by-alphabet-alt:before { - content: "\e152"; -} -.glyphicon-sort-by-order:before { - content: "\e153"; -} -.glyphicon-sort-by-order-alt:before { - content: "\e154"; -} -.glyphicon-sort-by-attributes:before { - content: "\e155"; -} -.glyphicon-sort-by-attributes-alt:before { - content: "\e156"; -} -.glyphicon-unchecked:before { - content: "\e157"; -} -.glyphicon-expand:before { - content: "\e158"; -} -.glyphicon-collapse-down:before { - content: "\e159"; -} -.glyphicon-collapse-up:before { - content: "\e160"; -} -.glyphicon-log-in:before { - content: "\e161"; -} -.glyphicon-flash:before { - content: "\e162"; -} -.glyphicon-log-out:before { - content: "\e163"; -} -.glyphicon-new-window:before { - content: "\e164"; -} -.glyphicon-record:before { - content: "\e165"; -} -.glyphicon-save:before { - content: "\e166"; -} -.glyphicon-open:before { - content: "\e167"; -} -.glyphicon-saved:before { - content: "\e168"; -} -.glyphicon-import:before { - content: "\e169"; -} -.glyphicon-export:before { - content: "\e170"; -} -.glyphicon-send:before { - content: "\e171"; -} -.glyphicon-floppy-disk:before { - content: "\e172"; -} -.glyphicon-floppy-saved:before { - content: "\e173"; -} -.glyphicon-floppy-remove:before { - content: "\e174"; -} -.glyphicon-floppy-save:before { - content: "\e175"; -} -.glyphicon-floppy-open:before { - content: "\e176"; -} -.glyphicon-credit-card:before { - content: "\e177"; -} -.glyphicon-transfer:before { - content: "\e178"; -} -.glyphicon-cutlery:before { - content: "\e179"; -} -.glyphicon-header:before { - content: "\e180"; -} -.glyphicon-compressed:before { - content: "\e181"; -} -.glyphicon-earphone:before { - content: "\e182"; -} -.glyphicon-phone-alt:before { - content: "\e183"; -} -.glyphicon-tower:before { - content: "\e184"; -} -.glyphicon-stats:before { - content: "\e185"; -} -.glyphicon-sd-video:before { - content: "\e186"; -} -.glyphicon-hd-video:before { - content: "\e187"; -} -.glyphicon-subtitles:before { - content: "\e188"; -} -.glyphicon-sound-stereo:before { - content: "\e189"; -} -.glyphicon-sound-dolby:before { - content: "\e190"; -} -.glyphicon-sound-5-1:before { - content: "\e191"; -} -.glyphicon-sound-6-1:before { - content: "\e192"; -} -.glyphicon-sound-7-1:before { - content: "\e193"; -} -.glyphicon-copyright-mark:before { - content: "\e194"; -} -.glyphicon-registration-mark:before { - content: "\e195"; -} -.glyphicon-cloud-download:before { - content: "\e197"; -} -.glyphicon-cloud-upload:before { - content: "\e198"; -} -.glyphicon-tree-conifer:before { - content: "\e199"; -} -.glyphicon-tree-deciduous:before { - content: "\e200"; -} -.glyphicon-cd:before { - content: "\e201"; -} -.glyphicon-save-file:before { - content: "\e202"; -} -.glyphicon-open-file:before { - content: "\e203"; -} -.glyphicon-level-up:before { - content: "\e204"; -} -.glyphicon-copy:before { - content: "\e205"; -} -.glyphicon-paste:before { - content: "\e206"; -} -.glyphicon-alert:before { - content: "\e209"; -} -.glyphicon-equalizer:before { - content: "\e210"; -} -.glyphicon-king:before { - content: "\e211"; -} -.glyphicon-queen:before { - content: "\e212"; -} -.glyphicon-pawn:before { - content: "\e213"; -} -.glyphicon-bishop:before { - content: "\e214"; -} -.glyphicon-knight:before { - content: "\e215"; -} -.glyphicon-baby-formula:before { - content: "\e216"; -} -.glyphicon-tent:before { - content: "\26fa"; -} -.glyphicon-blackboard:before { - content: "\e218"; -} -.glyphicon-bed:before { - content: "\e219"; -} -.glyphicon-apple:before { - content: "\f8ff"; -} -.glyphicon-erase:before { - content: "\e221"; -} -.glyphicon-hourglass:before { - content: "\231b"; -} -.glyphicon-lamp:before { - content: "\e223"; -} -.glyphicon-duplicate:before { - content: "\e224"; -} -.glyphicon-piggy-bank:before { - content: "\e225"; -} -.glyphicon-scissors:before { - content: "\e226"; -} -.glyphicon-bitcoin:before { - content: "\e227"; -} -.glyphicon-btc:before { - content: "\e227"; -} -.glyphicon-xbt:before { - content: "\e227"; -} -.glyphicon-yen:before { - content: "\00a5"; -} -.glyphicon-jpy:before { - content: "\00a5"; -} -.glyphicon-ruble:before { - content: "\20bd"; -} -.glyphicon-rub:before { - content: "\20bd"; -} -.glyphicon-scale:before { - content: "\e230"; -} -.glyphicon-ice-lolly:before { - content: "\e231"; -} -.glyphicon-ice-lolly-tasted:before { - content: "\e232"; -} -.glyphicon-education:before { - content: "\e233"; -} -.glyphicon-option-horizontal:before { - content: "\e234"; -} -.glyphicon-option-vertical:before { - content: "\e235"; -} -.glyphicon-menu-hamburger:before { - content: "\e236"; -} -.glyphicon-modal-window:before { - content: "\e237"; -} -.glyphicon-oil:before { - content: "\e238"; -} -.glyphicon-grain:before { - content: "\e239"; -} -.glyphicon-sunglasses:before { - content: "\e240"; -} -.glyphicon-text-size:before { - content: "\e241"; -} -.glyphicon-text-color:before { - content: "\e242"; -} -.glyphicon-text-background:before { - content: "\e243"; -} -.glyphicon-object-align-top:before { - content: "\e244"; -} -.glyphicon-object-align-bottom:before { - content: "\e245"; -} -.glyphicon-object-align-horizontal:before { - content: "\e246"; -} -.glyphicon-object-align-left:before { - content: "\e247"; -} -.glyphicon-object-align-vertical:before { - content: "\e248"; -} -.glyphicon-object-align-right:before { - content: "\e249"; -} -.glyphicon-triangle-right:before { - content: "\e250"; -} -.glyphicon-triangle-left:before { - content: "\e251"; -} -.glyphicon-triangle-bottom:before { - content: "\e252"; -} -.glyphicon-triangle-top:before { - content: "\e253"; -} -.glyphicon-console:before { - content: "\e254"; -} -.glyphicon-superscript:before { - content: "\e255"; -} -.glyphicon-subscript:before { - content: "\e256"; -} -.glyphicon-menu-left:before { - content: "\e257"; -} -.glyphicon-menu-right:before { - content: "\e258"; -} -.glyphicon-menu-down:before { - content: "\e259"; -} -.glyphicon-menu-up:before { - content: "\e260"; -} -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -*:before, -*:after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -html { - font-size: 10px; - - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.42857143; - color: #333; - background-color: #fff; -} -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} -a { - color: #337ab7; - text-decoration: none; -} -a:hover, -a:focus { - color: #23527c; - text-decoration: underline; -} -a:focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -figure { - margin: 0; -} -img { - vertical-align: middle; -} -.img-responsive, -.thumbnail > img, -.thumbnail a > img, -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - max-width: 100%; - height: auto; -} -.img-rounded { - border-radius: 6px; -} -.img-thumbnail { - display: inline-block; - max-width: 100%; - height: auto; - padding: 4px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - -webkit-transition: all .2s ease-in-out; - -o-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; -} -.img-circle { - border-radius: 50%; -} -hr { - margin-top: 20px; - margin-bottom: 20px; - border: 0; - border-top: 1px solid #eee; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} -.sr-only-focusable:active, -.sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; -} -[role="button"] { - cursor: pointer; -} -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: inherit; - font-weight: 500; - line-height: 1.1; - color: inherit; -} -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small, -.h1 small, -.h2 small, -.h3 small, -.h4 small, -.h5 small, -.h6 small, -h1 .small, -h2 .small, -h3 .small, -h4 .small, -h5 .small, -h6 .small, -.h1 .small, -.h2 .small, -.h3 .small, -.h4 .small, -.h5 .small, -.h6 .small { - font-weight: normal; - line-height: 1; - color: #777; -} -h1, -.h1, -h2, -.h2, -h3, -.h3 { - margin-top: 20px; - margin-bottom: 10px; -} -h1 small, -.h1 small, -h2 small, -.h2 small, -h3 small, -.h3 small, -h1 .small, -.h1 .small, -h2 .small, -.h2 .small, -h3 .small, -.h3 .small { - font-size: 65%; -} -h4, -.h4, -h5, -.h5, -h6, -.h6 { - margin-top: 10px; - margin-bottom: 10px; -} -h4 small, -.h4 small, -h5 small, -.h5 small, -h6 small, -.h6 small, -h4 .small, -.h4 .small, -h5 .small, -.h5 .small, -h6 .small, -.h6 .small { - font-size: 75%; -} -h1, -.h1 { - font-size: 36px; -} -h2, -.h2 { - font-size: 30px; -} -h3, -.h3 { - font-size: 24px; -} -h4, -.h4 { - font-size: 18px; -} -h5, -.h5 { - font-size: 14px; -} -h6, -.h6 { - font-size: 12px; -} -p { - margin: 0 0 10px; -} -.lead { - margin-bottom: 20px; - font-size: 16px; - font-weight: 300; - line-height: 1.4; -} -@media (min-width: 768px) { - .lead { - font-size: 21px; - } -} -small, -.small { - font-size: 85%; -} -mark, -.mark { - padding: .2em; - background-color: #fcf8e3; -} -.text-left { - text-align: left; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -.text-justify { - text-align: justify; -} -.text-nowrap { - white-space: nowrap; -} -.text-lowercase { - text-transform: lowercase; -} -.text-uppercase { - text-transform: uppercase; -} -.text-capitalize { - text-transform: capitalize; -} -.text-muted { - color: #777; -} -.text-primary { - color: #337ab7; -} -a.text-primary:hover, -a.text-primary:focus { - color: #286090; -} -.text-success { - color: #3c763d; -} -a.text-success:hover, -a.text-success:focus { - color: #2b542c; -} -.text-info { - color: #31708f; -} -a.text-info:hover, -a.text-info:focus { - color: #245269; -} -.text-warning { - color: #8a6d3b; -} -a.text-warning:hover, -a.text-warning:focus { - color: #66512c; -} -.text-danger { - color: #a94442; -} -a.text-danger:hover, -a.text-danger:focus { - color: #843534; -} -.bg-primary { - color: #fff; - background-color: #337ab7; -} -a.bg-primary:hover, -a.bg-primary:focus { - background-color: #286090; -} -.bg-success { - background-color: #dff0d8; -} -a.bg-success:hover, -a.bg-success:focus { - background-color: #c1e2b3; -} -.bg-info { - background-color: #d9edf7; -} -a.bg-info:hover, -a.bg-info:focus { - background-color: #afd9ee; -} -.bg-warning { - background-color: #fcf8e3; -} -a.bg-warning:hover, -a.bg-warning:focus { - background-color: #f7ecb5; -} -.bg-danger { - background-color: #f2dede; -} -a.bg-danger:hover, -a.bg-danger:focus { - background-color: #e4b9b9; -} -.page-header { - padding-bottom: 9px; - margin: 40px 0 20px; - border-bottom: 1px solid #eee; -} -ul, -ol { - margin-top: 0; - margin-bottom: 10px; -} -ul ul, -ol ul, -ul ol, -ol ol { - margin-bottom: 0; -} -.list-unstyled { - padding-left: 0; - list-style: none; -} -.list-inline { - padding-left: 0; - margin-left: -5px; - list-style: none; -} -.list-inline > li { - display: inline-block; - padding-right: 5px; - padding-left: 5px; -} -dl { - margin-top: 0; - margin-bottom: 20px; -} -dt, -dd { - line-height: 1.42857143; -} -dt { - font-weight: bold; -} -dd { - margin-left: 0; -} -@media (min-width: 768px) { - .dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; - } - .dl-horizontal dd { - margin-left: 180px; - } -} -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #777; -} -.initialism { - font-size: 90%; - text-transform: uppercase; -} -blockquote { - padding: 10px 20px; - margin: 0 0 20px; - font-size: 17.5px; - border-left: 5px solid #eee; -} -blockquote p:last-child, -blockquote ul:last-child, -blockquote ol:last-child { - margin-bottom: 0; -} -blockquote footer, -blockquote small, -blockquote .small { - display: block; - font-size: 80%; - line-height: 1.42857143; - color: #777; -} -blockquote footer:before, -blockquote small:before, -blockquote .small:before { - content: '\2014 \00A0'; -} -.blockquote-reverse, -blockquote.pull-right { - padding-right: 15px; - padding-left: 0; - text-align: right; - border-right: 5px solid #eee; - border-left: 0; -} -.blockquote-reverse footer:before, -blockquote.pull-right footer:before, -.blockquote-reverse small:before, -blockquote.pull-right small:before, -.blockquote-reverse .small:before, -blockquote.pull-right .small:before { - content: ''; -} -.blockquote-reverse footer:after, -blockquote.pull-right footer:after, -.blockquote-reverse small:after, -blockquote.pull-right small:after, -.blockquote-reverse .small:after, -blockquote.pull-right .small:after { - content: '\00A0 \2014'; -} -address { - margin-bottom: 20px; - font-style: normal; - line-height: 1.42857143; -} -code, -kbd, -pre, -samp { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; -} -code { - padding: 2px 4px; - font-size: 90%; - color: #c7254e; - background-color: #f9f2f4; - border-radius: 4px; -} -kbd { - padding: 2px 4px; - font-size: 90%; - color: #fff; - background-color: #333; - border-radius: 3px; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); -} -kbd kbd { - padding: 0; - font-size: 100%; - font-weight: bold; - -webkit-box-shadow: none; - box-shadow: none; -} -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 1.42857143; - color: #333; - word-break: break-all; - word-wrap: break-word; - background-color: #f5f5f5; - border: 1px solid #ccc; - border-radius: 4px; -} -pre code { - padding: 0; - font-size: inherit; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border-radius: 0; -} -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} -.container { - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; -} -@media (min-width: 768px) { - .container { - width: 750px; - } -} -@media (min-width: 992px) { - .container { - width: 970px; - } -} -@media (min-width: 1200px) { - .container { - width: 1170px; - } -} -.container-fluid { - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; -} -.row { - margin-right: -15px; - margin-left: -15px; -} -.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { - position: relative; - min-height: 1px; - padding-right: 15px; - padding-left: 15px; -} -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { - float: left; -} -.col-xs-12 { - width: 100%; -} -.col-xs-11 { - width: 91.66666667%; -} -.col-xs-10 { - width: 83.33333333%; -} -.col-xs-9 { - width: 75%; -} -.col-xs-8 { - width: 66.66666667%; -} -.col-xs-7 { - width: 58.33333333%; -} -.col-xs-6 { - width: 50%; -} -.col-xs-5 { - width: 41.66666667%; -} -.col-xs-4 { - width: 33.33333333%; -} -.col-xs-3 { - width: 25%; -} -.col-xs-2 { - width: 16.66666667%; -} -.col-xs-1 { - width: 8.33333333%; -} -.col-xs-pull-12 { - right: 100%; -} -.col-xs-pull-11 { - right: 91.66666667%; -} -.col-xs-pull-10 { - right: 83.33333333%; -} -.col-xs-pull-9 { - right: 75%; -} -.col-xs-pull-8 { - right: 66.66666667%; -} -.col-xs-pull-7 { - right: 58.33333333%; -} -.col-xs-pull-6 { - right: 50%; -} -.col-xs-pull-5 { - right: 41.66666667%; -} -.col-xs-pull-4 { - right: 33.33333333%; -} -.col-xs-pull-3 { - right: 25%; -} -.col-xs-pull-2 { - right: 16.66666667%; -} -.col-xs-pull-1 { - right: 8.33333333%; -} -.col-xs-pull-0 { - right: auto; -} -.col-xs-push-12 { - left: 100%; -} -.col-xs-push-11 { - left: 91.66666667%; -} -.col-xs-push-10 { - left: 83.33333333%; -} -.col-xs-push-9 { - left: 75%; -} -.col-xs-push-8 { - left: 66.66666667%; -} -.col-xs-push-7 { - left: 58.33333333%; -} -.col-xs-push-6 { - left: 50%; -} -.col-xs-push-5 { - left: 41.66666667%; -} -.col-xs-push-4 { - left: 33.33333333%; -} -.col-xs-push-3 { - left: 25%; -} -.col-xs-push-2 { - left: 16.66666667%; -} -.col-xs-push-1 { - left: 8.33333333%; -} -.col-xs-push-0 { - left: auto; -} -.col-xs-offset-12 { - margin-left: 100%; -} -.col-xs-offset-11 { - margin-left: 91.66666667%; -} -.col-xs-offset-10 { - margin-left: 83.33333333%; -} -.col-xs-offset-9 { - margin-left: 75%; -} -.col-xs-offset-8 { - margin-left: 66.66666667%; -} -.col-xs-offset-7 { - margin-left: 58.33333333%; -} -.col-xs-offset-6 { - margin-left: 50%; -} -.col-xs-offset-5 { - margin-left: 41.66666667%; -} -.col-xs-offset-4 { - margin-left: 33.33333333%; -} -.col-xs-offset-3 { - margin-left: 25%; -} -.col-xs-offset-2 { - margin-left: 16.66666667%; -} -.col-xs-offset-1 { - margin-left: 8.33333333%; -} -.col-xs-offset-0 { - margin-left: 0; -} -@media (min-width: 768px) { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { - float: left; - } - .col-sm-12 { - width: 100%; - } - .col-sm-11 { - width: 91.66666667%; - } - .col-sm-10 { - width: 83.33333333%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-8 { - width: 66.66666667%; - } - .col-sm-7 { - width: 58.33333333%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-5 { - width: 41.66666667%; - } - .col-sm-4 { - width: 33.33333333%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-2 { - width: 16.66666667%; - } - .col-sm-1 { - width: 8.33333333%; - } - .col-sm-pull-12 { - right: 100%; - } - .col-sm-pull-11 { - right: 91.66666667%; - } - .col-sm-pull-10 { - right: 83.33333333%; - } - .col-sm-pull-9 { - right: 75%; - } - .col-sm-pull-8 { - right: 66.66666667%; - } - .col-sm-pull-7 { - right: 58.33333333%; - } - .col-sm-pull-6 { - right: 50%; - } - .col-sm-pull-5 { - right: 41.66666667%; - } - .col-sm-pull-4 { - right: 33.33333333%; - } - .col-sm-pull-3 { - right: 25%; - } - .col-sm-pull-2 { - right: 16.66666667%; - } - .col-sm-pull-1 { - right: 8.33333333%; - } - .col-sm-pull-0 { - right: auto; - } - .col-sm-push-12 { - left: 100%; - } - .col-sm-push-11 { - left: 91.66666667%; - } - .col-sm-push-10 { - left: 83.33333333%; - } - .col-sm-push-9 { - left: 75%; - } - .col-sm-push-8 { - left: 66.66666667%; - } - .col-sm-push-7 { - left: 58.33333333%; - } - .col-sm-push-6 { - left: 50%; - } - .col-sm-push-5 { - left: 41.66666667%; - } - .col-sm-push-4 { - left: 33.33333333%; - } - .col-sm-push-3 { - left: 25%; - } - .col-sm-push-2 { - left: 16.66666667%; - } - .col-sm-push-1 { - left: 8.33333333%; - } - .col-sm-push-0 { - left: auto; - } - .col-sm-offset-12 { - margin-left: 100%; - } - .col-sm-offset-11 { - margin-left: 91.66666667%; - } - .col-sm-offset-10 { - margin-left: 83.33333333%; - } - .col-sm-offset-9 { - margin-left: 75%; - } - .col-sm-offset-8 { - margin-left: 66.66666667%; - } - .col-sm-offset-7 { - margin-left: 58.33333333%; - } - .col-sm-offset-6 { - margin-left: 50%; - } - .col-sm-offset-5 { - margin-left: 41.66666667%; - } - .col-sm-offset-4 { - margin-left: 33.33333333%; - } - .col-sm-offset-3 { - margin-left: 25%; - } - .col-sm-offset-2 { - margin-left: 16.66666667%; - } - .col-sm-offset-1 { - margin-left: 8.33333333%; - } - .col-sm-offset-0 { - margin-left: 0; - } -} -@media (min-width: 992px) { - .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { - float: left; - } - .col-md-12 { - width: 100%; - } - .col-md-11 { - width: 91.66666667%; - } - .col-md-10 { - width: 83.33333333%; - } - .col-md-9 { - width: 75%; - } - .col-md-8 { - width: 66.66666667%; - } - .col-md-7 { - width: 58.33333333%; - } - .col-md-6 { - width: 50%; - } - .col-md-5 { - width: 41.66666667%; - } - .col-md-4 { - width: 33.33333333%; - } - .col-md-3 { - width: 25%; - } - .col-md-2 { - width: 16.66666667%; - } - .col-md-1 { - width: 8.33333333%; - } - .col-md-pull-12 { - right: 100%; - } - .col-md-pull-11 { - right: 91.66666667%; - } - .col-md-pull-10 { - right: 83.33333333%; - } - .col-md-pull-9 { - right: 75%; - } - .col-md-pull-8 { - right: 66.66666667%; - } - .col-md-pull-7 { - right: 58.33333333%; - } - .col-md-pull-6 { - right: 50%; - } - .col-md-pull-5 { - right: 41.66666667%; - } - .col-md-pull-4 { - right: 33.33333333%; - } - .col-md-pull-3 { - right: 25%; - } - .col-md-pull-2 { - right: 16.66666667%; - } - .col-md-pull-1 { - right: 8.33333333%; - } - .col-md-pull-0 { - right: auto; - } - .col-md-push-12 { - left: 100%; - } - .col-md-push-11 { - left: 91.66666667%; - } - .col-md-push-10 { - left: 83.33333333%; - } - .col-md-push-9 { - left: 75%; - } - .col-md-push-8 { - left: 66.66666667%; - } - .col-md-push-7 { - left: 58.33333333%; - } - .col-md-push-6 { - left: 50%; - } - .col-md-push-5 { - left: 41.66666667%; - } - .col-md-push-4 { - left: 33.33333333%; - } - .col-md-push-3 { - left: 25%; - } - .col-md-push-2 { - left: 16.66666667%; - } - .col-md-push-1 { - left: 8.33333333%; - } - .col-md-push-0 { - left: auto; - } - .col-md-offset-12 { - margin-left: 100%; - } - .col-md-offset-11 { - margin-left: 91.66666667%; - } - .col-md-offset-10 { - margin-left: 83.33333333%; - } - .col-md-offset-9 { - margin-left: 75%; - } - .col-md-offset-8 { - margin-left: 66.66666667%; - } - .col-md-offset-7 { - margin-left: 58.33333333%; - } - .col-md-offset-6 { - margin-left: 50%; - } - .col-md-offset-5 { - margin-left: 41.66666667%; - } - .col-md-offset-4 { - margin-left: 33.33333333%; - } - .col-md-offset-3 { - margin-left: 25%; - } - .col-md-offset-2 { - margin-left: 16.66666667%; - } - .col-md-offset-1 { - margin-left: 8.33333333%; - } - .col-md-offset-0 { - margin-left: 0; - } -} -@media (min-width: 1200px) { - .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { - float: left; - } - .col-lg-12 { - width: 100%; - } - .col-lg-11 { - width: 91.66666667%; - } - .col-lg-10 { - width: 83.33333333%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-8 { - width: 66.66666667%; - } - .col-lg-7 { - width: 58.33333333%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-5 { - width: 41.66666667%; - } - .col-lg-4 { - width: 33.33333333%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-2 { - width: 16.66666667%; - } - .col-lg-1 { - width: 8.33333333%; - } - .col-lg-pull-12 { - right: 100%; - } - .col-lg-pull-11 { - right: 91.66666667%; - } - .col-lg-pull-10 { - right: 83.33333333%; - } - .col-lg-pull-9 { - right: 75%; - } - .col-lg-pull-8 { - right: 66.66666667%; - } - .col-lg-pull-7 { - right: 58.33333333%; - } - .col-lg-pull-6 { - right: 50%; - } - .col-lg-pull-5 { - right: 41.66666667%; - } - .col-lg-pull-4 { - right: 33.33333333%; - } - .col-lg-pull-3 { - right: 25%; - } - .col-lg-pull-2 { - right: 16.66666667%; - } - .col-lg-pull-1 { - right: 8.33333333%; - } - .col-lg-pull-0 { - right: auto; - } - .col-lg-push-12 { - left: 100%; - } - .col-lg-push-11 { - left: 91.66666667%; - } - .col-lg-push-10 { - left: 83.33333333%; - } - .col-lg-push-9 { - left: 75%; - } - .col-lg-push-8 { - left: 66.66666667%; - } - .col-lg-push-7 { - left: 58.33333333%; - } - .col-lg-push-6 { - left: 50%; - } - .col-lg-push-5 { - left: 41.66666667%; - } - .col-lg-push-4 { - left: 33.33333333%; - } - .col-lg-push-3 { - left: 25%; - } - .col-lg-push-2 { - left: 16.66666667%; - } - .col-lg-push-1 { - left: 8.33333333%; - } - .col-lg-push-0 { - left: auto; - } - .col-lg-offset-12 { - margin-left: 100%; - } - .col-lg-offset-11 { - margin-left: 91.66666667%; - } - .col-lg-offset-10 { - margin-left: 83.33333333%; - } - .col-lg-offset-9 { - margin-left: 75%; - } - .col-lg-offset-8 { - margin-left: 66.66666667%; - } - .col-lg-offset-7 { - margin-left: 58.33333333%; - } - .col-lg-offset-6 { - margin-left: 50%; - } - .col-lg-offset-5 { - margin-left: 41.66666667%; - } - .col-lg-offset-4 { - margin-left: 33.33333333%; - } - .col-lg-offset-3 { - margin-left: 25%; - } - .col-lg-offset-2 { - margin-left: 16.66666667%; - } - .col-lg-offset-1 { - margin-left: 8.33333333%; - } - .col-lg-offset-0 { - margin-left: 0; - } -} -table { - background-color: transparent; -} -caption { - padding-top: 8px; - padding-bottom: 8px; - color: #777; - text-align: left; -} -th { - text-align: left; -} -.table { - width: 100%; - max-width: 100%; - margin-bottom: 20px; -} -.table > thead > tr > th, -.table > tbody > tr > th, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - padding: 8px; - line-height: 1.42857143; - vertical-align: top; - border-top: 1px solid #ddd; -} -.table > thead > tr > th { - vertical-align: bottom; - border-bottom: 2px solid #ddd; -} -.table > caption + thead > tr:first-child > th, -.table > colgroup + thead > tr:first-child > th, -.table > thead:first-child > tr:first-child > th, -.table > caption + thead > tr:first-child > td, -.table > colgroup + thead > tr:first-child > td, -.table > thead:first-child > tr:first-child > td { - border-top: 0; -} -.table > tbody + tbody { - border-top: 2px solid #ddd; -} -.table .table { - background-color: #fff; -} -.table-condensed > thead > tr > th, -.table-condensed > tbody > tr > th, -.table-condensed > tfoot > tr > th, -.table-condensed > thead > tr > td, -.table-condensed > tbody > tr > td, -.table-condensed > tfoot > tr > td { - padding: 5px; -} -.table-bordered { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > tbody > tr > th, -.table-bordered > tfoot > tr > th, -.table-bordered > thead > tr > td, -.table-bordered > tbody > tr > td, -.table-bordered > tfoot > tr > td { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > thead > tr > td { - border-bottom-width: 2px; -} -.table-striped > tbody > tr:nth-of-type(odd) { - background-color: #f9f9f9; -} -.table-hover > tbody > tr:hover { - background-color: #f5f5f5; -} -table col[class*="col-"] { - position: static; - display: table-column; - float: none; -} -table td[class*="col-"], -table th[class*="col-"] { - position: static; - display: table-cell; - float: none; -} -.table > thead > tr > td.active, -.table > tbody > tr > td.active, -.table > tfoot > tr > td.active, -.table > thead > tr > th.active, -.table > tbody > tr > th.active, -.table > tfoot > tr > th.active, -.table > thead > tr.active > td, -.table > tbody > tr.active > td, -.table > tfoot > tr.active > td, -.table > thead > tr.active > th, -.table > tbody > tr.active > th, -.table > tfoot > tr.active > th { - background-color: #f5f5f5; -} -.table-hover > tbody > tr > td.active:hover, -.table-hover > tbody > tr > th.active:hover, -.table-hover > tbody > tr.active:hover > td, -.table-hover > tbody > tr:hover > .active, -.table-hover > tbody > tr.active:hover > th { - background-color: #e8e8e8; -} -.table > thead > tr > td.success, -.table > tbody > tr > td.success, -.table > tfoot > tr > td.success, -.table > thead > tr > th.success, -.table > tbody > tr > th.success, -.table > tfoot > tr > th.success, -.table > thead > tr.success > td, -.table > tbody > tr.success > td, -.table > tfoot > tr.success > td, -.table > thead > tr.success > th, -.table > tbody > tr.success > th, -.table > tfoot > tr.success > th { - background-color: #dff0d8; -} -.table-hover > tbody > tr > td.success:hover, -.table-hover > tbody > tr > th.success:hover, -.table-hover > tbody > tr.success:hover > td, -.table-hover > tbody > tr:hover > .success, -.table-hover > tbody > tr.success:hover > th { - background-color: #d0e9c6; -} -.table > thead > tr > td.info, -.table > tbody > tr > td.info, -.table > tfoot > tr > td.info, -.table > thead > tr > th.info, -.table > tbody > tr > th.info, -.table > tfoot > tr > th.info, -.table > thead > tr.info > td, -.table > tbody > tr.info > td, -.table > tfoot > tr.info > td, -.table > thead > tr.info > th, -.table > tbody > tr.info > th, -.table > tfoot > tr.info > th { - background-color: #d9edf7; -} -.table-hover > tbody > tr > td.info:hover, -.table-hover > tbody > tr > th.info:hover, -.table-hover > tbody > tr.info:hover > td, -.table-hover > tbody > tr:hover > .info, -.table-hover > tbody > tr.info:hover > th { - background-color: #c4e3f3; -} -.table > thead > tr > td.warning, -.table > tbody > tr > td.warning, -.table > tfoot > tr > td.warning, -.table > thead > tr > th.warning, -.table > tbody > tr > th.warning, -.table > tfoot > tr > th.warning, -.table > thead > tr.warning > td, -.table > tbody > tr.warning > td, -.table > tfoot > tr.warning > td, -.table > thead > tr.warning > th, -.table > tbody > tr.warning > th, -.table > tfoot > tr.warning > th { - background-color: #fcf8e3; -} -.table-hover > tbody > tr > td.warning:hover, -.table-hover > tbody > tr > th.warning:hover, -.table-hover > tbody > tr.warning:hover > td, -.table-hover > tbody > tr:hover > .warning, -.table-hover > tbody > tr.warning:hover > th { - background-color: #faf2cc; -} -.table > thead > tr > td.danger, -.table > tbody > tr > td.danger, -.table > tfoot > tr > td.danger, -.table > thead > tr > th.danger, -.table > tbody > tr > th.danger, -.table > tfoot > tr > th.danger, -.table > thead > tr.danger > td, -.table > tbody > tr.danger > td, -.table > tfoot > tr.danger > td, -.table > thead > tr.danger > th, -.table > tbody > tr.danger > th, -.table > tfoot > tr.danger > th { - background-color: #f2dede; -} -.table-hover > tbody > tr > td.danger:hover, -.table-hover > tbody > tr > th.danger:hover, -.table-hover > tbody > tr.danger:hover > td, -.table-hover > tbody > tr:hover > .danger, -.table-hover > tbody > tr.danger:hover > th { - background-color: #ebcccc; -} -.table-responsive { - min-height: .01%; - overflow-x: auto; -} -@media screen and (max-width: 767px) { - .table-responsive { - width: 100%; - margin-bottom: 15px; - overflow-y: hidden; - -ms-overflow-style: -ms-autohiding-scrollbar; - border: 1px solid #ddd; - } - .table-responsive > .table { - margin-bottom: 0; - } - .table-responsive > .table > thead > tr > th, - .table-responsive > .table > tbody > tr > th, - .table-responsive > .table > tfoot > tr > th, - .table-responsive > .table > thead > tr > td, - .table-responsive > .table > tbody > tr > td, - .table-responsive > .table > tfoot > tr > td { - white-space: nowrap; - } - .table-responsive > .table-bordered { - border: 0; - } - .table-responsive > .table-bordered > thead > tr > th:first-child, - .table-responsive > .table-bordered > tbody > tr > th:first-child, - .table-responsive > .table-bordered > tfoot > tr > th:first-child, - .table-responsive > .table-bordered > thead > tr > td:first-child, - .table-responsive > .table-bordered > tbody > tr > td:first-child, - .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; - } - .table-responsive > .table-bordered > thead > tr > th:last-child, - .table-responsive > .table-bordered > tbody > tr > th:last-child, - .table-responsive > .table-bordered > tfoot > tr > th:last-child, - .table-responsive > .table-bordered > thead > tr > td:last-child, - .table-responsive > .table-bordered > tbody > tr > td:last-child, - .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; - } - .table-responsive > .table-bordered > tbody > tr:last-child > th, - .table-responsive > .table-bordered > tfoot > tr:last-child > th, - .table-responsive > .table-bordered > tbody > tr:last-child > td, - .table-responsive > .table-bordered > tfoot > tr:last-child > td { - border-bottom: 0; - } -} -fieldset { - min-width: 0; - padding: 0; - margin: 0; - border: 0; -} -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: inherit; - color: #333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} -label { - display: inline-block; - max-width: 100%; - margin-bottom: 5px; - font-weight: bold; -} -input[type="search"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - line-height: normal; -} -input[type="file"] { - display: block; -} -input[type="range"] { - display: block; - width: 100%; -} -select[multiple], -select[size] { - height: auto; -} -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -output { - display: block; - padding-top: 7px; - font-size: 14px; - line-height: 1.42857143; - color: #555; -} -.form-control { - display: block; - width: 100%; - height: 34px; - padding: 6px 12px; - font-size: 14px; - line-height: 1.42857143; - color: #555; - background-color: #fff; - background-image: none; - border: 1px solid #ccc; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -} -.form-control:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); -} -.form-control::-moz-placeholder { - color: #999; - opacity: 1; -} -.form-control:-ms-input-placeholder { - color: #999; -} -.form-control::-webkit-input-placeholder { - color: #999; -} -.form-control::-ms-expand { - background-color: transparent; - border: 0; -} -.form-control[disabled], -.form-control[readonly], -fieldset[disabled] .form-control { - background-color: #eee; - opacity: 1; -} -.form-control[disabled], -fieldset[disabled] .form-control { - cursor: not-allowed; -} -textarea.form-control { - height: auto; -} -input[type="search"] { - -webkit-appearance: none; -} -@media screen and (-webkit-min-device-pixel-ratio: 0) { - input[type="date"].form-control, - input[type="time"].form-control, - input[type="datetime-local"].form-control, - input[type="month"].form-control { - line-height: 34px; - } - input[type="date"].input-sm, - input[type="time"].input-sm, - input[type="datetime-local"].input-sm, - input[type="month"].input-sm, - .input-group-sm input[type="date"], - .input-group-sm input[type="time"], - .input-group-sm input[type="datetime-local"], - .input-group-sm input[type="month"] { - line-height: 30px; - } - input[type="date"].input-lg, - input[type="time"].input-lg, - input[type="datetime-local"].input-lg, - input[type="month"].input-lg, - .input-group-lg input[type="date"], - .input-group-lg input[type="time"], - .input-group-lg input[type="datetime-local"], - .input-group-lg input[type="month"] { - line-height: 46px; - } -} -.form-group { - margin-bottom: 15px; -} -.radio, -.checkbox { - position: relative; - display: block; - margin-top: 10px; - margin-bottom: 10px; -} -.radio label, -.checkbox label { - min-height: 20px; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - cursor: pointer; -} -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - position: absolute; - margin-top: 4px \9; - margin-left: -20px; -} -.radio + .radio, -.checkbox + .checkbox { - margin-top: -5px; -} -.radio-inline, -.checkbox-inline { - position: relative; - display: inline-block; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - vertical-align: middle; - cursor: pointer; -} -.radio-inline + .radio-inline, -.checkbox-inline + .checkbox-inline { - margin-top: 0; - margin-left: 10px; -} -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"].disabled, -input[type="checkbox"].disabled, -fieldset[disabled] input[type="radio"], -fieldset[disabled] input[type="checkbox"] { - cursor: not-allowed; -} -.radio-inline.disabled, -.checkbox-inline.disabled, -fieldset[disabled] .radio-inline, -fieldset[disabled] .checkbox-inline { - cursor: not-allowed; -} -.radio.disabled label, -.checkbox.disabled label, -fieldset[disabled] .radio label, -fieldset[disabled] .checkbox label { - cursor: not-allowed; -} -.form-control-static { - min-height: 34px; - padding-top: 7px; - padding-bottom: 7px; - margin-bottom: 0; -} -.form-control-static.input-lg, -.form-control-static.input-sm { - padding-right: 0; - padding-left: 0; -} -.input-sm { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -select.input-sm { - height: 30px; - line-height: 30px; -} -textarea.input-sm, -select[multiple].input-sm { - height: auto; -} -.form-group-sm .form-control { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.form-group-sm select.form-control { - height: 30px; - line-height: 30px; -} -.form-group-sm textarea.form-control, -.form-group-sm select[multiple].form-control { - height: auto; -} -.form-group-sm .form-control-static { - height: 30px; - min-height: 32px; - padding: 6px 10px; - font-size: 12px; - line-height: 1.5; -} -.input-lg { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -select.input-lg { - height: 46px; - line-height: 46px; -} -textarea.input-lg, -select[multiple].input-lg { - height: auto; -} -.form-group-lg .form-control { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -.form-group-lg select.form-control { - height: 46px; - line-height: 46px; -} -.form-group-lg textarea.form-control, -.form-group-lg select[multiple].form-control { - height: auto; -} -.form-group-lg .form-control-static { - height: 46px; - min-height: 38px; - padding: 11px 16px; - font-size: 18px; - line-height: 1.3333333; -} -.has-feedback { - position: relative; -} -.has-feedback .form-control { - padding-right: 42.5px; -} -.form-control-feedback { - position: absolute; - top: 0; - right: 0; - z-index: 2; - display: block; - width: 34px; - height: 34px; - line-height: 34px; - text-align: center; - pointer-events: none; -} -.input-lg + .form-control-feedback, -.input-group-lg + .form-control-feedback, -.form-group-lg .form-control + .form-control-feedback { - width: 46px; - height: 46px; - line-height: 46px; -} -.input-sm + .form-control-feedback, -.input-group-sm + .form-control-feedback, -.form-group-sm .form-control + .form-control-feedback { - width: 30px; - height: 30px; - line-height: 30px; -} -.has-success .help-block, -.has-success .control-label, -.has-success .radio, -.has-success .checkbox, -.has-success .radio-inline, -.has-success .checkbox-inline, -.has-success.radio label, -.has-success.checkbox label, -.has-success.radio-inline label, -.has-success.checkbox-inline label { - color: #3c763d; -} -.has-success .form-control { - border-color: #3c763d; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-success .form-control:focus { - border-color: #2b542c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; -} -.has-success .input-group-addon { - color: #3c763d; - background-color: #dff0d8; - border-color: #3c763d; -} -.has-success .form-control-feedback { - color: #3c763d; -} -.has-warning .help-block, -.has-warning .control-label, -.has-warning .radio, -.has-warning .checkbox, -.has-warning .radio-inline, -.has-warning .checkbox-inline, -.has-warning.radio label, -.has-warning.checkbox label, -.has-warning.radio-inline label, -.has-warning.checkbox-inline label { - color: #8a6d3b; -} -.has-warning .form-control { - border-color: #8a6d3b; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-warning .form-control:focus { - border-color: #66512c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; -} -.has-warning .input-group-addon { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #8a6d3b; -} -.has-warning .form-control-feedback { - color: #8a6d3b; -} -.has-error .help-block, -.has-error .control-label, -.has-error .radio, -.has-error .checkbox, -.has-error .radio-inline, -.has-error .checkbox-inline, -.has-error.radio label, -.has-error.checkbox label, -.has-error.radio-inline label, -.has-error.checkbox-inline label { - color: #a94442; -} -.has-error .form-control { - border-color: #a94442; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-error .form-control:focus { - border-color: #843534; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; -} -.has-error .input-group-addon { - color: #a94442; - background-color: #f2dede; - border-color: #a94442; -} -.has-error .form-control-feedback { - color: #a94442; -} -.has-feedback label ~ .form-control-feedback { - top: 25px; -} -.has-feedback label.sr-only ~ .form-control-feedback { - top: 0; -} -.help-block { - display: block; - margin-top: 5px; - margin-bottom: 10px; - color: #737373; -} -@media (min-width: 768px) { - .form-inline .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .form-inline .form-control-static { - display: inline-block; - } - .form-inline .input-group { - display: inline-table; - vertical-align: middle; - } - .form-inline .input-group .input-group-addon, - .form-inline .input-group .input-group-btn, - .form-inline .input-group .form-control { - width: auto; - } - .form-inline .input-group > .form-control { - width: 100%; - } - .form-inline .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio, - .form-inline .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio label, - .form-inline .checkbox label { - padding-left: 0; - } - .form-inline .radio input[type="radio"], - .form-inline .checkbox input[type="checkbox"] { - position: relative; - margin-left: 0; - } - .form-inline .has-feedback .form-control-feedback { - top: 0; - } -} -.form-horizontal .radio, -.form-horizontal .checkbox, -.form-horizontal .radio-inline, -.form-horizontal .checkbox-inline { - padding-top: 7px; - margin-top: 0; - margin-bottom: 0; -} -.form-horizontal .radio, -.form-horizontal .checkbox { - min-height: 27px; -} -.form-horizontal .form-group { - margin-right: -15px; - margin-left: -15px; -} -@media (min-width: 768px) { - .form-horizontal .control-label { - padding-top: 7px; - margin-bottom: 0; - text-align: right; - } -} -.form-horizontal .has-feedback .form-control-feedback { - right: 15px; -} -@media (min-width: 768px) { - .form-horizontal .form-group-lg .control-label { - padding-top: 11px; - font-size: 18px; - } -} -@media (min-width: 768px) { - .form-horizontal .form-group-sm .control-label { - padding-top: 6px; - font-size: 12px; - } -} -.btn { - display: inline-block; - padding: 6px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: normal; - line-height: 1.42857143; - text-align: center; - white-space: nowrap; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} -.btn:focus, -.btn:active:focus, -.btn.active:focus, -.btn.focus, -.btn:active.focus, -.btn.active.focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn:hover, -.btn:focus, -.btn.focus { - color: #333; - text-decoration: none; -} -.btn:active, -.btn.active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn.disabled, -.btn[disabled], -fieldset[disabled] .btn { - cursor: not-allowed; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; - opacity: .65; -} -a.btn.disabled, -fieldset[disabled] a.btn { - pointer-events: none; -} -.btn-default { - color: #333; - background-color: #fff; - border-color: #ccc; -} -.btn-default:focus, -.btn-default.focus { - color: #333; - background-color: #e6e6e6; - border-color: #8c8c8c; -} -.btn-default:hover { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-default:active:hover, -.btn-default.active:hover, -.open > .dropdown-toggle.btn-default:hover, -.btn-default:active:focus, -.btn-default.active:focus, -.open > .dropdown-toggle.btn-default:focus, -.btn-default:active.focus, -.btn-default.active.focus, -.open > .dropdown-toggle.btn-default.focus { - color: #333; - background-color: #d4d4d4; - border-color: #8c8c8c; -} -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - background-image: none; -} -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled.focus, -.btn-default[disabled].focus, -fieldset[disabled] .btn-default.focus { - background-color: #fff; - border-color: #ccc; -} -.btn-default .badge { - color: #fff; - background-color: #333; -} -.btn-primary { - color: #fff; - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary:focus, -.btn-primary.focus { - color: #fff; - background-color: #286090; - border-color: #122b40; -} -.btn-primary:hover { - color: #fff; - background-color: #286090; - border-color: #204d74; -} -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - color: #fff; - background-color: #286090; - border-color: #204d74; -} -.btn-primary:active:hover, -.btn-primary.active:hover, -.open > .dropdown-toggle.btn-primary:hover, -.btn-primary:active:focus, -.btn-primary.active:focus, -.open > .dropdown-toggle.btn-primary:focus, -.btn-primary:active.focus, -.btn-primary.active.focus, -.open > .dropdown-toggle.btn-primary.focus { - color: #fff; - background-color: #204d74; - border-color: #122b40; -} -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - background-image: none; -} -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled.focus, -.btn-primary[disabled].focus, -fieldset[disabled] .btn-primary.focus { - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary .badge { - color: #337ab7; - background-color: #fff; -} -.btn-success { - color: #fff; - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success:focus, -.btn-success.focus { - color: #fff; - background-color: #449d44; - border-color: #255625; -} -.btn-success:hover { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active:hover, -.btn-success.active:hover, -.open > .dropdown-toggle.btn-success:hover, -.btn-success:active:focus, -.btn-success.active:focus, -.open > .dropdown-toggle.btn-success:focus, -.btn-success:active.focus, -.btn-success.active.focus, -.open > .dropdown-toggle.btn-success.focus { - color: #fff; - background-color: #398439; - border-color: #255625; -} -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - background-image: none; -} -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled.focus, -.btn-success[disabled].focus, -fieldset[disabled] .btn-success.focus { - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success .badge { - color: #5cb85c; - background-color: #fff; -} -.btn-info { - color: #fff; - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info:focus, -.btn-info.focus { - color: #fff; - background-color: #31b0d5; - border-color: #1b6d85; -} -.btn-info:hover { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active:hover, -.btn-info.active:hover, -.open > .dropdown-toggle.btn-info:hover, -.btn-info:active:focus, -.btn-info.active:focus, -.open > .dropdown-toggle.btn-info:focus, -.btn-info:active.focus, -.btn-info.active.focus, -.open > .dropdown-toggle.btn-info.focus { - color: #fff; - background-color: #269abc; - border-color: #1b6d85; -} -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - background-image: none; -} -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled.focus, -.btn-info[disabled].focus, -fieldset[disabled] .btn-info.focus { - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info .badge { - color: #5bc0de; - background-color: #fff; -} -.btn-warning { - color: #fff; - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning:focus, -.btn-warning.focus { - color: #fff; - background-color: #ec971f; - border-color: #985f0d; -} -.btn-warning:hover { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active:hover, -.btn-warning.active:hover, -.open > .dropdown-toggle.btn-warning:hover, -.btn-warning:active:focus, -.btn-warning.active:focus, -.open > .dropdown-toggle.btn-warning:focus, -.btn-warning:active.focus, -.btn-warning.active.focus, -.open > .dropdown-toggle.btn-warning.focus { - color: #fff; - background-color: #d58512; - border-color: #985f0d; -} -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - background-image: none; -} -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled.focus, -.btn-warning[disabled].focus, -fieldset[disabled] .btn-warning.focus { - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning .badge { - color: #f0ad4e; - background-color: #fff; -} -.btn-danger { - color: #fff; - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger:focus, -.btn-danger.focus { - color: #fff; - background-color: #c9302c; - border-color: #761c19; -} -.btn-danger:hover { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active:hover, -.btn-danger.active:hover, -.open > .dropdown-toggle.btn-danger:hover, -.btn-danger:active:focus, -.btn-danger.active:focus, -.open > .dropdown-toggle.btn-danger:focus, -.btn-danger:active.focus, -.btn-danger.active.focus, -.open > .dropdown-toggle.btn-danger.focus { - color: #fff; - background-color: #ac2925; - border-color: #761c19; -} -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - background-image: none; -} -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled.focus, -.btn-danger[disabled].focus, -fieldset[disabled] .btn-danger.focus { - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger .badge { - color: #d9534f; - background-color: #fff; -} -.btn-link { - font-weight: normal; - color: #337ab7; - border-radius: 0; -} -.btn-link, -.btn-link:active, -.btn-link.active, -.btn-link[disabled], -fieldset[disabled] .btn-link { - background-color: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active { - border-color: transparent; -} -.btn-link:hover, -.btn-link:focus { - color: #23527c; - text-decoration: underline; - background-color: transparent; -} -.btn-link[disabled]:hover, -fieldset[disabled] .btn-link:hover, -.btn-link[disabled]:focus, -fieldset[disabled] .btn-link:focus { - color: #777; - text-decoration: none; -} -.btn-lg, -.btn-group-lg > .btn { - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -.btn-sm, -.btn-group-sm > .btn { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-xs, -.btn-group-xs > .btn { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-block { - display: block; - width: 100%; -} -.btn-block + .btn-block { - margin-top: 5px; -} -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} -.fade { - opacity: 0; - -webkit-transition: opacity .15s linear; - -o-transition: opacity .15s linear; - transition: opacity .15s linear; -} -.fade.in { - opacity: 1; -} -.collapse { - display: none; -} -.collapse.in { - display: block; -} -tr.collapse.in { - display: table-row; -} -tbody.collapse.in { - display: table-row-group; -} -.collapsing { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition-timing-function: ease; - -o-transition-timing-function: ease; - transition-timing-function: ease; - -webkit-transition-duration: .35s; - -o-transition-duration: .35s; - transition-duration: .35s; - -webkit-transition-property: height, visibility; - -o-transition-property: height, visibility; - transition-property: height, visibility; -} -.caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: 4px dashed; - border-top: 4px solid \9; - border-right: 4px solid transparent; - border-left: 4px solid transparent; -} -.dropup, -.dropdown { - position: relative; -} -.dropdown-toggle:focus { - outline: 0; -} -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - font-size: 14px; - text-align: left; - list-style: none; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, .15); - border-radius: 4px; - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); - box-shadow: 0 6px 12px rgba(0, 0, 0, .175); -} -.dropdown-menu.pull-right { - right: 0; - left: auto; -} -.dropdown-menu .divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.42857143; - color: #333; - white-space: nowrap; -} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - color: #262626; - text-decoration: none; - background-color: #f5f5f5; -} -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #fff; - text-decoration: none; - background-color: #337ab7; - outline: 0; -} -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #777; -} -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: not-allowed; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.open > .dropdown-menu { - display: block; -} -.open > a { - outline: 0; -} -.dropdown-menu-right { - right: 0; - left: auto; -} -.dropdown-menu-left { - right: auto; - left: 0; -} -.dropdown-header { - display: block; - padding: 3px 20px; - font-size: 12px; - line-height: 1.42857143; - color: #777; - white-space: nowrap; -} -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - content: ""; - border-top: 0; - border-bottom: 4px dashed; - border-bottom: 4px solid \9; -} -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 2px; -} -@media (min-width: 768px) { - .navbar-right .dropdown-menu { - right: 0; - left: auto; - } - .navbar-right .dropdown-menu-left { - right: auto; - left: 0; - } -} -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-block; - vertical-align: middle; -} -.btn-group > .btn, -.btn-group-vertical > .btn { - position: relative; - float: left; -} -.btn-group > .btn:hover, -.btn-group-vertical > .btn:hover, -.btn-group > .btn:focus, -.btn-group-vertical > .btn:focus, -.btn-group > .btn:active, -.btn-group-vertical > .btn:active, -.btn-group > .btn.active, -.btn-group-vertical > .btn.active { - z-index: 2; -} -.btn-group .btn + .btn, -.btn-group .btn + .btn-group, -.btn-group .btn-group + .btn, -.btn-group .btn-group + .btn-group { - margin-left: -1px; -} -.btn-toolbar { - margin-left: -5px; -} -.btn-toolbar .btn, -.btn-toolbar .btn-group, -.btn-toolbar .input-group { - float: left; -} -.btn-toolbar > .btn, -.btn-toolbar > .btn-group, -.btn-toolbar > .input-group { - margin-left: 5px; -} -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} -.btn-group > .btn:first-child { - margin-left: 0; -} -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-group > .btn:last-child:not(:first-child), -.btn-group > .dropdown-toggle:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group > .btn-group { - float: left; -} -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, -.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} -.btn-group > .btn + .dropdown-toggle { - padding-right: 8px; - padding-left: 8px; -} -.btn-group > .btn-lg + .dropdown-toggle { - padding-right: 12px; - padding-left: 12px; -} -.btn-group.open .dropdown-toggle { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn-group.open .dropdown-toggle.btn-link { - -webkit-box-shadow: none; - box-shadow: none; -} -.btn .caret { - margin-left: 0; -} -.btn-lg .caret { - border-width: 5px 5px 0; - border-bottom-width: 0; -} -.dropup .btn-lg .caret { - border-width: 0 5px 5px; -} -.btn-group-vertical > .btn, -.btn-group-vertical > .btn-group, -.btn-group-vertical > .btn-group > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; -} -.btn-group-vertical > .btn-group > .btn { - float: none; -} -.btn-group-vertical > .btn + .btn, -.btn-group-vertical > .btn + .btn-group, -.btn-group-vertical > .btn-group + .btn, -.btn-group-vertical > .btn-group + .btn-group { - margin-top: -1px; - margin-left: 0; -} -.btn-group-vertical > .btn:not(:first-child):not(:last-child) { - border-radius: 0; -} -.btn-group-vertical > .btn:first-child:not(:last-child) { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn:last-child:not(:first-child) { - border-top-left-radius: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} -.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.btn-group-justified { - display: table; - width: 100%; - table-layout: fixed; - border-collapse: separate; -} -.btn-group-justified > .btn, -.btn-group-justified > .btn-group { - display: table-cell; - float: none; - width: 1%; -} -.btn-group-justified > .btn-group .btn { - width: 100%; -} -.btn-group-justified > .btn-group .dropdown-menu { - left: auto; -} -[data-toggle="buttons"] > .btn input[type="radio"], -[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], -[data-toggle="buttons"] > .btn input[type="checkbox"], -[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { - position: absolute; - clip: rect(0, 0, 0, 0); - pointer-events: none; -} -.input-group { - position: relative; - display: table; - border-collapse: separate; -} -.input-group[class*="col-"] { - float: none; - padding-right: 0; - padding-left: 0; -} -.input-group .form-control { - position: relative; - z-index: 2; - float: left; - width: 100%; - margin-bottom: 0; -} -.input-group .form-control:focus { - z-index: 3; -} -.input-group-lg > .form-control, -.input-group-lg > .input-group-addon, -.input-group-lg > .input-group-btn > .btn { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -select.input-group-lg > .form-control, -select.input-group-lg > .input-group-addon, -select.input-group-lg > .input-group-btn > .btn { - height: 46px; - line-height: 46px; -} -textarea.input-group-lg > .form-control, -textarea.input-group-lg > .input-group-addon, -textarea.input-group-lg > .input-group-btn > .btn, -select[multiple].input-group-lg > .form-control, -select[multiple].input-group-lg > .input-group-addon, -select[multiple].input-group-lg > .input-group-btn > .btn { - height: auto; -} -.input-group-sm > .form-control, -.input-group-sm > .input-group-addon, -.input-group-sm > .input-group-btn > .btn { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -select.input-group-sm > .form-control, -select.input-group-sm > .input-group-addon, -select.input-group-sm > .input-group-btn > .btn { - height: 30px; - line-height: 30px; -} -textarea.input-group-sm > .form-control, -textarea.input-group-sm > .input-group-addon, -textarea.input-group-sm > .input-group-btn > .btn, -select[multiple].input-group-sm > .form-control, -select[multiple].input-group-sm > .input-group-addon, -select[multiple].input-group-sm > .input-group-btn > .btn { - height: auto; -} -.input-group-addon, -.input-group-btn, -.input-group .form-control { - display: table-cell; -} -.input-group-addon:not(:first-child):not(:last-child), -.input-group-btn:not(:first-child):not(:last-child), -.input-group .form-control:not(:first-child):not(:last-child) { - border-radius: 0; -} -.input-group-addon, -.input-group-btn { - width: 1%; - white-space: nowrap; - vertical-align: middle; -} -.input-group-addon { - padding: 6px 12px; - font-size: 14px; - font-weight: normal; - line-height: 1; - color: #555; - text-align: center; - background-color: #eee; - border: 1px solid #ccc; - border-radius: 4px; -} -.input-group-addon.input-sm { - padding: 5px 10px; - font-size: 12px; - border-radius: 3px; -} -.input-group-addon.input-lg { - padding: 10px 16px; - font-size: 18px; - border-radius: 6px; -} -.input-group-addon input[type="radio"], -.input-group-addon input[type="checkbox"] { - margin-top: 0; -} -.input-group .form-control:first-child, -.input-group-addon:first-child, -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group > .btn, -.input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), -.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.input-group-addon:first-child { - border-right: 0; -} -.input-group .form-control:last-child, -.input-group-addon:last-child, -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group > .btn, -.input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child), -.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.input-group-addon:last-child { - border-left: 0; -} -.input-group-btn { - position: relative; - font-size: 0; - white-space: nowrap; -} -.input-group-btn > .btn { - position: relative; -} -.input-group-btn > .btn + .btn { - margin-left: -1px; -} -.input-group-btn > .btn:hover, -.input-group-btn > .btn:focus, -.input-group-btn > .btn:active { - z-index: 2; -} -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group { - margin-right: -1px; -} -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group { - z-index: 2; - margin-left: -1px; -} -.nav { - padding-left: 0; - margin-bottom: 0; - list-style: none; -} -.nav > li { - position: relative; - display: block; -} -.nav > li > a { - position: relative; - display: block; - padding: 10px 15px; -} -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eee; -} -.nav > li.disabled > a { - color: #777; -} -.nav > li.disabled > a:hover, -.nav > li.disabled > a:focus { - color: #777; - text-decoration: none; - cursor: not-allowed; - background-color: transparent; -} -.nav .open > a, -.nav .open > a:hover, -.nav .open > a:focus { - background-color: #eee; - border-color: #337ab7; -} -.nav .nav-divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.nav > li > a > img { - max-width: none; -} -.nav-tabs { - border-bottom: 1px solid #ddd; -} -.nav-tabs > li { - float: left; - margin-bottom: -1px; -} -.nav-tabs > li > a { - margin-right: 2px; - line-height: 1.42857143; - border: 1px solid transparent; - border-radius: 4px 4px 0 0; -} -.nav-tabs > li > a:hover { - border-color: #eee #eee #ddd; -} -.nav-tabs > li.active > a, -.nav-tabs > li.active > a:hover, -.nav-tabs > li.active > a:focus { - color: #555; - cursor: default; - background-color: #fff; - border: 1px solid #ddd; - border-bottom-color: transparent; -} -.nav-tabs.nav-justified { - width: 100%; - border-bottom: 0; -} -.nav-tabs.nav-justified > li { - float: none; -} -.nav-tabs.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} -.nav-tabs.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 768px) { - .nav-tabs.nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-tabs.nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs.nav-justified > li > a { - margin-right: 0; - border-radius: 4px; -} -.nav-tabs.nav-justified > .active > a, -.nav-tabs.nav-justified > .active > a:hover, -.nav-tabs.nav-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 768px) { - .nav-tabs.nav-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs.nav-justified > .active > a, - .nav-tabs.nav-justified > .active > a:hover, - .nav-tabs.nav-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.nav-pills > li { - float: left; -} -.nav-pills > li > a { - border-radius: 4px; -} -.nav-pills > li + li { - margin-left: 2px; -} -.nav-pills > li.active > a, -.nav-pills > li.active > a:hover, -.nav-pills > li.active > a:focus { - color: #fff; - background-color: #337ab7; -} -.nav-stacked > li { - float: none; -} -.nav-stacked > li + li { - margin-top: 2px; - margin-left: 0; -} -.nav-justified { - width: 100%; -} -.nav-justified > li { - float: none; -} -.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} -.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 768px) { - .nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs-justified { - border-bottom: 0; -} -.nav-tabs-justified > li > a { - margin-right: 0; - border-radius: 4px; -} -.nav-tabs-justified > .active > a, -.nav-tabs-justified > .active > a:hover, -.nav-tabs-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 768px) { - .nav-tabs-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs-justified > .active > a, - .nav-tabs-justified > .active > a:hover, - .nav-tabs-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.tab-content > .tab-pane { - display: none; -} -.tab-content > .active { - display: block; -} -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.navbar { - position: relative; - min-height: 50px; - margin-bottom: 20px; - border: 1px solid transparent; -} -@media (min-width: 768px) { - .navbar { - border-radius: 4px; - } -} -@media (min-width: 768px) { - .navbar-header { - float: left; - } -} -.navbar-collapse { - padding-right: 15px; - padding-left: 15px; - overflow-x: visible; - -webkit-overflow-scrolling: touch; - border-top: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); -} -.navbar-collapse.in { - overflow-y: auto; -} -@media (min-width: 768px) { - .navbar-collapse { - width: auto; - border-top: 0; - -webkit-box-shadow: none; - box-shadow: none; - } - .navbar-collapse.collapse { - display: block !important; - height: auto !important; - padding-bottom: 0; - overflow: visible !important; - } - .navbar-collapse.in { - overflow-y: visible; - } - .navbar-fixed-top .navbar-collapse, - .navbar-static-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - padding-right: 0; - padding-left: 0; - } -} -.navbar-fixed-top .navbar-collapse, -.navbar-fixed-bottom .navbar-collapse { - max-height: 340px; -} -@media (max-device-width: 480px) and (orientation: landscape) { - .navbar-fixed-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - max-height: 200px; - } -} -.container > .navbar-header, -.container-fluid > .navbar-header, -.container > .navbar-collapse, -.container-fluid > .navbar-collapse { - margin-right: -15px; - margin-left: -15px; -} -@media (min-width: 768px) { - .container > .navbar-header, - .container-fluid > .navbar-header, - .container > .navbar-collapse, - .container-fluid > .navbar-collapse { - margin-right: 0; - margin-left: 0; - } -} -.navbar-static-top { - z-index: 1000; - border-width: 0 0 1px; -} -@media (min-width: 768px) { - .navbar-static-top { - border-radius: 0; - } -} -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; -} -@media (min-width: 768px) { - .navbar-fixed-top, - .navbar-fixed-bottom { - border-radius: 0; - } -} -.navbar-fixed-top { - top: 0; - border-width: 0 0 1px; -} -.navbar-fixed-bottom { - bottom: 0; - margin-bottom: 0; - border-width: 1px 0 0; -} -.navbar-brand { - float: left; - height: 50px; - padding: 15px 15px; - font-size: 18px; - line-height: 20px; -} -.navbar-brand:hover, -.navbar-brand:focus { - text-decoration: none; -} -.navbar-brand > img { - display: block; -} -@media (min-width: 768px) { - .navbar > .container .navbar-brand, - .navbar > .container-fluid .navbar-brand { - margin-left: -15px; - } -} -.navbar-toggle { - position: relative; - float: right; - padding: 9px 10px; - margin-top: 8px; - margin-right: 15px; - margin-bottom: 8px; - background-color: transparent; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} -.navbar-toggle:focus { - outline: 0; -} -.navbar-toggle .icon-bar { - display: block; - width: 22px; - height: 2px; - border-radius: 1px; -} -.navbar-toggle .icon-bar + .icon-bar { - margin-top: 4px; -} -@media (min-width: 768px) { - .navbar-toggle { - display: none; - } -} -.navbar-nav { - margin: 7.5px -15px; -} -.navbar-nav > li > a { - padding-top: 10px; - padding-bottom: 10px; - line-height: 20px; -} -@media (max-width: 767px) { - .navbar-nav .open .dropdown-menu { - position: static; - float: none; - width: auto; - margin-top: 0; - background-color: transparent; - border: 0; - -webkit-box-shadow: none; - box-shadow: none; - } - .navbar-nav .open .dropdown-menu > li > a, - .navbar-nav .open .dropdown-menu .dropdown-header { - padding: 5px 15px 5px 25px; - } - .navbar-nav .open .dropdown-menu > li > a { - line-height: 20px; - } - .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-nav .open .dropdown-menu > li > a:focus { - background-image: none; - } -} -@media (min-width: 768px) { - .navbar-nav { - float: left; - margin: 0; - } - .navbar-nav > li { - float: left; - } - .navbar-nav > li > a { - padding-top: 15px; - padding-bottom: 15px; - } -} -.navbar-form { - padding: 10px 15px; - margin-top: 8px; - margin-right: -15px; - margin-bottom: 8px; - margin-left: -15px; - border-top: 1px solid transparent; - border-bottom: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); -} -@media (min-width: 768px) { - .navbar-form .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .navbar-form .form-control-static { - display: inline-block; - } - .navbar-form .input-group { - display: inline-table; - vertical-align: middle; - } - .navbar-form .input-group .input-group-addon, - .navbar-form .input-group .input-group-btn, - .navbar-form .input-group .form-control { - width: auto; - } - .navbar-form .input-group > .form-control { - width: 100%; - } - .navbar-form .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio, - .navbar-form .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio label, - .navbar-form .checkbox label { - padding-left: 0; - } - .navbar-form .radio input[type="radio"], - .navbar-form .checkbox input[type="checkbox"] { - position: relative; - margin-left: 0; - } - .navbar-form .has-feedback .form-control-feedback { - top: 0; - } -} -@media (max-width: 767px) { - .navbar-form .form-group { - margin-bottom: 5px; - } - .navbar-form .form-group:last-child { - margin-bottom: 0; - } -} -@media (min-width: 768px) { - .navbar-form { - width: auto; - padding-top: 0; - padding-bottom: 0; - margin-right: 0; - margin-left: 0; - border: 0; - -webkit-box-shadow: none; - box-shadow: none; - } -} -.navbar-nav > li > .dropdown-menu { - margin-top: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { - margin-bottom: 0; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.navbar-btn { - margin-top: 8px; - margin-bottom: 8px; -} -.navbar-btn.btn-sm { - margin-top: 10px; - margin-bottom: 10px; -} -.navbar-btn.btn-xs { - margin-top: 14px; - margin-bottom: 14px; -} -.navbar-text { - margin-top: 15px; - margin-bottom: 15px; -} -@media (min-width: 768px) { - .navbar-text { - float: left; - margin-right: 15px; - margin-left: 15px; - } -} -@media (min-width: 768px) { - .navbar-left { - float: left !important; - } - .navbar-right { - float: right !important; - margin-right: -15px; - } - .navbar-right ~ .navbar-right { - margin-right: 0; - } -} -.navbar-default { - background-color: #f8f8f8; - border-color: #e7e7e7; -} -.navbar-default .navbar-brand { - color: #777; -} -.navbar-default .navbar-brand:hover, -.navbar-default .navbar-brand:focus { - color: #5e5e5e; - background-color: transparent; -} -.navbar-default .navbar-text { - color: #777; -} -.navbar-default .navbar-nav > li > a { - color: #777; -} -.navbar-default .navbar-nav > li > a:hover, -.navbar-default .navbar-nav > li > a:focus { - color: #333; - background-color: transparent; -} -.navbar-default .navbar-nav > .active > a, -.navbar-default .navbar-nav > .active > a:hover, -.navbar-default .navbar-nav > .active > a:focus { - color: #555; - background-color: #e7e7e7; -} -.navbar-default .navbar-nav > .disabled > a, -.navbar-default .navbar-nav > .disabled > a:hover, -.navbar-default .navbar-nav > .disabled > a:focus { - color: #ccc; - background-color: transparent; -} -.navbar-default .navbar-toggle { - border-color: #ddd; -} -.navbar-default .navbar-toggle:hover, -.navbar-default .navbar-toggle:focus { - background-color: #ddd; -} -.navbar-default .navbar-toggle .icon-bar { - background-color: #888; -} -.navbar-default .navbar-collapse, -.navbar-default .navbar-form { - border-color: #e7e7e7; -} -.navbar-default .navbar-nav > .open > a, -.navbar-default .navbar-nav > .open > a:hover, -.navbar-default .navbar-nav > .open > a:focus { - color: #555; - background-color: #e7e7e7; -} -@media (max-width: 767px) { - .navbar-default .navbar-nav .open .dropdown-menu > li > a { - color: #777; - } - .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { - color: #333; - background-color: transparent; - } - .navbar-default .navbar-nav .open .dropdown-menu > .active > a, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #555; - background-color: #e7e7e7; - } - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #ccc; - background-color: transparent; - } -} -.navbar-default .navbar-link { - color: #777; -} -.navbar-default .navbar-link:hover { - color: #333; -} -.navbar-default .btn-link { - color: #777; -} -.navbar-default .btn-link:hover, -.navbar-default .btn-link:focus { - color: #333; -} -.navbar-default .btn-link[disabled]:hover, -fieldset[disabled] .navbar-default .btn-link:hover, -.navbar-default .btn-link[disabled]:focus, -fieldset[disabled] .navbar-default .btn-link:focus { - color: #ccc; -} -.navbar-inverse { - background-color: #222; - border-color: #080808; -} -.navbar-inverse .navbar-brand { - color: #9d9d9d; -} -.navbar-inverse .navbar-brand:hover, -.navbar-inverse .navbar-brand:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-text { - color: #9d9d9d; -} -.navbar-inverse .navbar-nav > li > a { - color: #9d9d9d; -} -.navbar-inverse .navbar-nav > li > a:hover, -.navbar-inverse .navbar-nav > li > a:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-nav > .active > a, -.navbar-inverse .navbar-nav > .active > a:hover, -.navbar-inverse .navbar-nav > .active > a:focus { - color: #fff; - background-color: #080808; -} -.navbar-inverse .navbar-nav > .disabled > a, -.navbar-inverse .navbar-nav > .disabled > a:hover, -.navbar-inverse .navbar-nav > .disabled > a:focus { - color: #444; - background-color: transparent; -} -.navbar-inverse .navbar-toggle { - border-color: #333; -} -.navbar-inverse .navbar-toggle:hover, -.navbar-inverse .navbar-toggle:focus { - background-color: #333; -} -.navbar-inverse .navbar-toggle .icon-bar { - background-color: #fff; -} -.navbar-inverse .navbar-collapse, -.navbar-inverse .navbar-form { - border-color: #101010; -} -.navbar-inverse .navbar-nav > .open > a, -.navbar-inverse .navbar-nav > .open > a:hover, -.navbar-inverse .navbar-nav > .open > a:focus { - color: #fff; - background-color: #080808; -} -@media (max-width: 767px) { - .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { - border-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu .divider { - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { - color: #9d9d9d; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { - color: #fff; - background-color: transparent; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #fff; - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #444; - background-color: transparent; - } -} -.navbar-inverse .navbar-link { - color: #9d9d9d; -} -.navbar-inverse .navbar-link:hover { - color: #fff; -} -.navbar-inverse .btn-link { - color: #9d9d9d; -} -.navbar-inverse .btn-link:hover, -.navbar-inverse .btn-link:focus { - color: #fff; -} -.navbar-inverse .btn-link[disabled]:hover, -fieldset[disabled] .navbar-inverse .btn-link:hover, -.navbar-inverse .btn-link[disabled]:focus, -fieldset[disabled] .navbar-inverse .btn-link:focus { - color: #444; -} -.breadcrumb { - padding: 8px 15px; - margin-bottom: 20px; - list-style: none; - background-color: #f5f5f5; - border-radius: 4px; -} -.breadcrumb > li { - display: inline-block; -} -.breadcrumb > li + li:before { - padding: 0 5px; - color: #ccc; - content: "/\00a0"; -} -.breadcrumb > .active { - color: #777; -} -.pagination { - display: inline-block; - padding-left: 0; - margin: 20px 0; - border-radius: 4px; -} -.pagination > li { - display: inline; -} -.pagination > li > a, -.pagination > li > span { - position: relative; - float: left; - padding: 6px 12px; - margin-left: -1px; - line-height: 1.42857143; - color: #337ab7; - text-decoration: none; - background-color: #fff; - border: 1px solid #ddd; -} -.pagination > li:first-child > a, -.pagination > li:first-child > span { - margin-left: 0; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} -.pagination > li:last-child > a, -.pagination > li:last-child > span { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} -.pagination > li > a:hover, -.pagination > li > span:hover, -.pagination > li > a:focus, -.pagination > li > span:focus { - z-index: 2; - color: #23527c; - background-color: #eee; - border-color: #ddd; -} -.pagination > .active > a, -.pagination > .active > span, -.pagination > .active > a:hover, -.pagination > .active > span:hover, -.pagination > .active > a:focus, -.pagination > .active > span:focus { - z-index: 3; - color: #fff; - cursor: default; - background-color: #337ab7; - border-color: #337ab7; -} -.pagination > .disabled > span, -.pagination > .disabled > span:hover, -.pagination > .disabled > span:focus, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: #777; - cursor: not-allowed; - background-color: #fff; - border-color: #ddd; -} -.pagination-lg > li > a, -.pagination-lg > li > span { - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; -} -.pagination-lg > li:first-child > a, -.pagination-lg > li:first-child > span { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; -} -.pagination-lg > li:last-child > a, -.pagination-lg > li:last-child > span { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} -.pagination-sm > li > a, -.pagination-sm > li > span { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; -} -.pagination-sm > li:first-child > a, -.pagination-sm > li:first-child > span { - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} -.pagination-sm > li:last-child > a, -.pagination-sm > li:last-child > span { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} -.pager { - padding-left: 0; - margin: 20px 0; - text-align: center; - list-style: none; -} -.pager li { - display: inline; -} -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 15px; -} -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #eee; -} -.pager .next > a, -.pager .next > span { - float: right; -} -.pager .previous > a, -.pager .previous > span { - float: left; -} -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #777; - cursor: not-allowed; - background-color: #fff; -} -.label { - display: inline; - padding: .2em .6em .3em; - font-size: 75%; - font-weight: bold; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; -} -a.label:hover, -a.label:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -.label:empty { - display: none; -} -.btn .label { - position: relative; - top: -1px; -} -.label-default { - background-color: #777; -} -.label-default[href]:hover, -.label-default[href]:focus { - background-color: #5e5e5e; -} -.label-primary { - background-color: #337ab7; -} -.label-primary[href]:hover, -.label-primary[href]:focus { - background-color: #286090; -} -.label-success { - background-color: #5cb85c; -} -.label-success[href]:hover, -.label-success[href]:focus { - background-color: #449d44; -} -.label-info { - background-color: #5bc0de; -} -.label-info[href]:hover, -.label-info[href]:focus { - background-color: #31b0d5; -} -.label-warning { - background-color: #f0ad4e; -} -.label-warning[href]:hover, -.label-warning[href]:focus { - background-color: #ec971f; -} -.label-danger { - background-color: #d9534f; -} -.label-danger[href]:hover, -.label-danger[href]:focus { - background-color: #c9302c; -} -.badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: 12px; - font-weight: bold; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: middle; - background-color: #777; - border-radius: 10px; -} -.badge:empty { - display: none; -} -.btn .badge { - position: relative; - top: -1px; -} -.btn-xs .badge, -.btn-group-xs > .btn .badge { - top: 0; - padding: 1px 5px; -} -a.badge:hover, -a.badge:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -.list-group-item.active > .badge, -.nav-pills > .active > a > .badge { - color: #337ab7; - background-color: #fff; -} -.list-group-item > .badge { - float: right; -} -.list-group-item > .badge + .badge { - margin-right: 5px; -} -.nav-pills > li > a > .badge { - margin-left: 3px; -} -.jumbotron { - padding-top: 30px; - padding-bottom: 30px; - margin-bottom: 30px; - color: inherit; - background-color: #eee; -} -.jumbotron h1, -.jumbotron .h1 { - color: inherit; -} -.jumbotron p { - margin-bottom: 15px; - font-size: 21px; - font-weight: 200; -} -.jumbotron > hr { - border-top-color: #d5d5d5; -} -.container .jumbotron, -.container-fluid .jumbotron { - padding-right: 15px; - padding-left: 15px; - border-radius: 6px; -} -.jumbotron .container { - max-width: 100%; -} -@media screen and (min-width: 768px) { - .jumbotron { - padding-top: 48px; - padding-bottom: 48px; - } - .container .jumbotron, - .container-fluid .jumbotron { - padding-right: 60px; - padding-left: 60px; - } - .jumbotron h1, - .jumbotron .h1 { - font-size: 63px; - } -} -.thumbnail { - display: block; - padding: 4px; - margin-bottom: 20px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - -webkit-transition: border .2s ease-in-out; - -o-transition: border .2s ease-in-out; - transition: border .2s ease-in-out; -} -.thumbnail > img, -.thumbnail a > img { - margin-right: auto; - margin-left: auto; -} -a.thumbnail:hover, -a.thumbnail:focus, -a.thumbnail.active { - border-color: #337ab7; -} -.thumbnail .caption { - padding: 9px; - color: #333; -} -.alert { - padding: 15px; - margin-bottom: 20px; - border: 1px solid transparent; - border-radius: 4px; -} -.alert h4 { - margin-top: 0; - color: inherit; -} -.alert .alert-link { - font-weight: bold; -} -.alert > p, -.alert > ul { - margin-bottom: 0; -} -.alert > p + p { - margin-top: 5px; -} -.alert-dismissable, -.alert-dismissible { - padding-right: 35px; -} -.alert-dismissable .close, -.alert-dismissible .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} -.alert-success { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -.alert-success hr { - border-top-color: #c9e2b3; -} -.alert-success .alert-link { - color: #2b542c; -} -.alert-info { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -.alert-info hr { - border-top-color: #a6e1ec; -} -.alert-info .alert-link { - color: #245269; -} -.alert-warning { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -.alert-warning hr { - border-top-color: #f7e1b5; -} -.alert-warning .alert-link { - color: #66512c; -} -.alert-danger { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} -.alert-danger hr { - border-top-color: #e4b9c0; -} -.alert-danger .alert-link { - color: #843534; -} -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@-o-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f5f5f5; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); -} -.progress-bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - line-height: 20px; - color: #fff; - text-align: center; - background-color: #337ab7; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - -webkit-transition: width .6s ease; - -o-transition: width .6s ease; - transition: width .6s ease; -} -.progress-striped .progress-bar, -.progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - background-size: 40px 40px; -} -.progress.active .progress-bar, -.progress-bar.active { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} -.progress-bar-success { - background-color: #5cb85c; -} -.progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-info { - background-color: #5bc0de; -} -.progress-striped .progress-bar-info { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-warning { - background-color: #f0ad4e; -} -.progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-danger { - background-color: #d9534f; -} -.progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.media { - margin-top: 15px; -} -.media:first-child { - margin-top: 0; -} -.media, -.media-body { - overflow: hidden; - zoom: 1; -} -.media-body { - width: 10000px; -} -.media-object { - display: block; -} -.media-object.img-thumbnail { - max-width: none; -} -.media-right, -.media > .pull-right { - padding-left: 10px; -} -.media-left, -.media > .pull-left { - padding-right: 10px; -} -.media-left, -.media-right, -.media-body { - display: table-cell; - vertical-align: top; -} -.media-middle { - vertical-align: middle; -} -.media-bottom { - vertical-align: bottom; -} -.media-heading { - margin-top: 0; - margin-bottom: 5px; -} -.media-list { - padding-left: 0; - list-style: none; -} -.list-group { - padding-left: 0; - margin-bottom: 20px; -} -.list-group-item { - position: relative; - display: block; - padding: 10px 15px; - margin-bottom: -1px; - background-color: #fff; - border: 1px solid #ddd; -} -.list-group-item:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} -a.list-group-item, -button.list-group-item { - color: #555; -} -a.list-group-item .list-group-item-heading, -button.list-group-item .list-group-item-heading { - color: #333; -} -a.list-group-item:hover, -button.list-group-item:hover, -a.list-group-item:focus, -button.list-group-item:focus { - color: #555; - text-decoration: none; - background-color: #f5f5f5; -} -button.list-group-item { - width: 100%; - text-align: left; -} -.list-group-item.disabled, -.list-group-item.disabled:hover, -.list-group-item.disabled:focus { - color: #777; - cursor: not-allowed; - background-color: #eee; -} -.list-group-item.disabled .list-group-item-heading, -.list-group-item.disabled:hover .list-group-item-heading, -.list-group-item.disabled:focus .list-group-item-heading { - color: inherit; -} -.list-group-item.disabled .list-group-item-text, -.list-group-item.disabled:hover .list-group-item-text, -.list-group-item.disabled:focus .list-group-item-text { - color: #777; -} -.list-group-item.active, -.list-group-item.active:hover, -.list-group-item.active:focus { - z-index: 2; - color: #fff; - background-color: #337ab7; - border-color: #337ab7; -} -.list-group-item.active .list-group-item-heading, -.list-group-item.active:hover .list-group-item-heading, -.list-group-item.active:focus .list-group-item-heading, -.list-group-item.active .list-group-item-heading > small, -.list-group-item.active:hover .list-group-item-heading > small, -.list-group-item.active:focus .list-group-item-heading > small, -.list-group-item.active .list-group-item-heading > .small, -.list-group-item.active:hover .list-group-item-heading > .small, -.list-group-item.active:focus .list-group-item-heading > .small { - color: inherit; -} -.list-group-item.active .list-group-item-text, -.list-group-item.active:hover .list-group-item-text, -.list-group-item.active:focus .list-group-item-text { - color: #c7ddef; -} -.list-group-item-success { - color: #3c763d; - background-color: #dff0d8; -} -a.list-group-item-success, -button.list-group-item-success { - color: #3c763d; -} -a.list-group-item-success .list-group-item-heading, -button.list-group-item-success .list-group-item-heading { - color: inherit; -} -a.list-group-item-success:hover, -button.list-group-item-success:hover, -a.list-group-item-success:focus, -button.list-group-item-success:focus { - color: #3c763d; - background-color: #d0e9c6; -} -a.list-group-item-success.active, -button.list-group-item-success.active, -a.list-group-item-success.active:hover, -button.list-group-item-success.active:hover, -a.list-group-item-success.active:focus, -button.list-group-item-success.active:focus { - color: #fff; - background-color: #3c763d; - border-color: #3c763d; -} -.list-group-item-info { - color: #31708f; - background-color: #d9edf7; -} -a.list-group-item-info, -button.list-group-item-info { - color: #31708f; -} -a.list-group-item-info .list-group-item-heading, -button.list-group-item-info .list-group-item-heading { - color: inherit; -} -a.list-group-item-info:hover, -button.list-group-item-info:hover, -a.list-group-item-info:focus, -button.list-group-item-info:focus { - color: #31708f; - background-color: #c4e3f3; -} -a.list-group-item-info.active, -button.list-group-item-info.active, -a.list-group-item-info.active:hover, -button.list-group-item-info.active:hover, -a.list-group-item-info.active:focus, -button.list-group-item-info.active:focus { - color: #fff; - background-color: #31708f; - border-color: #31708f; -} -.list-group-item-warning { - color: #8a6d3b; - background-color: #fcf8e3; -} -a.list-group-item-warning, -button.list-group-item-warning { - color: #8a6d3b; -} -a.list-group-item-warning .list-group-item-heading, -button.list-group-item-warning .list-group-item-heading { - color: inherit; -} -a.list-group-item-warning:hover, -button.list-group-item-warning:hover, -a.list-group-item-warning:focus, -button.list-group-item-warning:focus { - color: #8a6d3b; - background-color: #faf2cc; -} -a.list-group-item-warning.active, -button.list-group-item-warning.active, -a.list-group-item-warning.active:hover, -button.list-group-item-warning.active:hover, -a.list-group-item-warning.active:focus, -button.list-group-item-warning.active:focus { - color: #fff; - background-color: #8a6d3b; - border-color: #8a6d3b; -} -.list-group-item-danger { - color: #a94442; - background-color: #f2dede; -} -a.list-group-item-danger, -button.list-group-item-danger { - color: #a94442; -} -a.list-group-item-danger .list-group-item-heading, -button.list-group-item-danger .list-group-item-heading { - color: inherit; -} -a.list-group-item-danger:hover, -button.list-group-item-danger:hover, -a.list-group-item-danger:focus, -button.list-group-item-danger:focus { - color: #a94442; - background-color: #ebcccc; -} -a.list-group-item-danger.active, -button.list-group-item-danger.active, -a.list-group-item-danger.active:hover, -button.list-group-item-danger.active:hover, -a.list-group-item-danger.active:focus, -button.list-group-item-danger.active:focus { - color: #fff; - background-color: #a94442; - border-color: #a94442; -} -.list-group-item-heading { - margin-top: 0; - margin-bottom: 5px; -} -.list-group-item-text { - margin-bottom: 0; - line-height: 1.3; -} -.panel { - margin-bottom: 20px; - background-color: #fff; - border: 1px solid transparent; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); - box-shadow: 0 1px 1px rgba(0, 0, 0, .05); -} -.panel-body { - padding: 15px; -} -.panel-heading { - padding: 10px 15px; - border-bottom: 1px solid transparent; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel-heading > .dropdown .dropdown-toggle { - color: inherit; -} -.panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: 16px; - color: inherit; -} -.panel-title > a, -.panel-title > small, -.panel-title > .small, -.panel-title > small > a, -.panel-title > .small > a { - color: inherit; -} -.panel-footer { - padding: 10px 15px; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .list-group, -.panel > .panel-collapse > .list-group { - margin-bottom: 0; -} -.panel > .list-group .list-group-item, -.panel > .panel-collapse > .list-group .list-group-item { - border-width: 1px 0; - border-radius: 0; -} -.panel > .list-group:first-child .list-group-item:first-child, -.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { - border-top: 0; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .list-group:last-child .list-group-item:last-child, -.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { - border-bottom: 0; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.panel-heading + .list-group .list-group-item:first-child { - border-top-width: 0; -} -.list-group + .panel-footer { - border-top-width: 0; -} -.panel > .table, -.panel > .table-responsive > .table, -.panel > .panel-collapse > .table { - margin-bottom: 0; -} -.panel > .table caption, -.panel > .table-responsive > .table caption, -.panel > .panel-collapse > .table caption { - padding-right: 15px; - padding-left: 15px; -} -.panel > .table:first-child, -.panel > .table-responsive:first-child > .table:first-child { - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { - border-top-left-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { - border-top-right-radius: 3px; -} -.panel > .table:last-child, -.panel > .table-responsive:last-child > .table:last-child { - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { - border-bottom-right-radius: 3px; -} -.panel > .panel-body + .table, -.panel > .panel-body + .table-responsive, -.panel > .table + .panel-body, -.panel > .table-responsive + .panel-body { - border-top: 1px solid #ddd; -} -.panel > .table > tbody:first-child > tr:first-child th, -.panel > .table > tbody:first-child > tr:first-child td { - border-top: 0; -} -.panel > .table-bordered, -.panel > .table-responsive > .table-bordered { - border: 0; -} -.panel > .table-bordered > thead > tr > th:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, -.panel > .table-bordered > tbody > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, -.panel > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-bordered > thead > tr > td:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, -.panel > .table-bordered > tbody > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, -.panel > .table-bordered > tfoot > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; -} -.panel > .table-bordered > thead > tr > th:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, -.panel > .table-bordered > tbody > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, -.panel > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-bordered > thead > tr > td:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, -.panel > .table-bordered > tbody > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, -.panel > .table-bordered > tfoot > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; -} -.panel > .table-bordered > thead > tr:first-child > td, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, -.panel > .table-bordered > tbody > tr:first-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, -.panel > .table-bordered > thead > tr:first-child > th, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, -.panel > .table-bordered > tbody > tr:first-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { - border-bottom: 0; -} -.panel > .table-bordered > tbody > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, -.panel > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-bordered > tbody > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, -.panel > .table-bordered > tfoot > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { - border-bottom: 0; -} -.panel > .table-responsive { - margin-bottom: 0; - border: 0; -} -.panel-group { - margin-bottom: 20px; -} -.panel-group .panel { - margin-bottom: 0; - border-radius: 4px; -} -.panel-group .panel + .panel { - margin-top: 5px; -} -.panel-group .panel-heading { - border-bottom: 0; -} -.panel-group .panel-heading + .panel-collapse > .panel-body, -.panel-group .panel-heading + .panel-collapse > .list-group { - border-top: 1px solid #ddd; -} -.panel-group .panel-footer { - border-top: 0; -} -.panel-group .panel-footer + .panel-collapse .panel-body { - border-bottom: 1px solid #ddd; -} -.panel-default { - border-color: #ddd; -} -.panel-default > .panel-heading { - color: #333; - background-color: #f5f5f5; - border-color: #ddd; -} -.panel-default > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ddd; -} -.panel-default > .panel-heading .badge { - color: #f5f5f5; - background-color: #333; -} -.panel-default > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ddd; -} -.panel-primary { - border-color: #337ab7; -} -.panel-primary > .panel-heading { - color: #fff; - background-color: #337ab7; - border-color: #337ab7; -} -.panel-primary > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #337ab7; -} -.panel-primary > .panel-heading .badge { - color: #337ab7; - background-color: #fff; -} -.panel-primary > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #337ab7; -} -.panel-success { - border-color: #d6e9c6; -} -.panel-success > .panel-heading { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -.panel-success > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #d6e9c6; -} -.panel-success > .panel-heading .badge { - color: #dff0d8; - background-color: #3c763d; -} -.panel-success > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #d6e9c6; -} -.panel-info { - border-color: #bce8f1; -} -.panel-info > .panel-heading { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -.panel-info > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #bce8f1; -} -.panel-info > .panel-heading .badge { - color: #d9edf7; - background-color: #31708f; -} -.panel-info > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #bce8f1; -} -.panel-warning { - border-color: #faebcc; -} -.panel-warning > .panel-heading { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -.panel-warning > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #faebcc; -} -.panel-warning > .panel-heading .badge { - color: #fcf8e3; - background-color: #8a6d3b; -} -.panel-warning > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #faebcc; -} -.panel-danger { - border-color: #ebccd1; -} -.panel-danger > .panel-heading { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} -.panel-danger > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ebccd1; -} -.panel-danger > .panel-heading .badge { - color: #f2dede; - background-color: #a94442; -} -.panel-danger > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ebccd1; -} -.embed-responsive { - position: relative; - display: block; - height: 0; - padding: 0; - overflow: hidden; -} -.embed-responsive .embed-responsive-item, -.embed-responsive iframe, -.embed-responsive embed, -.embed-responsive object, -.embed-responsive video { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 100%; - height: 100%; - border: 0; -} -.embed-responsive-16by9 { - padding-bottom: 56.25%; -} -.embed-responsive-4by3 { - padding-bottom: 75%; -} -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); -} -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, .15); -} -.well-lg { - padding: 24px; - border-radius: 6px; -} -.well-sm { - padding: 9px; - border-radius: 3px; -} -.close { - float: right; - font-size: 21px; - font-weight: bold; - line-height: 1; - color: #000; - text-shadow: 0 1px 0 #fff; - filter: alpha(opacity=20); - opacity: .2; -} -.close:hover, -.close:focus { - color: #000; - text-decoration: none; - cursor: pointer; - filter: alpha(opacity=50); - opacity: .5; -} -button.close { - -webkit-appearance: none; - padding: 0; - cursor: pointer; - background: transparent; - border: 0; -} -.modal-open { - overflow: hidden; -} -.modal { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1050; - display: none; - overflow: hidden; - -webkit-overflow-scrolling: touch; - outline: 0; -} -.modal.fade .modal-dialog { - -webkit-transition: -webkit-transform .3s ease-out; - -o-transition: -o-transform .3s ease-out; - transition: transform .3s ease-out; - -webkit-transform: translate(0, -25%); - -ms-transform: translate(0, -25%); - -o-transform: translate(0, -25%); - transform: translate(0, -25%); -} -.modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - -o-transform: translate(0, 0); - transform: translate(0, 0); -} -.modal-open .modal { - overflow-x: hidden; - overflow-y: auto; -} -.modal-dialog { - position: relative; - width: auto; - margin: 10px; -} -.modal-content { - position: relative; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 6px; - outline: 0; - -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); - box-shadow: 0 3px 9px rgba(0, 0, 0, .5); -} -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000; -} -.modal-backdrop.fade { - filter: alpha(opacity=0); - opacity: 0; -} -.modal-backdrop.in { - filter: alpha(opacity=50); - opacity: .5; -} -.modal-header { - padding: 15px; - border-bottom: 1px solid #e5e5e5; -} -.modal-header .close { - margin-top: -2px; -} -.modal-title { - margin: 0; - line-height: 1.42857143; -} -.modal-body { - position: relative; - padding: 15px; -} -.modal-footer { - padding: 15px; - text-align: right; - border-top: 1px solid #e5e5e5; -} -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} -.modal-scrollbar-measure { - position: absolute; - top: -9999px; - width: 50px; - height: 50px; - overflow: scroll; -} -@media (min-width: 768px) { - .modal-dialog { - width: 600px; - margin: 30px auto; - } - .modal-content { - -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); - box-shadow: 0 5px 15px rgba(0, 0, 0, .5); - } - .modal-sm { - width: 300px; - } -} -@media (min-width: 992px) { - .modal-lg { - width: 900px; - } -} -.tooltip { - position: absolute; - z-index: 1070; - display: block; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 12px; - font-style: normal; - font-weight: normal; - line-height: 1.42857143; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - word-wrap: normal; - white-space: normal; - filter: alpha(opacity=0); - opacity: 0; - - line-break: auto; -} -.tooltip.in { - filter: alpha(opacity=90); - opacity: .9; -} -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #fff; - text-align: center; - background-color: #000; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-left .tooltip-arrow { - right: 5px; - bottom: 0; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-right .tooltip-arrow { - bottom: 0; - left: 5px; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.tooltip.bottom-left .tooltip-arrow { - top: 0; - right: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.tooltip.bottom-right .tooltip-arrow { - top: 0; - left: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1060; - display: none; - max-width: 276px; - padding: 1px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - font-style: normal; - font-weight: normal; - line-height: 1.42857143; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - word-wrap: normal; - white-space: normal; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); - box-shadow: 0 5px 10px rgba(0, 0, 0, .2); - - line-break: auto; -} -.popover.top { - margin-top: -10px; -} -.popover.right { - margin-left: 10px; -} -.popover.bottom { - margin-top: 10px; -} -.popover.left { - margin-left: -10px; -} -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 5px 5px 0 0; -} -.popover-content { - padding: 9px 14px; -} -.popover > .arrow, -.popover > .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.popover > .arrow { - border-width: 11px; -} -.popover > .arrow:after { - content: ""; - border-width: 10px; -} -.popover.top > .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, .25); - border-bottom-width: 0; -} -.popover.top > .arrow:after { - bottom: 1px; - margin-left: -10px; - content: " "; - border-top-color: #fff; - border-bottom-width: 0; -} -.popover.right > .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, .25); - border-left-width: 0; -} -.popover.right > .arrow:after { - bottom: -10px; - left: 1px; - content: " "; - border-right-color: #fff; - border-left-width: 0; -} -.popover.bottom > .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, .25); -} -.popover.bottom > .arrow:after { - top: 1px; - margin-left: -10px; - content: " "; - border-top-width: 0; - border-bottom-color: #fff; -} -.popover.left > .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, .25); -} -.popover.left > .arrow:after { - right: 1px; - bottom: -10px; - content: " "; - border-right-width: 0; - border-left-color: #fff; -} -.carousel { - position: relative; -} -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: .6s ease-in-out left; - -o-transition: .6s ease-in-out left; - transition: .6s ease-in-out left; -} -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - line-height: 1; -} -@media all and (transform-3d), (-webkit-transform-3d) { - .carousel-inner > .item { - -webkit-transition: -webkit-transform .6s ease-in-out; - -o-transition: -o-transform .6s ease-in-out; - transition: transform .6s ease-in-out; - - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - -webkit-perspective: 1000px; - perspective: 1000px; - } - .carousel-inner > .item.next, - .carousel-inner > .item.active.right { - left: 0; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } - .carousel-inner > .item.prev, - .carousel-inner > .item.active.left { - left: 0; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } - .carousel-inner > .item.next.left, - .carousel-inner > .item.prev.right, - .carousel-inner > .item.active { - left: 0; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} -.carousel-inner > .active { - left: 0; -} -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} -.carousel-inner > .next { - left: 100%; -} -.carousel-inner > .prev { - left: -100%; -} -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} -.carousel-inner > .active.left { - left: -100%; -} -.carousel-inner > .active.right { - left: 100%; -} -.carousel-control { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 15%; - font-size: 20px; - color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); - background-color: rgba(0, 0, 0, 0); - filter: alpha(opacity=50); - opacity: .5; -} -.carousel-control.left { - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); - background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control.right { - right: 0; - left: auto; - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); - background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control:hover, -.carousel-control:focus { - color: #fff; - text-decoration: none; - filter: alpha(opacity=90); - outline: 0; - opacity: .9; -} -.carousel-control .icon-prev, -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-left, -.carousel-control .glyphicon-chevron-right { - position: absolute; - top: 50%; - z-index: 5; - display: inline-block; - margin-top: -10px; -} -.carousel-control .icon-prev, -.carousel-control .glyphicon-chevron-left { - left: 50%; - margin-left: -10px; -} -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-right { - right: 50%; - margin-right: -10px; -} -.carousel-control .icon-prev, -.carousel-control .icon-next { - width: 20px; - height: 20px; - font-family: serif; - line-height: 1; -} -.carousel-control .icon-prev:before { - content: '\2039'; -} -.carousel-control .icon-next:before { - content: '\203a'; -} -.carousel-indicators { - position: absolute; - bottom: 10px; - left: 50%; - z-index: 15; - width: 60%; - padding-left: 0; - margin-left: -30%; - text-align: center; - list-style: none; -} -.carousel-indicators li { - display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - cursor: pointer; - background-color: #000 \9; - background-color: rgba(0, 0, 0, 0); - border: 1px solid #fff; - border-radius: 10px; -} -.carousel-indicators .active { - width: 12px; - height: 12px; - margin: 0; - background-color: #fff; -} -.carousel-caption { - position: absolute; - right: 15%; - bottom: 20px; - left: 15%; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); -} -.carousel-caption .btn { - text-shadow: none; -} -@media screen and (min-width: 768px) { - .carousel-control .glyphicon-chevron-left, - .carousel-control .glyphicon-chevron-right, - .carousel-control .icon-prev, - .carousel-control .icon-next { - width: 30px; - height: 30px; - margin-top: -10px; - font-size: 30px; - } - .carousel-control .glyphicon-chevron-left, - .carousel-control .icon-prev { - margin-left: -10px; - } - .carousel-control .glyphicon-chevron-right, - .carousel-control .icon-next { - margin-right: -10px; - } - .carousel-caption { - right: 20%; - left: 20%; - padding-bottom: 30px; - } - .carousel-indicators { - bottom: 20px; - } -} -.clearfix:before, -.clearfix:after, -.dl-horizontal dd:before, -.dl-horizontal dd:after, -.container:before, -.container:after, -.container-fluid:before, -.container-fluid:after, -.row:before, -.row:after, -.form-horizontal .form-group:before, -.form-horizontal .form-group:after, -.btn-toolbar:before, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:before, -.btn-group-vertical > .btn-group:after, -.nav:before, -.nav:after, -.navbar:before, -.navbar:after, -.navbar-header:before, -.navbar-header:after, -.navbar-collapse:before, -.navbar-collapse:after, -.pager:before, -.pager:after, -.panel-body:before, -.panel-body:after, -.modal-header:before, -.modal-header:after, -.modal-footer:before, -.modal-footer:after { - display: table; - content: " "; -} -.clearfix:after, -.dl-horizontal dd:after, -.container:after, -.container-fluid:after, -.row:after, -.form-horizontal .form-group:after, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:after, -.nav:after, -.navbar:after, -.navbar-header:after, -.navbar-collapse:after, -.pager:after, -.panel-body:after, -.modal-header:after, -.modal-footer:after { - clear: both; -} -.center-block { - display: block; - margin-right: auto; - margin-left: auto; -} -.pull-right { - float: right !important; -} -.pull-left { - float: left !important; -} -.hide { - display: none !important; -} -.show { - display: block !important; -} -.invisible { - visibility: hidden; -} -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.hidden { - display: none !important; -} -.affix { - position: fixed; -} -@-ms-viewport { - width: device-width; -} -.visible-xs, -.visible-sm, -.visible-md, -.visible-lg { - display: none !important; -} -.visible-xs-block, -.visible-xs-inline, -.visible-xs-inline-block, -.visible-sm-block, -.visible-sm-inline, -.visible-sm-inline-block, -.visible-md-block, -.visible-md-inline, -.visible-md-inline-block, -.visible-lg-block, -.visible-lg-inline, -.visible-lg-inline-block { - display: none !important; -} -@media (max-width: 767px) { - .visible-xs { - display: block !important; - } - table.visible-xs { - display: table !important; - } - tr.visible-xs { - display: table-row !important; - } - th.visible-xs, - td.visible-xs { - display: table-cell !important; - } -} -@media (max-width: 767px) { - .visible-xs-block { - display: block !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline { - display: inline !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline-block { - display: inline-block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm { - display: block !important; - } - table.visible-sm { - display: table !important; - } - tr.visible-sm { - display: table-row !important; - } - th.visible-sm, - td.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-block { - display: block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline { - display: inline !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline-block { - display: inline-block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md { - display: block !important; - } - table.visible-md { - display: table !important; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-block { - display: block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline { - display: inline !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline-block { - display: inline-block !important; - } -} -@media (min-width: 1200px) { - .visible-lg { - display: block !important; - } - table.visible-lg { - display: table !important; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-lg-block { - display: block !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline { - display: inline !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline-block { - display: inline-block !important; - } -} -@media (max-width: 767px) { - .hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-lg { - display: none !important; - } -} -.visible-print { - display: none !important; -} -@media print { - .visible-print { - display: block !important; - } - table.visible-print { - display: table !important; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } -} -.visible-print-block { - display: none !important; -} -@media print { - .visible-print-block { - display: block !important; - } -} -.visible-print-inline { - display: none !important; -} -@media print { - .visible-print-inline { - display: inline !important; - } -} -.visible-print-inline-block { - display: none !important; -} -@media print { - .visible-print-inline-block { - display: inline-block !important; - } -} -@media print { - .hidden-print { - display: none !important; - } -} -/*# sourceMappingURL=bootstrap.css.map */ diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map deleted file mode 100644 index f010c82d113c2..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,4EAA4E;ACG5E;EACE,wBAAA;EACA,2BAAA;EACA,+BAAA;CDDD;ACQD;EACE,UAAA;CDND;ACmBD;;;;;;;;;;;;;EAaE,eAAA;CDjBD;ACyBD;;;;EAIE,sBAAA;EACA,yBAAA;CDvBD;AC+BD;EACE,cAAA;EACA,UAAA;CD7BD;ACqCD;;EAEE,cAAA;CDnCD;AC6CD;EACE,8BAAA;CD3CD;ACmDD;;EAEE,WAAA;CDjDD;AC2DD;EACE,0BAAA;CDzDD;ACgED;;EAEE,kBAAA;CD9DD;ACqED;EACE,mBAAA;CDnED;AC2ED;EACE,eAAA;EACA,iBAAA;CDzED;ACgFD;EACE,iBAAA;EACA,YAAA;CD9ED;ACqFD;EACE,eAAA;CDnFD;AC0FD;;EAEE,eAAA;EACA,eAAA;EACA,mBAAA;EACA,yBAAA;CDxFD;AC2FD;EACE,YAAA;CDzFD;AC4FD;EACE,gBAAA;CD1FD;ACoGD;EACE,UAAA;CDlGD;ACyGD;EACE,iBAAA;CDvGD;ACiHD;EACE,iBAAA;CD/GD;ACsHD;EACE,gCAAA;KAAA,6BAAA;UAAA,wBAAA;EACA,UAAA;CDpHD;AC2HD;EACE,eAAA;CDzHD;ACgID;;;;EAIE,kCAAA;EACA,eAAA;CD9HD;ACgJD;;;;;EAKE,eAAA;EACA,cAAA;EACA,UAAA;CD9ID;ACqJD;EACE,kBAAA;CDnJD;AC6JD;;EAEE,qBAAA;CD3JD;ACsKD;;;;EAIE,2BAAA;EACA,gBAAA;CDpKD;AC2KD;;EAEE,gBAAA;CDzKD;ACgLD;;EAEE,UAAA;EACA,WAAA;CD9KD;ACsLD;EACE,oBAAA;CDpLD;AC+LD;;EAEE,+BAAA;KAAA,4BAAA;UAAA,uBAAA;EACA,WAAA;CD7LD;ACsMD;;EAEE,aAAA;CDpMD;AC4MD;EACE,8BAAA;EACA,gCAAA;KAAA,6BAAA;UAAA,wBAAA;CD1MD;ACmND;;EAEE,yBAAA;CDjND;ACwND;EACE,0BAAA;EACA,cAAA;EACA,+BAAA;CDtND;AC8ND;EACE,UAAA;EACA,WAAA;CD5ND;ACmOD;EACE,eAAA;CDjOD;ACyOD;EACE,kBAAA;CDvOD;ACiPD;EACE,0BAAA;EACA,kBAAA;CD/OD;ACkPD;;EAEE,WAAA;CDhPD;AACD,qFAAqF;AElFrF;EA7FI;;;IAGI,mCAAA;IACA,uBAAA;IACA,oCAAA;YAAA,4BAAA;IACA,6BAAA;GFkLL;EE/KC;;IAEI,2BAAA;GFiLL;EE9KC;IACI,6BAAA;GFgLL;EE7KC;IACI,8BAAA;GF+KL;EE1KC;;IAEI,YAAA;GF4KL;EEzKC;;IAEI,uBAAA;IACA,yBAAA;GF2KL;EExKC;IACI,4BAAA;GF0KL;EEvKC;;IAEI,yBAAA;GFyKL;EEtKC;IACI,2BAAA;GFwKL;EErKC;;;IAGI,WAAA;IACA,UAAA;GFuKL;EEpKC;;IAEI,wBAAA;GFsKL;EEhKC;IACI,cAAA;GFkKL;EEhKC;;IAGQ,kCAAA;GFiKT;EE9JC;IACI,uBAAA;GFgKL;EE7JC;IACI,qCAAA;GF+JL;EEhKC;;IAKQ,kCAAA;GF+JT;EE5JC;;IAGQ,kCAAA;GF6JT;CACF;AGnPD;EACE,oCAAA;EACA,sDAAA;EACA,gYAAA;CHqPD;AG7OD;EACE,mBAAA;EACA,SAAA;EACA,sBAAA;EACA,oCAAA;EACA,mBAAA;EACA,oBAAA;EACA,eAAA;EACA,oCAAA;EACA,mCAAA;CH+OD;AG3OmC;EAAW,iBAAA;CH8O9C;AG7OmC;EAAW,iBAAA;CHgP9C;AG9OmC;;EAAW,iBAAA;CHkP9C;AGjPmC;EAAW,iBAAA;CHoP9C;AGnPmC;EAAW,iBAAA;CHsP9C;AGrPmC;EAAW,iBAAA;CHwP9C;AGvPmC;EAAW,iBAAA;CH0P9C;AGzPmC;EAAW,iBAAA;CH4P9C;AG3PmC;EAAW,iBAAA;CH8P9C;AG7PmC;EAAW,iBAAA;CHgQ9C;AG/PmC;EAAW,iBAAA;CHkQ9C;AGjQmC;EAAW,iBAAA;CHoQ9C;AGnQmC;EAAW,iBAAA;CHsQ9C;AGrQmC;EAAW,iBAAA;CHwQ9C;AGvQmC;EAAW,iBAAA;CH0Q9C;AGzQmC;EAAW,iBAAA;CH4Q9C;AG3QmC;EAAW,iBAAA;CH8Q9C;AG7QmC;EAAW,iBAAA;CHgR9C;AG/QmC;EAAW,iBAAA;CHkR9C;AGjRmC;EAAW,iBAAA;CHoR9C;AGnRmC;EAAW,iBAAA;CHsR9C;AGrRmC;EAAW,iBAAA;CHwR9C;AGvRmC;EAAW,iBAAA;CH0R9C;AGzRmC;EAAW,iBAAA;CH4R9C;AG3RmC;EAAW,iBAAA;CH8R9C;AG7RmC;EAAW,iBAAA;CHgS9C;AG/RmC;EAAW,iBAAA;CHkS9C;AGjSmC;EAAW,iBAAA;CHoS9C;AGnSmC;EAAW,iBAAA;CHsS9C;AGrSmC;EAAW,iBAAA;CHwS9C;AGvSmC;EAAW,iBAAA;CH0S9C;AGzSmC;EAAW,iBAAA;CH4S9C;AG3SmC;EAAW,iBAAA;CH8S9C;AG7SmC;EAAW,iBAAA;CHgT9C;AG/SmC;EAAW,iBAAA;CHkT9C;AGjTmC;EAAW,iBAAA;CHoT9C;AGnTmC;EAAW,iBAAA;CHsT9C;AGrTmC;EAAW,iBAAA;CHwT9C;AGvTmC;EAAW,iBAAA;CH0T9C;AGzTmC;EAAW,iBAAA;CH4T9C;AG3TmC;EAAW,iBAAA;CH8T9C;AG7TmC;EAAW,iBAAA;CHgU9C;AG/TmC;EAAW,iBAAA;CHkU9C;AGjUmC;EAAW,iBAAA;CHoU9C;AGnUmC;EAAW,iBAAA;CHsU9C;AGrUmC;EAAW,iBAAA;CHwU9C;AGvUmC;EAAW,iBAAA;CH0U9C;AGzUmC;EAAW,iBAAA;CH4U9C;AG3UmC;EAAW,iBAAA;CH8U9C;AG7UmC;EAAW,iBAAA;CHgV9C;AG/UmC;EAAW,iBAAA;CHkV9C;AGjVmC;EAAW,iBAAA;CHoV9C;AGnVmC;EAAW,iBAAA;CHsV9C;AGrVmC;EAAW,iBAAA;CHwV9C;AGvVmC;EAAW,iBAAA;CH0V9C;AGzVmC;EAAW,iBAAA;CH4V9C;AG3VmC;EAAW,iBAAA;CH8V9C;AG7VmC;EAAW,iBAAA;CHgW9C;AG/VmC;EAAW,iBAAA;CHkW9C;AGjWmC;EAAW,iBAAA;CHoW9C;AGnWmC;EAAW,iBAAA;CHsW9C;AGrWmC;EAAW,iBAAA;CHwW9C;AGvWmC;EAAW,iBAAA;CH0W9C;AGzWmC;EAAW,iBAAA;CH4W9C;AG3WmC;EAAW,iBAAA;CH8W9C;AG7WmC;EAAW,iBAAA;CHgX9C;AG/WmC;EAAW,iBAAA;CHkX9C;AGjXmC;EAAW,iBAAA;CHoX9C;AGnXmC;EAAW,iBAAA;CHsX9C;AGrXmC;EAAW,iBAAA;CHwX9C;AGvXmC;EAAW,iBAAA;CH0X9C;AGzXmC;EAAW,iBAAA;CH4X9C;AG3XmC;EAAW,iBAAA;CH8X9C;AG7XmC;EAAW,iBAAA;CHgY9C;AG/XmC;EAAW,iBAAA;CHkY9C;AGjYmC;EAAW,iBAAA;CHoY9C;AGnYmC;EAAW,iBAAA;CHsY9C;AGrYmC;EAAW,iBAAA;CHwY9C;AGvYmC;EAAW,iBAAA;CH0Y9C;AGzYmC;EAAW,iBAAA;CH4Y9C;AG3YmC;EAAW,iBAAA;CH8Y9C;AG7YmC;EAAW,iBAAA;CHgZ9C;AG/YmC;EAAW,iBAAA;CHkZ9C;AGjZmC;EAAW,iBAAA;CHoZ9C;AGnZmC;EAAW,iBAAA;CHsZ9C;AGrZmC;EAAW,iBAAA;CHwZ9C;AGvZmC;EAAW,iBAAA;CH0Z9C;AGzZmC;EAAW,iBAAA;CH4Z9C;AG3ZmC;EAAW,iBAAA;CH8Z9C;AG7ZmC;EAAW,iBAAA;CHga9C;AG/ZmC;EAAW,iBAAA;CHka9C;AGjamC;EAAW,iBAAA;CHoa9C;AGnamC;EAAW,iBAAA;CHsa9C;AGramC;EAAW,iBAAA;CHwa9C;AGvamC;EAAW,iBAAA;CH0a9C;AGzamC;EAAW,iBAAA;CH4a9C;AG3amC;EAAW,iBAAA;CH8a9C;AG7amC;EAAW,iBAAA;CHgb9C;AG/amC;EAAW,iBAAA;CHkb9C;AGjbmC;EAAW,iBAAA;CHob9C;AGnbmC;EAAW,iBAAA;CHsb9C;AGrbmC;EAAW,iBAAA;CHwb9C;AGvbmC;EAAW,iBAAA;CH0b9C;AGzbmC;EAAW,iBAAA;CH4b9C;AG3bmC;EAAW,iBAAA;CH8b9C;AG7bmC;EAAW,iBAAA;CHgc9C;AG/bmC;EAAW,iBAAA;CHkc9C;AGjcmC;EAAW,iBAAA;CHoc9C;AGncmC;EAAW,iBAAA;CHsc9C;AGrcmC;EAAW,iBAAA;CHwc9C;AGvcmC;EAAW,iBAAA;CH0c9C;AGzcmC;EAAW,iBAAA;CH4c9C;AG3cmC;EAAW,iBAAA;CH8c9C;AG7cmC;EAAW,iBAAA;CHgd9C;AG/cmC;EAAW,iBAAA;CHkd9C;AGjdmC;EAAW,iBAAA;CHod9C;AGndmC;EAAW,iBAAA;CHsd9C;AGrdmC;EAAW,iBAAA;CHwd9C;AGvdmC;EAAW,iBAAA;CH0d9C;AGzdmC;EAAW,iBAAA;CH4d9C;AG3dmC;EAAW,iBAAA;CH8d9C;AG7dmC;EAAW,iBAAA;CHge9C;AG/dmC;EAAW,iBAAA;CHke9C;AGjemC;EAAW,iBAAA;CHoe9C;AGnemC;EAAW,iBAAA;CHse9C;AGremC;EAAW,iBAAA;CHwe9C;AGvemC;EAAW,iBAAA;CH0e9C;AGzemC;EAAW,iBAAA;CH4e9C;AG3emC;EAAW,iBAAA;CH8e9C;AG7emC;EAAW,iBAAA;CHgf9C;AG/emC;EAAW,iBAAA;CHkf9C;AGjfmC;EAAW,iBAAA;CHof9C;AGnfmC;EAAW,iBAAA;CHsf9C;AGrfmC;EAAW,iBAAA;CHwf9C;AGvfmC;EAAW,iBAAA;CH0f9C;AGzfmC;EAAW,iBAAA;CH4f9C;AG3fmC;EAAW,iBAAA;CH8f9C;AG7fmC;EAAW,iBAAA;CHggB9C;AG/fmC;EAAW,iBAAA;CHkgB9C;AGjgBmC;EAAW,iBAAA;CHogB9C;AGngBmC;EAAW,iBAAA;CHsgB9C;AGrgBmC;EAAW,iBAAA;CHwgB9C;AGvgBmC;EAAW,iBAAA;CH0gB9C;AGzgBmC;EAAW,iBAAA;CH4gB9C;AG3gBmC;EAAW,iBAAA;CH8gB9C;AG7gBmC;EAAW,iBAAA;CHghB9C;AG/gBmC;EAAW,iBAAA;CHkhB9C;AGjhBmC;EAAW,iBAAA;CHohB9C;AGnhBmC;EAAW,iBAAA;CHshB9C;AGrhBmC;EAAW,iBAAA;CHwhB9C;AGvhBmC;EAAW,iBAAA;CH0hB9C;AGzhBmC;EAAW,iBAAA;CH4hB9C;AG3hBmC;EAAW,iBAAA;CH8hB9C;AG7hBmC;EAAW,iBAAA;CHgiB9C;AG/hBmC;EAAW,iBAAA;CHkiB9C;AGjiBmC;EAAW,iBAAA;CHoiB9C;AGniBmC;EAAW,iBAAA;CHsiB9C;AGriBmC;EAAW,iBAAA;CHwiB9C;AGviBmC;EAAW,iBAAA;CH0iB9C;AGziBmC;EAAW,iBAAA;CH4iB9C;AG3iBmC;EAAW,iBAAA;CH8iB9C;AG7iBmC;EAAW,iBAAA;CHgjB9C;AG/iBmC;EAAW,iBAAA;CHkjB9C;AGjjBmC;EAAW,iBAAA;CHojB9C;AGnjBmC;EAAW,iBAAA;CHsjB9C;AGrjBmC;EAAW,iBAAA;CHwjB9C;AGvjBmC;EAAW,iBAAA;CH0jB9C;AGzjBmC;EAAW,iBAAA;CH4jB9C;AG3jBmC;EAAW,iBAAA;CH8jB9C;AG7jBmC;EAAW,iBAAA;CHgkB9C;AG/jBmC;EAAW,iBAAA;CHkkB9C;AGjkBmC;EAAW,iBAAA;CHokB9C;AGnkBmC;EAAW,iBAAA;CHskB9C;AGrkBmC;EAAW,iBAAA;CHwkB9C;AGvkBmC;EAAW,iBAAA;CH0kB9C;AGzkBmC;EAAW,iBAAA;CH4kB9C;AG3kBmC;EAAW,iBAAA;CH8kB9C;AG7kBmC;EAAW,iBAAA;CHglB9C;AG/kBmC;EAAW,iBAAA;CHklB9C;AGjlBmC;EAAW,iBAAA;CHolB9C;AGnlBmC;EAAW,iBAAA;CHslB9C;AGrlBmC;EAAW,iBAAA;CHwlB9C;AGvlBmC;EAAW,iBAAA;CH0lB9C;AGzlBmC;EAAW,iBAAA;CH4lB9C;AG3lBmC;EAAW,iBAAA;CH8lB9C;AG7lBmC;EAAW,iBAAA;CHgmB9C;AG/lBmC;EAAW,iBAAA;CHkmB9C;AGjmBmC;EAAW,iBAAA;CHomB9C;AGnmBmC;EAAW,iBAAA;CHsmB9C;AGrmBmC;EAAW,iBAAA;CHwmB9C;AGvmBmC;EAAW,iBAAA;CH0mB9C;AGzmBmC;EAAW,iBAAA;CH4mB9C;AG3mBmC;EAAW,iBAAA;CH8mB9C;AG7mBmC;EAAW,iBAAA;CHgnB9C;AG/mBmC;EAAW,iBAAA;CHknB9C;AGjnBmC;EAAW,iBAAA;CHonB9C;AGnnBmC;EAAW,iBAAA;CHsnB9C;AGrnBmC;EAAW,iBAAA;CHwnB9C;AGvnBmC;EAAW,iBAAA;CH0nB9C;AGznBmC;EAAW,iBAAA;CH4nB9C;AG3nBmC;EAAW,iBAAA;CH8nB9C;AG7nBmC;EAAW,iBAAA;CHgoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AGvoBmC;EAAW,iBAAA;CH0oB9C;AGzoBmC;EAAW,iBAAA;CH4oB9C;AG3oBmC;EAAW,iBAAA;CH8oB9C;AG7oBmC;EAAW,iBAAA;CHgpB9C;AG/oBmC;EAAW,iBAAA;CHkpB9C;AGjpBmC;EAAW,iBAAA;CHopB9C;AGnpBmC;EAAW,iBAAA;CHspB9C;AGrpBmC;EAAW,iBAAA;CHwpB9C;AGvpBmC;EAAW,iBAAA;CH0pB9C;AGzpBmC;EAAW,iBAAA;CH4pB9C;AG3pBmC;EAAW,iBAAA;CH8pB9C;AG7pBmC;EAAW,iBAAA;CHgqB9C;AG/pBmC;EAAW,iBAAA;CHkqB9C;AGjqBmC;EAAW,iBAAA;CHoqB9C;AGnqBmC;EAAW,iBAAA;CHsqB9C;AGrqBmC;EAAW,iBAAA;CHwqB9C;AGvqBmC;EAAW,iBAAA;CH0qB9C;AGzqBmC;EAAW,iBAAA;CH4qB9C;AG3qBmC;EAAW,iBAAA;CH8qB9C;AG7qBmC;EAAW,iBAAA;CHgrB9C;AG/qBmC;EAAW,iBAAA;CHkrB9C;AGjrBmC;EAAW,iBAAA;CHorB9C;AGnrBmC;EAAW,iBAAA;CHsrB9C;AGrrBmC;EAAW,iBAAA;CHwrB9C;AGvrBmC;EAAW,iBAAA;CH0rB9C;AGzrBmC;EAAW,iBAAA;CH4rB9C;AG3rBmC;EAAW,iBAAA;CH8rB9C;AG7rBmC;EAAW,iBAAA;CHgsB9C;AG/rBmC;EAAW,iBAAA;CHksB9C;AGjsBmC;EAAW,iBAAA;CHosB9C;AGnsBmC;EAAW,iBAAA;CHssB9C;AGrsBmC;EAAW,iBAAA;CHwsB9C;AGvsBmC;EAAW,iBAAA;CH0sB9C;AGzsBmC;EAAW,iBAAA;CH4sB9C;AG3sBmC;EAAW,iBAAA;CH8sB9C;AG7sBmC;EAAW,iBAAA;CHgtB9C;AG/sBmC;EAAW,iBAAA;CHktB9C;AGjtBmC;EAAW,iBAAA;CHotB9C;AGntBmC;EAAW,iBAAA;CHstB9C;AGrtBmC;EAAW,iBAAA;CHwtB9C;AGvtBmC;EAAW,iBAAA;CH0tB9C;AGztBmC;EAAW,iBAAA;CH4tB9C;AG3tBmC;EAAW,iBAAA;CH8tB9C;AG7tBmC;EAAW,iBAAA;CHguB9C;AG/tBmC;EAAW,iBAAA;CHkuB9C;AGjuBmC;EAAW,iBAAA;CHouB9C;AGnuBmC;EAAW,iBAAA;CHsuB9C;AGruBmC;EAAW,iBAAA;CHwuB9C;AGvuBmC;EAAW,iBAAA;CH0uB9C;AGzuBmC;EAAW,iBAAA;CH4uB9C;AG3uBmC;EAAW,iBAAA;CH8uB9C;AG7uBmC;EAAW,iBAAA;CHgvB9C;AIthCD;ECgEE,+BAAA;EACG,4BAAA;EACK,uBAAA;CLy9BT;AIxhCD;;EC6DE,+BAAA;EACG,4BAAA;EACK,uBAAA;CL+9BT;AIthCD;EACE,gBAAA;EACA,8CAAA;CJwhCD;AIrhCD;EACE,4DAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;CJuhCD;AInhCD;;;;EAIE,qBAAA;EACA,mBAAA;EACA,qBAAA;CJqhCD;AI/gCD;EACE,eAAA;EACA,sBAAA;CJihCD;AI/gCC;;EAEE,eAAA;EACA,2BAAA;CJihCH;AI9gCC;EEnDA,2CAAA;EACA,qBAAA;CNokCD;AIvgCD;EACE,UAAA;CJygCD;AIngCD;EACE,uBAAA;CJqgCD;AIjgCD;;;;;EGvEE,eAAA;EACA,gBAAA;EACA,aAAA;CP+kCD;AIrgCD;EACE,mBAAA;CJugCD;AIjgCD;EACE,aAAA;EACA,wBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;EC6FA,yCAAA;EACK,oCAAA;EACG,iCAAA;EEvLR,sBAAA;EACA,gBAAA;EACA,aAAA;CP+lCD;AIjgCD;EACE,mBAAA;CJmgCD;AI7/BD;EACE,iBAAA;EACA,oBAAA;EACA,UAAA;EACA,8BAAA;CJ+/BD;AIv/BD;EACE,mBAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,iBAAA;EACA,uBAAA;EACA,UAAA;CJy/BD;AIj/BC;;EAEE,iBAAA;EACA,YAAA;EACA,aAAA;EACA,UAAA;EACA,kBAAA;EACA,WAAA;CJm/BH;AIx+BD;EACE,gBAAA;CJ0+BD;AQjoCD;;;;;;;;;;;;EAEE,qBAAA;EACA,iBAAA;EACA,iBAAA;EACA,eAAA;CR6oCD;AQlpCD;;;;;;;;;;;;;;;;;;;;;;;;EASI,oBAAA;EACA,eAAA;EACA,eAAA;CRmqCH;AQ/pCD;;;;;;EAGE,iBAAA;EACA,oBAAA;CRoqCD;AQxqCD;;;;;;;;;;;;EAQI,eAAA;CR8qCH;AQ3qCD;;;;;;EAGE,iBAAA;EACA,oBAAA;CRgrCD;AQprCD;;;;;;;;;;;;EAQI,eAAA;CR0rCH;AQtrCD;;EAAU,gBAAA;CR0rCT;AQzrCD;;EAAU,gBAAA;CR6rCT;AQ5rCD;;EAAU,gBAAA;CRgsCT;AQ/rCD;;EAAU,gBAAA;CRmsCT;AQlsCD;;EAAU,gBAAA;CRssCT;AQrsCD;;EAAU,gBAAA;CRysCT;AQnsCD;EACE,iBAAA;CRqsCD;AQlsCD;EACE,oBAAA;EACA,gBAAA;EACA,iBAAA;EACA,iBAAA;CRosCD;AQ/rCD;EAwOA;IA1OI,gBAAA;GRqsCD;CACF;AQ7rCD;;EAEE,eAAA;CR+rCD;AQ5rCD;;EAEE,0BAAA;EACA,cAAA;CR8rCD;AQ1rCD;EAAuB,iBAAA;CR6rCtB;AQ5rCD;EAAuB,kBAAA;CR+rCtB;AQ9rCD;EAAuB,mBAAA;CRisCtB;AQhsCD;EAAuB,oBAAA;CRmsCtB;AQlsCD;EAAuB,oBAAA;CRqsCtB;AQlsCD;EAAuB,0BAAA;CRqsCtB;AQpsCD;EAAuB,0BAAA;CRusCtB;AQtsCD;EAAuB,2BAAA;CRysCtB;AQtsCD;EACE,eAAA;CRwsCD;AQtsCD;ECrGE,eAAA;CT8yCD;AS7yCC;;EAEE,eAAA;CT+yCH;AQ1sCD;ECxGE,eAAA;CTqzCD;ASpzCC;;EAEE,eAAA;CTszCH;AQ9sCD;EC3GE,eAAA;CT4zCD;AS3zCC;;EAEE,eAAA;CT6zCH;AQltCD;EC9GE,eAAA;CTm0CD;ASl0CC;;EAEE,eAAA;CTo0CH;AQttCD;ECjHE,eAAA;CT00CD;ASz0CC;;EAEE,eAAA;CT20CH;AQttCD;EAGE,YAAA;EE3HA,0BAAA;CVk1CD;AUj1CC;;EAEE,0BAAA;CVm1CH;AQxtCD;EE9HE,0BAAA;CVy1CD;AUx1CC;;EAEE,0BAAA;CV01CH;AQ5tCD;EEjIE,0BAAA;CVg2CD;AU/1CC;;EAEE,0BAAA;CVi2CH;AQhuCD;EEpIE,0BAAA;CVu2CD;AUt2CC;;EAEE,0BAAA;CVw2CH;AQpuCD;EEvIE,0BAAA;CV82CD;AU72CC;;EAEE,0BAAA;CV+2CH;AQnuCD;EACE,oBAAA;EACA,oBAAA;EACA,iCAAA;CRquCD;AQ7tCD;;EAEE,cAAA;EACA,oBAAA;CR+tCD;AQluCD;;;;EAMI,iBAAA;CRkuCH;AQ3tCD;EACE,gBAAA;EACA,iBAAA;CR6tCD;AQztCD;EALE,gBAAA;EACA,iBAAA;EAMA,kBAAA;CR4tCD;AQ9tCD;EAKI,sBAAA;EACA,kBAAA;EACA,mBAAA;CR4tCH;AQvtCD;EACE,cAAA;EACA,oBAAA;CRytCD;AQvtCD;;EAEE,wBAAA;CRytCD;AQvtCD;EACE,kBAAA;CRytCD;AQvtCD;EACE,eAAA;CRytCD;AQhsCD;EA6EA;IAvFM,YAAA;IACA,aAAA;IACA,YAAA;IACA,kBAAA;IGtNJ,iBAAA;IACA,wBAAA;IACA,oBAAA;GXq6CC;EQ7nCH;IAhFM,mBAAA;GRgtCH;CACF;AQvsCD;;EAGE,aAAA;EACA,kCAAA;CRwsCD;AQtsCD;EACE,eAAA;EA9IqB,0BAAA;CRu1CtB;AQpsCD;EACE,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,+BAAA;CRssCD;AQjsCG;;;EACE,iBAAA;CRqsCL;AQ/sCD;;;EAmBI,eAAA;EACA,eAAA;EACA,wBAAA;EACA,eAAA;CRisCH;AQ/rCG;;;EACE,uBAAA;CRmsCL;AQ3rCD;;EAEE,oBAAA;EACA,gBAAA;EACA,gCAAA;EACA,eAAA;EACA,kBAAA;CR6rCD;AQvrCG;;;;;;EAAW,YAAA;CR+rCd;AQ9rCG;;;;;;EACE,uBAAA;CRqsCL;AQ/rCD;EACE,oBAAA;EACA,mBAAA;EACA,wBAAA;CRisCD;AYv+CD;;;;EAIE,+DAAA;CZy+CD;AYr+CD;EACE,iBAAA;EACA,eAAA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;CZu+CD;AYn+CD;EACE,iBAAA;EACA,eAAA;EACA,YAAA;EACA,uBAAA;EACA,mBAAA;EACA,uDAAA;UAAA,+CAAA;CZq+CD;AY3+CD;EASI,WAAA;EACA,gBAAA;EACA,kBAAA;EACA,yBAAA;UAAA,iBAAA;CZq+CH;AYh+CD;EACE,eAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,sBAAA;EACA,sBAAA;EACA,eAAA;EACA,0BAAA;EACA,uBAAA;EACA,mBAAA;CZk+CD;AY7+CD;EAeI,WAAA;EACA,mBAAA;EACA,eAAA;EACA,sBAAA;EACA,8BAAA;EACA,iBAAA;CZi+CH;AY59CD;EACE,kBAAA;EACA,mBAAA;CZ89CD;AaxhDD;ECHE,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;Cd8hDD;AaxhDC;EAqEF;IAvEI,aAAA;Gb8hDD;CACF;Aa1hDC;EAkEF;IApEI,aAAA;GbgiDD;CACF;Aa5hDD;EA+DA;IAjEI,cAAA;GbkiDD;CACF;AazhDD;ECvBE,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;CdmjDD;AathDD;ECvBE,mBAAA;EACA,oBAAA;CdgjDD;AehjDG;EACE,mBAAA;EAEA,gBAAA;EAEA,mBAAA;EACA,oBAAA;CfgjDL;AehiDG;EACE,YAAA;CfkiDL;Ae3hDC;EACE,YAAA;Cf6hDH;Ae9hDC;EACE,oBAAA;CfgiDH;AejiDC;EACE,oBAAA;CfmiDH;AepiDC;EACE,WAAA;CfsiDH;AeviDC;EACE,oBAAA;CfyiDH;Ae1iDC;EACE,oBAAA;Cf4iDH;Ae7iDC;EACE,WAAA;Cf+iDH;AehjDC;EACE,oBAAA;CfkjDH;AenjDC;EACE,oBAAA;CfqjDH;AetjDC;EACE,WAAA;CfwjDH;AezjDC;EACE,oBAAA;Cf2jDH;Ae5jDC;EACE,mBAAA;Cf8jDH;AehjDC;EACE,YAAA;CfkjDH;AenjDC;EACE,oBAAA;CfqjDH;AetjDC;EACE,oBAAA;CfwjDH;AezjDC;EACE,WAAA;Cf2jDH;Ae5jDC;EACE,oBAAA;Cf8jDH;Ae/jDC;EACE,oBAAA;CfikDH;AelkDC;EACE,WAAA;CfokDH;AerkDC;EACE,oBAAA;CfukDH;AexkDC;EACE,oBAAA;Cf0kDH;Ae3kDC;EACE,WAAA;Cf6kDH;Ae9kDC;EACE,oBAAA;CfglDH;AejlDC;EACE,mBAAA;CfmlDH;Ae/kDC;EACE,YAAA;CfilDH;AejmDC;EACE,WAAA;CfmmDH;AepmDC;EACE,mBAAA;CfsmDH;AevmDC;EACE,mBAAA;CfymDH;Ae1mDC;EACE,UAAA;Cf4mDH;Ae7mDC;EACE,mBAAA;Cf+mDH;AehnDC;EACE,mBAAA;CfknDH;AennDC;EACE,UAAA;CfqnDH;AetnDC;EACE,mBAAA;CfwnDH;AeznDC;EACE,mBAAA;Cf2nDH;Ae5nDC;EACE,UAAA;Cf8nDH;Ae/nDC;EACE,mBAAA;CfioDH;AeloDC;EACE,kBAAA;CfooDH;AehoDC;EACE,WAAA;CfkoDH;AepnDC;EACE,kBAAA;CfsnDH;AevnDC;EACE,0BAAA;CfynDH;Ae1nDC;EACE,0BAAA;Cf4nDH;Ae7nDC;EACE,iBAAA;Cf+nDH;AehoDC;EACE,0BAAA;CfkoDH;AenoDC;EACE,0BAAA;CfqoDH;AetoDC;EACE,iBAAA;CfwoDH;AezoDC;EACE,0BAAA;Cf2oDH;Ae5oDC;EACE,0BAAA;Cf8oDH;Ae/oDC;EACE,iBAAA;CfipDH;AelpDC;EACE,0BAAA;CfopDH;AerpDC;EACE,yBAAA;CfupDH;AexpDC;EACE,gBAAA;Cf0pDH;Aa1pDD;EElCI;IACE,YAAA;Gf+rDH;EexrDD;IACE,YAAA;Gf0rDD;Ee3rDD;IACE,oBAAA;Gf6rDD;Ee9rDD;IACE,oBAAA;GfgsDD;EejsDD;IACE,WAAA;GfmsDD;EepsDD;IACE,oBAAA;GfssDD;EevsDD;IACE,oBAAA;GfysDD;Ee1sDD;IACE,WAAA;Gf4sDD;Ee7sDD;IACE,oBAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,WAAA;GfqtDD;EettDD;IACE,oBAAA;GfwtDD;EeztDD;IACE,mBAAA;Gf2tDD;Ee7sDD;IACE,YAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,oBAAA;GfqtDD;EettDD;IACE,WAAA;GfwtDD;EeztDD;IACE,oBAAA;Gf2tDD;Ee5tDD;IACE,oBAAA;Gf8tDD;Ee/tDD;IACE,WAAA;GfiuDD;EeluDD;IACE,oBAAA;GfouDD;EeruDD;IACE,oBAAA;GfuuDD;EexuDD;IACE,WAAA;Gf0uDD;Ee3uDD;IACE,oBAAA;Gf6uDD;Ee9uDD;IACE,mBAAA;GfgvDD;Ee5uDD;IACE,YAAA;Gf8uDD;Ee9vDD;IACE,WAAA;GfgwDD;EejwDD;IACE,mBAAA;GfmwDD;EepwDD;IACE,mBAAA;GfswDD;EevwDD;IACE,UAAA;GfywDD;Ee1wDD;IACE,mBAAA;Gf4wDD;Ee7wDD;IACE,mBAAA;Gf+wDD;EehxDD;IACE,UAAA;GfkxDD;EenxDD;IACE,mBAAA;GfqxDD;EetxDD;IACE,mBAAA;GfwxDD;EezxDD;IACE,UAAA;Gf2xDD;Ee5xDD;IACE,mBAAA;Gf8xDD;Ee/xDD;IACE,kBAAA;GfiyDD;Ee7xDD;IACE,WAAA;Gf+xDD;EejxDD;IACE,kBAAA;GfmxDD;EepxDD;IACE,0BAAA;GfsxDD;EevxDD;IACE,0BAAA;GfyxDD;Ee1xDD;IACE,iBAAA;Gf4xDD;Ee7xDD;IACE,0BAAA;Gf+xDD;EehyDD;IACE,0BAAA;GfkyDD;EenyDD;IACE,iBAAA;GfqyDD;EetyDD;IACE,0BAAA;GfwyDD;EezyDD;IACE,0BAAA;Gf2yDD;Ee5yDD;IACE,iBAAA;Gf8yDD;Ee/yDD;IACE,0BAAA;GfizDD;EelzDD;IACE,yBAAA;GfozDD;EerzDD;IACE,gBAAA;GfuzDD;CACF;Aa/yDD;EE3CI;IACE,YAAA;Gf61DH;Eet1DD;IACE,YAAA;Gfw1DD;Eez1DD;IACE,oBAAA;Gf21DD;Ee51DD;IACE,oBAAA;Gf81DD;Ee/1DD;IACE,WAAA;Gfi2DD;Eel2DD;IACE,oBAAA;Gfo2DD;Eer2DD;IACE,oBAAA;Gfu2DD;Eex2DD;IACE,WAAA;Gf02DD;Ee32DD;IACE,oBAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,WAAA;Gfm3DD;Eep3DD;IACE,oBAAA;Gfs3DD;Eev3DD;IACE,mBAAA;Gfy3DD;Ee32DD;IACE,YAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,oBAAA;Gfm3DD;Eep3DD;IACE,WAAA;Gfs3DD;Eev3DD;IACE,oBAAA;Gfy3DD;Ee13DD;IACE,oBAAA;Gf43DD;Ee73DD;IACE,WAAA;Gf+3DD;Eeh4DD;IACE,oBAAA;Gfk4DD;Een4DD;IACE,oBAAA;Gfq4DD;Eet4DD;IACE,WAAA;Gfw4DD;Eez4DD;IACE,oBAAA;Gf24DD;Ee54DD;IACE,mBAAA;Gf84DD;Ee14DD;IACE,YAAA;Gf44DD;Ee55DD;IACE,WAAA;Gf85DD;Ee/5DD;IACE,mBAAA;Gfi6DD;Eel6DD;IACE,mBAAA;Gfo6DD;Eer6DD;IACE,UAAA;Gfu6DD;Eex6DD;IACE,mBAAA;Gf06DD;Ee36DD;IACE,mBAAA;Gf66DD;Ee96DD;IACE,UAAA;Gfg7DD;Eej7DD;IACE,mBAAA;Gfm7DD;Eep7DD;IACE,mBAAA;Gfs7DD;Eev7DD;IACE,UAAA;Gfy7DD;Ee17DD;IACE,mBAAA;Gf47DD;Ee77DD;IACE,kBAAA;Gf+7DD;Ee37DD;IACE,WAAA;Gf67DD;Ee/6DD;IACE,kBAAA;Gfi7DD;Eel7DD;IACE,0BAAA;Gfo7DD;Eer7DD;IACE,0BAAA;Gfu7DD;Eex7DD;IACE,iBAAA;Gf07DD;Ee37DD;IACE,0BAAA;Gf67DD;Ee97DD;IACE,0BAAA;Gfg8DD;Eej8DD;IACE,iBAAA;Gfm8DD;Eep8DD;IACE,0BAAA;Gfs8DD;Eev8DD;IACE,0BAAA;Gfy8DD;Ee18DD;IACE,iBAAA;Gf48DD;Ee78DD;IACE,0BAAA;Gf+8DD;Eeh9DD;IACE,yBAAA;Gfk9DD;Een9DD;IACE,gBAAA;Gfq9DD;CACF;Aa18DD;EE9CI;IACE,YAAA;Gf2/DH;Eep/DD;IACE,YAAA;Gfs/DD;Eev/DD;IACE,oBAAA;Gfy/DD;Ee1/DD;IACE,oBAAA;Gf4/DD;Ee7/DD;IACE,WAAA;Gf+/DD;EehgED;IACE,oBAAA;GfkgED;EengED;IACE,oBAAA;GfqgED;EetgED;IACE,WAAA;GfwgED;EezgED;IACE,oBAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,WAAA;GfihED;EelhED;IACE,oBAAA;GfohED;EerhED;IACE,mBAAA;GfuhED;EezgED;IACE,YAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,oBAAA;GfihED;EelhED;IACE,WAAA;GfohED;EerhED;IACE,oBAAA;GfuhED;EexhED;IACE,oBAAA;Gf0hED;Ee3hED;IACE,WAAA;Gf6hED;Ee9hED;IACE,oBAAA;GfgiED;EejiED;IACE,oBAAA;GfmiED;EepiED;IACE,WAAA;GfsiED;EeviED;IACE,oBAAA;GfyiED;Ee1iED;IACE,mBAAA;Gf4iED;EexiED;IACE,YAAA;Gf0iED;Ee1jED;IACE,WAAA;Gf4jED;Ee7jED;IACE,mBAAA;Gf+jED;EehkED;IACE,mBAAA;GfkkED;EenkED;IACE,UAAA;GfqkED;EetkED;IACE,mBAAA;GfwkED;EezkED;IACE,mBAAA;Gf2kED;Ee5kED;IACE,UAAA;Gf8kED;Ee/kED;IACE,mBAAA;GfilED;EellED;IACE,mBAAA;GfolED;EerlED;IACE,UAAA;GfulED;EexlED;IACE,mBAAA;Gf0lED;Ee3lED;IACE,kBAAA;Gf6lED;EezlED;IACE,WAAA;Gf2lED;Ee7kED;IACE,kBAAA;Gf+kED;EehlED;IACE,0BAAA;GfklED;EenlED;IACE,0BAAA;GfqlED;EetlED;IACE,iBAAA;GfwlED;EezlED;IACE,0BAAA;Gf2lED;Ee5lED;IACE,0BAAA;Gf8lED;Ee/lED;IACE,iBAAA;GfimED;EelmED;IACE,0BAAA;GfomED;EermED;IACE,0BAAA;GfumED;EexmED;IACE,iBAAA;Gf0mED;Ee3mED;IACE,0BAAA;Gf6mED;Ee9mED;IACE,yBAAA;GfgnED;EejnED;IACE,gBAAA;GfmnED;CACF;AgBvrED;EACE,8BAAA;ChByrED;AgBvrED;EACE,iBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;ChByrED;AgBvrED;EACE,iBAAA;ChByrED;AgBnrED;EACE,YAAA;EACA,gBAAA;EACA,oBAAA;ChBqrED;AgBxrED;;;;;;EAWQ,aAAA;EACA,wBAAA;EACA,oBAAA;EACA,2BAAA;ChBqrEP;AgBnsED;EAoBI,uBAAA;EACA,8BAAA;ChBkrEH;AgBvsED;;;;;;EA8BQ,cAAA;ChBirEP;AgB/sED;EAoCI,2BAAA;ChB8qEH;AgBltED;EAyCI,uBAAA;ChB4qEH;AgBrqED;;;;;;EAOQ,aAAA;ChBsqEP;AgB3pED;EACE,uBAAA;ChB6pED;AgB9pED;;;;;;EAQQ,uBAAA;ChB8pEP;AgBtqED;;EAeM,yBAAA;ChB2pEL;AgBjpED;EAEI,0BAAA;ChBkpEH;AgBzoED;EAEI,0BAAA;ChB0oEH;AgBjoED;EACE,iBAAA;EACA,YAAA;EACA,sBAAA;ChBmoED;AgB9nEG;;EACE,iBAAA;EACA,YAAA;EACA,oBAAA;ChBioEL;AiB7wEC;;;;;;;;;;;;EAOI,0BAAA;CjBoxEL;AiB9wEC;;;;;EAMI,0BAAA;CjB+wEL;AiBlyEC;;;;;;;;;;;;EAOI,0BAAA;CjByyEL;AiBnyEC;;;;;EAMI,0BAAA;CjBoyEL;AiBvzEC;;;;;;;;;;;;EAOI,0BAAA;CjB8zEL;AiBxzEC;;;;;EAMI,0BAAA;CjByzEL;AiB50EC;;;;;;;;;;;;EAOI,0BAAA;CjBm1EL;AiB70EC;;;;;EAMI,0BAAA;CjB80EL;AiBj2EC;;;;;;;;;;;;EAOI,0BAAA;CjBw2EL;AiBl2EC;;;;;EAMI,0BAAA;CjBm2EL;AgBjtED;EACE,iBAAA;EACA,kBAAA;ChBmtED;AgBtpED;EACA;IA3DI,YAAA;IACA,oBAAA;IACA,mBAAA;IACA,6CAAA;IACA,uBAAA;GhBotED;EgB7pEH;IAnDM,iBAAA;GhBmtEH;EgBhqEH;;;;;;IA1CY,oBAAA;GhBktET;EgBxqEH;IAlCM,UAAA;GhB6sEH;EgB3qEH;;;;;;IAzBY,eAAA;GhB4sET;EgBnrEH;;;;;;IArBY,gBAAA;GhBgtET;EgB3rEH;;;;IARY,iBAAA;GhBysET;CACF;AkBn6ED;EACE,WAAA;EACA,UAAA;EACA,UAAA;EAIA,aAAA;ClBk6ED;AkB/5ED;EACE,eAAA;EACA,YAAA;EACA,WAAA;EACA,oBAAA;EACA,gBAAA;EACA,qBAAA;EACA,eAAA;EACA,UAAA;EACA,iCAAA;ClBi6ED;AkB95ED;EACE,sBAAA;EACA,gBAAA;EACA,mBAAA;EACA,kBAAA;ClBg6ED;AkBr5ED;Eb4BE,+BAAA;EACG,4BAAA;EACK,uBAAA;CL43ET;AkBr5ED;;EAEE,gBAAA;EACA,mBAAA;EACA,oBAAA;ClBu5ED;AkBp5ED;EACE,eAAA;ClBs5ED;AkBl5ED;EACE,eAAA;EACA,YAAA;ClBo5ED;AkBh5ED;;EAEE,aAAA;ClBk5ED;AkB94ED;;;EZrEE,2CAAA;EACA,qBAAA;CNw9ED;AkB74ED;EACE,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;ClB+4ED;AkBr3ED;EACE,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;EbxDA,yDAAA;EACQ,iDAAA;EAyHR,uFAAA;EACK,0EAAA;EACG,uEAAA;CLwzET;AmBh8EC;EACE,sBAAA;EACA,WAAA;EdUF,uFAAA;EACQ,+EAAA;CLy7ET;AKx5EC;EACE,YAAA;EACA,WAAA;CL05EH;AKx5EC;EAA0B,YAAA;CL25E3B;AK15EC;EAAgC,YAAA;CL65EjC;AkBj4EC;EACE,UAAA;EACA,8BAAA;ClBm4EH;AkB33EC;;;EAGE,0BAAA;EACA,WAAA;ClB63EH;AkB13EC;;EAEE,oBAAA;ClB43EH;AkBx3EC;EACE,aAAA;ClB03EH;AkB92ED;EACE,yBAAA;ClBg3ED;AkBx0ED;EAtBI;;;;IACE,kBAAA;GlBo2EH;EkBj2EC;;;;;;;;IAEE,kBAAA;GlBy2EH;EkBt2EC;;;;;;;;IAEE,kBAAA;GlB82EH;CACF;AkBp2ED;EACE,oBAAA;ClBs2ED;AkB91ED;;EAEE,mBAAA;EACA,eAAA;EACA,iBAAA;EACA,oBAAA;ClBg2ED;AkBr2ED;;EAQI,iBAAA;EACA,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,gBAAA;ClBi2EH;AkB91ED;;;;EAIE,mBAAA;EACA,mBAAA;EACA,mBAAA;ClBg2ED;AkB71ED;;EAEE,iBAAA;ClB+1ED;AkB31ED;;EAEE,mBAAA;EACA,sBAAA;EACA,mBAAA;EACA,iBAAA;EACA,uBAAA;EACA,oBAAA;EACA,gBAAA;ClB61ED;AkB31ED;;EAEE,cAAA;EACA,kBAAA;ClB61ED;AkBp1EC;;;;;;EAGE,oBAAA;ClBy1EH;AkBn1EC;;;;EAEE,oBAAA;ClBu1EH;AkBj1EC;;;;EAGI,oBAAA;ClBo1EL;AkBz0ED;EAEE,iBAAA;EACA,oBAAA;EAEA,iBAAA;EACA,iBAAA;ClBy0ED;AkBv0EC;;EAEE,gBAAA;EACA,iBAAA;ClBy0EH;AkB5zED;ECnQE,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CnBkkFD;AmBhkFC;EACE,aAAA;EACA,kBAAA;CnBkkFH;AmB/jFC;;EAEE,aAAA;CnBikFH;AkBx0ED;EAEI,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;ClBy0EH;AkB/0ED;EASI,aAAA;EACA,kBAAA;ClBy0EH;AkBn1ED;;EAcI,aAAA;ClBy0EH;AkBv1ED;EAiBI,aAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;ClBy0EH;AkBr0ED;EC/RE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CnBumFD;AmBrmFC;EACE,aAAA;EACA,kBAAA;CnBumFH;AmBpmFC;;EAEE,aAAA;CnBsmFH;AkBj1ED;EAEI,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;ClBk1EH;AkBx1ED;EASI,aAAA;EACA,kBAAA;ClBk1EH;AkB51ED;;EAcI,aAAA;ClBk1EH;AkBh2ED;EAiBI,aAAA;EACA,iBAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;ClBk1EH;AkBz0ED;EAEE,mBAAA;ClB00ED;AkB50ED;EAMI,sBAAA;ClBy0EH;AkBr0ED;EACE,mBAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;EACA,qBAAA;ClBu0ED;AkBr0ED;;;EAGE,YAAA;EACA,aAAA;EACA,kBAAA;ClBu0ED;AkBr0ED;;;EAGE,YAAA;EACA,aAAA;EACA,kBAAA;ClBu0ED;AkBn0ED;;;;;;;;;;EC1ZI,eAAA;CnByuFH;AkB/0ED;ECtZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CL0rFT;AmBxuFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL+rFT;AkBz1ED;EC5YI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBwuFH;AkB91ED;ECtYI,eAAA;CnBuuFH;AkB91ED;;;;;;;;;;EC7ZI,eAAA;CnBuwFH;AkB12ED;ECzZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CLwtFT;AmBtwFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL6tFT;AkBp3ED;EC/YI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBswFH;AkBz3ED;ECzYI,eAAA;CnBqwFH;AkBz3ED;;;;;;;;;;EChaI,eAAA;CnBqyFH;AkBr4ED;EC5ZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CLsvFT;AmBpyFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL2vFT;AkB/4ED;EClZI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBoyFH;AkBp5ED;EC5YI,eAAA;CnBmyFH;AkBh5EC;EACE,UAAA;ClBk5EH;AkBh5EC;EACE,OAAA;ClBk5EH;AkBx4ED;EACE,eAAA;EACA,gBAAA;EACA,oBAAA;EACA,eAAA;ClB04ED;AkBvzED;EAwEA;IAtIM,sBAAA;IACA,iBAAA;IACA,uBAAA;GlBy3EH;EkBrvEH;IA/HM,sBAAA;IACA,YAAA;IACA,uBAAA;GlBu3EH;EkB1vEH;IAxHM,sBAAA;GlBq3EH;EkB7vEH;IApHM,sBAAA;IACA,uBAAA;GlBo3EH;EkBjwEH;;;IA9GQ,YAAA;GlBo3EL;EkBtwEH;IAxGM,YAAA;GlBi3EH;EkBzwEH;IApGM,iBAAA;IACA,uBAAA;GlBg3EH;EkB7wEH;;IA5FM,sBAAA;IACA,cAAA;IACA,iBAAA;IACA,uBAAA;GlB62EH;EkBpxEH;;IAtFQ,gBAAA;GlB82EL;EkBxxEH;;IAjFM,mBAAA;IACA,eAAA;GlB62EH;EkB7xEH;IA3EM,OAAA;GlB22EH;CACF;AkBj2ED;;;;EASI,cAAA;EACA,iBAAA;EACA,iBAAA;ClB81EH;AkBz2ED;;EAiBI,iBAAA;ClB41EH;AkB72ED;EJthBE,mBAAA;EACA,oBAAA;Cds4FD;AkB10EC;EAyBF;IAnCM,kBAAA;IACA,iBAAA;IACA,iBAAA;GlBw1EH;CACF;AkBx3ED;EAwCI,YAAA;ClBm1EH;AkBr0EC;EAUF;IAdQ,kBAAA;IACA,gBAAA;GlB60EL;CACF;AkBn0EC;EAEF;IANQ,iBAAA;IACA,gBAAA;GlB20EL;CACF;AoBp6FD;EACE,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,mBAAA;EACA,uBAAA;EACA,+BAAA;MAAA,2BAAA;EACA,gBAAA;EACA,uBAAA;EACA,8BAAA;EACA,oBAAA;EC0CA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,mBAAA;EhB+JA,0BAAA;EACG,uBAAA;EACC,sBAAA;EACI,kBAAA;CL+tFT;AoBv6FG;;;;;;EdnBF,2CAAA;EACA,qBAAA;CNk8FD;AoB16FC;;;EAGE,YAAA;EACA,sBAAA;CpB46FH;AoBz6FC;;EAEE,WAAA;EACA,uBAAA;Ef2BF,yDAAA;EACQ,iDAAA;CLi5FT;AoBz6FC;;;EAGE,oBAAA;EE7CF,cAAA;EAGA,0BAAA;EjB8DA,yBAAA;EACQ,iBAAA;CL05FT;AoBz6FG;;EAEE,qBAAA;CpB26FL;AoBl6FD;EC3DE,YAAA;EACA,uBAAA;EACA,mBAAA;CrBg+FD;AqB99FC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBs+FT;AqBn+FC;;;EAGE,uBAAA;CrBq+FH;AqBh+FG;;;;;;;;;EAGE,uBAAA;EACI,mBAAA;CrBw+FT;AoBv9FD;ECZI,YAAA;EACA,uBAAA;CrBs+FH;AoBx9FD;EC9DE,YAAA;EACA,0BAAA;EACA,sBAAA;CrByhGD;AqBvhGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB+hGT;AqB5hGC;;;EAGE,uBAAA;CrB8hGH;AqBzhGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBiiGT;AoB7gGD;ECfI,eAAA;EACA,uBAAA;CrB+hGH;AoB7gGD;EClEE,YAAA;EACA,0BAAA;EACA,sBAAA;CrBklGD;AqBhlGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBwlGT;AqBrlGC;;;EAGE,uBAAA;CrBulGH;AqBllGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrB0lGT;AoBlkGD;ECnBI,eAAA;EACA,uBAAA;CrBwlGH;AoBlkGD;ECtEE,YAAA;EACA,0BAAA;EACA,sBAAA;CrB2oGD;AqBzoGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBipGT;AqB9oGC;;;EAGE,uBAAA;CrBgpGH;AqB3oGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBmpGT;AoBvnGD;ECvBI,eAAA;EACA,uBAAA;CrBipGH;AoBvnGD;EC1EE,YAAA;EACA,0BAAA;EACA,sBAAA;CrBosGD;AqBlsGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB0sGT;AqBvsGC;;;EAGE,uBAAA;CrBysGH;AqBpsGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrB4sGT;AoB5qGD;EC3BI,eAAA;EACA,uBAAA;CrB0sGH;AoB5qGD;EC9EE,YAAA;EACA,0BAAA;EACA,sBAAA;CrB6vGD;AqB3vGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBmwGT;AqBhwGC;;;EAGE,uBAAA;CrBkwGH;AqB7vGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBqwGT;AoBjuGD;EC/BI,eAAA;EACA,uBAAA;CrBmwGH;AoB5tGD;EACE,eAAA;EACA,oBAAA;EACA,iBAAA;CpB8tGD;AoB5tGC;;;;;EAKE,8BAAA;EfnCF,yBAAA;EACQ,iBAAA;CLkwGT;AoB7tGC;;;;EAIE,0BAAA;CpB+tGH;AoB7tGC;;EAEE,eAAA;EACA,2BAAA;EACA,8BAAA;CpB+tGH;AoB3tGG;;;;EAEE,eAAA;EACA,sBAAA;CpB+tGL;AoBttGD;;ECxEE,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CrBkyGD;AoBztGD;;EC5EE,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CrByyGD;AoB5tGD;;EChFE,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CrBgzGD;AoB3tGD;EACE,eAAA;EACA,YAAA;CpB6tGD;AoBztGD;EACE,gBAAA;CpB2tGD;AoBptGC;;;EACE,YAAA;CpBwtGH;AuBl3GD;EACE,WAAA;ElBoLA,yCAAA;EACK,oCAAA;EACG,iCAAA;CLisGT;AuBr3GC;EACE,WAAA;CvBu3GH;AuBn3GD;EACE,cAAA;CvBq3GD;AuBn3GC;EAAY,eAAA;CvBs3Gb;AuBr3GC;EAAY,mBAAA;CvBw3Gb;AuBv3GC;EAAY,yBAAA;CvB03Gb;AuBv3GD;EACE,mBAAA;EACA,UAAA;EACA,iBAAA;ElBuKA,gDAAA;EACQ,2CAAA;KAAA,wCAAA;EAOR,mCAAA;EACQ,8BAAA;KAAA,2BAAA;EAGR,yCAAA;EACQ,oCAAA;KAAA,iCAAA;CL2sGT;AwBr5GD;EACE,sBAAA;EACA,SAAA;EACA,UAAA;EACA,iBAAA;EACA,uBAAA;EACA,uBAAA;EACA,yBAAA;EACA,oCAAA;EACA,mCAAA;CxBu5GD;AwBn5GD;;EAEE,mBAAA;CxBq5GD;AwBj5GD;EACE,WAAA;CxBm5GD;AwB/4GD;EACE,mBAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,cAAA;EACA,YAAA;EACA,iBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,uBAAA;EACA,uBAAA;EACA,sCAAA;EACA,mBAAA;EnBsBA,oDAAA;EACQ,4CAAA;EmBrBR,qCAAA;UAAA,6BAAA;CxBk5GD;AwB74GC;EACE,SAAA;EACA,WAAA;CxB+4GH;AwBx6GD;ECzBE,YAAA;EACA,cAAA;EACA,iBAAA;EACA,0BAAA;CzBo8GD;AwB96GD;EAmCI,eAAA;EACA,kBAAA;EACA,YAAA;EACA,oBAAA;EACA,wBAAA;EACA,eAAA;EACA,oBAAA;CxB84GH;AwBx4GC;;EAEE,sBAAA;EACA,eAAA;EACA,0BAAA;CxB04GH;AwBp4GC;;;EAGE,YAAA;EACA,sBAAA;EACA,WAAA;EACA,0BAAA;CxBs4GH;AwB73GC;;;EAGE,eAAA;CxB+3GH;AwB33GC;;EAEE,sBAAA;EACA,8BAAA;EACA,uBAAA;EE3GF,oEAAA;EF6GE,oBAAA;CxB63GH;AwBx3GD;EAGI,eAAA;CxBw3GH;AwB33GD;EAQI,WAAA;CxBs3GH;AwB92GD;EACE,WAAA;EACA,SAAA;CxBg3GD;AwBx2GD;EACE,QAAA;EACA,YAAA;CxB02GD;AwBt2GD;EACE,eAAA;EACA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,oBAAA;CxBw2GD;AwBp2GD;EACE,gBAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,OAAA;EACA,aAAA;CxBs2GD;AwBl2GD;EACE,SAAA;EACA,WAAA;CxBo2GD;AwB51GD;;EAII,cAAA;EACA,0BAAA;EACA,4BAAA;EACA,YAAA;CxB41GH;AwBn2GD;;EAWI,UAAA;EACA,aAAA;EACA,mBAAA;CxB41GH;AwBv0GD;EAXE;IApEA,WAAA;IACA,SAAA;GxB05GC;EwBv1GD;IA1DA,QAAA;IACA,YAAA;GxBo5GC;CACF;A2BpiHD;;EAEE,mBAAA;EACA,sBAAA;EACA,uBAAA;C3BsiHD;A2B1iHD;;EAMI,mBAAA;EACA,YAAA;C3BwiHH;A2BtiHG;;;;;;;;EAIE,WAAA;C3B4iHL;A2BtiHD;;;;EAKI,kBAAA;C3BuiHH;A2BliHD;EACE,kBAAA;C3BoiHD;A2BriHD;;;EAOI,YAAA;C3BmiHH;A2B1iHD;;;EAYI,iBAAA;C3BmiHH;A2B/hHD;EACE,iBAAA;C3BiiHD;A2B7hHD;EACE,eAAA;C3B+hHD;A2B9hHC;EClDA,8BAAA;EACG,2BAAA;C5BmlHJ;A2B7hHD;;EC/CE,6BAAA;EACG,0BAAA;C5BglHJ;A2B5hHD;EACE,YAAA;C3B8hHD;A2B5hHD;EACE,iBAAA;C3B8hHD;A2B5hHD;;ECnEE,8BAAA;EACG,2BAAA;C5BmmHJ;A2B3hHD;ECjEE,6BAAA;EACG,0BAAA;C5B+lHJ;A2B1hHD;;EAEE,WAAA;C3B4hHD;A2B3gHD;EACE,kBAAA;EACA,mBAAA;C3B6gHD;A2B3gHD;EACE,mBAAA;EACA,oBAAA;C3B6gHD;A2BxgHD;EtB/CE,yDAAA;EACQ,iDAAA;CL0jHT;A2BxgHC;EtBnDA,yBAAA;EACQ,iBAAA;CL8jHT;A2BrgHD;EACE,eAAA;C3BugHD;A2BpgHD;EACE,wBAAA;EACA,uBAAA;C3BsgHD;A2BngHD;EACE,wBAAA;C3BqgHD;A2B9/GD;;;EAII,eAAA;EACA,YAAA;EACA,YAAA;EACA,gBAAA;C3B+/GH;A2BtgHD;EAcM,YAAA;C3B2/GL;A2BzgHD;;;;EAsBI,iBAAA;EACA,eAAA;C3By/GH;A2Bp/GC;EACE,iBAAA;C3Bs/GH;A2Bp/GC;EC3KA,6BAAA;EACC,4BAAA;EAOD,8BAAA;EACC,6BAAA;C5B4pHF;A2Bt/GC;EC/KA,2BAAA;EACC,0BAAA;EAOD,gCAAA;EACC,+BAAA;C5BkqHF;A2Bv/GD;EACE,iBAAA;C3By/GD;A2Bv/GD;;EC/KE,8BAAA;EACC,6BAAA;C5B0qHF;A2Bt/GD;EC7LE,2BAAA;EACC,0BAAA;C5BsrHF;A2Bl/GD;EACE,eAAA;EACA,YAAA;EACA,oBAAA;EACA,0BAAA;C3Bo/GD;A2Bx/GD;;EAOI,YAAA;EACA,oBAAA;EACA,UAAA;C3Bq/GH;A2B9/GD;EAYI,YAAA;C3Bq/GH;A2BjgHD;EAgBI,WAAA;C3Bo/GH;A2Bn+GD;;;;EAKM,mBAAA;EACA,uBAAA;EACA,qBAAA;C3Bo+GL;A6B9sHD;EACE,mBAAA;EACA,eAAA;EACA,0BAAA;C7BgtHD;A6B7sHC;EACE,YAAA;EACA,gBAAA;EACA,iBAAA;C7B+sHH;A6BxtHD;EAeI,mBAAA;EACA,WAAA;EAKA,YAAA;EAEA,YAAA;EACA,iBAAA;C7BusHH;A6BrsHG;EACE,WAAA;C7BusHL;A6B7rHD;;;EV0BE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CnBwqHD;AmBtqHC;;;EACE,aAAA;EACA,kBAAA;CnB0qHH;AmBvqHC;;;;;;EAEE,aAAA;CnB6qHH;A6B/sHD;;;EVqBE,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CnB+rHD;AmB7rHC;;;EACE,aAAA;EACA,kBAAA;CnBisHH;AmB9rHC;;;;;;EAEE,aAAA;CnBosHH;A6B7tHD;;;EAGE,oBAAA;C7B+tHD;A6B7tHC;;;EACE,iBAAA;C7BiuHH;A6B7tHD;;EAEE,UAAA;EACA,oBAAA;EACA,uBAAA;C7B+tHD;A6B1tHD;EACE,kBAAA;EACA,gBAAA;EACA,oBAAA;EACA,eAAA;EACA,eAAA;EACA,mBAAA;EACA,0BAAA;EACA,uBAAA;EACA,mBAAA;C7B4tHD;A6BztHC;EACE,kBAAA;EACA,gBAAA;EACA,mBAAA;C7B2tHH;A6BztHC;EACE,mBAAA;EACA,gBAAA;EACA,mBAAA;C7B2tHH;A6B/uHD;;EA0BI,cAAA;C7BytHH;A6BptHD;;;;;;;EDpGE,8BAAA;EACG,2BAAA;C5Bi0HJ;A6BrtHD;EACE,gBAAA;C7ButHD;A6BrtHD;;;;;;;EDxGE,6BAAA;EACG,0BAAA;C5Bs0HJ;A6BttHD;EACE,eAAA;C7BwtHD;A6BntHD;EACE,mBAAA;EAGA,aAAA;EACA,oBAAA;C7BmtHD;A6BxtHD;EAUI,mBAAA;C7BitHH;A6B3tHD;EAYM,kBAAA;C7BktHL;A6B/sHG;;;EAGE,WAAA;C7BitHL;A6B5sHC;;EAGI,mBAAA;C7B6sHL;A6B1sHC;;EAGI,WAAA;EACA,kBAAA;C7B2sHL;A8B12HD;EACE,iBAAA;EACA,gBAAA;EACA,iBAAA;C9B42HD;A8B/2HD;EAOI,mBAAA;EACA,eAAA;C9B22HH;A8Bn3HD;EAWM,mBAAA;EACA,eAAA;EACA,mBAAA;C9B22HL;A8B12HK;;EAEE,sBAAA;EACA,0BAAA;C9B42HP;A8Bv2HG;EACE,eAAA;C9By2HL;A8Bv2HK;;EAEE,eAAA;EACA,sBAAA;EACA,8BAAA;EACA,oBAAA;C9By2HP;A8Bl2HG;;;EAGE,0BAAA;EACA,sBAAA;C9Bo2HL;A8B74HD;ELHE,YAAA;EACA,cAAA;EACA,iBAAA;EACA,0BAAA;CzBm5HD;A8Bn5HD;EA0DI,gBAAA;C9B41HH;A8Bn1HD;EACE,8BAAA;C9Bq1HD;A8Bt1HD;EAGI,YAAA;EAEA,oBAAA;C9Bq1HH;A8B11HD;EASM,kBAAA;EACA,wBAAA;EACA,8BAAA;EACA,2BAAA;C9Bo1HL;A8Bn1HK;EACE,mCAAA;C9Bq1HP;A8B/0HK;;;EAGE,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,iCAAA;EACA,gBAAA;C9Bi1HP;A8B50HC;EAqDA,YAAA;EA8BA,iBAAA;C9B6vHD;A8Bh1HC;EAwDE,YAAA;C9B2xHH;A8Bn1HC;EA0DI,mBAAA;EACA,mBAAA;C9B4xHL;A8Bv1HC;EAgEE,UAAA;EACA,WAAA;C9B0xHH;A8B9wHD;EA0DA;IAjEM,oBAAA;IACA,UAAA;G9ByxHH;E8BztHH;IA9DQ,iBAAA;G9B0xHL;CACF;A8Bp2HC;EAuFE,gBAAA;EACA,mBAAA;C9BgxHH;A8Bx2HC;;;EA8FE,uBAAA;C9B+wHH;A8BjwHD;EA2BA;IApCM,8BAAA;IACA,2BAAA;G9B8wHH;E8B3uHH;;;IA9BM,0BAAA;G9B8wHH;CACF;A8B/2HD;EAEI,YAAA;C9Bg3HH;A8Bl3HD;EAMM,mBAAA;C9B+2HL;A8Br3HD;EASM,iBAAA;C9B+2HL;A8B12HK;;;EAGE,YAAA;EACA,0BAAA;C9B42HP;A8Bp2HD;EAEI,YAAA;C9Bq2HH;A8Bv2HD;EAIM,gBAAA;EACA,eAAA;C9Bs2HL;A8B11HD;EACE,YAAA;C9B41HD;A8B71HD;EAII,YAAA;C9B41HH;A8Bh2HD;EAMM,mBAAA;EACA,mBAAA;C9B61HL;A8Bp2HD;EAYI,UAAA;EACA,WAAA;C9B21HH;A8B/0HD;EA0DA;IAjEM,oBAAA;IACA,UAAA;G9B01HH;E8B1xHH;IA9DQ,iBAAA;G9B21HL;CACF;A8Bn1HD;EACE,iBAAA;C9Bq1HD;A8Bt1HD;EAKI,gBAAA;EACA,mBAAA;C9Bo1HH;A8B11HD;;;EAYI,uBAAA;C9Bm1HH;A8Br0HD;EA2BA;IApCM,8BAAA;IACA,2BAAA;G9Bk1HH;E8B/yHH;;;IA9BM,0BAAA;G9Bk1HH;CACF;A8Bz0HD;EAEI,cAAA;C9B00HH;A8B50HD;EAKI,eAAA;C9B00HH;A8Bj0HD;EAEE,iBAAA;EF3OA,2BAAA;EACC,0BAAA;C5B8iIF;A+BxiID;EACE,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,8BAAA;C/B0iID;A+BliID;EA8nBA;IAhoBI,mBAAA;G/BwiID;CACF;A+BzhID;EAgnBA;IAlnBI,YAAA;G/B+hID;CACF;A+BjhID;EACE,oBAAA;EACA,oBAAA;EACA,mBAAA;EACA,kCAAA;EACA,2DAAA;UAAA,mDAAA;EAEA,kCAAA;C/BkhID;A+BhhIC;EACE,iBAAA;C/BkhIH;A+Bt/HD;EA6jBA;IArlBI,YAAA;IACA,cAAA;IACA,yBAAA;YAAA,iBAAA;G/BkhID;E+BhhIC;IACE,0BAAA;IACA,wBAAA;IACA,kBAAA;IACA,6BAAA;G/BkhIH;E+B/gIC;IACE,oBAAA;G/BihIH;E+B5gIC;;;IAGE,gBAAA;IACA,iBAAA;G/B8gIH;CACF;A+B1gID;;EAGI,kBAAA;C/B2gIH;A+BtgIC;EAmjBF;;IArjBM,kBAAA;G/B6gIH;CACF;A+BpgID;;;;EAII,oBAAA;EACA,mBAAA;C/BsgIH;A+BhgIC;EAgiBF;;;;IAniBM,gBAAA;IACA,eAAA;G/B0gIH;CACF;A+B9/HD;EACE,cAAA;EACA,sBAAA;C/BggID;A+B3/HD;EA8gBA;IAhhBI,iBAAA;G/BigID;CACF;A+B7/HD;;EAEE,gBAAA;EACA,SAAA;EACA,QAAA;EACA,cAAA;C/B+/HD;A+Bz/HD;EAggBA;;IAlgBI,iBAAA;G/BggID;CACF;A+B9/HD;EACE,OAAA;EACA,sBAAA;C/BggID;A+B9/HD;EACE,UAAA;EACA,iBAAA;EACA,sBAAA;C/BggID;A+B1/HD;EACE,YAAA;EACA,mBAAA;EACA,gBAAA;EACA,kBAAA;EACA,aAAA;C/B4/HD;A+B1/HC;;EAEE,sBAAA;C/B4/HH;A+BrgID;EAaI,eAAA;C/B2/HH;A+Bl/HD;EALI;;IAEE,mBAAA;G/B0/HH;CACF;A+Bh/HD;EACE,mBAAA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EC9LA,gBAAA;EACA,mBAAA;ED+LA,8BAAA;EACA,uBAAA;EACA,8BAAA;EACA,mBAAA;C/Bm/HD;A+B/+HC;EACE,WAAA;C/Bi/HH;A+B//HD;EAmBI,eAAA;EACA,YAAA;EACA,YAAA;EACA,mBAAA;C/B++HH;A+BrgID;EAyBI,gBAAA;C/B++HH;A+Bz+HD;EAqbA;IAvbI,cAAA;G/B++HD;CACF;A+Bt+HD;EACE,oBAAA;C/Bw+HD;A+Bz+HD;EAII,kBAAA;EACA,qBAAA;EACA,kBAAA;C/Bw+HH;A+B58HC;EA2YF;IAjaM,iBAAA;IACA,YAAA;IACA,YAAA;IACA,cAAA;IACA,8BAAA;IACA,UAAA;IACA,yBAAA;YAAA,iBAAA;G/Bs+HH;E+B3kHH;;IAxZQ,2BAAA;G/Bu+HL;E+B/kHH;IArZQ,kBAAA;G/Bu+HL;E+Bt+HK;;IAEE,uBAAA;G/Bw+HP;CACF;A+Bt9HD;EA+XA;IA1YI,YAAA;IACA,UAAA;G/Bq+HD;E+B5lHH;IAtYM,YAAA;G/Bq+HH;E+B/lHH;IApYQ,kBAAA;IACA,qBAAA;G/Bs+HL;CACF;A+B39HD;EACE,mBAAA;EACA,oBAAA;EACA,mBAAA;EACA,kCAAA;EACA,qCAAA;E1B9NA,6FAAA;EACQ,qFAAA;E2B/DR,gBAAA;EACA,mBAAA;ChC4vID;AkBtuHD;EAwEA;IAtIM,sBAAA;IACA,iBAAA;IACA,uBAAA;GlBwyHH;EkBpqHH;IA/HM,sBAAA;IACA,YAAA;IACA,uBAAA;GlBsyHH;EkBzqHH;IAxHM,sBAAA;GlBoyHH;EkB5qHH;IApHM,sBAAA;IACA,uBAAA;GlBmyHH;EkBhrHH;;;IA9GQ,YAAA;GlBmyHL;EkBrrHH;IAxGM,YAAA;GlBgyHH;EkBxrHH;IApGM,iBAAA;IACA,uBAAA;GlB+xHH;EkB5rHH;;IA5FM,sBAAA;IACA,cAAA;IACA,iBAAA;IACA,uBAAA;GlB4xHH;EkBnsHH;;IAtFQ,gBAAA;GlB6xHL;EkBvsHH;;IAjFM,mBAAA;IACA,eAAA;GlB4xHH;EkB5sHH;IA3EM,OAAA;GlB0xHH;CACF;A+BpgIC;EAmWF;IAzWM,mBAAA;G/B8gIH;E+B5gIG;IACE,iBAAA;G/B8gIL;CACF;A+B7/HD;EAoVA;IA5VI,YAAA;IACA,UAAA;IACA,eAAA;IACA,gBAAA;IACA,eAAA;IACA,kBAAA;I1BzPF,yBAAA;IACQ,iBAAA;GLmwIP;CACF;A+BngID;EACE,cAAA;EHpUA,2BAAA;EACC,0BAAA;C5B00IF;A+BngID;EACE,iBAAA;EHzUA,6BAAA;EACC,4BAAA;EAOD,8BAAA;EACC,6BAAA;C5By0IF;A+B//HD;EChVE,gBAAA;EACA,mBAAA;ChCk1ID;A+BhgIC;ECnVA,iBAAA;EACA,oBAAA;ChCs1ID;A+BjgIC;ECtVA,iBAAA;EACA,oBAAA;ChC01ID;A+B3/HD;EChWE,iBAAA;EACA,oBAAA;ChC81ID;A+Bv/HD;EAsSA;IA1SI,YAAA;IACA,kBAAA;IACA,mBAAA;G/B+/HD;CACF;A+Bl+HD;EAhBE;IExWA,uBAAA;GjC81IC;E+Br/HD;IE5WA,wBAAA;IF8WE,oBAAA;G/Bu/HD;E+Bz/HD;IAKI,gBAAA;G/Bu/HH;CACF;A+B9+HD;EACE,0BAAA;EACA,sBAAA;C/Bg/HD;A+Bl/HD;EAKI,YAAA;C/Bg/HH;A+B/+HG;;EAEE,eAAA;EACA,8BAAA;C/Bi/HL;A+B1/HD;EAcI,YAAA;C/B++HH;A+B7/HD;EAmBM,YAAA;C/B6+HL;A+B3+HK;;EAEE,YAAA;EACA,8BAAA;C/B6+HP;A+Bz+HK;;;EAGE,YAAA;EACA,0BAAA;C/B2+HP;A+Bv+HK;;;EAGE,YAAA;EACA,8BAAA;C/By+HP;A+BjhID;EA8CI,mBAAA;C/Bs+HH;A+Br+HG;;EAEE,uBAAA;C/Bu+HL;A+BxhID;EAoDM,uBAAA;C/Bu+HL;A+B3hID;;EA0DI,sBAAA;C/Bq+HH;A+B99HK;;;EAGE,0BAAA;EACA,YAAA;C/Bg+HP;A+B/7HC;EAoKF;IA7LU,YAAA;G/B49HP;E+B39HO;;IAEE,YAAA;IACA,8BAAA;G/B69HT;E+Bz9HO;;;IAGE,YAAA;IACA,0BAAA;G/B29HT;E+Bv9HO;;;IAGE,YAAA;IACA,8BAAA;G/By9HT;CACF;A+B3jID;EA8GI,YAAA;C/Bg9HH;A+B/8HG;EACE,YAAA;C/Bi9HL;A+BjkID;EAqHI,YAAA;C/B+8HH;A+B98HG;;EAEE,YAAA;C/Bg9HL;A+B58HK;;;;EAEE,YAAA;C/Bg9HP;A+Bx8HD;EACE,uBAAA;EACA,sBAAA;C/B08HD;A+B58HD;EAKI,eAAA;C/B08HH;A+Bz8HG;;EAEE,YAAA;EACA,8BAAA;C/B28HL;A+Bp9HD;EAcI,eAAA;C/By8HH;A+Bv9HD;EAmBM,eAAA;C/Bu8HL;A+Br8HK;;EAEE,YAAA;EACA,8BAAA;C/Bu8HP;A+Bn8HK;;;EAGE,YAAA;EACA,0BAAA;C/Bq8HP;A+Bj8HK;;;EAGE,YAAA;EACA,8BAAA;C/Bm8HP;A+B3+HD;EA+CI,mBAAA;C/B+7HH;A+B97HG;;EAEE,uBAAA;C/Bg8HL;A+Bl/HD;EAqDM,uBAAA;C/Bg8HL;A+Br/HD;;EA2DI,sBAAA;C/B87HH;A+Bx7HK;;;EAGE,0BAAA;EACA,YAAA;C/B07HP;A+Bn5HC;EAwBF;IAvDU,sBAAA;G/Bs7HP;E+B/3HH;IApDU,0BAAA;G/Bs7HP;E+Bl4HH;IAjDU,eAAA;G/Bs7HP;E+Br7HO;;IAEE,YAAA;IACA,8BAAA;G/Bu7HT;E+Bn7HO;;;IAGE,YAAA;IACA,0BAAA;G/Bq7HT;E+Bj7HO;;;IAGE,YAAA;IACA,8BAAA;G/Bm7HT;CACF;A+B3hID;EA+GI,eAAA;C/B+6HH;A+B96HG;EACE,YAAA;C/Bg7HL;A+BjiID;EAsHI,eAAA;C/B86HH;A+B76HG;;EAEE,YAAA;C/B+6HL;A+B36HK;;;;EAEE,YAAA;C/B+6HP;AkCzjJD;EACE,kBAAA;EACA,oBAAA;EACA,iBAAA;EACA,0BAAA;EACA,mBAAA;ClC2jJD;AkChkJD;EAQI,sBAAA;ClC2jJH;AkCnkJD;EAWM,kBAAA;EACA,eAAA;EACA,YAAA;ClC2jJL;AkCxkJD;EAkBI,eAAA;ClCyjJH;AmC7kJD;EACE,sBAAA;EACA,gBAAA;EACA,eAAA;EACA,mBAAA;CnC+kJD;AmCnlJD;EAOI,gBAAA;CnC+kJH;AmCtlJD;;EAUM,mBAAA;EACA,YAAA;EACA,kBAAA;EACA,wBAAA;EACA,sBAAA;EACA,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,kBAAA;CnCglJL;AmC9kJG;;EAGI,eAAA;EPXN,+BAAA;EACG,4BAAA;C5B2lJJ;AmC7kJG;;EPvBF,gCAAA;EACG,6BAAA;C5BwmJJ;AmCxkJG;;;;EAEE,WAAA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;CnC4kJL;AmCtkJG;;;;;;EAGE,WAAA;EACA,YAAA;EACA,0BAAA;EACA,sBAAA;EACA,gBAAA;CnC2kJL;AmCloJD;;;;;;EAkEM,eAAA;EACA,uBAAA;EACA,mBAAA;EACA,oBAAA;CnCwkJL;AmC/jJD;;EC3EM,mBAAA;EACA,gBAAA;EACA,uBAAA;CpC8oJL;AoC5oJG;;ERKF,+BAAA;EACG,4BAAA;C5B2oJJ;AoC3oJG;;ERTF,gCAAA;EACG,6BAAA;C5BwpJJ;AmC1kJD;;EChFM,kBAAA;EACA,gBAAA;EACA,iBAAA;CpC8pJL;AoC5pJG;;ERKF,+BAAA;EACG,4BAAA;C5B2pJJ;AoC3pJG;;ERTF,gCAAA;EACG,6BAAA;C5BwqJJ;AqC3qJD;EACE,gBAAA;EACA,eAAA;EACA,iBAAA;EACA,mBAAA;CrC6qJD;AqCjrJD;EAOI,gBAAA;CrC6qJH;AqCprJD;;EAUM,sBAAA;EACA,kBAAA;EACA,uBAAA;EACA,uBAAA;EACA,oBAAA;CrC8qJL;AqC5rJD;;EAmBM,sBAAA;EACA,0BAAA;CrC6qJL;AqCjsJD;;EA2BM,aAAA;CrC0qJL;AqCrsJD;;EAkCM,YAAA;CrCuqJL;AqCzsJD;;;;EA2CM,eAAA;EACA,uBAAA;EACA,oBAAA;CrCoqJL;AsCltJD;EACE,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,mBAAA;EACA,oBAAA;EACA,yBAAA;EACA,qBAAA;CtCotJD;AsChtJG;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;CtCktJL;AsC7sJC;EACE,cAAA;CtC+sJH;AsC3sJC;EACE,mBAAA;EACA,UAAA;CtC6sJH;AsCtsJD;ECtCE,0BAAA;CvC+uJD;AuC5uJG;;EAEE,0BAAA;CvC8uJL;AsCzsJD;EC1CE,0BAAA;CvCsvJD;AuCnvJG;;EAEE,0BAAA;CvCqvJL;AsC5sJD;EC9CE,0BAAA;CvC6vJD;AuC1vJG;;EAEE,0BAAA;CvC4vJL;AsC/sJD;EClDE,0BAAA;CvCowJD;AuCjwJG;;EAEE,0BAAA;CvCmwJL;AsCltJD;ECtDE,0BAAA;CvC2wJD;AuCxwJG;;EAEE,0BAAA;CvC0wJL;AsCrtJD;EC1DE,0BAAA;CvCkxJD;AuC/wJG;;EAEE,0BAAA;CvCixJL;AwCnxJD;EACE,sBAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;EACA,YAAA;EACA,eAAA;EACA,uBAAA;EACA,oBAAA;EACA,mBAAA;EACA,0BAAA;EACA,oBAAA;CxCqxJD;AwClxJC;EACE,cAAA;CxCoxJH;AwChxJC;EACE,mBAAA;EACA,UAAA;CxCkxJH;AwC/wJC;;EAEE,OAAA;EACA,iBAAA;CxCixJH;AwC5wJG;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;CxC8wJL;AwCzwJC;;EAEE,eAAA;EACA,uBAAA;CxC2wJH;AwCxwJC;EACE,aAAA;CxC0wJH;AwCvwJC;EACE,kBAAA;CxCywJH;AwCtwJC;EACE,iBAAA;CxCwwJH;AyCl0JD;EACE,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,eAAA;EACA,0BAAA;CzCo0JD;AyCz0JD;;EASI,eAAA;CzCo0JH;AyC70JD;EAaI,oBAAA;EACA,gBAAA;EACA,iBAAA;CzCm0JH;AyCl1JD;EAmBI,0BAAA;CzCk0JH;AyC/zJC;;EAEE,mBAAA;EACA,mBAAA;EACA,oBAAA;CzCi0JH;AyC31JD;EA8BI,gBAAA;CzCg0JH;AyC9yJD;EACA;IAfI,kBAAA;IACA,qBAAA;GzCg0JD;EyC9zJC;;IAEE,mBAAA;IACA,oBAAA;GzCg0JH;EyCvzJH;;IAJM,gBAAA;GzC+zJH;CACF;A0C52JD;EACE,eAAA;EACA,aAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;ErCiLA,4CAAA;EACK,uCAAA;EACG,oCAAA;CL8rJT;A0Cx3JD;;EAaI,kBAAA;EACA,mBAAA;C1C+2JH;A0C32JC;;;EAGE,sBAAA;C1C62JH;A0Cl4JD;EA0BI,aAAA;EACA,eAAA;C1C22JH;A2Cp4JD;EACE,cAAA;EACA,oBAAA;EACA,8BAAA;EACA,mBAAA;C3Cs4JD;A2C14JD;EAQI,cAAA;EAEA,eAAA;C3Co4JH;A2C94JD;EAeI,kBAAA;C3Ck4JH;A2Cj5JD;;EAqBI,iBAAA;C3Cg4JH;A2Cr5JD;EAyBI,gBAAA;C3C+3JH;A2Cv3JD;;EAEE,oBAAA;C3Cy3JD;A2C33JD;;EAMI,mBAAA;EACA,UAAA;EACA,aAAA;EACA,eAAA;C3Cy3JH;A2Cj3JD;ECvDE,0BAAA;EACA,sBAAA;EACA,eAAA;C5C26JD;A2Ct3JD;EClDI,0BAAA;C5C26JH;A2Cz3JD;EC/CI,eAAA;C5C26JH;A2Cx3JD;EC3DE,0BAAA;EACA,sBAAA;EACA,eAAA;C5Cs7JD;A2C73JD;ECtDI,0BAAA;C5Cs7JH;A2Ch4JD;ECnDI,eAAA;C5Cs7JH;A2C/3JD;EC/DE,0BAAA;EACA,sBAAA;EACA,eAAA;C5Ci8JD;A2Cp4JD;EC1DI,0BAAA;C5Ci8JH;A2Cv4JD;ECvDI,eAAA;C5Ci8JH;A2Ct4JD;ECnEE,0BAAA;EACA,sBAAA;EACA,eAAA;C5C48JD;A2C34JD;EC9DI,0BAAA;C5C48JH;A2C94JD;EC3DI,eAAA;C5C48JH;A6C98JD;EACE;IAAQ,4BAAA;G7Ci9JP;E6Ch9JD;IAAQ,yBAAA;G7Cm9JP;CACF;A6Ch9JD;EACE;IAAQ,4BAAA;G7Cm9JP;E6Cl9JD;IAAQ,yBAAA;G7Cq9JP;CACF;A6Cx9JD;EACE;IAAQ,4BAAA;G7Cm9JP;E6Cl9JD;IAAQ,yBAAA;G7Cq9JP;CACF;A6C98JD;EACE,iBAAA;EACA,aAAA;EACA,oBAAA;EACA,0BAAA;EACA,mBAAA;ExCsCA,uDAAA;EACQ,+CAAA;CL26JT;A6C78JD;EACE,YAAA;EACA,UAAA;EACA,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,YAAA;EACA,mBAAA;EACA,0BAAA;ExCyBA,uDAAA;EACQ,+CAAA;EAyHR,oCAAA;EACK,+BAAA;EACG,4BAAA;CL+zJT;A6C18JD;;ECCI,8MAAA;EACA,yMAAA;EACA,sMAAA;EDAF,mCAAA;UAAA,2BAAA;C7C88JD;A6Cv8JD;;ExC5CE,2DAAA;EACK,sDAAA;EACG,mDAAA;CLu/JT;A6Cp8JD;EErEE,0BAAA;C/C4gKD;A+CzgKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9C49JH;A6Cx8JD;EEzEE,0BAAA;C/CohKD;A+CjhKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9Co+JH;A6C58JD;EE7EE,0BAAA;C/C4hKD;A+CzhKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9C4+JH;A6Ch9JD;EEjFE,0BAAA;C/CoiKD;A+CjiKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9Co/JH;AgD5iKD;EAEE,iBAAA;ChD6iKD;AgD3iKC;EACE,cAAA;ChD6iKH;AgDziKD;;EAEE,QAAA;EACA,iBAAA;ChD2iKD;AgDxiKD;EACE,eAAA;ChD0iKD;AgDviKD;EACE,eAAA;ChDyiKD;AgDtiKC;EACE,gBAAA;ChDwiKH;AgDpiKD;;EAEE,mBAAA;ChDsiKD;AgDniKD;;EAEE,oBAAA;ChDqiKD;AgDliKD;;;EAGE,oBAAA;EACA,oBAAA;ChDoiKD;AgDjiKD;EACE,uBAAA;ChDmiKD;AgDhiKD;EACE,uBAAA;ChDkiKD;AgD9hKD;EACE,cAAA;EACA,mBAAA;ChDgiKD;AgD1hKD;EACE,gBAAA;EACA,iBAAA;ChD4hKD;AiDnlKD;EAEE,oBAAA;EACA,gBAAA;CjDolKD;AiD5kKD;EACE,mBAAA;EACA,eAAA;EACA,mBAAA;EAEA,oBAAA;EACA,uBAAA;EACA,uBAAA;CjD6kKD;AiD1kKC;ErB3BA,6BAAA;EACC,4BAAA;C5BwmKF;AiD3kKC;EACE,iBAAA;ErBvBF,gCAAA;EACC,+BAAA;C5BqmKF;AiDpkKD;;EAEE,YAAA;CjDskKD;AiDxkKD;;EAKI,YAAA;CjDukKH;AiDnkKC;;;;EAEE,sBAAA;EACA,YAAA;EACA,0BAAA;CjDukKH;AiDnkKD;EACE,YAAA;EACA,iBAAA;CjDqkKD;AiDhkKC;;;EAGE,0BAAA;EACA,eAAA;EACA,oBAAA;CjDkkKH;AiDvkKC;;;EASI,eAAA;CjDmkKL;AiD5kKC;;;EAYI,eAAA;CjDqkKL;AiDhkKC;;;EAGE,WAAA;EACA,YAAA;EACA,0BAAA;EACA,sBAAA;CjDkkKH;AiDxkKC;;;;;;;;;EAYI,eAAA;CjDukKL;AiDnlKC;;;EAeI,eAAA;CjDykKL;AkD3qKC;EACE,eAAA;EACA,0BAAA;ClD6qKH;AkD3qKG;;EAEE,eAAA;ClD6qKL;AkD/qKG;;EAKI,eAAA;ClD8qKP;AkD3qKK;;;;EAEE,eAAA;EACA,0BAAA;ClD+qKP;AkD7qKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClDkrKP;AkDxsKC;EACE,eAAA;EACA,0BAAA;ClD0sKH;AkDxsKG;;EAEE,eAAA;ClD0sKL;AkD5sKG;;EAKI,eAAA;ClD2sKP;AkDxsKK;;;;EAEE,eAAA;EACA,0BAAA;ClD4sKP;AkD1sKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClD+sKP;AkDruKC;EACE,eAAA;EACA,0BAAA;ClDuuKH;AkDruKG;;EAEE,eAAA;ClDuuKL;AkDzuKG;;EAKI,eAAA;ClDwuKP;AkDruKK;;;;EAEE,eAAA;EACA,0BAAA;ClDyuKP;AkDvuKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClD4uKP;AkDlwKC;EACE,eAAA;EACA,0BAAA;ClDowKH;AkDlwKG;;EAEE,eAAA;ClDowKL;AkDtwKG;;EAKI,eAAA;ClDqwKP;AkDlwKK;;;;EAEE,eAAA;EACA,0BAAA;ClDswKP;AkDpwKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClDywKP;AiDxqKD;EACE,cAAA;EACA,mBAAA;CjD0qKD;AiDxqKD;EACE,iBAAA;EACA,iBAAA;CjD0qKD;AmDpyKD;EACE,oBAAA;EACA,uBAAA;EACA,8BAAA;EACA,mBAAA;E9C0DA,kDAAA;EACQ,0CAAA;CL6uKT;AmDnyKD;EACE,cAAA;CnDqyKD;AmDhyKD;EACE,mBAAA;EACA,qCAAA;EvBpBA,6BAAA;EACC,4BAAA;C5BuzKF;AmDtyKD;EAMI,eAAA;CnDmyKH;AmD9xKD;EACE,cAAA;EACA,iBAAA;EACA,gBAAA;EACA,eAAA;CnDgyKD;AmDpyKD;;;;;EAWI,eAAA;CnDgyKH;AmD3xKD;EACE,mBAAA;EACA,0BAAA;EACA,2BAAA;EvBxCA,gCAAA;EACC,+BAAA;C5Bs0KF;AmDrxKD;;EAGI,iBAAA;CnDsxKH;AmDzxKD;;EAMM,oBAAA;EACA,iBAAA;CnDuxKL;AmDnxKG;;EAEI,cAAA;EvBvEN,6BAAA;EACC,4BAAA;C5B61KF;AmDjxKG;;EAEI,iBAAA;EvBvEN,gCAAA;EACC,+BAAA;C5B21KF;AmD1yKD;EvB1DE,2BAAA;EACC,0BAAA;C5Bu2KF;AmD7wKD;EAEI,oBAAA;CnD8wKH;AmD3wKD;EACE,oBAAA;CnD6wKD;AmDrwKD;;;EAII,iBAAA;CnDswKH;AmD1wKD;;;EAOM,mBAAA;EACA,oBAAA;CnDwwKL;AmDhxKD;;EvBzGE,6BAAA;EACC,4BAAA;C5B63KF;AmDrxKD;;;;EAmBQ,4BAAA;EACA,6BAAA;CnDwwKP;AmD5xKD;;;;;;;;EAwBU,4BAAA;CnD8wKT;AmDtyKD;;;;;;;;EA4BU,6BAAA;CnDoxKT;AmDhzKD;;EvBjGE,gCAAA;EACC,+BAAA;C5Bq5KF;AmDrzKD;;;;EAyCQ,+BAAA;EACA,gCAAA;CnDkxKP;AmD5zKD;;;;;;;;EA8CU,+BAAA;CnDwxKT;AmDt0KD;;;;;;;;EAkDU,gCAAA;CnD8xKT;AmDh1KD;;;;EA2DI,2BAAA;CnD2xKH;AmDt1KD;;EA+DI,cAAA;CnD2xKH;AmD11KD;;EAmEI,UAAA;CnD2xKH;AmD91KD;;;;;;;;;;;;EA0EU,eAAA;CnDkyKT;AmD52KD;;;;;;;;;;;;EA8EU,gBAAA;CnD4yKT;AmD13KD;;;;;;;;EAuFU,iBAAA;CnD6yKT;AmDp4KD;;;;;;;;EAgGU,iBAAA;CnD8yKT;AmD94KD;EAsGI,UAAA;EACA,iBAAA;CnD2yKH;AmDjyKD;EACE,oBAAA;CnDmyKD;AmDpyKD;EAKI,iBAAA;EACA,mBAAA;CnDkyKH;AmDxyKD;EASM,gBAAA;CnDkyKL;AmD3yKD;EAcI,iBAAA;CnDgyKH;AmD9yKD;;EAkBM,2BAAA;CnDgyKL;AmDlzKD;EAuBI,cAAA;CnD8xKH;AmDrzKD;EAyBM,8BAAA;CnD+xKL;AmDxxKD;EC1PE,mBAAA;CpDqhLD;AoDnhLC;EACE,eAAA;EACA,0BAAA;EACA,mBAAA;CpDqhLH;AoDxhLC;EAMI,uBAAA;CpDqhLL;AoD3hLC;EASI,eAAA;EACA,0BAAA;CpDqhLL;AoDlhLC;EAEI,0BAAA;CpDmhLL;AmDvyKD;EC7PE,sBAAA;CpDuiLD;AoDriLC;EACE,YAAA;EACA,0BAAA;EACA,sBAAA;CpDuiLH;AoD1iLC;EAMI,0BAAA;CpDuiLL;AoD7iLC;EASI,eAAA;EACA,uBAAA;CpDuiLL;AoDpiLC;EAEI,6BAAA;CpDqiLL;AmDtzKD;EChQE,sBAAA;CpDyjLD;AoDvjLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpDyjLH;AoD5jLC;EAMI,0BAAA;CpDyjLL;AoD/jLC;EASI,eAAA;EACA,0BAAA;CpDyjLL;AoDtjLC;EAEI,6BAAA;CpDujLL;AmDr0KD;ECnQE,sBAAA;CpD2kLD;AoDzkLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD2kLH;AoD9kLC;EAMI,0BAAA;CpD2kLL;AoDjlLC;EASI,eAAA;EACA,0BAAA;CpD2kLL;AoDxkLC;EAEI,6BAAA;CpDykLL;AmDp1KD;ECtQE,sBAAA;CpD6lLD;AoD3lLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD6lLH;AoDhmLC;EAMI,0BAAA;CpD6lLL;AoDnmLC;EASI,eAAA;EACA,0BAAA;CpD6lLL;AoD1lLC;EAEI,6BAAA;CpD2lLL;AmDn2KD;ECzQE,sBAAA;CpD+mLD;AoD7mLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD+mLH;AoDlnLC;EAMI,0BAAA;CpD+mLL;AoDrnLC;EASI,eAAA;EACA,0BAAA;CpD+mLL;AoD5mLC;EAEI,6BAAA;CpD6mLL;AqD7nLD;EACE,mBAAA;EACA,eAAA;EACA,UAAA;EACA,WAAA;EACA,iBAAA;CrD+nLD;AqDpoLD;;;;;EAYI,mBAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,aAAA;EACA,YAAA;EACA,UAAA;CrD+nLH;AqD1nLD;EACE,uBAAA;CrD4nLD;AqDxnLD;EACE,oBAAA;CrD0nLD;AsDrpLD;EACE,iBAAA;EACA,cAAA;EACA,oBAAA;EACA,0BAAA;EACA,0BAAA;EACA,mBAAA;EjDwDA,wDAAA;EACQ,gDAAA;CLgmLT;AsD/pLD;EASI,mBAAA;EACA,kCAAA;CtDypLH;AsDppLD;EACE,cAAA;EACA,mBAAA;CtDspLD;AsDppLD;EACE,aAAA;EACA,mBAAA;CtDspLD;AuD5qLD;EACE,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,0BAAA;EjCRA,aAAA;EAGA,0BAAA;CtBqrLD;AuD7qLC;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;EjCfF,aAAA;EAGA,0BAAA;CtB6rLD;AuDzqLC;EACE,WAAA;EACA,gBAAA;EACA,wBAAA;EACA,UAAA;EACA,yBAAA;CvD2qLH;AwDhsLD;EACE,iBAAA;CxDksLD;AwD9rLD;EACE,cAAA;EACA,iBAAA;EACA,gBAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,kCAAA;EAIA,WAAA;CxD6rLD;AwD1rLC;EnD+GA,sCAAA;EACI,kCAAA;EACC,iCAAA;EACG,8BAAA;EAkER,oDAAA;EAEK,0CAAA;EACG,oCAAA;CL6gLT;AwDhsLC;EnD2GA,mCAAA;EACI,+BAAA;EACC,8BAAA;EACG,2BAAA;CLwlLT;AwDpsLD;EACE,mBAAA;EACA,iBAAA;CxDssLD;AwDlsLD;EACE,mBAAA;EACA,YAAA;EACA,aAAA;CxDosLD;AwDhsLD;EACE,mBAAA;EACA,uBAAA;EACA,uBAAA;EACA,qCAAA;EACA,mBAAA;EnDaA,iDAAA;EACQ,yCAAA;EmDZR,qCAAA;UAAA,6BAAA;EAEA,WAAA;CxDksLD;AwD9rLD;EACE,gBAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,uBAAA;CxDgsLD;AwD9rLC;ElCrEA,WAAA;EAGA,yBAAA;CtBowLD;AwDjsLC;ElCtEA,aAAA;EAGA,0BAAA;CtBwwLD;AwDhsLD;EACE,cAAA;EACA,iCAAA;CxDksLD;AwD9rLD;EACE,iBAAA;CxDgsLD;AwD5rLD;EACE,UAAA;EACA,wBAAA;CxD8rLD;AwDzrLD;EACE,mBAAA;EACA,cAAA;CxD2rLD;AwDvrLD;EACE,cAAA;EACA,kBAAA;EACA,8BAAA;CxDyrLD;AwD5rLD;EAQI,iBAAA;EACA,iBAAA;CxDurLH;AwDhsLD;EAaI,kBAAA;CxDsrLH;AwDnsLD;EAiBI,eAAA;CxDqrLH;AwDhrLD;EACE,mBAAA;EACA,aAAA;EACA,YAAA;EACA,aAAA;EACA,iBAAA;CxDkrLD;AwDhqLD;EAZE;IACE,aAAA;IACA,kBAAA;GxD+qLD;EwD7qLD;InDvEA,kDAAA;IACQ,0CAAA;GLuvLP;EwD5qLD;IAAY,aAAA;GxD+qLX;CACF;AwD1qLD;EAFE;IAAY,aAAA;GxDgrLX;CACF;AyD/zLD;EACE,mBAAA;EACA,cAAA;EACA,eAAA;ECRA,4DAAA;EAEA,mBAAA;EACA,oBAAA;EACA,uBAAA;EACA,iBAAA;EACA,wBAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mBAAA;EACA,qBAAA;EACA,kBAAA;EDHA,gBAAA;EnCVA,WAAA;EAGA,yBAAA;CtBs1LD;AyD30LC;EnCdA,aAAA;EAGA,0BAAA;CtB01LD;AyD90LC;EAAW,iBAAA;EAAmB,eAAA;CzDk1L/B;AyDj1LC;EAAW,iBAAA;EAAmB,eAAA;CzDq1L/B;AyDp1LC;EAAW,gBAAA;EAAmB,eAAA;CzDw1L/B;AyDv1LC;EAAW,kBAAA;EAAmB,eAAA;CzD21L/B;AyDv1LD;EACE,iBAAA;EACA,iBAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;EACA,mBAAA;CzDy1LD;AyDr1LD;EACE,mBAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,oBAAA;CzDu1LD;AyDn1LC;EACE,UAAA;EACA,UAAA;EACA,kBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,UAAA;EACA,WAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,UAAA;EACA,UAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,SAAA;EACA,QAAA;EACA,iBAAA;EACA,4BAAA;EACA,yBAAA;CzDq1LH;AyDn1LC;EACE,SAAA;EACA,SAAA;EACA,iBAAA;EACA,4BAAA;EACA,wBAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,UAAA;EACA,kBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,WAAA;EACA,iBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,UAAA;EACA,iBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;A2Dl7LD;EACE,mBAAA;EACA,OAAA;EACA,QAAA;EACA,cAAA;EACA,cAAA;EACA,iBAAA;EACA,aAAA;EDXA,4DAAA;EAEA,mBAAA;EACA,oBAAA;EACA,uBAAA;EACA,iBAAA;EACA,wBAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mBAAA;EACA,qBAAA;EACA,kBAAA;ECAA,gBAAA;EAEA,uBAAA;EACA,qCAAA;UAAA,6BAAA;EACA,uBAAA;EACA,qCAAA;EACA,mBAAA;EtD8CA,kDAAA;EACQ,0CAAA;CLk5LT;A2D77LC;EAAY,kBAAA;C3Dg8Lb;A2D/7LC;EAAY,kBAAA;C3Dk8Lb;A2Dj8LC;EAAY,iBAAA;C3Do8Lb;A2Dn8LC;EAAY,mBAAA;C3Ds8Lb;A2Dn8LD;EACE,UAAA;EACA,kBAAA;EACA,gBAAA;EACA,0BAAA;EACA,iCAAA;EACA,2BAAA;C3Dq8LD;A2Dl8LD;EACE,kBAAA;C3Do8LD;A2D57LC;;EAEE,mBAAA;EACA,eAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,oBAAA;C3D87LH;A2D37LD;EACE,mBAAA;C3D67LD;A2D37LD;EACE,mBAAA;EACA,YAAA;C3D67LD;A2Dz7LC;EACE,UAAA;EACA,mBAAA;EACA,uBAAA;EACA,0BAAA;EACA,sCAAA;EACA,cAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;EACA,uBAAA;C3D47LL;A2Dz7LC;EACE,SAAA;EACA,YAAA;EACA,kBAAA;EACA,qBAAA;EACA,4BAAA;EACA,wCAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,UAAA;EACA,cAAA;EACA,qBAAA;EACA,yBAAA;C3D47LL;A2Dz7LC;EACE,UAAA;EACA,mBAAA;EACA,oBAAA;EACA,6BAAA;EACA,yCAAA;EACA,WAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,SAAA;EACA,mBAAA;EACA,oBAAA;EACA,0BAAA;C3D47LL;A2Dx7LC;EACE,SAAA;EACA,aAAA;EACA,kBAAA;EACA,sBAAA;EACA,2BAAA;EACA,uCAAA;C3D07LH;A2Dz7LG;EACE,aAAA;EACA,WAAA;EACA,sBAAA;EACA,wBAAA;EACA,cAAA;C3D27LL;A4DpjMD;EACE,mBAAA;C5DsjMD;A4DnjMD;EACE,mBAAA;EACA,iBAAA;EACA,YAAA;C5DqjMD;A4DxjMD;EAMI,cAAA;EACA,mBAAA;EvD6KF,0CAAA;EACK,qCAAA;EACG,kCAAA;CLy4LT;A4D/jMD;;EAcM,eAAA;C5DqjML;A4D3hMC;EA4NF;IvD3DE,uDAAA;IAEK,6CAAA;IACG,uCAAA;IA7JR,oCAAA;IAEQ,4BAAA;IA+GR,4BAAA;IAEQ,oBAAA;GL86LP;E4DzjMG;;IvDmHJ,2CAAA;IACQ,mCAAA;IuDjHF,QAAA;G5D4jML;E4D1jMG;;IvD8GJ,4CAAA;IACQ,oCAAA;IuD5GF,QAAA;G5D6jML;E4D3jMG;;;IvDyGJ,wCAAA;IACQ,gCAAA;IuDtGF,QAAA;G5D8jML;CACF;A4DpmMD;;;EA6CI,eAAA;C5D4jMH;A4DzmMD;EAiDI,QAAA;C5D2jMH;A4D5mMD;;EAsDI,mBAAA;EACA,OAAA;EACA,YAAA;C5D0jMH;A4DlnMD;EA4DI,WAAA;C5DyjMH;A4DrnMD;EA+DI,YAAA;C5DyjMH;A4DxnMD;;EAmEI,QAAA;C5DyjMH;A4D5nMD;EAuEI,YAAA;C5DwjMH;A4D/nMD;EA0EI,WAAA;C5DwjMH;A4DhjMD;EACE,mBAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EtC9FA,aAAA;EAGA,0BAAA;EsC6FA,gBAAA;EACA,YAAA;EACA,mBAAA;EACA,0CAAA;EACA,mCAAA;C5DmjMD;A4D9iMC;EdnGE,mGAAA;EACA,8FAAA;EACA,qHAAA;EAAA,+FAAA;EACA,4BAAA;EACA,uHAAA;C9CopMH;A4DljMC;EACE,WAAA;EACA,SAAA;EdxGA,mGAAA;EACA,8FAAA;EACA,qHAAA;EAAA,+FAAA;EACA,4BAAA;EACA,uHAAA;C9C6pMH;A4DpjMC;;EAEE,WAAA;EACA,YAAA;EACA,sBAAA;EtCvHF,aAAA;EAGA,0BAAA;CtB4qMD;A4DtlMD;;;;EAuCI,mBAAA;EACA,SAAA;EACA,kBAAA;EACA,WAAA;EACA,sBAAA;C5DqjMH;A4DhmMD;;EA+CI,UAAA;EACA,mBAAA;C5DqjMH;A4DrmMD;;EAoDI,WAAA;EACA,oBAAA;C5DqjMH;A4D1mMD;;EAyDI,YAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;C5DqjMH;A4DhjMG;EACE,iBAAA;C5DkjML;A4D9iMG;EACE,iBAAA;C5DgjML;A4DtiMD;EACE,mBAAA;EACA,aAAA;EACA,UAAA;EACA,YAAA;EACA,WAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;C5DwiMD;A4DjjMD;EAYI,sBAAA;EACA,YAAA;EACA,aAAA;EACA,YAAA;EACA,oBAAA;EACA,uBAAA;EACA,oBAAA;EACA,gBAAA;EAWA,0BAAA;EACA,mCAAA;C5D8hMH;A4D7jMD;EAkCI,UAAA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;C5D8hMH;A4DvhMD;EACE,mBAAA;EACA,UAAA;EACA,WAAA;EACA,aAAA;EACA,YAAA;EACA,kBAAA;EACA,qBAAA;EACA,YAAA;EACA,mBAAA;EACA,0CAAA;C5DyhMD;A4DxhMC;EACE,kBAAA;C5D0hMH;A4Dj/LD;EAhCE;;;;IAKI,YAAA;IACA,aAAA;IACA,kBAAA;IACA,gBAAA;G5DmhMH;E4D3hMD;;IAYI,mBAAA;G5DmhMH;E4D/hMD;;IAgBI,oBAAA;G5DmhMH;E4D9gMD;IACE,UAAA;IACA,WAAA;IACA,qBAAA;G5DghMD;E4D5gMD;IACE,aAAA;G5D8gMD;CACF;A6D7wMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEE,aAAA;EACA,eAAA;C7D6yMH;A6D3yMC;;;;;;;;;;;;;;;;EACE,YAAA;C7D4zMH;AiCp0MD;E6BRE,eAAA;EACA,kBAAA;EACA,mBAAA;C9D+0MD;AiCt0MD;EACE,wBAAA;CjCw0MD;AiCt0MD;EACE,uBAAA;CjCw0MD;AiCh0MD;EACE,yBAAA;CjCk0MD;AiCh0MD;EACE,0BAAA;CjCk0MD;AiCh0MD;EACE,mBAAA;CjCk0MD;AiCh0MD;E8BzBE,YAAA;EACA,mBAAA;EACA,kBAAA;EACA,8BAAA;EACA,UAAA;C/D41MD;AiC9zMD;EACE,yBAAA;CjCg0MD;AiCzzMD;EACE,gBAAA;CjC2zMD;AgE51MD;EACE,oBAAA;ChE81MD;AgEx1MD;;;;ECdE,yBAAA;CjE42MD;AgEv1MD;;;;;;;;;;;;EAYE,yBAAA;ChEy1MD;AgEl1MD;EA6IA;IC7LE,0BAAA;GjEs4MC;EiEr4MD;IAAU,0BAAA;GjEw4MT;EiEv4MD;IAAU,8BAAA;GjE04MT;EiEz4MD;;IACU,+BAAA;GjE44MT;CACF;AgE51MD;EAwIA;IA1II,0BAAA;GhEk2MD;CACF;AgE51MD;EAmIA;IArII,2BAAA;GhEk2MD;CACF;AgE51MD;EA8HA;IAhII,iCAAA;GhEk2MD;CACF;AgE31MD;EAwHA;IC7LE,0BAAA;GjEo6MC;EiEn6MD;IAAU,0BAAA;GjEs6MT;EiEr6MD;IAAU,8BAAA;GjEw6MT;EiEv6MD;;IACU,+BAAA;GjE06MT;CACF;AgEr2MD;EAmHA;IArHI,0BAAA;GhE22MD;CACF;AgEr2MD;EA8GA;IAhHI,2BAAA;GhE22MD;CACF;AgEr2MD;EAyGA;IA3GI,iCAAA;GhE22MD;CACF;AgEp2MD;EAmGA;IC7LE,0BAAA;GjEk8MC;EiEj8MD;IAAU,0BAAA;GjEo8MT;EiEn8MD;IAAU,8BAAA;GjEs8MT;EiEr8MD;;IACU,+BAAA;GjEw8MT;CACF;AgE92MD;EA8FA;IAhGI,0BAAA;GhEo3MD;CACF;AgE92MD;EAyFA;IA3FI,2BAAA;GhEo3MD;CACF;AgE92MD;EAoFA;IAtFI,iCAAA;GhEo3MD;CACF;AgE72MD;EA8EA;IC7LE,0BAAA;GjEg+MC;EiE/9MD;IAAU,0BAAA;GjEk+MT;EiEj+MD;IAAU,8BAAA;GjEo+MT;EiEn+MD;;IACU,+BAAA;GjEs+MT;CACF;AgEv3MD;EAyEA;IA3EI,0BAAA;GhE63MD;CACF;AgEv3MD;EAoEA;IAtEI,2BAAA;GhE63MD;CACF;AgEv3MD;EA+DA;IAjEI,iCAAA;GhE63MD;CACF;AgEt3MD;EAyDA;ICrLE,yBAAA;GjEs/MC;CACF;AgEt3MD;EAoDA;ICrLE,yBAAA;GjE2/MC;CACF;AgEt3MD;EA+CA;ICrLE,yBAAA;GjEggNC;CACF;AgEt3MD;EA0CA;ICrLE,yBAAA;GjEqgNC;CACF;AgEn3MD;ECnJE,yBAAA;CjEygND;AgEh3MD;EA4BA;IC7LE,0BAAA;GjEqhNC;EiEphND;IAAU,0BAAA;GjEuhNT;EiEthND;IAAU,8BAAA;GjEyhNT;EiExhND;;IACU,+BAAA;GjE2hNT;CACF;AgE93MD;EACE,yBAAA;ChEg4MD;AgE33MD;EAqBA;IAvBI,0BAAA;GhEi4MD;CACF;AgE/3MD;EACE,yBAAA;ChEi4MD;AgE53MD;EAcA;IAhBI,2BAAA;GhEk4MD;CACF;AgEh4MD;EACE,yBAAA;ChEk4MD;AgE73MD;EAOA;IATI,iCAAA;GhEm4MD;CACF;AgE53MD;EACA;ICrLE,yBAAA;GjEojNC;CACF","file":"bootstrap.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\002a\";\n}\n.glyphicon-plus:before {\n content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n.glyphicon-cd:before {\n content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n content: \"\\e204\";\n}\n.glyphicon-copy:before {\n content: \"\\e205\";\n}\n.glyphicon-paste:before {\n content: \"\\e206\";\n}\n.glyphicon-alert:before {\n content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\e210\";\n}\n.glyphicon-king:before {\n content: \"\\e211\";\n}\n.glyphicon-queen:before {\n content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n content: \"\\e214\";\n}\n.glyphicon-knight:before {\n content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\e216\";\n}\n.glyphicon-tent:before {\n content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n content: \"\\e218\";\n}\n.glyphicon-bed:before {\n content: \"\\e219\";\n}\n.glyphicon-apple:before {\n content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\e227\";\n}\n.glyphicon-btc:before {\n content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n content: \"\\e227\";\n}\n.glyphicon-yen:before {\n content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\e232\";\n}\n.glyphicon-education:before {\n content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\e237\";\n}\n.glyphicon-oil:before {\n content: \"\\e238\";\n}\n.glyphicon-grain:before {\n content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\e253\";\n}\n.glyphicon-console:before {\n content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\e260\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #fff;\n background-color: #333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #ddd;\n}\n.table .table {\n background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #ddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999;\n}\n.form-control::-ms-expand {\n border: 0;\n background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eeeeee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"].form-control,\n input[type=\"time\"].form-control,\n input[type=\"datetime-local\"].form-control,\n input[type=\"month\"].form-control {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.form-group-sm select.form-control {\n height: 30px;\n line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n min-height: 32px;\n padding: 6px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.form-group-lg select.form-control {\n height: 46px;\n line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n min-height: 38px;\n padding: 11px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 11px;\n font-size: 18px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n font-size: 12px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none;\n}\n.btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n color: #333;\n background-color: #e6e6e6;\n border-color: #8c8c8c;\n}\n.btn-default:hover {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n color: #333;\n background-color: #d4d4d4;\n border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default .badge {\n color: #fff;\n background-color: #333;\n}\n.btn-primary {\n color: #fff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n color: #fff;\n background-color: #286090;\n border-color: #122b40;\n}\n.btn-primary:hover {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n color: #fff;\n background-color: #204d74;\n border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n color: #fff;\n background-color: #449d44;\n border-color: #255625;\n}\n.btn-success:hover {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n color: #fff;\n background-color: #398439;\n border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #fff;\n}\n.btn-info {\n color: #fff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n color: #fff;\n background-color: #31b0d5;\n border-color: #1b6d85;\n}\n.btn-info:hover {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n color: #fff;\n background-color: #269abc;\n border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #fff;\n}\n.btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n color: #fff;\n background-color: #ec971f;\n border-color: #985f0d;\n}\n.btn-warning:hover {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n color: #fff;\n background-color: #d58512;\n border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #fff;\n}\n.btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n color: #fff;\n background-color: #c9302c;\n border-color: #761c19;\n}\n.btn-danger:hover {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n color: #fff;\n background-color: #ac2925;\n border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #fff;\n}\n.btn-link {\n color: #337ab7;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-top: 4px solid \\9;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #fff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #fff;\n text-decoration: none;\n outline: 0;\n background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px dashed;\n border-bottom: 4px solid \\9;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group .form-control:focus {\n z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n z-index: 2;\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #fff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #fff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777;\n}\n.navbar-default .navbar-link:hover {\n color: #333;\n}\n.navbar-default .btn-link {\n color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #ccc;\n}\n.navbar-inverse {\n background-color: #222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #fff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #fff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #fff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #fff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\00a0\";\n padding: 0 5px;\n color: #ccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #337ab7;\n background-color: #fff;\n border: 1px solid #ddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n z-index: 2;\n color: #23527c;\n background-color: #eeeeee;\n border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 3;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #fff;\n border-color: #ddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #fff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #fff;\n line-height: 1;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding-top: 30px;\n padding-bottom: 30px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding-top: 48px;\n padding-bottom: 48px;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-object.img-thumbnail {\n max-width: none;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n text-decoration: none;\n color: #555;\n background-color: #f5f5f5;\n}\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #fff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #ddd;\n}\n.panel-default {\n border-color: #ddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n}\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #fff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 12px;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n right: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 14px;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #fff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #fff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform 0.6s ease-in-out;\n -moz-transition: -moz-transform 0.6s ease-in-out;\n -o-transition: -o-transform 0.6s ease-in-out;\n transition: transform 0.6s ease-in-out;\n -webkit-backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000px;\n -moz-perspective: 1000px;\n perspective: 1000px;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #fff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #fff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #fff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -10px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -10px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -10px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table !important;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table !important;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table !important;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table !important;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table !important;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS and IE text size adjust after device orientation change,\n// without disabling user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background-color: transparent;\n}\n\n//\n// Improve readability of focused elements when they are also in an\n// active/hover state.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n box-sizing: content-box; //2\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links that are fragment identifiers,\n // or use the `javascript:` pseudo protocol\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Bootstrap specific changes start\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n\n td,\n th {\n background-color: #fff !important;\n }\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n // Bootstrap specific changes end\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// Star\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('@{icon-font-path}@{icon-font-name}.eot');\n src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\002a\"; } }\n.glyphicon-plus { &:before { content: \"\\002b\"; } }\n.glyphicon-euro,\n.glyphicon-eur { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n.glyphicon-cd { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up { &:before { content: \"\\e204\"; } }\n.glyphicon-copy { &:before { content: \"\\e205\"; } }\n.glyphicon-paste { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer { &:before { content: \"\\e210\"; } }\n.glyphicon-king { &:before { content: \"\\e211\"; } }\n.glyphicon-queen { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop { &:before { content: \"\\e214\"; } }\n.glyphicon-knight { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula { &:before { content: \"\\e216\"; } }\n.glyphicon-tent { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard { &:before { content: \"\\e218\"; } }\n.glyphicon-bed { &:before { content: \"\\e219\"; } }\n.glyphicon-apple { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin { &:before { content: \"\\e227\"; } }\n.glyphicon-btc { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt { &:before { content: \"\\e227\"; } }\n.glyphicon-yen { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted { &:before { content: \"\\e232\"; } }\n.glyphicon-education { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window { &:before { content: \"\\e237\"; } }\n.glyphicon-oil { &:before { content: \"\\e238\"; } }\n.glyphicon-grain { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top { &:before { content: \"\\e253\"; } }\n.glyphicon-console { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n\n[role=\"button\"] {\n cursor: pointer;\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n // WebKit-specific. Other browsers will keep their default outline style.\n // (Initially tried to also force default via `outline: initial`,\n // but that seems to erroneously remove the outline in Firefox altogether.)\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 300;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n background-color: @state-warning-bg;\n padding: .2em;\n}\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n.text-nowrap { white-space: nowrap; }\n\n// Transformation\n.text-lowercase { text-transform: lowercase; }\n.text-uppercase { text-transform: uppercase; }\n.text-capitalize { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n dd {\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n\n @media (min-width: @dl-horizontal-breakpoint) {\n dt {\n float: left;\n width: (@dl-horizontal-offset - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @dl-horizontal-offset;\n }\n }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover,\n a&:focus {\n color: darken(@color, 10%);\n }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n background-color: @color;\n a&:hover,\n a&:focus {\n background-color: darken(@color, 10%);\n }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n margin-right: auto;\n margin-left: auto;\n padding-left: floor((@gutter / 2));\n padding-right: ceil((@gutter / 2));\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: ceil((@gutter / -2));\n margin-right: floor((@gutter / -2));\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: ceil((@grid-gutter-width / 2));\n padding-right: floor((@grid-gutter-width / 2));\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n .col-@{class}-push-0 {\n left: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n .col-@{class}-pull-0 {\n right: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n background-color: @table-bg;\n}\ncaption {\n padding-top: @table-cell-padding;\n padding-bottom: @table-cell-padding;\n color: @text-muted;\n text-align: left;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-of-type(odd) {\n background-color: @table-bg-accent;\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n background-color: @table-bg-hover;\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n @media screen and (max-width: @screen-xs-max) {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &:hover > .@{state},\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; // IE8-9\n line-height: normal;\n}\n\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius; // Note: This has no effect on s in CSS.\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Unstyle the caret on ``\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n display: inline-block;\n margin-bottom: 0; // For input.btn\n font-weight: @btn-font-weight;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n white-space: nowrap;\n .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);\n .user-select(none);\n\n &,\n &:active,\n &.active {\n &:focus,\n &.focus {\n .tab-focus();\n }\n }\n\n &:hover,\n &:focus,\n &.focus {\n color: @btn-default-color;\n text-decoration: none;\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n .opacity(.65);\n .box-shadow(none);\n }\n\n a& {\n &.disabled,\n fieldset[disabled] & {\n pointer-events: none; // Future-proof disabling of clicks on `` elements\n }\n }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n color: @link-color;\n font-weight: normal;\n border-radius: 0;\n\n &,\n &:active,\n &.active,\n &[disabled],\n fieldset[disabled] & {\n background-color: transparent;\n .box-shadow(none);\n }\n &,\n &:hover,\n &:focus,\n &:active {\n border-color: transparent;\n }\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n background-color: transparent;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @btn-link-disabled-color;\n text-decoration: none;\n }\n }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n // line-height: ensure even-numbered height of button next to large input\n .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);\n}\n.btn-sm {\n // line-height: ensure proper height of button next to small input\n .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n.btn-xs {\n .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n display: block;\n width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.btn-block {\n width: 100%;\n }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 25%);\n }\n &:hover {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n\n &:hover,\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 17%);\n border-color: darken(@border, 25%);\n }\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus,\n &.focus {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n opacity: 0;\n .transition(opacity .15s linear);\n &.in {\n opacity: 1;\n }\n}\n\n.collapse {\n display: none;\n\n &.in { display: block; }\n tr&.in { display: table-row; }\n tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n .transition-property(~\"height, visibility\");\n .transition-duration(.35s);\n .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: @caret-width-base dashed;\n border-top: @caret-width-base solid ~\"\\9\"; // IE8\n border-right: @caret-width-base solid transparent;\n border-left: @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: @zindex-dropdown;\n display: none; // none by default, but block on \"open\" of the menu\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0; // override default ul\n list-style: none;\n font-size: @font-size-base;\n text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n background-color: @dropdown-bg;\n border: 1px solid @dropdown-fallback-border; // IE8 fallback\n border: 1px solid @dropdown-border;\n border-radius: @border-radius-base;\n .box-shadow(0 6px 12px rgba(0,0,0,.175));\n background-clip: padding-box;\n\n // Aligns the dropdown menu to right\n //\n // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n &.pull-right {\n right: 0;\n left: auto;\n }\n\n // Dividers (basically an hr) within the dropdown\n .divider {\n .nav-divider(@dropdown-divider-bg);\n }\n\n // Links within the dropdown menu\n > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: @line-height-base;\n color: @dropdown-link-color;\n white-space: nowrap; // prevent links from randomly breaking onto new lines\n }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n &:hover,\n &:focus {\n text-decoration: none;\n color: @dropdown-link-hover-color;\n background-color: @dropdown-link-hover-bg;\n }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-active-color;\n text-decoration: none;\n outline: 0;\n background-color: @dropdown-link-active-bg;\n }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-disabled-color;\n }\n\n // Nuke hover/focus effects\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none; // Remove CSS gradient\n .reset-filter();\n cursor: @cursor-disabled;\n }\n}\n\n// Open state for the dropdown\n.open {\n // Show the menu\n > .dropdown-menu {\n display: block;\n }\n\n // Remove the outline when :focus is triggered\n > a {\n outline: 0;\n }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n left: auto; // Reset the default from `.dropdown-menu`\n right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: @font-size-small;\n line-height: @line-height-base;\n color: @dropdown-header-color;\n white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n // Reverse the caret\n .caret {\n border-top: 0;\n border-bottom: @caret-width-base dashed;\n border-bottom: @caret-width-base solid ~\"\\9\"; // IE8\n content: \"\";\n }\n // Different positioning for bottom up menu\n .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-right {\n .dropdown-menu {\n .dropdown-menu-right();\n }\n // Necessary for overrides of the default right aligned menu.\n // Will remove come v4 in all likelihood.\n .dropdown-menu-left {\n .dropdown-menu-left();\n }\n }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle; // match .btn alignment given font-size hack above\n > .btn {\n position: relative;\n float: left;\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active,\n &.active {\n z-index: 2;\n }\n }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n .btn + .btn,\n .btn + .btn-group,\n .btn-group + .btn,\n .btn-group + .btn-group {\n margin-left: -1px;\n }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n margin-left: -5px; // Offset the first child's margin\n &:extend(.clearfix all);\n\n .btn,\n .btn-group,\n .input-group {\n float: left;\n }\n > .btn,\n > .btn-group,\n > .input-group {\n margin-left: 5px;\n }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n margin-left: 0;\n &:not(:last-child):not(.dropdown-toggle) {\n .border-right-radius(0);\n }\n}\n// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-right-radius(0);\n }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n // Show no shadow for `.btn-link` since it has no other button styles.\n &.btn-link {\n .box-shadow(none);\n }\n}\n\n\n// Reposition the caret\n.btn .caret {\n margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n border-width: @caret-width-large @caret-width-large 0;\n border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n > .btn,\n > .btn-group,\n > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n }\n\n // Clear floats so dropdown menus can be properly placed\n > .btn-group {\n &:extend(.clearfix all);\n > .btn {\n float: none;\n }\n }\n\n > .btn + .btn,\n > .btn + .btn-group,\n > .btn-group + .btn,\n > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n }\n}\n\n.btn-group-vertical > .btn {\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n &:first-child:not(:last-child) {\n .border-top-radius(@btn-border-radius-base);\n .border-bottom-radius(0);\n }\n &:last-child:not(:first-child) {\n .border-top-radius(0);\n .border-bottom-radius(@btn-border-radius-base);\n }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-bottom-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n > .btn,\n > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n }\n > .btn-group .btn {\n width: 100%;\n }\n\n > .btn-group .dropdown-menu {\n left: auto;\n }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n > .btn,\n > .btn-group > .btn {\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0,0,0,0);\n pointer-events: none;\n }\n }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n position: relative; // For dropdowns\n display: table;\n border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n // Undo padding and float of grid classes\n &[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n }\n\n .form-control {\n // Ensure that the input is always above the *appended* addon button for\n // proper border colors.\n position: relative;\n z-index: 2;\n\n // IE9 fubars the placeholder attribute in text inputs and the arrows on\n // select elements in input groups. To fix it, we float the input. Details:\n // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n float: left;\n\n width: 100%;\n margin-bottom: 0;\n\n &:focus {\n z-index: 3;\n }\n }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 1;\n color: @input-color;\n text-align: center;\n background-color: @input-group-addon-bg;\n border: 1px solid @input-group-addon-border-color;\n border-radius: @input-border-radius;\n\n // Sizing\n &.input-sm {\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n border-radius: @input-border-radius-small;\n }\n &.input-lg {\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n border-radius: @input-border-radius-large;\n }\n\n // Nuke default margins from checkboxes and radios to vertically center within.\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n margin-top: 0;\n }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n .border-right-radius(0);\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n .border-left-radius(0);\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n position: relative;\n // Jankily prevent input button groups from wrapping with `white-space` and\n // `font-size` in combination with `inline-block` on buttons.\n font-size: 0;\n white-space: nowrap;\n\n // Negative margin for spacing, position for bringing hovered/focused/actived\n // element above the siblings.\n > .btn {\n position: relative;\n + .btn {\n margin-left: -1px;\n }\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active {\n z-index: 2;\n }\n }\n\n // Negative margin to only have a 1px border between the two\n &:first-child {\n > .btn,\n > .btn-group {\n margin-right: -1px;\n }\n }\n &:last-child {\n > .btn,\n > .btn-group {\n z-index: 2;\n margin-left: -1px;\n }\n }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n margin-bottom: 0;\n padding-left: 0; // Override default ul/ol\n list-style: none;\n &:extend(.clearfix all);\n\n > li {\n position: relative;\n display: block;\n\n > a {\n position: relative;\n display: block;\n padding: @nav-link-padding;\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @nav-link-hover-bg;\n }\n }\n\n // Disabled state sets text to gray and nukes hover/tab effects\n &.disabled > a {\n color: @nav-disabled-link-color;\n\n &:hover,\n &:focus {\n color: @nav-disabled-link-hover-color;\n text-decoration: none;\n background-color: transparent;\n cursor: @cursor-disabled;\n }\n }\n }\n\n // Open dropdowns\n .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @nav-link-hover-bg;\n border-color: @link-color;\n }\n }\n\n // Nav dividers (deprecated with v3.0.1)\n //\n // This should have been removed in v3 with the dropping of `.nav-list`, but\n // we missed it. We don't currently support this anywhere, but in the interest\n // of maintaining backward compatibility in case you use it, it's deprecated.\n .nav-divider {\n .nav-divider();\n }\n\n // Prevent IE8 from misplacing imgs\n //\n // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n > li > a > img {\n max-width: none;\n }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n border-bottom: 1px solid @nav-tabs-border-color;\n > li {\n float: left;\n // Make the list-items overlay the bottom border\n margin-bottom: -1px;\n\n // Actual tabs (as links)\n > a {\n margin-right: 2px;\n line-height: @line-height-base;\n border: 1px solid transparent;\n border-radius: @border-radius-base @border-radius-base 0 0;\n &:hover {\n border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n }\n }\n\n // Active state, and its :hover to override normal :hover\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-tabs-active-link-hover-color;\n background-color: @nav-tabs-active-link-hover-bg;\n border: 1px solid @nav-tabs-active-link-hover-border-color;\n border-bottom-color: transparent;\n cursor: default;\n }\n }\n }\n // pulling this in mainly for less shorthand\n &.nav-justified {\n .nav-justified();\n .nav-tabs-justified();\n }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n > li {\n float: left;\n\n // Links rendered as pills\n > a {\n border-radius: @nav-pills-border-radius;\n }\n + li {\n margin-left: 2px;\n }\n\n // Active state\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-pills-active-link-hover-color;\n background-color: @nav-pills-active-link-hover-bg;\n }\n }\n }\n}\n\n\n// Stacked pills\n.nav-stacked {\n > li {\n float: none;\n + li {\n margin-top: 2px;\n margin-left: 0; // no need for this gap between nav items\n }\n }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n width: 100%;\n\n > li {\n float: none;\n > a {\n text-align: center;\n margin-bottom: 5px;\n }\n }\n\n > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n }\n\n @media (min-width: @screen-sm-min) {\n > li {\n display: table-cell;\n width: 1%;\n > a {\n margin-bottom: 0;\n }\n }\n }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n border-bottom: 0;\n\n > li > a {\n // Override margin from .nav-tabs\n margin-right: 0;\n border-radius: @border-radius-base;\n }\n\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border: 1px solid @nav-tabs-justified-link-border-color;\n }\n\n @media (min-width: @screen-sm-min) {\n > li > a {\n border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n border-radius: @border-radius-base @border-radius-base 0 0;\n }\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border-bottom-color: @nav-tabs-justified-active-link-border-color;\n }\n }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n > .tab-pane {\n display: none;\n }\n > .active {\n display: block;\n }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n // make dropdown border overlap tab border\n margin-top: -1px;\n // Remove the top rounded corners here since there is a hard edge above the menu\n .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n position: relative;\n min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n margin-bottom: @navbar-margin-bottom;\n border: 1px solid transparent;\n\n // Prevent floats from breaking the navbar\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: @navbar-border-radius;\n }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n overflow-x: visible;\n padding-right: @navbar-padding-horizontal;\n padding-left: @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n &:extend(.clearfix all);\n -webkit-overflow-scrolling: touch;\n\n &.in {\n overflow-y: auto;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border-top: 0;\n box-shadow: none;\n\n &.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0; // Override default setting\n overflow: visible !important;\n }\n\n &.in {\n overflow-y: visible;\n }\n\n // Undo the collapse side padding for navbars with containers to ensure\n // alignment of right-aligned contents.\n .navbar-fixed-top &,\n .navbar-static-top &,\n .navbar-fixed-bottom & {\n padding-left: 0;\n padding-right: 0;\n }\n }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n .navbar-collapse {\n max-height: @navbar-collapse-max-height;\n\n @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n max-height: 200px;\n }\n }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n > .navbar-header,\n > .navbar-collapse {\n margin-right: -@navbar-padding-horizontal;\n margin-left: -@navbar-padding-horizontal;\n\n @media (min-width: @grid-float-breakpoint) {\n margin-right: 0;\n margin-left: 0;\n }\n }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n z-index: @zindex-navbar;\n border-width: 0 0 1px;\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: @zindex-navbar-fixed;\n\n // Undo the rounded corners\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0; // override .navbar defaults\n border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n float: left;\n padding: @navbar-padding-vertical @navbar-padding-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-computed;\n height: @navbar-height;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n > img {\n display: block;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n .navbar > .container &,\n .navbar > .container-fluid & {\n margin-left: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: @navbar-padding-horizontal;\n padding: 9px 10px;\n .navbar-vertical-align(34px);\n background-color: transparent;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n border-radius: @border-radius-base;\n\n // We remove the `outline` here, but later compensate by attaching `:hover`\n // styles to `:focus`.\n &:focus {\n outline: 0;\n }\n\n // Bars\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n }\n .icon-bar + .icon-bar {\n margin-top: 4px;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n display: none;\n }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: @line-height-computed;\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n > li > a,\n .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n > li > a {\n line-height: @line-height-computed;\n &:hover,\n &:focus {\n background-image: none;\n }\n }\n }\n }\n\n // Uncollapse the nav\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin: 0;\n\n > li {\n float: left;\n > a {\n padding-top: @navbar-padding-vertical;\n padding-bottom: @navbar-padding-vertical;\n }\n }\n }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n margin-left: -@navbar-padding-horizontal;\n margin-right: -@navbar-padding-horizontal;\n padding: 10px @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n\n // Mixin behavior for optimum display\n .form-inline();\n\n .form-group {\n @media (max-width: @grid-float-breakpoint-max) {\n margin-bottom: 5px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n\n // Vertically center in expanded, horizontal navbar\n .navbar-vertical-align(@input-height-base);\n\n // Undo 100% width for pull classes\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n .box-shadow(none);\n }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n .border-top-radius(@navbar-border-radius);\n .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n .navbar-vertical-align(@input-height-base);\n\n &.btn-sm {\n .navbar-vertical-align(@input-height-small);\n }\n &.btn-xs {\n .navbar-vertical-align(22);\n }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n .navbar-vertical-align(@line-height-computed);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin-left: @navbar-padding-horizontal;\n margin-right: @navbar-padding-horizontal;\n }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-left { .pull-left(); }\n .navbar-right {\n .pull-right();\n margin-right: -@navbar-padding-horizontal;\n\n ~ .navbar-right {\n margin-right: 0;\n }\n }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n background-color: @navbar-default-bg;\n border-color: @navbar-default-border;\n\n .navbar-brand {\n color: @navbar-default-brand-color;\n &:hover,\n &:focus {\n color: @navbar-default-brand-hover-color;\n background-color: @navbar-default-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-default-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-default-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n\n .navbar-toggle {\n border-color: @navbar-default-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-default-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-default-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: @navbar-default-border;\n }\n\n // Dropdown menu items\n .navbar-nav {\n // Remove background color from open dropdown\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-default-link-active-bg;\n color: @navbar-default-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n > li > a {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n }\n }\n\n\n // Links in navbars\n //\n // Add a class to ensure links outside the navbar nav are colored correctly.\n\n .navbar-link {\n color: @navbar-default-link-color;\n &:hover {\n color: @navbar-default-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n }\n }\n }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n background-color: @navbar-inverse-bg;\n border-color: @navbar-inverse-border;\n\n .navbar-brand {\n color: @navbar-inverse-brand-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-brand-hover-color;\n background-color: @navbar-inverse-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-inverse-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-inverse-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n\n // Darken the responsive nav toggle\n .navbar-toggle {\n border-color: @navbar-inverse-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-inverse-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-inverse-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: darken(@navbar-inverse-bg, 7%);\n }\n\n // Dropdowns\n .navbar-nav {\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-inverse-link-active-bg;\n color: @navbar-inverse-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display\n .open .dropdown-menu {\n > .dropdown-header {\n border-color: @navbar-inverse-border;\n }\n .divider {\n background-color: @navbar-inverse-border;\n }\n > li > a {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n }\n }\n\n .navbar-link {\n color: @navbar-inverse-link-color;\n &:hover {\n color: @navbar-inverse-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n }\n }\n }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n .clearfix();\n}\n.center-block {\n .center-block();\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n margin-bottom: @line-height-computed;\n list-style: none;\n background-color: @breadcrumb-bg;\n border-radius: @border-radius-base;\n\n > li {\n display: inline-block;\n\n + li:before {\n content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n padding: 0 5px;\n color: @breadcrumb-color;\n }\n }\n\n > .active {\n color: @breadcrumb-active-color;\n }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: @line-height-computed 0;\n border-radius: @border-radius-base;\n\n > li {\n display: inline; // Remove list-style and block-level defaults\n > a,\n > span {\n position: relative;\n float: left; // Collapse white-space\n padding: @padding-base-vertical @padding-base-horizontal;\n line-height: @line-height-base;\n text-decoration: none;\n color: @pagination-color;\n background-color: @pagination-bg;\n border: 1px solid @pagination-border;\n margin-left: -1px;\n }\n &:first-child {\n > a,\n > span {\n margin-left: 0;\n .border-left-radius(@border-radius-base);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius-base);\n }\n }\n }\n\n > li > a,\n > li > span {\n &:hover,\n &:focus {\n z-index: 2;\n color: @pagination-hover-color;\n background-color: @pagination-hover-bg;\n border-color: @pagination-hover-border;\n }\n }\n\n > .active > a,\n > .active > span {\n &,\n &:hover,\n &:focus {\n z-index: 3;\n color: @pagination-active-color;\n background-color: @pagination-active-bg;\n border-color: @pagination-active-border;\n cursor: default;\n }\n }\n\n > .disabled {\n > span,\n > span:hover,\n > span:focus,\n > a,\n > a:hover,\n > a:focus {\n color: @pagination-disabled-color;\n background-color: @pagination-disabled-bg;\n border-color: @pagination-disabled-border;\n cursor: @cursor-disabled;\n }\n }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n padding-left: 0;\n margin: @line-height-computed 0;\n list-style: none;\n text-align: center;\n &:extend(.clearfix all);\n li {\n display: inline;\n > a,\n > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: @pager-bg;\n border: 1px solid @pager-border;\n border-radius: @pager-border-radius;\n }\n\n > a:hover,\n > a:focus {\n text-decoration: none;\n background-color: @pager-hover-bg;\n }\n }\n\n .next {\n > a,\n > span {\n float: right;\n }\n }\n\n .previous {\n > a,\n > span {\n float: left;\n }\n }\n\n .disabled {\n > a,\n > a:hover,\n > a:focus,\n > span {\n color: @pager-disabled-color;\n background-color: @pager-bg;\n cursor: @cursor-disabled;\n }\n }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: @label-color;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n\n // Add hover effects, but only for links\n a& {\n &:hover,\n &:focus {\n color: @label-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Empty labels collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for labels in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n .label-variant(@label-default-bg);\n}\n\n.label-primary {\n .label-variant(@label-primary-bg);\n}\n\n.label-success {\n .label-variant(@label-success-bg);\n}\n\n.label-info {\n .label-variant(@label-info-bg);\n}\n\n.label-warning {\n .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n background-color: @color;\n\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: @font-size-small;\n font-weight: @badge-font-weight;\n color: @badge-color;\n line-height: @badge-line-height;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: @badge-bg;\n border-radius: @badge-border-radius;\n\n // Empty badges collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for badges in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n\n .btn-xs &,\n .btn-group-xs > .btn & {\n top: 0;\n padding: 1px 5px;\n }\n\n // Hover state, but only for links\n a& {\n &:hover,\n &:focus {\n color: @badge-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Account for badges in navs\n .list-group-item.active > &,\n .nav-pills > .active > a > & {\n color: @badge-active-color;\n background-color: @badge-active-bg;\n }\n\n .list-group-item > & {\n float: right;\n }\n\n .list-group-item > & + & {\n margin-right: 5px;\n }\n\n .nav-pills > li > a > & {\n margin-left: 3px;\n }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n padding-top: @jumbotron-padding;\n padding-bottom: @jumbotron-padding;\n margin-bottom: @jumbotron-padding;\n color: @jumbotron-color;\n background-color: @jumbotron-bg;\n\n h1,\n .h1 {\n color: @jumbotron-heading-color;\n }\n\n p {\n margin-bottom: (@jumbotron-padding / 2);\n font-size: @jumbotron-font-size;\n font-weight: 200;\n }\n\n > hr {\n border-top-color: darken(@jumbotron-bg, 10%);\n }\n\n .container &,\n .container-fluid & {\n border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n\n .container {\n max-width: 100%;\n }\n\n @media screen and (min-width: @screen-sm-min) {\n padding-top: (@jumbotron-padding * 1.6);\n padding-bottom: (@jumbotron-padding * 1.6);\n\n .container &,\n .container-fluid & {\n padding-left: (@jumbotron-padding * 2);\n padding-right: (@jumbotron-padding * 2);\n }\n\n h1,\n .h1 {\n font-size: @jumbotron-heading-font-size;\n }\n }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n display: block;\n padding: @thumbnail-padding;\n margin-bottom: @line-height-computed;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(border .2s ease-in-out);\n\n > img,\n a > img {\n &:extend(.img-responsive);\n margin-left: auto;\n margin-right: auto;\n }\n\n // Add a hover state for linked versions only\n a&:hover,\n a&:focus,\n a&.active {\n border-color: @link-color;\n }\n\n // Image captions\n .caption {\n padding: @thumbnail-caption-padding;\n color: @thumbnail-caption-color;\n }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n padding: @alert-padding;\n margin-bottom: @line-height-computed;\n border: 1px solid transparent;\n border-radius: @alert-border-radius;\n\n // Headings for larger alerts\n h4 {\n margin-top: 0;\n // Specified for the h4 to prevent conflicts of changing @headings-color\n color: inherit;\n }\n\n // Provide class for links that match alerts\n .alert-link {\n font-weight: @alert-link-font-weight;\n }\n\n // Improve alignment and spacing of inner content\n > p,\n > ul {\n margin-bottom: 0;\n }\n\n > p + p {\n margin-top: 5px;\n }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n padding-right: (@alert-padding + 20);\n\n // Adjust close link position\n .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n overflow: hidden;\n height: @line-height-computed;\n margin-bottom: @line-height-computed;\n background-color: @progress-bg;\n border-radius: @progress-border-radius;\n .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: @font-size-small;\n line-height: @line-height-computed;\n color: @progress-bar-color;\n text-align: center;\n background-color: @progress-bar-bg;\n .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n #gradient > .striped();\n background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n background-color: @color;\n\n // Deprecated parent class requirement as of v3.2.0\n .progress-striped & {\n #gradient > .striped();\n }\n}\n",".media {\n // Proper spacing between instances of .media\n margin-top: 15px;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n\n.media-body {\n width: 10000px;\n}\n\n.media-object {\n display: block;\n\n // Fix collapse in webkit from max-width: 100% and display: table-cell.\n &.img-thumbnail {\n max-width: none;\n }\n}\n\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n\n.media-middle {\n vertical-align: middle;\n}\n\n.media-bottom {\n vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on
    ,
      , or
      .\n\n.list-group {\n // No need to set list-style: none; since .list-group-item is block level\n margin-bottom: 20px;\n padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n // Place the border on the list items and negative margin up for better styling\n margin-bottom: -1px;\n background-color: @list-group-bg;\n border: 1px solid @list-group-border;\n\n // Round the first and last items\n &:first-child {\n .border-top-radius(@list-group-border-radius);\n }\n &:last-child {\n margin-bottom: 0;\n .border-bottom-radius(@list-group-border-radius);\n }\n}\n\n\n// Interactive list items\n//\n// Use anchor or button elements instead of `li`s or `div`s to create interactive items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item,\nbutton.list-group-item {\n color: @list-group-link-color;\n\n .list-group-item-heading {\n color: @list-group-link-heading-color;\n }\n\n // Hover state\n &:hover,\n &:focus {\n text-decoration: none;\n color: @list-group-link-hover-color;\n background-color: @list-group-hover-bg;\n }\n}\n\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n\n.list-group-item {\n // Disabled state\n &.disabled,\n &.disabled:hover,\n &.disabled:focus {\n background-color: @list-group-disabled-bg;\n color: @list-group-disabled-color;\n cursor: @cursor-disabled;\n\n // Force color to inherit for custom content\n .list-group-item-heading {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-disabled-text-color;\n }\n }\n\n // Active class on item itself, not parent\n &.active,\n &.active:hover,\n &.active:focus {\n z-index: 2; // Place active items above their siblings for proper border styling\n color: @list-group-active-color;\n background-color: @list-group-active-bg;\n border-color: @list-group-active-border;\n\n // Force color to inherit for custom content\n .list-group-item-heading,\n .list-group-item-heading > small,\n .list-group-item-heading > .small {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-active-text-color;\n }\n }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n","// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a&,\n button& {\n color: @color;\n\n .list-group-item-heading {\n color: inherit;\n }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n margin-bottom: @line-height-computed;\n background-color: @panel-bg;\n border: 1px solid transparent;\n border-radius: @panel-border-radius;\n .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n padding: @panel-body-padding;\n &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n padding: @panel-heading-padding;\n border-bottom: 1px solid transparent;\n .border-top-radius((@panel-border-radius - 1));\n\n > .dropdown .dropdown-toggle {\n color: inherit;\n }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: ceil((@font-size-base * 1.125));\n color: inherit;\n\n > a,\n > small,\n > .small,\n > small > a,\n > .small > a {\n color: inherit;\n }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n padding: @panel-footer-padding;\n background-color: @panel-footer-bg;\n border-top: 1px solid @panel-inner-border;\n .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n > .list-group,\n > .panel-collapse > .list-group {\n margin-bottom: 0;\n\n .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n }\n\n // Add border top radius for first one\n &:first-child {\n .list-group-item:first-child {\n border-top: 0;\n .border-top-radius((@panel-border-radius - 1));\n }\n }\n\n // Add border bottom radius for last one\n &:last-child {\n .list-group-item:last-child {\n border-bottom: 0;\n .border-bottom-radius((@panel-border-radius - 1));\n }\n }\n }\n > .panel-heading + .panel-collapse > .list-group {\n .list-group-item:first-child {\n .border-top-radius(0);\n }\n }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n .list-group-item:first-child {\n border-top-width: 0;\n }\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n > .table,\n > .table-responsive > .table,\n > .panel-collapse > .table {\n margin-bottom: 0;\n\n caption {\n padding-left: @panel-body-padding;\n padding-right: @panel-body-padding;\n }\n }\n // Add border top radius for first one\n > .table:first-child,\n > .table-responsive:first-child > .table:first-child {\n .border-top-radius((@panel-border-radius - 1));\n\n > thead:first-child,\n > tbody:first-child {\n > tr:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n border-top-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-top-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n // Add border bottom radius for last one\n > .table:last-child,\n > .table-responsive:last-child > .table:last-child {\n .border-bottom-radius((@panel-border-radius - 1));\n\n > tbody:last-child,\n > tfoot:last-child {\n > tr:last-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n border-bottom-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-bottom-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n > .panel-body + .table,\n > .panel-body + .table-responsive,\n > .table + .panel-body,\n > .table-responsive + .panel-body {\n border-top: 1px solid @table-border-color;\n }\n > .table > tbody:first-child > tr:first-child th,\n > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n }\n > .table-bordered,\n > .table-responsive > .table-bordered {\n border: 0;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n > thead,\n > tbody {\n > tr:first-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n > tbody,\n > tfoot {\n > tr:last-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n }\n > .table-responsive {\n border: 0;\n margin-bottom: 0;\n }\n}\n\n\n// Collapsible panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n margin-bottom: @line-height-computed;\n\n // Tighten up margin so it's only between panels\n .panel {\n margin-bottom: 0;\n border-radius: @panel-border-radius;\n\n + .panel {\n margin-top: 5px;\n }\n }\n\n .panel-heading {\n border-bottom: 0;\n\n + .panel-collapse > .panel-body,\n + .panel-collapse > .list-group {\n border-top: 1px solid @panel-inner-border;\n }\n }\n\n .panel-footer {\n border-top: 0;\n + .panel-collapse .panel-body {\n border-bottom: 1px solid @panel-inner-border;\n }\n }\n}\n\n\n// Contextual variations\n.panel-default {\n .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse > .panel-body {\n border-top-color: @border;\n }\n .badge {\n color: @heading-bg-color;\n background-color: @heading-text-color;\n }\n }\n & > .panel-footer {\n + .panel-collapse > .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n","// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n\n .embed-responsive-item,\n iframe,\n embed,\n object,\n video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n }\n}\n\n// Modifier class for 16:9 aspect ratio\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n\n// Modifier class for 4:3 aspect ratio\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: @well-bg;\n border: 1px solid @well-border;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n blockquote {\n border-color: #ddd;\n border-color: rgba(0,0,0,.15);\n }\n}\n\n// Sizes\n.well-lg {\n padding: 24px;\n border-radius: @border-radius-large;\n}\n.well-sm {\n padding: 9px;\n border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n float: right;\n font-size: (@font-size-base * 1.5);\n font-weight: @close-font-weight;\n line-height: 1;\n color: @close-color;\n text-shadow: @close-text-shadow;\n .opacity(.2);\n\n &:hover,\n &:focus {\n color: @close-color;\n text-decoration: none;\n cursor: pointer;\n .opacity(.5);\n }\n\n // Additional properties for button version\n // iOS requires the button element instead of an anchor tag.\n // If you want the anchor version, it requires `href=\"#\"`.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n button& {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open - body class for killing the scroll\n// .modal - container to scroll within\n// .modal-dialog - positioning shell for the actual modal\n// .modal-content - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n\n // When fading in the modal, animate it to slide down\n &.fade .modal-dialog {\n .translate(0, -25%);\n .transition-transform(~\"0.3s ease-out\");\n }\n &.in .modal-dialog { .translate(0, 0) }\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 3px 9px rgba(0,0,0,.5));\n background-clip: padding-box;\n // Remove focus outline from opened modal\n outline: 0;\n}\n\n// Modal background\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal-background;\n background-color: @modal-backdrop-bg;\n // Fade for backdrop\n &.fade { .opacity(0); }\n &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n &:extend(.clearfix all);\n}\n// Close icon\n.modal-header .close {\n margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n margin: 0;\n line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n position: relative;\n padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n padding: @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n}\n\n// Measure scrollbar width for padding body during modal show/hide\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n // Automatically set modal's width for larger viewports\n .modal-dialog {\n width: @modal-md;\n margin: 30px auto;\n }\n .modal-content {\n .box-shadow(0 5px 15px rgba(0,0,0,.5));\n }\n\n // Modal sizes\n .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n position: absolute;\n z-index: @zindex-tooltip;\n display: block;\n // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-small;\n\n .opacity(0);\n\n &.in { .opacity(@tooltip-opacity); }\n &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }\n &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }\n &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }\n &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n max-width: @tooltip-max-width;\n padding: 3px 8px;\n color: @tooltip-color;\n text-align: center;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1\n.tooltip {\n &.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-left .tooltip-arrow {\n bottom: 0;\n right: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-right .tooltip-arrow {\n bottom: 0;\n left: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n border-right-color: @tooltip-arrow-color;\n }\n &.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-left-color: @tooltip-arrow-color;\n }\n &.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-left .tooltip-arrow {\n top: 0;\n right: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-right .tooltip-arrow {\n top: 0;\n left: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n}\n",".reset-text() {\n font-family: @font-family-base;\n // We deliberately do NOT reset font-size.\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: @line-height-base;\n text-align: left; // Fallback for where `start` is not supported\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: @zindex-popover;\n display: none;\n max-width: @popover-max-width;\n padding: 1px;\n // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-base;\n\n background-color: @popover-bg;\n background-clip: padding-box;\n border: 1px solid @popover-fallback-border-color;\n border: 1px solid @popover-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n // Offset the popover to account for the popover arrow\n &.top { margin-top: -@popover-arrow-width; }\n &.right { margin-left: @popover-arrow-width; }\n &.bottom { margin-top: @popover-arrow-width; }\n &.left { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n margin: 0; // reset heading margin\n padding: 8px 14px;\n font-size: @font-size-base;\n background-color: @popover-title-bg;\n border-bottom: 1px solid darken(@popover-title-bg, 5%);\n border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;\n}\n\n.popover-content {\n padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n &,\n &:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n}\n.popover > .arrow {\n border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n border-width: @popover-arrow-width;\n content: \"\";\n}\n\n.popover {\n &.top > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-top-color: @popover-arrow-outer-color;\n bottom: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n bottom: 1px;\n margin-left: -@popover-arrow-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-color;\n }\n }\n &.right > .arrow {\n top: 50%;\n left: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-right-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n left: 1px;\n bottom: -@popover-arrow-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-color;\n }\n }\n &.bottom > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-bottom-color: @popover-arrow-outer-color;\n top: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n top: 1px;\n margin-left: -@popover-arrow-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-color;\n }\n }\n\n &.left > .arrow {\n top: 50%;\n right: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-right-width: 0;\n border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-left-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: @popover-arrow-color;\n bottom: -@popover-arrow-width;\n }\n }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n position: relative;\n}\n\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n\n > .item {\n display: none;\n position: relative;\n .transition(.6s ease-in-out left);\n\n // Account for jankitude on images\n > img,\n > a > img {\n &:extend(.img-responsive);\n line-height: 1;\n }\n\n // WebKit CSS3 transforms for supported devices\n @media all and (transform-3d), (-webkit-transform-3d) {\n .transition-transform(~'0.6s ease-in-out');\n .backface-visibility(~'hidden');\n .perspective(1000px);\n\n &.next,\n &.active.right {\n .translate3d(100%, 0, 0);\n left: 0;\n }\n &.prev,\n &.active.left {\n .translate3d(-100%, 0, 0);\n left: 0;\n }\n &.next.left,\n &.prev.right,\n &.active {\n .translate3d(0, 0, 0);\n left: 0;\n }\n }\n }\n\n > .active,\n > .next,\n > .prev {\n display: block;\n }\n\n > .active {\n left: 0;\n }\n\n > .next,\n > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n > .next {\n left: 100%;\n }\n > .prev {\n left: -100%;\n }\n > .next.left,\n > .prev.right {\n left: 0;\n }\n\n > .active.left {\n left: -100%;\n }\n > .active.right {\n left: 100%;\n }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: @carousel-control-width;\n .opacity(@carousel-control-opacity);\n font-size: @carousel-control-font-size;\n color: @carousel-control-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug\n // We can't have this transition here because WebKit cancels the carousel\n // animation if you trip this while in the middle of another animation.\n\n // Set gradients for backgrounds\n &.left {\n #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n }\n &.right {\n left: auto;\n right: 0;\n #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n }\n\n // Hover/focus state\n &:hover,\n &:focus {\n outline: 0;\n color: @carousel-control-color;\n text-decoration: none;\n .opacity(.9);\n }\n\n // Toggles\n .icon-prev,\n .icon-next,\n .glyphicon-chevron-left,\n .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n }\n .icon-prev,\n .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n }\n .icon-next,\n .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n }\n .icon-prev,\n .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n }\n\n\n .icon-prev {\n &:before {\n content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n }\n }\n .icon-next {\n &:before {\n content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n }\n }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n\n li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid @carousel-indicator-border-color;\n border-radius: 10px;\n cursor: pointer;\n\n // IE8-9 hack for event handling\n //\n // Internet Explorer 8-9 does not support clicks on elements without a set\n // `background-color`. We cannot use `filter` since that's not viewed as a\n // background color by the browser. Thus, a hack is needed.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer\n //\n // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n // set alpha transparency for the best results possible.\n background-color: #000 \\9; // IE8\n background-color: rgba(0,0,0,0); // IE9\n }\n .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: @carousel-indicator-active-bg;\n }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: @carousel-caption-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n & .btn {\n text-shadow: none; // No shadow for button elements in carousel-caption\n }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n // Scale up the controls a smidge\n .carousel-control {\n .glyphicon-chevron-left,\n .glyphicon-chevron-right,\n .icon-prev,\n .icon-next {\n width: (@carousel-control-font-size * 1.5);\n height: (@carousel-control-font-size * 1.5);\n margin-top: (@carousel-control-font-size / -2);\n font-size: (@carousel-control-font-size * 1.5);\n }\n .glyphicon-chevron-left,\n .icon-prev {\n margin-left: (@carousel-control-font-size / -2);\n }\n .glyphicon-chevron-right,\n .icon-next {\n margin-right: (@carousel-control-font-size / -2);\n }\n }\n\n // Show and left align the captions\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n\n // Move up the indicators\n .carousel-indicators {\n bottom: 20px;\n }\n}\n","// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n//\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n","// Center-align a block level element\n\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n","// CSS image replacement\n//\n// Heads up! v3 launched with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (has been removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#support-ie10-width\n// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n width: device-width;\n}\n\n\n// Visibility utilities\n// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n .responsive-invisibility();\n}\n\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n\n.visible-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-visibility();\n }\n}\n.visible-xs-block {\n @media (max-width: @screen-xs-max) {\n display: block !important;\n }\n}\n.visible-xs-inline {\n @media (max-width: @screen-xs-max) {\n display: inline !important;\n }\n}\n.visible-xs-inline-block {\n @media (max-width: @screen-xs-max) {\n display: inline-block !important;\n }\n}\n\n.visible-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-visibility();\n }\n}\n.visible-sm-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: block !important;\n }\n}\n.visible-sm-inline {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline !important;\n }\n}\n.visible-sm-inline-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline-block !important;\n }\n}\n\n.visible-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-visibility();\n }\n}\n.visible-md-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: block !important;\n }\n}\n.visible-md-inline {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline !important;\n }\n}\n.visible-md-inline-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline-block !important;\n }\n}\n\n.visible-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-visibility();\n }\n}\n.visible-lg-block {\n @media (min-width: @screen-lg-min) {\n display: block !important;\n }\n}\n.visible-lg-inline {\n @media (min-width: @screen-lg-min) {\n display: inline !important;\n }\n}\n.visible-lg-inline-block {\n @media (min-width: @screen-lg-min) {\n display: inline-block !important;\n }\n}\n\n.hidden-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-invisibility();\n }\n}\n.hidden-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-invisibility();\n }\n}\n.hidden-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-invisibility();\n }\n}\n.hidden-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-invisibility();\n }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n// Note: Deprecated .visible-print as of v3.2.0\n.visible-print {\n .responsive-invisibility();\n\n @media print {\n .responsive-visibility();\n }\n}\n.visible-print-block {\n display: none !important;\n\n @media print {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n\n @media print {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n\n @media print {\n display: inline-block !important;\n }\n}\n\n.hidden-print {\n @media print {\n .responsive-invisibility();\n }\n}\n","// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table !important; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n"]} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map deleted file mode 100644 index 6c7fa40b98db0..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["less/normalize.less","less/print.less","bootstrap.css","dist/css/bootstrap.css","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":";;;;4EAQA,KACE,YAAA,WACA,yBAAA,KACA,qBAAA,KAOF,KACE,OAAA,EAaF,QAAA,MAAA,QAAA,WAAA,OAAA,OAAA,OAAA,OAAA,KAAA,KAAA,IAAA,QAAA,QAaE,QAAA,MAQF,MAAA,OAAA,SAAA,MAIE,QAAA,aACA,eAAA,SAQF,sBACE,QAAA,KACA,OAAA,EAQF,SAAA,SAEE,QAAA,KAUF,EACE,iBAAA,YAQF,SAAA,QAEE,QAAA,EAUF,YACE,cAAA,IAAA,OAOF,EAAA,OAEE,YAAA,IAOF,IACE,WAAA,OAQF,GACE,OAAA,MAAA,EACA,UAAA,IAOF,KACE,MAAA,KACA,WAAA,KAOF,MACE,UAAA,IAOF,IAAA,IAEE,SAAA,SACA,UAAA,IACA,YAAA,EACA,eAAA,SAGF,IACE,IAAA,MAGF,IACE,OAAA,OAUF,IACE,OAAA,EAOF,eACE,SAAA,OAUF,OACE,OAAA,IAAA,KAOF,GACE,OAAA,EAAA,mBAAA,YAAA,gBAAA,YACA,WAAA,YAOF,IACE,SAAA,KAOF,KAAA,IAAA,IAAA,KAIE,YAAA,UAAA,UACA,UAAA,IAkBF,OAAA,MAAA,SAAA,OAAA,SAKE,OAAA,EACA,KAAA,QACA,MAAA,QAOF,OACE,SAAA,QAUF,OAAA,OAEE,eAAA,KAWF,OAAA,wBAAA,kBAAA,mBAIE,mBAAA,OACA,OAAA,QAOF,iBAAA,qBAEE,OAAA,QAOF,yBAAA,wBAEE,QAAA,EACA,OAAA,EAQF,MACE,YAAA,OAWF,qBAAA,kBAEE,mBAAA,WAAA,gBAAA,WAAA,WAAA,WACA,QAAA,EASF,8CAAA,8CAEE,OAAA,KAQF,mBACE,mBAAA,YACA,gBAAA,YAAA,WAAA,YAAA,mBAAA,UASF,iDAAA,8CAEE,mBAAA,KAOF,SACE,QAAA,MAAA,OAAA,MACA,OAAA,EAAA,IACA,OAAA,IAAA,MAAA,OAQF,OACE,QAAA,EACA,OAAA,EAOF,SACE,SAAA,KAQF,SACE,YAAA,IAUF,MACE,eAAA,EACA,gBAAA,SAGF,GAAA,GAEE,QAAA,uFCjUF,aA7FI,EAAA,OAAA,QAGI,MAAA,eACA,YAAA,eACA,WAAA,cAAA,mBAAA,eACA,WAAA,eAGJ,EAAA,UAEI,gBAAA,UAGJ,cACI,QAAA,KAAA,WAAA,IAGJ,kBACI,QAAA,KAAA,YAAA,IAKJ,6BAAA,mBAEI,QAAA,GAGJ,WAAA,IAEI,OAAA,IAAA,MAAA,KC4KL,kBAAA,MDvKK,MC0KL,QAAA,mBDrKK,IE8KN,GDLC,kBAAA,MDrKK,ICwKL,UAAA,eCUD,GF5KM,GE2KN,EF1KM,QAAA,ECuKL,OAAA,ECSD,GF3KM,GCsKL,iBAAA,MD/JK,QCkKL,QAAA,KCSD,YFtKU,oBCiKT,iBAAA,eD7JK,OCgKL,OAAA,IAAA,MAAA,KD5JK,OC+JL,gBAAA,mBCSD,UFpKU,UC+JT,iBAAA,eDzJS,mBEkKV,mBDLC,OAAA,IAAA,MAAA,gBEjPD,WACA,YAAA,uBFsPD,IAAA,+CE7OC,IAAK,sDAAuD,4BAA6B,iDAAkD,gBAAiB,gDAAiD,eAAgB,+CAAgD,mBAAoB,2EAA4E,cAE7W,WACA,SAAA,SACA,IAAA,IACA,QAAA,aACA,YAAA,uBACA,WAAA,OACA,YAAA,IACA,YAAA,EAIkC,uBAAA,YAAW,wBAAA,UACX,2BAAW,QAAA,QAEX,uBDuPlC,QAAS,QCtPyB,sBFiPnC,uBEjP8C,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,2BAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,6BAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,2BAAW,QAAA,QACX,qBAAW,QAAA,QACX,0BAAW,QAAA,QACX,qBAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,2BAAW,QAAA,QACX,sBAAW,QAAA,QACX,yBAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,+BAAW,QAAA,QACX,2BAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,8BAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,6BAAW,QAAA,QACX,6BAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,sBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,2BAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,yBAAW,QAAA,QACX,8BAAW,QAAA,QACX,6BAAW,QAAA,QACX,6BAAW,QAAA,QACX,+BAAW,QAAA,QACX,8BAAW,QAAA,QACX,gCAAW,QAAA,QACX,uBAAW,QAAA,QACX,8BAAW,QAAA,QACX,+BAAW,QAAA,QACX,iCAAW,QAAA,QACX,0BAAW,QAAA,QACX,6BAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,gCAAW,QAAA,QACX,gCAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,0BAAW,QAAA,QACX,+BAAW,QAAA,QACX,+BAAW,QAAA,QACX,wBAAW,QAAA,QACX,+BAAW,QAAA,QACX,gCAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,8BAAW,QAAA,QACX,0BAAW,QAAA,QACX,gCAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,gCAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,6BAAW,QAAA,QACX,8BAAW,QAAA,QACX,2BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,8BAAW,QAAA,QACX,+BAAW,QAAA,QACX,mCAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,2BAAW,QAAA,QACX,4BAAW,QAAA,QACX,+BAAW,QAAA,QACX,wBAAW,QAAA,QACX,2BAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,yBAAW,QAAA,QACX,6BAAW,QAAA,QACX,+BAAW,QAAA,QACX,0BAAW,QAAA,QACX,gCAAW,QAAA,QACX,+BAAW,QAAA,QACX,8BAAW,QAAA,QACX,kCAAW,QAAA,QACX,oCAAW,QAAA,QACX,sBAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,8BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,0BAAW,QAAA,QACX,4BAAW,QAAA,QACX,qCAAW,QAAA,QACX,oCAAW,QAAA,QACX,kCAAW,QAAA,QACX,oCAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,8BAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,0BAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,uBAAW,QAAA,QACX,mCAAW,QAAA,QACX,uCAAW,QAAA,QACX,gCAAW,QAAA,QACX,oCAAW,QAAA,QACX,qCAAW,QAAA,QACX,yCAAW,QAAA,QACX,4BAAW,QAAA,QACX,yBAAW,QAAA,QACX,gCAAW,QAAA,QACX,8BAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,0BAAW,QAAA,QACX,6BAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,8BAAW,QAAA,QACX,+BAAW,QAAA,QACX,gCAAW,QAAA,QACX,8BAAW,QAAA,QACX,8BAAW,QAAA,QACX,8BAAW,QAAA,QACX,2BAAW,QAAA,QACX,0BAAW,QAAA,QACX,yBAAW,QAAA,QACX,6BAAW,QAAA,QACX,2BAAW,QAAA,QACX,4BAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,2BAAW,QAAA,QACX,2BAAW,QAAA,QACX,4BAAW,QAAA,QACX,+BAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,iCAAW,QAAA,QACX,oCAAW,QAAA,QACX,iCAAW,QAAA,QACX,+BAAW,QAAA,QACX,+BAAW,QAAA,QACX,iCAAW,QAAA,QACX,qBAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QASX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,4BAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,yBAAW,QAAA,QACX,yBAAW,QAAA,QACX,+BAAW,QAAA,QACX,uBAAW,QAAA,QACX,6BAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,4BAAW,QAAA,QACX,uBAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,2BAAW,QAAA,QACX,0BAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,4BAAW,QAAA,QACX,mCAAW,QAAA,QACX,4BAAW,QAAA,QACX,oCAAW,QAAA,QACX,kCAAW,QAAA,QACX,iCAAW,QAAA,QACX,+BAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,kCAAW,QAAA,QACX,mCAAW,QAAA,QACX,sCAAW,QAAA,QACX,0CAAW,QAAA,QACX,oCAAW,QAAA,QACX,wCAAW,QAAA,QACX,qCAAW,QAAA,QACX,iCAAW,QAAA,QACX,gCAAW,QAAA,QACX,kCAAW,QAAA,QACX,+BAAW,QAAA,QACX,0BAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QCtS/C,0BCgEE,QAAA,QHi+BF,EDNC,mBAAA,WGxhCI,gBAAiB,WFiiCZ,WAAY,WGl+BZ,OADL,QJg+BJ,mBAAA,WGthCI,gBAAiB,WACpB,WAAA,WHyhCD,KGrhCC,UAAW,KAEX,4BAAA,cAEA,KACA,YAAA,iBAAA,UAAA,MAAA,WHuhCD,UAAA,KGnhCC,YAAa,WF4hCb,MAAO,KACP,iBAAkB,KExhClB,OADA,MAEA,OHqhCD,SG/gCC,YAAa,QACb,UAAA,QACA,YAAA,QAEA,EFwhCA,MAAO,QEthCL,gBAAA,KAIF,QH8gCD,QKjkCC,MAAA,QACA,gBAAA,UF6DF,QACE,QAAA,IAAA,KAAA,yBHygCD,eAAA,KGlgCC,OHqgCD,OAAA,ECSD,IACE,eAAgB,ODDjB,4BM/kCC,0BLklCF,gBKnlCE,iBADA,eH4EA,QAAS,MACT,UAAA,KHugCD,OAAA,KGhgCC,aACA,cAAA,IAEA,eACA,QAAA,aC6FA,UAAA,KACK,OAAA,KACG,QAAA,IEvLR,YAAA,WACA,iBAAA,KACA,OAAA,IAAA,MAAA,KN+lCD,cAAA,IGjgCC,mBAAoB,IAAI,IAAI,YAC5B,cAAA,IAAA,IAAA,YHmgCD,WAAA,IAAA,IAAA,YG5/BC,YACA,cAAA,IAEA,GH+/BD,WAAA,KGv/BC,cAAe,KACf,OAAA,EACA,WAAA,IAAA,MAAA,KAEA,SACA,SAAA,SACA,MAAA,IACA,OAAA,IACA,QAAA,EHy/BD,OAAA,KGj/BC,SAAA,OF0/BA,KAAM,cEx/BJ,OAAA,EAEA,0BACA,yBACA,SAAA,OACA,MAAA,KHm/BH,OAAA,KGx+BC,OAAQ,EACR,SAAA,QH0+BD,KAAA,KCSD,cACE,OAAQ,QAQV,IACA,IMlpCE,IACA,IACA,IACA,INwoCF,GACA,GACA,GACA,GACA,GACA,GDAC,YAAA,QOlpCC,YAAa,IN2pCb,YAAa,IACb,MAAO,QAoBT,WAZA,UAaA,WAZA,UM5pCI,WN6pCJ,UM5pCI,WN6pCJ,UM5pCI,WN6pCJ,UDMC,WCLD,UACA,UAZA,SAaA,UAZA,SAaA,UAZA,SAaA,UAZA,SAaA,UAZA,SAaA,UAZA,SMppCE,YAAa,INwqCb,YAAa,EACb,MAAO,KAGT,IMxqCE,IAJF,IN2qCA,GAEA,GDLC,GCSC,WAAY,KACZ,cAAe,KASjB,WANA,UDCC,WCCD,UM5qCA,WN8qCA,UACA,UANA,SM5qCI,UN8qCJ,SM3qCA,UN6qCA,SAQE,UAAW,IAGb,IMprCE,IAJF,INurCA,GAEA,GDLC,GCSC,WAAY,KACZ,cAAe,KASjB,WANA,UDCC,WCCD,UMvrCA,WNyrCA,UACA,UANA,SMxrCI,UN0rCJ,SMtrCA,UNwrCA,SMxrCU,UAAA,IACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KAOR,IADF,GPssCC,UAAA,KCSD,EMzsCE,OAAA,EAAA,EAAA,KAEA,MPosCD,cAAA,KO/rCC,UAAW,KAwOX,YAAa,IA1OX,YAAA,IPssCH,yBO7rCC,MNssCE,UAAW,MMjsCf,OAAA,MAEE,UAAA,IAKF,MP0rCC,KO1rCsB,QAAA,KP6rCtB,iBAAA,QO5rCsB,WP+rCtB,WAAA,KO9rCsB,YPisCtB,WAAA,MOhsCsB,aPmsCtB,WAAA,OOlsCsB,cPqsCtB,WAAA,QOlsCsB,aPqsCtB,YAAA,OOpsCsB,gBPusCtB,eAAA,UOtsCsB,gBPysCtB,eAAA,UOrsCC,iBPwsCD,eAAA,WQ3yCC,YR8yCD,MAAA,KCSD,cOpzCI,MAAA,QAHF,qBDwGF,qBP6sCC,MAAA,QCSD,cO3zCI,MAAA,QAHF,qBD2GF,qBPitCC,MAAA,QCSD,WOl0CI,MAAA,QAHF,kBD8GF,kBPqtCC,MAAA,QCSD,cOz0CI,MAAA,QAHF,qBDiHF,qBPytCC,MAAA,QCSD,aOh1CI,MAAA,QDwHF,oBAHF,oBExHE,MAAA,QACA,YR01CA,MAAO,KQx1CL,iBAAA,QAHF,mBF8HF,mBP2tCC,iBAAA,QCSD,YQ/1CI,iBAAA,QAHF,mBFiIF,mBP+tCC,iBAAA,QCSD,SQt2CI,iBAAA,QAHF,gBFoIF,gBPmuCC,iBAAA,QCSD,YQ72CI,iBAAA,QAHF,mBFuIF,mBPuuCC,iBAAA,QCSD,WQp3CI,iBAAA,QF6IF,kBADF,kBAEE,iBAAA,QPsuCD,aO7tCC,eAAgB,INsuChB,OAAQ,KAAK,EAAE,KMpuCf,cAAA,IAAA,MAAA,KAFF,GPkuCC,GCSC,WAAY,EACZ,cAAe,KM9tCf,MP0tCD,MO3tCD,MAPI,MASF,cAAA,EAIF,eALE,aAAA,EACA,WAAA,KPkuCD,aO9tCC,aAAc,EAKZ,YAAA,KACA,WAAA,KP6tCH,gBOvtCC,QAAS,aACT,cAAA,IACA,aAAA,IAEF,GNguCE,WAAY,EM9tCZ,cAAA,KAGA,GADF,GP0tCC,YAAA,WOttCC,GPytCD,YAAA,IOnnCD,GAvFM,YAAA,EAEA,yBACA,kBGtNJ,MAAA,KACA,MAAA,MACA,SAAA,OVq6CC,MAAA,KO7nCC,WAAY,MAhFV,cAAA,SPgtCH,YAAA,OOtsCD,kBNgtCE,YAAa,OM1sCjB,0BPssCC,YOrsCC,OAAA,KA9IqB,cAAA,IAAA,OAAA,KAmJvB,YACE,UAAA,IACA,eAAA,UAEA,WPssCD,QAAA,KAAA,KOjsCG,OAAA,EAAA,EAAA,KN0sCF,UAAW,OACX,YAAa,IAAI,MAAM,KMptCzB,yBP+sCC,wBO/sCD,yBNytCE,cAAe,EMnsCb,kBAFA,kBACA,iBPksCH,QAAA,MO/rCG,UAAA,INwsCF,YAAa,WACb,MAAO,KMhsCT,yBP2rCC,yBO3rCD,wBAEE,QAAA,cAEA,oBACA,sBACA,cAAA,KP6rCD,aAAA,EOvrCG,WAAA,MNgsCF,aAAc,IAAI,MAAM,KACxB,YAAa,EMhsCX,kCNksCJ,kCMnsCe,iCACX,oCNmsCJ,oCDLC,mCCUC,QAAS,GMjsCX,iCNmsCA,iCMzsCM,gCAOJ,mCNmsCF,mCDLC,kCO7rCC,QAAA,cPksCD,QWv+CC,cAAe,KVg/Cf,WAAY,OACZ,YAAa,WU7+Cb,KXy+CD,IWr+CD,IACE,KACA,YAAA,MAAA,OAAA,SAAA,cAAA,UAEA,KACA,QAAA,IAAA,IXu+CD,UAAA,IWn+CC,MAAO,QACP,iBAAA,QACA,cAAA,IAEA,IACA,QAAA,IAAA,IACA,UAAA,IV4+CA,MU5+CA,KXq+CD,iBAAA,KW3+CC,cAAe,IASb,mBAAA,MAAA,EAAA,KAAA,EAAA,gBACA,WAAA,MAAA,EAAA,KAAA,EAAA,gBAEA,QV6+CF,QU7+CE,EXq+CH,UAAA,KWh+CC,YAAa,IACb,mBAAA,KACA,WAAA,KAEA,IACA,QAAA,MACA,QAAA,MACA,OAAA,EAAA,EAAA,KACA,UAAA,KACA,YAAA,WACA,MAAA,KACA,WAAA,UXk+CD,UAAA,WW7+CC,iBAAkB,QAehB,OAAA,IAAA,MAAA,KACA,cAAA,IAEA,SACA,QAAA,EACA,UAAA,QXi+CH,MAAA,QW59CC,YAAa,SACb,iBAAA,YACA,cAAA,EC1DF,gBCHE,WAAA,MACA,WAAA,OAEA,Wb8hDD,cAAA,KYxhDC,aAAA,KAqEA,aAAc,KAvEZ,YAAA,KZ+hDH,yBY1hDC,WAkEE,MAAO,OZ69CV,yBY5hDC,WA+DE,MAAO,OZk+CV,0BYzhDC,WCvBA,MAAA,QAGA,iBbmjDD,cAAA,KYthDC,aAAc,KCvBd,aAAA,KACA,YAAA,KCAE,KACE,aAAA,MAEA,YAAA,MAGA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UdgjDL,SAAA,SchiDG,WAAA,IACE,cAAA,KdkiDL,aAAA,Kc1hDG,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Ud6hDH,MAAA,Kc7hDG,WdgiDH,MAAA,KchiDG,WdmiDH,MAAA,acniDG,WdsiDH,MAAA,actiDG,UdyiDH,MAAA,IcziDG,Ud4iDH,MAAA,ac5iDG,Ud+iDH,MAAA,ac/iDG,UdkjDH,MAAA,IcljDG,UdqjDH,MAAA,acrjDG,UdwjDH,MAAA,acxjDG,Ud2jDH,MAAA,Ic3jDG,Ud8jDH,MAAA,ac/iDG,UdkjDH,MAAA,YcljDG,gBdqjDH,MAAA,KcrjDG,gBdwjDH,MAAA,acxjDG,gBd2jDH,MAAA,ac3jDG,ed8jDH,MAAA,Ic9jDG,edikDH,MAAA,acjkDG,edokDH,MAAA,acpkDG,edukDH,MAAA,IcvkDG,ed0kDH,MAAA,ac1kDG,ed6kDH,MAAA,ac7kDG,edglDH,MAAA,IchlDG,edmlDH,MAAA,ac9kDG,edilDH,MAAA,YchmDG,edmmDH,MAAA,KcnmDG,gBdsmDH,KAAA,KctmDG,gBdymDH,KAAA,aczmDG,gBd4mDH,KAAA,ac5mDG,ed+mDH,KAAA,Ic/mDG,edknDH,KAAA,aclnDG,edqnDH,KAAA,acrnDG,edwnDH,KAAA,IcxnDG,ed2nDH,KAAA,ac3nDG,ed8nDH,KAAA,ac9nDG,edioDH,KAAA,IcjoDG,edooDH,KAAA,ac/nDG,edkoDH,KAAA,YcnnDG,edsnDH,KAAA,KctnDG,kBdynDH,YAAA,KcznDG,kBd4nDH,YAAA,ac5nDG,kBd+nDH,YAAA,ac/nDG,iBdkoDH,YAAA,IcloDG,iBdqoDH,YAAA,acroDG,iBdwoDH,YAAA,acxoDG,iBd2oDH,YAAA,Ic3oDG,iBd8oDH,YAAA,ac9oDG,iBdipDH,YAAA,acjpDG,iBdopDH,YAAA,IcppDG,iBdupDH,YAAA,acvpDG,iBd0pDH,YAAA,Yc5rDG,iBACE,YAAA,EAOJ,yBACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Ud0rDD,MAAA,Kc1rDC,Wd6rDD,MAAA,Kc7rDC,WdgsDD,MAAA,achsDC,WdmsDD,MAAA,acnsDC,UdssDD,MAAA,IctsDC,UdysDD,MAAA,aczsDC,Ud4sDD,MAAA,ac5sDC,Ud+sDD,MAAA,Ic/sDC,UdktDD,MAAA,acltDC,UdqtDD,MAAA,acrtDC,UdwtDD,MAAA,IcxtDC,Ud2tDD,MAAA,ac5sDC,Ud+sDD,MAAA,Yc/sDC,gBdktDD,MAAA,KcltDC,gBdqtDD,MAAA,acrtDC,gBdwtDD,MAAA,acxtDC,ed2tDD,MAAA,Ic3tDC,ed8tDD,MAAA,ac9tDC,ediuDD,MAAA,acjuDC,edouDD,MAAA,IcpuDC,eduuDD,MAAA,acvuDC,ed0uDD,MAAA,ac1uDC,ed6uDD,MAAA,Ic7uDC,edgvDD,MAAA,ac3uDC,ed8uDD,MAAA,Yc7vDC,edgwDD,MAAA,KchwDC,gBdmwDD,KAAA,KcnwDC,gBdswDD,KAAA,actwDC,gBdywDD,KAAA,aczwDC,ed4wDD,KAAA,Ic5wDC,ed+wDD,KAAA,ac/wDC,edkxDD,KAAA,aclxDC,edqxDD,KAAA,IcrxDC,edwxDD,KAAA,acxxDC,ed2xDD,KAAA,ac3xDC,ed8xDD,KAAA,Ic9xDC,ediyDD,KAAA,ac5xDC,ed+xDD,KAAA,YchxDC,edmxDD,KAAA,KcnxDC,kBdsxDD,YAAA,KctxDC,kBdyxDD,YAAA,aczxDC,kBd4xDD,YAAA,ac5xDC,iBd+xDD,YAAA,Ic/xDC,iBdkyDD,YAAA,aclyDC,iBdqyDD,YAAA,acryDC,iBdwyDD,YAAA,IcxyDC,iBd2yDD,YAAA,ac3yDC,iBd8yDD,YAAA,ac9yDC,iBdizDD,YAAA,IcjzDC,iBdozDD,YAAA,acpzDC,iBduzDD,YAAA,YY9yDD,iBE3CE,YAAA,GAQF,yBACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Udw1DD,MAAA,Kcx1DC,Wd21DD,MAAA,Kc31DC,Wd81DD,MAAA,ac91DC,Wdi2DD,MAAA,acj2DC,Udo2DD,MAAA,Icp2DC,Udu2DD,MAAA,acv2DC,Ud02DD,MAAA,ac12DC,Ud62DD,MAAA,Ic72DC,Udg3DD,MAAA,ach3DC,Udm3DD,MAAA,acn3DC,Uds3DD,MAAA,Ict3DC,Udy3DD,MAAA,ac12DC,Ud62DD,MAAA,Yc72DC,gBdg3DD,MAAA,Kch3DC,gBdm3DD,MAAA,acn3DC,gBds3DD,MAAA,act3DC,edy3DD,MAAA,Icz3DC,ed43DD,MAAA,ac53DC,ed+3DD,MAAA,ac/3DC,edk4DD,MAAA,Icl4DC,edq4DD,MAAA,acr4DC,edw4DD,MAAA,acx4DC,ed24DD,MAAA,Ic34DC,ed84DD,MAAA,acz4DC,ed44DD,MAAA,Yc35DC,ed85DD,MAAA,Kc95DC,gBdi6DD,KAAA,Kcj6DC,gBdo6DD,KAAA,acp6DC,gBdu6DD,KAAA,acv6DC,ed06DD,KAAA,Ic16DC,ed66DD,KAAA,ac76DC,edg7DD,KAAA,ach7DC,edm7DD,KAAA,Icn7DC,eds7DD,KAAA,act7DC,edy7DD,KAAA,acz7DC,ed47DD,KAAA,Ic57DC,ed+7DD,KAAA,ac17DC,ed67DD,KAAA,Yc96DC,edi7DD,KAAA,Kcj7DC,kBdo7DD,YAAA,Kcp7DC,kBdu7DD,YAAA,acv7DC,kBd07DD,YAAA,ac17DC,iBd67DD,YAAA,Ic77DC,iBdg8DD,YAAA,ach8DC,iBdm8DD,YAAA,acn8DC,iBds8DD,YAAA,Ict8DC,iBdy8DD,YAAA,acz8DC,iBd48DD,YAAA,ac58DC,iBd+8DD,YAAA,Ic/8DC,iBdk9DD,YAAA,acl9DC,iBdq9DD,YAAA,YYz8DD,iBE9CE,YAAA,GAQF,0BACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Uds/DD,MAAA,Kct/DC,Wdy/DD,MAAA,Kcz/DC,Wd4/DD,MAAA,ac5/DC,Wd+/DD,MAAA,ac//DC,UdkgED,MAAA,IclgEC,UdqgED,MAAA,acrgEC,UdwgED,MAAA,acxgEC,Ud2gED,MAAA,Ic3gEC,Ud8gED,MAAA,ac9gEC,UdihED,MAAA,acjhEC,UdohED,MAAA,IcphEC,UduhED,MAAA,acxgEC,Ud2gED,MAAA,Yc3gEC,gBd8gED,MAAA,Kc9gEC,gBdihED,MAAA,acjhEC,gBdohED,MAAA,acphEC,eduhED,MAAA,IcvhEC,ed0hED,MAAA,ac1hEC,ed6hED,MAAA,ac7hEC,edgiED,MAAA,IchiEC,edmiED,MAAA,acniEC,edsiED,MAAA,actiEC,edyiED,MAAA,IcziEC,ed4iED,MAAA,acviEC,ed0iED,MAAA,YczjEC,ed4jED,MAAA,Kc5jEC,gBd+jED,KAAA,Kc/jEC,gBdkkED,KAAA,aclkEC,gBdqkED,KAAA,acrkEC,edwkED,KAAA,IcxkEC,ed2kED,KAAA,ac3kEC,ed8kED,KAAA,ac9kEC,edilED,KAAA,IcjlEC,edolED,KAAA,acplEC,edulED,KAAA,acvlEC,ed0lED,KAAA,Ic1lEC,ed6lED,KAAA,acxlEC,ed2lED,KAAA,Yc5kEC,ed+kED,KAAA,Kc/kEC,kBdklED,YAAA,KcllEC,kBdqlED,YAAA,acrlEC,kBdwlED,YAAA,acxlEC,iBd2lED,YAAA,Ic3lEC,iBd8lED,YAAA,ac9lEC,iBdimED,YAAA,acjmEC,iBdomED,YAAA,IcpmEC,iBdumED,YAAA,acvmEC,iBd0mED,YAAA,ac1mEC,iBd6mED,YAAA,Ic7mEC,iBdgnED,YAAA,achnEC,iBdmnED,YAAA,YetrED,iBACA,YAAA,GAGA,MACA,iBAAA,YAEA,QfyrED,YAAA,IevrEC,eAAgB,IAChB,MAAA,KfyrED,WAAA,KelrEC,GACA,WAAA,KfsrED,OexrEC,MAAO,KdmsEP,UAAW,KACX,cAAe,KcvrET,mBd0rER,mBczrEQ,mBAHA,mBACA,mBd0rER,mBDHC,QAAA,IensEC,YAAa,WAoBX,eAAA,IACA,WAAA,IAAA,MAAA,KArBJ,mBdktEE,eAAgB,OAChB,cAAe,IAAI,MAAM,KDJ1B,uCCMD,uCcrtEA,wCdstEA,wCclrEI,2CANI,2CforEP,WAAA,EezqEG,mBf4qEH,WAAA,IAAA,MAAA,KCWD,cACE,iBAAkB,Kc/pEpB,6BdkqEA,6BcjqEE,6BAZM,6BfsqEP,6BCMD,6BDHC,QAAA,ICWD,gBACE,OAAQ,IAAI,MAAM,Kc1qEpB,4Bd6qEA,4Bc7qEA,4BAQQ,4Bf8pEP,4BCMD,4Bc7pEM,OAAA,IAAA,MAAA,KAYF,4BAFJ,4BfopEC,oBAAA,IevoEG,yCf0oEH,iBAAA,QehoEC,4BACA,iBAAA,QfooED,uBe9nEG,SAAA,OdyoEF,QAAS,acxoEL,MAAA,KAEA,sBfioEL,sBgB7wEC,SAAA,OfwxEA,QAAS,WACT,MAAO,KAST,0BerxEE,0Bf+wEF,0BAGA,0BexxEM,0BAMJ,0BfgxEF,0BAGA,0BACA,0BDNC,0BCAD,0BAGA,0BASE,iBAAkB,QDLnB,sCgBlyEC,sCAAA,oCfyyEF,sCetxEM,sCf2xEJ,iBAAkB,QASpB,2Be1yEE,2BfoyEF,2BAGA,2Be7yEM,2BAMJ,2BfqyEF,2BAGA,2BACA,2BDNC,2BCAD,2BAGA,2BASE,iBAAkB,QDLnB,uCgBvzEC,uCAAA,qCf8zEF,uCe3yEM,uCfgzEJ,iBAAkB,QASpB,wBe/zEE,wBfyzEF,wBAGA,wBel0EM,wBAMJ,wBf0zEF,wBAGA,wBACA,wBDNC,wBCAD,wBAGA,wBASE,iBAAkB,QDLnB,oCgB50EC,oCAAA,kCfm1EF,oCeh0EM,oCfq0EJ,iBAAkB,QASpB,2Bep1EE,2Bf80EF,2BAGA,2Bev1EM,2BAMJ,2Bf+0EF,2BAGA,2BACA,2BDNC,2BCAD,2BAGA,2BASE,iBAAkB,QDLnB,uCgBj2EC,uCAAA,qCfw2EF,uCer1EM,uCf01EJ,iBAAkB,QASpB,0Bez2EE,0Bfm2EF,0BAGA,0Be52EM,0BAMJ,0Bfo2EF,0BAGA,0BACA,0BDNC,0BCAD,0BAGA,0BASE,iBAAkB,QDLnB,sCehtEC,sCADF,oCdwtEA,sCe12EM,sCDoJJ,iBAAA,QA6DF,kBACE,WAAY,KA3DV,WAAA,KAEA,oCACA,kBACA,MAAA,KfotED,cAAA,Ke7pEC,WAAY,OAnDV,mBAAA,yBfmtEH,OAAA,IAAA,MAAA,KCWD,yBACE,cAAe,Ec5qEjB,qCd+qEA,qCcjtEI,qCARM,qCfktET,qCCMD,qCDHC,YAAA,OCWD,kCACE,OAAQ,EcvrEV,0Dd0rEA,0Dc1rEA,0DAzBU,0Df4sET,0DCMD,0DAME,YAAa,Ec/rEf,yDdksEA,yDclsEA,yDArBU,yDfgtET,yDCMD,yDAME,aAAc,EDLjB,yDe1sEW,yDEzNV,yDjBk6EC,yDiBj6ED,cAAA,GAMA,SjBk6ED,UAAA,EiB/5EC,QAAS,EACT,OAAA,EACA,OAAA,EAEA,OACA,QAAA,MACA,MAAA,KACA,QAAA,EACA,cAAA,KACA,UAAA,KjBi6ED,YAAA,QiB95EC,MAAO,KACP,OAAA,EACA,cAAA,IAAA,MAAA,QAEA,MjBg6ED,QAAA,aiBr5EC,UAAW,Kb4BX,cAAA,IACG,YAAA,IJ63EJ,mBiBr5EC,mBAAoB,WhBg6EjB,gBAAiB,WgB95EpB,WAAA,WjBy5ED,qBiBv5EC,kBAGA,OAAQ,IAAI,EAAE,EACd,WAAA,MjBs5ED,YAAA,OiBj5EC,iBACA,QAAA,MAIF,kBhB25EE,QAAS,MgBz5ET,MAAA,KAIF,iBAAA,ahB05EE,OAAQ,KI99ER,uBY2EF,2BjB64EC,wBiB54EC,QAAA,IAAA,KAAA,yBACA,eAAA,KAEA,OACA,QAAA,MjB+4ED,YAAA,IiBr3EC,UAAW,KACX,YAAA,WACA,MAAA,KAEA,cACA,QAAA,MACA,MAAA,KACA,OAAA,KACA,QAAA,IAAA,KACA,UAAA,KACA,YAAA,WACA,MAAA,KbxDA,iBAAA,KACQ,iBAAA,KAyHR,OAAA,IAAA,MAAA,KACK,cAAA,IACG,mBAAA,MAAA,EAAA,IAAA,IAAA,iBJwzET,WAAA,MAAA,EAAA,IAAA,IAAA,iBkBh8EC,mBAAA,aAAA,YAAA,KAAA,mBAAA,YAAA,KACE,cAAA,aAAA,YAAA,KAAA,WAAA,YAAA,KACA,WAAA,aAAA,YAAA,KAAA,WAAA,YAAA,KdWM,oBJy7ET,aAAA,QIx5EC,QAAA,EACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,qBACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,qBAEF,gCAA0B,MAAA,KJ25E3B,QAAA,EI15EiC,oCJ65EjC,MAAA,KiBh4EG,yCACA,MAAA,KAQF,0BhBs4EA,iBAAkB,YAClB,OAAQ,EgBn4EN,wBjB63EH,wBiB13EC,iChBq4EA,iBAAkB,KgBn4EhB,QAAA,EAIF,wBACE,iCjB03EH,OAAA,YiB72EC,sBjBg3ED,OAAA,KiB91EG,mBhB02EF,mBAAoB,KAEtB,qDgB32EM,8BjBo2EH,8BiBj2EC,wCAAA,+BhB62EA,YAAa,KgB32EX,iCjBy2EH,iCiBt2EC,2CAAA,kChB02EF,0BACA,0BACA,oCACA,2BAKE,YAAa,KgBh3EX,iCjB82EH,iCACF,2CiBp2EC,kChBu2EA,0BACA,0BACA,oCACA,2BgBz2EA,YAAA,MhBi3EF,YgBv2EE,cAAA,KAGA,UADA,OjBi2ED,SAAA,SiBr2EC,QAAS,MhBg3ET,WAAY,KgBx2EV,cAAA,KAGA,gBADA,aAEA,WAAA,KjBi2EH,aAAA,KiB91EC,cAAe,EhBy2Ef,YAAa,IACb,OAAQ,QgBp2ER,+BjBg2ED,sCiBl2EC,yBACA,gCAIA,SAAU,ShBw2EV,WAAY,MgBt2EZ,YAAA,MAIF,oBAAA,cAEE,WAAA,KAGA,iBADA,cAEA,SAAA,SACA,QAAA,aACA,aAAA,KjB61ED,cAAA,EiB31EC,YAAa,IhBs2Eb,eAAgB,OgBp2EhB,OAAA,QAUA,kCjBo1ED,4BCWC,WAAY,EACZ,YAAa,KgBv1Eb,wCAAA,qCjBm1ED,8BCOD,+BgBh2EI,2BhB+1EJ,4BAME,OAAQ,YDNT,0BiBv1EG,uBAMF,oCAAA,iChB61EA,OAAQ,YDNT,yBiBp1EK,sBAaJ,mCAFF,gCAGE,OAAA,YAGA,qBjBy0ED,WAAA,KiBv0EC,YAAA,IhBk1EA,eAAgB,IgBh1Ed,cAAA,EjB00EH,8BiB5zED,8BCnQE,cAAA,EACA,aAAA,EAEA,UACA,OAAA,KlBkkFD,QAAA,IAAA,KkBhkFC,UAAA,KACE,YAAA,IACA,cAAA,IAGF,gBjB0kFA,OAAQ,KiBxkFN,YAAA,KD2PA,0BAFJ,kBAGI,OAAA,KAEA,6BACA,OAAA,KjBy0EH,QAAA,IAAA,KiB/0EC,UAAW,KAST,YAAA,IACA,cAAA,IAVJ,mChB81EE,OAAQ,KgBh1EN,YAAA,KAGA,6CAjBJ,qCAkBI,OAAA,KAEA,oCACA,OAAA,KjBy0EH,WAAA,KiBr0EC,QAAS,IAAI,KC/Rb,UAAA,KACA,YAAA,IAEA,UACA,OAAA,KlBumFD,QAAA,KAAA,KkBrmFC,UAAA,KACE,YAAA,UACA,cAAA,IAGF,gBjB+mFA,OAAQ,KiB7mFN,YAAA,KDuRA,0BAFJ,kBAGI,OAAA,KAEA,6BACA,OAAA,KjBk1EH,QAAA,KAAA,KiBx1EC,UAAW,KAST,YAAA,UACA,cAAA,IAVJ,mChBu2EE,OAAQ,KgBz1EN,YAAA,KAGA,6CAjBJ,qCAkBI,OAAA,KAEA,oCACA,OAAA,KjBk1EH,WAAA,KiBz0EC,QAAS,KAAK,KAEd,UAAA,KjB00ED,YAAA,UiBt0EG,cjBy0EH,SAAA,SiBp0EC,4BACA,cAAA,OAEA,uBACA,SAAA,SACA,IAAA,EACA,MAAA,EACA,QAAA,EACA,QAAA,MACA,MAAA,KjBu0ED,OAAA,KiBr0EC,YAAa,KhBg1Eb,WAAY,OACZ,eAAgB,KDLjB,oDiBv0EC,uCADA,iCAGA,MAAO,KhBg1EP,OAAQ,KACR,YAAa,KDLd,oDiBv0EC,uCADA,iCAKA,MAAO,KhB80EP,OAAQ,KACR,YAAa,KAKf,uBAEA,8BAJA,4BADA,yBAEA,oBAEA,2BDNC,4BkBruFG,mCAJA,yBD0ZJ,gCbvWE,MAAA,QJ2rFD,2BkBxuFG,aAAA,QACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBd4CJ,WAAA,MAAA,EAAA,IAAA,IAAA,iBJgsFD,iCiBz1EC,aAAc,QC5YZ,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QlByuFH,gCiB91EC,MAAO,QCtYL,iBAAA,QlBuuFH,aAAA,QCWD,oCACE,MAAO,QAKT,uBAEA,8BAJA,4BADA,yBAEA,oBAEA,2BDNC,4BkBnwFG,mCAJA,yBD6ZJ,gCb1WE,MAAA,QJytFD,2BkBtwFG,aAAA,QACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBd4CJ,WAAA,MAAA,EAAA,IAAA,IAAA,iBJ8tFD,iCiBp3EC,aAAc,QC/YZ,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QlBuwFH,gCiBz3EC,MAAO,QCzYL,iBAAA,QlBqwFH,aAAA,QCWD,oCACE,MAAO,QAKT,qBAEA,4BAJA,0BADA,uBAEA,kBAEA,yBDNC,0BkBjyFG,iCAJA,uBDgaJ,8Bb7WE,MAAA,QJuvFD,yBkBpyFG,aAAA,QACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBd4CJ,WAAA,MAAA,EAAA,IAAA,IAAA,iBJ4vFD,+BiB/4EC,aAAc,QClZZ,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QlBqyFH,8BiBp5EC,MAAO,QC5YL,iBAAA,QlBmyFH,aAAA,QiB/4EG,kCjBk5EH,MAAA,QiB/4EG,2CjBk5EH,IAAA,KiBv4EC,mDACA,IAAA,EAEA,YjB04ED,QAAA,MiBvzEC,WAAY,IAwEZ,cAAe,KAtIX,MAAA,QAEA,yBjBy3EH,yBiBrvEC,QAAS,aA/HP,cAAA,EACA,eAAA,OjBw3EH,2BiB1vEC,QAAS,aAxHP,MAAA,KjBq3EH,eAAA,OiBj3EG,kCACA,QAAA,aAmHJ,0BhB4wEE,QAAS,aACT,eAAgB,OgBr3Ed,wCjB82EH,6CiBtwED,2CjBywEC,MAAA,KiB72EG,wCACA,MAAA,KAmGJ,4BhBwxEE,cAAe,EgBp3Eb,eAAA,OAGA,uBADA,oBjB82EH,QAAA,aiBpxEC,WAAY,EhB+xEZ,cAAe,EgBr3EX,eAAA,OAsFN,6BAAA,0BAjFI,aAAA,EAiFJ,4CjB6xEC,sCiBx2EG,SAAA,SjB22EH,YAAA,EiBh2ED,kDhB42EE,IAAK,GgBl2EL,2BjB+1EH,kCiBh2EG,wBAEA,+BAXF,YAAa,IhBo3Eb,WAAY,EgBn2EV,cAAA,EJviBF,2BIshBF,wBJrhBE,WAAA,KI4jBA,6BAyBA,aAAc,MAnCV,YAAA,MAEA,yBjBw1EH,gCACF,YAAA,IiBx3EG,cAAe,EAwCf,WAAA,OAwBJ,sDAdQ,MAAA,KjB80EL,yBACF,+CiBn0EC,YAAA,KAEE,UAAW,MjBs0EZ,yBACF,+CmBp6FG,YAAa,IACf,UAAA,MAGA,KACA,QAAA,aACA,QAAA,IAAA,KAAA,cAAA,EACA,UAAA,KACA,YAAA,IACA,YAAA,WACA,WAAA,OC0CA,YAAA,OACA,eAAA,OACA,iBAAA,aACA,aAAA,ahB+JA,OAAA,QACG,oBAAA,KACC,iBAAA,KACI,gBAAA,KJ+tFT,YAAA,KmBv6FG,iBAAA,KlBm7FF,OAAQ,IAAI,MAAM,YAClB,cAAe,IkB96Ff,kBdzBA,kBACA,WLk8FD,kBCOD,kBADA,WAME,QAAS,IAAI,KAAK,yBAClB,eAAgB,KkBh7FhB,WnBy6FD,WmB56FG,WlBw7FF,MAAO,KkBn7FL,gBAAA,Kf6BM,YADR,YJk5FD,iBAAA,KmBz6FC,QAAA,ElBq7FA,mBAAoB,MAAM,EAAE,IAAI,IAAI,iBAC5B,WAAY,MAAM,EAAE,IAAI,IAAI,iBoBh+FpC,cAGA,ejB8DA,wBACQ,OAAA,YJ05FT,OAAA,kBmBz6FG,mBAAA,KlBq7FM,WAAY,KkBn7FhB,QAAA,IASN,eC3DE,yBACA,eAAA,KpBi+FD,aoB99FC,MAAA,KnB0+FA,iBAAkB,KmBx+FhB,aAAA,KpBk+FH,mBoBh+FO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBi+FH,mBoB99FC,MAAA,KnB0+FA,iBAAkB,QAClB,aAAc,QmBt+FR,oBADJ,oBpBi+FH,mCoB99FG,MAAA,KnB0+FF,iBAAkB,QAClB,aAAc,QmBt+FN,0BnB4+FV,0BAHA,0BmB1+FM,0BnB4+FN,0BAHA,0BDFC,yCoBx+FK,yCnB4+FN,yCmBv+FE,MAAA,KnB++FA,iBAAkB,QAClB,aAAc,QmBx+FZ,oBpBg+FH,oBoBh+FG,mCnB6+FF,iBAAkB,KmBz+FV,4BnB8+FV,4BAHA,4BDHC,6BCOD,6BAHA,6BkB39FA,sCClBM,sCnB8+FN,sCmBx+FI,iBAAA,KACA,aAAA,KDcJ,oBC9DE,MAAA,KACA,iBAAA,KpB0hGD,aoBvhGC,MAAA,KnBmiGA,iBAAkB,QmBjiGhB,aAAA,QpB2hGH,mBoBzhGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB0hGH,mBoBvhGC,MAAA,KnBmiGA,iBAAkB,QAClB,aAAc,QmB/hGR,oBADJ,oBpB0hGH,mCoBvhGG,MAAA,KnBmiGF,iBAAkB,QAClB,aAAc,QmB/hGN,0BnBqiGV,0BAHA,0BmBniGM,0BnBqiGN,0BAHA,0BDFC,yCoBjiGK,yCnBqiGN,yCmBhiGE,MAAA,KnBwiGA,iBAAkB,QAClB,aAAc,QmBjiGZ,oBpByhGH,oBoBzhGG,mCnBsiGF,iBAAkB,KmBliGV,4BnBuiGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBjhGA,sCCrBM,sCnBuiGN,sCmBjiGI,iBAAA,QACA,aAAA,QDkBJ,oBClEE,MAAA,QACA,iBAAA,KpBmlGD,aoBhlGC,MAAA,KnB4lGA,iBAAkB,QmB1lGhB,aAAA,QpBolGH,mBoBllGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBmlGH,mBoBhlGC,MAAA,KnB4lGA,iBAAkB,QAClB,aAAc,QmBxlGR,oBADJ,oBpBmlGH,mCoBhlGG,MAAA,KnB4lGF,iBAAkB,QAClB,aAAc,QmBxlGN,0BnB8lGV,0BAHA,0BmB5lGM,0BnB8lGN,0BAHA,0BDFC,yCoB1lGK,yCnB8lGN,yCmBzlGE,MAAA,KnBimGA,iBAAkB,QAClB,aAAc,QmB1lGZ,oBpBklGH,oBoBllGG,mCnB+lGF,iBAAkB,KmB3lGV,4BnBgmGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBtkGA,sCCzBM,sCnBgmGN,sCmB1lGI,iBAAA,QACA,aAAA,QDsBJ,oBCtEE,MAAA,QACA,iBAAA,KpB4oGD,UoBzoGC,MAAA,KnBqpGA,iBAAkB,QmBnpGhB,aAAA,QpB6oGH,gBoB3oGO,gBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB4oGH,gBoBzoGC,MAAA,KnBqpGA,iBAAkB,QAClB,aAAc,QmBjpGR,iBADJ,iBpB4oGH,gCoBzoGG,MAAA,KnBqpGF,iBAAkB,QAClB,aAAc,QmBjpGN,uBnBupGV,uBAHA,uBmBrpGM,uBnBupGN,uBAHA,uBDFC,sCoBnpGK,sCnBupGN,sCmBlpGE,MAAA,KnB0pGA,iBAAkB,QAClB,aAAc,QmBnpGZ,iBpB2oGH,iBoB3oGG,gCnBwpGF,iBAAkB,KmBppGV,yBnBypGV,yBAHA,yBDHC,0BCOD,0BAHA,0BkB3nGA,mCC7BM,mCnBypGN,mCmBnpGI,iBAAA,QACA,aAAA,QD0BJ,iBC1EE,MAAA,QACA,iBAAA,KpBqsGD,aoBlsGC,MAAA,KnB8sGA,iBAAkB,QmB5sGhB,aAAA,QpBssGH,mBoBpsGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBqsGH,mBoBlsGC,MAAA,KnB8sGA,iBAAkB,QAClB,aAAc,QmB1sGR,oBADJ,oBpBqsGH,mCoBlsGG,MAAA,KnB8sGF,iBAAkB,QAClB,aAAc,QmB1sGN,0BnBgtGV,0BAHA,0BmB9sGM,0BnBgtGN,0BAHA,0BDFC,yCoB5sGK,yCnBgtGN,yCmB3sGE,MAAA,KnBmtGA,iBAAkB,QAClB,aAAc,QmB5sGZ,oBpBosGH,oBoBpsGG,mCnBitGF,iBAAkB,KmB7sGV,4BnBktGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBhrGA,sCCjCM,sCnBktGN,sCmB5sGI,iBAAA,QACA,aAAA,QD8BJ,oBC9EE,MAAA,QACA,iBAAA,KpB8vGD,YoB3vGC,MAAA,KnBuwGA,iBAAkB,QmBrwGhB,aAAA,QpB+vGH,kBoB7vGO,kBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB8vGH,kBoB3vGC,MAAA,KnBuwGA,iBAAkB,QAClB,aAAc,QmBnwGR,mBADJ,mBpB8vGH,kCoB3vGG,MAAA,KnBuwGF,iBAAkB,QAClB,aAAc,QmBnwGN,yBnBywGV,yBAHA,yBmBvwGM,yBnBywGN,yBAHA,yBDFC,wCoBrwGK,wCnBywGN,wCmBpwGE,MAAA,KnB4wGA,iBAAkB,QAClB,aAAc,QmBrwGZ,mBpB6vGH,mBoB7vGG,kCnB0wGF,iBAAkB,KmBtwGV,2BnB2wGV,2BAHA,2BDHC,4BCOD,4BAHA,4BkBruGA,qCCrCM,qCnB2wGN,qCmBrwGI,iBAAA,QACA,aAAA,QDuCJ,mBACE,MAAA,QACA,iBAAA,KnB+tGD,UmB5tGC,YAAA,IlBwuGA,MAAO,QACP,cAAe,EAEjB,UGzwGE,iBemCE,iBflCM,oBJkwGT,6BmB7tGC,iBAAA,YlByuGA,mBAAoB,KACZ,WAAY,KkBtuGlB,UAEF,iBAAA,gBnB6tGD,gBmB3tGG,aAAA,YnBiuGH,gBmB/tGG,gBAIA,MAAA,QlBuuGF,gBAAiB,UACjB,iBAAkB,YDNnB,0BmBhuGK,0BAUN,mCATM,mClB2uGJ,MAAO,KmB1yGP,gBAAA,KAGA,mBADA,QpBmyGD,QAAA,KAAA,KmBztGC,UAAW,KlBquGX,YAAa,UmBjzGb,cAAA,IAGA,mBADA,QpB0yGD,QAAA,IAAA,KmB5tGC,UAAW,KlBwuGX,YAAa,ImBxzGb,cAAA,IAGA,mBADA,QpBizGD,QAAA,IAAA,ImB3tGC,UAAW,KACX,YAAA,IACA,cAAA,IAIF,WACE,QAAA,MnB2tGD,MAAA,KCYD,sBACE,WAAY,IqBz3GZ,6BADF,4BtBk3GC,6BI7rGC,MAAA,KAEQ,MJisGT,QAAA,EsBr3GC,mBAAA,QAAA,KAAA,OACE,cAAA,QAAA,KAAA,OtBu3GH,WAAA,QAAA,KAAA,OsBl3GC,StBq3GD,QAAA,EsBn3Ga,UtBs3Gb,QAAA,KsBr3Ga,atBw3Gb,QAAA,MsBv3Ga,etB03Gb,QAAA,UsBt3GC,kBACA,QAAA,gBlBwKA,YACQ,SAAA,SAAA,OAAA,EAOR,SAAA,OACQ,mCAAA,KAAA,8BAAA,KAGR,2BAAA,KACQ,4BAAA,KAAA,uBAAA,KJ2sGT,oBAAA,KuBr5GC,4BAA6B,OAAQ,WACrC,uBAAA,OAAA,WACA,oBAAA,OAAA,WAEA,OACA,QAAA,aACA,MAAA,EACA,OAAA,EACA,YAAA,IACA,eAAA,OvBu5GD,WAAA,IAAA,OuBn5GC,WAAY,IAAI,QtBk6GhB,aAAc,IAAI,MAAM,YsBh6GxB,YAAA,IAAA,MAAA,YAKA,UADF,QvBo5GC,SAAA,SuB94GC,uBACA,QAAA,EAEA,eACA,SAAA,SACA,IAAA,KACA,KAAA,EACA,QAAA,KACA,QAAA,KACA,MAAA,KACA,UAAA,MACA,QAAA,IAAA,EACA,OAAA,IAAA,EAAA,EACA,UAAA,KACA,WAAA,KACA,WAAA,KnBsBA,iBAAA,KACQ,wBAAA,YmBrBR,gBAAA,YtB+5GA,OsB/5GA,IAAA,MAAA,KvBk5GD,OAAA,IAAA,MAAA,gBuB74GC,cAAA,IACE,mBAAA,EAAA,IAAA,KAAA,iBACA,WAAA,EAAA,IAAA,KAAA,iBAzBJ,0BCzBE,MAAA,EACA,KAAA,KAEA,wBxBo8GD,OAAA,IuB96GC,OAAQ,IAAI,EAmCV,SAAA,OACA,iBAAA,QAEA,oBACA,QAAA,MACA,QAAA,IAAA,KACA,MAAA,KvB84GH,YAAA,IuBx4GC,YAAA,WtBw5GA,MAAO,KsBt5GL,YAAA,OvB44GH,0BuB14GG,0BAMF,MAAA,QtBo5GA,gBAAiB,KACjB,iBAAkB,QsBj5GhB,yBAEA,+BADA,+BvBu4GH,MAAA,KuB73GC,gBAAA,KtB64GA,iBAAkB,QAClB,QAAS,EDZV,2BuB33GC,iCAAA,iCAEE,MAAA,KEzGF,iCF2GE,iCAEA,gBAAA,KvB63GH,OAAA,YuBx3GC,iBAAkB,YAGhB,iBAAA,KvBw3GH,OAAA,0DuBn3GG,qBvBs3GH,QAAA,MuB72GC,QACA,QAAA,EAQF,qBACE,MAAA,EACA,KAAA,KAIF,oBACE,MAAA,KACA,KAAA,EAEA,iBACA,QAAA,MACA,QAAA,IAAA,KvBw2GD,UAAA,KuBp2GC,YAAa,WACb,MAAA,KACA,YAAA,OAEA,mBACA,SAAA,MACA,IAAA,EvBs2GD,MAAA,EuBl2GC,OAAQ,EACR,KAAA,EACA,QAAA,IAQF,2BtB42GE,MAAO,EsBx2GL,KAAA,KAEA,eACA,sCvB41GH,QAAA,GuBn2GC,WAAY,EtBm3GZ,cAAe,IAAI,OsBx2GjB,cAAA,IAAA,QAEA,uBvB41GH,8CuBv0GC,IAAK,KAXL,OAAA,KApEA,cAAA,IvB25GC,yBuBv1GD,6BA1DA,MAAA,EACA,KAAA,KvBq5GD,kC0BpiHG,MAAO,KzBojHP,KAAM,GyBhjHR,W1BsiHD,oB0B1iHC,SAAU,SzB0jHV,QAAS,ayBpjHP,eAAA,OAGA,yB1BsiHH,gBCgBC,SAAU,SACV,MAAO,KyB7iHT,gC1BsiHC,gCCYD,+BAFA,+ByBhjHA,uBANM,uBzBujHN,sBAFA,sBAQE,QAAS,EyBljHP,qB1BuiHH,2B0BliHD,2BACE,iC1BoiHD,YAAA,KCgBD,aACE,YAAa,KDZd,kB0B1iHD,wBAAA,0BzB2jHE,MAAO,KDZR,kB0B/hHD,wBACE,0B1BiiHD,YAAA,I0B5hHC,yE1B+hHD,cAAA,E2BhlHC,4BACG,YAAA,EDsDL,mEzB6iHE,wBAAyB,E0B5lHzB,2BAAA,E3BilHD,6C0B5hHD,8CACE,uBAAA,E1B8hHD,0BAAA,E0B3hHC,sB1B8hHD,MAAA,KCgBD,8D0B/mHE,cAAA,E3BomHD,mE0B3hHD,oECjEE,wBAAA,EACG,2BAAA,EDqEL,oEzB0iHE,uBAAwB,EyBxiHxB,0BAAA,EAiBF,mCACE,iCACA,QAAA,EAEF,iCACE,cAAA,IACA,aAAA,IAKF,oCtB/CE,cAAA,KACQ,aAAA,KsBkDR,iCtBnDA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBsByDV,0CACE,mBAAA,K1BugHD,WAAA,K0BngHC,YACA,YAAA,EAGF,eACE,aAAA,IAAA,IAAA,E1BqgHD,oBAAA,ECgBD,uBACE,aAAc,EAAE,IAAI,IyB1gHlB,yBACA,+BACA,oC1B+/GH,QAAA,M0BtgHC,MAAO,KAcH,MAAA,K1B2/GL,UAAA,KCgBD,oCACE,MAAO,KyBpgHL,8BACA,oC1By/GH,oC0Bp/GC,0CACE,WAAA,K1Bs/GH,YAAA,E2B/pHC,4DACC,cAAA,EAQA,sD3B4pHF,uBAAA,I0Bt/GC,wBAAA,IC/KA,2BAAA,EACC,0BAAA,EAQA,sD3BkqHF,uBAAA,E0Bv/GC,wBAAyB,EACzB,2BAAA,I1By/GD,0BAAA,ICgBD,uE0BtrHE,cAAA,E3B2qHD,4E0Bt/GD,6EC7LE,2BAAA,EACC,0BAAA,EDoMH,6EACE,uBAAA,EACA,wBAAA,EAEA,qB1Bo/GD,QAAA,M0Bx/GC,MAAO,KzBwgHP,aAAc,MyBjgHZ,gBAAA,SAEA,0B1Bq/GH,gC0B9/GC,QAAS,WAYP,MAAA,K1Bq/GH,MAAA,G0Bj/GG,qC1Bo/GH,MAAA,KCgBD,+CACE,KAAM,KyB7+GF,gDAFA,6C1Bs+GL,2D0Br+GK,wDEzOJ,SAAU,SACV,KAAA,cACA,eAAA,K5BitHD,a4B7sHC,SAAA,SACE,QAAA,MACA,gBAAA,S5BgtHH,0B4BxtHC,MAAO,KAeL,cAAA,EACA,aAAA,EAOA,2BACA,SAAA,S5BusHH,QAAA,E4BrsHG,MAAA,KACE,MAAA,K5BusHL,cAAA,ECgBD,iCACE,QAAS,EiBnrHT,8BACA,mCACA,sCACA,OAAA,KlBwqHD,QAAA,KAAA,KkBtqHC,UAAA,KjBsrHA,YAAa,UACb,cAAe,IiBrrHb,oClB0qHH,yCkBvqHC,4CjBurHA,OAAQ,KACR,YAAa,KDTd,8C4B/sHD,mDAAA,sD3B0tHA,sCACA,2CiBzrHI,8CjB8rHF,OAAQ,KiB1sHR,8BACA,mCACA,sCACA,OAAA,KlB+rHD,QAAA,IAAA,KkB7rHC,UAAA,KjB6sHA,YAAa,IACb,cAAe,IiB5sHb,oClBisHH,yCkB9rHC,4CjB8sHA,OAAQ,KACR,YAAa,KDTd,8C4B7tHD,mDAAA,sD3BwuHA,sCACA,2CiBhtHI,8CjBqtHF,OAAQ,K2BzuHR,2B5B6tHD,mB4B7tHC,iB3B8uHA,QAAS,W2BzuHX,8D5B6tHC,sD4B7tHD,oDAEE,cAAA,EAEA,mB5B+tHD,iB4B1tHC,MAAO,GACP,YAAA,OACA,eAAA,OAEA,mBACA,QAAA,IAAA,KACA,UAAA,KACA,YAAA,IACA,YAAA,EACA,MAAA,K5B4tHD,WAAA,O4BztHC,iBAAA,KACE,OAAA,IAAA,MAAA,KACA,cAAA,I5B4tHH,4B4BztHC,QAAA,IAAA,KACE,UAAA,KACA,cAAA,I5B4tHH,4B4B/uHC,QAAS,KAAK,K3B+vHd,UAAW,K2BruHT,cAAA,IAKJ,wCAAA,qC3BquHE,WAAY,EAEd,uCACA,+BACA,kC0B70HE,6CACG,8CC4GL,6D5BqtHC,wE4BptHC,wBAAA,E5ButHD,2BAAA,ECgBD,+BACE,aAAc,EAEhB,sCACA,8B2BhuHA,+D5BstHC,oDCWD,iC0Bl1HE,4CACG,6CCiHH,uBAAA,E5BwtHD,0BAAA,E4BltHC,8BAGA,YAAA,E5BotHD,iB4BxtHC,SAAU,SAUR,UAAA,E5BitHH,YAAA,O4B/sHK,sB5BktHL,SAAA,SCgBD,2BACE,YAAa,K2BxtHb,6BAAA,4B5B4sHD,4B4BzsHK,QAAA,EAGJ,kCAAA,wCAGI,aAAA,K5B4sHL,iC6B12HD,uCACE,QAAA,EACA,YAAA,K7B62HD,K6B/2HC,aAAc,EAOZ,cAAA,EACA,WAAA,KARJ,QAWM,SAAA,SACA,QAAA,M7B42HL,U6B12HK,SAAA,S5B03HJ,QAAS,M4Bx3HH,QAAA,KAAA,KAMJ,gB7Bu2HH,gB6Bt2HK,gBAAA,K7By2HL,iBAAA,KCgBD,mB4Br3HQ,MAAA,KAGA,yBADA,yB7B02HP,MAAA,K6Bl2HG,gBAAA,K5Bk3HF,OAAQ,YACR,iBAAkB,Y4B/2Hd,aAzCN,mB7B64HC,mBwBh5HC,iBAAA,KACA,aAAA,QAEA,kBxBm5HD,OAAA,I6Bn5HC,OAAQ,IAAI,EA0DV,SAAA,O7B41HH,iBAAA,Q6Bl1HC,c7Bq1HD,UAAA,K6Bn1HG,UAEA,cAAA,IAAA,MAAA,KALJ,aASM,MAAA,KACA,cAAA,KAEA,e7Bo1HL,aAAA,I6Bn1HK,YAAA,WACE,OAAA,IAAA,MAAA,Y7Bq1HP,cAAA,IAAA,IAAA,EAAA,ECgBD,qBACE,aAAc,KAAK,KAAK,K4B51HlB,sBAEA,4BADA,4BAEA,MAAA,K7Bi1HP,OAAA,Q6B50HC,iBAAA,KAqDA,OAAA,IAAA,MAAA,KA8BA,oBAAA,YAnFA,wBAwDE,MAAA,K7B2xHH,cAAA,E6BzxHK,2BACA,MAAA,KA3DJ,6BAgEE,cAAA,IACA,WAAA,OAYJ,iDA0DE,IAAK,KAjED,KAAA,K7B0xHH,yB6BztHD,2BA9DM,QAAA,W7B0xHL,MAAA,G6Bn2HD,6BAuFE,cAAA,GAvFF,6B5Bw3HA,aAAc,EACd,cAAe,IDZhB,kC6BtuHD,wCA3BA,wCATM,OAAA,IAAA,MAAA,K7B+wHH,yB6B3uHD,6B5B2vHE,cAAe,IAAI,MAAM,KACzB,cAAe,IAAI,IAAI,EAAE,EDZ1B,kC6B92HD,wC7B+2HD,wC6B72HG,oBAAA,MAIE,c7B+2HL,MAAA,K6B52HK,gB7B+2HL,cAAA,ICgBD,iBACE,YAAa,I4Bv3HP,uBAQR,6B7Bo2HC,6B6Bl2HG,MAAA,K7Bq2HH,iBAAA,Q6Bn2HK,gBACA,MAAA,KAYN,mBACE,WAAA,I7B41HD,YAAA,E6Bz1HG,e7B41HH,MAAA,K6B11HK,kBACA,MAAA,KAPN,oBAYI,cAAA,IACA,WAAA,OAYJ,wCA0DE,IAAK,KAjED,KAAA,K7B21HH,yB6B1xHD,kBA9DM,QAAA,W7B21HL,MAAA,G6Bl1HD,oBACA,cAAA,GAIE,oBACA,cAAA,EANJ,yB5B02HE,aAAc,EACd,cAAe,IDZhB,8B6B1yHD,oCA3BA,oCATM,OAAA,IAAA,MAAA,K7Bm1HH,yB6B/yHD,yB5B+zHE,cAAe,IAAI,MAAM,KACzB,cAAe,IAAI,IAAI,EAAE,EDZ1B,8B6Bx0HD,oC7By0HD,oC6Bv0HG,oBAAA,MAGA,uB7B00HH,QAAA,K6B/zHC,qBF3OA,QAAA,M3B+iID,yB8BxiIC,WAAY,KACZ,uBAAA,EACA,wBAAA,EAEA,Q9B0iID,SAAA,S8BliIC,WAAY,KA8nBZ,cAAe,KAhoBb,OAAA,IAAA,MAAA,Y9ByiIH,yB8BzhIC,QAgnBE,cAAe,K9B86GlB,yB8BjhIC,eACA,MAAA,MAGA,iBACA,cAAA,KAAA,aAAA,KAEA,WAAA,Q9BkhID,2BAAA,M8BhhIC,WAAA,IAAA,MAAA,YACE,mBAAA,MAAA,EAAA,IAAA,EAAA,qB9BkhIH,WAAA,MAAA,EAAA,IAAA,EAAA,qB8Bz7GD,oBArlBI,WAAA,KAEA,yBAAA,iB9BkhID,MAAA,K8BhhIC,WAAA,EACE,mBAAA,KACA,WAAA,KAEA,0B9BkhIH,QAAA,gB8B/gIC,OAAA,eACE,eAAA,E9BihIH,SAAA,kBCkBD,oBACE,WAAY,QDZf,sC8B/gIK,mC9B8gIH,oC8BzgIC,cAAe,E7B4hIf,aAAc,G6Bj+GlB,sCAnjBE,mC7ByhIA,WAAY,MDdX,4D8BngID,sC9BogID,mCCkBG,WAAY,O6B3gId,kCANE,gC9BsgIH,4B8BvgIG,0BAuiBF,aAAc,M7Bm/Gd,YAAa,MAEf,yBDZC,kC8B3gIK,gC9B0gIH,4B8B3gIG,0BAcF,aAAc,EAChB,YAAA,GAMF,mBA8gBE,QAAS,KAhhBP,aAAA,EAAA,EAAA,I9BkgIH,yB8B7/HC,mB7B+gIE,cAAe,G6B1gIjB,qBADA,kB9BggID,SAAA,M8Bz/HC,MAAO,EAggBP,KAAM,E7B4gHN,QAAS,KDdR,yB8B7/HD,qB9B8/HD,kB8B7/HC,cAAA,GAGF,kBACE,IAAA,EACA,aAAA,EAAA,EAAA,I9BigID,qB8B1/HC,OAAQ,EACR,cAAA,EACA,aAAA,IAAA,EAAA,EAEA,cACA,MAAA,K9B4/HD,OAAA,K8B1/HC,QAAA,KAAA,K7B4gIA,UAAW,K6B1gIT,YAAA,KAIA,oBAbJ,oB9BwgIC,gBAAA,K8Bv/HG,kB7B0gIF,QAAS,MDdR,yBACF,iC8Bh/HC,uCACA,YAAA,OAGA,eC9LA,SAAA,SACA,MAAA,MD+LA,QAAA,IAAA,KACA,WAAA,IACA,aAAA,KACA,cAAA,I9Bm/HD,iBAAA,Y8B/+HC,iBAAA,KACE,OAAA,IAAA,MAAA,Y9Bi/HH,cAAA,I8B5+HG,qBACA,QAAA,EAEA,yB9B++HH,QAAA,M8BrgIC,MAAO,KAyBL,OAAA,I9B++HH,cAAA,I8BpjHD,mCAvbI,WAAA,I9Bg/HH,yB8Bt+HC,eACA,QAAA,MAGE,YACA,OAAA,MAAA,M9By+HH,iB8B58HC,YAAA,KA2YA,eAAgB,KAjaZ,YAAA,KAEA,yBACA,iCACA,SAAA,OACA,MAAA,KACA,MAAA,KAAA,WAAA,E9Bs+HH,iBAAA,Y8B3kHC,OAAQ,E7B8lHR,mBAAoB,K6Bt/HhB,WAAA,KAGA,kDAqZN,sC9BklHC,QAAA,IAAA,KAAA,IAAA,KCmBD,sC6Bv/HQ,YAAA,KAmBR,4C9Bs9HD,4C8BvlHG,iBAAkB,M9B4lHnB,yB8B5lHD,YAtYI,MAAA,K9Bq+HH,OAAA,E8Bn+HK,eACA,MAAA,K9Bu+HP,iB8B39HG,YAAa,KACf,eAAA,MAGA,aACA,QAAA,KAAA,K1B9NA,WAAA,IACQ,aAAA,M2B/DR,cAAA,IACA,YAAA,M/B4vID,WAAA,IAAA,MAAA,YiBtuHC,cAAe,IAAI,MAAM,YAwEzB,mBAAoB,MAAM,EAAE,IAAI,EAAE,qBAAyB,EAAE,IAAI,EAAE,qBAtI/D,WAAA,MAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,IAAA,EAAA,qBAEA,yBjBwyHH,yBiBpqHC,QAAS,aA/HP,cAAA,EACA,eAAA,OjBuyHH,2BiBzqHC,QAAS,aAxHP,MAAA,KjBoyHH,eAAA,OiBhyHG,kCACA,QAAA,aAmHJ,0BhBmsHE,QAAS,aACT,eAAgB,OgB5yHd,wCjB6xHH,6CiBrrHD,2CjBwrHC,MAAA,KiB5xHG,wCACA,MAAA,KAmGJ,4BhB+sHE,cAAe,EgB3yHb,eAAA,OAGA,uBADA,oBjB6xHH,QAAA,aiBnsHC,WAAY,EhBstHZ,cAAe,EgB5yHX,eAAA,OAsFN,6BAAA,0BAjFI,aAAA,EAiFJ,4CjB4sHC,sCiBvxHG,SAAA,SjB0xHH,YAAA,E8BngID,kDAmWE,IAAK,GAvWH,yBACE,yB9B8gIL,cAAA,I8B5/HD,oCAoVE,cAAe,GA1Vf,yBACA,aACA,MAAA,KACA,YAAA,E1BzPF,eAAA,EACQ,aAAA,EJmwIP,YAAA,EACF,OAAA,E8BngIG,mBAAoB,KACtB,WAAA,M9BugID,8B8BngIC,WAAY,EACZ,uBAAA,EHzUA,wBAAA,EAQA,mDACC,cAAA,E3By0IF,uBAAA,I8B//HC,wBAAyB,IChVzB,2BAAA,EACA,0BAAA,EDkVA,YCnVA,WAAA,IACA,cAAA,IDqVA,mBCtVA,WAAA,KACA,cAAA,KD+VF,mBChWE,WAAA,KACA,cAAA,KDuWF,aAsSE,WAAY,KA1SV,cAAA,KAEA,yB9B+/HD,aACF,MAAA,K8Bl+HG,aAAc,KAhBhB,YAAA,MACA,yBE5WA,aF8WE,MAAA,eAFF,cAKI,MAAA,gB9Bu/HH,aAAA,M8B7+HD,4BACA,aAAA,GADF,gBAKI,iBAAA,Q9Bg/HH,aAAA,QCmBD,8B6BhgIM,MAAA,KARN,oC9B0/HC,oC8B5+HG,MAAA,Q9B++HH,iBAAA,Y8B1+HK,6B9B6+HL,MAAA,KCmBD,iC6B5/HQ,MAAA,KAKF,uC9By+HL,uCCmBC,MAAO,KACP,iBAAkB,Y6Bz/HZ,sCAIF,4C9Bu+HL,4CCmBC,MAAO,KACP,iBAAkB,Q6Bv/HZ,wCAxCR,8C9BihIC,8C8Bn+HG,MAAA,K9Bs+HH,iBAAA,YCmBD,+B6Bt/HM,aAAA,KAGA,qCApDN,qC9B2hIC,iBAAA,KCmBD,yC6Bp/HI,iBAAA,KAOE,iCAAA,6B7Bk/HJ,aAAc,Q6B9+HR,oCAiCN,0C9B+7HD,0C8B3xHC,MAAO,KA7LC,iBAAA,QACA,yB7B8+HR,sD6B5+HU,MAAA,KAKF,4D9By9HP,4DCmBC,MAAO,KACP,iBAAkB,Y6Bz+HV,2DAIF,iE9Bu9HP,iECmBC,MAAO,KACP,iBAAkB,Q6Bv+HV,6D9B09HX,mEADE,mE8B1jIC,MAAO,KA8GP,iBAAA,aAEE,6B9Bi9HL,MAAA,K8B58HG,mC9B+8HH,MAAA,KCmBD,0B6B/9HM,MAAA,KAIA,gCAAA,gC7Bg+HJ,MAAO,K6Bt9HT,0CARQ,0CASN,mD9Bu8HD,mD8Bt8HC,MAAA,KAFF,gBAKI,iBAAA,K9B08HH,aAAA,QCmBD,8B6B19HM,MAAA,QARN,oC9Bo9HC,oC8Bt8HG,MAAA,K9By8HH,iBAAA,Y8Bp8HK,6B9Bu8HL,MAAA,QCmBD,iC6Bt9HQ,MAAA,QAKF,uC9Bm8HL,uCCmBC,MAAO,KACP,iBAAkB,Y6Bn9HZ,sCAIF,4C9Bi8HL,4CCmBC,MAAO,KACP,iBAAkB,Q6Bj9HZ,wCAxCR,8C9B2+HC,8C8B57HG,MAAA,K9B+7HH,iBAAA,YCmBD,+B6B/8HM,aAAA,KAGA,qCArDN,qC9Bq/HC,iBAAA,KCmBD,yC6B78HI,iBAAA,KAME,iCAAA,6B7B48HJ,aAAc,Q6Bx8HR,oCAuCN,0C9Bm5HD,0C8B33HC,MAAO,KAvDC,iBAAA,QAuDV,yBApDU,kE9Bs7HP,aAAA,Q8Bn7HO,0D9Bs7HP,iBAAA,QCmBD,sD6Bt8HU,MAAA,QAKF,4D9Bm7HP,4DCmBC,MAAO,KACP,iBAAkB,Y6Bn8HV,2DAIF,iE9Bi7HP,iECmBC,MAAO,KACP,iBAAkB,Q6Bj8HV,6D9Bo7HX,mEADE,mE8B1hIC,MAAO,KA+GP,iBAAA,aAEE,6B9Bg7HL,MAAA,Q8B36HG,mC9B86HH,MAAA,KCmBD,0B6B97HM,MAAA,QAIA,gCAAA,gC7B+7HJ,MAAO,KgCvkJT,0CH0oBQ,0CGzoBN,mDjCwjJD,mDiCvjJC,MAAA,KAEA,YACA,QAAA,IAAA,KjC2jJD,cAAA,KiChkJC,WAAY,KAQV,iBAAA,QjC2jJH,cAAA,IiCxjJK,eACA,QAAA,ajC4jJL,yBiCxkJC,QAAS,EAAE,IAkBT,MAAA,KjCyjJH,QAAA,SkC5kJC,oBACA,MAAA,KAEA,YlC+kJD,QAAA,akCnlJC,aAAc,EAOZ,OAAA,KAAA,ElC+kJH,cAAA,ICmBD,eiC/lJM,QAAA,OAEA,iBACA,oBACA,SAAA,SACA,MAAA,KACA,QAAA,IAAA,KACA,YAAA,KACA,YAAA,WlCglJL,MAAA,QkC9kJG,gBAAA,KjCimJF,iBAAkB,KiC9lJZ,OAAA,IAAA,MAAA,KPVH,6B3B2lJJ,gCkC7kJG,YAAA,EjCgmJF,uBAAwB,I0BvnJxB,0BAAA,I3BymJD,4BkCxkJG,+BjC2lJF,wBAAyB,IACzB,2BAA4B,IiCxlJxB,uBAFA,uBAGA,0BAFA,0BlC8kJL,QAAA,EkCtkJG,MAAA,QjCylJF,iBAAkB,KAClB,aAAc,KAEhB,sBiCvlJM,4BAFA,4BjC0lJN,yBiCvlJM,+BAFA,+BAGA,QAAA,ElC2kJL,MAAA,KkCloJC,OAAQ,QjCqpJR,iBAAkB,QAClB,aAAc,QiCnlJV,wBAEA,8BADA,8BjColJN,2BiCtlJM,iCjCulJN,iCDZC,MAAA,KkC/jJC,OAAQ,YjCklJR,iBAAkB,KkC7pJd,aAAA,KAEA,oBnC8oJL,uBmC5oJG,QAAA,KAAA,KlC+pJF,UAAW,K0B1pJX,YAAA,U3B4oJD,gCmC3oJG,mClC8pJF,uBAAwB,I0BvqJxB,0BAAA,I3BypJD,+BkC1kJD,kCjC6lJE,wBAAyB,IkC7qJrB,2BAAA,IAEA,oBnC8pJL,uBmC5pJG,QAAA,IAAA,KlC+qJF,UAAW,K0B1qJX,YAAA,I3B4pJD,gCmC3pJG,mClC8qJF,uBAAwB,I0BvrJxB,0BAAA,I3ByqJD,+BoC3qJD,kCACE,wBAAA,IACA,2BAAA,IAEA,OpC6qJD,aAAA,EoCjrJC,OAAQ,KAAK,EAOX,WAAA,OpC6qJH,WAAA,KCmBD,UmC7rJM,QAAA,OAEA,YACA,eACA,QAAA,apC8qJL,QAAA,IAAA,KoC5rJC,iBAAkB,KnC+sJlB,OAAQ,IAAI,MAAM,KmC5rJd,cAAA,KAnBN,kBpCisJC,kBCmBC,gBAAiB,KmCzrJb,iBAAA,KA3BN,eAAA,kBAkCM,MAAA,MAlCN,mBAAA,sBnC6tJE,MAAO,KmClrJH,mBAEA,yBADA,yBpCqqJL,sBqCltJC,MAAO,KACP,OAAA,YACA,iBAAA,KAEA,OACA,QAAA,OACA,QAAA,KAAA,KAAA,KACA,UAAA,IACA,YAAA,IACA,YAAA,EACA,MAAA,KrCotJD,WAAA,OqChtJG,YAAA,OpCmuJF,eAAgB,SoCjuJZ,cAAA,MrCotJL,cqCltJK,cAKJ,MAAA,KACE,gBAAA,KrC+sJH,OAAA,QqC1sJG,aACA,QAAA,KAOJ,YCtCE,SAAA,StC+uJD,IAAA,KCmBD,eqC7vJM,iBAAA,KALJ,2BD0CF,2BrC4sJC,iBAAA,QCmBD,eqCpwJM,iBAAA,QALJ,2BD8CF,2BrC+sJC,iBAAA,QCmBD,eqC3wJM,iBAAA,QALJ,2BDkDF,2BrCktJC,iBAAA,QCmBD,YqClxJM,iBAAA,QALJ,wBDsDF,wBrCqtJC,iBAAA,QCmBD,eqCzxJM,iBAAA,QALJ,2BD0DF,2BrCwtJC,iBAAA,QCmBD,cqChyJM,iBAAA,QCDJ,0BADF,0BAEE,iBAAA,QAEA,OACA,QAAA,aACA,UAAA,KACA,QAAA,IAAA,IACA,UAAA,KACA,YAAA,IACA,YAAA,EACA,MAAA,KACA,WAAA,OvCqxJD,YAAA,OuClxJC,eAAA,OACE,iBAAA,KvCoxJH,cAAA,KuC/wJG,aACA,QAAA,KAGF,YtCkyJA,SAAU,SsChyJR,IAAA,KAMA,0BvC4wJH,eCmBC,IAAK,EsC7xJD,QAAA,IAAA,IvCgxJL,cuC9wJK,cAKJ,MAAA,KtC4xJA,gBAAiB,KsC1xJf,OAAA,QvC4wJH,+BuCxwJC,4BACE,MAAA,QvC0wJH,iBAAA,KuCtwJG,wBvCywJH,MAAA,MuCrwJG,+BvCwwJH,aAAA,IwCj0JC,uBACA,YAAA,IAEA,WACA,YAAA,KxCo0JD,eAAA,KwCz0JC,cAAe,KvC41Jf,MAAO,QuCn1JL,iBAAA,KAIA,eAbJ,cAcI,MAAA,QxCo0JH,awCl1JC,cAAe,KAmBb,UAAA,KxCk0JH,YAAA,ICmBD,cuCh1JI,iBAAA,QAEA,sBxCi0JH,4BwC31JC,cAAe,KA8Bb,aAAA,KxCg0JH,cAAA,IwC7yJD,sBAfI,UAAA,KxCi0JD,oCwC9zJC,WvCi1JA,YAAa,KuC/0JX,eAAA,KxCi0JH,sBwCvzJD,4BvC00JE,cAAe,KuC90Jb,aAAA,KC5CJ,ezC42JD,cyC32JC,UAAA,MAGA,WACA,QAAA,MACA,QAAA,IACA,cAAA,KrCiLA,YAAA,WACK,iBAAA,KACG,OAAA,IAAA,MAAA,KJ8rJT,cAAA,IyCx3JC,mBAAoB,OAAO,IAAI,YxC24J1B,cAAe,OAAO,IAAI,YwC93J7B,WAAA,OAAA,IAAA,YAKF,iBzC22JD,eCmBC,aAAc,KACd,YAAa,KwCv3JX,mBA1BJ,kBzCk4JC,kByCv2JG,aAAA,QCzBJ,oBACE,QAAA,IACA,MAAA,KAEA,O1Cs4JD,QAAA,K0C14JC,cAAe,KAQb,OAAA,IAAA,MAAA,YAEA,cAAA,IAVJ,UAeI,WAAA,E1Ck4JH,MAAA,QCmBD,mByC/4JI,YAAA,IArBJ,SAyBI,U1C+3JH,cAAA,ECmBD,WyCx4JE,WAAA,IAFF,mBAAA,mBAMI,cAAA,KAEA,0BACA,0B1Cy3JH,SAAA,S0Cj3JC,IAAK,KCvDL,MAAA,MACA,MAAA,Q3C46JD,e0Ct3JC,MAAO,QClDL,iBAAA,Q3C26JH,aAAA,Q2Cx6JG,kB3C26JH,iBAAA,Q2Cn7JC,2BACA,MAAA,Q3Cu7JD,Y0C73JC,MAAO,QCtDL,iBAAA,Q3Cs7JH,aAAA,Q2Cn7JG,e3Cs7JH,iBAAA,Q2C97JC,wBACA,MAAA,Q3Ck8JD,e0Cp4JC,MAAO,QC1DL,iBAAA,Q3Ci8JH,aAAA,Q2C97JG,kB3Ci8JH,iBAAA,Q2Cz8JC,2BACA,MAAA,Q3C68JD,c0C34JC,MAAO,QC9DL,iBAAA,Q3C48JH,aAAA,Q2Cz8JG,iB3C48JH,iBAAA,Q4C78JC,0BAAQ,MAAA,QACR,wCAAQ,K5Cm9JP,oBAAA,KAAA,E4C/8JD,GACA,oBAAA,EAAA,GACA,mCAAQ,K5Cq9JP,oBAAA,KAAA,E4Cv9JD,GACA,oBAAA,EAAA,GACA,gCAAQ,K5Cq9JP,oBAAA,KAAA,E4C78JD,GACA,oBAAA,EAAA,GAGA,UACA,OAAA,KxCsCA,cAAA,KACQ,SAAA,OJ26JT,iBAAA,Q4C78JC,cAAe,IACf,mBAAA,MAAA,EAAA,IAAA,IAAA,eACA,WAAA,MAAA,EAAA,IAAA,IAAA,eAEA,cACA,MAAA,KACA,MAAA,EACA,OAAA,KACA,UAAA,KxCyBA,YAAA,KACQ,MAAA,KAyHR,WAAA,OACK,iBAAA,QACG,mBAAA,MAAA,EAAA,KAAA,EAAA,gBJ+zJT,WAAA,MAAA,EAAA,KAAA,EAAA,gB4C18JC,mBAAoB,MAAM,IAAI,K3Cq+JzB,cAAe,MAAM,IAAI,K4Cp+J5B,WAAA,MAAA,IAAA,KDEF,sBCAE,gCDAF,iBAAA,yK5C88JD,iBAAA,oK4Cv8JC,iBAAiB,iK3Cm+JjB,wBAAyB,KAAK,KG/gK9B,gBAAA,KAAA,KJy/JD,qBIv/JS,+BwCmDR,kBAAmB,qBAAqB,GAAG,OAAO,SErElD,aAAA,qBAAA,GAAA,OAAA,S9C4gKD,UAAA,qBAAA,GAAA,OAAA,S6Cz9JG,sBACA,iBAAA,Q7C69JH,wC4Cx8JC,iBAAkB,yKEzElB,iBAAA,oK9CohKD,iBAAA,iK6Cj+JG,mBACA,iBAAA,Q7Cq+JH,qC4C58JC,iBAAkB,yKE7ElB,iBAAA,oK9C4hKD,iBAAA,iK6Cz+JG,sBACA,iBAAA,Q7C6+JH,wC4Ch9JC,iBAAkB,yKEjFlB,iBAAA,oK9CoiKD,iBAAA,iK6Cj/JG,qBACA,iBAAA,Q7Cq/JH,uC+C5iKC,iBAAkB,yKAElB,iBAAA,oK/C6iKD,iBAAA,iK+C1iKG,O/C6iKH,WAAA,KC4BD,mB8CnkKE,WAAA,E/C4iKD,O+CxiKD,YACE,SAAA,O/C0iKD,KAAA,E+CtiKC,Y/CyiKD,MAAA,Q+CriKG,c/CwiKH,QAAA,MC4BD,4B8C9jKE,UAAA,KAGF,aAAA,mBAEE,aAAA,KAGF,YAAA,kB9C+jKE,cAAe,K8CxjKjB,YAHE,Y/CoiKD,a+ChiKC,QAAA,W/CmiKD,eAAA,I+C/hKC,c/CkiKD,eAAA,O+C7hKC,cACA,eAAA,OAMF,eACE,WAAA,EACA,cAAA,ICvDF,YAEE,aAAA,EACA,WAAA,KAQF,YACE,aAAA,EACA,cAAA,KAGA,iBACA,SAAA,SACA,QAAA,MhD6kKD,QAAA,KAAA,KgD1kKC,cAAA,KrB3BA,iBAAA,KACC,OAAA,IAAA,MAAA,KqB6BD,6BACE,uBAAA,IrBvBF,wBAAA,I3BsmKD,4BgDpkKC,cAAe,E/CgmKf,2BAA4B,I+C9lK5B,0BAAA,IAFF,kBAAA,uBAKI,MAAA,KAIF,2CAAA,gD/CgmKA,MAAO,K+C5lKL,wBAFA,wBhDykKH,6BgDxkKG,6BAKF,MAAO,KACP,gBAAA,KACA,iBAAA,QAKA,uB/C4lKA,MAAO,KACP,WAAY,K+CzlKV,0BhDmkKH,gCgDlkKG,gCALF,MAAA,K/CmmKA,OAAQ,YACR,iBAAkB,KDxBnB,mDgD5kKC,yDAAA,yD/CymKA,MAAO,QDxBR,gDgDhkKC,sDAAA,sD/C6lKA,MAAO,K+CzlKL,wBAEA,8BADA,8BhDmkKH,QAAA,EgDxkKC,MAAA,K/ComKA,iBAAkB,QAClB,aAAc,QAEhB,iDDpBC,wDCuBD,uDADA,uD+CzmKE,8DAYI,6D/C4lKN,uD+CxmKE,8D/C2mKF,6DAKE,MAAO,QDxBR,8CiD1qKG,oDADF,oDAEE,MAAA,QAEA,yBhDusKF,MAAO,QgDrsKH,iBAAA,QAFF,0BAAA,+BAKI,MAAA,QAGF,mDAAA,wDhDwsKJ,MAAO,QDtBR,gCiDhrKO,gCAGF,qCAFE,qChD2sKN,MAAO,QACP,iBAAkB,QAEpB,iCgDvsKQ,uCAFA,uChD0sKR,sCDtBC,4CiDnrKO,4CArBN,MAAA,KACE,iBAAA,QACA,aAAA,QAEA,sBhDouKF,MAAO,QgDluKH,iBAAA,QAFF,uBAAA,4BAKI,MAAA,QAGF,gDAAA,qDhDquKJ,MAAO,QDtBR,6BiD7sKO,6BAGF,kCAFE,kChDwuKN,MAAO,QACP,iBAAkB,QAEpB,8BgDpuKQ,oCAFA,oChDuuKR,mCDtBC,yCiDhtKO,yCArBN,MAAA,KACE,iBAAA,QACA,aAAA,QAEA,yBhDiwKF,MAAO,QgD/vKH,iBAAA,QAFF,0BAAA,+BAKI,MAAA,QAGF,mDAAA,wDhDkwKJ,MAAO,QDtBR,gCiD1uKO,gCAGF,qCAFE,qChDqwKN,MAAO,QACP,iBAAkB,QAEpB,iCgDjwKQ,uCAFA,uChDowKR,sCDtBC,4CiD7uKO,4CArBN,MAAA,KACE,iBAAA,QACA,aAAA,QAEA,wBhD8xKF,MAAO,QgD5xKH,iBAAA,QAFF,yBAAA,8BAKI,MAAA,QAGF,kDAAA,uDhD+xKJ,MAAO,QDtBR,+BiDvwKO,+BAGF,oCAFE,oChDkyKN,MAAO,QACP,iBAAkB,QAEpB,gCgD9xKQ,sCAFA,sChDiyKR,qCDtBC,2CiD1wKO,2CDkGN,MAAO,KACP,iBAAA,QACA,aAAA,QAEF,yBACE,WAAA,EACA,cAAA,IE1HF,sBACE,cAAA,EACA,YAAA,IAEA,O9C0DA,cAAA,KACQ,iBAAA,KJ6uKT,OAAA,IAAA,MAAA,YkDnyKC,cAAe,IACf,mBAAA,EAAA,IAAA,IAAA,gBlDqyKD,WAAA,EAAA,IAAA,IAAA,gBkD/xKC,YACA,QAAA,KvBnBC,e3BuzKF,QAAA,KAAA,KkDtyKC,cAAe,IAAI,MAAM,YAMvB,uBAAA,IlDmyKH,wBAAA,IkD7xKC,0CACA,MAAA,QAEA,alDgyKD,WAAA,EkDpyKC,cAAe,EjDg0Kf,UAAW,KACX,MAAO,QDtBR,oBkD1xKC,sBjDkzKF,eiDxzKI,mBAKJ,qBAEE,MAAA,QvBvCA,cACC,QAAA,KAAA,K3Bs0KF,iBAAA,QkDrxKC,WAAY,IAAI,MAAM,KjDizKtB,2BAA4B,IiD9yK1B,0BAAA,IAHJ,mBAAA,mCAMM,cAAA,ElDwxKL,oCkDnxKG,oDjD+yKF,aAAc,IAAI,EiD7yKZ,cAAA,EvBtEL,4D3B61KF,4EkDjxKG,WAAA,EjD6yKF,uBAAwB,IiD3yKlB,wBAAA,IvBtEL,0D3B21KF,0EkD1yKC,cAAe,EvB1Df,2BAAA,IACC,0BAAA,IuB0FH,+EAEI,uBAAA,ElD8wKH,wBAAA,EkD1wKC,wDlD6wKD,iBAAA,EC4BD,0BACE,iBAAkB,EiDlyKpB,8BlD0wKC,ckD1wKD,gCjDuyKE,cAAe,EiDvyKjB,sCAQM,sBlDwwKL,wCC4BC,cAAe,K0Br5Kf,aAAA,KuByGF,wDlDqxKC,0BC4BC,uBAAwB,IACxB,wBAAyB,IiDlzK3B,yFAoBQ,yFlDwwKP,2DkDzwKO,2DjDqyKN,uBAAwB,IACxB,wBAAyB,IAK3B,wGiD9zKA,wGjD4zKA,wGDtBC,wGCuBD,0EiD7zKA,0EjD2zKA,0EiDnyKU,0EjD2yKR,uBAAwB,IAK1B,uGiDx0KA,uGjDs0KA,uGDtBC,uGCuBD,yEiDv0KA,yEjDq0KA,yEiDzyKU,yEvB7HR,wBAAA,IuBiGF,sDlDqzKC,yBC4BC,2BAA4B,IAC5B,0BAA2B,IiDxyKrB,qFA1CR,qFAyCQ,wDlDmxKP,wDC4BC,2BAA4B,IAC5B,0BAA2B,IAG7B,oGDtBC,oGCwBD,oGiD91KA,oGjD21KA,uEiD7yKU,uEjD+yKV,uEiD71KA,uEjDm2KE,0BAA2B,IAG7B,mGDtBC,mGCwBD,mGiDx2KA,mGjDq2KA,sEiDnzKU,sEjDqzKV,sEiDv2KA,sEjD62KE,2BAA4B,IiDlzK1B,0BlD2xKH,qCkDt1KD,0BAAA,qCA+DI,WAAA,IAAA,MAAA,KA/DJ,kDAAA,kDAmEI,WAAA,EAnEJ,uBAAA,yCjD23KE,OAAQ,EiDjzKA,+CjDqzKV,+CiD/3KA,+CjDi4KA,+CAEA,+CANA,+CDjBC,iECoBD,iEiDh4KA,iEjDk4KA,iEAEA,iEANA,iEAWE,YAAa,EiD3zKL,8CjD+zKV,8CiD74KA,8CjD+4KA,8CAEA,8CANA,8CDjBC,gECoBD,gEiD94KA,gEjDg5KA,gEAEA,gEANA,gEAWE,aAAc,EAIhB,+CiD35KA,+CjDy5KA,+CiDl0KU,+CjDq0KV,iEiD55KA,iEjD05KA,iEDtBC,iEC6BC,cAAe,EAEjB,8CiDn0KU,8CjDq0KV,8CiDr6KA,8CjDo6KA,gEDtBC,gECwBD,gEiDh0KI,gEACA,cAAA,EAUJ,yBACE,cAAA,ElDmyKD,OAAA,EkD/xKG,aACA,cAAA,KANJ,oBASM,cAAA,ElDkyKL,cAAA,IkD7xKG,2BlDgyKH,WAAA,IC4BD,4BiDxzKM,cAAA,EAKF,wDAvBJ,wDlDqzKC,WAAA,IAAA,MAAA,KkD5xKK,2BlD+xKL,WAAA,EmDlhLC,uDnDqhLD,cAAA,IAAA,MAAA,KmDlhLG,eACA,aAAA,KnDshLH,8BmDxhLC,MAAA,KAMI,iBAAA,QnDqhLL,aAAA,KmDlhLK,0DACA,iBAAA,KAGJ,qCAEI,MAAA,QnDmhLL,iBAAA,KmDpiLC,yDnDuiLD,oBAAA,KmDpiLG,eACA,aAAA,QnDwiLH,8BmD1iLC,MAAA,KAMI,iBAAA,QnDuiLL,aAAA,QmDpiLK,0DACA,iBAAA,QAGJ,qCAEI,MAAA,QnDqiLL,iBAAA,KmDtjLC,yDnDyjLD,oBAAA,QmDtjLG,eACA,aAAA,QnD0jLH,8BmD5jLC,MAAA,QAMI,iBAAA,QnDyjLL,aAAA,QmDtjLK,0DACA,iBAAA,QAGJ,qCAEI,MAAA,QnDujLL,iBAAA,QmDxkLC,yDnD2kLD,oBAAA,QmDxkLG,YACA,aAAA,QnD4kLH,2BmD9kLC,MAAA,QAMI,iBAAA,QnD2kLL,aAAA,QmDxkLK,uDACA,iBAAA,QAGJ,kCAEI,MAAA,QnDykLL,iBAAA,QmD1lLC,sDnD6lLD,oBAAA,QmD1lLG,eACA,aAAA,QnD8lLH,8BmDhmLC,MAAA,QAMI,iBAAA,QnD6lLL,aAAA,QmD1lLK,0DACA,iBAAA,QAGJ,qCAEI,MAAA,QnD2lLL,iBAAA,QmD5mLC,yDnD+mLD,oBAAA,QmD5mLG,cACA,aAAA,QnDgnLH,6BmDlnLC,MAAA,QAMI,iBAAA,QnD+mLL,aAAA,QmD5mLK,yDACA,iBAAA,QAGJ,oCAEI,MAAA,QnD6mLL,iBAAA,QoD5nLC,wDACA,oBAAA,QAEA,kBACA,SAAA,SpD+nLD,QAAA,MoDpoLC,OAAQ,EnDgqLR,QAAS,EACT,SAAU,OAEZ,yCmDtpLI,wBADA,yBAEA,yBACA,wBACA,SAAA,SACA,IAAA,EACA,OAAA,EpD+nLH,KAAA,EoD1nLC,MAAO,KACP,OAAA,KpD4nLD,OAAA,EoDvnLC,wBpD0nLD,eAAA,OqDppLC,uBACA,eAAA,IAEA,MACA,WAAA,KACA,QAAA,KjDwDA,cAAA,KACQ,iBAAA,QJgmLT,OAAA,IAAA,MAAA,QqD/pLC,cAAe,IASb,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACA,WAAA,MAAA,EAAA,IAAA,IAAA,gBAKJ,iBACE,aAAA,KACA,aAAA,gBAEF,SACE,QAAA,KACA,cAAA,ICtBF,SACE,QAAA,IACA,cAAA,IAEA,OACA,MAAA,MACA,UAAA,KjCRA,YAAA,IAGA,YAAA,ErBqrLD,MAAA,KsD7qLC,YAAA,EAAA,IAAA,EAAA,KrDysLA,OAAQ,kBqDvsLN,QAAA,GjCbF,aiCeE,ajCZF,MAAA,KrB6rLD,gBAAA,KsDzqLC,OAAA,QACE,OAAA,kBACA,QAAA,GAEA,aACA,mBAAA,KtD2qLH,QAAA,EuDhsLC,OAAQ,QACR,WAAA,IvDksLD,OAAA,EuD7rLC,YACA,SAAA,OAEA,OACA,SAAA,MACA,IAAA,EACA,MAAA,EACA,OAAA,EACA,KAAA,EAIA,QAAA,KvD6rLD,QAAA,KuD1rLC,SAAA,OnD+GA,2BAAA,MACI,QAAA,EAEI,0BAkER,mBAAA,kBAAA,IAAA,SAEK,cAAA,aAAA,IAAA,SACG,WAAA,UAAA,IAAA,SJ6gLT,kBAAA,kBuDhsLC,cAAA,kBnD2GA,aAAA,kBACI,UAAA,kBAEI,wBJwlLT,kBAAA,euDpsLK,cAAe,eACnB,aAAA,eACA,UAAA,eAIF,mBACE,WAAA,OACA,WAAA,KvDqsLD,cuDhsLC,SAAU,SACV,MAAA,KACA,OAAA,KAEA,eACA,SAAA,SnDaA,iBAAA,KACQ,wBAAA,YmDZR,gBAAA,YtD4tLA,OsD5tLA,IAAA,MAAA,KAEA,OAAA,IAAA,MAAA,evDksLD,cAAA,IuD9rLC,QAAS,EACT,mBAAA,EAAA,IAAA,IAAA,eACA,WAAA,EAAA,IAAA,IAAA,eAEA,gBACA,SAAA,MACA,IAAA,EACA,MAAA,EvDgsLD,OAAA,EuD9rLC,KAAA,ElCrEA,QAAA,KAGA,iBAAA,KkCmEA,qBlCtEA,OAAA,iBAGA,QAAA,EkCwEF,mBACE,OAAA,kBACA,QAAA,GAIF,cACE,QAAA,KvDgsLD,cAAA,IAAA,MAAA,QuD3rLC,qBACA,WAAA,KAKF,aACE,OAAA,EACA,YAAA,WAIF,YACE,SAAA,SACA,QAAA,KvD0rLD,cuD5rLC,QAAS,KAQP,WAAA,MACA,WAAA,IAAA,MAAA,QATJ,wBAaI,cAAA,EvDsrLH,YAAA,IuDlrLG,mCvDqrLH,YAAA,KuD/qLC,oCACA,YAAA,EAEA,yBACA,SAAA,SvDkrLD,IAAA,QuDhqLC,MAAO,KAZP,OAAA,KACE,SAAA,OvDgrLD,yBuD7qLD,cnDvEA,MAAA,MACQ,OAAA,KAAA,KmD2ER,eAAY,mBAAA,EAAA,IAAA,KAAA,evD+qLX,WAAA,EAAA,IAAA,KAAA,euDzqLD,UAFA,MAAA,OvDirLD,yBwD/zLC,UACA,MAAA,OCNA,SAEA,SAAA,SACA,QAAA,KACA,QAAA,MACA,YAAA,iBAAA,UAAA,MAAA,WACA,UAAA,KACA,WAAA,OACA,YAAA,IACA,YAAA,WACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KACA,eAAA,ODHA,WAAA,OnCVA,aAAA,OAGA,UAAA,OrBs1LD,YAAA,OwD30LC,OAAA,iBnCdA,QAAA,ErB61LD,WAAA,KwD90LY,YAAmB,OAAA,kBxDk1L/B,QAAA,GwDj1LY,aAAmB,QAAA,IAAA,ExDq1L/B,WAAA,KwDp1LY,eAAmB,QAAA,EAAA,IxDw1L/B,YAAA,IwDv1LY,gBAAmB,QAAA,IAAA,ExD21L/B,WAAA,IwDt1LC,cACA,QAAA,EAAA,IACA,YAAA,KAEA,eACA,UAAA,MxDy1LD,QAAA,IAAA,IwDr1LC,MAAO,KACP,WAAA,OACA,iBAAA,KACA,cAAA,IAEA,exDu1LD,SAAA,SwDn1LC,MAAA,EACE,OAAA,EACA,aAAA,YACA,aAAA,MAEA,4BxDq1LH,OAAA,EwDn1LC,KAAA,IACE,YAAA,KACA,aAAA,IAAA,IAAA,EACA,iBAAA,KAEA,iCxDq1LH,MAAA,IwDn1LC,OAAA,EACE,cAAA,KACA,aAAA,IAAA,IAAA,EACA,iBAAA,KAEA,kCxDq1LH,OAAA,EwDn1LC,KAAA,IACE,cAAA,KACA,aAAA,IAAA,IAAA,EACA,iBAAA,KAEA,8BxDq1LH,IAAA,IwDn1LC,KAAA,EACE,WAAA,KACA,aAAA,IAAA,IAAA,IAAA,EACA,mBAAA,KAEA,6BxDq1LH,IAAA,IwDn1LC,MAAA,EACE,WAAA,KACA,aAAA,IAAA,EAAA,IAAA,IACA,kBAAA,KAEA,+BxDq1LH,IAAA,EwDn1LC,KAAA,IACE,YAAA,KACA,aAAA,EAAA,IAAA,IACA,oBAAA,KAEA,oCxDq1LH,IAAA,EwDn1LC,MAAA,IACE,WAAA,KACA,aAAA,EAAA,IAAA,IACA,oBAAA,KAEA,qCxDq1LH,IAAA,E0Dl7LC,KAAM,IACN,WAAA,KACA,aAAA,EAAA,IAAA,IACA,oBAAA,KAEA,SACA,SAAA,SACA,IAAA,EDXA,KAAA,EAEA,QAAA,KACA,QAAA,KACA,UAAA,MACA,QAAA,IACA,YAAA,iBAAA,UAAA,MAAA,WACA,UAAA,KACA,WAAA,OACA,YAAA,IACA,YAAA,WACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KCAA,eAAA,OAEA,WAAA,OACA,aAAA,OAAA,UAAA,OACA,YAAA,OACA,iBAAA,KACA,wBAAA,YtD8CA,gBAAA,YACQ,OAAA,IAAA,MAAA,KJk5LT,OAAA,IAAA,MAAA,e0D77LC,cAAA,IAAY,mBAAA,EAAA,IAAA,KAAA,e1Dg8Lb,WAAA,EAAA,IAAA,KAAA,e0D/7La,WAAA,KACZ,aAAY,WAAA,MACZ,eAAY,YAAA,KAGd,gBACE,WAAA,KAEA,cACA,YAAA,MAEA,e1Dq8LD,QAAA,IAAA,K0Dl8LC,OAAQ,EACR,UAAA,K1Do8LD,iBAAA,Q0D57LC,cAAA,IAAA,MAAA,QzDy9LA,cAAe,IAAI,IAAI,EAAE,EyDt9LvB,iBACA,QAAA,IAAA,KAEA,gBACA,sB1D87LH,SAAA,S0D37LC,QAAS,MACT,MAAA,E1D67LD,OAAA,E0D37LC,aAAc,YACd,aAAA,M1D87LD,gB0Dz7LC,aAAA,KAEE,sBACA,QAAA,GACA,aAAA,KAEA,oB1D27LH,OAAA,M0D17LG,KAAA,IACE,YAAA,MACA,iBAAA,KACA,iBAAA,gBACA,oBAAA,E1D67LL,0B0Dz7LC,OAAA,IACE,YAAA,MACA,QAAA,IACA,iBAAA,KACA,oBAAA,EAEA,sB1D27LH,IAAA,I0D17LG,KAAA,MACE,WAAA,MACA,mBAAA,KACA,mBAAA,gBACA,kBAAA,E1D67LL,4B0Dz7LC,OAAA,MACE,KAAA,IACA,QAAA,IACA,mBAAA,KACA,kBAAA,EAEA,uB1D27LH,IAAA,M0D17LG,KAAA,IACE,YAAA,MACA,iBAAA,EACA,oBAAA,KACA,oBAAA,gB1D67LL,6B0Dx7LC,IAAA,IACE,YAAA,MACA,QAAA,IACA,iBAAA,EACA,oBAAA,KAEA,qB1D07LH,IAAA,I0Dz7LG,MAAA,MACE,WAAA,MACA,mBAAA,EACA,kBAAA,KACA,kBAAA,gB1D47LL,2B2DpjMC,MAAO,IACP,OAAA,M3DsjMD,QAAA,I2DnjMC,mBAAoB,EACpB,kBAAA,KAEA,U3DqjMD,SAAA,S2DljMG,gBACA,SAAA,SvD6KF,MAAA,KACK,SAAA,OJ04LN,sB2D/jMC,SAAU,S1D4lMV,QAAS,K0D9kML,mBAAA,IAAA,YAAA,K3DqjML,cAAA,IAAA,YAAA,K2D3hMC,WAAA,IAAA,YAAA,KvDmKK,4BAFL,0BAGQ,YAAA,EA3JA,qDA+GR,sBAEQ,mBAAA,kBAAA,IAAA,YJ86LP,cAAA,aAAA,IAAA,Y2DzjMG,WAAA,UAAA,IAAA,YvDmHJ,4BAAA,OACQ,oBAAA,OuDjHF,oBAAA,O3D4jML,YAAA,OI58LD,mCHs+LA,2BGr+LQ,KAAA,EuD5GF,kBAAA,sB3D6jML,UAAA,sBC2BD,kCADA,2BG5+LA,KAAA,EACQ,kBAAA,uBuDtGF,UAAA,uBArCN,6B3DomMD,gC2DpmMC,iC1D+nME,KAAM,E0DllMN,kBAAA,mB3D4jMH,UAAA,oBAGA,wB2D5mMD,sBAAA,sBAsDI,QAAA,MAEA,wB3D0jMH,KAAA,E2DtjMG,sB3DyjMH,sB2DrnMC,SAAU,SA+DR,IAAA,E3DyjMH,MAAA,KC0BD,sB0D/kMI,KAAA,KAnEJ,sBAuEI,KAAA,MAvEJ,2BA0EI,4B3DwjMH,KAAA,E2D/iMC,6BACA,KAAA,MAEA,8BACA,KAAA,KtC3FA,kBsC6FA,SAAA,SACA,IAAA,EACA,OAAA,EACA,KAAA,EACA,MAAA,I3DmjMD,UAAA,K2D9iMC,MAAA,KdnGE,WAAA,OACA,YAAA,EAAA,IAAA,IAAA,eACA,iBAAA,cAAA,OAAA,kBACA,QAAA,G7CqpMH,uB2DljMC,iBAAA,sEACE,iBAAA,iEACA,iBAAA,uFdxGA,iBAAA,kEACA,OAAA,+GACA,kBAAA,SACA,wBACA,MAAA,E7C6pMH,KAAA,K2DpjMC,iBAAA,sE1DglMA,iBAAiB,iE0D9kMf,iBAAA,uFACA,iBAAA,kEACA,OAAA,+GtCvHF,kBAAA,SsCyFF,wB3DslMC,wBC4BC,MAAO,KACP,gBAAiB,KACjB,OAAQ,kB0D7kMN,QAAA,EACA,QAAA,G3DwjMH,0C2DhmMD,2CA2CI,6BADA,6B1DklMF,SAAU,S0D7kMR,IAAA,IACA,QAAA,E3DqjMH,QAAA,a2DrmMC,WAAY,MAqDV,0CADA,6B3DsjMH,KAAA,I2D1mMC,YAAa,MA0DX,2CADA,6BAEA,MAAA,IACA,aAAA,MAME,6BADF,6B3DmjMH,MAAA,K2D9iMG,OAAA,KACE,YAAA,M3DgjML,YAAA,E2DriMC,oCACA,QAAA,QAEA,oCACA,QAAA,QAEA,qBACA,SAAA,SACA,OAAA,K3DwiMD,KAAA,I2DjjMC,QAAS,GAYP,MAAA,IACA,aAAA,EACA,YAAA,KACA,WAAA,OACA,WAAA,KAEA,wBACA,QAAA,aAWA,MAAA,KACA,OAAA,K3D8hMH,OAAA,I2D7jMC,YAAa,OAkCX,OAAA,QACA,iBAAA,OACA,iBAAA,cACA,OAAA,IAAA,MAAA,K3D8hMH,cAAA,K2DthMC,6BACA,MAAA,KACA,OAAA,KACA,OAAA,EACA,iBAAA,KAEA,kBACA,SAAA,SACA,MAAA,IACA,OAAA,K3DyhMD,KAAA,I2DxhMC,QAAA,GACE,YAAA,K3D0hMH,eAAA,K2Dj/LC,MAAO,KAhCP,WAAA,O1D8iMA,YAAa,EAAE,IAAI,IAAI,eAEzB,uB0D3iMM,YAAA,KAEA,oCACA,0C3DmhMH,2C2D3hMD,6BAAA,6BAYI,MAAA,K3DmhMH,OAAA,K2D/hMD,WAAA,M1D2jME,UAAW,KDxBZ,0C2D9gMD,6BACE,YAAA,MAEA,2C3DghMD,6B2D5gMD,aAAA,M3D+gMC,kBACF,MAAA,I4D7wMC,KAAA,I3DyyME,eAAgB,KAElB,qBACE,OAAQ,MAkBZ,qCADA,sCADA,mBADA,oBAXA,gBADA,iBAOA,uBADA,wBADA,iBADA,kBADA,wBADA,yBASA,mCADA,oC2DpzME,oBAAA,qBAAA,oBAAA,qB3D2zMF,WADA,YAOA,uBADA,wBADA,qBADA,sBADA,cADA,e2D/zMI,a3Dq0MJ,cDvBC,kB4D7yMG,mB3DqzMJ,WADA,YAwBE,QAAS,MACT,QAAS,IASX,qCADA,mBANA,gBAGA,uBADA,iBADA,wBAIA,mCDhBC,oB6D/0MC,oB5Dk2MF,W+B51MA,uBhCo0MC,qB4D5zMG,cChBF,aACA,kB5D+1MF,W+Br1ME,MAAO,KhCy0MR,cgCt0MC,QAAS,MACT,aAAA,KhCw0MD,YAAA,KgC/zMC,YhCk0MD,MAAA,gBgC/zMC,WhCk0MD,MAAA,egC/zMC,MhCk0MD,QAAA,e8Dz1MC,MACA,QAAA,gBAEA,WACA,WAAA,O9B8BF,WACE,KAAA,EAAA,EAAA,EhCg0MD,MAAA,YgCzzMC,YAAa,KACb,iBAAA,YhC2zMD,OAAA,E+D31MC,Q/D81MD,QAAA,eC4BD,OACE,SAAU,M+Dn4MV,chE42MD,MAAA,aC+BD,YADA,YADA,YADA,YAIE,QAAS,e+Dp5MT,kBhEs4MC,mBgEr4MD,yBhEi4MD,kB+Dl1MD,mBA6IA,yB9D4tMA,kBACA,mB8Dj3ME,yB9D62MF,kBACA,mBACA,yB+Dv5MY,QAAA,eACV,yBAAU,YhE04MT,QAAA,gBC4BD,iB+Dp6MU,QAAA,gBhE64MX,c+D51MG,QAAS,oB/Dg2MV,c+Dl2MC,c/Dm2MH,QAAA,sB+D91MG,yB/Dk2MD,kBACF,QAAA,iB+D91MG,yB/Dk2MD,mBACF,QAAA,kBgEh6MC,yBhEo6MC,yBgEn6MD,QAAA,wBACA,+CAAU,YhEw6MT,QAAA,gBC4BD,iB+Dl8MU,QAAA,gBhE26MX,c+Dr2MG,QAAS,oB/Dy2MV,c+D32MC,c/D42MH,QAAA,sB+Dv2MG,+C/D22MD,kBACF,QAAA,iB+Dv2MG,+C/D22MD,mBACF,QAAA,kBgE97MC,+ChEk8MC,yBgEj8MD,QAAA,wBACA,gDAAU,YhEs8MT,QAAA,gBC4BD,iB+Dh+MU,QAAA,gBhEy8MX,c+D92MG,QAAS,oB/Dk3MV,c+Dp3MC,c/Dq3MH,QAAA,sB+Dh3MG,gD/Do3MD,kBACF,QAAA,iB+Dh3MG,gD/Do3MD,mBACF,QAAA,kBgE59MC,gDhEg+MC,yBgE/9MD,QAAA,wBACA,0BAAU,YhEo+MT,QAAA,gBC4BD,iB+D9/MU,QAAA,gBhEu+MX,c+Dv3MG,QAAS,oB/D23MV,c+D73MC,c/D83MH,QAAA,sB+Dz3MG,0B/D63MD,kBACF,QAAA,iB+Dz3MG,0B/D63MD,mBACF,QAAA,kBgEl/MC,0BhEs/MC,yBACF,QAAA,wBgEv/MC,yBhE2/MC,WACF,QAAA,gBgE5/MC,+ChEggNC,WACF,QAAA,gBgEjgNC,gDhEqgNC,WACF,QAAA,gBAGA,0B+Dh3MC,WA4BE,QAAS,gBC5LX,eAAU,QAAA,eACV,aAAU,ehEyhNT,QAAA,gBC4BD,oB+DnjNU,QAAA,gBhE4hNX,iB+D93MG,QAAS,oBAMX,iB/D23MD,iB+Dt2MG,QAAS,sB/D22MZ,qB+D/3MC,QAAS,e/Dk4MV,a+D53MC,qBAcE,QAAS,iB/Dm3MZ,sB+Dh4MC,QAAS,e/Dm4MV,a+D73MC,sBAOE,QAAS,kB/D23MZ,4B+D53MC,QAAS,eCpLT,ahEojNC,4BACF,QAAA,wBC6BD,aACE,cACE,QAAS","sourcesContent":["/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS and IE text size adjust after device orientation change,\n// without disabling user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background-color: transparent;\n}\n\n//\n// Improve readability of focused elements when they are also in an\n// active/hover state.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n box-sizing: content-box; //2\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links that are fragment identifiers,\n // or use the `javascript:` pseudo protocol\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Bootstrap specific changes start\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n\n td,\n th {\n background-color: #fff !important;\n }\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n // Bootstrap specific changes end\n}\n","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\002a\";\n}\n.glyphicon-plus:before {\n content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n.glyphicon-cd:before {\n content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n content: \"\\e204\";\n}\n.glyphicon-copy:before {\n content: \"\\e205\";\n}\n.glyphicon-paste:before {\n content: \"\\e206\";\n}\n.glyphicon-alert:before {\n content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\e210\";\n}\n.glyphicon-king:before {\n content: \"\\e211\";\n}\n.glyphicon-queen:before {\n content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n content: \"\\e214\";\n}\n.glyphicon-knight:before {\n content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\e216\";\n}\n.glyphicon-tent:before {\n content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n content: \"\\e218\";\n}\n.glyphicon-bed:before {\n content: \"\\e219\";\n}\n.glyphicon-apple:before {\n content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\e227\";\n}\n.glyphicon-btc:before {\n content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n content: \"\\e227\";\n}\n.glyphicon-yen:before {\n content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\e232\";\n}\n.glyphicon-education:before {\n content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\e237\";\n}\n.glyphicon-oil:before {\n content: \"\\e238\";\n}\n.glyphicon-grain:before {\n content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\e253\";\n}\n.glyphicon-console:before {\n content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\e260\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #fff;\n background-color: #333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #ddd;\n}\n.table .table {\n background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #ddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999;\n}\n.form-control::-ms-expand {\n border: 0;\n background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eeeeee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"].form-control,\n input[type=\"time\"].form-control,\n input[type=\"datetime-local\"].form-control,\n input[type=\"month\"].form-control {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.form-group-sm select.form-control {\n height: 30px;\n line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n min-height: 32px;\n padding: 6px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.form-group-lg select.form-control {\n height: 46px;\n line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n min-height: 38px;\n padding: 11px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 11px;\n font-size: 18px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n font-size: 12px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none;\n}\n.btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n color: #333;\n background-color: #e6e6e6;\n border-color: #8c8c8c;\n}\n.btn-default:hover {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n color: #333;\n background-color: #d4d4d4;\n border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default .badge {\n color: #fff;\n background-color: #333;\n}\n.btn-primary {\n color: #fff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n color: #fff;\n background-color: #286090;\n border-color: #122b40;\n}\n.btn-primary:hover {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n color: #fff;\n background-color: #204d74;\n border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n color: #fff;\n background-color: #449d44;\n border-color: #255625;\n}\n.btn-success:hover {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n color: #fff;\n background-color: #398439;\n border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #fff;\n}\n.btn-info {\n color: #fff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n color: #fff;\n background-color: #31b0d5;\n border-color: #1b6d85;\n}\n.btn-info:hover {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n color: #fff;\n background-color: #269abc;\n border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #fff;\n}\n.btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n color: #fff;\n background-color: #ec971f;\n border-color: #985f0d;\n}\n.btn-warning:hover {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n color: #fff;\n background-color: #d58512;\n border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #fff;\n}\n.btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n color: #fff;\n background-color: #c9302c;\n border-color: #761c19;\n}\n.btn-danger:hover {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n color: #fff;\n background-color: #ac2925;\n border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #fff;\n}\n.btn-link {\n color: #337ab7;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-top: 4px solid \\9;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #fff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #fff;\n text-decoration: none;\n outline: 0;\n background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px dashed;\n border-bottom: 4px solid \\9;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group .form-control:focus {\n z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n z-index: 2;\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #fff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #fff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777;\n}\n.navbar-default .navbar-link:hover {\n color: #333;\n}\n.navbar-default .btn-link {\n color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #ccc;\n}\n.navbar-inverse {\n background-color: #222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #fff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #fff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #fff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #fff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\00a0\";\n padding: 0 5px;\n color: #ccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #337ab7;\n background-color: #fff;\n border: 1px solid #ddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n z-index: 2;\n color: #23527c;\n background-color: #eeeeee;\n border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 3;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #fff;\n border-color: #ddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #fff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #fff;\n line-height: 1;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding-top: 30px;\n padding-bottom: 30px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding-top: 48px;\n padding-bottom: 48px;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-object.img-thumbnail {\n max-width: none;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n text-decoration: none;\n color: #555;\n background-color: #f5f5f5;\n}\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #fff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #ddd;\n}\n.panel-default {\n border-color: #ddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n}\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #fff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 12px;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n right: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 14px;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #fff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #fff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform 0.6s ease-in-out;\n -moz-transition: -moz-transform 0.6s ease-in-out;\n -o-transition: -o-transform 0.6s ease-in-out;\n transition: transform 0.6s ease-in-out;\n -webkit-backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000px;\n -moz-perspective: 1000px;\n perspective: 1000px;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #fff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #fff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #fff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -10px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -10px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -10px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table !important;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table !important;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table !important;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table !important;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table !important;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n font-family: sans-serif;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n margin: .67em 0;\n font-size: 2em;\n}\nmark {\n color: #000;\n background: #ff0;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\nsup {\n top: -.5em;\n}\nsub {\n bottom: -.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n height: 0;\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n margin: 0;\n font: inherit;\n color: inherit;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n padding: 0;\n border: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n -webkit-appearance: textfield;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n padding: .35em .625em .75em;\n margin: 0 2px;\n border: 1px solid #c0c0c0;\n}\nlegend {\n padding: 0;\n border: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-spacing: 0;\n border-collapse: collapse;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n color: #000 !important;\n text-shadow: none !important;\n background: transparent !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\002a\";\n}\n.glyphicon-plus:before {\n content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n.glyphicon-cd:before {\n content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n content: \"\\e204\";\n}\n.glyphicon-copy:before {\n content: \"\\e205\";\n}\n.glyphicon-paste:before {\n content: \"\\e206\";\n}\n.glyphicon-alert:before {\n content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\e210\";\n}\n.glyphicon-king:before {\n content: \"\\e211\";\n}\n.glyphicon-queen:before {\n content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n content: \"\\e214\";\n}\n.glyphicon-knight:before {\n content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\e216\";\n}\n.glyphicon-tent:before {\n content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n content: \"\\e218\";\n}\n.glyphicon-bed:before {\n content: \"\\e219\";\n}\n.glyphicon-apple:before {\n content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\e227\";\n}\n.glyphicon-btc:before {\n content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n content: \"\\e227\";\n}\n.glyphicon-yen:before {\n content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\e232\";\n}\n.glyphicon-education:before {\n content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\e237\";\n}\n.glyphicon-oil:before {\n content: \"\\e238\";\n}\n.glyphicon-grain:before {\n content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\e253\";\n}\n.glyphicon-console:before {\n content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\e260\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333;\n background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n display: inline-block;\n max-width: 100%;\n height: auto;\n padding: 4px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: all .2s ease-in-out;\n -o-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n padding: .2em;\n background-color: #fcf8e3;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n margin-left: -5px;\n list-style: none;\n}\n.list-inline > li {\n display: inline-block;\n padding-right: 5px;\n padding-left: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n overflow: hidden;\n clear: left;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n text-align: right;\n border-right: 5px solid #eee;\n border-left: 0;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #fff;\n background-color: #333;\n border-radius: 3px;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n color: #333;\n word-break: break-all;\n word-wrap: break-word;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto;\n}\n.row {\n margin-right: -15px;\n margin-left: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-right: 15px;\n padding-left: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #ddd;\n}\n.table .table {\n background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n display: table-column;\n float: none;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n display: table-cell;\n float: none;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n min-height: .01%;\n overflow-x: auto;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #ddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n min-width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n}\n.form-control::-moz-placeholder {\n color: #999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999;\n}\n.form-control::-ms-expand {\n background-color: transparent;\n border: 0;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"].form-control,\n input[type=\"time\"].form-control,\n input[type=\"datetime-local\"].form-control,\n input[type=\"month\"].form-control {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-top: 4px \\9;\n margin-left: -20px;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n vertical-align: middle;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n min-height: 34px;\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-right: 0;\n padding-left: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.form-group-sm select.form-control {\n height: 30px;\n line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n min-height: 32px;\n padding: 6px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.form-group-lg select.form-control {\n height: 46px;\n line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n min-height: 38px;\n padding: 11px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #3c763d;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #8a6d3b;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n background-color: #f2dede;\n border-color: #a94442;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n padding-top: 7px;\n margin-top: 0;\n margin-bottom: 0;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n padding-top: 7px;\n margin-bottom: 0;\n text-align: right;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 11px;\n font-size: 18px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n font-size: 12px;\n }\n}\n.btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: normal;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n outline: 0;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n opacity: .65;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none;\n}\n.btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n color: #333;\n background-color: #e6e6e6;\n border-color: #8c8c8c;\n}\n.btn-default:hover {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n color: #333;\n background-color: #d4d4d4;\n border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default .badge {\n color: #fff;\n background-color: #333;\n}\n.btn-primary {\n color: #fff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n color: #fff;\n background-color: #286090;\n border-color: #122b40;\n}\n.btn-primary:hover {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n color: #fff;\n background-color: #204d74;\n border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n color: #fff;\n background-color: #449d44;\n border-color: #255625;\n}\n.btn-success:hover {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n color: #fff;\n background-color: #398439;\n border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #fff;\n}\n.btn-info {\n color: #fff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n color: #fff;\n background-color: #31b0d5;\n border-color: #1b6d85;\n}\n.btn-info:hover {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n color: #fff;\n background-color: #269abc;\n border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #fff;\n}\n.btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n color: #fff;\n background-color: #ec971f;\n border-color: #985f0d;\n}\n.btn-warning:hover {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n color: #fff;\n background-color: #d58512;\n border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #fff;\n}\n.btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n color: #fff;\n background-color: #c9302c;\n border-color: #761c19;\n}\n.btn-danger:hover {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n color: #fff;\n background-color: #ac2925;\n border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #fff;\n}\n.btn-link {\n font-weight: normal;\n color: #337ab7;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity .15s linear;\n -o-transition: opacity .15s linear;\n transition: opacity .15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-timing-function: ease;\n -o-transition-timing-function: ease;\n transition-timing-function: ease;\n -webkit-transition-duration: .35s;\n -o-transition-duration: .35s;\n transition-duration: .35s;\n -webkit-transition-property: height, visibility;\n -o-transition-property: height, visibility;\n transition-property: height, visibility;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-top: 4px solid \\9;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n font-size: 14px;\n text-align: left;\n list-style: none;\n background-color: #fff;\n -webkit-background-clip: padding-box;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, .15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n color: #262626;\n text-decoration: none;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #fff;\n text-decoration: none;\n background-color: #337ab7;\n outline: 0;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n cursor: not-allowed;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu-left {\n right: auto;\n left: 0;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n content: \"\";\n border-top: 0;\n border-bottom: 4px dashed;\n border-bottom: 4px solid \\9;\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n right: 0;\n left: auto;\n }\n .navbar-right .dropdown-menu-left {\n right: auto;\n left: 0;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-right: 8px;\n padding-left: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-right: 12px;\n padding-left: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n display: table-cell;\n float: none;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-right: 0;\n padding-left: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group .form-control:focus {\n z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555;\n text-align: center;\n background-color: #eee;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n z-index: 2;\n margin-left: -1px;\n}\n.nav {\n padding-left: 0;\n margin-bottom: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eee;\n}\n.nav > li.disabled > a {\n color: #777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777;\n text-decoration: none;\n cursor: not-allowed;\n background-color: transparent;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eee #eee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555;\n cursor: default;\n background-color: #fff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n margin-bottom: 5px;\n text-align: center;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #fff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n margin-bottom: 5px;\n text-align: center;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n padding-right: 15px;\n padding-left: 15px;\n overflow-x: visible;\n -webkit-overflow-scrolling: touch;\n border-top: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-right: 0;\n padding-left: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n height: 50px;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n padding: 9px 10px;\n margin-top: 8px;\n margin-right: 15px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n padding: 10px 15px;\n margin-top: 8px;\n margin-right: -15px;\n margin-bottom: 8px;\n margin-left: -15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n padding-top: 0;\n padding-bottom: 0;\n margin-right: 0;\n margin-left: 0;\n border: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-right: 15px;\n margin-left: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777;\n}\n.navbar-default .navbar-link:hover {\n color: #333;\n}\n.navbar-default .btn-link {\n color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #ccc;\n}\n.navbar-inverse {\n background-color: #222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #fff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n color: #fff;\n background-color: #080808;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #fff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #fff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n padding: 0 5px;\n color: #ccc;\n content: \"/\\00a0\";\n}\n.breadcrumb > .active {\n color: #777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n margin-left: -1px;\n line-height: 1.42857143;\n color: #337ab7;\n text-decoration: none;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n z-index: 2;\n color: #23527c;\n background-color: #eee;\n border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 3;\n color: #fff;\n cursor: default;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777;\n cursor: not-allowed;\n background-color: #fff;\n border-color: #ddd;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n text-align: center;\n list-style: none;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777;\n cursor: not-allowed;\n background-color: #fff;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: #777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding-top: 30px;\n padding-bottom: 30px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n padding-right: 15px;\n padding-left: 15px;\n border-radius: 6px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding-top: 48px;\n padding-bottom: 48px;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-right: 60px;\n padding-left: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: border .2s ease-in-out;\n -o-transition: border .2s ease-in-out;\n transition: border .2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-right: auto;\n margin-left: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@-o-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n height: 20px;\n margin-bottom: 20px;\n overflow: hidden;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n}\n.progress-bar {\n float: left;\n width: 0;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n -webkit-transition: width .6s ease;\n -o-transition: width .6s ease;\n transition: width .6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n -webkit-background-size: 40px 40px;\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n overflow: hidden;\n zoom: 1;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-object.img-thumbnail {\n max-width: none;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n padding-left: 0;\n margin-bottom: 20px;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n color: #555;\n text-decoration: none;\n background-color: #f5f5f5;\n}\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n color: #777;\n cursor: not-allowed;\n background-color: #eee;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #fff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-right: 15px;\n padding-left: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n margin-bottom: 0;\n border: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #ddd;\n}\n.panel-default {\n border-color: #ddd;\n}\n.panel-default > .panel-heading {\n color: #333;\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 0;\n}\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, .15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n filter: alpha(opacity=20);\n opacity: .2;\n}\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n filter: alpha(opacity=50);\n opacity: .5;\n}\nbutton.close {\n -webkit-appearance: none;\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n display: none;\n overflow: hidden;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transition: -webkit-transform .3s ease-out;\n -o-transition: -o-transform .3s ease-out;\n transition: transform .3s ease-out;\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #fff;\n -webkit-background-clip: padding-box;\n background-clip: padding-box;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, .2);\n border-radius: 6px;\n outline: 0;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000;\n}\n.modal-backdrop.fade {\n filter: alpha(opacity=0);\n opacity: 0;\n}\n.modal-backdrop.in {\n filter: alpha(opacity=50);\n opacity: .5;\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-bottom: 0;\n margin-left: 5px;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 12px;\n font-style: normal;\n font-weight: normal;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n white-space: normal;\n filter: alpha(opacity=0);\n opacity: 0;\n\n line-break: auto;\n}\n.tooltip.in {\n filter: alpha(opacity=90);\n opacity: .9;\n}\n.tooltip.top {\n padding: 5px 0;\n margin-top: -3px;\n}\n.tooltip.right {\n padding: 0 5px;\n margin-left: 3px;\n}\n.tooltip.bottom {\n padding: 5px 0;\n margin-top: 3px;\n}\n.tooltip.left {\n padding: 0 5px;\n margin-left: -3px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n right: 5px;\n bottom: 0;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: normal;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n white-space: normal;\n background-color: #fff;\n -webkit-background-clip: padding-box;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, .2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n\n line-break: auto;\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n padding: 8px 14px;\n margin: 0;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n content: \"\";\n border-width: 10px;\n}\n.popover.top > .arrow {\n bottom: -11px;\n left: 50%;\n margin-left: -11px;\n border-top-color: #999;\n border-top-color: rgba(0, 0, 0, .25);\n border-bottom-width: 0;\n}\n.popover.top > .arrow:after {\n bottom: 1px;\n margin-left: -10px;\n content: \" \";\n border-top-color: #fff;\n border-bottom-width: 0;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-right-color: #999;\n border-right-color: rgba(0, 0, 0, .25);\n border-left-width: 0;\n}\n.popover.right > .arrow:after {\n bottom: -10px;\n left: 1px;\n content: \" \";\n border-right-color: #fff;\n border-left-width: 0;\n}\n.popover.bottom > .arrow {\n top: -11px;\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999;\n border-bottom-color: rgba(0, 0, 0, .25);\n}\n.popover.bottom > .arrow:after {\n top: 1px;\n margin-left: -10px;\n content: \" \";\n border-top-width: 0;\n border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999;\n border-left-color: rgba(0, 0, 0, .25);\n}\n.popover.left > .arrow:after {\n right: 1px;\n bottom: -10px;\n content: \" \";\n border-right-width: 0;\n border-left-color: #fff;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n width: 100%;\n overflow: hidden;\n}\n.carousel-inner > .item {\n position: relative;\n display: none;\n -webkit-transition: .6s ease-in-out left;\n -o-transition: .6s ease-in-out left;\n transition: .6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform .6s ease-in-out;\n -o-transition: -o-transform .6s ease-in-out;\n transition: transform .6s ease-in-out;\n\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000px;\n perspective: 1000px;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n left: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n left: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n left: 0;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 15%;\n font-size: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n background-color: rgba(0, 0, 0, 0);\n filter: alpha(opacity=50);\n opacity: .5;\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));\n background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n background-repeat: repeat-x;\n}\n.carousel-control.right {\n right: 0;\n left: auto;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));\n background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n background-repeat: repeat-x;\n}\n.carousel-control:hover,\n.carousel-control:focus {\n color: #fff;\n text-decoration: none;\n filter: alpha(opacity=90);\n outline: 0;\n opacity: .9;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n margin-top: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n font-family: serif;\n line-height: 1;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n padding-left: 0;\n margin-left: -30%;\n text-align: center;\n list-style: none;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n border: 1px solid #fff;\n border-radius: 10px;\n}\n.carousel-indicators .active {\n width: 12px;\n height: 12px;\n margin: 0;\n background-color: #fff;\n}\n.carousel-caption {\n position: absolute;\n right: 15%;\n bottom: 20px;\n left: 15%;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -10px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -10px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -10px;\n }\n .carousel-caption {\n right: 20%;\n left: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n display: table;\n content: \" \";\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-right: auto;\n margin-left: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table !important;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table !important;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table !important;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table !important;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table !important;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// Star\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('@{icon-font-path}@{icon-font-name}.eot');\n src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\002a\"; } }\n.glyphicon-plus { &:before { content: \"\\002b\"; } }\n.glyphicon-euro,\n.glyphicon-eur { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n.glyphicon-cd { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up { &:before { content: \"\\e204\"; } }\n.glyphicon-copy { &:before { content: \"\\e205\"; } }\n.glyphicon-paste { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer { &:before { content: \"\\e210\"; } }\n.glyphicon-king { &:before { content: \"\\e211\"; } }\n.glyphicon-queen { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop { &:before { content: \"\\e214\"; } }\n.glyphicon-knight { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula { &:before { content: \"\\e216\"; } }\n.glyphicon-tent { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard { &:before { content: \"\\e218\"; } }\n.glyphicon-bed { &:before { content: \"\\e219\"; } }\n.glyphicon-apple { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin { &:before { content: \"\\e227\"; } }\n.glyphicon-btc { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt { &:before { content: \"\\e227\"; } }\n.glyphicon-yen { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted { &:before { content: \"\\e232\"; } }\n.glyphicon-education { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window { &:before { content: \"\\e237\"; } }\n.glyphicon-oil { &:before { content: \"\\e238\"; } }\n.glyphicon-grain { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top { &:before { content: \"\\e253\"; } }\n.glyphicon-console { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n\n[role=\"button\"] {\n cursor: pointer;\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n // WebKit-specific. Other browsers will keep their default outline style.\n // (Initially tried to also force default via `outline: initial`,\n // but that seems to erroneously remove the outline in Firefox altogether.)\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 300;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n background-color: @state-warning-bg;\n padding: .2em;\n}\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n.text-nowrap { white-space: nowrap; }\n\n// Transformation\n.text-lowercase { text-transform: lowercase; }\n.text-uppercase { text-transform: uppercase; }\n.text-capitalize { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n dd {\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n\n @media (min-width: @dl-horizontal-breakpoint) {\n dt {\n float: left;\n width: (@dl-horizontal-offset - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @dl-horizontal-offset;\n }\n }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover,\n a&:focus {\n color: darken(@color, 10%);\n }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n background-color: @color;\n a&:hover,\n a&:focus {\n background-color: darken(@color, 10%);\n }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n margin-right: auto;\n margin-left: auto;\n padding-left: floor((@gutter / 2));\n padding-right: ceil((@gutter / 2));\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: ceil((@gutter / -2));\n margin-right: floor((@gutter / -2));\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: ceil((@grid-gutter-width / 2));\n padding-right: floor((@grid-gutter-width / 2));\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n .col-@{class}-push-0 {\n left: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n .col-@{class}-pull-0 {\n right: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n background-color: @table-bg;\n}\ncaption {\n padding-top: @table-cell-padding;\n padding-bottom: @table-cell-padding;\n color: @text-muted;\n text-align: left;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-of-type(odd) {\n background-color: @table-bg-accent;\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n background-color: @table-bg-hover;\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n @media screen and (max-width: @screen-xs-max) {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &:hover > .@{state},\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; // IE8-9\n line-height: normal;\n}\n\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius; // Note: This has no effect on s in CSS.\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Unstyle the caret on ``\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n display: inline-block;\n margin-bottom: 0; // For input.btn\n font-weight: @btn-font-weight;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n white-space: nowrap;\n .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);\n .user-select(none);\n\n &,\n &:active,\n &.active {\n &:focus,\n &.focus {\n .tab-focus();\n }\n }\n\n &:hover,\n &:focus,\n &.focus {\n color: @btn-default-color;\n text-decoration: none;\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n .opacity(.65);\n .box-shadow(none);\n }\n\n a& {\n &.disabled,\n fieldset[disabled] & {\n pointer-events: none; // Future-proof disabling of clicks on `` elements\n }\n }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n color: @link-color;\n font-weight: normal;\n border-radius: 0;\n\n &,\n &:active,\n &.active,\n &[disabled],\n fieldset[disabled] & {\n background-color: transparent;\n .box-shadow(none);\n }\n &,\n &:hover,\n &:focus,\n &:active {\n border-color: transparent;\n }\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n background-color: transparent;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @btn-link-disabled-color;\n text-decoration: none;\n }\n }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n // line-height: ensure even-numbered height of button next to large input\n .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);\n}\n.btn-sm {\n // line-height: ensure proper height of button next to small input\n .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n.btn-xs {\n .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n display: block;\n width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.btn-block {\n width: 100%;\n }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 25%);\n }\n &:hover {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n\n &:hover,\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 17%);\n border-color: darken(@border, 25%);\n }\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus,\n &.focus {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n opacity: 0;\n .transition(opacity .15s linear);\n &.in {\n opacity: 1;\n }\n}\n\n.collapse {\n display: none;\n\n &.in { display: block; }\n tr&.in { display: table-row; }\n tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n .transition-property(~\"height, visibility\");\n .transition-duration(.35s);\n .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: @caret-width-base dashed;\n border-top: @caret-width-base solid ~\"\\9\"; // IE8\n border-right: @caret-width-base solid transparent;\n border-left: @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: @zindex-dropdown;\n display: none; // none by default, but block on \"open\" of the menu\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0; // override default ul\n list-style: none;\n font-size: @font-size-base;\n text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n background-color: @dropdown-bg;\n border: 1px solid @dropdown-fallback-border; // IE8 fallback\n border: 1px solid @dropdown-border;\n border-radius: @border-radius-base;\n .box-shadow(0 6px 12px rgba(0,0,0,.175));\n background-clip: padding-box;\n\n // Aligns the dropdown menu to right\n //\n // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n &.pull-right {\n right: 0;\n left: auto;\n }\n\n // Dividers (basically an hr) within the dropdown\n .divider {\n .nav-divider(@dropdown-divider-bg);\n }\n\n // Links within the dropdown menu\n > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: @line-height-base;\n color: @dropdown-link-color;\n white-space: nowrap; // prevent links from randomly breaking onto new lines\n }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n &:hover,\n &:focus {\n text-decoration: none;\n color: @dropdown-link-hover-color;\n background-color: @dropdown-link-hover-bg;\n }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-active-color;\n text-decoration: none;\n outline: 0;\n background-color: @dropdown-link-active-bg;\n }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-disabled-color;\n }\n\n // Nuke hover/focus effects\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none; // Remove CSS gradient\n .reset-filter();\n cursor: @cursor-disabled;\n }\n}\n\n// Open state for the dropdown\n.open {\n // Show the menu\n > .dropdown-menu {\n display: block;\n }\n\n // Remove the outline when :focus is triggered\n > a {\n outline: 0;\n }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n left: auto; // Reset the default from `.dropdown-menu`\n right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: @font-size-small;\n line-height: @line-height-base;\n color: @dropdown-header-color;\n white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n // Reverse the caret\n .caret {\n border-top: 0;\n border-bottom: @caret-width-base dashed;\n border-bottom: @caret-width-base solid ~\"\\9\"; // IE8\n content: \"\";\n }\n // Different positioning for bottom up menu\n .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-right {\n .dropdown-menu {\n .dropdown-menu-right();\n }\n // Necessary for overrides of the default right aligned menu.\n // Will remove come v4 in all likelihood.\n .dropdown-menu-left {\n .dropdown-menu-left();\n }\n }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle; // match .btn alignment given font-size hack above\n > .btn {\n position: relative;\n float: left;\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active,\n &.active {\n z-index: 2;\n }\n }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n .btn + .btn,\n .btn + .btn-group,\n .btn-group + .btn,\n .btn-group + .btn-group {\n margin-left: -1px;\n }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n margin-left: -5px; // Offset the first child's margin\n &:extend(.clearfix all);\n\n .btn,\n .btn-group,\n .input-group {\n float: left;\n }\n > .btn,\n > .btn-group,\n > .input-group {\n margin-left: 5px;\n }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n margin-left: 0;\n &:not(:last-child):not(.dropdown-toggle) {\n .border-right-radius(0);\n }\n}\n// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-right-radius(0);\n }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n // Show no shadow for `.btn-link` since it has no other button styles.\n &.btn-link {\n .box-shadow(none);\n }\n}\n\n\n// Reposition the caret\n.btn .caret {\n margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n border-width: @caret-width-large @caret-width-large 0;\n border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n > .btn,\n > .btn-group,\n > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n }\n\n // Clear floats so dropdown menus can be properly placed\n > .btn-group {\n &:extend(.clearfix all);\n > .btn {\n float: none;\n }\n }\n\n > .btn + .btn,\n > .btn + .btn-group,\n > .btn-group + .btn,\n > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n }\n}\n\n.btn-group-vertical > .btn {\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n &:first-child:not(:last-child) {\n .border-top-radius(@btn-border-radius-base);\n .border-bottom-radius(0);\n }\n &:last-child:not(:first-child) {\n .border-top-radius(0);\n .border-bottom-radius(@btn-border-radius-base);\n }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-bottom-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n > .btn,\n > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n }\n > .btn-group .btn {\n width: 100%;\n }\n\n > .btn-group .dropdown-menu {\n left: auto;\n }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n > .btn,\n > .btn-group > .btn {\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0,0,0,0);\n pointer-events: none;\n }\n }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n position: relative; // For dropdowns\n display: table;\n border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n // Undo padding and float of grid classes\n &[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n }\n\n .form-control {\n // Ensure that the input is always above the *appended* addon button for\n // proper border colors.\n position: relative;\n z-index: 2;\n\n // IE9 fubars the placeholder attribute in text inputs and the arrows on\n // select elements in input groups. To fix it, we float the input. Details:\n // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n float: left;\n\n width: 100%;\n margin-bottom: 0;\n\n &:focus {\n z-index: 3;\n }\n }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 1;\n color: @input-color;\n text-align: center;\n background-color: @input-group-addon-bg;\n border: 1px solid @input-group-addon-border-color;\n border-radius: @input-border-radius;\n\n // Sizing\n &.input-sm {\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n border-radius: @input-border-radius-small;\n }\n &.input-lg {\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n border-radius: @input-border-radius-large;\n }\n\n // Nuke default margins from checkboxes and radios to vertically center within.\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n margin-top: 0;\n }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n .border-right-radius(0);\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n .border-left-radius(0);\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n position: relative;\n // Jankily prevent input button groups from wrapping with `white-space` and\n // `font-size` in combination with `inline-block` on buttons.\n font-size: 0;\n white-space: nowrap;\n\n // Negative margin for spacing, position for bringing hovered/focused/actived\n // element above the siblings.\n > .btn {\n position: relative;\n + .btn {\n margin-left: -1px;\n }\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active {\n z-index: 2;\n }\n }\n\n // Negative margin to only have a 1px border between the two\n &:first-child {\n > .btn,\n > .btn-group {\n margin-right: -1px;\n }\n }\n &:last-child {\n > .btn,\n > .btn-group {\n z-index: 2;\n margin-left: -1px;\n }\n }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n margin-bottom: 0;\n padding-left: 0; // Override default ul/ol\n list-style: none;\n &:extend(.clearfix all);\n\n > li {\n position: relative;\n display: block;\n\n > a {\n position: relative;\n display: block;\n padding: @nav-link-padding;\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @nav-link-hover-bg;\n }\n }\n\n // Disabled state sets text to gray and nukes hover/tab effects\n &.disabled > a {\n color: @nav-disabled-link-color;\n\n &:hover,\n &:focus {\n color: @nav-disabled-link-hover-color;\n text-decoration: none;\n background-color: transparent;\n cursor: @cursor-disabled;\n }\n }\n }\n\n // Open dropdowns\n .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @nav-link-hover-bg;\n border-color: @link-color;\n }\n }\n\n // Nav dividers (deprecated with v3.0.1)\n //\n // This should have been removed in v3 with the dropping of `.nav-list`, but\n // we missed it. We don't currently support this anywhere, but in the interest\n // of maintaining backward compatibility in case you use it, it's deprecated.\n .nav-divider {\n .nav-divider();\n }\n\n // Prevent IE8 from misplacing imgs\n //\n // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n > li > a > img {\n max-width: none;\n }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n border-bottom: 1px solid @nav-tabs-border-color;\n > li {\n float: left;\n // Make the list-items overlay the bottom border\n margin-bottom: -1px;\n\n // Actual tabs (as links)\n > a {\n margin-right: 2px;\n line-height: @line-height-base;\n border: 1px solid transparent;\n border-radius: @border-radius-base @border-radius-base 0 0;\n &:hover {\n border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n }\n }\n\n // Active state, and its :hover to override normal :hover\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-tabs-active-link-hover-color;\n background-color: @nav-tabs-active-link-hover-bg;\n border: 1px solid @nav-tabs-active-link-hover-border-color;\n border-bottom-color: transparent;\n cursor: default;\n }\n }\n }\n // pulling this in mainly for less shorthand\n &.nav-justified {\n .nav-justified();\n .nav-tabs-justified();\n }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n > li {\n float: left;\n\n // Links rendered as pills\n > a {\n border-radius: @nav-pills-border-radius;\n }\n + li {\n margin-left: 2px;\n }\n\n // Active state\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-pills-active-link-hover-color;\n background-color: @nav-pills-active-link-hover-bg;\n }\n }\n }\n}\n\n\n// Stacked pills\n.nav-stacked {\n > li {\n float: none;\n + li {\n margin-top: 2px;\n margin-left: 0; // no need for this gap between nav items\n }\n }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n width: 100%;\n\n > li {\n float: none;\n > a {\n text-align: center;\n margin-bottom: 5px;\n }\n }\n\n > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n }\n\n @media (min-width: @screen-sm-min) {\n > li {\n display: table-cell;\n width: 1%;\n > a {\n margin-bottom: 0;\n }\n }\n }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n border-bottom: 0;\n\n > li > a {\n // Override margin from .nav-tabs\n margin-right: 0;\n border-radius: @border-radius-base;\n }\n\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border: 1px solid @nav-tabs-justified-link-border-color;\n }\n\n @media (min-width: @screen-sm-min) {\n > li > a {\n border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n border-radius: @border-radius-base @border-radius-base 0 0;\n }\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border-bottom-color: @nav-tabs-justified-active-link-border-color;\n }\n }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n > .tab-pane {\n display: none;\n }\n > .active {\n display: block;\n }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n // make dropdown border overlap tab border\n margin-top: -1px;\n // Remove the top rounded corners here since there is a hard edge above the menu\n .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n position: relative;\n min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n margin-bottom: @navbar-margin-bottom;\n border: 1px solid transparent;\n\n // Prevent floats from breaking the navbar\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: @navbar-border-radius;\n }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n overflow-x: visible;\n padding-right: @navbar-padding-horizontal;\n padding-left: @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n &:extend(.clearfix all);\n -webkit-overflow-scrolling: touch;\n\n &.in {\n overflow-y: auto;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border-top: 0;\n box-shadow: none;\n\n &.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0; // Override default setting\n overflow: visible !important;\n }\n\n &.in {\n overflow-y: visible;\n }\n\n // Undo the collapse side padding for navbars with containers to ensure\n // alignment of right-aligned contents.\n .navbar-fixed-top &,\n .navbar-static-top &,\n .navbar-fixed-bottom & {\n padding-left: 0;\n padding-right: 0;\n }\n }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n .navbar-collapse {\n max-height: @navbar-collapse-max-height;\n\n @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n max-height: 200px;\n }\n }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n > .navbar-header,\n > .navbar-collapse {\n margin-right: -@navbar-padding-horizontal;\n margin-left: -@navbar-padding-horizontal;\n\n @media (min-width: @grid-float-breakpoint) {\n margin-right: 0;\n margin-left: 0;\n }\n }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n z-index: @zindex-navbar;\n border-width: 0 0 1px;\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: @zindex-navbar-fixed;\n\n // Undo the rounded corners\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0; // override .navbar defaults\n border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n float: left;\n padding: @navbar-padding-vertical @navbar-padding-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-computed;\n height: @navbar-height;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n > img {\n display: block;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n .navbar > .container &,\n .navbar > .container-fluid & {\n margin-left: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: @navbar-padding-horizontal;\n padding: 9px 10px;\n .navbar-vertical-align(34px);\n background-color: transparent;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n border-radius: @border-radius-base;\n\n // We remove the `outline` here, but later compensate by attaching `:hover`\n // styles to `:focus`.\n &:focus {\n outline: 0;\n }\n\n // Bars\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n }\n .icon-bar + .icon-bar {\n margin-top: 4px;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n display: none;\n }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: @line-height-computed;\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n > li > a,\n .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n > li > a {\n line-height: @line-height-computed;\n &:hover,\n &:focus {\n background-image: none;\n }\n }\n }\n }\n\n // Uncollapse the nav\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin: 0;\n\n > li {\n float: left;\n > a {\n padding-top: @navbar-padding-vertical;\n padding-bottom: @navbar-padding-vertical;\n }\n }\n }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n margin-left: -@navbar-padding-horizontal;\n margin-right: -@navbar-padding-horizontal;\n padding: 10px @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n\n // Mixin behavior for optimum display\n .form-inline();\n\n .form-group {\n @media (max-width: @grid-float-breakpoint-max) {\n margin-bottom: 5px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n\n // Vertically center in expanded, horizontal navbar\n .navbar-vertical-align(@input-height-base);\n\n // Undo 100% width for pull classes\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n .box-shadow(none);\n }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n .border-top-radius(@navbar-border-radius);\n .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n .navbar-vertical-align(@input-height-base);\n\n &.btn-sm {\n .navbar-vertical-align(@input-height-small);\n }\n &.btn-xs {\n .navbar-vertical-align(22);\n }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n .navbar-vertical-align(@line-height-computed);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin-left: @navbar-padding-horizontal;\n margin-right: @navbar-padding-horizontal;\n }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-left { .pull-left(); }\n .navbar-right {\n .pull-right();\n margin-right: -@navbar-padding-horizontal;\n\n ~ .navbar-right {\n margin-right: 0;\n }\n }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n background-color: @navbar-default-bg;\n border-color: @navbar-default-border;\n\n .navbar-brand {\n color: @navbar-default-brand-color;\n &:hover,\n &:focus {\n color: @navbar-default-brand-hover-color;\n background-color: @navbar-default-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-default-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-default-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n\n .navbar-toggle {\n border-color: @navbar-default-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-default-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-default-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: @navbar-default-border;\n }\n\n // Dropdown menu items\n .navbar-nav {\n // Remove background color from open dropdown\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-default-link-active-bg;\n color: @navbar-default-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n > li > a {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n }\n }\n\n\n // Links in navbars\n //\n // Add a class to ensure links outside the navbar nav are colored correctly.\n\n .navbar-link {\n color: @navbar-default-link-color;\n &:hover {\n color: @navbar-default-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n }\n }\n }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n background-color: @navbar-inverse-bg;\n border-color: @navbar-inverse-border;\n\n .navbar-brand {\n color: @navbar-inverse-brand-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-brand-hover-color;\n background-color: @navbar-inverse-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-inverse-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-inverse-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n\n // Darken the responsive nav toggle\n .navbar-toggle {\n border-color: @navbar-inverse-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-inverse-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-inverse-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: darken(@navbar-inverse-bg, 7%);\n }\n\n // Dropdowns\n .navbar-nav {\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-inverse-link-active-bg;\n color: @navbar-inverse-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display\n .open .dropdown-menu {\n > .dropdown-header {\n border-color: @navbar-inverse-border;\n }\n .divider {\n background-color: @navbar-inverse-border;\n }\n > li > a {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n }\n }\n\n .navbar-link {\n color: @navbar-inverse-link-color;\n &:hover {\n color: @navbar-inverse-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n }\n }\n }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n .clearfix();\n}\n.center-block {\n .center-block();\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n margin-bottom: @line-height-computed;\n list-style: none;\n background-color: @breadcrumb-bg;\n border-radius: @border-radius-base;\n\n > li {\n display: inline-block;\n\n + li:before {\n content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n padding: 0 5px;\n color: @breadcrumb-color;\n }\n }\n\n > .active {\n color: @breadcrumb-active-color;\n }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: @line-height-computed 0;\n border-radius: @border-radius-base;\n\n > li {\n display: inline; // Remove list-style and block-level defaults\n > a,\n > span {\n position: relative;\n float: left; // Collapse white-space\n padding: @padding-base-vertical @padding-base-horizontal;\n line-height: @line-height-base;\n text-decoration: none;\n color: @pagination-color;\n background-color: @pagination-bg;\n border: 1px solid @pagination-border;\n margin-left: -1px;\n }\n &:first-child {\n > a,\n > span {\n margin-left: 0;\n .border-left-radius(@border-radius-base);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius-base);\n }\n }\n }\n\n > li > a,\n > li > span {\n &:hover,\n &:focus {\n z-index: 2;\n color: @pagination-hover-color;\n background-color: @pagination-hover-bg;\n border-color: @pagination-hover-border;\n }\n }\n\n > .active > a,\n > .active > span {\n &,\n &:hover,\n &:focus {\n z-index: 3;\n color: @pagination-active-color;\n background-color: @pagination-active-bg;\n border-color: @pagination-active-border;\n cursor: default;\n }\n }\n\n > .disabled {\n > span,\n > span:hover,\n > span:focus,\n > a,\n > a:hover,\n > a:focus {\n color: @pagination-disabled-color;\n background-color: @pagination-disabled-bg;\n border-color: @pagination-disabled-border;\n cursor: @cursor-disabled;\n }\n }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n padding-left: 0;\n margin: @line-height-computed 0;\n list-style: none;\n text-align: center;\n &:extend(.clearfix all);\n li {\n display: inline;\n > a,\n > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: @pager-bg;\n border: 1px solid @pager-border;\n border-radius: @pager-border-radius;\n }\n\n > a:hover,\n > a:focus {\n text-decoration: none;\n background-color: @pager-hover-bg;\n }\n }\n\n .next {\n > a,\n > span {\n float: right;\n }\n }\n\n .previous {\n > a,\n > span {\n float: left;\n }\n }\n\n .disabled {\n > a,\n > a:hover,\n > a:focus,\n > span {\n color: @pager-disabled-color;\n background-color: @pager-bg;\n cursor: @cursor-disabled;\n }\n }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: @label-color;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n\n // Add hover effects, but only for links\n a& {\n &:hover,\n &:focus {\n color: @label-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Empty labels collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for labels in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n .label-variant(@label-default-bg);\n}\n\n.label-primary {\n .label-variant(@label-primary-bg);\n}\n\n.label-success {\n .label-variant(@label-success-bg);\n}\n\n.label-info {\n .label-variant(@label-info-bg);\n}\n\n.label-warning {\n .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n background-color: @color;\n\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: @font-size-small;\n font-weight: @badge-font-weight;\n color: @badge-color;\n line-height: @badge-line-height;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: @badge-bg;\n border-radius: @badge-border-radius;\n\n // Empty badges collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for badges in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n\n .btn-xs &,\n .btn-group-xs > .btn & {\n top: 0;\n padding: 1px 5px;\n }\n\n // Hover state, but only for links\n a& {\n &:hover,\n &:focus {\n color: @badge-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Account for badges in navs\n .list-group-item.active > &,\n .nav-pills > .active > a > & {\n color: @badge-active-color;\n background-color: @badge-active-bg;\n }\n\n .list-group-item > & {\n float: right;\n }\n\n .list-group-item > & + & {\n margin-right: 5px;\n }\n\n .nav-pills > li > a > & {\n margin-left: 3px;\n }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n padding-top: @jumbotron-padding;\n padding-bottom: @jumbotron-padding;\n margin-bottom: @jumbotron-padding;\n color: @jumbotron-color;\n background-color: @jumbotron-bg;\n\n h1,\n .h1 {\n color: @jumbotron-heading-color;\n }\n\n p {\n margin-bottom: (@jumbotron-padding / 2);\n font-size: @jumbotron-font-size;\n font-weight: 200;\n }\n\n > hr {\n border-top-color: darken(@jumbotron-bg, 10%);\n }\n\n .container &,\n .container-fluid & {\n border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n\n .container {\n max-width: 100%;\n }\n\n @media screen and (min-width: @screen-sm-min) {\n padding-top: (@jumbotron-padding * 1.6);\n padding-bottom: (@jumbotron-padding * 1.6);\n\n .container &,\n .container-fluid & {\n padding-left: (@jumbotron-padding * 2);\n padding-right: (@jumbotron-padding * 2);\n }\n\n h1,\n .h1 {\n font-size: @jumbotron-heading-font-size;\n }\n }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n display: block;\n padding: @thumbnail-padding;\n margin-bottom: @line-height-computed;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(border .2s ease-in-out);\n\n > img,\n a > img {\n &:extend(.img-responsive);\n margin-left: auto;\n margin-right: auto;\n }\n\n // Add a hover state for linked versions only\n a&:hover,\n a&:focus,\n a&.active {\n border-color: @link-color;\n }\n\n // Image captions\n .caption {\n padding: @thumbnail-caption-padding;\n color: @thumbnail-caption-color;\n }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n padding: @alert-padding;\n margin-bottom: @line-height-computed;\n border: 1px solid transparent;\n border-radius: @alert-border-radius;\n\n // Headings for larger alerts\n h4 {\n margin-top: 0;\n // Specified for the h4 to prevent conflicts of changing @headings-color\n color: inherit;\n }\n\n // Provide class for links that match alerts\n .alert-link {\n font-weight: @alert-link-font-weight;\n }\n\n // Improve alignment and spacing of inner content\n > p,\n > ul {\n margin-bottom: 0;\n }\n\n > p + p {\n margin-top: 5px;\n }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n padding-right: (@alert-padding + 20);\n\n // Adjust close link position\n .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n overflow: hidden;\n height: @line-height-computed;\n margin-bottom: @line-height-computed;\n background-color: @progress-bg;\n border-radius: @progress-border-radius;\n .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: @font-size-small;\n line-height: @line-height-computed;\n color: @progress-bar-color;\n text-align: center;\n background-color: @progress-bar-bg;\n .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n #gradient > .striped();\n background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n background-color: @color;\n\n // Deprecated parent class requirement as of v3.2.0\n .progress-striped & {\n #gradient > .striped();\n }\n}\n",".media {\n // Proper spacing between instances of .media\n margin-top: 15px;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n\n.media-body {\n width: 10000px;\n}\n\n.media-object {\n display: block;\n\n // Fix collapse in webkit from max-width: 100% and display: table-cell.\n &.img-thumbnail {\n max-width: none;\n }\n}\n\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n\n.media-middle {\n vertical-align: middle;\n}\n\n.media-bottom {\n vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on
        ,
          , or
          .\n\n.list-group {\n // No need to set list-style: none; since .list-group-item is block level\n margin-bottom: 20px;\n padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n // Place the border on the list items and negative margin up for better styling\n margin-bottom: -1px;\n background-color: @list-group-bg;\n border: 1px solid @list-group-border;\n\n // Round the first and last items\n &:first-child {\n .border-top-radius(@list-group-border-radius);\n }\n &:last-child {\n margin-bottom: 0;\n .border-bottom-radius(@list-group-border-radius);\n }\n}\n\n\n// Interactive list items\n//\n// Use anchor or button elements instead of `li`s or `div`s to create interactive items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item,\nbutton.list-group-item {\n color: @list-group-link-color;\n\n .list-group-item-heading {\n color: @list-group-link-heading-color;\n }\n\n // Hover state\n &:hover,\n &:focus {\n text-decoration: none;\n color: @list-group-link-hover-color;\n background-color: @list-group-hover-bg;\n }\n}\n\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n\n.list-group-item {\n // Disabled state\n &.disabled,\n &.disabled:hover,\n &.disabled:focus {\n background-color: @list-group-disabled-bg;\n color: @list-group-disabled-color;\n cursor: @cursor-disabled;\n\n // Force color to inherit for custom content\n .list-group-item-heading {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-disabled-text-color;\n }\n }\n\n // Active class on item itself, not parent\n &.active,\n &.active:hover,\n &.active:focus {\n z-index: 2; // Place active items above their siblings for proper border styling\n color: @list-group-active-color;\n background-color: @list-group-active-bg;\n border-color: @list-group-active-border;\n\n // Force color to inherit for custom content\n .list-group-item-heading,\n .list-group-item-heading > small,\n .list-group-item-heading > .small {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-active-text-color;\n }\n }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n","// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a&,\n button& {\n color: @color;\n\n .list-group-item-heading {\n color: inherit;\n }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n margin-bottom: @line-height-computed;\n background-color: @panel-bg;\n border: 1px solid transparent;\n border-radius: @panel-border-radius;\n .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n padding: @panel-body-padding;\n &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n padding: @panel-heading-padding;\n border-bottom: 1px solid transparent;\n .border-top-radius((@panel-border-radius - 1));\n\n > .dropdown .dropdown-toggle {\n color: inherit;\n }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: ceil((@font-size-base * 1.125));\n color: inherit;\n\n > a,\n > small,\n > .small,\n > small > a,\n > .small > a {\n color: inherit;\n }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n padding: @panel-footer-padding;\n background-color: @panel-footer-bg;\n border-top: 1px solid @panel-inner-border;\n .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n > .list-group,\n > .panel-collapse > .list-group {\n margin-bottom: 0;\n\n .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n }\n\n // Add border top radius for first one\n &:first-child {\n .list-group-item:first-child {\n border-top: 0;\n .border-top-radius((@panel-border-radius - 1));\n }\n }\n\n // Add border bottom radius for last one\n &:last-child {\n .list-group-item:last-child {\n border-bottom: 0;\n .border-bottom-radius((@panel-border-radius - 1));\n }\n }\n }\n > .panel-heading + .panel-collapse > .list-group {\n .list-group-item:first-child {\n .border-top-radius(0);\n }\n }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n .list-group-item:first-child {\n border-top-width: 0;\n }\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n > .table,\n > .table-responsive > .table,\n > .panel-collapse > .table {\n margin-bottom: 0;\n\n caption {\n padding-left: @panel-body-padding;\n padding-right: @panel-body-padding;\n }\n }\n // Add border top radius for first one\n > .table:first-child,\n > .table-responsive:first-child > .table:first-child {\n .border-top-radius((@panel-border-radius - 1));\n\n > thead:first-child,\n > tbody:first-child {\n > tr:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n border-top-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-top-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n // Add border bottom radius for last one\n > .table:last-child,\n > .table-responsive:last-child > .table:last-child {\n .border-bottom-radius((@panel-border-radius - 1));\n\n > tbody:last-child,\n > tfoot:last-child {\n > tr:last-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n border-bottom-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-bottom-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n > .panel-body + .table,\n > .panel-body + .table-responsive,\n > .table + .panel-body,\n > .table-responsive + .panel-body {\n border-top: 1px solid @table-border-color;\n }\n > .table > tbody:first-child > tr:first-child th,\n > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n }\n > .table-bordered,\n > .table-responsive > .table-bordered {\n border: 0;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n > thead,\n > tbody {\n > tr:first-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n > tbody,\n > tfoot {\n > tr:last-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n }\n > .table-responsive {\n border: 0;\n margin-bottom: 0;\n }\n}\n\n\n// Collapsible panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n margin-bottom: @line-height-computed;\n\n // Tighten up margin so it's only between panels\n .panel {\n margin-bottom: 0;\n border-radius: @panel-border-radius;\n\n + .panel {\n margin-top: 5px;\n }\n }\n\n .panel-heading {\n border-bottom: 0;\n\n + .panel-collapse > .panel-body,\n + .panel-collapse > .list-group {\n border-top: 1px solid @panel-inner-border;\n }\n }\n\n .panel-footer {\n border-top: 0;\n + .panel-collapse .panel-body {\n border-bottom: 1px solid @panel-inner-border;\n }\n }\n}\n\n\n// Contextual variations\n.panel-default {\n .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse > .panel-body {\n border-top-color: @border;\n }\n .badge {\n color: @heading-bg-color;\n background-color: @heading-text-color;\n }\n }\n & > .panel-footer {\n + .panel-collapse > .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n","// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n\n .embed-responsive-item,\n iframe,\n embed,\n object,\n video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n }\n}\n\n// Modifier class for 16:9 aspect ratio\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n\n// Modifier class for 4:3 aspect ratio\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: @well-bg;\n border: 1px solid @well-border;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n blockquote {\n border-color: #ddd;\n border-color: rgba(0,0,0,.15);\n }\n}\n\n// Sizes\n.well-lg {\n padding: 24px;\n border-radius: @border-radius-large;\n}\n.well-sm {\n padding: 9px;\n border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n float: right;\n font-size: (@font-size-base * 1.5);\n font-weight: @close-font-weight;\n line-height: 1;\n color: @close-color;\n text-shadow: @close-text-shadow;\n .opacity(.2);\n\n &:hover,\n &:focus {\n color: @close-color;\n text-decoration: none;\n cursor: pointer;\n .opacity(.5);\n }\n\n // Additional properties for button version\n // iOS requires the button element instead of an anchor tag.\n // If you want the anchor version, it requires `href=\"#\"`.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n button& {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open - body class for killing the scroll\n// .modal - container to scroll within\n// .modal-dialog - positioning shell for the actual modal\n// .modal-content - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n\n // When fading in the modal, animate it to slide down\n &.fade .modal-dialog {\n .translate(0, -25%);\n .transition-transform(~\"0.3s ease-out\");\n }\n &.in .modal-dialog { .translate(0, 0) }\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 3px 9px rgba(0,0,0,.5));\n background-clip: padding-box;\n // Remove focus outline from opened modal\n outline: 0;\n}\n\n// Modal background\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal-background;\n background-color: @modal-backdrop-bg;\n // Fade for backdrop\n &.fade { .opacity(0); }\n &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n &:extend(.clearfix all);\n}\n// Close icon\n.modal-header .close {\n margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n margin: 0;\n line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n position: relative;\n padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n padding: @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n}\n\n// Measure scrollbar width for padding body during modal show/hide\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n // Automatically set modal's width for larger viewports\n .modal-dialog {\n width: @modal-md;\n margin: 30px auto;\n }\n .modal-content {\n .box-shadow(0 5px 15px rgba(0,0,0,.5));\n }\n\n // Modal sizes\n .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n position: absolute;\n z-index: @zindex-tooltip;\n display: block;\n // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-small;\n\n .opacity(0);\n\n &.in { .opacity(@tooltip-opacity); }\n &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }\n &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }\n &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }\n &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n max-width: @tooltip-max-width;\n padding: 3px 8px;\n color: @tooltip-color;\n text-align: center;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1\n.tooltip {\n &.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-left .tooltip-arrow {\n bottom: 0;\n right: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-right .tooltip-arrow {\n bottom: 0;\n left: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n border-right-color: @tooltip-arrow-color;\n }\n &.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-left-color: @tooltip-arrow-color;\n }\n &.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-left .tooltip-arrow {\n top: 0;\n right: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-right .tooltip-arrow {\n top: 0;\n left: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n}\n",".reset-text() {\n font-family: @font-family-base;\n // We deliberately do NOT reset font-size.\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: @line-height-base;\n text-align: left; // Fallback for where `start` is not supported\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: @zindex-popover;\n display: none;\n max-width: @popover-max-width;\n padding: 1px;\n // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-base;\n\n background-color: @popover-bg;\n background-clip: padding-box;\n border: 1px solid @popover-fallback-border-color;\n border: 1px solid @popover-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n // Offset the popover to account for the popover arrow\n &.top { margin-top: -@popover-arrow-width; }\n &.right { margin-left: @popover-arrow-width; }\n &.bottom { margin-top: @popover-arrow-width; }\n &.left { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n margin: 0; // reset heading margin\n padding: 8px 14px;\n font-size: @font-size-base;\n background-color: @popover-title-bg;\n border-bottom: 1px solid darken(@popover-title-bg, 5%);\n border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;\n}\n\n.popover-content {\n padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n &,\n &:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n}\n.popover > .arrow {\n border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n border-width: @popover-arrow-width;\n content: \"\";\n}\n\n.popover {\n &.top > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-top-color: @popover-arrow-outer-color;\n bottom: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n bottom: 1px;\n margin-left: -@popover-arrow-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-color;\n }\n }\n &.right > .arrow {\n top: 50%;\n left: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-right-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n left: 1px;\n bottom: -@popover-arrow-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-color;\n }\n }\n &.bottom > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-bottom-color: @popover-arrow-outer-color;\n top: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n top: 1px;\n margin-left: -@popover-arrow-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-color;\n }\n }\n\n &.left > .arrow {\n top: 50%;\n right: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-right-width: 0;\n border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-left-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: @popover-arrow-color;\n bottom: -@popover-arrow-width;\n }\n }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n position: relative;\n}\n\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n\n > .item {\n display: none;\n position: relative;\n .transition(.6s ease-in-out left);\n\n // Account for jankitude on images\n > img,\n > a > img {\n &:extend(.img-responsive);\n line-height: 1;\n }\n\n // WebKit CSS3 transforms for supported devices\n @media all and (transform-3d), (-webkit-transform-3d) {\n .transition-transform(~'0.6s ease-in-out');\n .backface-visibility(~'hidden');\n .perspective(1000px);\n\n &.next,\n &.active.right {\n .translate3d(100%, 0, 0);\n left: 0;\n }\n &.prev,\n &.active.left {\n .translate3d(-100%, 0, 0);\n left: 0;\n }\n &.next.left,\n &.prev.right,\n &.active {\n .translate3d(0, 0, 0);\n left: 0;\n }\n }\n }\n\n > .active,\n > .next,\n > .prev {\n display: block;\n }\n\n > .active {\n left: 0;\n }\n\n > .next,\n > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n > .next {\n left: 100%;\n }\n > .prev {\n left: -100%;\n }\n > .next.left,\n > .prev.right {\n left: 0;\n }\n\n > .active.left {\n left: -100%;\n }\n > .active.right {\n left: 100%;\n }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: @carousel-control-width;\n .opacity(@carousel-control-opacity);\n font-size: @carousel-control-font-size;\n color: @carousel-control-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug\n // We can't have this transition here because WebKit cancels the carousel\n // animation if you trip this while in the middle of another animation.\n\n // Set gradients for backgrounds\n &.left {\n #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n }\n &.right {\n left: auto;\n right: 0;\n #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n }\n\n // Hover/focus state\n &:hover,\n &:focus {\n outline: 0;\n color: @carousel-control-color;\n text-decoration: none;\n .opacity(.9);\n }\n\n // Toggles\n .icon-prev,\n .icon-next,\n .glyphicon-chevron-left,\n .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n }\n .icon-prev,\n .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n }\n .icon-next,\n .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n }\n .icon-prev,\n .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n }\n\n\n .icon-prev {\n &:before {\n content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n }\n }\n .icon-next {\n &:before {\n content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n }\n }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n\n li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid @carousel-indicator-border-color;\n border-radius: 10px;\n cursor: pointer;\n\n // IE8-9 hack for event handling\n //\n // Internet Explorer 8-9 does not support clicks on elements without a set\n // `background-color`. We cannot use `filter` since that's not viewed as a\n // background color by the browser. Thus, a hack is needed.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer\n //\n // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n // set alpha transparency for the best results possible.\n background-color: #000 \\9; // IE8\n background-color: rgba(0,0,0,0); // IE9\n }\n .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: @carousel-indicator-active-bg;\n }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: @carousel-caption-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n & .btn {\n text-shadow: none; // No shadow for button elements in carousel-caption\n }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n // Scale up the controls a smidge\n .carousel-control {\n .glyphicon-chevron-left,\n .glyphicon-chevron-right,\n .icon-prev,\n .icon-next {\n width: (@carousel-control-font-size * 1.5);\n height: (@carousel-control-font-size * 1.5);\n margin-top: (@carousel-control-font-size / -2);\n font-size: (@carousel-control-font-size * 1.5);\n }\n .glyphicon-chevron-left,\n .icon-prev {\n margin-left: (@carousel-control-font-size / -2);\n }\n .glyphicon-chevron-right,\n .icon-next {\n margin-right: (@carousel-control-font-size / -2);\n }\n }\n\n // Show and left align the captions\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n\n // Move up the indicators\n .carousel-indicators {\n bottom: 20px;\n }\n}\n","// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n//\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n","// Center-align a block level element\n\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n","// CSS image replacement\n//\n// Heads up! v3 launched with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (has been removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#support-ie10-width\n// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n width: device-width;\n}\n\n\n// Visibility utilities\n// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n .responsive-invisibility();\n}\n\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n\n.visible-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-visibility();\n }\n}\n.visible-xs-block {\n @media (max-width: @screen-xs-max) {\n display: block !important;\n }\n}\n.visible-xs-inline {\n @media (max-width: @screen-xs-max) {\n display: inline !important;\n }\n}\n.visible-xs-inline-block {\n @media (max-width: @screen-xs-max) {\n display: inline-block !important;\n }\n}\n\n.visible-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-visibility();\n }\n}\n.visible-sm-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: block !important;\n }\n}\n.visible-sm-inline {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline !important;\n }\n}\n.visible-sm-inline-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline-block !important;\n }\n}\n\n.visible-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-visibility();\n }\n}\n.visible-md-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: block !important;\n }\n}\n.visible-md-inline {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline !important;\n }\n}\n.visible-md-inline-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline-block !important;\n }\n}\n\n.visible-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-visibility();\n }\n}\n.visible-lg-block {\n @media (min-width: @screen-lg-min) {\n display: block !important;\n }\n}\n.visible-lg-inline {\n @media (min-width: @screen-lg-min) {\n display: inline !important;\n }\n}\n.visible-lg-inline-block {\n @media (min-width: @screen-lg-min) {\n display: inline-block !important;\n }\n}\n\n.hidden-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-invisibility();\n }\n}\n.hidden-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-invisibility();\n }\n}\n.hidden-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-invisibility();\n }\n}\n.hidden-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-invisibility();\n }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n// Note: Deprecated .visible-print as of v3.2.0\n.visible-print {\n .responsive-invisibility();\n\n @media print {\n .responsive-visibility();\n }\n}\n.visible-print-block {\n display: none !important;\n\n @media print {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n\n @media print {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n\n @media print {\n display: inline-block !important;\n }\n}\n\n.hidden-print {\n @media print {\n .responsive-invisibility();\n }\n}\n","// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table !important; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n"]} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot deleted file mode 100644 index b93a4953fff68..0000000000000 Binary files a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot and /dev/null differ diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg deleted file mode 100644 index 94fb5490a2ed1..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf deleted file mode 100644 index 1413fc609ab6f..0000000000000 Binary files a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf and /dev/null differ diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff deleted file mode 100644 index 9e612858f8022..0000000000000 Binary files a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff and /dev/null differ diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 deleted file mode 100644 index 64539b54c3751..0000000000000 Binary files a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 and /dev/null differ diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/js/bootstrap.js b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/js/bootstrap.js deleted file mode 100644 index 8a2e99a535d47..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/js/bootstrap.js +++ /dev/null @@ -1,2377 +0,0 @@ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under the MIT license - */ - -if (typeof jQuery === 'undefined') { - throw new Error('Bootstrap\'s JavaScript requires jQuery') -} - -+function ($) { - 'use strict'; - var version = $.fn.jquery.split(' ')[0].split('.') - if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) { - throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4') - } -}(jQuery); - -/* ======================================================================== - * Bootstrap: transition.js v3.3.7 - * http://getbootstrap.com/javascript/#transitions - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) - // ============================================================ - - function transitionEnd() { - var el = document.createElement('bootstrap') - - var transEndEventNames = { - WebkitTransition : 'webkitTransitionEnd', - MozTransition : 'transitionend', - OTransition : 'oTransitionEnd otransitionend', - transition : 'transitionend' - } - - for (var name in transEndEventNames) { - if (el.style[name] !== undefined) { - return { end: transEndEventNames[name] } - } - } - - return false // explicit for ie8 ( ._.) - } - - // http://blog.alexmaccaw.com/css-transitions - $.fn.emulateTransitionEnd = function (duration) { - var called = false - var $el = this - $(this).one('bsTransitionEnd', function () { called = true }) - var callback = function () { if (!called) $($el).trigger($.support.transition.end) } - setTimeout(callback, duration) - return this - } - - $(function () { - $.support.transition = transitionEnd() - - if (!$.support.transition) return - - $.event.special.bsTransitionEnd = { - bindType: $.support.transition.end, - delegateType: $.support.transition.end, - handle: function (e) { - if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) - } - } - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: alert.js v3.3.7 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.VERSION = '3.3.7' - - Alert.TRANSITION_DURATION = 150 - - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector === '#' ? [] : selector) - - if (e) e.preventDefault() - - if (!$parent.length) { - $parent = $this.closest('.alert') - } - - $parent.trigger(e = $.Event('close.bs.alert')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - // detach from parent, fire event then clean up data - $parent.detach().trigger('closed.bs.alert').remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one('bsTransitionEnd', removeElement) - .emulateTransitionEnd(Alert.TRANSITION_DURATION) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') - - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.alert - - $.fn.alert = Plugin - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: button.js v3.3.7 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } - - Button.VERSION = '3.3.7' - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state += 'Text' - - if (data.resetText == null) $el.data('resetText', $el[val]()) - - // push to event loop to allow forms to submit - setTimeout($.proxy(function () { - $el[val](data[state] == null ? this.options[state] : data[state]) - - if (state == 'loadingText') { - this.isLoading = true - $el.addClass(d).attr(d, d).prop(d, true) - } else if (this.isLoading) { - this.isLoading = false - $el.removeClass(d).removeAttr(d).prop(d, false) - } - }, this), 0) - } - - Button.prototype.toggle = function () { - var changed = true - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if ($parent.length) { - var $input = this.$element.find('input') - if ($input.prop('type') == 'radio') { - if ($input.prop('checked')) changed = false - $parent.find('.active').removeClass('active') - this.$element.addClass('active') - } else if ($input.prop('type') == 'checkbox') { - if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false - this.$element.toggleClass('active') - } - $input.prop('checked', this.$element.hasClass('active')) - if (changed) $input.trigger('change') - } else { - this.$element.attr('aria-pressed', !this.$element.hasClass('active')) - this.$element.toggleClass('active') - } - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.button', (data = new Button(this, options))) - - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - var old = $.fn.button - - $.fn.button = Plugin - $.fn.button.Constructor = Button - - - // BUTTON NO CONFLICT - // ================== - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - // BUTTON DATA-API - // =============== - - $(document) - .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { - var $btn = $(e.target).closest('.btn') - Plugin.call($btn, 'toggle') - if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) { - // Prevent double click on radios, and the double selections (so cancellation) on checkboxes - e.preventDefault() - // The target component still receive the focus - if ($btn.is('input,button')) $btn.trigger('focus') - else $btn.find('input:visible,button:visible').first().trigger('focus') - } - }) - .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: carousel.js v3.3.7 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CAROUSEL CLASS DEFINITION - // ========================= - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = null - this.sliding = null - this.interval = null - this.$active = null - this.$items = null - - this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) - - this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element - .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) - .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) - } - - Carousel.VERSION = '3.3.7' - - Carousel.TRANSITION_DURATION = 600 - - Carousel.DEFAULTS = { - interval: 5000, - pause: 'hover', - wrap: true, - keyboard: true - } - - Carousel.prototype.keydown = function (e) { - if (/input|textarea/i.test(e.target.tagName)) return - switch (e.which) { - case 37: this.prev(); break - case 39: this.next(); break - default: return - } - - e.preventDefault() - } - - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) - - this.interval && clearInterval(this.interval) - - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - - return this - } - - Carousel.prototype.getItemIndex = function (item) { - this.$items = item.parent().children('.item') - return this.$items.index(item || this.$active) - } - - Carousel.prototype.getItemForDirection = function (direction, active) { - var activeIndex = this.getItemIndex(active) - var willWrap = (direction == 'prev' && activeIndex === 0) - || (direction == 'next' && activeIndex == (this.$items.length - 1)) - if (willWrap && !this.options.wrap) return active - var delta = direction == 'prev' ? -1 : 1 - var itemIndex = (activeIndex + delta) % this.$items.length - return this.$items.eq(itemIndex) - } - - Carousel.prototype.to = function (pos) { - var that = this - var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" - if (activeIndex == pos) return this.pause().cycle() - - return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) - } - - Carousel.prototype.pause = function (e) { - e || (this.paused = true) - - if (this.$element.find('.next, .prev').length && $.support.transition) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - - this.interval = clearInterval(this.interval) - - return this - } - - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } - - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } - - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || this.getItemForDirection(type, $active) - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var that = this - - if ($next.hasClass('active')) return (this.sliding = false) - - var relatedTarget = $next[0] - var slideEvent = $.Event('slide.bs.carousel', { - relatedTarget: relatedTarget, - direction: direction - }) - this.$element.trigger(slideEvent) - if (slideEvent.isDefaultPrevented()) return - - this.sliding = true - - isCycling && this.pause() - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) - $nextIndicator && $nextIndicator.addClass('active') - } - - var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" - if ($.support.transition && this.$element.hasClass('slide')) { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .one('bsTransitionEnd', function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { - that.$element.trigger(slidEvent) - }, 0) - }) - .emulateTransitionEnd(Carousel.TRANSITION_DURATION) - } else { - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger(slidEvent) - } - - isCycling && this.cycle() - - return this - } - - - // CAROUSEL PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide - - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - var old = $.fn.carousel - - $.fn.carousel = Plugin - $.fn.carousel.Constructor = Carousel - - - // CAROUSEL NO CONFLICT - // ==================== - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - - // CAROUSEL DATA-API - // ================= - - var clickHandler = function (e) { - var href - var $this = $(this) - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 - if (!$target.hasClass('carousel')) return - var options = $.extend({}, $target.data(), $this.data()) - var slideIndex = $this.attr('data-slide-to') - if (slideIndex) options.interval = false - - Plugin.call($target, options) - - if (slideIndex) { - $target.data('bs.carousel').to(slideIndex) - } - - e.preventDefault() - } - - $(document) - .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) - .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) - - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - Plugin.call($carousel, $carousel.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: collapse.js v3.3.7 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - -/* jshint latedef: false */ - -+function ($) { - 'use strict'; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + - '[data-toggle="collapse"][data-target="#' + element.id + '"]') - this.transitioning = null - - if (this.options.parent) { - this.$parent = this.getParent() - } else { - this.addAriaAndCollapsedClass(this.$element, this.$trigger) - } - - if (this.options.toggle) this.toggle() - } - - Collapse.VERSION = '3.3.7' - - Collapse.TRANSITION_DURATION = 350 - - Collapse.DEFAULTS = { - toggle: true - } - - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return - - var activesData - var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') - - if (actives && actives.length) { - activesData = actives.data('bs.collapse') - if (activesData && activesData.transitioning) return - } - - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - if (actives && actives.length) { - Plugin.call(actives, 'hide') - activesData || actives.data('bs.collapse', null) - } - - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - .addClass('collapsing')[dimension](0) - .attr('aria-expanded', true) - - this.$trigger - .removeClass('collapsed') - .attr('aria-expanded', true) - - this.transitioning = 1 - - var complete = function () { - this.$element - .removeClass('collapsing') - .addClass('collapse in')[dimension]('') - this.transitioning = 0 - this.$element - .trigger('shown.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - var scrollSize = $.camelCase(['scroll', dimension].join('-')) - - this.$element - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) - } - - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return - - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var dimension = this.dimension() - - this.$element[dimension](this.$element[dimension]())[0].offsetHeight - - this.$element - .addClass('collapsing') - .removeClass('collapse in') - .attr('aria-expanded', false) - - this.$trigger - .addClass('collapsed') - .attr('aria-expanded', false) - - this.transitioning = 1 - - var complete = function () { - this.transitioning = 0 - this.$element - .removeClass('collapsing') - .addClass('collapse') - .trigger('hidden.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - this.$element - [dimension](0) - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION) - } - - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - Collapse.prototype.getParent = function () { - return $(this.options.parent) - .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') - .each($.proxy(function (i, element) { - var $element = $(element) - this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) - }, this)) - .end() - } - - Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { - var isOpen = $element.hasClass('in') - - $element.attr('aria-expanded', isOpen) - $trigger - .toggleClass('collapsed', !isOpen) - .attr('aria-expanded', isOpen) - } - - function getTargetFromTrigger($trigger) { - var href - var target = $trigger.attr('data-target') - || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 - - return $(target) - } - - - // COLLAPSE PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.collapse') - var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false - if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.collapse - - $.fn.collapse = Plugin - $.fn.collapse.Constructor = Collapse - - - // COLLAPSE NO CONFLICT - // ==================== - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - // COLLAPSE DATA-API - // ================= - - $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var $this = $(this) - - if (!$this.attr('data-target')) e.preventDefault() - - var $target = getTargetFromTrigger($this) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() - - Plugin.call($target, option) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: dropdown.js v3.3.7 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // DROPDOWN CLASS DEFINITION - // ========================= - - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle="dropdown"]' - var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) - } - - Dropdown.VERSION = '3.3.7' - - function getParent($this) { - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = selector && $(selector) - - return $parent && $parent.length ? $parent : $this.parent() - } - - function clearMenus(e) { - if (e && e.which === 3) return - $(backdrop).remove() - $(toggle).each(function () { - var $this = $(this) - var $parent = getParent($this) - var relatedTarget = { relatedTarget: this } - - if (!$parent.hasClass('open')) return - - if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return - - $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this.attr('aria-expanded', 'false') - $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) - }) - } - - Dropdown.prototype.toggle = function (e) { - var $this = $(this) - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate - $(document.createElement('div')) - .addClass('dropdown-backdrop') - .insertAfter($(this)) - .on('click', clearMenus) - } - - var relatedTarget = { relatedTarget: this } - $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this - .trigger('focus') - .attr('aria-expanded', 'true') - - $parent - .toggleClass('open') - .trigger($.Event('shown.bs.dropdown', relatedTarget)) - } - - return false - } - - Dropdown.prototype.keydown = function (e) { - if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return - - var $this = $(this) - - e.preventDefault() - e.stopPropagation() - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - if (!isActive && e.which != 27 || isActive && e.which == 27) { - if (e.which == 27) $parent.find(toggle).trigger('focus') - return $this.trigger('click') - } - - var desc = ' li:not(.disabled):visible a' - var $items = $parent.find('.dropdown-menu' + desc) - - if (!$items.length) return - - var index = $items.index(e.target) - - if (e.which == 38 && index > 0) index-- // up - if (e.which == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 - - $items.eq(index).trigger('focus') - } - - - // DROPDOWN PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.dropdown') - - if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.dropdown - - $.fn.dropdown = Plugin - $.fn.dropdown.Constructor = Dropdown - - - // DROPDOWN NO CONFLICT - // ==================== - - $.fn.dropdown.noConflict = function () { - $.fn.dropdown = old - return this - } - - - // APPLY TO STANDARD DROPDOWN ELEMENTS - // =================================== - - $(document) - .on('click.bs.dropdown.data-api', clearMenus) - .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) - .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) - .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: modal.js v3.3.7 - * http://getbootstrap.com/javascript/#modals - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // MODAL CLASS DEFINITION - // ====================== - - var Modal = function (element, options) { - this.options = options - this.$body = $(document.body) - this.$element = $(element) - this.$dialog = this.$element.find('.modal-dialog') - this.$backdrop = null - this.isShown = null - this.originalBodyPad = null - this.scrollbarWidth = 0 - this.ignoreBackdropClick = false - - if (this.options.remote) { - this.$element - .find('.modal-content') - .load(this.options.remote, $.proxy(function () { - this.$element.trigger('loaded.bs.modal') - }, this)) - } - } - - Modal.VERSION = '3.3.7' - - Modal.TRANSITION_DURATION = 300 - Modal.BACKDROP_TRANSITION_DURATION = 150 - - Modal.DEFAULTS = { - backdrop: true, - keyboard: true, - show: true - } - - Modal.prototype.toggle = function (_relatedTarget) { - return this.isShown ? this.hide() : this.show(_relatedTarget) - } - - Modal.prototype.show = function (_relatedTarget) { - var that = this - var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) - - this.$element.trigger(e) - - if (this.isShown || e.isDefaultPrevented()) return - - this.isShown = true - - this.checkScrollbar() - this.setScrollbar() - this.$body.addClass('modal-open') - - this.escape() - this.resize() - - this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) - - this.$dialog.on('mousedown.dismiss.bs.modal', function () { - that.$element.one('mouseup.dismiss.bs.modal', function (e) { - if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true - }) - }) - - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - if (!that.$element.parent().length) { - that.$element.appendTo(that.$body) // don't move modals dom position - } - - that.$element - .show() - .scrollTop(0) - - that.adjustDialog() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element.addClass('in') - - that.enforceFocus() - - var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) - - transition ? - that.$dialog // wait for modal to slide in - .one('bsTransitionEnd', function () { - that.$element.trigger('focus').trigger(e) - }) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - that.$element.trigger('focus').trigger(e) - }) - } - - Modal.prototype.hide = function (e) { - if (e) e.preventDefault() - - e = $.Event('hide.bs.modal') - - this.$element.trigger(e) - - if (!this.isShown || e.isDefaultPrevented()) return - - this.isShown = false - - this.escape() - this.resize() - - $(document).off('focusin.bs.modal') - - this.$element - .removeClass('in') - .off('click.dismiss.bs.modal') - .off('mouseup.dismiss.bs.modal') - - this.$dialog.off('mousedown.dismiss.bs.modal') - - $.support.transition && this.$element.hasClass('fade') ? - this.$element - .one('bsTransitionEnd', $.proxy(this.hideModal, this)) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - this.hideModal() - } - - Modal.prototype.enforceFocus = function () { - $(document) - .off('focusin.bs.modal') // guard against infinite focus loop - .on('focusin.bs.modal', $.proxy(function (e) { - if (document !== e.target && - this.$element[0] !== e.target && - !this.$element.has(e.target).length) { - this.$element.trigger('focus') - } - }, this)) - } - - Modal.prototype.escape = function () { - if (this.isShown && this.options.keyboard) { - this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { - e.which == 27 && this.hide() - }, this)) - } else if (!this.isShown) { - this.$element.off('keydown.dismiss.bs.modal') - } - } - - Modal.prototype.resize = function () { - if (this.isShown) { - $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) - } else { - $(window).off('resize.bs.modal') - } - } - - Modal.prototype.hideModal = function () { - var that = this - this.$element.hide() - this.backdrop(function () { - that.$body.removeClass('modal-open') - that.resetAdjustments() - that.resetScrollbar() - that.$element.trigger('hidden.bs.modal') - }) - } - - Modal.prototype.removeBackdrop = function () { - this.$backdrop && this.$backdrop.remove() - this.$backdrop = null - } - - Modal.prototype.backdrop = function (callback) { - var that = this - var animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $(document.createElement('div')) - .addClass('modal-backdrop ' + animate) - .appendTo(this.$body) - - this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { - if (this.ignoreBackdropClick) { - this.ignoreBackdropClick = false - return - } - if (e.target !== e.currentTarget) return - this.options.backdrop == 'static' - ? this.$element[0].focus() - : this.hide() - }, this)) - - if (doAnimate) this.$backdrop[0].offsetWidth // force reflow - - this.$backdrop.addClass('in') - - if (!callback) return - - doAnimate ? - this.$backdrop - .one('bsTransitionEnd', callback) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callback() - - } else if (!this.isShown && this.$backdrop) { - this.$backdrop.removeClass('in') - - var callbackRemove = function () { - that.removeBackdrop() - callback && callback() - } - $.support.transition && this.$element.hasClass('fade') ? - this.$backdrop - .one('bsTransitionEnd', callbackRemove) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callbackRemove() - - } else if (callback) { - callback() - } - } - - // these following methods are used to handle overflowing modals - - Modal.prototype.handleUpdate = function () { - this.adjustDialog() - } - - Modal.prototype.adjustDialog = function () { - var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight - - this.$element.css({ - paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', - paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' - }) - } - - Modal.prototype.resetAdjustments = function () { - this.$element.css({ - paddingLeft: '', - paddingRight: '' - }) - } - - Modal.prototype.checkScrollbar = function () { - var fullWindowWidth = window.innerWidth - if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 - var documentElementRect = document.documentElement.getBoundingClientRect() - fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) - } - this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth - this.scrollbarWidth = this.measureScrollbar() - } - - Modal.prototype.setScrollbar = function () { - var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) - this.originalBodyPad = document.body.style.paddingRight || '' - if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) - } - - Modal.prototype.resetScrollbar = function () { - this.$body.css('padding-right', this.originalBodyPad) - } - - Modal.prototype.measureScrollbar = function () { // thx walsh - var scrollDiv = document.createElement('div') - scrollDiv.className = 'modal-scrollbar-measure' - this.$body.append(scrollDiv) - var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth - this.$body[0].removeChild(scrollDiv) - return scrollbarWidth - } - - - // MODAL PLUGIN DEFINITION - // ======================= - - function Plugin(option, _relatedTarget) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.modal') - var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data) $this.data('bs.modal', (data = new Modal(this, options))) - if (typeof option == 'string') data[option](_relatedTarget) - else if (options.show) data.show(_relatedTarget) - }) - } - - var old = $.fn.modal - - $.fn.modal = Plugin - $.fn.modal.Constructor = Modal - - - // MODAL NO CONFLICT - // ================= - - $.fn.modal.noConflict = function () { - $.fn.modal = old - return this - } - - - // MODAL DATA-API - // ============== - - $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { - var $this = $(this) - var href = $this.attr('href') - var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 - var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) - - if ($this.is('a')) e.preventDefault() - - $target.one('show.bs.modal', function (showEvent) { - if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown - $target.one('hidden.bs.modal', function () { - $this.is(':visible') && $this.trigger('focus') - }) - }) - Plugin.call($target, option, this) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tooltip.js v3.3.7 - * http://getbootstrap.com/javascript/#tooltip - * Inspired by the original jQuery.tipsy by Jason Frame - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TOOLTIP PUBLIC CLASS DEFINITION - // =============================== - - var Tooltip = function (element, options) { - this.type = null - this.options = null - this.enabled = null - this.timeout = null - this.hoverState = null - this.$element = null - this.inState = null - - this.init('tooltip', element, options) - } - - Tooltip.VERSION = '3.3.7' - - Tooltip.TRANSITION_DURATION = 150 - - Tooltip.DEFAULTS = { - animation: true, - placement: 'top', - selector: false, - template: '', - trigger: 'hover focus', - title: '', - delay: 0, - html: false, - container: false, - viewport: { - selector: 'body', - padding: 0 - } - } - - Tooltip.prototype.init = function (type, element, options) { - this.enabled = true - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) - this.inState = { click: false, hover: false, focus: false } - - if (this.$element[0] instanceof document.constructor && !this.options.selector) { - throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') - } - - var triggers = this.options.trigger.split(' ') - - for (var i = triggers.length; i--;) { - var trigger = triggers[i] - - if (trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (trigger != 'manual') { - var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' - var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' - - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - Tooltip.prototype.getDefaults = function () { - return Tooltip.DEFAULTS - } - - Tooltip.prototype.getOptions = function (options) { - options = $.extend({}, this.getDefaults(), this.$element.data(), options) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay, - hide: options.delay - } - } - - return options - } - - Tooltip.prototype.getDelegateOptions = function () { - var options = {} - var defaults = this.getDefaults() - - this._options && $.each(this._options, function (key, value) { - if (defaults[key] != value) options[key] = value - }) - - return options - } - - Tooltip.prototype.enter = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true - } - - if (self.tip().hasClass('in') || self.hoverState == 'in') { - self.hoverState = 'in' - return - } - - clearTimeout(self.timeout) - - self.hoverState = 'in' - - if (!self.options.delay || !self.options.delay.show) return self.show() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - Tooltip.prototype.isInStateTrue = function () { - for (var key in this.inState) { - if (this.inState[key]) return true - } - - return false - } - - Tooltip.prototype.leave = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false - } - - if (self.isInStateTrue()) return - - clearTimeout(self.timeout) - - self.hoverState = 'out' - - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - Tooltip.prototype.show = function () { - var e = $.Event('show.bs.' + this.type) - - if (this.hasContent() && this.enabled) { - this.$element.trigger(e) - - var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) - if (e.isDefaultPrevented() || !inDom) return - var that = this - - var $tip = this.tip() - - var tipId = this.getUID(this.type) - - this.setContent() - $tip.attr('id', tipId) - this.$element.attr('aria-describedby', tipId) - - if (this.options.animation) $tip.addClass('fade') - - var placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - var autoToken = /\s?auto?\s?/i - var autoPlace = autoToken.test(placement) - if (autoPlace) placement = placement.replace(autoToken, '') || 'top' - - $tip - .detach() - .css({ top: 0, left: 0, display: 'block' }) - .addClass(placement) - .data('bs.' + this.type, this) - - this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) - this.$element.trigger('inserted.bs.' + this.type) - - var pos = this.getPosition() - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (autoPlace) { - var orgPlacement = placement - var viewportDim = this.getPosition(this.$viewport) - - placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : - placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : - placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : - placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : - placement - - $tip - .removeClass(orgPlacement) - .addClass(placement) - } - - var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) - - this.applyPlacement(calculatedOffset, placement) - - var complete = function () { - var prevHoverState = that.hoverState - that.$element.trigger('shown.bs.' + that.type) - that.hoverState = null - - if (prevHoverState == 'out') that.leave(that) - } - - $.support.transition && this.$tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - } - } - - Tooltip.prototype.applyPlacement = function (offset, placement) { - var $tip = this.tip() - var width = $tip[0].offsetWidth - var height = $tip[0].offsetHeight - - // manually read margins because getBoundingClientRect includes difference - var marginTop = parseInt($tip.css('margin-top'), 10) - var marginLeft = parseInt($tip.css('margin-left'), 10) - - // we must check for NaN for ie 8/9 - if (isNaN(marginTop)) marginTop = 0 - if (isNaN(marginLeft)) marginLeft = 0 - - offset.top += marginTop - offset.left += marginLeft - - // $.fn.offset doesn't round pixel values - // so we use setOffset directly with our own function B-0 - $.offset.setOffset($tip[0], $.extend({ - using: function (props) { - $tip.css({ - top: Math.round(props.top), - left: Math.round(props.left) - }) - } - }, offset), 0) - - $tip.addClass('in') - - // check to see if placing tip in new offset caused the tip to resize itself - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (placement == 'top' && actualHeight != height) { - offset.top = offset.top + height - actualHeight - } - - var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) - - if (delta.left) offset.left += delta.left - else offset.top += delta.top - - var isVertical = /top|bottom/.test(placement) - var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight - var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' - - $tip.offset(offset) - this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) - } - - Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { - this.arrow() - .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') - .css(isVertical ? 'top' : 'left', '') - } - - Tooltip.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - Tooltip.prototype.hide = function (callback) { - var that = this - var $tip = $(this.$tip) - var e = $.Event('hide.bs.' + this.type) - - function complete() { - if (that.hoverState != 'in') $tip.detach() - if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary. - that.$element - .removeAttr('aria-describedby') - .trigger('hidden.bs.' + that.type) - } - callback && callback() - } - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - $tip.removeClass('in') - - $.support.transition && $tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - - this.hoverState = null - - return this - } - - Tooltip.prototype.fixTitle = function () { - var $e = this.$element - if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') - } - } - - Tooltip.prototype.hasContent = function () { - return this.getTitle() - } - - Tooltip.prototype.getPosition = function ($element) { - $element = $element || this.$element - - var el = $element[0] - var isBody = el.tagName == 'BODY' - - var elRect = el.getBoundingClientRect() - if (elRect.width == null) { - // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 - elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) - } - var isSvg = window.SVGElement && el instanceof window.SVGElement - // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3. - // See https://github.com/twbs/bootstrap/issues/20280 - var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset()) - var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } - var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null - - return $.extend({}, elRect, scroll, outerDims, elOffset) - } - - Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { - return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : - /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } - - } - - Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { - var delta = { top: 0, left: 0 } - if (!this.$viewport) return delta - - var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 - var viewportDimensions = this.getPosition(this.$viewport) - - if (/right|left/.test(placement)) { - var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll - var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight - if (topEdgeOffset < viewportDimensions.top) { // top overflow - delta.top = viewportDimensions.top - topEdgeOffset - } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow - delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset - } - } else { - var leftEdgeOffset = pos.left - viewportPadding - var rightEdgeOffset = pos.left + viewportPadding + actualWidth - if (leftEdgeOffset < viewportDimensions.left) { // left overflow - delta.left = viewportDimensions.left - leftEdgeOffset - } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow - delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset - } - } - - return delta - } - - Tooltip.prototype.getTitle = function () { - var title - var $e = this.$element - var o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - Tooltip.prototype.getUID = function (prefix) { - do prefix += ~~(Math.random() * 1000000) - while (document.getElementById(prefix)) - return prefix - } - - Tooltip.prototype.tip = function () { - if (!this.$tip) { - this.$tip = $(this.options.template) - if (this.$tip.length != 1) { - throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') - } - } - return this.$tip - } - - Tooltip.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) - } - - Tooltip.prototype.enable = function () { - this.enabled = true - } - - Tooltip.prototype.disable = function () { - this.enabled = false - } - - Tooltip.prototype.toggleEnabled = function () { - this.enabled = !this.enabled - } - - Tooltip.prototype.toggle = function (e) { - var self = this - if (e) { - self = $(e.currentTarget).data('bs.' + this.type) - if (!self) { - self = new this.constructor(e.currentTarget, this.getDelegateOptions()) - $(e.currentTarget).data('bs.' + this.type, self) - } - } - - if (e) { - self.inState.click = !self.inState.click - if (self.isInStateTrue()) self.enter(self) - else self.leave(self) - } else { - self.tip().hasClass('in') ? self.leave(self) : self.enter(self) - } - } - - Tooltip.prototype.destroy = function () { - var that = this - clearTimeout(this.timeout) - this.hide(function () { - that.$element.off('.' + that.type).removeData('bs.' + that.type) - if (that.$tip) { - that.$tip.detach() - } - that.$tip = null - that.$arrow = null - that.$viewport = null - that.$element = null - }) - } - - - // TOOLTIP PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tooltip') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tooltip - - $.fn.tooltip = Plugin - $.fn.tooltip.Constructor = Tooltip - - - // TOOLTIP NO CONFLICT - // =================== - - $.fn.tooltip.noConflict = function () { - $.fn.tooltip = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: popover.js v3.3.7 - * http://getbootstrap.com/javascript/#popovers - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // POPOVER PUBLIC CLASS DEFINITION - // =============================== - - var Popover = function (element, options) { - this.init('popover', element, options) - } - - if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') - - Popover.VERSION = '3.3.7' - - Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { - placement: 'right', - trigger: 'click', - content: '', - template: '' - }) - - - // NOTE: POPOVER EXTENDS tooltip.js - // ================================ - - Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) - - Popover.prototype.constructor = Popover - - Popover.prototype.getDefaults = function () { - return Popover.DEFAULTS - } - - Popover.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - var content = this.getContent() - - $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) - $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events - this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' - ](content) - - $tip.removeClass('fade top bottom left right in') - - // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do - // this manually by checking the contents. - if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() - } - - Popover.prototype.hasContent = function () { - return this.getTitle() || this.getContent() - } - - Popover.prototype.getContent = function () { - var $e = this.$element - var o = this.options - - return $e.attr('data-content') - || (typeof o.content == 'function' ? - o.content.call($e[0]) : - o.content) - } - - Popover.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.arrow')) - } - - - // POPOVER PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.popover') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.popover', (data = new Popover(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.popover - - $.fn.popover = Plugin - $.fn.popover.Constructor = Popover - - - // POPOVER NO CONFLICT - // =================== - - $.fn.popover.noConflict = function () { - $.fn.popover = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: scrollspy.js v3.3.7 - * http://getbootstrap.com/javascript/#scrollspy - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // SCROLLSPY CLASS DEFINITION - // ========================== - - function ScrollSpy(element, options) { - this.$body = $(document.body) - this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) - this.options = $.extend({}, ScrollSpy.DEFAULTS, options) - this.selector = (this.options.target || '') + ' .nav li > a' - this.offsets = [] - this.targets = [] - this.activeTarget = null - this.scrollHeight = 0 - - this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) - this.refresh() - this.process() - } - - ScrollSpy.VERSION = '3.3.7' - - ScrollSpy.DEFAULTS = { - offset: 10 - } - - ScrollSpy.prototype.getScrollHeight = function () { - return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) - } - - ScrollSpy.prototype.refresh = function () { - var that = this - var offsetMethod = 'offset' - var offsetBase = 0 - - this.offsets = [] - this.targets = [] - this.scrollHeight = this.getScrollHeight() - - if (!$.isWindow(this.$scrollElement[0])) { - offsetMethod = 'position' - offsetBase = this.$scrollElement.scrollTop() - } - - this.$body - .find(this.selector) - .map(function () { - var $el = $(this) - var href = $el.data('target') || $el.attr('href') - var $href = /^#./.test(href) && $(href) - - return ($href - && $href.length - && $href.is(':visible') - && [[$href[offsetMethod]().top + offsetBase, href]]) || null - }) - .sort(function (a, b) { return a[0] - b[0] }) - .each(function () { - that.offsets.push(this[0]) - that.targets.push(this[1]) - }) - } - - ScrollSpy.prototype.process = function () { - var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.getScrollHeight() - var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() - var offsets = this.offsets - var targets = this.targets - var activeTarget = this.activeTarget - var i - - if (this.scrollHeight != scrollHeight) { - this.refresh() - } - - if (scrollTop >= maxScroll) { - return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) - } - - if (activeTarget && scrollTop < offsets[0]) { - this.activeTarget = null - return this.clear() - } - - for (i = offsets.length; i--;) { - activeTarget != targets[i] - && scrollTop >= offsets[i] - && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) - && this.activate(targets[i]) - } - } - - ScrollSpy.prototype.activate = function (target) { - this.activeTarget = target - - this.clear() - - var selector = this.selector + - '[data-target="' + target + '"],' + - this.selector + '[href="' + target + '"]' - - var active = $(selector) - .parents('li') - .addClass('active') - - if (active.parent('.dropdown-menu').length) { - active = active - .closest('li.dropdown') - .addClass('active') - } - - active.trigger('activate.bs.scrollspy') - } - - ScrollSpy.prototype.clear = function () { - $(this.selector) - .parentsUntil(this.options.target, '.active') - .removeClass('active') - } - - - // SCROLLSPY PLUGIN DEFINITION - // =========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.scrollspy') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.scrollspy - - $.fn.scrollspy = Plugin - $.fn.scrollspy.Constructor = ScrollSpy - - - // SCROLLSPY NO CONFLICT - // ===================== - - $.fn.scrollspy.noConflict = function () { - $.fn.scrollspy = old - return this - } - - - // SCROLLSPY DATA-API - // ================== - - $(window).on('load.bs.scrollspy.data-api', function () { - $('[data-spy="scroll"]').each(function () { - var $spy = $(this) - Plugin.call($spy, $spy.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tab.js v3.3.7 - * http://getbootstrap.com/javascript/#tabs - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TAB CLASS DEFINITION - // ==================== - - var Tab = function (element) { - // jscs:disable requireDollarBeforejQueryAssignment - this.element = $(element) - // jscs:enable requireDollarBeforejQueryAssignment - } - - Tab.VERSION = '3.3.7' - - Tab.TRANSITION_DURATION = 150 - - Tab.prototype.show = function () { - var $this = this.element - var $ul = $this.closest('ul:not(.dropdown-menu)') - var selector = $this.data('target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - if ($this.parent('li').hasClass('active')) return - - var $previous = $ul.find('.active:last a') - var hideEvent = $.Event('hide.bs.tab', { - relatedTarget: $this[0] - }) - var showEvent = $.Event('show.bs.tab', { - relatedTarget: $previous[0] - }) - - $previous.trigger(hideEvent) - $this.trigger(showEvent) - - if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return - - var $target = $(selector) - - this.activate($this.closest('li'), $ul) - this.activate($target, $target.parent(), function () { - $previous.trigger({ - type: 'hidden.bs.tab', - relatedTarget: $this[0] - }) - $this.trigger({ - type: 'shown.bs.tab', - relatedTarget: $previous[0] - }) - }) - } - - Tab.prototype.activate = function (element, container, callback) { - var $active = container.find('> .active') - var transition = callback - && $.support.transition - && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) - - function next() { - $active - .removeClass('active') - .find('> .dropdown-menu > .active') - .removeClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', false) - - element - .addClass('active') - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - - if (transition) { - element[0].offsetWidth // reflow for transition - element.addClass('in') - } else { - element.removeClass('fade') - } - - if (element.parent('.dropdown-menu').length) { - element - .closest('li.dropdown') - .addClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - } - - callback && callback() - } - - $active.length && transition ? - $active - .one('bsTransitionEnd', next) - .emulateTransitionEnd(Tab.TRANSITION_DURATION) : - next() - - $active.removeClass('in') - } - - - // TAB PLUGIN DEFINITION - // ===================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tab') - - if (!data) $this.data('bs.tab', (data = new Tab(this))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tab - - $.fn.tab = Plugin - $.fn.tab.Constructor = Tab - - - // TAB NO CONFLICT - // =============== - - $.fn.tab.noConflict = function () { - $.fn.tab = old - return this - } - - - // TAB DATA-API - // ============ - - var clickHandler = function (e) { - e.preventDefault() - Plugin.call($(this), 'show') - } - - $(document) - .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) - .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: affix.js v3.3.7 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // AFFIX CLASS DEFINITION - // ====================== - - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) - - this.$target = $(this.options.target) - .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) - .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) - - this.$element = $(element) - this.affixed = null - this.unpin = null - this.pinnedOffset = null - - this.checkPosition() - } - - Affix.VERSION = '3.3.7' - - Affix.RESET = 'affix affix-top affix-bottom' - - Affix.DEFAULTS = { - offset: 0, - target: window - } - - Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - var targetHeight = this.$target.height() - - if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false - - if (this.affixed == 'bottom') { - if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' - return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' - } - - var initializing = this.affixed == null - var colliderTop = initializing ? scrollTop : position.top - var colliderHeight = initializing ? targetHeight : height - - if (offsetTop != null && scrollTop <= offsetTop) return 'top' - if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' - - return false - } - - Affix.prototype.getPinnedOffset = function () { - if (this.pinnedOffset) return this.pinnedOffset - this.$element.removeClass(Affix.RESET).addClass('affix') - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - return (this.pinnedOffset = position.top - scrollTop) - } - - Affix.prototype.checkPositionWithEventLoop = function () { - setTimeout($.proxy(this.checkPosition, this), 1) - } - - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return - - var height = this.$element.height() - var offset = this.options.offset - var offsetTop = offset.top - var offsetBottom = offset.bottom - var scrollHeight = Math.max($(document).height(), $(document.body).height()) - - if (typeof offset != 'object') offsetBottom = offsetTop = offset - if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) - - var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) - - if (this.affixed != affix) { - if (this.unpin != null) this.$element.css('top', '') - - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null - - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') - } - - if (affix == 'bottom') { - this.$element.offset({ - top: scrollHeight - height - offsetBottom - }) - } - } - - - // AFFIX PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.affix - - $.fn.affix = Plugin - $.fn.affix.Constructor = Affix - - - // AFFIX NO CONFLICT - // ================= - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - // AFFIX DATA-API - // ============== - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() - - data.offset = data.offset || {} - - if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom - if (data.offsetTop != null) data.offset.top = data.offsetTop - - Plugin.call($spy, data) - }) - }) - -}(jQuery); diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/js/npm.js b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/js/npm.js deleted file mode 100644 index bf6aa80602d93..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/bootstrap/dist/js/npm.js +++ /dev/null @@ -1,13 +0,0 @@ -// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. -require('../../js/transition.js') -require('../../js/alert.js') -require('../../js/button.js') -require('../../js/carousel.js') -require('../../js/collapse.js') -require('../../js/dropdown.js') -require('../../js/modal.js') -require('../../js/tooltip.js') -require('../../js/popover.js') -require('../../js/scrollspy.js') -require('../../js/tab.js') -require('../../js/affix.js') \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation-unobtrusive/.bower.json b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation-unobtrusive/.bower.json deleted file mode 100644 index ccf48121dc368..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation-unobtrusive/.bower.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "jquery-validation-unobtrusive", - "version": "3.2.6", - "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive", - "description": "Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.", - "main": [ - "jquery.validate.unobtrusive.js" - ], - "ignore": [ - "**/.*", - "*.json", - "*.md", - "*.txt", - "gulpfile.js" - ], - "keywords": [ - "jquery", - "asp.net", - "mvc", - "validation", - "unobtrusive" - ], - "authors": [ - "Microsoft" - ], - "license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm", - "repository": { - "type": "git", - "url": "git://github.com/aspnet/jquery-validation-unobtrusive.git" - }, - "dependencies": { - "jquery-validation": ">=1.8", - "jquery": ">=1.8" - }, - "_release": "3.2.6", - "_resolution": { - "type": "version", - "tag": "v3.2.6", - "commit": "13386cd1b5947d8a5d23a12b531ce3960be1eba7" - }, - "_source": "git://github.com/aspnet/jquery-validation-unobtrusive.git", - "_target": "3.2.6", - "_originalSource": "jquery-validation-unobtrusive" -} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js deleted file mode 100644 index 1b0de12496131..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js +++ /dev/null @@ -1,416 +0,0 @@ -/*! -** Unobtrusive validation support library for jQuery and jQuery Validate -** Copyright (C) Microsoft Corporation. All rights reserved. -*/ - -/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ -/*global document: false, jQuery: false */ - -(function ($) { - var $jQval = $.validator, - adapters, - data_validation = "unobtrusiveValidation"; - - function setValidationValues(options, ruleName, value) { - options.rules[ruleName] = value; - if (options.message) { - options.messages[ruleName] = options.message; - } - } - - function splitAndTrim(value) { - return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g); - } - - function escapeAttributeValue(value) { - // As mentioned on http://api.jquery.com/category/selectors/ - return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1"); - } - - function getModelPrefix(fieldName) { - return fieldName.substr(0, fieldName.lastIndexOf(".") + 1); - } - - function appendModelPrefix(value, prefix) { - if (value.indexOf("*.") === 0) { - value = value.replace("*.", prefix); - } - return value; - } - - function onError(error, inputElement) { // 'this' is the form element - var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"), - replaceAttrValue = container.attr("data-valmsg-replace"), - replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null; - - container.removeClass("field-validation-valid").addClass("field-validation-error"); - error.data("unobtrusiveContainer", container); - - if (replace) { - container.empty(); - error.removeClass("input-validation-error").appendTo(container); - } - else { - error.hide(); - } - } - - function onErrors(event, validator) { // 'this' is the form element - var container = $(this).find("[data-valmsg-summary=true]"), - list = container.find("ul"); - - if (list && list.length && validator.errorList.length) { - list.empty(); - container.addClass("validation-summary-errors").removeClass("validation-summary-valid"); - - $.each(validator.errorList, function () { - $("
        1. ").html(this.message).appendTo(list); - }); - } - } - - function onSuccess(error) { // 'this' is the form element - var container = error.data("unobtrusiveContainer"); - - if (container) { - var replaceAttrValue = container.attr("data-valmsg-replace"), - replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null; - - container.addClass("field-validation-valid").removeClass("field-validation-error"); - error.removeData("unobtrusiveContainer"); - - if (replace) { - container.empty(); - } - } - } - - function onReset(event) { // 'this' is the form element - var $form = $(this), - key = '__jquery_unobtrusive_validation_form_reset'; - if ($form.data(key)) { - return; - } - // Set a flag that indicates we're currently resetting the form. - $form.data(key, true); - try { - $form.data("validator").resetForm(); - } finally { - $form.removeData(key); - } - - $form.find(".validation-summary-errors") - .addClass("validation-summary-valid") - .removeClass("validation-summary-errors"); - $form.find(".field-validation-error") - .addClass("field-validation-valid") - .removeClass("field-validation-error") - .removeData("unobtrusiveContainer") - .find(">*") // If we were using valmsg-replace, get the underlying error - .removeData("unobtrusiveContainer"); - } - - function validationInfo(form) { - var $form = $(form), - result = $form.data(data_validation), - onResetProxy = $.proxy(onReset, form), - defaultOptions = $jQval.unobtrusive.options || {}, - execInContext = function (name, args) { - var func = defaultOptions[name]; - func && $.isFunction(func) && func.apply(form, args); - } - - if (!result) { - result = { - options: { // options structure passed to jQuery Validate's validate() method - errorClass: defaultOptions.errorClass || "input-validation-error", - errorElement: defaultOptions.errorElement || "span", - errorPlacement: function () { - onError.apply(form, arguments); - execInContext("errorPlacement", arguments); - }, - invalidHandler: function () { - onErrors.apply(form, arguments); - execInContext("invalidHandler", arguments); - }, - messages: {}, - rules: {}, - success: function () { - onSuccess.apply(form, arguments); - execInContext("success", arguments); - } - }, - attachValidation: function () { - $form - .off("reset." + data_validation, onResetProxy) - .on("reset." + data_validation, onResetProxy) - .validate(this.options); - }, - validate: function () { // a validation function that is called by unobtrusive Ajax - $form.validate(); - return $form.valid(); - } - }; - $form.data(data_validation, result); - } - - return result; - } - - $jQval.unobtrusive = { - adapters: [], - - parseElement: function (element, skipAttach) { - /// - /// Parses a single HTML element for unobtrusive validation attributes. - /// - /// The HTML element to be parsed. - /// [Optional] true to skip attaching the - /// validation to the form. If parsing just this single element, you should specify true. - /// If parsing several elements, you should specify false, and manually attach the validation - /// to the form when you are finished. The default is false. - var $element = $(element), - form = $element.parents("form")[0], - valInfo, rules, messages; - - if (!form) { // Cannot do client-side validation without a form - return; - } - - valInfo = validationInfo(form); - valInfo.options.rules[element.name] = rules = {}; - valInfo.options.messages[element.name] = messages = {}; - - $.each(this.adapters, function () { - var prefix = "data-val-" + this.name, - message = $element.attr(prefix), - paramValues = {}; - - if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy) - prefix += "-"; - - $.each(this.params, function () { - paramValues[this] = $element.attr(prefix + this); - }); - - this.adapt({ - element: element, - form: form, - message: message, - params: paramValues, - rules: rules, - messages: messages - }); - } - }); - - $.extend(rules, { "__dummy__": true }); - - if (!skipAttach) { - valInfo.attachValidation(); - } - }, - - parse: function (selector) { - /// - /// Parses all the HTML elements in the specified selector. It looks for input elements decorated - /// with the [data-val=true] attribute value and enables validation according to the data-val-* - /// attribute values. - /// - /// Any valid jQuery selector. - - // $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one - // element with data-val=true - var $selector = $(selector), - $forms = $selector.parents() - .addBack() - .filter("form") - .add($selector.find("form")) - .has("[data-val=true]"); - - $selector.find("[data-val=true]").each(function () { - $jQval.unobtrusive.parseElement(this, true); - }); - - $forms.each(function () { - var info = validationInfo(this); - if (info) { - info.attachValidation(); - } - }); - } - }; - - adapters = $jQval.unobtrusive.adapters; - - adapters.add = function (adapterName, params, fn) { - /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation. - /// The name of the adapter to be added. This matches the name used - /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name). - /// [Optional] An array of parameter names (strings) that will - /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and - /// mmmm is the parameter name). - /// The function to call, which adapts the values from the HTML - /// attributes into jQuery Validate rules and/or messages. - /// - if (!fn) { // Called with no params, just a function - fn = params; - params = []; - } - this.push({ name: adapterName, params: params, adapt: fn }); - return this; - }; - - adapters.addBool = function (adapterName, ruleName) { - /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where - /// the jQuery Validate validation rule has no parameter values. - /// The name of the adapter to be added. This matches the name used - /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name). - /// [Optional] The name of the jQuery Validate rule. If not provided, the value - /// of adapterName will be used instead. - /// - return this.add(adapterName, function (options) { - setValidationValues(options, ruleName || adapterName, true); - }); - }; - - adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) { - /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where - /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and - /// one for min-and-max). The HTML parameters are expected to be named -min and -max. - /// The name of the adapter to be added. This matches the name used - /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name). - /// The name of the jQuery Validate rule to be used when you only - /// have a minimum value. - /// The name of the jQuery Validate rule to be used when you only - /// have a maximum value. - /// The name of the jQuery Validate rule to be used when you - /// have both a minimum and maximum value. - /// [Optional] The name of the HTML attribute that - /// contains the minimum value. The default is "min". - /// [Optional] The name of the HTML attribute that - /// contains the maximum value. The default is "max". - /// - return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) { - var min = options.params.min, - max = options.params.max; - - if (min && max) { - setValidationValues(options, minMaxRuleName, [min, max]); - } - else if (min) { - setValidationValues(options, minRuleName, min); - } - else if (max) { - setValidationValues(options, maxRuleName, max); - } - }); - }; - - adapters.addSingleVal = function (adapterName, attribute, ruleName) { - /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where - /// the jQuery Validate validation rule has a single value. - /// The name of the adapter to be added. This matches the name used - /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name). - /// [Optional] The name of the HTML attribute that contains the value. - /// The default is "val". - /// [Optional] The name of the jQuery Validate rule. If not provided, the value - /// of adapterName will be used instead. - /// - return this.add(adapterName, [attribute || "val"], function (options) { - setValidationValues(options, ruleName || adapterName, options.params[attribute]); - }); - }; - - $jQval.addMethod("__dummy__", function (value, element, params) { - return true; - }); - - $jQval.addMethod("regex", function (value, element, params) { - var match; - if (this.optional(element)) { - return true; - } - - match = new RegExp(params).exec(value); - return (match && (match.index === 0) && (match[0].length === value.length)); - }); - - $jQval.addMethod("nonalphamin", function (value, element, nonalphamin) { - var match; - if (nonalphamin) { - match = value.match(/\W/g); - match = match && match.length >= nonalphamin; - } - return match; - }); - - if ($jQval.methods.extension) { - adapters.addSingleVal("accept", "mimtype"); - adapters.addSingleVal("extension", "extension"); - } else { - // for backward compatibility, when the 'extension' validation method does not exist, such as with versions - // of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for - // validating the extension, and ignore mime-type validations as they are not supported. - adapters.addSingleVal("extension", "extension", "accept"); - } - - adapters.addSingleVal("regex", "pattern"); - adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"); - adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range"); - adapters.addMinMax("minlength", "minlength").addMinMax("maxlength", "minlength", "maxlength"); - adapters.add("equalto", ["other"], function (options) { - var prefix = getModelPrefix(options.element.name), - other = options.params.other, - fullOtherName = appendModelPrefix(other, prefix), - element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0]; - - setValidationValues(options, "equalTo", element); - }); - adapters.add("required", function (options) { - // jQuery Validate equates "required" with "mandatory" for checkbox elements - if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") { - setValidationValues(options, "required", true); - } - }); - adapters.add("remote", ["url", "type", "additionalfields"], function (options) { - var value = { - url: options.params.url, - type: options.params.type || "GET", - data: {} - }, - prefix = getModelPrefix(options.element.name); - - $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) { - var paramName = appendModelPrefix(fieldName, prefix); - value.data[paramName] = function () { - var field = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']"); - // For checkboxes and radio buttons, only pick up values from checked fields. - if (field.is(":checkbox")) { - return field.filter(":checked").val() || field.filter(":hidden").val() || ''; - } - else if (field.is(":radio")) { - return field.filter(":checked").val() || ''; - } - return field.val(); - }; - }); - - setValidationValues(options, "remote", value); - }); - adapters.add("password", ["min", "nonalphamin", "regex"], function (options) { - if (options.params.min) { - setValidationValues(options, "minlength", options.params.min); - } - if (options.params.nonalphamin) { - setValidationValues(options, "nonalphamin", options.params.nonalphamin); - } - if (options.params.regex) { - setValidationValues(options, "regex", options.params.regex); - } - }); - - $(function () { - $jQval.unobtrusive.parse(document); - }); -}(jQuery)); \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js deleted file mode 100644 index be9a38a4cfce8..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/* -** Unobtrusive validation support library for jQuery and jQuery Validate -** Copyright (C) Microsoft Corporation. All rights reserved. -*/ -!function(a){function e(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function n(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function t(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function r(a){return a.substr(0,a.lastIndexOf(".")+1)}function i(a,e){return 0===a.indexOf("*.")&&(a=a.replace("*.",e)),a}function o(e,n){var r=a(this).find("[data-valmsg-for='"+t(n[0].name)+"']"),i=r.attr("data-valmsg-replace"),o=i?a.parseJSON(i)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error"),e.data("unobtrusiveContainer",r),o?(r.empty(),e.removeClass("input-validation-error").appendTo(r)):e.hide()}function d(e,n){var t=a(this).find("[data-valmsg-summary=true]"),r=t.find("ul");r&&r.length&&n.errorList.length&&(r.empty(),t.addClass("validation-summary-errors").removeClass("validation-summary-valid"),a.each(n.errorList,function(){a("
        2. ").html(this.message).appendTo(r)}))}function s(e){var n=e.data("unobtrusiveContainer");if(n){var t=n.attr("data-valmsg-replace"),r=t?a.parseJSON(t):null;n.addClass("field-validation-valid").removeClass("field-validation-error"),e.removeData("unobtrusiveContainer"),r&&n.empty()}}function l(e){var n=a(this),t="__jquery_unobtrusive_validation_form_reset";if(!n.data(t)){n.data(t,!0);try{n.data("validator").resetForm()}finally{n.removeData(t)}n.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),n.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function m(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=p.unobtrusive.options||{},m=function(n,t){var r=i[n];r&&a.isFunction(r)&&r.apply(e,t)};return t||(t={options:{errorClass:i.errorClass||"input-validation-error",errorElement:i.errorElement||"span",errorPlacement:function(){o.apply(e,arguments),m("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),m("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),m("success",arguments)}},attachValidation:function(){n.off("reset."+v,r).on("reset."+v,r).validate(this.options)},validate:function(){return n.validate(),n.valid()}},n.data(v,t)),t}var u,p=a.validator,v="unobtrusiveValidation";p.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=m(d),t.options.rules[e.name]=r={},t.options.messages[e.name]=i={},a.each(this.adapters,function(){var n="data-val-"+this.name,t=o.attr(n),s={};void 0!==t&&(n+="-",a.each(this.params,function(){s[this]=o.attr(n+this)}),this.adapt({element:e,form:d,message:t,params:s,rules:r,messages:i}))}),a.extend(r,{__dummy__:!0}),n||t.attachValidation())},parse:function(e){var n=a(e),t=n.parents().addBack().filter("form").add(n.find("form")).has("[data-val=true]");n.find("[data-val=true]").each(function(){p.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=m(this);a&&a.attachValidation()})}},u=p.unobtrusive.adapters,u.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},u.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},u.addMinMax=function(a,n,t,r,i,o){return this.add(a,[i||"min",o||"max"],function(a){var i=a.params.min,o=a.params.max;i&&o?e(a,r,[i,o]):i?e(a,n,i):o&&e(a,t,o)})},u.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},p.addMethod("__dummy__",function(a,e,n){return!0}),p.addMethod("regex",function(a,e,n){var t;return this.optional(e)?!0:(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),p.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),p.methods.extension?(u.addSingleVal("accept","mimtype"),u.addSingleVal("extension","extension")):u.addSingleVal("extension","extension","accept"),u.addSingleVal("regex","pattern"),u.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),u.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),u.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),u.add("equalto",["other"],function(n){var o=r(n.element.name),d=n.params.other,s=i(d,o),l=a(n.form).find(":input").filter("[name='"+t(s)+"']")[0];e(n,"equalTo",l)}),u.add("required",function(a){("INPUT"!==a.element.tagName.toUpperCase()||"CHECKBOX"!==a.element.type.toUpperCase())&&e(a,"required",!0)}),u.add("remote",["url","type","additionalfields"],function(o){var d={url:o.params.url,type:o.params.type||"GET",data:{}},s=r(o.element.name);a.each(n(o.params.additionalfields||o.element.name),function(e,n){var r=i(n,s);d.data[r]=function(){var e=a(o.form).find(":input").filter("[name='"+t(r)+"']");return e.is(":checkbox")?e.filter(":checked").val()||e.filter(":hidden").val()||"":e.is(":radio")?e.filter(":checked").val()||"":e.val()}}),e(o,"remote",d)}),u.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&e(a,"minlength",a.params.min),a.params.nonalphamin&&e(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&e(a,"regex",a.params.regex)}),a(function(){p.unobtrusive.parse(document)})}(jQuery); \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/.bower.json b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/.bower.json deleted file mode 100644 index cab34a4a61ecb..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/.bower.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "jquery-validation", - "homepage": "http://jqueryvalidation.org/", - "repository": { - "type": "git", - "url": "git://github.com/jzaefferer/jquery-validation.git" - }, - "authors": [ - "Jörn Zaefferer " - ], - "description": "Form validation made easy", - "main": "dist/jquery.validate.js", - "keywords": [ - "forms", - "validation", - "validate" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "demo", - "lib" - ], - "dependencies": { - "jquery": ">= 1.7.2" - }, - "version": "1.14.0", - "_release": "1.14.0", - "_resolution": { - "type": "version", - "tag": "1.14.0", - "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48" - }, - "_source": "git://github.com/jzaefferer/jquery-validation.git", - "_target": ">=1.8", - "_originalSource": "jquery-validation" -} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/LICENSE.md b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/LICENSE.md deleted file mode 100644 index dc377cc031064..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/LICENSE.md +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright Jörn Zaefferer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/dist/additional-methods.js b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/dist/additional-methods.js deleted file mode 100644 index 96d361b080388..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/dist/additional-methods.js +++ /dev/null @@ -1,998 +0,0 @@ -/*! - * jQuery Validation Plugin v1.14.0 - * - * http://jqueryvalidation.org/ - * - * Copyright (c) 2015 Jörn Zaefferer - * Released under the MIT license - */ -(function( factory ) { - if ( typeof define === "function" && define.amd ) { - define( ["jquery", "./jquery.validate"], factory ); - } else { - factory( jQuery ); - } -}(function( $ ) { - -(function() { - - function stripHtml(value) { - // remove html tags and space chars - return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ") - // remove punctuation - .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, ""); - } - - $.validator.addMethod("maxWords", function(value, element, params) { - return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params; - }, $.validator.format("Please enter {0} words or less.")); - - $.validator.addMethod("minWords", function(value, element, params) { - return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params; - }, $.validator.format("Please enter at least {0} words.")); - - $.validator.addMethod("rangeWords", function(value, element, params) { - var valueStripped = stripHtml(value), - regex = /\b\w+\b/g; - return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1]; - }, $.validator.format("Please enter between {0} and {1} words.")); - -}()); - -// Accept a value from a file input based on a required mimetype -$.validator.addMethod("accept", function(value, element, param) { - // Split mime on commas in case we have multiple types we can accept - var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*", - optionalValue = this.optional(element), - i, file; - - // Element is optional - if (optionalValue) { - return optionalValue; - } - - if ($(element).attr("type") === "file") { - // If we are using a wildcard, make it regex friendly - typeParam = typeParam.replace(/\*/g, ".*"); - - // Check if the element has a FileList before checking each file - if (element.files && element.files.length) { - for (i = 0; i < element.files.length; i++) { - file = element.files[i]; - - // Grab the mimetype from the loaded file, verify it matches - if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) { - return false; - } - } - } - } - - // Either return true because we've validated each file, or because the - // browser does not support element.files and the FileList feature - return true; -}, $.validator.format("Please enter a value with a valid mimetype.")); - -$.validator.addMethod("alphanumeric", function(value, element) { - return this.optional(element) || /^\w+$/i.test(value); -}, "Letters, numbers, and underscores only please"); - -/* - * Dutch bank account numbers (not 'giro' numbers) have 9 digits - * and pass the '11 check'. - * We accept the notation with spaces, as that is common. - * acceptable: 123456789 or 12 34 56 789 - */ -$.validator.addMethod("bankaccountNL", function(value, element) { - if (this.optional(element)) { - return true; - } - if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) { - return false; - } - // now '11 check' - var account = value.replace(/ /g, ""), // remove spaces - sum = 0, - len = account.length, - pos, factor, digit; - for ( pos = 0; pos < len; pos++ ) { - factor = len - pos; - digit = account.substring(pos, pos + 1); - sum = sum + factor * digit; - } - return sum % 11 === 0; -}, "Please specify a valid bank account number"); - -$.validator.addMethod("bankorgiroaccountNL", function(value, element) { - return this.optional(element) || - ($.validator.methods.bankaccountNL.call(this, value, element)) || - ($.validator.methods.giroaccountNL.call(this, value, element)); -}, "Please specify a valid bank or giro account number"); - -/** - * BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity. - * - * BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional) - * - * BIC definition in detail: - * - First 4 characters - bank code (only letters) - * - Next 2 characters - ISO 3166-1 alpha-2 country/region code (only letters) - * - Next 2 characters - location code (letters and digits) - * a. shall not start with '0' or '1' - * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant) - * - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits) - */ -$.validator.addMethod("bic", function(value, element) { - return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value ); -}, "Please specify a valid BIC code"); - -/* - * Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities - * Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal - */ -$.validator.addMethod( "cifES", function( value ) { - "use strict"; - - var num = [], - controlDigit, sum, i, count, tmp, secondDigit; - - value = value.toUpperCase(); - - // Quick format test - if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) { - return false; - } - - for ( i = 0; i < 9; i++ ) { - num[ i ] = parseInt( value.charAt( i ), 10 ); - } - - // Algorithm for checking CIF codes - sum = num[ 2 ] + num[ 4 ] + num[ 6 ]; - for ( count = 1; count < 8; count += 2 ) { - tmp = ( 2 * num[ count ] ).toString(); - secondDigit = tmp.charAt( 1 ); - - sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) ); - } - - /* The first (position 1) is a letter following the following criteria: - * A. Corporations - * B. LLCs - * C. General partnerships - * D. Companies limited partnerships - * E. Communities of goods - * F. Cooperative Societies - * G. Associations - * H. Communities of homeowners in horizontal property regime - * J. Civil Societies - * K. Old format - * L. Old format - * M. Old format - * N. Nonresident entities - * P. Local authorities - * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions - * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008) - * S. Organs of State Administration and regions - * V. Agrarian Transformation - * W. Permanent establishments of non-resident in Spain - */ - if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) { - sum += ""; - controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 ); - value += controlDigit; - return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) ); - } - - return false; - -}, "Please specify a valid CIF number." ); - -/* - * Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number. - * CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation. - */ -$.validator.addMethod("cpfBR", function(value) { - // Removing special characters from value - value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, ""); - - // Checking value to have 11 digits only - if (value.length !== 11) { - return false; - } - - var sum = 0, - firstCN, secondCN, checkResult, i; - - firstCN = parseInt(value.substring(9, 10), 10); - secondCN = parseInt(value.substring(10, 11), 10); - - checkResult = function(sum, cn) { - var result = (sum * 10) % 11; - if ((result === 10) || (result === 11)) {result = 0;} - return (result === cn); - }; - - // Checking for dump data - if (value === "" || - value === "00000000000" || - value === "11111111111" || - value === "22222222222" || - value === "33333333333" || - value === "44444444444" || - value === "55555555555" || - value === "66666666666" || - value === "77777777777" || - value === "88888888888" || - value === "99999999999" - ) { - return false; - } - - // Step 1 - using first Check Number: - for ( i = 1; i <= 9; i++ ) { - sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i); - } - - // If first Check Number (CN) is valid, move to Step 2 - using second Check Number: - if ( checkResult(sum, firstCN) ) { - sum = 0; - for ( i = 1; i <= 10; i++ ) { - sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i); - } - return checkResult(sum, secondCN); - } - return false; - -}, "Please specify a valid CPF number"); - -/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator - * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0 - * Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings) - */ -$.validator.addMethod("creditcardtypes", function(value, element, param) { - if (/[^0-9\-]+/.test(value)) { - return false; - } - - value = value.replace(/\D/g, ""); - - var validTypes = 0x0000; - - if (param.mastercard) { - validTypes |= 0x0001; - } - if (param.visa) { - validTypes |= 0x0002; - } - if (param.amex) { - validTypes |= 0x0004; - } - if (param.dinersclub) { - validTypes |= 0x0008; - } - if (param.enroute) { - validTypes |= 0x0010; - } - if (param.discover) { - validTypes |= 0x0020; - } - if (param.jcb) { - validTypes |= 0x0040; - } - if (param.unknown) { - validTypes |= 0x0080; - } - if (param.all) { - validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080; - } - if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard - return value.length === 16; - } - if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa - return value.length === 16; - } - if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex - return value.length === 15; - } - if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub - return value.length === 14; - } - if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute - return value.length === 15; - } - if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover - return value.length === 16; - } - if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb - return value.length === 16; - } - if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb - return value.length === 15; - } - if (validTypes & 0x0080) { //unknown - return true; - } - return false; -}, "Please enter a valid credit card number."); - -/** - * Validates currencies with any given symbols by @jameslouiz - * Symbols can be optional or required. Symbols required by default - * - * Usage examples: - * currency: ["£", false] - Use false for soft currency validation - * currency: ["$", false] - * currency: ["RM", false] - also works with text based symbols such as "RM" - Malaysia Ringgit etc - * - * - * - * Soft symbol checking - * currencyInput: { - * currency: ["$", false] - * } - * - * Strict symbol checking (default) - * currencyInput: { - * currency: "$" - * //OR - * currency: ["$", true] - * } - * - * Multiple Symbols - * currencyInput: { - * currency: "$,£,¢" - * } - */ -$.validator.addMethod("currency", function(value, element, param) { - var isParamString = typeof param === "string", - symbol = isParamString ? param : param[0], - soft = isParamString ? true : param[1], - regex; - - symbol = symbol.replace(/,/g, ""); - symbol = soft ? symbol + "]" : symbol + "]?"; - regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$"; - regex = new RegExp(regex); - return this.optional(element) || regex.test(value); - -}, "Please specify a valid currency"); - -$.validator.addMethod("dateFA", function(value, element) { - return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value); -}, $.validator.messages.date); - -/** - * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy. - * - * @example $.validator.methods.date("01/01/1900") - * @result true - * - * @example $.validator.methods.date("01/13/1990") - * @result false - * - * @example $.validator.methods.date("01.01.1900") - * @result false - * - * @example - * @desc Declares an optional input element whose value must be a valid date. - * - * @name $.validator.methods.dateITA - * @type Boolean - * @cat Plugins/Validate/Methods - */ -$.validator.addMethod("dateITA", function(value, element) { - var check = false, - re = /^\d{1,2}\/\d{1,2}\/\d{4}$/, - adata, gg, mm, aaaa, xdata; - if ( re.test(value)) { - adata = value.split("/"); - gg = parseInt(adata[0], 10); - mm = parseInt(adata[1], 10); - aaaa = parseInt(adata[2], 10); - xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0)); - if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) { - check = true; - } else { - check = false; - } - } else { - check = false; - } - return this.optional(element) || check; -}, $.validator.messages.date); - -$.validator.addMethod("dateNL", function(value, element) { - return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value); -}, $.validator.messages.date); - -// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept -$.validator.addMethod("extension", function(value, element, param) { - param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif"; - return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i")); -}, $.validator.format("Please enter a value with a valid extension.")); - -/** - * Dutch giro account numbers (not bank numbers) have max 7 digits - */ -$.validator.addMethod("giroaccountNL", function(value, element) { - return this.optional(element) || /^[0-9]{1,7}$/.test(value); -}, "Please specify a valid giro account number"); - -/** - * IBAN is the international bank account number. - * It has a country/region - specific format, that is checked here too - */ -$.validator.addMethod("iban", function(value, element) { - // some quick simple tests to prevent needless work - if (this.optional(element)) { - return true; - } - - // remove spaces and to upper case - var iban = value.replace(/ /g, "").toUpperCase(), - ibancheckdigits = "", - leadingZeroes = true, - cRest = "", - cOperator = "", - countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p; - - // check the country/region code and find the country/region specific format - countrycode = iban.substring(0, 2); - bbancountrypatterns = { - "AL": "\\d{8}[\\dA-Z]{16}", - "AD": "\\d{8}[\\dA-Z]{12}", - "AT": "\\d{16}", - "AZ": "[\\dA-Z]{4}\\d{20}", - "BE": "\\d{12}", - "BH": "[A-Z]{4}[\\dA-Z]{14}", - "BA": "\\d{16}", - "BR": "\\d{23}[A-Z][\\dA-Z]", - "BG": "[A-Z]{4}\\d{6}[\\dA-Z]{8}", - "CR": "\\d{17}", - "HR": "\\d{17}", - "CY": "\\d{8}[\\dA-Z]{16}", - "CZ": "\\d{20}", - "DK": "\\d{14}", - "DO": "[A-Z]{4}\\d{20}", - "EE": "\\d{16}", - "FO": "\\d{14}", - "FI": "\\d{14}", - "FR": "\\d{10}[\\dA-Z]{11}\\d{2}", - "GE": "[\\dA-Z]{2}\\d{16}", - "DE": "\\d{18}", - "GI": "[A-Z]{4}[\\dA-Z]{15}", - "GR": "\\d{7}[\\dA-Z]{16}", - "GL": "\\d{14}", - "GT": "[\\dA-Z]{4}[\\dA-Z]{20}", - "HU": "\\d{24}", - "IS": "\\d{22}", - "IE": "[\\dA-Z]{4}\\d{14}", - "IL": "\\d{19}", - "IT": "[A-Z]\\d{10}[\\dA-Z]{12}", - "KZ": "\\d{3}[\\dA-Z]{13}", - "KW": "[A-Z]{4}[\\dA-Z]{22}", - "LV": "[A-Z]{4}[\\dA-Z]{13}", - "LB": "\\d{4}[\\dA-Z]{20}", - "LI": "\\d{5}[\\dA-Z]{12}", - "LT": "\\d{16}", - "LU": "\\d{3}[\\dA-Z]{13}", - "MK": "\\d{3}[\\dA-Z]{10}\\d{2}", - "MT": "[A-Z]{4}\\d{5}[\\dA-Z]{18}", - "MR": "\\d{23}", - "MU": "[A-Z]{4}\\d{19}[A-Z]{3}", - "MC": "\\d{10}[\\dA-Z]{11}\\d{2}", - "MD": "[\\dA-Z]{2}\\d{18}", - "ME": "\\d{18}", - "NL": "[A-Z]{4}\\d{10}", - "NO": "\\d{11}", - "PK": "[\\dA-Z]{4}\\d{16}", - "PS": "[\\dA-Z]{4}\\d{21}", - "PL": "\\d{24}", - "PT": "\\d{21}", - "RO": "[A-Z]{4}[\\dA-Z]{16}", - "SM": "[A-Z]\\d{10}[\\dA-Z]{12}", - "SA": "\\d{2}[\\dA-Z]{18}", - "RS": "\\d{18}", - "SK": "\\d{20}", - "SI": "\\d{15}", - "ES": "\\d{20}", - "SE": "\\d{20}", - "CH": "\\d{5}[\\dA-Z]{12}", - "TN": "\\d{20}", - "TR": "\\d{5}[\\dA-Z]{17}", - "AE": "\\d{3}\\d{16}", - "GB": "[A-Z]{4}\\d{14}", - "VG": "[\\dA-Z]{4}\\d{16}" - }; - - bbanpattern = bbancountrypatterns[countrycode]; - // As new countries/regions start using IBAN in the - // future, we only check if the countrycode is known. - // This prevents false negatives, while almost all - // false positives introduced by this, will be caught - // by the checksum validation below anyway. - // Strict checking should return FALSE for unknown - // countries and regions. - if (typeof bbanpattern !== "undefined") { - ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", ""); - if (!(ibanregexp.test(iban))) { - return false; // invalid country/region specific format - } - } - - // now check the checksum, first convert to digits - ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4); - for (i = 0; i < ibancheck.length; i++) { - charAt = ibancheck.charAt(i); - if (charAt !== "0") { - leadingZeroes = false; - } - if (!leadingZeroes) { - ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt); - } - } - - // calculate the result of: ibancheckdigits % 97 - for (p = 0; p < ibancheckdigits.length; p++) { - cChar = ibancheckdigits.charAt(p); - cOperator = "" + cRest + "" + cChar; - cRest = cOperator % 97; - } - return cRest === 1; -}, "Please specify a valid IBAN"); - -$.validator.addMethod("integer", function(value, element) { - return this.optional(element) || /^-?\d+$/.test(value); -}, "A positive or negative non-decimal number please"); - -$.validator.addMethod("ipv4", function(value, element) { - return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value); -}, "Please enter a valid IP v4 address."); - -$.validator.addMethod("ipv6", function(value, element) { - return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value); -}, "Please enter a valid IP v6 address."); - -$.validator.addMethod("lettersonly", function(value, element) { - return this.optional(element) || /^[a-z]+$/i.test(value); -}, "Letters only please"); - -$.validator.addMethod("letterswithbasicpunc", function(value, element) { - return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value); -}, "Letters or punctuation only please"); - -$.validator.addMethod("mobileNL", function(value, element) { - return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value); -}, "Please specify a valid mobile number"); - -/* For UK phone functions, do the following server side processing: - * Compare original input with this RegEx pattern: - * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$ - * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0' - * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2. - * A number of very detailed GB telephone number RegEx patterns can also be found at: - * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers - */ -$.validator.addMethod("mobileUK", function(phone_number, element) { - phone_number = phone_number.replace(/\(|\)|\s+|-/g, ""); - return this.optional(element) || phone_number.length > 9 && - phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/); -}, "Please specify a valid mobile number"); - -/* - * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain - */ -$.validator.addMethod( "nieES", function( value ) { - "use strict"; - - value = value.toUpperCase(); - - // Basic format test - if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) { - return false; - } - - // Test NIE - //T - if ( /^[T]{1}/.test( value ) ) { - return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) ); - } - - //XYZ - if ( /^[XYZ]{1}/.test( value ) ) { - return ( - value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( - value.replace( "X", "0" ) - .replace( "Y", "1" ) - .replace( "Z", "2" ) - .substring( 0, 8 ) % 23 - ) - ); - } - - return false; - -}, "Please specify a valid NIE number." ); - -/* - * The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals - */ -$.validator.addMethod( "nifES", function( value ) { - "use strict"; - - value = value.toUpperCase(); - - // Basic format test - if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) { - return false; - } - - // Test NIF - if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) { - return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) ); - } - // Test specials NIF (starts with K, L or M) - if ( /^[KLM]{1}/.test( value ) ) { - return ( value[ 8 ] === String.fromCharCode( 64 ) ); - } - - return false; - -}, "Please specify a valid NIF number." ); - -jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) { - return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param ); -}, "Please enter a different value, values must not be the same." ); - -$.validator.addMethod("nowhitespace", function(value, element) { - return this.optional(element) || /^\S+$/i.test(value); -}, "No white space please"); - -/** -* Return true if the field value matches the given format RegExp -* -* @example $.validator.methods.pattern("AR1004",element,/^AR\d{4}$/) -* @result true -* -* @example $.validator.methods.pattern("BR1004",element,/^AR\d{4}$/) -* @result false -* -* @name $.validator.methods.pattern -* @type Boolean -* @cat Plugins/Validate/Methods -*/ -$.validator.addMethod("pattern", function(value, element, param) { - if (this.optional(element)) { - return true; - } - if (typeof param === "string") { - param = new RegExp("^(?:" + param + ")$"); - } - return param.test(value); -}, "Invalid format."); - -/** - * Dutch phone numbers have 10 digits (or 11 and start with +31). - */ -$.validator.addMethod("phoneNL", function(value, element) { - return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value); -}, "Please specify a valid phone number."); - -/* For UK phone functions, do the following server side processing: - * Compare original input with this RegEx pattern: - * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$ - * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0' - * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2. - * A number of very detailed GB telephone number RegEx patterns can also be found at: - * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers - */ -$.validator.addMethod("phoneUK", function(phone_number, element) { - phone_number = phone_number.replace(/\(|\)|\s+|-/g, ""); - return this.optional(element) || phone_number.length > 9 && - phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/); -}, "Please specify a valid phone number"); - -/** - * matches US phone number format - * - * where the area code may not start with 1 and the prefix may not start with 1 - * allows '-' or ' ' as a separator and allows parens around area code - * some people may want to put a '1' in front of their number - * - * 1(212)-999-2345 or - * 212 999 2344 or - * 212-999-0983 - * - * but not - * 111-123-5434 - * and not - * 212 123 4567 - */ -$.validator.addMethod("phoneUS", function(phone_number, element) { - phone_number = phone_number.replace(/\s+/g, ""); - return this.optional(element) || phone_number.length > 9 && - phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/); -}, "Please specify a valid phone number"); - -/* For UK phone functions, do the following server side processing: - * Compare original input with this RegEx pattern: - * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$ - * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0' - * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2. - * A number of very detailed GB telephone number RegEx patterns can also be found at: - * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers - */ -//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers -$.validator.addMethod("phonesUK", function(phone_number, element) { - phone_number = phone_number.replace(/\(|\)|\s+|-/g, ""); - return this.optional(element) || phone_number.length > 9 && - phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/); -}, "Please specify a valid uk phone number"); - -/** - * Matches a valid Canadian Postal Code - * - * @example jQuery.validator.methods.postalCodeCA( "H0H 0H0", element ) - * @result true - * - * @example jQuery.validator.methods.postalCodeCA( "H0H0H0", element ) - * @result false - * - * @name jQuery.validator.methods.postalCodeCA - * @type Boolean - * @cat Plugins/Validate/Methods - */ -$.validator.addMethod( "postalCodeCA", function( value, element ) { - return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value ); -}, "Please specify a valid postal code" ); - -/* -* Valida CEPs do brasileiros: -* -* Formatos aceitos: -* 99999-999 -* 99.999-999 -* 99999999 -*/ -$.validator.addMethod("postalcodeBR", function(cep_value, element) { - return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value ); -}, "Informe um CEP válido."); - -/* Matches Italian postcode (CAP) */ -$.validator.addMethod("postalcodeIT", function(value, element) { - return this.optional(element) || /^\d{5}$/.test(value); -}, "Please specify a valid postal code"); - -$.validator.addMethod("postalcodeNL", function(value, element) { - return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value); -}, "Please specify a valid postal code"); - -// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK) -$.validator.addMethod("postcodeUK", function(value, element) { - return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value); -}, "Please specify a valid UK postcode"); - -/* - * Lets you say "at least X inputs that match selector Y must be filled." - * - * The end result is that neither of these inputs: - * - * - * - * - * ...will validate unless at least one of them is filled. - * - * partnumber: {require_from_group: [1,".productinfo"]}, - * description: {require_from_group: [1,".productinfo"]} - * - * options[0]: number of fields that must be filled in the group - * options[1]: CSS selector that defines the group of conditionally required fields - */ -$.validator.addMethod("require_from_group", function(value, element, options) { - var $fields = $(options[1], element.form), - $fieldsFirst = $fields.eq(0), - validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this), - isValid = $fields.filter(function() { - return validator.elementValue(this); - }).length >= options[0]; - - // Store the cloned validator for future validation - $fieldsFirst.data("valid_req_grp", validator); - - // If element isn't being validated, run each require_from_group field's validation rules - if (!$(element).data("being_validated")) { - $fields.data("being_validated", true); - $fields.each(function() { - validator.element(this); - }); - $fields.data("being_validated", false); - } - return isValid; -}, $.validator.format("Please fill at least {0} of these fields.")); - -/* - * Lets you say "either at least X inputs that match selector Y must be filled, - * OR they must all be skipped (left blank)." - * - * The end result, is that none of these inputs: - * - * - * - * - * - * ...will validate unless either at least two of them are filled, - * OR none of them are. - * - * partnumber: {skip_or_fill_minimum: [2,".productinfo"]}, - * description: {skip_or_fill_minimum: [2,".productinfo"]}, - * color: {skip_or_fill_minimum: [2,".productinfo"]} - * - * options[0]: number of fields that must be filled in the group - * options[1]: CSS selector that defines the group of conditionally required fields - * - */ -$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) { - var $fields = $(options[1], element.form), - $fieldsFirst = $fields.eq(0), - validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this), - numberFilled = $fields.filter(function() { - return validator.elementValue(this); - }).length, - isValid = numberFilled === 0 || numberFilled >= options[0]; - - // Store the cloned validator for future validation - $fieldsFirst.data("valid_skip", validator); - - // If element isn't being validated, run each skip_or_fill_minimum field's validation rules - if (!$(element).data("being_validated")) { - $fields.data("being_validated", true); - $fields.each(function() { - validator.element(this); - }); - $fields.data("being_validated", false); - } - return isValid; -}, $.validator.format("Please either skip these fields or fill at least {0} of them.")); - -/* Validates US States and/or Territories by @jdforsythe - * Can be case insensitive or require capitalization - default is case insensitive - * Can include US Territories or not - default does not - * Can include US Military postal abbreviations (AA, AE, AP) - default does not - * - * Note: "States" always includes DC (District of Colombia) - * - * Usage examples: - * - * This is the default - case insensitive, no territories, no military zones - * stateInput: { - * caseSensitive: false, - * includeTerritories: false, - * includeMilitary: false - * } - * - * Only allow capital letters, no territories, no military zones - * stateInput: { - * caseSensitive: false - * } - * - * Case insensitive, include territories but not military zones - * stateInput: { - * includeTerritories: true - * } - * - * Only allow capital letters, include territories and military zones - * stateInput: { - * caseSensitive: true, - * includeTerritories: true, - * includeMilitary: true - * } - * - * - * - */ - -$.validator.addMethod("stateUS", function(value, element, options) { - var isDefault = typeof options === "undefined", - caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive, - includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories, - includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary, - regex; - - if (!includeTerritories && !includeMilitary) { - regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$"; - } else if (includeTerritories && includeMilitary) { - regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$"; - } else if (includeTerritories) { - regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$"; - } else { - regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$"; - } - - regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i"); - return this.optional(element) || regex.test(value); -}, -"Please specify a valid state"); - -// TODO check if value starts with <, otherwise don't try stripping anything -$.validator.addMethod("strippedminlength", function(value, element, param) { - return $(value).text().length >= param; -}, $.validator.format("Please enter at least {0} characters")); - -$.validator.addMethod("time", function(value, element) { - return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value); -}, "Please enter a valid time, between 00:00 and 23:59"); - -$.validator.addMethod("time12h", function(value, element) { - return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value); -}, "Please enter a valid time in 12-hour am/pm format"); - -// same as url, but TLD is optional -$.validator.addMethod("url2", function(value, element) { - return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); -}, $.validator.messages.url); - -/** - * Return true, if the value is a valid vehicle identification number (VIN). - * - * Works with all kind of text inputs. - * - * @example - * @desc Declares a required input element whose value must be a valid vehicle identification number. - * - * @name $.validator.methods.vinUS - * @type Boolean - * @cat Plugins/Validate/Methods - */ -$.validator.addMethod("vinUS", function(v) { - if (v.length !== 17) { - return false; - } - - var LL = [ "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ], - VL = [ 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 7, 9, 2, 3, 4, 5, 6, 7, 8, 9 ], - FL = [ 8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2 ], - rs = 0, - i, n, d, f, cd, cdv; - - for (i = 0; i < 17; i++) { - f = FL[i]; - d = v.slice(i, i + 1); - if (i === 8) { - cdv = d; - } - if (!isNaN(d)) { - d *= f; - } else { - for (n = 0; n < LL.length; n++) { - if (d.toUpperCase() === LL[n]) { - d = VL[n]; - d *= f; - if (isNaN(cdv) && n === 8) { - cdv = LL[n]; - } - break; - } - } - } - rs += d; - } - cd = rs % 11; - if (cd === 10) { - cd = "X"; - } - if (cd === cdv) { - return true; - } - return false; -}, "The specified vehicle identification number (VIN) is invalid."); - -$.validator.addMethod("zipcodeUS", function(value, element) { - return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value); -}, "The specified US ZIP Code is invalid"); - -$.validator.addMethod("ziprange", function(value, element) { - return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value); -}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx"); - -})); \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/dist/jquery.validate.js deleted file mode 100644 index 4e979bcf67fd7..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery-validation/dist/jquery.validate.js +++ /dev/null @@ -1,1398 +0,0 @@ -/*! - * jQuery Validation Plugin v1.14.0 - * - * http://jqueryvalidation.org/ - * - * Copyright (c) 2015 Jörn Zaefferer - * Released under the MIT license - */ -(function( factory ) { - if ( typeof define === "function" && define.amd ) { - define( ["jquery"], factory ); - } else { - factory( jQuery ); - } -}(function( $ ) { - -$.extend($.fn, { - // http://jqueryvalidation.org/validate/ - validate: function( options ) { - - // if nothing is selected, return nothing; can't chain anyway - if ( !this.length ) { - if ( options && options.debug && window.console ) { - console.warn( "Nothing selected, can't validate, returning nothing." ); - } - return; - } - - // check if a validator for this form was already created - var validator = $.data( this[ 0 ], "validator" ); - if ( validator ) { - return validator; - } - - // Add novalidate tag if HTML5. - this.attr( "novalidate", "novalidate" ); - - validator = new $.validator( options, this[ 0 ] ); - $.data( this[ 0 ], "validator", validator ); - - if ( validator.settings.onsubmit ) { - - this.on( "click.validate", ":submit", function( event ) { - if ( validator.settings.submitHandler ) { - validator.submitButton = event.target; - } - - // allow suppressing validation by adding a cancel class to the submit button - if ( $( this ).hasClass( "cancel" ) ) { - validator.cancelSubmit = true; - } - - // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button - if ( $( this ).attr( "formnovalidate" ) !== undefined ) { - validator.cancelSubmit = true; - } - }); - - // validate the form on submit - this.on( "submit.validate", function( event ) { - if ( validator.settings.debug ) { - // prevent form submit to be able to see console output - event.preventDefault(); - } - function handle() { - var hidden, result; - if ( validator.settings.submitHandler ) { - if ( validator.submitButton ) { - // insert a hidden input as a replacement for the missing submit button - hidden = $( "" ) - .attr( "name", validator.submitButton.name ) - .val( $( validator.submitButton ).val() ) - .appendTo( validator.currentForm ); - } - result = validator.settings.submitHandler.call( validator, validator.currentForm, event ); - if ( validator.submitButton ) { - // and clean up afterwards; thanks to no-block-scope, hidden can be referenced - hidden.remove(); - } - if ( result !== undefined ) { - return result; - } - return false; - } - return true; - } - - // prevent submit for invalid forms or custom submit handlers - if ( validator.cancelSubmit ) { - validator.cancelSubmit = false; - return handle(); - } - if ( validator.form() ) { - if ( validator.pendingRequest ) { - validator.formSubmitted = true; - return false; - } - return handle(); - } else { - validator.focusInvalid(); - return false; - } - }); - } - - return validator; - }, - // http://jqueryvalidation.org/valid/ - valid: function() { - var valid, validator, errorList; - - if ( $( this[ 0 ] ).is( "form" ) ) { - valid = this.validate().form(); - } else { - errorList = []; - valid = true; - validator = $( this[ 0 ].form ).validate(); - this.each( function() { - valid = validator.element( this ) && valid; - errorList = errorList.concat( validator.errorList ); - }); - validator.errorList = errorList; - } - return valid; - }, - - // http://jqueryvalidation.org/rules/ - rules: function( command, argument ) { - var element = this[ 0 ], - settings, staticRules, existingRules, data, param, filtered; - - if ( command ) { - settings = $.data( element.form, "validator" ).settings; - staticRules = settings.rules; - existingRules = $.validator.staticRules( element ); - switch ( command ) { - case "add": - $.extend( existingRules, $.validator.normalizeRule( argument ) ); - // remove messages from rules, but allow them to be set separately - delete existingRules.messages; - staticRules[ element.name ] = existingRules; - if ( argument.messages ) { - settings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages ); - } - break; - case "remove": - if ( !argument ) { - delete staticRules[ element.name ]; - return existingRules; - } - filtered = {}; - $.each( argument.split( /\s/ ), function( index, method ) { - filtered[ method ] = existingRules[ method ]; - delete existingRules[ method ]; - if ( method === "required" ) { - $( element ).removeAttr( "aria-required" ); - } - }); - return filtered; - } - } - - data = $.validator.normalizeRules( - $.extend( - {}, - $.validator.classRules( element ), - $.validator.attributeRules( element ), - $.validator.dataRules( element ), - $.validator.staticRules( element ) - ), element ); - - // make sure required is at front - if ( data.required ) { - param = data.required; - delete data.required; - data = $.extend( { required: param }, data ); - $( element ).attr( "aria-required", "true" ); - } - - // make sure remote is at back - if ( data.remote ) { - param = data.remote; - delete data.remote; - data = $.extend( data, { remote: param }); - } - - return data; - } -}); - -// Custom selectors -$.extend( $.expr[ ":" ], { - // http://jqueryvalidation.org/blank-selector/ - blank: function( a ) { - return !$.trim( "" + $( a ).val() ); - }, - // http://jqueryvalidation.org/filled-selector/ - filled: function( a ) { - return !!$.trim( "" + $( a ).val() ); - }, - // http://jqueryvalidation.org/unchecked-selector/ - unchecked: function( a ) { - return !$( a ).prop( "checked" ); - } -}); - -// constructor for validator -$.validator = function( options, form ) { - this.settings = $.extend( true, {}, $.validator.defaults, options ); - this.currentForm = form; - this.init(); -}; - -// http://jqueryvalidation.org/jQuery.validator.format/ -$.validator.format = function( source, params ) { - if ( arguments.length === 1 ) { - return function() { - var args = $.makeArray( arguments ); - args.unshift( source ); - return $.validator.format.apply( this, args ); - }; - } - if ( arguments.length > 2 && params.constructor !== Array ) { - params = $.makeArray( arguments ).slice( 1 ); - } - if ( params.constructor !== Array ) { - params = [ params ]; - } - $.each( params, function( i, n ) { - source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() { - return n; - }); - }); - return source; -}; - -$.extend( $.validator, { - - defaults: { - messages: {}, - groups: {}, - rules: {}, - errorClass: "error", - validClass: "valid", - errorElement: "label", - focusCleanup: false, - focusInvalid: true, - errorContainer: $( [] ), - errorLabelContainer: $( [] ), - onsubmit: true, - ignore: ":hidden", - ignoreTitle: false, - onfocusin: function( element ) { - this.lastActive = element; - - // Hide error label and remove error class on focus if enabled - if ( this.settings.focusCleanup ) { - if ( this.settings.unhighlight ) { - this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); - } - this.hideThese( this.errorsFor( element ) ); - } - }, - onfocusout: function( element ) { - if ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) { - this.element( element ); - } - }, - onkeyup: function( element, event ) { - // Avoid revalidate the field when pressing one of the following keys - // Shift => 16 - // Ctrl => 17 - // Alt => 18 - // Caps lock => 20 - // End => 35 - // Home => 36 - // Left arrow => 37 - // Up arrow => 38 - // Right arrow => 39 - // Down arrow => 40 - // Insert => 45 - // Num lock => 144 - // AltGr key => 225 - var excludedKeys = [ - 16, 17, 18, 20, 35, 36, 37, - 38, 39, 40, 45, 144, 225 - ]; - - if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) { - return; - } else if ( element.name in this.submitted || element === this.lastElement ) { - this.element( element ); - } - }, - onclick: function( element ) { - // click on selects, radiobuttons and checkboxes - if ( element.name in this.submitted ) { - this.element( element ); - - // or option elements, check parent select in that case - } else if ( element.parentNode.name in this.submitted ) { - this.element( element.parentNode ); - } - }, - highlight: function( element, errorClass, validClass ) { - if ( element.type === "radio" ) { - this.findByName( element.name ).addClass( errorClass ).removeClass( validClass ); - } else { - $( element ).addClass( errorClass ).removeClass( validClass ); - } - }, - unhighlight: function( element, errorClass, validClass ) { - if ( element.type === "radio" ) { - this.findByName( element.name ).removeClass( errorClass ).addClass( validClass ); - } else { - $( element ).removeClass( errorClass ).addClass( validClass ); - } - } - }, - - // http://jqueryvalidation.org/jQuery.validator.setDefaults/ - setDefaults: function( settings ) { - $.extend( $.validator.defaults, settings ); - }, - - messages: { - required: "This field is required.", - remote: "Please fix this field.", - email: "Please enter a valid email address.", - url: "Please enter a valid URL.", - date: "Please enter a valid date.", - dateISO: "Please enter a valid date ( ISO ).", - number: "Please enter a valid number.", - digits: "Please enter only digits.", - creditcard: "Please enter a valid credit card number.", - equalTo: "Please enter the same value again.", - maxlength: $.validator.format( "Please enter no more than {0} characters." ), - minlength: $.validator.format( "Please enter at least {0} characters." ), - rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ), - range: $.validator.format( "Please enter a value between {0} and {1}." ), - max: $.validator.format( "Please enter a value less than or equal to {0}." ), - min: $.validator.format( "Please enter a value greater than or equal to {0}." ) - }, - - autoCreateRanges: false, - - prototype: { - - init: function() { - this.labelContainer = $( this.settings.errorLabelContainer ); - this.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm ); - this.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer ); - this.submitted = {}; - this.valueCache = {}; - this.pendingRequest = 0; - this.pending = {}; - this.invalid = {}; - this.reset(); - - var groups = ( this.groups = {} ), - rules; - $.each( this.settings.groups, function( key, value ) { - if ( typeof value === "string" ) { - value = value.split( /\s/ ); - } - $.each( value, function( index, name ) { - groups[ name ] = key; - }); - }); - rules = this.settings.rules; - $.each( rules, function( key, value ) { - rules[ key ] = $.validator.normalizeRule( value ); - }); - - function delegate( event ) { - var validator = $.data( this.form, "validator" ), - eventType = "on" + event.type.replace( /^validate/, "" ), - settings = validator.settings; - if ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) { - settings[ eventType ].call( validator, this, event ); - } - } - - $( this.currentForm ) - .on( "focusin.validate focusout.validate keyup.validate", - ":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " + - "[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " + - "[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " + - "[type='radio'], [type='checkbox']", delegate) - // Support: Chrome, oldIE - // "select" is provided as event.target when clicking a option - .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate); - - if ( this.settings.invalidHandler ) { - $( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler ); - } - - // Add aria-required to any Static/Data/Class required fields before first validation - // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html - $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" ); - }, - - // http://jqueryvalidation.org/Validator.form/ - form: function() { - this.checkForm(); - $.extend( this.submitted, this.errorMap ); - this.invalid = $.extend({}, this.errorMap ); - if ( !this.valid() ) { - $( this.currentForm ).triggerHandler( "invalid-form", [ this ]); - } - this.showErrors(); - return this.valid(); - }, - - checkForm: function() { - this.prepareForm(); - for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) { - this.check( elements[ i ] ); - } - return this.valid(); - }, - - // http://jqueryvalidation.org/Validator.element/ - element: function( element ) { - var cleanElement = this.clean( element ), - checkElement = this.validationTargetFor( cleanElement ), - result = true; - - this.lastElement = checkElement; - - if ( checkElement === undefined ) { - delete this.invalid[ cleanElement.name ]; - } else { - this.prepareElement( checkElement ); - this.currentElements = $( checkElement ); - - result = this.check( checkElement ) !== false; - if ( result ) { - delete this.invalid[ checkElement.name ]; - } else { - this.invalid[ checkElement.name ] = true; - } - } - // Add aria-invalid status for screen readers - $( element ).attr( "aria-invalid", !result ); - - if ( !this.numberOfInvalids() ) { - // Hide error containers on last error - this.toHide = this.toHide.add( this.containers ); - } - this.showErrors(); - return result; - }, - - // http://jqueryvalidation.org/Validator.showErrors/ - showErrors: function( errors ) { - if ( errors ) { - // add items to error list and map - $.extend( this.errorMap, errors ); - this.errorList = []; - for ( var name in errors ) { - this.errorList.push({ - message: errors[ name ], - element: this.findByName( name )[ 0 ] - }); - } - // remove items from success list - this.successList = $.grep( this.successList, function( element ) { - return !( element.name in errors ); - }); - } - if ( this.settings.showErrors ) { - this.settings.showErrors.call( this, this.errorMap, this.errorList ); - } else { - this.defaultShowErrors(); - } - }, - - // http://jqueryvalidation.org/Validator.resetForm/ - resetForm: function() { - if ( $.fn.resetForm ) { - $( this.currentForm ).resetForm(); - } - this.submitted = {}; - this.lastElement = null; - this.prepareForm(); - this.hideErrors(); - var i, elements = this.elements() - .removeData( "previousValue" ) - .removeAttr( "aria-invalid" ); - - if ( this.settings.unhighlight ) { - for ( i = 0; elements[ i ]; i++ ) { - this.settings.unhighlight.call( this, elements[ i ], - this.settings.errorClass, "" ); - } - } else { - elements.removeClass( this.settings.errorClass ); - } - }, - - numberOfInvalids: function() { - return this.objectLength( this.invalid ); - }, - - objectLength: function( obj ) { - /* jshint unused: false */ - var count = 0, - i; - for ( i in obj ) { - count++; - } - return count; - }, - - hideErrors: function() { - this.hideThese( this.toHide ); - }, - - hideThese: function( errors ) { - errors.not( this.containers ).text( "" ); - this.addWrapper( errors ).hide(); - }, - - valid: function() { - return this.size() === 0; - }, - - size: function() { - return this.errorList.length; - }, - - focusInvalid: function() { - if ( this.settings.focusInvalid ) { - try { - $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || []) - .filter( ":visible" ) - .focus() - // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find - .trigger( "focusin" ); - } catch ( e ) { - // ignore IE throwing errors when focusing hidden elements - } - } - }, - - findLastActive: function() { - var lastActive = this.lastActive; - return lastActive && $.grep( this.errorList, function( n ) { - return n.element.name === lastActive.name; - }).length === 1 && lastActive; - }, - - elements: function() { - var validator = this, - rulesCache = {}; - - // select all valid inputs inside the form (no submit or reset buttons) - return $( this.currentForm ) - .find( "input, select, textarea" ) - .not( ":submit, :reset, :image, :disabled" ) - .not( this.settings.ignore ) - .filter( function() { - if ( !this.name && validator.settings.debug && window.console ) { - console.error( "%o has no name assigned", this ); - } - - // select only the first element for each name, and only those with rules specified - if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) { - return false; - } - - rulesCache[ this.name ] = true; - return true; - }); - }, - - clean: function( selector ) { - return $( selector )[ 0 ]; - }, - - errors: function() { - var errorClass = this.settings.errorClass.split( " " ).join( "." ); - return $( this.settings.errorElement + "." + errorClass, this.errorContext ); - }, - - reset: function() { - this.successList = []; - this.errorList = []; - this.errorMap = {}; - this.toShow = $( [] ); - this.toHide = $( [] ); - this.currentElements = $( [] ); - }, - - prepareForm: function() { - this.reset(); - this.toHide = this.errors().add( this.containers ); - }, - - prepareElement: function( element ) { - this.reset(); - this.toHide = this.errorsFor( element ); - }, - - elementValue: function( element ) { - var val, - $element = $( element ), - type = element.type; - - if ( type === "radio" || type === "checkbox" ) { - return this.findByName( element.name ).filter(":checked").val(); - } else if ( type === "number" && typeof element.validity !== "undefined" ) { - return element.validity.badInput ? false : $element.val(); - } - - val = $element.val(); - if ( typeof val === "string" ) { - return val.replace(/\r/g, "" ); - } - return val; - }, - - check: function( element ) { - element = this.validationTargetFor( this.clean( element ) ); - - var rules = $( element ).rules(), - rulesCount = $.map( rules, function( n, i ) { - return i; - }).length, - dependencyMismatch = false, - val = this.elementValue( element ), - result, method, rule; - - for ( method in rules ) { - rule = { method: method, parameters: rules[ method ] }; - try { - - result = $.validator.methods[ method ].call( this, val, element, rule.parameters ); - - // if a method indicates that the field is optional and therefore valid, - // don't mark it as valid when there are no other rules - if ( result === "dependency-mismatch" && rulesCount === 1 ) { - dependencyMismatch = true; - continue; - } - dependencyMismatch = false; - - if ( result === "pending" ) { - this.toHide = this.toHide.not( this.errorsFor( element ) ); - return; - } - - if ( !result ) { - this.formatAndAdd( element, rule ); - return false; - } - } catch ( e ) { - if ( this.settings.debug && window.console ) { - console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e ); - } - if ( e instanceof TypeError ) { - e.message += ". Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method."; - } - - throw e; - } - } - if ( dependencyMismatch ) { - return; - } - if ( this.objectLength( rules ) ) { - this.successList.push( element ); - } - return true; - }, - - // return the custom message for the given element and validation method - // specified in the element's HTML5 data attribute - // return the generic message if present and no method specific message is present - customDataMessage: function( element, method ) { - return $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() + - method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" ); - }, - - // return the custom message for the given element name and validation method - customMessage: function( name, method ) { - var m = this.settings.messages[ name ]; - return m && ( m.constructor === String ? m : m[ method ]); - }, - - // return the first defined argument, allowing empty strings - findDefined: function() { - for ( var i = 0; i < arguments.length; i++) { - if ( arguments[ i ] !== undefined ) { - return arguments[ i ]; - } - } - return undefined; - }, - - defaultMessage: function( element, method ) { - return this.findDefined( - this.customMessage( element.name, method ), - this.customDataMessage( element, method ), - // title is never undefined, so handle empty string as undefined - !this.settings.ignoreTitle && element.title || undefined, - $.validator.messages[ method ], - "Warning: No message defined for " + element.name + "" - ); - }, - - formatAndAdd: function( element, rule ) { - var message = this.defaultMessage( element, rule.method ), - theregex = /\$?\{(\d+)\}/g; - if ( typeof message === "function" ) { - message = message.call( this, rule.parameters, element ); - } else if ( theregex.test( message ) ) { - message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters ); - } - this.errorList.push({ - message: message, - element: element, - method: rule.method - }); - - this.errorMap[ element.name ] = message; - this.submitted[ element.name ] = message; - }, - - addWrapper: function( toToggle ) { - if ( this.settings.wrapper ) { - toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) ); - } - return toToggle; - }, - - defaultShowErrors: function() { - var i, elements, error; - for ( i = 0; this.errorList[ i ]; i++ ) { - error = this.errorList[ i ]; - if ( this.settings.highlight ) { - this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass ); - } - this.showLabel( error.element, error.message ); - } - if ( this.errorList.length ) { - this.toShow = this.toShow.add( this.containers ); - } - if ( this.settings.success ) { - for ( i = 0; this.successList[ i ]; i++ ) { - this.showLabel( this.successList[ i ] ); - } - } - if ( this.settings.unhighlight ) { - for ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) { - this.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass ); - } - } - this.toHide = this.toHide.not( this.toShow ); - this.hideErrors(); - this.addWrapper( this.toShow ).show(); - }, - - validElements: function() { - return this.currentElements.not( this.invalidElements() ); - }, - - invalidElements: function() { - return $( this.errorList ).map(function() { - return this.element; - }); - }, - - showLabel: function( element, message ) { - var place, group, errorID, - error = this.errorsFor( element ), - elementID = this.idOrName( element ), - describedBy = $( element ).attr( "aria-describedby" ); - if ( error.length ) { - // refresh error/success class - error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass ); - // replace message on existing label - error.html( message ); - } else { - // create error element - error = $( "<" + this.settings.errorElement + ">" ) - .attr( "id", elementID + "-error" ) - .addClass( this.settings.errorClass ) - .html( message || "" ); - - // Maintain reference to the element to be placed into the DOM - place = error; - if ( this.settings.wrapper ) { - // make sure the element is visible, even in IE - // actually showing the wrapped element is handled elsewhere - place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent(); - } - if ( this.labelContainer.length ) { - this.labelContainer.append( place ); - } else if ( this.settings.errorPlacement ) { - this.settings.errorPlacement( place, $( element ) ); - } else { - place.insertAfter( element ); - } - - // Link error back to the element - if ( error.is( "label" ) ) { - // If the error is a label, then associate using 'for' - error.attr( "for", elementID ); - } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) { - // If the element is not a child of an associated label, then it's necessary - // to explicitly apply aria-describedby - - errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1"); - // Respect existing non-error aria-describedby - if ( !describedBy ) { - describedBy = errorID; - } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) { - // Add to end of list if not already present - describedBy += " " + errorID; - } - $( element ).attr( "aria-describedby", describedBy ); - - // If this element is grouped, then assign to all elements in the same group - group = this.groups[ element.name ]; - if ( group ) { - $.each( this.groups, function( name, testgroup ) { - if ( testgroup === group ) { - $( "[name='" + name + "']", this.currentForm ) - .attr( "aria-describedby", error.attr( "id" ) ); - } - }); - } - } - } - if ( !message && this.settings.success ) { - error.text( "" ); - if ( typeof this.settings.success === "string" ) { - error.addClass( this.settings.success ); - } else { - this.settings.success( error, element ); - } - } - this.toShow = this.toShow.add( error ); - }, - - errorsFor: function( element ) { - var name = this.idOrName( element ), - describer = $( element ).attr( "aria-describedby" ), - selector = "label[for='" + name + "'], label[for='" + name + "'] *"; - - // aria-describedby should directly reference the error element - if ( describer ) { - selector = selector + ", #" + describer.replace( /\s+/g, ", #" ); - } - return this - .errors() - .filter( selector ); - }, - - idOrName: function( element ) { - return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name ); - }, - - validationTargetFor: function( element ) { - - // If radio/checkbox, validate first element in group instead - if ( this.checkable( element ) ) { - element = this.findByName( element.name ); - } - - // Always apply ignore filter - return $( element ).not( this.settings.ignore )[ 0 ]; - }, - - checkable: function( element ) { - return ( /radio|checkbox/i ).test( element.type ); - }, - - findByName: function( name ) { - return $( this.currentForm ).find( "[name='" + name + "']" ); - }, - - getLength: function( value, element ) { - switch ( element.nodeName.toLowerCase() ) { - case "select": - return $( "option:selected", element ).length; - case "input": - if ( this.checkable( element ) ) { - return this.findByName( element.name ).filter( ":checked" ).length; - } - } - return value.length; - }, - - depend: function( param, element ) { - return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true; - }, - - dependTypes: { - "boolean": function( param ) { - return param; - }, - "string": function( param, element ) { - return !!$( param, element.form ).length; - }, - "function": function( param, element ) { - return param( element ); - } - }, - - optional: function( element ) { - var val = this.elementValue( element ); - return !$.validator.methods.required.call( this, val, element ) && "dependency-mismatch"; - }, - - startRequest: function( element ) { - if ( !this.pending[ element.name ] ) { - this.pendingRequest++; - this.pending[ element.name ] = true; - } - }, - - stopRequest: function( element, valid ) { - this.pendingRequest--; - // sometimes synchronization fails, make sure pendingRequest is never < 0 - if ( this.pendingRequest < 0 ) { - this.pendingRequest = 0; - } - delete this.pending[ element.name ]; - if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) { - $( this.currentForm ).submit(); - this.formSubmitted = false; - } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) { - $( this.currentForm ).triggerHandler( "invalid-form", [ this ]); - this.formSubmitted = false; - } - }, - - previousValue: function( element ) { - return $.data( element, "previousValue" ) || $.data( element, "previousValue", { - old: null, - valid: true, - message: this.defaultMessage( element, "remote" ) - }); - }, - - // cleans up all forms and elements, removes validator-specific events - destroy: function() { - this.resetForm(); - - $( this.currentForm ) - .off( ".validate" ) - .removeData( "validator" ); - } - - }, - - classRuleSettings: { - required: { required: true }, - email: { email: true }, - url: { url: true }, - date: { date: true }, - dateISO: { dateISO: true }, - number: { number: true }, - digits: { digits: true }, - creditcard: { creditcard: true } - }, - - addClassRules: function( className, rules ) { - if ( className.constructor === String ) { - this.classRuleSettings[ className ] = rules; - } else { - $.extend( this.classRuleSettings, className ); - } - }, - - classRules: function( element ) { - var rules = {}, - classes = $( element ).attr( "class" ); - - if ( classes ) { - $.each( classes.split( " " ), function() { - if ( this in $.validator.classRuleSettings ) { - $.extend( rules, $.validator.classRuleSettings[ this ]); - } - }); - } - return rules; - }, - - normalizeAttributeRule: function( rules, type, method, value ) { - - // convert the value to a number for number inputs, and for text for backwards compability - // allows type="date" and others to be compared as strings - if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) { - value = Number( value ); - - // Support Opera Mini, which returns NaN for undefined minlength - if ( isNaN( value ) ) { - value = undefined; - } - } - - if ( value || value === 0 ) { - rules[ method ] = value; - } else if ( type === method && type !== "range" ) { - - // exception: the jquery validate 'range' method - // does not test for the html5 'range' type - rules[ method ] = true; - } - }, - - attributeRules: function( element ) { - var rules = {}, - $element = $( element ), - type = element.getAttribute( "type" ), - method, value; - - for ( method in $.validator.methods ) { - - // support for in both html5 and older browsers - if ( method === "required" ) { - value = element.getAttribute( method ); - - // Some browsers return an empty string for the required attribute - // and non-HTML5 browsers might have required="" markup - if ( value === "" ) { - value = true; - } - - // force non-HTML5 browsers to return bool - value = !!value; - } else { - value = $element.attr( method ); - } - - this.normalizeAttributeRule( rules, type, method, value ); - } - - // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs - if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) { - delete rules.maxlength; - } - - return rules; - }, - - dataRules: function( element ) { - var rules = {}, - $element = $( element ), - type = element.getAttribute( "type" ), - method, value; - - for ( method in $.validator.methods ) { - value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() ); - this.normalizeAttributeRule( rules, type, method, value ); - } - return rules; - }, - - staticRules: function( element ) { - var rules = {}, - validator = $.data( element.form, "validator" ); - - if ( validator.settings.rules ) { - rules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {}; - } - return rules; - }, - - normalizeRules: function( rules, element ) { - // handle dependency check - $.each( rules, function( prop, val ) { - // ignore rule when param is explicitly false, eg. required:false - if ( val === false ) { - delete rules[ prop ]; - return; - } - if ( val.param || val.depends ) { - var keepRule = true; - switch ( typeof val.depends ) { - case "string": - keepRule = !!$( val.depends, element.form ).length; - break; - case "function": - keepRule = val.depends.call( element, element ); - break; - } - if ( keepRule ) { - rules[ prop ] = val.param !== undefined ? val.param : true; - } else { - delete rules[ prop ]; - } - } - }); - - // evaluate parameters - $.each( rules, function( rule, parameter ) { - rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter; - }); - - // clean number parameters - $.each([ "minlength", "maxlength" ], function() { - if ( rules[ this ] ) { - rules[ this ] = Number( rules[ this ] ); - } - }); - $.each([ "rangelength", "range" ], function() { - var parts; - if ( rules[ this ] ) { - if ( $.isArray( rules[ this ] ) ) { - rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ]; - } else if ( typeof rules[ this ] === "string" ) { - parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ ); - rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ]; - } - } - }); - - if ( $.validator.autoCreateRanges ) { - // auto-create ranges - if ( rules.min != null && rules.max != null ) { - rules.range = [ rules.min, rules.max ]; - delete rules.min; - delete rules.max; - } - if ( rules.minlength != null && rules.maxlength != null ) { - rules.rangelength = [ rules.minlength, rules.maxlength ]; - delete rules.minlength; - delete rules.maxlength; - } - } - - return rules; - }, - - // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true} - normalizeRule: function( data ) { - if ( typeof data === "string" ) { - var transformed = {}; - $.each( data.split( /\s/ ), function() { - transformed[ this ] = true; - }); - data = transformed; - } - return data; - }, - - // http://jqueryvalidation.org/jQuery.validator.addMethod/ - addMethod: function( name, method, message ) { - $.validator.methods[ name ] = method; - $.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ]; - if ( method.length < 3 ) { - $.validator.addClassRules( name, $.validator.normalizeRule( name ) ); - } - }, - - methods: { - - // http://jqueryvalidation.org/required-method/ - required: function( value, element, param ) { - // check if dependency is met - if ( !this.depend( param, element ) ) { - return "dependency-mismatch"; - } - if ( element.nodeName.toLowerCase() === "select" ) { - // could be an array for select-multiple or a string, both are fine this way - var val = $( element ).val(); - return val && val.length > 0; - } - if ( this.checkable( element ) ) { - return this.getLength( value, element ) > 0; - } - return value.length > 0; - }, - - // http://jqueryvalidation.org/email-method/ - email: function( value, element ) { - // From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address - // Retrieved 2014-01-14 - // If you have a problem with this implementation, report a bug against the above spec - // Or use custom methods to implement your own email validation - return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value ); - }, - - // http://jqueryvalidation.org/url-method/ - url: function( value, element ) { - - // Copyright (c) 2010-2013 Diego Perini, MIT licensed - // https://gist.github.com/dperini/729294 - // see also https://mathiasbynens.be/demo/url-regex - // modified to allow protocol-relative URLs - return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value ); - }, - - // http://jqueryvalidation.org/date-method/ - date: function( value, element ) { - return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() ); - }, - - // http://jqueryvalidation.org/dateISO-method/ - dateISO: function( value, element ) { - return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value ); - }, - - // http://jqueryvalidation.org/number-method/ - number: function( value, element ) { - return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value ); - }, - - // http://jqueryvalidation.org/digits-method/ - digits: function( value, element ) { - return this.optional( element ) || /^\d+$/.test( value ); - }, - - // http://jqueryvalidation.org/creditcard-method/ - // based on http://en.wikipedia.org/wiki/Luhn_algorithm - creditcard: function( value, element ) { - if ( this.optional( element ) ) { - return "dependency-mismatch"; - } - // accept only spaces, digits and dashes - if ( /[^0-9 \-]+/.test( value ) ) { - return false; - } - var nCheck = 0, - nDigit = 0, - bEven = false, - n, cDigit; - - value = value.replace( /\D/g, "" ); - - // Basing min and max length on - // http://developer.ean.com/general_info/Valid_Credit_Card_Types - if ( value.length < 13 || value.length > 19 ) { - return false; - } - - for ( n = value.length - 1; n >= 0; n--) { - cDigit = value.charAt( n ); - nDigit = parseInt( cDigit, 10 ); - if ( bEven ) { - if ( ( nDigit *= 2 ) > 9 ) { - nDigit -= 9; - } - } - nCheck += nDigit; - bEven = !bEven; - } - - return ( nCheck % 10 ) === 0; - }, - - // http://jqueryvalidation.org/minlength-method/ - minlength: function( value, element, param ) { - var length = $.isArray( value ) ? value.length : this.getLength( value, element ); - return this.optional( element ) || length >= param; - }, - - // http://jqueryvalidation.org/maxlength-method/ - maxlength: function( value, element, param ) { - var length = $.isArray( value ) ? value.length : this.getLength( value, element ); - return this.optional( element ) || length <= param; - }, - - // http://jqueryvalidation.org/rangelength-method/ - rangelength: function( value, element, param ) { - var length = $.isArray( value ) ? value.length : this.getLength( value, element ); - return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] ); - }, - - // http://jqueryvalidation.org/min-method/ - min: function( value, element, param ) { - return this.optional( element ) || value >= param; - }, - - // http://jqueryvalidation.org/max-method/ - max: function( value, element, param ) { - return this.optional( element ) || value <= param; - }, - - // http://jqueryvalidation.org/range-method/ - range: function( value, element, param ) { - return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] ); - }, - - // http://jqueryvalidation.org/equalTo-method/ - equalTo: function( value, element, param ) { - // bind to the blur event of the target in order to revalidate whenever the target field is updated - // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead - var target = $( param ); - if ( this.settings.onfocusout ) { - target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() { - $( element ).valid(); - }); - } - return value === target.val(); - }, - - // http://jqueryvalidation.org/remote-method/ - remote: function( value, element, param ) { - if ( this.optional( element ) ) { - return "dependency-mismatch"; - } - - var previous = this.previousValue( element ), - validator, data; - - if (!this.settings.messages[ element.name ] ) { - this.settings.messages[ element.name ] = {}; - } - previous.originalMessage = this.settings.messages[ element.name ].remote; - this.settings.messages[ element.name ].remote = previous.message; - - param = typeof param === "string" && { url: param } || param; - - if ( previous.old === value ) { - return previous.valid; - } - - previous.old = value; - validator = this; - this.startRequest( element ); - data = {}; - data[ element.name ] = value; - $.ajax( $.extend( true, { - mode: "abort", - port: "validate" + element.name, - dataType: "json", - data: data, - context: validator.currentForm, - success: function( response ) { - var valid = response === true || response === "true", - errors, message, submitted; - - validator.settings.messages[ element.name ].remote = previous.originalMessage; - if ( valid ) { - submitted = validator.formSubmitted; - validator.prepareElement( element ); - validator.formSubmitted = submitted; - validator.successList.push( element ); - delete validator.invalid[ element.name ]; - validator.showErrors(); - } else { - errors = {}; - message = response || validator.defaultMessage( element, "remote" ); - errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message; - validator.invalid[ element.name ] = true; - validator.showErrors( errors ); - } - previous.valid = valid; - validator.stopRequest( element, valid ); - } - }, param ) ); - return "pending"; - } - } - -}); - -// ajax mode: abort -// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); -// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() - -var pendingRequests = {}, - ajax; -// Use a prefilter if available (1.5+) -if ( $.ajaxPrefilter ) { - $.ajaxPrefilter(function( settings, _, xhr ) { - var port = settings.port; - if ( settings.mode === "abort" ) { - if ( pendingRequests[port] ) { - pendingRequests[port].abort(); - } - pendingRequests[port] = xhr; - } - }); -} else { - // Proxy ajax - ajax = $.ajax; - $.ajax = function( settings ) { - var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode, - port = ( "port" in settings ? settings : $.ajaxSettings ).port; - if ( mode === "abort" ) { - if ( pendingRequests[port] ) { - pendingRequests[port].abort(); - } - pendingRequests[port] = ajax.apply(this, arguments); - return pendingRequests[port]; - } - return ajax.apply(this, arguments); - }; -} - -})); \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery/.bower.json b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery/.bower.json deleted file mode 100644 index 419488b5bcfd0..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery/.bower.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "jquery", - "main": "dist/jquery.js", - "license": "MIT", - "ignore": [ - "package.json" - ], - "keywords": [ - "jquery", - "javascript", - "browser", - "library" - ], - "homepage": "https://github.com/jquery/jquery-dist", - "version": "2.2.0", - "_release": "2.2.0", - "_resolution": { - "type": "version", - "tag": "2.2.0", - "commit": "6fc01e29bdad0964f62ef56d01297039cdcadbe5" - }, - "_source": "git://github.com/jquery/jquery-dist.git", - "_target": "2.2.0", - "_originalSource": "jquery" -} \ No newline at end of file diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery/LICENSE.txt b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery/LICENSE.txt deleted file mode 100644 index 5312a4c864d22..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery/LICENSE.txt +++ /dev/null @@ -1,36 +0,0 @@ -Copyright jQuery Foundation and other contributors, https://jquery.org/ - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/jquery/jquery - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -All files located in the node_modules and external directories are -externally maintained libraries used by this software which have their -own licenses; we recommend you read them, as their terms may differ from -the terms above. diff --git a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery/dist/jquery.js b/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery/dist/jquery.js deleted file mode 100644 index 1e0ba99740311..0000000000000 --- a/samples/snippets/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/wwwroot/lib/jquery/dist/jquery.js +++ /dev/null @@ -1,9831 +0,0 @@ -/*! - * jQuery JavaScript Library v2.2.0 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-01-08T20:02Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Support: Firefox 18+ -// Can't be in strict mode, several libs including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -//"use strict"; -var arr = []; - -var document = window.document; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - version = "2.2.0", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = jQuery.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - // adding 1 corrects loss of precision from parseFloat (#15100) - var realStringObj = obj && obj.toString(); - return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; - }, - - isPlainObject: function( obj ) { - - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.constructor && - !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android<4.0, iOS<6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf( "use strict" ) === 1 ) { - script = document.createElement( "script" ); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE9-11+ - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android<4.1 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -// JSHint would error on this code due to the Symbol not being defined in ES5. -// Defining this global in .jshintrc would create a danger of using the global -// unguarded in another place, it seems safer to just disable JSHint for these -// three lines. -/* jshint ignore: start */ -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} -/* jshint ignore: end */ - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: iOS 8.2 (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.2.1 - * http://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2015-10-17 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // http://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, nidselect, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; - while ( i-- ) { - groups[i] = nidselect + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, parent, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( (parent = document.defaultView) && parent.top !== parent ) { - // Support: IE 11 - if ( parent.addEventListener ) { - parent.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( document.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var m = context.getElementById( id ); - return m ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - docElem.appendChild( div ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibing-combinator selector` fails - if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - !compilerCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( (oldCache = uniqueCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - } ); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - // Support: Blackberry 4.6 - // gEBID returns nodes no longer in the document (#6963) - if ( elem && elem.parentNode ) { - - // Inject the element directly into the jQuery object - this.length = 1; - this[ 0 ] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( pos ? - pos.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnotwhite = ( /\S+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], - [ "notify", "progress", jQuery.Callbacks( "memory" ) ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this === promise ? newDefer.promise() : this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( function() { - - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || - ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. - // If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // Add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .progress( updateFunc( i, progressContexts, progressValues ) ) - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ); - } else { - --remaining; - } - } - } - - // If we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -} ); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -} ); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called - // after the browser event has already occurred. - // Support: IE9-10 only - // Older IE sometimes signals "interactive" too soon - if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[ 0 ], key ) : emptyGet; -}; -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - register: function( owner, initial ) { - var value = initial || {}; - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable, non-writable property - // configurability must be true to allow the property to be - // deleted with the delete operator - } else { - Object.defineProperty( owner, this.expando, { - value: value, - writable: true, - configurable: true - } ); - } - return owner[ this.expando ]; - }, - cache: function( owner ) { - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( !acceptData( owner ) ) { - return {}; - } - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - owner[ this.expando ] && owner[ this.expando ][ key ]; - }, - access: function( owner, key, value ) { - var stored; - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase( key ) ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key === undefined ) { - this.register( owner ); - - } else { - - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <= 35-45+ - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://code.google.com/p/chromium/issues/detail?id=378607 - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data, camelKey; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // with the key as-is - data = dataUser.get( elem, key ) || - - // Try to find dashed key if it exists (gh-2779) - // This is for 2.2.x only - dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() ); - - if ( data !== undefined ) { - return data; - } - - camelKey = jQuery.camelCase( key ); - - // Attempt to get data from the cache - // with the key camelized - data = dataUser.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - camelKey = jQuery.camelCase( key ); - this.each( function() { - - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = dataUser.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - dataUser.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf( "-" ) > -1 && data !== undefined ) { - dataUser.set( this, key, value ); - } - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || - !jQuery.contains( elem.ownerDocument, elem ); - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, - scale = 1, - maxIterations = 20, - currentValue = tween ? - function() { return tween.cur(); } : - function() { return jQuery.css( elem, prop, "" ); }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - do { - - // If previous iteration zeroed out, double until we get *something*. - // Use string for doubling so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - initialInUnit = initialInUnit / scale; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // Break the loop if scale is unchanged or perfect, or if we've just had enough. - } while ( - scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations - ); - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([\w:-]+)/ ); - -var rscriptType = ( /^$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE9 - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
          " ], - col: [ 2, "", "
          " ], - tr: [ 2, "", "
          " ], - td: [ 3, "", "
          " ], - - _default: [ 0, "", "" ] -}; - -// Support: IE9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE9-11+ - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== "undefined" ? - context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0-4.3, Safari<=5.1 - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari<=5.1, Android<4.2 - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<=11+ - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE9 -// See #13393 for more info -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Support (at least): Chrome, IE9 - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // - // Support: Firefox<=42+ - // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) - if ( delegateCount && cur.nodeType && - ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push( { elem: cur, handlers: matches } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + - "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split( " " ), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " + - "screenX screenY toElement" ).split( " " ), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + - ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + - ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome<28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android<4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://code.google.com/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, - - // Support: IE 10-11, Edge 10240+ - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -function manipulationTarget( elem, content ) { - if ( jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return elem.getElementsByTagName( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <= 35-45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <= 35-45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - - // Keep domManip exposed until 3.0 (gh-2225) - domManip: domManip, - - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); - - -var iframe, - elemdisplay = { - - // Support: Firefox - // We have to pre-define these values for FF (#10227) - HTML: "block", - BODY: "block" - }; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ - -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - display = jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = ( iframe || jQuery( "