Skip to content

Commit

Permalink
Move member remarks (dotnet#39270)
Browse files Browse the repository at this point in the history
  • Loading branch information
gewarren authored Jan 29, 2024
1 parent 13e0fd8 commit 6c88824
Show file tree
Hide file tree
Showing 736 changed files with 20,242 additions and 5,682 deletions.
4 changes: 4 additions & 0 deletions .openpublishing.redirection.framework.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"source_path_from_root": "/docs/framework/add-ins/walkthrough-create-extensible-app.md",
"redirect_url": "/previous-versions/dotnet/netframework-4.0/bb788290(v%3dvs.100)"
},
{
"source_path_from_root": "/docs/framework/app-domains/application-domains-and-assemblies-how-to-topics.md",
"redirect_url": "/dotnet/framework/app-domains/application-domains"
},
{
"source_path_from_root": "/docs/framework/app-domains/assemblies-and-side-by-side-execution.md",
"redirect_url": "/dotnet/standard/assembly/side-by-side-execution"
Expand Down
8 changes: 8 additions & 0 deletions .openpublishing.redirection.fundamentals.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@
"source_path_from_root": "/docs/fundamentals/productivity/configure-code-analysis-rules.md",
"redirect_url": "/dotnet/fundamentals/code-analysis/configuration-options"
},
{
"source_path_from_root": "/docs/fundamentals/runtime-libraries/system-data-linq-dataloadoptions.md",
"redirect_url": "/dotnet/framework/data/adonet/sql/linq/"
},
{
"source_path_from_root": "/docs/fundamentals/runtime-libraries/system-data-linq-mapping-tableattribute.md",
"redirect_url": "/dotnet/framework/data/adonet/sql/linq/"
},
{
"source_path_from_root": "/docs/fundamentals/syslib-diagnostics/syslib1004.md",
"redirect_url": "/dotnet/fundamentals/syslib-diagnostics/source-generator-overview"
Expand Down
4 changes: 4 additions & 0 deletions docs/csharp/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ items:
items:
- name: The BinaryExpression class
href: ../fundamentals/runtime-libraries/system-linq-expressions-binaryexpression.md
- name: The Expression class
items:
- name: Add method
href: ../fundamentals/runtime-libraries/system-linq-expressions-expression-add.md
- name: Asynchronous programming
items:
- name: Overview
Expand Down

This file was deleted.

53 changes: 25 additions & 28 deletions docs/framework/app-domains/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Programming with Application Domains and Assemblies"
description: Get to know programming with application domains and assemblies in .NET. See links to how-to topics & examples about creating application domains & assemblies.
ms.date: "03/30/2017"
helpviewer_keywords:
helpviewer_keywords:
- "assemblies [.NET Framework], programming"
- "programming assemblies"
- "application domains, programming"
Expand All @@ -11,31 +11,28 @@ ms.assetid: 96d3b8e3-bef8-4da0-9a81-9841e23a94e9
---
# Programming with Application Domains and Assemblies

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'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

[Application Domains and Assemblies How-to Topics](application-domains-and-assemblies-how-to-topics.md)
Provides links to all How-to topics found in the conceptual documentation for programming with application domains and assemblies.

[Using Application Domains](use.md)
Provides examples of creating, configuring, and using application domains.

[Programming with Assemblies](../../standard/assembly/index.md)
Describes how to create, sign, and set attributes on assemblies.

## Related Sections

[Emitting Dynamic Methods and Assemblies](../reflection-and-codedom/emitting-dynamic-methods-and-assemblies.md)
Describes how to create dynamic assemblies.

[Assemblies in .NET](../../standard/assembly/index.md)
Provides a conceptual overview of assemblies.

[Application Domains](application-domains.md)
Provides a conceptual overview of application domains.

[Reflection Overview](../reflection-and-codedom/reflection.md)
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'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

[Using Application Domains](use.md)\
Provides examples of creating, configuring, and using application domains.

[Programming with Assemblies](../../standard/assembly/index.md)\
Describes how to create, sign, and set attributes on assemblies.

## Related Sections

[Emitting Dynamic Methods and Assemblies](../reflection-and-codedom/emitting-dynamic-methods-and-assemblies.md)\
Describes how to create dynamic assemblies.

[Assemblies in .NET](../../standard/assembly/index.md)\
Provides a conceptual overview of assemblies.

[Application Domains](application-domains.md)\
Provides a conceptual overview of application domains.

[Reflection Overview](../reflection-and-codedom/reflection.md)\
Describes how to use the **Reflection** class to obtain information about an assembly.
63 changes: 35 additions & 28 deletions docs/framework/app-domains/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ items:
href: assembly-placement.md
- name: Global Assembly Cache
href: gac.md
- name: Working with Assemblies and the Global Assembly Cache
- name: Work with Assemblies and the Global Assembly Cache
href: working-with-assemblies-and-the-gac.md
items:
- name: "How to: View the Contents of the Global Assembly Cache"
Expand All @@ -16,34 +16,41 @@ items:
href: how-to-remove-an-assembly-from-the-gac.md
- name: Using Serviced Components with the Global Assembly Cache
href: use-serviced-components-with-the-gac.md
- name: Application Domains
href: application-domains.md
- name: Application Domains and Assemblies How-to Topics
href: application-domains-and-assemblies-how-to-topics.md
- name: "How to: Build a single-file assembly"
href: build-single-file-assembly.md
- name: Assembly how-to articles
items:
- name: "How to: Build a single-file assembly"
href: build-single-file-assembly.md
- name: "How to: Share an assembly with other applications"
href: how-to-share-an-assembly-with-other-applications.md
- name: Multifile assemblies
href: multifile-assemblies.md
- name: "How to: Build a multifile assembly"
href: build-multifile-assembly.md
- name: "How to: Share an assembly with other applications"
href: how-to-share-an-assembly-with-other-applications.md
- name: Using Application Domains
href: use.md
items:
- name: "How to: Create an Application Domain"
href: how-to-create-an-application-domain.md
- name: "How to: Unload an Application Domain"
href: how-to-unload-an-application-domain.md
- name: "How to: Configure an Application Domain"
href: how-to-configure-an-application-domain.md
- name: Retrieving Setup Information from an Application Domain
href: retrieve-setup-information.md
- name: "How to: Load Assemblies into an Application Domain"
href: how-to-load-assemblies-into-an-application-domain.md
- name: Shadow Copying Assemblies
href: shadow-copy-assemblies.md
- name: "How to: Receive First-Chance Exception Notifications"
href: how-to-receive-first-chance-exception-notifications.md
- name: Running Intranet Applications in Full Trust
- name: "How to: Build a multifile assembly"
href: build-multifile-assembly.md
- name: Application Domains
items:
- name: Overview
href: application-domains.md
- name: Use Application Domains
href: use.md
items:
- name: "How to: Create an Application Domain"
href: how-to-create-an-application-domain.md
- name: "How to: Unload an Application Domain"
href: how-to-unload-an-application-domain.md
- name: "How to: Configure an Application Domain"
href: how-to-configure-an-application-domain.md
- name: Retrieving Setup Information from an Application Domain
href: retrieve-setup-information.md
- name: "How to: Load Assemblies into an Application Domain"
href: how-to-load-assemblies-into-an-application-domain.md
- name: Shadow Copying Assemblies
href: shadow-copy-assemblies.md
- name: "How to: Receive First-Chance Exception Notifications"
href: how-to-receive-first-chance-exception-notifications.md
- name: Supplemental API remarks
items:
- name: AppDomain.UnhandledException event
href: ../../fundamentals/runtime-libraries/system-appdomain-unhandledexception.md
- name: Run Intranet Applications in Full Trust
href: running-intranet-applications-in-full-trust.md
4 changes: 4 additions & 0 deletions docs/framework/network-programming/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ items:
href: how-to-upload-files-with-ftp.md
- name: List Directory Contents with FTP
href: how-to-list-directory-contents-with-ftp.md
- name: Supplemental API remarks
items:
- name: FtpWebRequest.Proxy property
href: ../../fundamentals/runtime-libraries/system-net-ftpwebrequest-proxy.md
- name: UDP
href: using-udp-services.md
- name: Security in Network Programming
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> [!IMPORTANT]
> Instead of calling the **String.Format** method or using [composite format strings](/dotnet/standard/base-types/composite-formatting), you can use *interpolated strings* if your language supports them. An interpolated string is a string that contains *interpolated expressions*. Each interpolated expression is resolved with the expression's value and included in the result string when the string is assigned. For more information, see [String interpolation (C# Reference)](/dotnet/csharp/language-reference/tokens/interpolated) and [Interpolated Strings (Visual Basic Reference)](/dotnet/visual-basic/programming-guide/language-features/strings/interpolated-strings).
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8</TargetFrameworks>
</PropertyGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'<snippet1>
Imports System.Collections.Generic

' Simple business object. A PartId is used to identify the type of part
' but the part name can change.
Expand All @@ -10,7 +9,7 @@ Public Class Part
Return m_PartName
End Get
Set(value As String)
m_PartName = Value
m_PartName = value
End Set
End Property
Private m_PartName As String
Expand All @@ -20,7 +19,7 @@ Public Class Part
Return m_PartId
End Get
Set(value As Integer)
m_PartId = Value
m_PartId = value
End Set
End Property
Private m_PartId As Integer
Expand Down Expand Up @@ -58,29 +57,29 @@ Public Class Example
Dim parts As New List(Of Part)()

' Add parts to the list.
parts.Add(New Part() With { _
.PartName = "crank arm", _
.PartId = 1234 _
parts.Add(New Part() With {
.PartName = "crank arm",
.PartId = 1234
})
parts.Add(New Part() With { _
.PartName = "chain ring", _
.PartId = 1334 _
parts.Add(New Part() With {
.PartName = "chain ring",
.PartId = 1334
})
parts.Add(New Part() With { _
.PartName = "regular seat", _
.PartId = 1434 _
parts.Add(New Part() With {
.PartName = "regular seat",
.PartId = 1434
})
parts.Add(New Part() With { _
.PartName = "banana seat", _
.PartId = 1444 _
parts.Add(New Part() With {
.PartName = "banana seat",
.PartId = 1444
})
parts.Add(New Part() With { _
.PartName = "cassette", _
.PartId = 1534 _
parts.Add(New Part() With {
.PartName = "cassette",
.PartId = 1534
})
parts.Add(New Part() With { _
.PartName = "shift lever", _
.PartId = 1634 _
parts.Add(New Part() With {
.PartName = "shift lever",
.PartId = 1634
})


Expand All @@ -95,16 +94,16 @@ Public Class Example

' Check the list for part #1734. This calls the IEquatable.Equals method
' of the Part class, which checks the PartId for equality.
Console.WriteLine(vbLf & "Contains(""1734""): {0}", parts.Contains(New Part() With { _
.PartId = 1734, _
.PartName = "" _
Console.WriteLine(vbLf & "Contains(""1734""): {0}", parts.Contains(New Part() With {
.PartId = 1734,
.PartName = ""
}))

' Insert a new item at position 2.
Console.WriteLine(vbLf & "Insert(2, ""1834"")")
parts.Insert(2, New Part() With { _
.PartName = "brake lever", _
.PartId = 1834 _
parts.Insert(2, New Part() With {
.PartName = "brake lever",
.PartId = 1834
})


Expand All @@ -119,9 +118,9 @@ Public Class Example

' This will remove part 1534 even though the PartName is different,
' because the Equals method only checks PartId for equality.
parts.Remove(New Part() With { _
.PartId = 1534, _
.PartName = "cogs" _
parts.Remove(New Part() With {
.PartId = 1534,
.PartName = "cogs"
})

Console.WriteLine()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
' <Snippet1>
Imports System.Collections.Generic

Public Class Example
Public Class Example2

Public Shared Sub Main()
' <snippet2>
Expand All @@ -24,7 +22,7 @@ Public Class Example
Console.WriteLine(vbLf & "Capacity: {0}", dinosaurs.Capacity)
Console.WriteLine("Count: {0}", dinosaurs.Count)

Console.WriteLine(vbLf & "Contains(""Deinonychus""): {0}", _
Console.WriteLine(vbLf & "Contains(""Deinonychus""): {0}",
dinosaurs.Contains("Deinonychus"))

Console.WriteLine(vbLf & "Insert(2, ""Compsognathus"")")
Expand Down Expand Up @@ -99,4 +97,4 @@ End Class
'Clear()
'Capacity: 5
'Count: 0
' </Snippet1>
' </Snippet1>
Loading

0 comments on commit 6c88824

Please sign in to comment.