From 2b94fafd1a1070eb1dee154c6973f5b2517552b0 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:26:40 -0400 Subject: [PATCH 01/18] fix: docs/framework/additional-apis --- docs/framework/additional-apis/_autoredirects.md | 2 +- docs/framework/additional-apis/_httpresponse.md | 2 +- docs/framework/additional-apis/adodb.connection.md | 2 +- docs/framework/additional-apis/connection.md | 2 +- docs/framework/additional-apis/connectiongroup.md | 2 +- docs/framework/additional-apis/coreresponsedata.md | 2 +- .../additional-apis/coreresponsedata_m_responseheaders.md | 2 +- docs/framework/additional-apis/coreresponsedata_m_statuscode.md | 2 +- docs/framework/additional-apis/datamemberfieldeditor-class.md | 2 +- docs/framework/additional-apis/datamemberlisteditor-class.md | 2 +- docs/framework/additional-apis/httpwebrequest__coreresponse.md | 2 +- docs/framework/additional-apis/index.md | 2 +- docs/framework/additional-apis/m_connectiongrouplist.md | 2 +- docs/framework/additional-apis/m_connectionlist.md | 2 +- docs/framework/additional-apis/m_writelist.md | 2 +- docs/framework/additional-apis/s_servicepointtable.md | 2 +- docs/framework/additional-apis/stdole.stdfont.md | 2 +- docs/framework/additional-apis/system.net.rtcstate.md | 2 +- .../additional-apis/system.xml.xmlreader.createsqlreader.md | 2 +- ...ntwriter-raise-writingcancelled-method-system-windows-xps.md | 2 +- ...ntwriter-raise-writingcompleted-method-system-windows-xps.md | 2 +- ...aise-writingprintticketrequired-method-system-windows-xps.md | 2 +- ...er-raise-writingprogresschanged-method-system-windows-xps.md | 2 +- ...sdocumentwriter-writingcancelled-event-system-windows-xps.md | 2 +- ...sdocumentwriter-writingcompleted-event-system-windows-xps.md | 2 +- ...entwriter-writingprogresschanged-event-system-windows-xps.md | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/framework/additional-apis/_autoredirects.md b/docs/framework/additional-apis/_autoredirects.md index 26174d0a4d9b2..b14f173974fac 100644 --- a/docs/framework/additional-apis/_autoredirects.md +++ b/docs/framework/additional-apis/_autoredirects.md @@ -23,7 +23,7 @@ private int _AutoRedirects > [!WARNING] > The `HttpWebRequest._AutoRedirects` field is internal and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this field in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/_httpresponse.md b/docs/framework/additional-apis/_httpresponse.md index 7fff0b31347f8..39dd00c3ce13b 100644 --- a/docs/framework/additional-apis/_httpresponse.md +++ b/docs/framework/additional-apis/_httpresponse.md @@ -23,7 +23,7 @@ internal HttpWebResponse _HttpResponse > [!WARNING] > The `HttpWebRequest._HttpResponse` field is internal and not meant to be used directly in your code. -> +> > Microsoft does not support the use of this field in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/adodb.connection.md b/docs/framework/additional-apis/adodb.connection.md index fe122078e504a..6871b5b7dc61c 100644 --- a/docs/framework/additional-apis/adodb.connection.md +++ b/docs/framework/additional-apis/adodb.connection.md @@ -14,7 +14,7 @@ api_type: ```csharp [GuidAttribute("00000550-0000-0010-8000-00AA006D2EA4")] -public interface Connection : _Connection, +public interface Connection : _Connection, ConnectionEvents_Event ``` diff --git a/docs/framework/additional-apis/connection.md b/docs/framework/additional-apis/connection.md index d82a88bd7a7f8..6d26169e2d547 100644 --- a/docs/framework/additional-apis/connection.md +++ b/docs/framework/additional-apis/connection.md @@ -24,7 +24,7 @@ internal class Connection : PooledStream > [!WARNING] > The `Connection` class is internal and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this class in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/connectiongroup.md b/docs/framework/additional-apis/connectiongroup.md index 886651354eeda..65d95054474e2 100644 --- a/docs/framework/additional-apis/connectiongroup.md +++ b/docs/framework/additional-apis/connectiongroup.md @@ -23,7 +23,7 @@ internal class ConnectionGroup > [!WARNING] > The `ConnectionGroup` class is internal and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this class in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/coreresponsedata.md b/docs/framework/additional-apis/coreresponsedata.md index 7ab155a94bfb1..e9730ce01f681 100644 --- a/docs/framework/additional-apis/coreresponsedata.md +++ b/docs/framework/additional-apis/coreresponsedata.md @@ -24,7 +24,7 @@ internal class CoreResponseData > [!WARNING] > This API is internal, and it is not meant to be used directly in your code. Instead, you should use a to hook networking code. See [DiagnosticSource User's Guide](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/DiagnosticSourceUsersGuide.md). -> +> > Microsoft does not support the use of this class in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/coreresponsedata_m_responseheaders.md b/docs/framework/additional-apis/coreresponsedata_m_responseheaders.md index 156140c7263c1..494009e811b0d 100644 --- a/docs/framework/additional-apis/coreresponsedata_m_responseheaders.md +++ b/docs/framework/additional-apis/coreresponsedata_m_responseheaders.md @@ -24,7 +24,7 @@ public WebHeaderCollection m_ResponseHeaders > [!WARNING] > This API is not meant to be used directly in your code. Instead, you should use a to hook networking code. See [DiagnosticSource User's Guide](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/DiagnosticSourceUsersGuide.md). -> +> > Microsoft does not support the use of this class in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/coreresponsedata_m_statuscode.md b/docs/framework/additional-apis/coreresponsedata_m_statuscode.md index e82b938042039..07fceb9c0bbef 100644 --- a/docs/framework/additional-apis/coreresponsedata_m_statuscode.md +++ b/docs/framework/additional-apis/coreresponsedata_m_statuscode.md @@ -24,7 +24,7 @@ public HttpStatusCode m_StatusCode > [!WARNING] > This API is not meant to be used directly in your code. Instead, you should use a to hook networking code. See [DiagnosticSource User's Guide](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/DiagnosticSourceUsersGuide.md). -> +> > Microsoft does not support the use of this class in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/datamemberfieldeditor-class.md b/docs/framework/additional-apis/datamemberfieldeditor-class.md index ad36d6fe4555f..9a9ed36efa433 100644 --- a/docs/framework/additional-apis/datamemberfieldeditor-class.md +++ b/docs/framework/additional-apis/datamemberfieldeditor-class.md @@ -25,7 +25,7 @@ internal class DataMemberFieldEditor : UITypeEditor > [!WARNING] > The `DataMemberFieldEditor` class is internal and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this class in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/datamemberlisteditor-class.md b/docs/framework/additional-apis/datamemberlisteditor-class.md index 3a82d02860e28..20820becad691 100644 --- a/docs/framework/additional-apis/datamemberlisteditor-class.md +++ b/docs/framework/additional-apis/datamemberlisteditor-class.md @@ -25,7 +25,7 @@ internal class DataMemberListEditor : UITypeEditor > [!WARNING] > The `DataMemberListEditor` class is internal and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this class in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/httpwebrequest__coreresponse.md b/docs/framework/additional-apis/httpwebrequest__coreresponse.md index fb821a3115d1c..f2454115de7b2 100644 --- a/docs/framework/additional-apis/httpwebrequest__coreresponse.md +++ b/docs/framework/additional-apis/httpwebrequest__coreresponse.md @@ -24,7 +24,7 @@ private object _CoreResponse > [!WARNING] > This API is not meant to be used directly in your code. Instead, you should use a to hook networking code. See [DiagnosticSource User's Guide](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/DiagnosticSourceUsersGuide.md). -> +> > Microsoft does not support the use of this class in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/index.md b/docs/framework/additional-apis/index.md index 28dbad1ecf8e5..ccd3f35bed651 100644 --- a/docs/framework/additional-apis/index.md +++ b/docs/framework/additional-apis/index.md @@ -22,7 +22,7 @@ In addition, some libraries target specific platforms or implementations of the | ------- | ----------- | | | Provides collections that are thread safe and guaranteed to never change their contents. | | | Provides a message handler for based on the WinHTTP interface of Windows. | -| | Provides a library of vector types that can take advantage of SIMD hardware-based acceleration.| +| | Provides a library of vector types that can take advantage of SIMD hardware-based acceleration.| | | The TPL Dataflow Library provides dataflow components to help increase the robustness of concurrency-enabled applications. | ## Platform-specific libraries diff --git a/docs/framework/additional-apis/m_connectiongrouplist.md b/docs/framework/additional-apis/m_connectiongrouplist.md index 23debac7cd742..0ce2a25d87acb 100644 --- a/docs/framework/additional-apis/m_connectiongrouplist.md +++ b/docs/framework/additional-apis/m_connectiongrouplist.md @@ -23,7 +23,7 @@ private Hashtable m_ConnectionGroupList > [!WARNING] > The `ServicePoint.m_ConnectionGroupList` field is private and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this field in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/m_connectionlist.md b/docs/framework/additional-apis/m_connectionlist.md index c8cf08a1da175..953818d1e4845 100644 --- a/docs/framework/additional-apis/m_connectionlist.md +++ b/docs/framework/additional-apis/m_connectionlist.md @@ -23,7 +23,7 @@ private ArrayList m_ConnectionList > [!WARNING] > The `ConnectionGroup.m_ConnectionList` field is private and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this field in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/m_writelist.md b/docs/framework/additional-apis/m_writelist.md index d847fa021cc56..869d25e90b318 100644 --- a/docs/framework/additional-apis/m_writelist.md +++ b/docs/framework/additional-apis/m_writelist.md @@ -23,7 +23,7 @@ private ArrayList m_WriteList > [!WARNING] > The `Connection.m_WriteList` field is private and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this field in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/s_servicepointtable.md b/docs/framework/additional-apis/s_servicepointtable.md index fafd42d2ef9ce..5e38fe65c24fc 100644 --- a/docs/framework/additional-apis/s_servicepointtable.md +++ b/docs/framework/additional-apis/s_servicepointtable.md @@ -23,7 +23,7 @@ private static Hashtable s_ServicePointTable > [!WARNING] > The `ServicePointManager.s_ServicePointTable` field is private and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this field in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/stdole.stdfont.md b/docs/framework/additional-apis/stdole.stdfont.md index 1439a36c239f8..6df26ed7a55d2 100644 --- a/docs/framework/additional-apis/stdole.stdfont.md +++ b/docs/framework/additional-apis/stdole.stdfont.md @@ -14,7 +14,7 @@ api_type: ```csharp [GuidAttribute("BEF6E003-A874-101A-8BBA-00AA00300CAB")] -public interface StdFont : Font, +public interface StdFont : Font, FontEvents_Event ``` diff --git a/docs/framework/additional-apis/system.net.rtcstate.md b/docs/framework/additional-apis/system.net.rtcstate.md index 786618a93c605..ed357972c4ee1 100644 --- a/docs/framework/additional-apis/system.net.rtcstate.md +++ b/docs/framework/additional-apis/system.net.rtcstate.md @@ -24,7 +24,7 @@ internal class RtcState > [!WARNING] > The `RtcState` class is internal and is not meant to be used directly in your code. -> +> > Microsoft does not support the use of this class in a production application under any circumstance. ## Requirements diff --git a/docs/framework/additional-apis/system.xml.xmlreader.createsqlreader.md b/docs/framework/additional-apis/system.xml.xmlreader.createsqlreader.md index c843c5783bf68..6cd0ce726c2a7 100644 --- a/docs/framework/additional-apis/system.xml.xmlreader.createsqlreader.md +++ b/docs/framework/additional-apis/system.xml.xmlreader.createsqlreader.md @@ -15,7 +15,7 @@ api_type: Creates a new instance using the specified stream, settings, and context information for parsing. ```csharp -internal static XmlReader CreateSqlReader(Stream input, +internal static XmlReader CreateSqlReader(Stream input, XmlReaderSettings settings, XmlParserContext inputContext) ``` diff --git a/docs/framework/additional-apis/xpsdocumentwriter-raise-writingcancelled-method-system-windows-xps.md b/docs/framework/additional-apis/xpsdocumentwriter-raise-writingcancelled-method-system-windows-xps.md index 925c649e7d47c..9a8ebc6ba6e00 100644 --- a/docs/framework/additional-apis/xpsdocumentwriter-raise-writingcancelled-method-system-windows-xps.md +++ b/docs/framework/additional-apis/xpsdocumentwriter-raise-writingcancelled-method-system-windows-xps.md @@ -18,7 +18,7 @@ Raises the event. ## Syntax ```csharp -public void raise__WritingCancelled (object value0, +public void raise__WritingCancelled (object value0, System.Windows.Documents.Serialization.WritingCancelledEventArgs value1); ``` diff --git a/docs/framework/additional-apis/xpsdocumentwriter-raise-writingcompleted-method-system-windows-xps.md b/docs/framework/additional-apis/xpsdocumentwriter-raise-writingcompleted-method-system-windows-xps.md index 3cab806cf7754..fb353ff3ca2d6 100644 --- a/docs/framework/additional-apis/xpsdocumentwriter-raise-writingcompleted-method-system-windows-xps.md +++ b/docs/framework/additional-apis/xpsdocumentwriter-raise-writingcompleted-method-system-windows-xps.md @@ -19,7 +19,7 @@ Raises the event. ## Syntax ```csharp -public void raise__WritingCompleted (object value0, +public void raise__WritingCompleted (object value0, System.Windows.Documents.Serialization.WritingCompletedEventArgs value1); ``` diff --git a/docs/framework/additional-apis/xpsdocumentwriter-raise-writingprintticketrequired-method-system-windows-xps.md b/docs/framework/additional-apis/xpsdocumentwriter-raise-writingprintticketrequired-method-system-windows-xps.md index 58aaa33e2e8c2..5bb2b0fbdf3ef 100644 --- a/docs/framework/additional-apis/xpsdocumentwriter-raise-writingprintticketrequired-method-system-windows-xps.md +++ b/docs/framework/additional-apis/xpsdocumentwriter-raise-writingprintticketrequired-method-system-windows-xps.md @@ -18,7 +18,7 @@ Raises the ev ## Syntax ```csharp -public void raise__WritingProgressChanged (object value0, +public void raise__WritingProgressChanged (object value0, System.Windows.Documents.Serialization.WritingProgressChangedEventArgs value1); ``` diff --git a/docs/framework/additional-apis/xpsdocumentwriter-writingcancelled-event-system-windows-xps.md b/docs/framework/additional-apis/xpsdocumentwriter-writingcancelled-event-system-windows-xps.md index 42fb3e0303589..e258eaf6dc392 100644 --- a/docs/framework/additional-apis/xpsdocumentwriter-writingcancelled-event-system-windows-xps.md +++ b/docs/framework/additional-apis/xpsdocumentwriter-writingcancelled-event-system-windows-xps.md @@ -15,7 +15,7 @@ topic_type: # XpsDocumentWriter.\_WritingCancelled Event -Occurs when a or operation is canceled. +Occurs when a or operation is canceled. ## Syntax diff --git a/docs/framework/additional-apis/xpsdocumentwriter-writingcompleted-event-system-windows-xps.md b/docs/framework/additional-apis/xpsdocumentwriter-writingcompleted-event-system-windows-xps.md index af047a7625599..92cd5ce3617ee 100644 --- a/docs/framework/additional-apis/xpsdocumentwriter-writingcompleted-event-system-windows-xps.md +++ b/docs/framework/additional-apis/xpsdocumentwriter-writingcompleted-event-system-windows-xps.md @@ -15,7 +15,7 @@ topic_type: # XpsDocumentWriter.\_WritingCompleted Event -Occurs when a write operation finishes. +Occurs when a write operation finishes. ## Syntax diff --git a/docs/framework/additional-apis/xpsdocumentwriter-writingprogresschanged-event-system-windows-xps.md b/docs/framework/additional-apis/xpsdocumentwriter-writingprogresschanged-event-system-windows-xps.md index 92ab4e6f95202..38eb35cbe3ca1 100644 --- a/docs/framework/additional-apis/xpsdocumentwriter-writingprogresschanged-event-system-windows-xps.md +++ b/docs/framework/additional-apis/xpsdocumentwriter-writingprogresschanged-event-system-windows-xps.md @@ -15,7 +15,7 @@ topic_type: # XpsDocumentWriter.\_WritingProgressChanged Event -Occurs when the updates its progress. +Occurs when the updates its progress. ## Syntax From 5b7bd8bb6044f1e5e286f23114653a2a04dacaff Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:27:15 -0400 Subject: [PATCH 02/18] fix: MD009 in docs/framework/app-domains --- docs/framework/app-domains/install-assembly-into-gac.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/framework/app-domains/install-assembly-into-gac.md b/docs/framework/app-domains/install-assembly-into-gac.md index 6d26538429191..ea629ad94f8af 100644 --- a/docs/framework/app-domains/install-assembly-into-gac.md +++ b/docs/framework/app-domains/install-assembly-into-gac.md @@ -12,7 +12,7 @@ ms.assetid: a7e6f091-d02c-49ba-b736-7295cb0eb743 --- # How to: Install an assembly into the global assembly cache -The global assembly cache (GAC) stores assemblies that several applications share. Install an assembly into the [global assembly cache](gac.md) with one of the following components: +The global assembly cache (GAC) stores assemblies that several applications share. Install an assembly into the [global assembly cache](gac.md) with one of the following components: - [Windows Installer](#windows-installer) - [Global Assembly Cache tool](#global-assembly-cache-tool) From 7b54b5dfb4ffb3f03f5eafb7bb893f3b5d87e194 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:27:57 -0400 Subject: [PATCH 03/18] fix: MD009 in docs/framework/configure-apps --- .../appsettings-element-for-configuration.md | 2 +- ...semblybinding-element-for-configuration.md | 2 +- .../clear-element-for-configsections.md | 12 ++--- .../file-schema/compiler/compilers-element.md | 6 +-- .../compiler/provideroption-element.md | 4 +- .../compiler/system-codedom-element.md | 6 +-- ...onfigsections-element-for-configuration.md | 6 +-- .../configuration-sections-schema.md | 10 ++-- .../cryptography/cryptoclasses-element.md | 2 +- .../cryptographysettings-element.md | 2 +- .../cryptography/cryptonamemapping-element.md | 2 +- ...orlib-element-for-cryptography-settings.md | 2 +- .../cryptography/oidmap-element.md | 2 +- .../file-schema/custom-element-1.md | 8 ++-- ...-authenticationmodules-network-settings.md | 2 +- ...element-for-bypasslist-network-settings.md | 4 +- ...r-connectionmanagement-network-settings.md | 6 +-- ...-for-webrequestmodules-network-settings.md | 6 +-- ...icationmodules-element-network-settings.md | 2 +- .../bypasslist-element-network-settings.md | 2 +- ...element-for-bypasslist-network-settings.md | 2 +- ...tionmanagement-element-network-settings.md | 2 +- .../module-element-network-settings.md | 4 +- .../network-element-network-settings.md | 6 +-- .../network/proxy-element-network-settings.md | 2 +- ...-authenticationmodules-network-settings.md | 4 +- ...r-connectionmanagement-network-settings.md | 4 +- ...-for-webrequestmodules-network-settings.md | 4 +- .../schemesettings-element-uri-settings.md | 2 +- ...ickupdirectory-element-network-settings.md | 2 +- .../system-net-element-network-settings.md | 2 +- ...requestmodules-element-network-settings.md | 2 +- .../remove-element-for-configsections.md | 4 +- .../runtime/add-element-for-namedcaches.md | 4 +- .../alwaysflowimpersonationpolicy-element.md | 2 +- .../appdomainmanagerassembly-element.md | 4 +- .../runtime/appdomainmanagertype-element.md | 4 +- .../appdomainresourcemonitoring-element.md | 2 +- .../assemblybinding-element-for-runtime.md | 4 +- .../assemblyidentity-element-for-runtime.md | 8 ++-- .../runtime/bindingredirect-element.md | 2 +- .../runtime/compatsortnlsversion-element.md | 2 +- .../runtime/dependentassembly-element.md | 2 +- ...ecounteruniquesharedmemoryreads-element.md | 2 +- .../gcallowverylargeobjects-element.md | 2 +- .../generatepublisherevidence-element.md | 2 +- .../legacyimpersonationpolicy-element.md | 2 +- .../runtime/loadfromremotesources-element.md | 12 ++--- .../memorycache-element-cache-settings.md | 8 ++-- .../namedcaches-element-cache-settings.md | 6 +-- .../runtime/qualifyassembly-element.md | 2 +- .../relativebindforresources-element.md | 2 +- ...-runtime-caching-element-cache-settings.md | 4 +- .../throwunobservedtaskexceptions-element.md | 8 ++-- ...serandomizedstringhashalgorithm-element.md | 2 +- .../file-schema/section-element.md | 8 ++-- .../file-schema/startup/startup-element.md | 2 +- .../startup/supportedruntime-element.md | 4 +- .../add-element-for-listeners-for-source.md | 12 ++--- .../add-element-for-listeners-for-trace.md | 2 +- .../add-element-for-sharedlisteners.md | 12 ++--- .../clear-element-for-listeners-for-source.md | 10 ++-- .../clear-element-for-listeners-for-trace.md | 6 +-- ...lement-for-add-for-listeners-for-source.md | 10 ++-- ...element-for-add-for-listeners-for-trace.md | 8 ++-- ...ter-element-for-add-for-sharedlisteners.md | 6 +-- .../listeners-element-for-source.md | 8 ++-- .../listeners-element-for-trace.md | 14 +++--- ...remove-element-for-listeners-for-source.md | 6 +-- .../trace-debug/sharedlisteners-element.md | 2 +- .../file-schema/trace-debug/source-element.md | 6 +-- .../trace-debug/sources-element.md | 10 ++-- .../trace-debug/switches-element.md | 2 +- .../trace-debug/system-diagnostics-element.md | 2 +- .../file-schema/trace-debug/trace-element.md | 2 +- .../wcf/add-of-baseaddressprefixfilter.md | 2 +- .../add-of-claimtyperequirements-element.md | 1 - .../wcf/baseaddressprefixfilters.md | 2 +- .../file-schema/wcf/commonparameters.md | 2 +- .../wcf/system-runtime-serialization.md | 1 - .../applicationpool-element-web-settings.md | 10 ++-- .../web/system-web-element-web-settings.md | 6 +-- .../certificatereference.md | 2 +- .../certificatevalidator.md | 4 +- .../claimsauthenticationmanager.md | 2 +- .../federationconfiguration.md | 12 ++--- .../windows-identity-foundation/index.md | 36 +++++++-------- .../issuertokenresolver.md | 2 +- .../samlsecuritytokenrequirement.md | 2 +- .../securitytokenhandlerconfiguration.md | 2 +- .../servicetokenresolver.md | 1 - .../sessiontokenrequirement.md | 2 +- .../system-identitymodel-services.md | 12 ++--- .../wsfederation.md | 14 +++--- .../x509securitytokenhandlerrequirement.md | 6 +-- .../activityscheduledqueries.md | 2 +- .../activityscheduledquery.md | 4 +- .../add-of-participants.md | 42 ++++++++--------- ...ehavior-of-servicebehaviors-of-workflow.md | 20 ++++---- .../cancelrequestedqueries.md | 2 +- .../cancelrequestedquery.md | 2 +- .../channelsettings.md | 10 ++-- .../customtrackingqueries.md | 2 +- .../customtrackingquery.md | 2 +- .../etwtracking.md | 40 ++++++++-------- .../factorysettings.md | 10 ++-- .../faultpropagationqueries.md | 4 +- ...ivities-asr-clientactivitybuilder-build.md | 2 +- ...io-activities-asr-clientactivitybuilder.md | 2 +- .../participants.md | 46 +++++++++---------- .../sendmessagechannelcache.md | 12 ++--- .../sqlworkflowinstancestore.md | 10 ++-- .../system-servicemodel-of-workflow.md | 18 ++++---- .../windows-workflow-foundation/tracking.md | 12 ++--- .../trackingprofile.md | 16 +++---- .../windows-workflow-foundation/workflow.md | 16 +++---- .../workflowidle.md | 2 +- .../file-schema/winforms/index.md | 2 +- 118 files changed, 371 insertions(+), 374 deletions(-) diff --git a/docs/framework/configure-apps/file-schema/appsettings/appsettings-element-for-configuration.md b/docs/framework/configure-apps/file-schema/appsettings/appsettings-element-for-configuration.md index 199340de1c2c7..cd0c33c8cb995 100644 --- a/docs/framework/configure-apps/file-schema/appsettings/appsettings-element-for-configuration.md +++ b/docs/framework/configure-apps/file-schema/appsettings/appsettings-element-for-configuration.md @@ -12,7 +12,7 @@ ms.assetid: 39694cc4-6b84-45a6-9329-385a0d8b48fe Contains custom application settings. This is a predefined configuration section provided by the .NET Framework. -[**\**](../configuration-element.md) +[**\**](../configuration-element.md)   **\** ## Syntax diff --git a/docs/framework/configure-apps/file-schema/assemblybinding-element-for-configuration.md b/docs/framework/configure-apps/file-schema/assemblybinding-element-for-configuration.md index d457cc3cfdce7..b42ca8d3a956e 100644 --- a/docs/framework/configure-apps/file-schema/assemblybinding-element-for-configuration.md +++ b/docs/framework/configure-apps/file-schema/assemblybinding-element-for-configuration.md @@ -13,7 +13,7 @@ ms.assetid: 6cc55983-b894-449b-8e26-b258e53939cd Specifies assembly binding policy at the configuration level. -[**\**](configuration-element.md) +[**\**](configuration-element.md)   **\** ## Syntax diff --git a/docs/framework/configure-apps/file-schema/clear-element-for-configsections.md b/docs/framework/configure-apps/file-schema/clear-element-for-configsections.md index 431d2caf26ec7..0944a7c818f95 100644 --- a/docs/framework/configure-apps/file-schema/clear-element-for-configsections.md +++ b/docs/framework/configure-apps/file-schema/clear-element-for-configsections.md @@ -12,8 +12,8 @@ ms.assetid: 77f1d761-ff45-4001-8f36-3a3e5c41fa63 Clears all previously defined sections and section groups. -[**\**](configuration-element.md) -  [**\**](configsections-element-for-configuration.md) +[**\**](configuration-element.md) +  [**\**](configsections-element-for-configuration.md)     **\** ## Syntax @@ -57,8 +57,8 @@ The following machine configuration file code declares two sections, **\ - ``` @@ -73,8 +73,8 @@ The following application configuration file code clears all previously declared
- ``` diff --git a/docs/framework/configure-apps/file-schema/compiler/compilers-element.md b/docs/framework/configure-apps/file-schema/compiler/compilers-element.md index d0f98d9560262..b265ce6e1ad16 100644 --- a/docs/framework/configure-apps/file-schema/compiler/compilers-element.md +++ b/docs/framework/configure-apps/file-schema/compiler/compilers-element.md @@ -60,11 +60,11 @@ Container for compiler configuration elements; contains zero or more [\ - diff --git a/docs/framework/configure-apps/file-schema/compiler/provideroption-element.md b/docs/framework/configure-apps/file-schema/compiler/provideroption-element.md index 595eebafc649b..1d9a10353074c 100644 --- a/docs/framework/configure-apps/file-schema/compiler/provideroption-element.md +++ b/docs/framework/configure-apps/file-schema/compiler/provideroption-element.md @@ -69,8 +69,8 @@ Specifies the compiler version attributes for a language provider. diff --git a/docs/framework/configure-apps/file-schema/compiler/system-codedom-element.md b/docs/framework/configure-apps/file-schema/compiler/system-codedom-element.md index d234aaa712028..a88be499f6dd1 100644 --- a/docs/framework/configure-apps/file-schema/compiler/system-codedom-element.md +++ b/docs/framework/configure-apps/file-schema/compiler/system-codedom-element.md @@ -68,11 +68,11 @@ Specifies compiler configuration settings for available language providers. - diff --git a/docs/framework/configure-apps/file-schema/configsections-element-for-configuration.md b/docs/framework/configure-apps/file-schema/configsections-element-for-configuration.md index 90b984ae67028..b9ef0f63167b1 100644 --- a/docs/framework/configure-apps/file-schema/configsections-element-for-configuration.md +++ b/docs/framework/configure-apps/file-schema/configsections-element-for-configuration.md @@ -12,7 +12,7 @@ ms.assetid: 9f963c1b-dc3f-4220-a8b6-2dd7a5a8e039 Contains configuration section and namespace declarations. -[**\**](configuration-element.md) +[**\**](configuration-element.md)   **\** ## Attributes @@ -48,8 +48,8 @@ The following example shows how to define a configuration section and define set
- ``` diff --git a/docs/framework/configure-apps/file-schema/configuration-sections-schema.md b/docs/framework/configure-apps/file-schema/configuration-sections-schema.md index cc62bf2b20379..e3bcba75d421f 100644 --- a/docs/framework/configure-apps/file-schema/configuration-sections-schema.md +++ b/docs/framework/configure-apps/file-schema/configuration-sections-schema.md @@ -14,11 +14,11 @@ ms.assetid: 6e4cc793-c526-4007-b4e9-37d56295f2cb The configuration sections schema contains elements that define custom settings in configuration files. For general information on configuration files and schemas, see [Configuration file schema for the .NET Framework](index.md). -[**\**](configuration-element.md) -[**\**](configsections-element-for-configuration.md) -[**\**](clear-element-for-configsections.md) -[**\**](remove-element-for-configsections.md) -[**\
**](section-element.md) +[**\**](configuration-element.md) +[**\**](configsections-element-for-configuration.md) +[**\**](clear-element-for-configsections.md) +[**\**](remove-element-for-configsections.md) +[**\
**](section-element.md) [**\**](sectiongroup-element-for-configsections.md) | | Description | diff --git a/docs/framework/configure-apps/file-schema/cryptography/cryptoclasses-element.md b/docs/framework/configure-apps/file-schema/cryptography/cryptoclasses-element.md index 6f03b73ecfcf4..502ba9df8bc48 100644 --- a/docs/framework/configure-apps/file-schema/cryptography/cryptoclasses-element.md +++ b/docs/framework/configure-apps/file-schema/cryptography/cryptoclasses-element.md @@ -21,7 +21,7 @@ Contains a list of cryptography classes that have a mapping to a friendly name i ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/cryptography/cryptographysettings-element.md b/docs/framework/configure-apps/file-schema/cryptography/cryptographysettings-element.md index f57ec396ec699..7aae84e3d45fb 100644 --- a/docs/framework/configure-apps/file-schema/cryptography/cryptographysettings-element.md +++ b/docs/framework/configure-apps/file-schema/cryptography/cryptographysettings-element.md @@ -19,7 +19,7 @@ Contains cryptography settings. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/cryptography/cryptonamemapping-element.md b/docs/framework/configure-apps/file-schema/cryptography/cryptonamemapping-element.md index d315e49f47001..fc89e5d3d551c 100644 --- a/docs/framework/configure-apps/file-schema/cryptography/cryptonamemapping-element.md +++ b/docs/framework/configure-apps/file-schema/cryptography/cryptonamemapping-element.md @@ -20,7 +20,7 @@ Contains mappings of classes to friendly names. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/cryptography/mscorlib-element-for-cryptography-settings.md b/docs/framework/configure-apps/file-schema/cryptography/mscorlib-element-for-cryptography-settings.md index 8f01c62db3277..5b6e239156201 100644 --- a/docs/framework/configure-apps/file-schema/cryptography/mscorlib-element-for-cryptography-settings.md +++ b/docs/framework/configure-apps/file-schema/cryptography/mscorlib-element-for-cryptography-settings.md @@ -18,7 +18,7 @@ Contains the [\ element](cryptographysettings-element.md). ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/cryptography/oidmap-element.md b/docs/framework/configure-apps/file-schema/cryptography/oidmap-element.md index f579e8c3535d7..d243290dfd090 100644 --- a/docs/framework/configure-apps/file-schema/cryptography/oidmap-element.md +++ b/docs/framework/configure-apps/file-schema/cryptography/oidmap-element.md @@ -20,7 +20,7 @@ Contains ASN.1 object identifier (OID) mappings to classes. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/custom-element-1.md b/docs/framework/configure-apps/file-schema/custom-element-1.md index 33640f78c4f0e..ec9c1e5946d2f 100644 --- a/docs/framework/configure-apps/file-schema/custom-element-1.md +++ b/docs/framework/configure-apps/file-schema/custom-element-1.md @@ -11,7 +11,7 @@ ms.assetid: e62056c6-b351-40eb-afc0-cc13fc44e45e Defines settings in a custom configuration section that is defined by a \
element and uses the class. -[**\**](configuration-element.md) +[**\**](configuration-element.md)   *\* ## Syntax @@ -45,11 +45,11 @@ The following example declares a custom element called **\** that ```xml -
- ``` diff --git a/docs/framework/configure-apps/file-schema/network/add-element-for-authenticationmodules-network-settings.md b/docs/framework/configure-apps/file-schema/network/add-element-for-authenticationmodules-network-settings.md index 390fec916ba17..5d2c54c7ab145 100644 --- a/docs/framework/configure-apps/file-schema/network/add-element-for-authenticationmodules-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/add-element-for-authenticationmodules-network-settings.md @@ -23,7 +23,7 @@ Adds an authentication module to the application. ```xml ``` diff --git a/docs/framework/configure-apps/file-schema/network/add-element-for-bypasslist-network-settings.md b/docs/framework/configure-apps/file-schema/network/add-element-for-bypasslist-network-settings.md index ce52bf9e89a07..7cdd059e58047 100644 --- a/docs/framework/configure-apps/file-schema/network/add-element-for-bypasslist-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/add-element-for-bypasslist-network-settings.md @@ -23,8 +23,8 @@ Adds an IP address or DNS name to the proxy bypass list. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/network/add-element-for-connectionmanagement-network-settings.md b/docs/framework/configure-apps/file-schema/network/add-element-for-connectionmanagement-network-settings.md index e47c9dfd5f45f..d6a7f67b6d481 100644 --- a/docs/framework/configure-apps/file-schema/network/add-element-for-connectionmanagement-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/add-element-for-connectionmanagement-network-settings.md @@ -22,9 +22,9 @@ Adds an IP address or DNS name to the connection management list. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/network/add-element-for-webrequestmodules-network-settings.md b/docs/framework/configure-apps/file-schema/network/add-element-for-webrequestmodules-network-settings.md index 9839234839a7d..c19e0a121e2b5 100644 --- a/docs/framework/configure-apps/file-schema/network/add-element-for-webrequestmodules-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/add-element-for-webrequestmodules-network-settings.md @@ -22,9 +22,9 @@ Adds a custom Web request module to the application. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/network/authenticationmodules-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/authenticationmodules-element-network-settings.md index e53d1140a9c26..06299c059ac49 100644 --- a/docs/framework/configure-apps/file-schema/network/authenticationmodules-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/authenticationmodules-element-network-settings.md @@ -19,7 +19,7 @@ Specifies modules used to authenticate network requests. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/network/bypasslist-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/bypasslist-element-network-settings.md index 7a3f4b3bfd43a..151cf353572b4 100644 --- a/docs/framework/configure-apps/file-schema/network/bypasslist-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/bypasslist-element-network-settings.md @@ -20,7 +20,7 @@ Provides a set of regular expressions that describe addresses that do not use a ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/network/clear-element-for-bypasslist-network-settings.md b/docs/framework/configure-apps/file-schema/network/clear-element-for-bypasslist-network-settings.md index 014ce893ccf10..4cb50c0367f94 100644 --- a/docs/framework/configure-apps/file-schema/network/clear-element-for-bypasslist-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/clear-element-for-bypasslist-network-settings.md @@ -61,7 +61,7 @@ Clears the proxy bypass list. - + ``` ## See also diff --git a/docs/framework/configure-apps/file-schema/network/connectionmanagement-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/connectionmanagement-element-network-settings.md index a994bc0b4fc57..901697141a97e 100644 --- a/docs/framework/configure-apps/file-schema/network/connectionmanagement-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/connectionmanagement-element-network-settings.md @@ -19,7 +19,7 @@ Specifies the maximum number of connections to a network host. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/network/module-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/module-element-network-settings.md index 39c8068ea06a3..bddfcd74a49c6 100644 --- a/docs/framework/configure-apps/file-schema/network/module-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/module-element-network-settings.md @@ -20,8 +20,8 @@ Adds a new proxy module to the application. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/network/network-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/network-element-network-settings.md index ee3286a186f0b..9a70690e3816e 100644 --- a/docs/framework/configure-apps/file-schema/network/network-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/network-element-network-settings.md @@ -22,12 +22,12 @@ Configures the network options for an external Simple Mail Transport Protocol (S ```xml 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 a76ae8b030a4b..955a892e4e6f2 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 @@ -21,7 +21,7 @@ Defines a proxy server. ```xml ``` diff --git a/docs/framework/configure-apps/file-schema/network/remove-element-for-connectionmanagement-network-settings.md b/docs/framework/configure-apps/file-schema/network/remove-element-for-connectionmanagement-network-settings.md index 497f3795ab893..5d4c66736a9c0 100644 --- a/docs/framework/configure-apps/file-schema/network/remove-element-for-connectionmanagement-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/remove-element-for-connectionmanagement-network-settings.md @@ -22,8 +22,8 @@ Removes an IP address or DNS name from the connection management list. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/network/remove-element-for-webrequestmodules-network-settings.md b/docs/framework/configure-apps/file-schema/network/remove-element-for-webrequestmodules-network-settings.md index deee60df8e021..567f03de06a27 100644 --- a/docs/framework/configure-apps/file-schema/network/remove-element-for-webrequestmodules-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/remove-element-for-webrequestmodules-network-settings.md @@ -22,8 +22,8 @@ Removes a custom Web request module from the application. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/network/schemesettings-element-uri-settings.md b/docs/framework/configure-apps/file-schema/network/schemesettings-element-uri-settings.md index 7b1a9b5cc94cc..b37492fae17a5 100644 --- a/docs/framework/configure-apps/file-schema/network/schemesettings-element-uri-settings.md +++ b/docs/framework/configure-apps/file-schema/network/schemesettings-element-uri-settings.md @@ -13,7 +13,7 @@ Specifies how a will be parsed for specific schemes. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/network/specifiedpickupdirectory-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/specifiedpickupdirectory-element-network-settings.md index 7fa036f34ddf8..ac4521873f8fb 100644 --- a/docs/framework/configure-apps/file-schema/network/specifiedpickupdirectory-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/specifiedpickupdirectory-element-network-settings.md @@ -22,7 +22,7 @@ Configures the local directory for a Simple Mail Transport Protocol (SMTP) serve ```xml ``` diff --git a/docs/framework/configure-apps/file-schema/network/system-net-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/system-net-element-network-settings.md index 25b99ed1d4edd..5463eb0d18d35 100644 --- a/docs/framework/configure-apps/file-schema/network/system-net-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/system-net-element-network-settings.md @@ -18,7 +18,7 @@ Contains settings that specify how the .NET Framework connects to the network. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/network/webrequestmodules-element-network-settings.md b/docs/framework/configure-apps/file-schema/network/webrequestmodules-element-network-settings.md index 539b6cf5324ca..d56aa2f230e98 100644 --- a/docs/framework/configure-apps/file-schema/network/webrequestmodules-element-network-settings.md +++ b/docs/framework/configure-apps/file-schema/network/webrequestmodules-element-network-settings.md @@ -19,7 +19,7 @@ Specifies modules to use to request information from network hosts. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/remove-element-for-configsections.md b/docs/framework/configure-apps/file-schema/remove-element-for-configsections.md index 586c36f746cc3..6f676608826c4 100644 --- a/docs/framework/configure-apps/file-schema/remove-element-for-configsections.md +++ b/docs/framework/configure-apps/file-schema/remove-element-for-configsections.md @@ -55,8 +55,8 @@ The following machine configuration file code declares the section **\ - ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/add-element-for-namedcaches.md b/docs/framework/configure-apps/file-schema/runtime/add-element-for-namedcaches.md index d3908db2b8255..0e8644750fbea 100644 --- a/docs/framework/configure-apps/file-schema/runtime/add-element-for-namedcaches.md +++ b/docs/framework/configure-apps/file-schema/runtime/add-element-for-namedcaches.md @@ -60,8 +60,8 @@ Adds a `namedCache` entry to the `namedCaches` collection for a memory cache. - diff --git a/docs/framework/configure-apps/file-schema/runtime/alwaysflowimpersonationpolicy-element.md b/docs/framework/configure-apps/file-schema/runtime/alwaysflowimpersonationpolicy-element.md index fbcd59cfc2998..91ee4d6dd1caa 100644 --- a/docs/framework/configure-apps/file-schema/runtime/alwaysflowimpersonationpolicy-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/alwaysflowimpersonationpolicy-element.md @@ -19,7 +19,7 @@ Specifies that the Windows identity always flows across asynchronous points, reg ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element.md b/docs/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element.md index fecd64e1e16a8..372d8daec9b14 100644 --- a/docs/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element.md @@ -16,7 +16,7 @@ Specifies the assembly that provides the application domain manager for the defa ## Syntax ```xml - ``` @@ -59,7 +59,7 @@ Specifies the assembly that provides the application domain manager for the defa - diff --git a/docs/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element.md b/docs/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element.md index c9df237bef035..7589b5c0cc0fc 100644 --- a/docs/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element.md @@ -16,7 +16,7 @@ Specifies the type that serves as the application domain manager for the default ## Syntax ```xml - ``` @@ -59,7 +59,7 @@ Specifies the type that serves as the application domain manager for the default - diff --git a/docs/framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md b/docs/framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md index 49551cecae816..e81b009250d44 100644 --- a/docs/framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md @@ -16,7 +16,7 @@ Instructs the runtime to collect statistics on all application domains in the pr ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/assemblybinding-element-for-runtime.md b/docs/framework/configure-apps/file-schema/runtime/assemblybinding-element-for-runtime.md index 01a8f65671cab..48f8f27bc2dfb 100644 --- a/docs/framework/configure-apps/file-schema/runtime/assemblybinding-element-for-runtime.md +++ b/docs/framework/configure-apps/file-schema/runtime/assemblybinding-element-for-runtime.md @@ -19,7 +19,7 @@ Contains information about assembly version redirection and the locations of ass ## Syntax ```xml - ``` @@ -76,7 +76,7 @@ Contains information about assembly version redirection and the locations of ass ```xml - + diff --git a/docs/framework/configure-apps/file-schema/runtime/assemblyidentity-element-for-runtime.md b/docs/framework/configure-apps/file-schema/runtime/assemblyidentity-element-for-runtime.md index 4d77b94fda4d7..6e0870888860a 100644 --- a/docs/framework/configure-apps/file-schema/runtime/assemblyidentity-element-for-runtime.md +++ b/docs/framework/configure-apps/file-schema/runtime/assemblyidentity-element-for-runtime.md @@ -22,7 +22,7 @@ Contains identifying information about the assembly. ## Syntax ```xml - @@ -77,15 +77,15 @@ culture="assembly culture"/> publicKeyToken="14a739be0244c389" culture="neutral" processorArchitecture="x86" /> - - diff --git a/docs/framework/configure-apps/file-schema/runtime/bindingredirect-element.md b/docs/framework/configure-apps/file-schema/runtime/bindingredirect-element.md index 9f2841e7b8e3f..b5d219bb5e42f 100644 --- a/docs/framework/configure-apps/file-schema/runtime/bindingredirect-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/bindingredirect-element.md @@ -22,7 +22,7 @@ Redirects one assembly version to another. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element.md b/docs/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element.md index 28d84508db319..6606f48bf997e 100644 --- a/docs/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element.md @@ -19,7 +19,7 @@ Specifies that the runtime should use legacy sort orders when performing string ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/dependentassembly-element.md b/docs/framework/configure-apps/file-schema/runtime/dependentassembly-element.md index f383f9303b462..dbd40a452caea 100644 --- a/docs/framework/configure-apps/file-schema/runtime/dependentassembly-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/dependentassembly-element.md @@ -21,7 +21,7 @@ Encapsulates binding policy and assembly location for each assembly. Use one `de ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/forceperformancecounteruniquesharedmemoryreads-element.md b/docs/framework/configure-apps/file-schema/runtime/forceperformancecounteruniquesharedmemoryreads-element.md index 39a5aadce21e2..6df2357aafb50 100644 --- a/docs/framework/configure-apps/file-schema/runtime/forceperformancecounteruniquesharedmemoryreads-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/forceperformancecounteruniquesharedmemoryreads-element.md @@ -16,7 +16,7 @@ Specifies whether PerfCounter.dll uses the CategoryOptions registry setting in a ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md b/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md index 0da194a6eb8ca..ef10b95403b05 100644 --- a/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md @@ -16,7 +16,7 @@ On 64-bit platforms, enables arrays that are greater than 2 gigabytes (GB) in to ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/generatepublisherevidence-element.md b/docs/framework/configure-apps/file-schema/runtime/generatepublisherevidence-element.md index b4b0ee1482e83..83be5961cde8d 100644 --- a/docs/framework/configure-apps/file-schema/runtime/generatepublisherevidence-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/generatepublisherevidence-element.md @@ -16,7 +16,7 @@ Specifies whether the runtime creates ev ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/legacyimpersonationpolicy-element.md b/docs/framework/configure-apps/file-schema/runtime/legacyimpersonationpolicy-element.md index 369c99803f86e..fc0ac91018021 100644 --- a/docs/framework/configure-apps/file-schema/runtime/legacyimpersonationpolicy-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/legacyimpersonationpolicy-element.md @@ -19,7 +19,7 @@ Specifies that the Windows identity does not flow across asynchronous points, re ## Syntax ```xml - ``` 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 3acbe6e47e983..e26e1057e6155 100644 --- a/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/loadfromremotesources-element.md @@ -19,7 +19,7 @@ Specifies whether assemblies loaded from remote sources should be granted full t ## Syntax ```xml - ``` @@ -56,12 +56,12 @@ In the .NET Framework 3.5 and earlier versions, if you load an assembly from a r Starting with the .NET Framework 4, code access security (CAS) policy is disabled and assemblies are loaded in full trust. Ordinarily, this would grant full trust to assemblies loaded with the method that previously had been sandboxed. To prevent this, the ability to run code in assemblies loaded from a remote source is disabled by default. By default, if you attempt to load a remote assembly, a with an exception message like the following is thrown: ```text -System.IO.FileNotFoundException: Could not load file or assembly 'file:assem.dll' or one of its dependencies. Operation is not supported. +System.IO.FileNotFoundException: Could not load file or assembly 'file:assem.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) -File name: 'file:assem.dll' ---> -System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly -to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, -so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. +File name: 'file:assem.dll' ---> +System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly +to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, +so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. ``` To load the assembly and execute its code, you must either: diff --git a/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md b/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md index 2fb569e07b21c..61b089acec835 100644 --- a/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md +++ b/docs/framework/configure-apps/file-schema/runtime/memorycache-element-cache-settings.md @@ -17,10 +17,10 @@ Defines an element that is used to configure a cache that is based on the + - + ``` @@ -75,8 +75,8 @@ Defines an element that is used to configure a cache that is based on the - diff --git a/docs/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings.md b/docs/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings.md index d68e2c00f250e..cec2374b12f18 100644 --- a/docs/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings.md +++ b/docs/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings.md @@ -19,7 +19,7 @@ Specifies a collection of configuration settings for the named - + ``` @@ -72,8 +72,8 @@ Specifies a collection of configuration settings for the named - diff --git a/docs/framework/configure-apps/file-schema/runtime/qualifyassembly-element.md b/docs/framework/configure-apps/file-schema/runtime/qualifyassembly-element.md index 7d365954ba73a..22d250b49387f 100644 --- a/docs/framework/configure-apps/file-schema/runtime/qualifyassembly-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/qualifyassembly-element.md @@ -59,7 +59,7 @@ Specifies the full name of the assembly that should be dynamically loaded when a - diff --git a/docs/framework/configure-apps/file-schema/runtime/relativebindforresources-element.md b/docs/framework/configure-apps/file-schema/runtime/relativebindforresources-element.md index 7d4ae48139d7b..f812e86940364 100644 --- a/docs/framework/configure-apps/file-schema/runtime/relativebindforresources-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/relativebindforresources-element.md @@ -16,7 +16,7 @@ Optimizes the probe for satellite assemblies. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/system-runtime-caching-element-cache-settings.md b/docs/framework/configure-apps/file-schema/runtime/system-runtime-caching-element-cache-settings.md index 0077aebe40de5..786c4053c3cab 100644 --- a/docs/framework/configure-apps/file-schema/runtime/system-runtime-caching-element-cache-settings.md +++ b/docs/framework/configure-apps/file-schema/runtime/system-runtime-caching-element-cache-settings.md @@ -60,8 +60,8 @@ The `cacheMemoryLimitMegabytes` attribute and the `physicalMemoryPercentage` att - diff --git a/docs/framework/configure-apps/file-schema/runtime/throwunobservedtaskexceptions-element.md b/docs/framework/configure-apps/file-schema/runtime/throwunobservedtaskexceptions-element.md index bc30934243b14..0e88ec2e37451 100644 --- a/docs/framework/configure-apps/file-schema/runtime/throwunobservedtaskexceptions-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/throwunobservedtaskexceptions-element.md @@ -69,10 +69,10 @@ Specifies whether unhandled task exceptions should terminate a running process. The following example shows how to enable the throwing of exceptions in tasks by using an application configuration file. ```xml - - - - + + + + ``` diff --git a/docs/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element.md b/docs/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element.md index 43020b1975af8..3c172533f6bc1 100644 --- a/docs/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element.md @@ -19,7 +19,7 @@ Determines whether the common language runtime calculates hash codes for strings ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/section-element.md b/docs/framework/configure-apps/file-schema/section-element.md index 2c5e8eaa1ed1e..23ee44ae2df0a 100644 --- a/docs/framework/configure-apps/file-schema/section-element.md +++ b/docs/framework/configure-apps/file-schema/section-element.md @@ -27,7 +27,7 @@ Contains a configuration section declaration. ```xml
``` @@ -75,11 +75,11 @@ The following example shows how to define a configuration section and define set
- ``` 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 d5003a98ed690..24662cbd7460f 100644 --- a/docs/framework/configure-apps/file-schema/startup/startup-element.md +++ b/docs/framework/configure-apps/file-schema/startup/startup-element.md @@ -20,7 +20,7 @@ Specifies common language runtime startup information. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/startup/supportedruntime-element.md b/docs/framework/configure-apps/file-schema/startup/supportedruntime-element.md index 56ae4786a1fd3..0db20b6e7d7ba 100644 --- a/docs/framework/configure-apps/file-schema/startup/supportedruntime-element.md +++ b/docs/framework/configure-apps/file-schema/startup/supportedruntime-element.md @@ -40,7 +40,7 @@ The **\** element should be used by all applications built usi > [!NOTE] > If you use the [CorBindToRuntimeByCfg](../../../unmanaged-api/hosting/corbindtoruntimebycfg-function.md) function to specify the configuration file, you must use the `` element for all versions of the runtime. The `` element is ignored when you use [CorBindToRuntimeByCfg](../../../unmanaged-api/hosting/corbindtoruntimebycfg-function.md). -For apps that support versions of the runtime from the .NET Framework 1.1 through 3.5, when multiple versions of the runtime are supported, the first element should specify the most preferred version of the runtime, and the last element should specify the least preferred version. For apps that support the .NET Framework 4.0 or later versions, the `version` attribute indicates the CLR version, which is common to the .NET Framework 4 and later versions, and the `sku` attribute indicates the single .NET Framework version that the app targets. +For apps that support versions of the runtime from the .NET Framework 1.1 through 3.5, when multiple versions of the runtime are supported, the first element should specify the most preferred version of the runtime, and the last element should specify the least preferred version. For apps that support the .NET Framework 4.0 or later versions, the `version` attribute indicates the CLR version, which is common to the .NET Framework 4 and later versions, and the `sku` attribute indicates the single .NET Framework version that the app targets. If the **\** element with the `sku` attribute is present in the configuration file and the installed .NET Framework version is lower then the specified supported version, the application fails to run and instead displays a message asking to install the supported version. Otherwise, the application attempts to run on any installed version, but it may behave unexpectedly if it is not fully compatible with that version. (For compatibility differences between versions of .NET Framework, see [Application compatibility in the .NET Framework](https://docs.microsoft.com/dotnet/framework/migration-guide/application-compatibility).) Therefore, we recommend that you include this element in the application configuration file for easier error diagnostics. (The configuration file automatically generated by Visual Studio when creating a new project already contains it.) @@ -49,7 +49,7 @@ If the **\** element with the `sku` attribute is present in th We recommend that you test applications with all the .NET Framework versions that they can run on. - + ## "runtime version" values The `runtime` attribute specifies the Common Language Runtime (CLR) version that is required for a given application. Note that all .NET Framework v4.x versions specify the `v4.0` CLR. The following table lists valid values for the *runtime version* value of the `version` attribute. diff --git a/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-listeners-for-source.md b/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-listeners-for-source.md index 9aafab3357adf..39fcef0899d12 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-listeners-for-source.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-listeners-for-source.md @@ -22,7 +22,7 @@ Adds a listener to the `Listeners` collection for a trace source. ## Syntax ```xml - ``` @@ -90,10 +90,10 @@ Adds a listener to the `Listeners` collection for a trace source. - - @@ -101,15 +101,15 @@ Adds a listener to the `Listeners` collection for a trace source. - - + ``` ## See also diff --git a/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-listeners-for-trace.md b/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-listeners-for-trace.md index b1d3eb783c870..6a8ed930b2f4e 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-listeners-for-trace.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-listeners-for-trace.md @@ -21,7 +21,7 @@ Adds a listener to the **Listeners** collection. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-sharedlisteners.md b/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-sharedlisteners.md index f49c8816cb1af..906434383c1e2 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-sharedlisteners.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-sharedlisteners.md @@ -20,7 +20,7 @@ Adds a listener to the `sharedListeners` collection. `sharedListeners` is a coll ## Syntax ```xml - - - @@ -91,15 +91,15 @@ Adds a listener to the `sharedListeners` collection. `sharedListeners` is a coll - - + ``` ## See also diff --git a/docs/framework/configure-apps/file-schema/trace-debug/clear-element-for-listeners-for-source.md b/docs/framework/configure-apps/file-schema/trace-debug/clear-element-for-listeners-for-source.md index b129d4665794e..b30092d85b260 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/clear-element-for-listeners-for-source.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/clear-element-for-listeners-for-source.md @@ -56,26 +56,26 @@ Clears the `Listeners` collection for a trace source. - - - - + ``` ## See also diff --git a/docs/framework/configure-apps/file-schema/trace-debug/clear-element-for-listeners-for-trace.md b/docs/framework/configure-apps/file-schema/trace-debug/clear-element-for-listeners-for-trace.md index 3fbd6cbc3ec9f..df2ab210d5a6e 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/clear-element-for-listeners-for-trace.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/clear-element-for-listeners-for-trace.md @@ -60,15 +60,15 @@ Clears the `Listeners` collection for trace. - - - + ``` ## See also diff --git a/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-listeners-for-source.md b/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-listeners-for-source.md index 39890c7b67f18..b6c637026f0f6 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-listeners-for-source.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-listeners-for-source.md @@ -24,8 +24,8 @@ Adds a filter to a listener in the `Listeners` collection for a trace source. ## Syntax ```xml - ``` @@ -65,12 +65,12 @@ Adds a filter to a listener in the `Listeners` collection for a trace source. - - - diff --git a/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-listeners-for-trace.md b/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-listeners-for-trace.md index 7c6e01b490adc..3206a046fed3e 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-listeners-for-trace.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-listeners-for-trace.md @@ -22,8 +22,8 @@ Adds a filter to a listener in the `Listeners` collection for a trace. ## Syntax ```xml - ``` @@ -63,9 +63,9 @@ Adds a filter to a listener in the `Listeners` collection for a trace. - - diff --git a/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-sharedlisteners.md b/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-sharedlisteners.md index 8d9eb5c261e21..bcbe0f08433c4 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-sharedlisteners.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/filter-element-for-add-for-sharedlisteners.md @@ -23,7 +23,7 @@ Adds a filter to a listener in the `sharedListeners` collection. ## Syntax ```xml - ``` @@ -69,9 +69,9 @@ Adds a filter to a listener in the `sharedListeners` collection. - - diff --git a/docs/framework/configure-apps/file-schema/trace-debug/listeners-element-for-source.md b/docs/framework/configure-apps/file-schema/trace-debug/listeners-element-for-source.md index b85c6b9b7b552..3a24f6af87360 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/listeners-element-for-source.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/listeners-element-for-source.md @@ -20,7 +20,7 @@ Adds or removes listeners in the + ... @@ -62,12 +62,12 @@ Adds or removes listeners in the - - - diff --git a/docs/framework/configure-apps/file-schema/trace-debug/listeners-element-for-trace.md b/docs/framework/configure-apps/file-schema/trace-debug/listeners-element-for-trace.md index c12dab80f756d..1bae841f2c74b 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/listeners-element-for-trace.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/listeners-element-for-trace.md @@ -19,7 +19,7 @@ Specifies a listener that collects, stores, and routes messages. Listeners direc ## Syntax ```xml - + ... @@ -62,14 +62,14 @@ Specifies a listener that collects, stores, and routes messages. Listeners direc - diff --git a/docs/framework/configure-apps/file-schema/trace-debug/remove-element-for-listeners-for-source.md b/docs/framework/configure-apps/file-schema/trace-debug/remove-element-for-listeners-for-source.md index de2b163d9e789..e435708dd69ef 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/remove-element-for-listeners-for-source.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/remove-element-for-listeners-for-source.md @@ -60,17 +60,17 @@ Removes a listener from the `Listeners` collection for a trace source. - - - + ``` ## See also diff --git a/docs/framework/configure-apps/file-schema/trace-debug/sharedlisteners-element.md b/docs/framework/configure-apps/file-schema/trace-debug/sharedlisteners-element.md index 5b72d522b96ad..255edca19842e 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/sharedlisteners-element.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/sharedlisteners-element.md @@ -22,7 +22,7 @@ Contains listeners that any source or trace element can reference. These listen ## Syntax ```xml - + ... ``` diff --git a/docs/framework/configure-apps/file-schema/trace-debug/source-element.md b/docs/framework/configure-apps/file-schema/trace-debug/source-element.md index 9f4eeaae84125..8cc082025f7d3 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/source-element.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/source-element.md @@ -19,7 +19,7 @@ Specifies a trace source that initiates tracing messages. ## Syntax ```xml - + ... ``` @@ -71,8 +71,8 @@ Specifies a trace source that initiates tracing messages. - - + + ``` diff --git a/docs/framework/configure-apps/file-schema/trace-debug/sources-element.md b/docs/framework/configure-apps/file-schema/trace-debug/sources-element.md index 19b891a8ef376..985d62be17a4f 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/sources-element.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/sources-element.md @@ -54,12 +54,12 @@ Specifies trace sources that initiate tracing messages. - - - @@ -68,8 +68,8 @@ Specifies trace sources that initiate tracing messages. - - + + ``` diff --git a/docs/framework/configure-apps/file-schema/trace-debug/switches-element.md b/docs/framework/configure-apps/file-schema/trace-debug/switches-element.md index e441b5da389bd..0af7b53fe2591 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/switches-element.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/switches-element.md @@ -20,7 +20,7 @@ Contains trace switches and the level where the trace switches are set. ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/trace-debug/system-diagnostics-element.md b/docs/framework/configure-apps/file-schema/trace-debug/system-diagnostics-element.md index 6a16adf009f37..801cdf38059ef 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/system-diagnostics-element.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/system-diagnostics-element.md @@ -18,7 +18,7 @@ Specifies trace listeners that collect, store, and route messages and the level ## Syntax ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/trace-debug/trace-element.md b/docs/framework/configure-apps/file-schema/trace-debug/trace-element.md index 627f84f3a4ddb..12a8a160adb22 100644 --- a/docs/framework/configure-apps/file-schema/trace-debug/trace-element.md +++ b/docs/framework/configure-apps/file-schema/trace-debug/trace-element.md @@ -21,7 +21,7 @@ Contains listeners that collect, store, and route tracing messages. ## Syntax ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/wcf/add-of-baseaddressprefixfilter.md b/docs/framework/configure-apps/file-schema/wcf/add-of-baseaddressprefixfilter.md index 63243f87d6b58..78f1b24a44faf 100644 --- a/docs/framework/configure-apps/file-schema/wcf/add-of-baseaddressprefixfilter.md +++ b/docs/framework/configure-apps/file-schema/wcf/add-of-baseaddressprefixfilter.md @@ -49,7 +49,7 @@ Represents a configuration element that specifies a pass-through filter, which p For example, your site can contain the following base addresses: -``` +``` http://testl.fabrikam.com/Service.svc http://test2.fabrikam.com/Service.svc ``` diff --git a/docs/framework/configure-apps/file-schema/wcf/add-of-claimtyperequirements-element.md b/docs/framework/configure-apps/file-schema/wcf/add-of-claimtyperequirements-element.md index 794b3890facb2..26ddfe0dbe131 100644 --- a/docs/framework/configure-apps/file-schema/wcf/add-of-claimtyperequirements-element.md +++ b/docs/framework/configure-apps/file-schema/wcf/add-of-claimtyperequirements-element.md @@ -75,4 +75,3 @@ Specifies the types of required and optional claims expected to appear in the fe - - - - \ No newline at end of file diff --git a/docs/framework/configure-apps/file-schema/wcf/baseaddressprefixfilters.md b/docs/framework/configure-apps/file-schema/wcf/baseaddressprefixfilters.md index 8439336662532..dfee769ec7bc3 100644 --- a/docs/framework/configure-apps/file-schema/wcf/baseaddressprefixfilters.md +++ b/docs/framework/configure-apps/file-schema/wcf/baseaddressprefixfilters.md @@ -51,7 +51,7 @@ Represents a collection of configuration elements that specify pass through filt For example, your site can contain the following base addresses: -``` +``` http://testl.fabrikam.com/Service.svc http://test2.fabrikam.com/Service.svc ``` diff --git a/docs/framework/configure-apps/file-schema/wcf/commonparameters.md b/docs/framework/configure-apps/file-schema/wcf/commonparameters.md index 972a261b6d40a..f27365c04692a 100644 --- a/docs/framework/configure-apps/file-schema/wcf/commonparameters.md +++ b/docs/framework/configure-apps/file-schema/wcf/commonparameters.md @@ -51,7 +51,7 @@ Represents a collection of parameters that are used globally across multiple ser ```xml ``` diff --git a/docs/framework/configure-apps/file-schema/wcf/system-runtime-serialization.md b/docs/framework/configure-apps/file-schema/wcf/system-runtime-serialization.md index e1a8e96c2bf1d..54c88e883f986 100644 --- a/docs/framework/configure-apps/file-schema/wcf/system-runtime-serialization.md +++ b/docs/framework/configure-apps/file-schema/wcf/system-runtime-serialization.md @@ -51,4 +51,3 @@ Represents the root element for the namespac - - [Using Data Contracts](../../../wcf/feature-details/using-data-contracts.md) - [Data Contract Known Types](../../../wcf/feature-details/data-contract-known-types.md) - \ No newline at end of file diff --git a/docs/framework/configure-apps/file-schema/web/applicationpool-element-web-settings.md b/docs/framework/configure-apps/file-schema/web/applicationpool-element-web-settings.md index 4251142a83039..e6c71bb9f96c1 100644 --- a/docs/framework/configure-apps/file-schema/web/applicationpool-element-web-settings.md +++ b/docs/framework/configure-apps/file-schema/web/applicationpool-element-web-settings.md @@ -19,9 +19,9 @@ Specifies configuration settings that are used by ASP.NET to manage process-wide ## Syntax ```xml - ``` @@ -74,9 +74,9 @@ The values in the example are the default values. ```xml - diff --git a/docs/framework/configure-apps/file-schema/web/system-web-element-web-settings.md b/docs/framework/configure-apps/file-schema/web/system-web-element-web-settings.md index 394f81d422b1e..106c35c79c171 100644 --- a/docs/framework/configure-apps/file-schema/web/system-web-element-web-settings.md +++ b/docs/framework/configure-apps/file-schema/web/system-web-element-web-settings.md @@ -53,9 +53,9 @@ The following example shows how to configure ASP.NET process-wide behavior in th ```xml - diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/certificatereference.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/certificatereference.md index a086ec03cae26..22cccf55d045a 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/certificatereference.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/certificatereference.md @@ -19,7 +19,7 @@ Specifies settings that are used to find and validate an X.509 certificate in a - - - + + ``` diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/claimsauthenticationmanager.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/claimsauthenticationmanager.md index b3fc81b361867..ea98de76602dc 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/claimsauthenticationmanager.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/claimsauthenticationmanager.md @@ -52,7 +52,7 @@ Registers a claims authentication manager for the incoming claims. ```xml - + ``` diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/federationconfiguration.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/federationconfiguration.md index a3bc179fcb17a..fb5f17c70cb3e 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/federationconfiguration.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/federationconfiguration.md @@ -74,12 +74,12 @@ Configures the - diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/index.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/index.md index 90442a857045c..ace9c6cf437c2 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/index.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/index.md @@ -17,23 +17,23 @@ The topics in this section provide information about the Windows Identity Founda - + - + - + - + - + - + - + - + @@ -41,9 +41,9 @@ The topics in this section provide information about the Windows Identity Founda the following or a custom element --> - + - + @@ -56,16 +56,16 @@ The topics in this section provide information about the Windows Identity Founda - + - + - + - + @@ -92,11 +92,11 @@ The topics in this section provide information about the Windows Identity Founda - + - + diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/issuertokenresolver.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/issuertokenresolver.md index 6eb1ac0f822ce..7807a314d2985 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/issuertokenresolver.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/issuertokenresolver.md @@ -80,7 +80,7 @@ public override void LoadCustomConfiguration(System.Xml.XmlNodeList nodelist) this.AddAudienceKeyPair(audience, symmetricKey); } } -``` +``` ## See also diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/samlsecuritytokenrequirement.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/samlsecuritytokenrequirement.md index 0f0ce6dea181d..6d09866a199ef 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/samlsecuritytokenrequirement.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/samlsecuritytokenrequirement.md @@ -21,7 +21,7 @@ Provides configuration for the - - + diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/servicetokenresolver.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/servicetokenresolver.md index 23f9ec39b56d7..b300f5e41923b 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/servicetokenresolver.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/servicetokenresolver.md @@ -60,4 +60,3 @@ Registers the service token resolver that is used by handlers in the token handl ```xml ``` - \ No newline at end of file diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/sessiontokenrequirement.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/sessiontokenrequirement.md index 05a295f9426a8..a8224003096af 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/sessiontokenrequirement.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/sessiontokenrequirement.md @@ -50,7 +50,7 @@ Provides configuration for the + ``` diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/system-identitymodel-services.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/system-identitymodel-services.md index 0623feaa5470d..e288b969caf3f 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/system-identitymodel-services.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/system-identitymodel-services.md @@ -56,12 +56,12 @@ Configuration section for authentication using the WS-Federation protocol. - diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/wsfederation.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/wsfederation.md index ec41b02201ce3..13bc886fe3893 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/wsfederation.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/wsfederation.md @@ -83,13 +83,13 @@ Provides configuration for the In this example, the WSFAM is not required to use HTTPS. This is because the `requireHttps` attribute on the `` element is set `false`. This setting is not recommended for most production environments as it may present a security risk. ```xml - ``` diff --git a/docs/framework/configure-apps/file-schema/windows-identity-foundation/x509securitytokenhandlerrequirement.md b/docs/framework/configure-apps/file-schema/windows-identity-foundation/x509securitytokenhandlerrequirement.md index d1feced9c1326..cacd37d6884ba 100644 --- a/docs/framework/configure-apps/file-schema/windows-identity-foundation/x509securitytokenhandlerrequirement.md +++ b/docs/framework/configure-apps/file-schema/windows-identity-foundation/x509securitytokenhandlerrequirement.md @@ -60,9 +60,9 @@ Provides optional configuration for the - ``` diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/activityscheduledqueries.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/activityscheduledqueries.md index 4fa033dea580a..35b871614db2b 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/activityscheduledqueries.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/activityscheduledqueries.md @@ -23,7 +23,7 @@ Represents a collection of queries that are used to track an activity scheduled - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/activityscheduledquery.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/activityscheduledquery.md index 36463adf7ac4a..1e3174ec3c5fe 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/activityscheduledquery.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/activityscheduledquery.md @@ -19,12 +19,12 @@ Represents a collection of queries that are used to track an activity scheduled ## Syntax -```xml +```xml - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/add-of-participants.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/add-of-participants.md index 381056679311a..68755d4d151bd 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/add-of-participants.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/add-of-participants.md @@ -22,7 +22,7 @@ Configure a tracking participant that listens to the tracking records being emit - + ``` ## Attributes and Elements @@ -58,27 +58,27 @@ Configure a tracking participant that listens to the tracking records being emit The Provider Id that the ETW Tracking Participant uses for writing the Tracking Records to ETW is defined in the **\** section. The tracking participant has a profile associated with it to specify the tracking records it has subscribed to. This is defined by the **profileName** attribute of the **\** element. Once these are defined, the Tracking Participant is added to the **\** service behavior. This will add the selected Tracking Participants to the Workflow instance’s extensions, so that they begin to receive the Tracking Records. ```xml - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - + + + + ``` diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/behavior-of-servicebehaviors-of-workflow.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/behavior-of-servicebehaviors-of-workflow.md index 0129b9bafebac..e4994b0f89d89 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/behavior-of-servicebehaviors-of-workflow.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/behavior-of-servicebehaviors-of-workflow.md @@ -23,20 +23,20 @@ The **behavior** element contains a collection of settings for the behavior of a - - - - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/cancelrequestedqueries.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/cancelrequestedqueries.md index 481fec5fb7ca5..6ae444edc87eb 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/cancelrequestedqueries.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/cancelrequestedqueries.md @@ -23,7 +23,7 @@ Represents a collection of queries that are used to track requests to cancel a c - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/cancelrequestedquery.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/cancelrequestedquery.md index 590706d741ff0..c377a019a91c2 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/cancelrequestedquery.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/cancelrequestedquery.md @@ -24,7 +24,7 @@ Represents a query that is used to track requests to cancel a child activity by - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/channelsettings.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/channelsettings.md index 84b2f65841575..8f4799269424f 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/channelsettings.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/channelsettings.md @@ -22,8 +22,8 @@ Specifies the settings of the channel cache. - @@ -62,14 +62,14 @@ Specifies the settings of the channel cache. In a hosted workflow service, you can specify the factory cache and channel cache settings in the application configuration file. To do so, add a service behavior that contains the cache settings for the factory and channel cache and add this service behavior to your service. The following example shows the contents of a configuration file that contains the `MyChannelCacheBehavior` service behavior with the custom factory cache and channel cache settings. This service behavior is added to the service through the `behaviorConfiguration` attribute. ```xml - + - + - + diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/customtrackingqueries.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/customtrackingqueries.md index bb62ab5f44094..526e195ceb603 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/customtrackingqueries.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/customtrackingqueries.md @@ -23,7 +23,7 @@ Represents a collection of queries that are used to track events that you define - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/customtrackingquery.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/customtrackingquery.md index ff0b6046dd718..25785ae8288cd 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/customtrackingquery.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/customtrackingquery.md @@ -24,7 +24,7 @@ Represents a collection of queries that are used to track events that you define - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/etwtracking.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/etwtracking.md index 40e2b12c23dad..83c4b6d3c1bf0 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/etwtracking.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/etwtracking.md @@ -55,27 +55,27 @@ A service behavior that allows a service to utilize ETW tracking using an ** section. The tracking participant has a profile associated with it to specify the tracking records it has subscribed to. This is defined by the **profileName** attribute of the **\** element. Once these are defined, the Tracking Participant is added to the **\** service behavior. This will add the selected Tracking Participants to the Workflow instance’s extensions, so that they begin to receive the Tracking Records. ```xml - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - + + + + ``` diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/factorysettings.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/factorysettings.md index 864413c0b9354..01ba3f677d4f0 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/factorysettings.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/factorysettings.md @@ -22,8 +22,8 @@ Specifies the settings of the channel factory cache. - @@ -62,14 +62,14 @@ Specifies the settings of the channel factory cache. In a hosted workflow service, you can specify the factory cache and channel cache settings in the application configuration file. To do so, add a service behavior that contains the cache settings for the factory and channel cache and add this service behavior to your service. The following example shows the contents of a configuration file that contains the `MyChannelCacheBehavior` service behavior with the custom factory cache and channel cache settings. This service behavior is added to the service through the `behaviorConfiguration` attribute. ```xml - + - + - + diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/faultpropagationqueries.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/faultpropagationqueries.md index d869a78adc0a9..98faba5ff1141 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/faultpropagationqueries.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/faultpropagationqueries.md @@ -14,7 +14,7 @@ Represents a collection of queries that are used to track the handling of faults     [**\**](tracking.md)\       [**\**](trackingprofile.md)\         [**\**](workflow.md)\ -          **\** +          **\** ## Syntax @@ -23,7 +23,7 @@ Represents a collection of queries that are used to track the handling of faults - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/microsoft-visualstudio-activities-asr-clientactivitybuilder-build.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/microsoft-visualstudio-activities-asr-clientactivitybuilder-build.md index 893ee7ce88a34..ad1c5f4796ac6 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/microsoft-visualstudio-activities-asr-clientactivitybuilder-build.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/microsoft-visualstudio-activities-asr-clientactivitybuilder-build.md @@ -16,7 +16,7 @@ Creates and configures a object that pr ## Syntax ```csharp -public ActivityBuilder Build(); +public ActivityBuilder Build(); ``` ## Return Value diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/microsoft-visualstudio-activities-asr-clientactivitybuilder.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/microsoft-visualstudio-activities-asr-clientactivitybuilder.md index ed7b0cd870db9..8413348de4930 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/microsoft-visualstudio-activities-asr-clientactivitybuilder.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/microsoft-visualstudio-activities-asr-clientactivitybuilder.md @@ -16,7 +16,7 @@ Use this class to create and configure a - - + ``` ## Attributes and Elements @@ -57,27 +57,27 @@ Configure a list of tracking participants that listen to the tracking records be The Provider Id that the ETW Tracking Participant uses for writing the Tracking Records to ETW is defined in the **\** section. The tracking participant has a profile associated with it to specify the tracking records it has subscribed to. This is defined by the **profileName** attribute of the **\** element. Once these are defined, the Tracking Participant is added to the **\** service behavior. This will add the selected Tracking Participants to the Workflow instance’s extensions, so that they begin to receive the Tracking Records. ```xml - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - + + + + ``` diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/sendmessagechannelcache.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/sendmessagechannelcache.md index 6631dff6102f6..f6afe66245761 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/sendmessagechannelcache.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/sendmessagechannelcache.md @@ -22,10 +22,10 @@ A service behavior that enables the customization of the cache sharing levels, t - @@ -66,14 +66,14 @@ A service behavior that enables the customization of the cache sharing levels, t In a hosted workflow service, you can specify the factory cache and channel cache settings in the application configuration file. To do so, add a service behavior that contains the cache settings for the factory and channel cache and add this service behavior to your service. The following example shows the contents of a configuration file that contains the `MyChannelCacheBehavior` service behavior with the custom factory cache and channel cache settings. This service behavior is added to the service through the `behaviorConfiguration` attribute. ```xml - + - + - + diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/sqlworkflowinstancestore.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/sqlworkflowinstancestore.md index 47617951a5200..bd8953be49335 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/sqlworkflowinstancestore.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/sqlworkflowinstancestore.md @@ -20,11 +20,11 @@ A service behavior that allows you to configure the - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/system-servicemodel-of-workflow.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/system-servicemodel-of-workflow.md index 15aca8c8ec35d..2fd0a69bca858 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/system-servicemodel-of-workflow.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/system-servicemodel-of-workflow.md @@ -19,12 +19,12 @@ This configuration section contains all the workflow configuration elements. - + - - - - + + - + type="String" /> + @@ -82,7 +82,7 @@ This configuration section contains all the workflow configuration elements. - + diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/tracking.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/tracking.md index 5fe6693c9fb57..aa2e6ffbdc178 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/tracking.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/tracking.md @@ -20,14 +20,14 @@ Represents a configuration section for defining tracking settings for a workflow - - @@ -46,15 +46,15 @@ Represents a configuration section for defining tracking settings for a workflow - - - diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/trackingprofile.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/trackingprofile.md index f4e5565ed7e43..44395d11233c5 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/trackingprofile.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/trackingprofile.md @@ -21,14 +21,14 @@ Represents a configuration section for creating a subscription to workflow track - - @@ -47,15 +47,15 @@ Represents a configuration section for creating a subscription to workflow track - - - @@ -102,7 +102,7 @@ Represents a configuration section for creating a subscription to workflow track ```xml - + @@ -114,7 +114,7 @@ Represents a configuration section for creating a subscription to workflow track - + diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/workflow.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/workflow.md index af4855e952fba..c334ff708f513 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/workflow.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/workflow.md @@ -22,14 +22,14 @@ A configuration element that contains all queries for a specific workflow identi - - @@ -48,15 +48,15 @@ A configuration element that contains all queries for a specific workflow identi - - - @@ -111,7 +111,7 @@ A configuration element that contains all queries for a specific workflow identi ```xml - + @@ -123,7 +123,7 @@ A configuration element that contains all queries for a specific workflow identi - + diff --git a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/workflowidle.md b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/workflowidle.md index c97cfc342d05c..b5fe6b0e9dca5 100644 --- a/docs/framework/configure-apps/file-schema/windows-workflow-foundation/workflowidle.md +++ b/docs/framework/configure-apps/file-schema/windows-workflow-foundation/workflowidle.md @@ -20,7 +20,7 @@ A service behavior that controls when idle workflow instances are unloaded and p - diff --git a/docs/framework/configure-apps/file-schema/winforms/index.md b/docs/framework/configure-apps/file-schema/winforms/index.md index 9383c70fa4a74..f0a9e4cb6a84c 100644 --- a/docs/framework/configure-apps/file-schema/winforms/index.md +++ b/docs/framework/configure-apps/file-schema/winforms/index.md @@ -40,7 +40,7 @@ Element |Description | ## Remarks -Starting with the .NET Framework 4.7, the `` element allows you to configure Windows Forms applications to take advantage of features added in recent releases of the .NET Framework. +Starting with the .NET Framework 4.7, the `` element allows you to configure Windows Forms applications to take advantage of features added in recent releases of the .NET Framework. The `` element can include one or more child [``](windows-forms-add-configuration-element.md) elements, each of which defines a specific configuration setting. From cf9ae27d30b7c31c948360646c093ea97f092cb5 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:28:29 -0400 Subject: [PATCH 04/18] fix: MD009 in docs/framework/data --- .../data/adonet/ado-net-code-examples.md | 14 +- .../data/adonet/code-access-security.md | 28 +-- .../data/adonet/connection-events.md | 6 +- .../data/adonet/connection-string-builders.md | 2 +- .../data/adonet/connection-string-syntax.md | 10 +- ...nection-strings-and-configuration-files.md | 12 +- ...apter-datatable-and-datacolumn-mappings.md | 4 +- .../data/adonet/dataadapter-parameters.md | 10 +- .../adding-data-to-a-datatable.md | 2 +- .../annotating-typed-datasets.md | 16 +- ...applying-an-xslt-transform-to-a-dataset.md | 6 +- .../childviews-and-relations.md | 4 +- ...uming-a-dataset-from-an-xml-web-service.md | 2 +- .../copying-dataset-contents.md | 2 +- .../creating-a-datatable-from-a-dataview.md | 2 +- .../creating-a-dataview.md | 6 +- .../datarows-and-datarowviews.md | 2 +- .../datatable-constraints.md | 10 +- .../datatable-edits.md | 8 +- .../defining-primary-keys.md | 2 +- ...elational-structure-from-xml-schema-xsd.md | 18 +- .../dataset-datatable-dataview/diffgrams.md | 2 +- .../finding-rows.md | 6 +- ...g-dataset-relations-from-xml-schema-xsd.md | 14 +- .../handling-dataview-events.md | 4 +- .../loading-a-dataset-from-xml.md | 10 +- ...ing-dataset-schema-information-from-xml.md | 12 +- ...elations-between-nested-schema-elements.md | 14 +- ...-xsd-constraints-to-dataset-constraints.md | 6 +- ...-xsd-constraints-to-dataset-constraints.md | 8 +- ...relations-specified-for-nested-elements.md | 16 +- ...-xsd-constraints-to-dataset-constraints.md | 20 +- .../performing-an-xpath-query-on-a-dataset.md | 6 +- ...ations-between-elements-with-no-nesting.md | 14 +- ...izing-a-dataset-with-an-xmldatadocument.md | 12 +- .../the-load-method.md | 2 +- ...ml-schema-constraints-and-relationships.md | 8 +- .../data/adonet/dataview-performance.md | 2 +- ...unctions-sqlclient-for-entity-framework.md | 32 +-- .../ef/how-to-define-the-connection-string.md | 2 +- ...dmgen-exe-to-generate-object-layer-code.md | 4 +- ...to-generate-the-model-and-mapping-files.md | 8 +- .../ef/language-reference/and-entity-sql.md | 2 +- .../language-reference/between-entity-sql.md | 2 +- .../ef/language-reference/case-entity-sql.md | 10 +- .../comparison-semantics-entity-sql.md | 12 +- .../composing-nested-entity-sql-queries.md | 6 +- .../language-reference/entity-sql-overview.md | 2 +- .../entity-sql-quick-reference.md | 22 +- .../language-reference/equals-entity-sql.md | 2 +- .../language-reference/function-entity-sql.md | 12 +- ...ow-entity-sql-differs-from-transact-sql.md | 4 +- .../language-reference/isnull-entity-sql.md | 6 +- .../ef/language-reference/key-entity-sql.md | 2 +- ...-and-considerations-in-linq-to-entities.md | 14 +- .../ef/language-reference/not-entity-sql.md | 2 +- .../ef/language-reference/or-entity-sql.md | 2 +- .../language-reference/order-by-entity-sql.md | 4 +- .../parameters-entity-sql.md | 4 +- .../ef/language-reference/query-execution.md | 2 +- .../query-plan-caching-entity-sql.md | 2 +- .../ef/language-reference/ref-entity-sql.md | 2 +- .../language-reference/select-entity-sql.md | 4 +- .../ef/language-reference/treat-entity-sql.md | 2 +- .../type-system-entity-sql.md | 4 +- .../variables-entity-sql.md | 2 +- .../data/adonet/ef/mathematical-functions.md | 192 +++++++++--------- .../adonet/ef/performance-considerations.md | 4 +- .../ef/provider-manifest-specification.md | 2 +- .../data/adonet/ef/string-functions.md | 2 +- .../adonet/establishing-the-connection.md | 6 +- ...enerating-commands-with-commandbuilders.md | 4 +- .../getschema-and-schema-collections.md | 2 +- .../adonet/handling-dataadapter-events.md | 4 +- ...query-syntax-examples-element-operators.md | 12 +- .../adonet/obtaining-a-dbproviderfactory.md | 14 +- .../data/adonet/optimistic-concurrency.md | 4 +- docs/framework/data/adonet/oracle-bfiles.md | 8 +- docs/framework/data/adonet/oracle-lobs.md | 50 ++--- .../framework/data/adonet/oracle-sequences.md | 4 +- docs/framework/data/adonet/oracletypes.md | 10 +- .../adonet/paging-through-a-query-result.md | 8 +- .../data/adonet/performance-counters.md | 30 +-- ...ing-batch-operations-using-dataadapters.md | 14 +- .../adonet/performing-catalog-operations.md | 6 +- ...populating-a-dataset-from-a-dataadapter.md | 4 +- .../protecting-connection-information.md | 4 +- ...ax-examples-restriction-linq-to-dataset.md | 10 +- .../data/adonet/ref-cursor-examples.md | 54 ++--- .../data/adonet/retrieving-binary-data.md | 30 +-- ...trieving-data-from-multiple-ref-cursors.md | 6 +- .../retrieving-data-using-a-datareader.md | 26 +-- .../data/adonet/schema-restrictions.md | 4 +- .../single-table-queries-linq-to-dataset.md | 2 +- .../adonet/sql-server-connection-pooling.md | 6 +- .../sql/aspnet-apps-using-wait-handles.md | 132 ++++++------ .../adonet/sql/bulk-copy-example-setup.md | 8 +- .../data/adonet/sql/date-and-time-data.md | 4 +- .../enabling-multiple-active-result-sets.md | 4 +- .../enumerating-instances-of-sql-server.md | 2 +- .../data/adonet/sql/handling-null-values.md | 2 +- .../sql/inserting-an-image-from-a-file.md | 26 +-- docs/framework/data/adonet/sql/large-udts.md | 2 +- ...d-cud-operations-in-n-tier-applications.md | 14 +- .../sql/linq/downloading-sample-databases.md | 2 +- .../linq/how-to-map-database-relationships.md | 2 +- ...-stored-procedures-that-take-parameters.md | 2 +- ...implementing-business-logic-linq-to-sql.md | 2 +- docs/framework/data/adonet/sql/linq/index.md | 2 +- ...nd-remote-applications-with-linq-to-sql.md | 2 +- .../adonet/sql/linq/sql-clr-type-mapping.md | 22 +- .../data/adonet/sql/manipulating-data.md | 32 +-- .../sql/modifying-large-value-max-data.md | 12 +- .../sql/polling-in-console-applications.md | 42 ++-- .../sql/provider-statistics-for-sql-server.md | 18 +- .../sql/snapshot-isolation-in-sql-server.md | 4 +- .../specifying-xml-values-as-parameters.md | 38 ++-- .../sql/sql-server-express-user-instances.md | 4 +- .../adonet/sql/table-valued-parameters.md | 6 +- .../windows-applications-using-callbacks.md | 88 ++++---- ...for-the-dotnet-data-provider-for-oracle.md | 2 +- ...ransactions-integration-with-sql-server.md | 20 +- .../adonet/updating-data-in-a-data-source.md | 2 +- ...saction-in-single-phase-and-multi-phase.md | 4 +- .../data/transactions/diagnostic-traces.md | 4 +- ...ransaction-using-committabletransaction.md | 4 +- ...cit-transaction-using-transaction-scope.md | 2 +- ...g-concurrency-with-dependenttransaction.md | 18 +- ...ng-service-operations-wcf-data-services.md | 14 +- ...ring-the-data-service-wcf-data-services.md | 4 +- ...in-the-client-request-wcf-data-services.md | 2 +- .../linq-considerations-wcf-data-services.md | 68 +++---- .../data/wcf/securing-wcf-data-services.md | 2 +- 133 files changed, 817 insertions(+), 817 deletions(-) diff --git a/docs/framework/data/adonet/ado-net-code-examples.md b/docs/framework/data/adonet/ado-net-code-examples.md index 56b66ce78c358..3a7f19f1987af 100644 --- a/docs/framework/data/adonet/ado-net-code-examples.md +++ b/docs/framework/data/adonet/ado-net-code-examples.md @@ -47,8 +47,8 @@ The code in this example assumes that you can connect to the Microsoft Access No ### Odbc The code in this example assumes that you can connect to the Microsoft Access Northwind sample database. The code creates a to select rows from the Products table, adding a to restrict the results to rows with a UnitPrice greater than the specified parameter value, in this case 5. The is opened inside a `using` block, which ensures that resources are closed and disposed when the code exits. The code executes the command by using a , and displays the results in the console window. -[!code-csharp[DataWorks SampleApp.Odbc#1](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SampleApp.Odbc/CS/source.cs#1)] -[!code-vb[DataWorks SampleApp.Odbc#1](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks SampleApp.Odbc/VB/source.vb#1)] +[!code-csharp[DataWorks SampleApp.Odbc#1](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SampleApp.Odbc/CS/source.cs#1)] +[!code-vb[DataWorks SampleApp.Odbc#1](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DataWorks SampleApp.Odbc/VB/source.vb#1)] ### OracleClient The code in this example assumes a connection to DEMO.CUSTOMER on an Oracle server. You must also add a reference to the System.Data.OracleClient.dll. The code returns the data in an . @@ -145,7 +145,7 @@ class ObjectQuerySample { ObjectQuery categoryQuery = context.Categories; - foreach (Categories category in + foreach (Categories category in categoryQuery.Execute(MergeOption.AppendOnly)) { Console.WriteLine("\t{0}\t{1}", @@ -193,7 +193,7 @@ class EntityClientSample public static void ExecuteQuery() { string queryString = - @"SELECT c.CategoryID, c.CategoryName + @"SELECT c.CategoryID, c.CategoryName FROM NorthwindEntities.Categories AS c"; using (EntityConnection conn = @@ -204,7 +204,7 @@ class EntityClientSample conn.Open(); using (EntityCommand query = new EntityCommand(queryString, conn)) { - using (DbDataReader rdr = + using (DbDataReader rdr = query.ExecuteReader(CommandBehavior.SequentialAccess)) { while (rdr.Read()) @@ -256,7 +256,7 @@ Class EntityClientSample Catch ex As Exception Console.WriteLine(ex.Message) End Try - End Using + End Using End Sub End Class ``` @@ -328,7 +328,7 @@ Class LinqSqlSample Catch ex As Exception Console.WriteLine(ex.Message) End Try - End Using + End Using End Sub End Class ``` diff --git a/docs/framework/data/adonet/code-access-security.md b/docs/framework/data/adonet/code-access-security.md index 401e262a646c7..d3d237c6018a5 100644 --- a/docs/framework/data/adonet/code-access-security.md +++ b/docs/framework/data/adonet/code-access-security.md @@ -76,8 +76,8 @@ The .NET Framework offers role-based security as well as code access security (C ```xml - ``` @@ -87,8 +87,8 @@ The .NET Framework offers role-based security as well as code access security (C ```xml - @@ -100,8 +100,8 @@ The .NET Framework offers role-based security as well as code access security (C ```xml - @@ -113,18 +113,18 @@ The .NET Framework offers role-based security as well as code access security (C ```xml - - ``` @@ -147,7 +147,7 @@ version="1" AllowBlankPassword="False"> @@ -171,7 +171,7 @@ AllowBlankPassword="False"> ```output Failed, as expected: - diff --git a/docs/framework/data/adonet/connection-string-syntax.md b/docs/framework/data/adonet/connection-string-syntax.md index 7366de2a0e20a..0a0b3d2ad6f2b 100644 --- a/docs/framework/data/adonet/connection-string-syntax.md +++ b/docs/framework/data/adonet/connection-string-syntax.md @@ -45,7 +45,7 @@ The syntax for a connection string is > [!IMPORTANT] > The default setting for the `Persist Security Info` keyword is `false`. Setting it to `true` or `yes` allows security-sensitive information, including the user ID and password, to be obtained from the connection after the connection has been opened. Keep `Persist Security Info` set to `false` to ensure that an untrusted source does not have access to sensitive connection string information. -### Windows authentication with SqlClient +### Windows authentication with SqlClient Each of the following forms of syntax uses Windows Authentication to connect to the **AdventureWorks** database on a local server. ```csharp @@ -57,7 +57,7 @@ The syntax for a connection string is database=AdventureWorks;server=(local)" ``` -### SQL Server authentication with SqlClient +### SQL Server authentication with SqlClient Windows Authentication is preferred for connecting to SQL Server. However, if SQL Server Authentication is required, use the following syntax to specify a user name and password. In this example, asterisks are used to represent a valid user name and password. ```csharp @@ -149,7 +149,7 @@ Jet OLEDB:System Database=|DataDirectory|\System.mdw;" ### Connecting to Excel The Microsoft Jet provider is used to connect to an Excel workbook. In the following connection string, the `Extended Properties` keyword sets properties that are specific to Excel. "HDR=Yes;" indicates that the first row contains column names, not data, and "IMEX=1;" tells the driver to always read "intermixed" data columns as text. -```csharp +```csharp Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"" ``` @@ -159,7 +159,7 @@ Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\MyExcel.xls;Extended Properties= Use both the `Provider` and the `Data Provider` keywords when using the Microsoft Data Shape provider. The following example uses the Shape provider to connect to a local instance of SQL Server. ```csharp -"Provider=MSDataShape;Data Provider=SQLOLEDB;Data Source=(local);Initial Catalog=pubs;Integrated Security=SSPI;" +"Provider=MSDataShape;Data Provider=SQLOLEDB;Data Source=(local);Initial Catalog=pubs;Integrated Security=SSPI;" ``` ## Odbc Connection Strings @@ -182,7 +182,7 @@ SourceDB=|DataDirectory|\MyData.DBC;SourceType=DBC;" ## Oracle Connection Strings The property of a allows you to get or set a connection string for an OLE DB data source. Oracle connection strings are also supported by the . -```csharp +```csharp Data Source=Oracle9i;User ID=*****;Password=*****; ``` diff --git a/docs/framework/data/adonet/connection-strings-and-configuration-files.md b/docs/framework/data/adonet/connection-strings-and-configuration-files.md index 6862d2a025042..2ef7e79b28da9 100644 --- a/docs/framework/data/adonet/connection-strings-and-configuration-files.md +++ b/docs/framework/data/adonet/connection-strings-and-configuration-files.md @@ -22,8 +22,8 @@ Embedding connection strings in your application's code can lead to security vul - @@ -39,8 +39,8 @@ Embedding connection strings in your application's code can lead to security vul ```xml - ``` @@ -118,9 +118,9 @@ Embedding connection strings in your application's code can lead to security vul ```xml - has four properties that are used to When you update a row at the data source, you call the UPDATE statement, which uses a unique identifier to identify the row in the table to be updated. The unique identifier is typically the value of a primary key field. The UPDATE statement uses parameters that contain both the unique identifier and the columns and values to be updated, as shown in the following Transact-SQL statement. ```sql -UPDATE Customers SET CompanyName = @CompanyName +UPDATE Customers SET CompanyName = @CompanyName WHERE CustomerID = @CustomerID ``` @@ -71,13 +71,13 @@ Dim deleteSQL As String = "DELETE FROM Customers WHERE CustomerID = ?" ``` ```csharp -string selectSQL = +string selectSQL = "SELECT CustomerID, CompanyName FROM Customers " + "WHERE CountryRegion = ? AND City = ?"; -string insertSQL = +string insertSQL = "INSERT INTO Customers (CustomerID, CompanyName) " + "VALUES (?, ?)"; -string updateSQL = +string updateSQL = "UPDATE Customers SET CustomerID = ?, CompanyName = ? " + "WHERE CustomerID = ? "; string deleteSQL = "DELETE FROM Customers WHERE CustomerID = ?"; @@ -91,7 +91,7 @@ string deleteSQL = "DELETE FROM Customers WHERE CustomerID = ?"; ```vb ' Assumes that connection is a valid OleDbConnection object. -Dim adapter As OleDbDataAdapter = New OleDbDataAdapter +Dim adapter As OleDbDataAdapter = New OleDbDataAdapter Dim selectCMD AS OleDbCommand = New OleDbCommand(selectSQL, connection) adapter.SelectCommand = selectCMD diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/adding-data-to-a-datatable.md b/docs/framework/data/adonet/dataset-datatable-dataview/adding-data-to-a-datatable.md index 953845fd3428c..082aad7342460 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/adding-data-to-a-datatable.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/adding-data-to-a-datatable.md @@ -70,7 +70,7 @@ Next ```csharp DataRow workRow; -for (int i = 0; i <= 9; i++) +for (int i = 0; i <= 9; i++) { workRow = workTable.NewRow(); workRow[0] = i; diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/annotating-typed-datasets.md b/docs/framework/data/adonet/dataset-datatable-dataview/annotating-typed-datasets.md index acc28bc74c350..6a33df6c3631c 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/annotating-typed-datasets.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/annotating-typed-datasets.md @@ -78,10 +78,10 @@ xmlns:codegen="urn:schemas-microsoft-com:xml-msprop" ```xml - @@ -105,10 +105,10 @@ type="xs:int" minOccurs="0" /> @@ -181,7 +181,7 @@ SqlDataAdapter customerAdapter = new SqlDataAdapter( "SELECT CustomerID, CompanyName, Phone FROM Customers", connection); SqlDataAdapter orderAdapter = new SqlDataAdapter( - "SELECT OrderID, CustomerID, EmployeeID, OrderAdapter FROM Orders", + "SELECT OrderID, CustomerID, EmployeeID, OrderAdapter FROM Orders", connection); // Populate a strongly typed DataSet. @@ -192,11 +192,11 @@ orderAdapter.Fill(customers, "Orders"); connection.Close(); // Add a strongly typed event. -customers.Customers.CustomerChanged += new +customers.Customers.CustomerChanged += new CustomerDataSet.CustomerChangeEventHandler(OnCustomerChanged); // Add a strongly typed DataRow. -CustomerDataSet.Customer newCustomer = +CustomerDataSet.Customer newCustomer = customers.Customers.NewCustomer(); newCustomer.CustomerID = "NEW01"; newCustomer.CompanyName = "My New Company"; diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/applying-an-xslt-transform-to-a-dataset.md b/docs/framework/data/adonet/dataset-datatable-dataview/applying-an-xslt-transform-to-a-dataset.md index 8a5d15acb6732..5c2dcf6528056 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/applying-an-xslt-transform-to-a-dataset.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/applying-an-xslt-transform-to-a-dataset.md @@ -74,7 +74,7 @@ dataSet.Relations.Add("CustOrders", _ dataSet.Tables("Customers").Columns("CustomerID"), _ dataSet.Tables("Orders").Columns("CustomerID")).Nested = true -Dim xmlDoc As XmlDataDocument = New XmlDataDocument(dataSet) +Dim xmlDoc As XmlDataDocument = New XmlDataDocument(dataSet) Dim xslTran As XslTransform = New XslTransform xslTran.Load("transform.xsl") @@ -106,12 +106,12 @@ custDS.Relations.Add("CustOrders", custDS.Tables["Customers"].Columns["CustomerID"], custDS.Tables["Orders"].Columns["CustomerID"]).Nested = true; -XmlDataDocument xmlDoc = new XmlDataDocument(custDS); +XmlDataDocument xmlDoc = new XmlDataDocument(custDS); XslTransform xslTran = new XslTransform(); xslTran.Load("transform.xsl"); -XmlTextWriter writer = new XmlTextWriter("xslt_output.html", +XmlTextWriter writer = new XmlTextWriter("xslt_output.html", System.Text.Encoding.UTF8); xslTran.Transform(xmlDoc, null, writer); diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/childviews-and-relations.md b/docs/framework/data/adonet/dataset-datatable-dataview/childviews-and-relations.md index 087d5000a2dbc..fce2f8f6c6a1f 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/childviews-and-relations.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/childviews-and-relations.md @@ -44,12 +44,12 @@ DataTable catTable = catDS.Tables["Categories"]; DataTable prodTable = catDS.Tables["Products"]; // Create a relation between the Categories and Products tables. -DataRelation relation = catDS.Relations.Add("CatProdRel", +DataRelation relation = catDS.Relations.Add("CatProdRel", catTable.Columns["CategoryID"], prodTable.Columns["CategoryID"]); // Create DataViews for the Categories and Products tables. -DataView catView = new DataView(catTable, "", "CategoryName", +DataView catView = new DataView(catTable, "", "CategoryName", DataViewRowState.CurrentRows); DataView prodView; diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/consuming-a-dataset-from-an-xml-web-service.md b/docs/framework/data/adonet/dataset-datatable-dataview/consuming-a-dataset-from-an-xml-web-service.md index 893bf99733c89..2dfd9b9e2f68d 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/consuming-a-dataset-from-an-xml-web-service.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/consuming-a-dataset-from-an-xml-web-service.md @@ -232,7 +232,7 @@ The was architected with a disconnected design, in pa DataSet updateDataSet = new DataSet(); - updateDataSet = + updateDataSet = proxySample.UpdateCustomers(customersDataSet.GetChanges()); customersDataSet.Merge(updateDataSet); diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/copying-dataset-contents.md b/docs/framework/data/adonet/dataset-datatable-dataview/copying-dataset-contents.md index dca3611d07564..2174f9cd3ad50 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/copying-dataset-contents.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/copying-dataset-contents.md @@ -79,7 +79,7 @@ customerDataSet.Tables["Customers"].Rows.Add("John", "UK"); DataSet germanyCustomers = customerDataSet.Clone(); -DataRow[] copyRows = +DataRow[] copyRows = customerDataSet.Tables["Customers"].Select("CountryRegion = 'Germany'"); DataTable customerTable = germanyCustomers.Tables["Customers"]; diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/creating-a-datatable-from-a-dataview.md b/docs/framework/data/adonet/dataset-datatable-dataview/creating-a-datatable-from-a-dataview.md index 9e7b34b5bf651..caf2ed9d74d86 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/creating-a-datatable-from-a-dataview.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/creating-a-datatable-from-a-dataview.md @@ -108,7 +108,7 @@ private static void DemonstrateDataView() // connectionString is assumed to be a valid connection string. SqlDataAdapter adapter = new SqlDataAdapter( "SELECT FirstName, LastName, EmailAddress " + - "FROM Person.Contact WHERE FirstName LIKE 'Mich%'", + "FROM Person.Contact WHERE FirstName LIKE 'Mich%'", GetConnectionString()); DataTable table = new DataTable(); diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/creating-a-dataview.md b/docs/framework/data/adonet/dataset-datatable-dataview/creating-a-dataview.md index cc4e5e90c7487..cb9e45f0d7e57 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/creating-a-dataview.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/creating-a-dataview.md @@ -23,9 +23,9 @@ Dim custDV As DataView = New DataView(custDS.Tables("Customers"), _ ``` ```csharp -DataView custDV = new DataView(custDS.Tables["Customers"], - "Country = 'USA'", - "ContactName", +DataView custDV = new DataView(custDS.Tables["Customers"], + "Country = 'USA'", + "ContactName", DataViewRowState.CurrentRows); ``` diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/datarows-and-datarowviews.md b/docs/framework/data/adonet/dataset-datatable-dataview/datarows-and-datarowviews.md index c7b760d573156..bfa118a01c432 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/datarows-and-datarowviews.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/datarows-and-datarowviews.md @@ -19,7 +19,7 @@ Console.WriteLine("Current Values:") WriteView(catView) Console.WriteLine("Original Values:") catView.RowStateFilter = DataViewRowState.ModifiedOriginal -WriteView(catView) +WriteView(catView) Public Shared Sub WriteView(thisDataView As DataView) Dim rowView As DataRowView diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/datatable-constraints.md b/docs/framework/data/adonet/dataset-datatable-dataview/datatable-constraints.md index baced716e8a53..b8775b87eb277 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/datatable-constraints.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/datatable-constraints.md @@ -33,16 +33,16 @@ You can use constraints to enforce restrictions on the data in a - + - - @@ -49,9 +49,9 @@ Customers (CustomerID, CompanyName, Phone) In the following XML Schema, the **Schema** element has two element children, `InStateCustomers` and `OutOfStateCustomers`. ```xml - diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/diffgrams.md b/docs/framework/data/adonet/dataset-datatable-dataview/diffgrams.md index cf3c9a86f5d5b..92529d4f99d03 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/diffgrams.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/diffgrams.md @@ -43,7 +43,7 @@ A DiffGram is an XML format that identifies current and original versions of dat ```xml - diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/finding-rows.md b/docs/framework/data/adonet/dataset-datatable-dataview/finding-rows.md index 07aadfedbfda9..d1690e12c9da4 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/finding-rows.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/finding-rows.md @@ -36,7 +36,7 @@ End If ``` ```csharp -DataView custView = new DataView(custDS.Tables["Customers"], "", +DataView custView = new DataView(custDS.Tables["Customers"], "", "CompanyName", DataViewRowState.CurrentRows); int rowIndex = custView.Find("The Cracker Box"); @@ -76,14 +76,14 @@ DataView custView = new DataView(custDS.Tables["Customers"], "", "CompanyName, ContactName", DataViewRowState.CurrentRows); -DataRowView[] foundRows = +DataRowView[] foundRows = custView.FindRows(new object[] {"The Cracker Box", "Liu Wong"}); if (foundRows.Length == 0) Console.WriteLine("No match found."); else foreach (DataRowView myDRV in foundRows) - Console.WriteLine("{0}, {1}", myDRV["CompanyName"].ToString(), + Console.WriteLine("{0}, {1}", myDRV["CompanyName"].ToString(), myDRV["ContactName"].ToString()); ``` diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/generating-dataset-relations-from-xml-schema-xsd.md b/docs/framework/data/adonet/dataset-datatable-dataview/generating-dataset-relations-from-xml-schema-xsd.md index 0273599474ccd..638cf95807e54 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/generating-dataset-relations-from-xml-schema-xsd.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/generating-dataset-relations-from-xml-schema-xsd.md @@ -18,9 +18,9 @@ In a , you form an association between two or more col ```xml - + - + @@ -33,10 +33,10 @@ In a , you form an association between two or more col The **msdata:Relationship** annotation allows you to explicitly specify parent-child relationships between elements in the schema that are not nested. The following example shows the structure of the **Relationship** element. ```xml - ``` @@ -65,7 +65,7 @@ msdata:childkey="" /> diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/handling-dataview-events.md b/docs/framework/data/adonet/dataset-datatable-dataview/handling-dataview-events.md index c7a179f216d5a..4d222558a618a 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/handling-dataview-events.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/handling-dataview-events.md @@ -32,10 +32,10 @@ End Sub ``` ```csharp -custView.ListChanged += new +custView.ListChanged += new System.ComponentModel.ListChangedEventHandler(OnListChanged); -protected static void OnListChanged(object sender, +protected static void OnListChanged(object sender, System.ComponentModel.ListChangedEventArgs args) { Console.WriteLine("ListChanged:"); diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/loading-a-dataset-from-xml.md b/docs/framework/data/adonet/dataset-datatable-dataview/loading-a-dataset-from-xml.md index 5ff5d430c79f8..5c1855d0e0358 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/loading-a-dataset-from-xml.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/loading-a-dataset-from-xml.md @@ -87,7 +87,7 @@ Next foreach (DataTable dataTable in dataSet.Tables) dataTable.BeginLoadData(); -dataSet.ReadXml("file.xml"); +dataSet.ReadXml("file.xml"); foreach (DataTable dataTable in dataSet.Tables) dataTable.EndLoadData(); @@ -97,11 +97,11 @@ foreach (DataTable dataTable in dataSet.Tables) > If the XSD schema for your includes a **targetNamespace**, data may not be read, and you may encounter exceptions, when calling **ReadXml** to load the with XML that contains elements with no qualifying namespace. To read unqualified elements in this case, set **elementFormDefault** equal to "qualified" in your XSD schema. For example: ```xml - ``` diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/loading-dataset-schema-information-from-xml.md b/docs/framework/data/adonet/dataset-datatable-dataview/loading-dataset-schema-information-from-xml.md index 59eef053f82ae..c78c78ea3db9c 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/loading-dataset-schema-information-from-xml.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/loading-dataset-schema-information-from-xml.md @@ -55,14 +55,14 @@ xmlStream.Close(); ```xml - 1 - Beverages - Soft drinks and teas + 1 + Beverages + Soft drinks and teas - 1 - 10 - 0 + 1 + 10 + 0 ``` diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/map-implicit-relations-between-nested-schema-elements.md b/docs/framework/data/adonet/dataset-datatable-dataview/map-implicit-relations-between-nested-schema-elements.md index 889ce29c70f04..7a6fc7eb8526d 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/map-implicit-relations-between-nested-schema-elements.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/map-implicit-relations-between-nested-schema-elements.md @@ -19,8 +19,8 @@ An XML Schema definition language (XSD) schema can have complex types nested ins The following example shows a schema where **OrderDetail** is a child element of **Order**. ```xml - @@ -63,7 +63,7 @@ An XML Schema definition language (XSD) schema can have complex types nested ins ConstraintName: Constraint1 Type: UniqueConstraint Table: Order - Columns: Order_Id + Columns: Order_Id IsPrimaryKey: True ``` @@ -73,18 +73,18 @@ An XML Schema definition language (XSD) schema can have complex types nested ins ConstraintName: Order_OrderDetail Type: ForeignKeyConstraint Table: OrderDetail - Columns: Order_Id + Columns: Order_Id RelatedTable: Order - RelatedColumns: Order_Id + RelatedColumns: Order_Id ``` - A relationship between the **Order** and **OrderDetail** tables. The **Nested** property for this relationship is set to **True** because the **Order** and **OrderDetail** elements are nested in the schema. ```text ParentTable: Order - ParentColumns: Order_Id + ParentColumns: Order_Id ChildTable: OrderDetail - ChildColumns: Order_Id + ChildColumns: Order_Id ParentKeyConstraint: Constraint1 ChildKeyConstraint: Order_OrderDetail RelationName: Order_OrderDetail diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/map-key-xml-schema-xsd-constraints-to-dataset-constraints.md b/docs/framework/data/adonet/dataset-datatable-dataview/map-key-xml-schema-xsd-constraints-to-dataset-constraints.md index b115d1fd26e91..69311639b1a87 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/map-key-xml-schema-xsd-constraints-to-dataset-constraints.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/map-key-xml-schema-xsd-constraints-to-dataset-constraints.md @@ -21,7 +21,7 @@ In a schema, you can specify a key constraint on an element or attribute using t ```xml @@ -45,7 +45,7 @@ In a schema, you can specify a key constraint on an element or attribute using t - + ``` The **key** element specifies that the values of the **CustomerID** child element of the **Customers** element must have unique values and cannot have null values. In translating the XML Schema definition language (XSD) schema, the mapping process creates the following table: @@ -64,7 +64,7 @@ TableName: customers Unique: True ConstraintName: KeyCustID Table: customers - Columns: CustomerID + Columns: CustomerID IsPrimaryKey: True ``` diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/map-keyref-xml-schema-xsd-constraints-to-dataset-constraints.md b/docs/framework/data/adonet/dataset-datatable-dataview/map-keyref-xml-schema-xsd-constraints-to-dataset-constraints.md index a73fcaca0ff95..da2600c515079 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/map-keyref-xml-schema-xsd-constraints-to-dataset-constraints.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/map-keyref-xml-schema-xsd-constraints-to-dataset-constraints.md @@ -21,8 +21,8 @@ The **keyref** element allows you to establish links between elements within a d In the example, the **OrderNumber** child element of the **OrderDetail** element refers to the **OrderNo** key child element of the **Order** element. ```xml - @@ -83,9 +83,9 @@ Order(OrderNumber, EmpNumber) ```text ParentTable: Order - ParentColumns: OrderNumber + ParentColumns: OrderNumber ChildTable: OrderDetail - ChildColumns: OrderNo + ChildColumns: OrderNo ParentKeyConstraint: OrderNumberKey ChildKeyConstraint: OrderNoRef RelationName: OrderNoRef diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/map-relations-specified-for-nested-elements.md b/docs/framework/data/adonet/dataset-datatable-dataview/map-relations-specified-for-nested-elements.md index 20a8c3e4d08d0..cac3168117aa0 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/map-relations-specified-for-nested-elements.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/map-relations-specified-for-nested-elements.md @@ -9,8 +9,8 @@ A schema can include an **msdata:Relationship** annotation to explicitly specify The following example shows an XML Schema in which the **OrderDetail** element is a child element of **Order**. The **msdata:Relationship** identifies this parent-child relationship and specifies that the **OrderNumber** column of the resulting **Order** table is related to the **OrderNo** column of the resulting **OrderDetail** table. ```xml - @@ -23,10 +23,10 @@ A schema can include an **msdata:Relationship** annotation to explicitly specify - @@ -59,9 +59,9 @@ A schema can include an **msdata:Relationship** annotation to explicitly specify ```text ParentTable: Order - ParentColumns: OrderNumber + ParentColumns: OrderNumber ChildTable: OrderDetail - ChildColumns: OrderNo + ChildColumns: OrderNo RelationName: OrdODRelation Nested: True ``` diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/map-unique-xml-schema-xsd-constraints-to-dataset-constraints.md b/docs/framework/data/adonet/dataset-datatable-dataview/map-unique-xml-schema-xsd-constraints-to-dataset-constraints.md index 53bde21d83a10..8fa2e54603320 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/map-unique-xml-schema-xsd-constraints-to-dataset-constraints.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/map-unique-xml-schema-xsd-constraints-to-dataset-constraints.md @@ -16,15 +16,15 @@ In an XML Schema definition language (XSD) schema, the **unique** element specif The following example shows an XML Schema that uses the **unique** element to specify a uniqueness constraint. ```xml - - - @@ -69,12 +69,12 @@ TableName: Customers You can specify a unique constraint on a combination of elements or attributes in the XML Schema. The following example demonstrates how to specify that a combination of **CustomerID** and **CompanyName** values must be unique for all **Customers** in any instance, by adding another **xs:field** element in the schema. ```xml - - - - + + + + ``` diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/performing-an-xpath-query-on-a-dataset.md b/docs/framework/data/adonet/dataset-datatable-dataview/performing-an-xpath-query-on-a-dataset.md index edc89371696dd..36154bdd8dc08 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/performing-an-xpath-query-on-a-dataset.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/performing-an-xpath-query-on-a-dataset.md @@ -37,7 +37,7 @@ dataSet.Relations.Add("OrderDetail", _ dataSet.Tables("Orders").Columns("OrderID"), _ dataSet.Tables("OrderDetails").Columns("OrderID"), false).Nested = true -Dim xmlDoc As XmlDataDocument = New XmlDataDocument(dataSet) +Dim xmlDoc As XmlDataDocument = New XmlDataDocument(dataSet) Dim nodeList As XmlNodeList = xmlDoc.DocumentElement.SelectNodes( _ "descendant::Customers[*/OrderDetails/ProductID=43]") @@ -78,10 +78,10 @@ dataSet.Relations.Add("CustOrders", dataSet.Relations.Add("OrderDetail", dataSet.Tables["Orders"].Columns["OrderID"], - dataSet.Tables["OrderDetails"].Columns["OrderID"], + dataSet.Tables["OrderDetails"].Columns["OrderID"], false).Nested = true; -XmlDataDocument xmlDoc = new XmlDataDocument(dataSet); +XmlDataDocument xmlDoc = new XmlDataDocument(dataSet); XmlNodeList nodeList = xmlDoc.DocumentElement.SelectNodes( "descendant::Customers[*/OrderDetails/ProductID=43]"); diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/specify-relations-between-elements-with-no-nesting.md b/docs/framework/data/adonet/dataset-datatable-dataview/specify-relations-between-elements-with-no-nesting.md index 3723ecac2095e..1035664d08e1e 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/specify-relations-between-elements-with-no-nesting.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/specify-relations-between-elements-with-no-nesting.md @@ -9,8 +9,8 @@ When elements are not nested, no implicit relations are created. You can, howeve The following example shows an XML Schema in which the **msdata:Relationship** annotation is specified between the **Order** and **OrderDetail** elements, which are not nested. The **msdata:Relationship** annotation is specified as the child element of the **Schema** element. ```xml - @@ -38,9 +38,9 @@ When elements are not nested, no implicit relations are created. You can, howeve @@ -52,9 +52,9 @@ When elements are not nested, no implicit relations are created. You can, howeve ```text RelationName: OrdOrderDetailRelation ParentTable: Order -ParentColumns: OrderNumber +ParentColumns: OrderNumber ChildTable: OrderDetail -ChildColumns: OrderNo +ChildColumns: OrderNo Nested: False ``` diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/synchronizing-a-dataset-with-an-xmldatadocument.md b/docs/framework/data/adonet/dataset-datatable-dataview/synchronizing-a-dataset-with-an-xmldatadocument.md index 9fb5ad327275d..23f4f1c39fe5c 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/synchronizing-a-dataset-with-an-xmldatadocument.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/synchronizing-a-dataset-with-an-xmldatadocument.md @@ -109,9 +109,9 @@ This section demonstrates one step in the processing of a purchase order, using ```xml - @@ -168,7 +168,7 @@ Public class Sample Dim orderDS As OrderDetail = New OrderDetail - Dim xmlDocument As XmlDataDocument = New XmlDataDocument(orderDS) + Dim xmlDocument As XmlDataDocument = New XmlDataDocument(orderDS) xmlDocument.Load("Order.xml") @@ -202,9 +202,9 @@ public class Sample { public static void Main() { - OrderDetail orderDS = new OrderDetail(); + OrderDetail orderDS = new OrderDetail(); - XmlDataDocument xmlDocument = new XmlDataDocument(orderDS); + XmlDataDocument xmlDocument = new XmlDataDocument(orderDS); xmlDocument.Load("Order.xml"); diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/the-load-method.md b/docs/framework/data/adonet/dataset-datatable-dataview/the-load-method.md index 5f7a69fe68204..64a317938a600 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/the-load-method.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/the-load-method.md @@ -29,7 +29,7 @@ Private Sub LoadBirthdays(ByVal connectionString As String) " FROM dbo.Employees " & _ "ORDER BY BirthDate, LastName, FirstName" - ' Open and fill a DataSet. + ' Open and fill a DataSet. Dim adapter As SqlDataAdapter = New SqlDataAdapter( _ queryString, connectionString) Dim employees As New DataSet diff --git a/docs/framework/data/adonet/dataset-datatable-dataview/xml-schema-constraints-and-relationships.md b/docs/framework/data/adonet/dataset-datatable-dataview/xml-schema-constraints-and-relationships.md index 46a30527dfc40..50562a9682856 100644 --- a/docs/framework/data/adonet/dataset-datatable-dataview/xml-schema-constraints-and-relationships.md +++ b/docs/framework/data/adonet/dataset-datatable-dataview/xml-schema-constraints-and-relationships.md @@ -14,8 +14,8 @@ In an XML Schema definition language (XSD) schema, you can specify constraints ( The following example shows an XML Schema that includes **Order** and **OrderDetail** elements, which are not nested. The schema also specifies key and keyref constraints. ```xml - @@ -82,8 +82,8 @@ In an XML Schema definition language (XSD) schema, you can specify constraints ( In the previous schema example, the **Order** and **OrderDetail** elements are not nested. In the following schema example, these elements are nested. However, no **msdata:Relationship** annotation is specified; therefore, an implicit relation is assumed. For more information, see [Map Implicit Relations Between Nested Schema Elements](map-implicit-relations-between-nested-schema-elements.md). The schema also specifies key and keyref constraints. ```xml - diff --git a/docs/framework/data/adonet/dataview-performance.md b/docs/framework/data/adonet/dataview-performance.md index d42cb899bd0ea..2c61cc930f94e 100644 --- a/docs/framework/data/adonet/dataview-performance.md +++ b/docs/framework/data/adonet/dataview-performance.md @@ -59,7 +59,7 @@ GridView1.DataBind() ```csharp if (Cache["ordersView"] == null) { - // Fill the DataSet. + // Fill the DataSet. DataSet dataSet = FillDataSet(); DataTable orders = dataSet.Tables["SalesOrderHeader"]; diff --git a/docs/framework/data/adonet/ef/aggregate-functions-sqlclient-for-entity-framework.md b/docs/framework/data/adonet/ef/aggregate-functions-sqlclient-for-entity-framework.md index a32b9db8af0ab..44c21bbc411cd 100644 --- a/docs/framework/data/adonet/ef/aggregate-functions-sqlclient-for-entity-framework.md +++ b/docs/framework/data/adonet/ef/aggregate-functions-sqlclient-for-entity-framework.md @@ -25,21 +25,21 @@ The type of `expression`. [!code-sql[DP EntityServices Concepts#SQLSERVER_AVG](~/samples/snippets/tsql/VS_Snippets_Data/dp entityservices concepts/tsql/entitysql.sql#sqlserver_avg)] ## CHECKSUM_AGG(collection) - + Returns the checksum of the values in a collection. Null values are ignored. - + **Arguments** - + A Collection(`Int32`). - + **Return Value** - + An `Int32`. - + **Example** - + [!code-sql[DP EntityServices Concepts#SQLSERVER_CHECKSUM](~/samples/snippets/tsql/VS_Snippets_Data/dp entityservices concepts/tsql/entitysql.sql#sqlserver_checksum)] - + ## COUNT(expression) Returns the number of items in a collection as an `Int32`. @@ -60,15 +60,15 @@ An `Int32`. **Example** [!code-sql[DP EntityServices Concepts#SQLSERVER_COUNT](~/samples/snippets/tsql/VS_Snippets_Data/dp entityservices concepts/tsql/entitysql.sql#sqlserver_count)] - + ## COUNT_BIG(expression) - + Returns the number of items in a collection as a `bigint`. - + **Arguments** - + A Collection(T), where T is one of the following types: - + | | | | | |---|---|---|---| |`Boolean`|`Double`|`DateTime`|`DateTimeOffset`| @@ -88,7 +88,7 @@ Returns the maximum value the collection. **Arguments** -A Collection(T), where T is one of the following types: +A Collection(T), where T is one of the following types: | | | | | |---|---|---|---| @@ -109,7 +109,7 @@ Returns the minimum value in a collection. **Arguments** -A Collection(T), where T is one of the following types: +A Collection(T), where T is one of the following types: | | | | | |---|---|---|---| @@ -202,7 +202,7 @@ A `Double`. **Example** -[!code-sql[DP EntityServices Concepts#SQLSERVER_VARP](~/samples/snippets/tsql/VS_Snippets_Data/dp entityservices concepts/tsql/entitysql.sql#sqlserver_varp)] +[!code-sql[DP EntityServices Concepts#SQLSERVER_VARP](~/samples/snippets/tsql/VS_Snippets_Data/dp entityservices concepts/tsql/entitysql.sql#sqlserver_varp)] ## See also diff --git a/docs/framework/data/adonet/ef/how-to-define-the-connection-string.md b/docs/framework/data/adonet/ef/how-to-define-the-connection-string.md index 8bfe1a42b06ac..6baa5da120d02 100644 --- a/docs/framework/data/adonet/ef/how-to-define-the-connection-string.md +++ b/docs/framework/data/adonet/ef/how-to-define-the-connection-string.md @@ -16,7 +16,7 @@ This topic shows how to define the connection string that is used when connectin ```xml - 1The references of the given entity type instances are implicitly compared, as shown in the following example: ```sql -SELECT p1, p2 -FROM AdventureWorksEntities.Product AS p1 - JOIN AdventureWorksEntities.Product AS p2 +SELECT p1, p2 +FROM AdventureWorksEntities.Product AS p1 + JOIN AdventureWorksEntities.Product AS p2 WHERE p1 != p2 OR p1 IS NULL ``` An entity instance cannot be compared to an explicit reference. If this is attempted, an exception is thrown. For example, the following query will throw an exception: ```sql -SELECT p1, p2 -FROM AdventureWorksEntities.Product AS p1 - JOIN AdventureWorksEntities.Product AS p2 +SELECT p1, p2 +FROM AdventureWorksEntities.Product AS p1 + JOIN AdventureWorksEntities.Product AS p2 WHERE p1 != REF(p2) ``` diff --git a/docs/framework/data/adonet/ef/language-reference/composing-nested-entity-sql-queries.md b/docs/framework/data/adonet/ef/language-reference/composing-nested-entity-sql-queries.md index e0a36cdd7a757..885fe6c286db6 100644 --- a/docs/framework/data/adonet/ef/language-reference/composing-nested-entity-sql-queries.md +++ b/docs/framework/data/adonet/ef/language-reference/composing-nested-entity-sql-queries.md @@ -10,7 +10,7 @@ ms.assetid: 685d4cd3-2c1f-419f-bb46-c9d97a351eeb A nested expression can be placed anywhere a value of the type it returns is accepted. For example: ```sql --- Returns a hierarchical collection of three elements at top-level. +-- Returns a hierarchical collection of three elements at top-level. -- x must be passed in the parameter collection. ROW(@x, {@x}, {@x, 4, 5}, {@x, 7, 8, 9}) @@ -24,8 +24,8 @@ ROW(@x, {@x}, {@x, 4, 5}, {@x, 7, 8, 9}) ```sql -- Returns a collection of rows where each row contains an Address entity. -- and a collection of references to its corresponding SalesOrderHeader entities. -SELECT address, (SELECT DEREF(soh) - FROM NAVIGATE(address, AdventureWorksModel.FK_SalesOrderHeader_Address_BillToAddressID) AS soh) +SELECT address, (SELECT DEREF(soh) + FROM NAVIGATE(address, AdventureWorksModel.FK_SalesOrderHeader_Address_BillToAddressID) AS soh) AS salesOrderHeader FROM AdventureWorksEntities.Address AS address ``` diff --git a/docs/framework/data/adonet/ef/language-reference/entity-sql-overview.md b/docs/framework/data/adonet/ef/language-reference/entity-sql-overview.md index 2e5bec54489ff..4450d6949f981 100644 --- a/docs/framework/data/adonet/ef/language-reference/entity-sql-overview.md +++ b/docs/framework/data/adonet/ef/language-reference/entity-sql-overview.md @@ -5,7 +5,7 @@ ms.assetid: f0bb8120-e709-40a3-ac1e-5520dc47477d --- # Entity SQL Overview [!INCLUDE[esql](../../../../../../includes/esql-md.md)] is a SQL-like language that enables you to query conceptual models in the Entity Framework. Conceptual models represent data as entities and relationships, and [!INCLUDE[esql](../../../../../../includes/esql-md.md)] allows you to query those entities and relationships in a format that is familiar to those who have used SQL. - + The Entity Framework works with storage-specific data providers to translate generic [!INCLUDE[esql](../../../../../../includes/esql-md.md)] into storage-specific queries. The EntityClient provider supplies a way to execute an [!INCLUDE[esql](../../../../../../includes/esql-md.md)] command against an entity model and return rich types of data including scalar results, result sets, and object graphs. When you construct objects, you can specify a stored procedure name or the text of a query by assigning an [!INCLUDE[esql](../../../../../../includes/esql-md.md)] query string to its property. The exposes the results of executing a against an EDM. To execute the command that returns the , call . In addition to the EntityClient provider, the Entity Framework enables you to use [!INCLUDE[esql](../../../../../../includes/esql-md.md)] to execute queries against a conceptual model and return data as strongly-typed CLR objects that are instances of entity types. For more information, see [Working with Objects](../working-with-objects.md). diff --git a/docs/framework/data/adonet/ef/language-reference/entity-sql-quick-reference.md b/docs/framework/data/adonet/ef/language-reference/entity-sql-quick-reference.md index 5567fd474830f..b5f6e8adfd646 100644 --- a/docs/framework/data/adonet/ef/language-reference/entity-sql-quick-reference.md +++ b/docs/framework/data/adonet/ef/language-reference/entity-sql-quick-reference.md @@ -31,7 +31,7 @@ This topic provides a quick reference to [!INCLUDE[esql](../../../../../../inclu Example: ```sql -DATETIME '2006-12-25 01:01:00.000' +DATETIME '2006-12-25 01:01:00.000' --same as DATETIME '2006-12-25 01:01' ``` @@ -107,9 +107,9 @@ SELECT VALUE product FROM AdventureWorksEntities.Product AS product WHERE produc Example: ```sql -SELECT VALUE AdventureWorksModel.SalesOrderDetail (o.SalesOrderDetailID, o.CarrierTrackingNumber, o.OrderQty, -o.ProductID, o.SpecialOfferID, o.UnitPrice, o.UnitPriceDiscount, -o.rowguid, o.ModifiedDate) FROM AdventureWorksEntities.SalesOrderDetail +SELECT VALUE AdventureWorksModel.SalesOrderDetail (o.SalesOrderDetailID, o.CarrierTrackingNumber, o.OrderQty, +o.ProductID, o.SpecialOfferID, o.UnitPrice, o.UnitPriceDiscount, +o.rowguid, o.ModifiedDate) FROM AdventureWorksEntities.SalesOrderDetail AS o ``` @@ -144,7 +144,7 @@ SELECT REF(o) AS OrderID FROM Orders AS o Example: ```sql -SELECT VALUE REF(p).Name FROM +SELECT VALUE REF(p).Name FROM AdventureWorksEntities.Product AS p ``` @@ -163,7 +163,7 @@ SELECT VALUE REF(p).Name FROM Example: ```sql -SELECT VALUE DEREF(REF(p)).Name FROM +SELECT VALUE DEREF(REF(p)).Name FROM AdventureWorksEntities.Product AS p ``` @@ -182,7 +182,7 @@ SELECT VALUE DEREF(REF(p)).Name FROM Example: ```sql -SELECT VALUE Key(CreateRef(AdventureWorksEntities.Product, row(p.ProductID))) +SELECT VALUE Key(CreateRef(AdventureWorksEntities.Product, row(p.ProductID))) FROM AdventureWorksEntities.Product AS p ``` @@ -204,7 +204,7 @@ SELECT VALUE Key(CreateRef(AdventureWorksEntities.Product, row(p.ProductID))) ```sql SELECT Length(c. FirstName) AS NameLen FROM - AdventureWorksEntities.Contact AS c + AdventureWorksEntities.Contact AS c WHERE c.ContactID BETWEEN 10 AND 12 ``` @@ -223,7 +223,7 @@ SELECT Length(c. FirstName) AS NameLen FROM ```sql SELECT SqlServer.LEN(c.EmailAddress) AS EmailLen FROM - AdventureWorksEntities.Contact AS c WHERE + AdventureWorksEntities.Contact AS c WHERE c.ContactID BETWEEN 10 AND 12 ``` @@ -293,8 +293,8 @@ SELECT VALUE name FROM AdventureWorksEntities.Product AS P Example: ```sql -SELECT a.AddressID, (SELECT VALUE DEREF(v) FROM - NAVIGATE(a, AdventureWorksModel.FK_SalesOrderHeader_Address_BillToAddressID) AS v) +SELECT a.AddressID, (SELECT VALUE DEREF(v) FROM + NAVIGATE(a, AdventureWorksModel.FK_SalesOrderHeader_Address_BillToAddressID) AS v) FROM AdventureWorksEntities.Address AS a ``` diff --git a/docs/framework/data/adonet/ef/language-reference/equals-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/equals-entity-sql.md index ba50c9a3c2308..0008cf8102fb3 100644 --- a/docs/framework/data/adonet/ef/language-reference/equals-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/equals-entity-sql.md @@ -10,7 +10,7 @@ Compares the equality of two expressions. ```sql expression = expression --- or +-- or expression == expression ``` diff --git a/docs/framework/data/adonet/ef/language-reference/function-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/function-entity-sql.md index 8ce79434bc5f6..0f01f235ace84 100644 --- a/docs/framework/data/adonet/ef/language-reference/function-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/function-entity-sql.md @@ -10,16 +10,16 @@ Defines a function in the scope of an Entity SQL query command. ```sql FUNCTION function-name -( [ { parameter_name +( [ { parameter_name [ ,...n ] ] -) AS ( function_expression ) +) AS ( function_expression ) ::= - { data_type | COLLECTION ( ) - | REF ( data_type ) - | ROW ( row_expression ) - } + { data_type | COLLECTION ( ) + | REF ( data_type ) + | ROW ( row_expression ) + } ``` ## Arguments diff --git a/docs/framework/data/adonet/ef/language-reference/how-entity-sql-differs-from-transact-sql.md b/docs/framework/data/adonet/ef/language-reference/how-entity-sql-differs-from-transact-sql.md index 6ba748e8d9420..1bbcbb96f1a59 100644 --- a/docs/framework/data/adonet/ef/language-reference/how-entity-sql-differs-from-transact-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/how-entity-sql-differs-from-transact-sql.md @@ -35,7 +35,7 @@ This topic describes the differences between [!INCLUDE[esql](../../../../../../i 1+2 *3 "abc" row(1 as a, 2 as b) -{ 1, 3, 5} +{ 1, 3, 5} e1 union all e2 set(e1) ``` @@ -101,7 +101,7 @@ SELET Tab.a FROM Tab For example, if `p` is an expression of type Person, the following is the [!INCLUDE[esql](../../../../../../includes/esql-md.md)] syntax for referencing the city of the address of this person. ```sql -p.Address.City +p.Address.City ``` ## No Support for * diff --git a/docs/framework/data/adonet/ef/language-reference/isnull-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/isnull-entity-sql.md index 82920922f521d..a4168070e1031 100644 --- a/docs/framework/data/adonet/ef/language-reference/isnull-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/isnull-entity-sql.md @@ -26,9 +26,9 @@ expression IS [ NOT ] NULL Use `IS NULL` to determine if the element of an outer join is null: ```sql -select c - from LOB.Customers as c left outer join LOB.Orders as o - on c.ID = o.CustomerID +select c + from LOB.Customers as c left outer join LOB.Orders as o + on c.ID = o.CustomerID where o is not null and o.OrderQuantity = @x ``` diff --git a/docs/framework/data/adonet/ef/language-reference/key-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/key-entity-sql.md index fcda600807036..a820e966787b4 100644 --- a/docs/framework/data/adonet/ef/language-reference/key-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/key-entity-sql.md @@ -18,7 +18,7 @@ KEY(createref_expression) In the following example, the key operator is passed a reference to the BadOrder entity, and returns the key portion of that reference. In this case, a record type with exactly one field corresponding to the `Id` property. ```sql -select Key( CreateRef(LOB.BadOrders, row(o.Id)) ) +select Key( CreateRef(LOB.BadOrders, row(o.Id)) ) from LOB.Orders as o ``` diff --git a/docs/framework/data/adonet/ef/language-reference/known-issues-and-considerations-in-linq-to-entities.md b/docs/framework/data/adonet/ef/language-reference/known-issues-and-considerations-in-linq-to-entities.md index ca38af015f193..1b25da3a0e15e 100644 --- a/docs/framework/data/adonet/ef/language-reference/known-issues-and-considerations-in-linq-to-entities.md +++ b/docs/framework/data/adonet/ef/language-reference/known-issues-and-considerations-in-linq-to-entities.md @@ -23,31 +23,31 @@ This section provides information about known issues with LINQ to Entities queri - [Projecting to an Anonymous Type](#ProjectToAnonymousType) - + ## LINQ Queries That cannot be Cached Starting with .NET Framework 4.5, LINQ to Entities queries are automatically cached. However, LINQ to Entities queries that apply the `Enumerable.Contains` operator to in-memory collections are not automatically cached. Also parameterizing in-memory collections in compiled LINQ queries is not allowed. - + ## Ordering Information Lost Projecting columns into an anonymous type will cause ordering information to be lost in some queries that are executed against a SQL Server 2005 database set to a compatibility level of "80". This occurs when a column name in the order-by list matches a column name in the selector, as shown in the following example: [!code-csharp[DP L2E Conceptual Examples#SBUDT543840](../../../../../../samples/snippets/csharp/VS_Snippets_Data/DP L2E Conceptual Examples/CS/Program.cs#sbudt543840)] [!code-vb[DP L2E Conceptual Examples#SBUDT543840](../../../../../../samples/snippets/visualbasic/VS_Snippets_Data/DP L2E Conceptual Examples/VB/Module1.vb#sbudt543840)] - + ## Unsigned Integers Not Supported Specifying an unsigned integer type in a LINQ to Entities query is not supported because the Entity Framework does not support unsigned integers. If you specify an unsigned integer, an exception will be thrown during the query expression translation, as shown in the following example. This example queries for an order with ID 48000. [!code-csharp[DP L2E Conceptual Examples#UIntAsQueryParam](../../../../../../samples/snippets/csharp/VS_Snippets_Data/DP L2E Conceptual Examples/CS/Program.cs#uintasqueryparam)] [!code-vb[DP L2E Conceptual Examples#UIntAsQueryParam](../../../../../../samples/snippets/visualbasic/VS_Snippets_Data/DP L2E Conceptual Examples/VB/Module1.vb#uintasqueryparam)] - + ## Type Conversion Errors In Visual Basic, when a property is mapped to a column of SQL Server bit type with a value of 1 using the `CByte` function, a is thrown with an "Arithmetic overflow error" message. The following example queries the `Product.MakeFlag` column in the AdventureWorks sample database and an exception is thrown when the query results are iterated over. [!code-vb[DP L2E Conceptual Examples#SBUDT544355](../../../../../../samples/snippets/visualbasic/VS_Snippets_Data/DP L2E Conceptual Examples/VB/Module1.vb#sbudt544355)] - + ## Referencing Non-Scalar Variables Not Supported Referencing a non-scalar variables, such as an entity, in a query is not supported. When such a query executes, a exception is thrown with a message that states "Unable to create a constant value of type `EntityType`. Only primitive types ('such as Int32, String, and Guid') are supported in this context." @@ -57,11 +57,11 @@ This section provides information about known issues with LINQ to Entities queri [!code-csharp[DP L2E Conceptual Examples#SBUDT555877](../../../../../../samples/snippets/csharp/VS_Snippets_Data/DP L2E Conceptual Examples/CS/Program.cs#sbudt555877)] [!code-vb[DP L2E Conceptual Examples#SBUDT555877](../../../../../../samples/snippets/visualbasic/VS_Snippets_Data/DP L2E Conceptual Examples/VB/Module1.vb#sbudt555877)] - + ## Nested Queries May Fail with SQL Server 2000 With SQL Server 2000, LINQ to Entities queries may fail if they produce nested Transact-SQL queries that are three or more levels deep. - + ## Projecting to an Anonymous Type If you define your initial query path to include related objects by using the method on the and then use LINQ to project the returned objects to an anonymous type, the objects specified in the include method are not included in the query results. diff --git a/docs/framework/data/adonet/ef/language-reference/not-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/not-entity-sql.md index ee1d5bc97deec..66cd312c3b0c9 100644 --- a/docs/framework/data/adonet/ef/language-reference/not-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/not-entity-sql.md @@ -12,7 +12,7 @@ Negates a `Boolean` expression. NOT boolean_expression -- or ! boolean_expression -``` +``` ## Arguments `boolean_expression` diff --git a/docs/framework/data/adonet/ef/language-reference/or-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/or-entity-sql.md index c12805c9f52c2..6bbd2364600d7 100644 --- a/docs/framework/data/adonet/ef/language-reference/or-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/or-entity-sql.md @@ -10,7 +10,7 @@ Combines two `Boolean` expressions. ```sql boolean_expression OR boolean_expression --- or +-- or boolean_expression || boolean_expression ``` diff --git a/docs/framework/data/adonet/ef/language-reference/order-by-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/order-by-entity-sql.md index 0a3071cbef310..63d35941bccd4 100644 --- a/docs/framework/data/adonet/ef/language-reference/order-by-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/order-by-entity-sql.md @@ -9,13 +9,13 @@ Specifies the sort order used on objects returned in a SELECT statement. ## Syntax ```sql -[ ORDER BY +[ ORDER BY { order_by_expression [SKIP n] [LIMIT n] [ COLLATE collation_name ] [ ASC | DESC ] } - [ ,…n ] + [ ,…n ] ] ``` diff --git a/docs/framework/data/adonet/ef/language-reference/parameters-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/parameters-entity-sql.md index 90a428f28c347..6536334b70147 100644 --- a/docs/framework/data/adonet/ef/language-reference/parameters-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/parameters-entity-sql.md @@ -11,8 +11,8 @@ Parameters are variables that are defined outside [!INCLUDE[esql](../../../../.. ## Example ```sql -SELECT c - FROM LOB.Customers AS c +SELECT c + FROM LOB.Customers AS c WHERE c.Name = @name ``` diff --git a/docs/framework/data/adonet/ef/language-reference/query-execution.md b/docs/framework/data/adonet/ef/language-reference/query-execution.md index 21e4222c3e162..f53f906c0cadf 100644 --- a/docs/framework/data/adonet/ef/language-reference/query-execution.md +++ b/docs/framework/data/adonet/ef/language-reference/query-execution.md @@ -12,7 +12,7 @@ After a LINQ query is created by a user, it is converted to a command tree. A co At what point query expressions are executed can vary. LINQ queries are always executed when the query variable is iterated over, not when the query variable is created. This is called *deferred execution*. You can also force a query to execute immediately, which is useful for caching query results. This is described later in this topic. When a LINQ to Entities query is executed, some expressions in the query might be executed on the server and some parts might be executed locally on the client. Client-side evaluation of an expression takes place before the query is executed on the server. If an expression is evaluated on the client, the result of that evaluation is substituted for the expression in the query, and the query is then executed on the server. Because queries are executed on the data source, the data source configuration overrides the behavior specified in the client. For example, null value handling and numerical precision depend on the server settings. Any exceptions thrown during query execution on the server are passed directly up to the client. - + > [!TIP] > For a convenient summary of query operators in table format, which lets you quickly identify an operator's execution behavior, see [Classification of Standard Query Operators by Manner of Execution (C#)](../../../../../csharp/programming-guide/concepts/linq/classification-of-standard-query-operators-by-manner-of-execution.md). diff --git a/docs/framework/data/adonet/ef/language-reference/query-plan-caching-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/query-plan-caching-entity-sql.md index 88374501a79f6..ce4e30b08031b 100644 --- a/docs/framework/data/adonet/ef/language-reference/query-plan-caching-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/query-plan-caching-entity-sql.md @@ -19,7 +19,7 @@ Whenever an attempt to execute a query is made, the query pipeline looks up its ```csharp var query = "SELECT sp.SalesYTD FROM AdventureWorksEntities.SalesPerson as sp WHERE sp.EmployeeID = " + employeeTextBox.Text; ``` - + If you do use dynamically generated queries, consider disabling query plan caching to avoid unnecessary memory consumption for cache entries that are unlikely to be reused. Query plan caching on static queries and parameterized queries can provide performance benefits. The following is an example of a static query: diff --git a/docs/framework/data/adonet/ef/language-reference/ref-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/ref-entity-sql.md index 2142ad6680627..a2688acb7616c 100644 --- a/docs/framework/data/adonet/ef/language-reference/ref-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/ref-entity-sql.md @@ -9,7 +9,7 @@ Returns a reference to an entity instance. ## Syntax ```sql -REF( expression ) +REF( expression ) ``` ## Arguments diff --git a/docs/framework/data/adonet/ef/language-reference/select-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/select-entity-sql.md index 6dfb716deeb36..f00316b0985f0 100644 --- a/docs/framework/data/adonet/ef/language-reference/select-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/select-entity-sql.md @@ -9,7 +9,7 @@ Specifies the elements returned by a query. ## Syntax ```sql -SELECT [ ALL | DISTINCT ] [ topSubclause ] aliasedExpr +SELECT [ ALL | DISTINCT ] [ topSubclause ] aliasedExpr [{ , aliasedExpr }] FROM fromClause [ WHERE whereClause ] [ GROUP BY groupByClause [ HAVING havingClause ] ] [ ORDER BY orderByClause ] -- or SELECT VALUE [ ALL | DISTINCT ] [ topSubclause ] expr FROM fromClause [ WHERE whereClause ] [ GROUP BY groupByClause [ HAVING havingClause ] ] [ ORDER BY orderByClause @@ -66,7 +66,7 @@ SELECT customers.Name FROM customers AS c ```sql SELECT 1 AS a, "abc" AS b FROM C -SELECT VALUE ROW(1 AS a, "abc" AS b) FROM C +SELECT VALUE ROW(1 AS a, "abc" AS b) FROM C ``` ## All and Distinct Modifiers diff --git a/docs/framework/data/adonet/ef/language-reference/treat-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/treat-entity-sql.md index f7da7807d5fef..8954d77ee1277 100644 --- a/docs/framework/data/adonet/ef/language-reference/treat-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/treat-entity-sql.md @@ -36,7 +36,7 @@ TREAT ( expression as type) ```sql SELECT TREAT(p AS NamespaceName.Employee) FROM ContainerName.Person AS p -WHERE p IS OF (NamespaceName.Employee) +WHERE p IS OF (NamespaceName.Employee) ``` This query upcasts `Person` entities to the `Employee` type. If the value of p is not actually of type `Employee`, the expression yields the value `null`. diff --git a/docs/framework/data/adonet/ef/language-reference/type-system-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/type-system-entity-sql.md index 14da6800038b1..a4f485bbf0034 100644 --- a/docs/framework/data/adonet/ef/language-reference/type-system-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/type-system-entity-sql.md @@ -36,8 +36,8 @@ ms.assetid: 818a505b-a196-41dd-aaac-2ccd5f7a2f1a You can navigate through a reference by using the member access (dot) operator(`.`). The following snippet extracts the Id property (of Order) by navigating through the r (reference) property. ```sql -select o2.r.Id -from (select ref(o) as r from LOB.Orders as o) as o2 +select o2.r.Id +from (select ref(o) as r from LOB.Orders as o) as o2 ``` If the reference value is null, or if the target of the reference does not exist, the result is null. diff --git a/docs/framework/data/adonet/ef/language-reference/variables-entity-sql.md b/docs/framework/data/adonet/ef/language-reference/variables-entity-sql.md index 1b494af8c9536..f14eb3efdeede 100644 --- a/docs/framework/data/adonet/ef/language-reference/variables-entity-sql.md +++ b/docs/framework/data/adonet/ef/language-reference/variables-entity-sql.md @@ -10,7 +10,7 @@ ms.assetid: 3eed222a-f8f6-46b6-9cd5-220cc0e4e5d8 The following example shows the use of a variable in the expression. The `c` in the FROM clause is the definition of the variable. The use of `c` in the SELECT clause represents the variable reference. ```sql -select c +select c from LOB.customers as c ``` diff --git a/docs/framework/data/adonet/ef/mathematical-functions.md b/docs/framework/data/adonet/ef/mathematical-functions.md index 75edd1e91c65c..7a97fc24b39f1 100644 --- a/docs/framework/data/adonet/ef/mathematical-functions.md +++ b/docs/framework/data/adonet/ef/mathematical-functions.md @@ -86,7 +86,7 @@ A `Double`. **Example** `SqlServer.ATN2(9, 8)` - + ## CEILING(expression) Converts the specified expression to the smallest integer that is greater than or equal to it. @@ -99,129 +99,129 @@ Converts the specified expression to the smallest integer that is greater than o An `Int32`, `Int64`, `Double`, or `Decimal`. -**Example** +**Example** [!code-sql[DP EntityServices Concepts#SQLSERVER_CEILING](~/samples/snippets/tsql/VS_Snippets_Data/dp entityservices concepts/tsql/entitysql.sql#sqlserver_ceiling)] ## COS(expression) -Calculates the trigonometric cosine of the specified angle in radians. +Calculates the trigonometric cosine of the specified angle in radians. -**Arguments** +**Arguments** -`expression`: A `Double`. +`expression`: A `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. -**Example** +**Example** `SqlServer.COS(45)` ## COT(expression) -Calculates the trigonometric cotangent of the specified angle in radians. +Calculates the trigonometric cotangent of the specified angle in radians. -**Arguments** +**Arguments** -`expression`: A `Double`. +`expression`: A `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. -**Example** +**Example** `SqlServer.COT(60)` ## DEGREES(radians) -Returns the corresponding angle in degrees. +Returns the corresponding angle in degrees. -**Arguments** +**Arguments** -`expression`: An `Int32`, `Int64`, `Double`, or `Decimal`. +`expression`: An `Int32`, `Int64`, `Double`, or `Decimal`. -**Return Value** +**Return Value** -An `Int32`, `Int64`, `Double`, or `Decimal`. +An `Int32`, `Int64`, `Double`, or `Decimal`. -**Example** +**Example** `SqlServer.DEGREES(3.1)` ## EXP(expression) -Calculates the exponential value of a specified numeric expression. +Calculates the exponential value of a specified numeric expression. -**Arguments** +**Arguments** -`expression`: A `Double`. +`expression`: A `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. **Example** `SqlServer.EXP(1)` ## FLOOR(expression) -Converts the specified expression to the largest integer less than or equal to it. +Converts the specified expression to the largest integer less than or equal to it. -**Arguments** +**Arguments** -`expression`: A `Double`. +`expression`: A `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. -**Example** +**Example** [!code-sql[DP EntityServices Concepts#SQLSERVER_FLOOR](~/samples/snippets/tsql/VS_Snippets_Data/dp entityservices concepts/tsql/entitysql.sql#sqlserver_floor)] ## LOG(expression) -Calculates the natural logarithm of the specified `float` expression. +Calculates the natural logarithm of the specified `float` expression. -**Arguments** +**Arguments** -`expression`: A `Double`. +`expression`: A `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. -**Example** +**Example** `SqlServer.LOG(100)` ## LOG10(expression) -Returns the base-10 logarithm of the specified `Double` expression. +Returns the base-10 logarithm of the specified `Double` expression. -**Arguments** +**Arguments** -`expression`: A `Double`. +`expression`: A `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. -**Example** +**Example** `SqlServer.LOG10(100)` ## PI() -Returns the constant value of pi as a `Double`. +Returns the constant value of pi as a `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. -**Example** +**Example** `SqlServer.PI()` @@ -229,130 +229,130 @@ A `Double`. Calculates the value of a specified expression to a specified power. -**Arguments** +**Arguments** | | | |--|--| |`numeric_expression`| An `Int32`, `Int64`, `Double`, or `Decimal`.| -|`power_expression`| A `Double` that represents the power to which to raise the `numeric_expression`.| +|`power_expression`| A `Double` that represents the power to which to raise the `numeric_expression`.| -**Return Value** +**Return Value** -The value of the specified `numeric_expression` to the specified `power_expression`. +The value of the specified `numeric_expression` to the specified `power_expression`. -**Example** +**Example** `SqlServer.POWER(2,7)` ## RADIANS(expression) -Converts degrees to radians. +Converts degrees to radians. -**Arguments** +**Arguments** -`expression`: An `Int32`, `Int64`, `Double`, or `Decimal`. +`expression`: An `Int32`, `Int64`, `Double`, or `Decimal`. -**Return Value** +**Return Value** -An `Int32`, `Int64`, `Double`, or `Decimal`. +An `Int32`, `Int64`, `Double`, or `Decimal`. -**Example** +**Example** `SqlServer.RADIANS(360.0)` ## RAND([seed]) -Returns a random value from 0 through 1. +Returns a random value from 0 through 1. -**Arguments** +**Arguments** The seed value as an `Int32`. If the seed is not specified, the SQL Server Database Engine assigns a seed value at random. For a specified seed value, the result returned is always the same. -**Return Value** +**Return Value** -A random `Double` value from 0 through 1. +A random `Double` value from 0 through 1. -**Example** +**Example** `SqlServer.RAND()` ## ROUND(numeric_expression, length[,function]) -Returns a numeric expression, rounded to the specified length or precision. +Returns a numeric expression, rounded to the specified length or precision. -**Arguments** +**Arguments** | | | |--|--| -|`numeric_expression`| An `Int32`, `Int64`, `Double`, or `Decimal`. +|`numeric_expression`| An `Int32`, `Int64`, `Double`, or `Decimal`. |`length`| An `Int32` that represents the precision to which `numeric_expression` is to be rounded. When `length` is a positive number, `numeric_expression` is rounded to the number of decimal positions specified by `length`. When `length` is a negative number, `numeric_expression` is rounded on the left side of the decimal point, as specified by `length`.| |`function` | Optional. An `Int32` that represents the type of operation to perform. When function is omitted or has a value of 0 (default), `numeric_expression` is rounded. When a value other than 0 is specified, `numeric_expression` is truncated. | -**Return Value** +**Return Value** The value of the specified `numeric_expression` to the specified `power_expression`. -**Example** +**Example** `SqlServer.ROUND(748.58, -3)` -## SIGN(expression) +## SIGN(expression) -Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. +Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. -**Arguments** +**Arguments** -`expression`: `Int32`, `Int64`, `Double`, or `Decimal` +`expression`: `Int32`, `Int64`, `Double`, or `Decimal` -**Return Value** +**Return Value** -An `Int32`, `Int64`, `Double`, or `Decimal`. +An `Int32`, `Int64`, `Double`, or `Decimal`. -**Example** +**Example** `SqlServer.SIGN(-10)` ## SIN(expression) -Calculates the trigonometric sine of the specified angle in radians, and returns a `Double` expression. +Calculates the trigonometric sine of the specified angle in radians, and returns a `Double` expression. -**Arguments** +**Arguments** -`expression`: A `Double`. +`expression`: A `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. **Example** `SqlServer.SIN(20)` ## SQRT(expression) -Returns the square root of the specified expression. +Returns the square root of the specified expression. -**Arguments** +**Arguments** -`expression`: A `Double`. +`expression`: A `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. **Example** `SqlServer.SQRT(3600)` ## SQUARE(expression) -Returns the square of the specified expression. +Returns the square of the specified expression. -**Arguments** +**Arguments** -`expression`: A `Double`. +`expression`: A `Double`. -**Return Value** +**Return Value** -A `Double`. +A `Double`. -**Example** +**Example** `SqlServer.SQUARE(25)` @@ -360,15 +360,15 @@ A `Double`. Calculates the tangent of a specified expression. -**Arguments** +**Arguments** -`expression`: `Double` +`expression`: `Double` -**Return Value** +**Return Value** -`Double` +`Double` -**Example** +**Example** `SqlServer.TAN(45.0)` diff --git a/docs/framework/data/adonet/ef/performance-considerations.md b/docs/framework/data/adonet/ef/performance-considerations.md index 6f479e4f6b59b..8b5a6ca2ddfb7 100644 --- a/docs/framework/data/adonet/ef/performance-considerations.md +++ b/docs/framework/data/adonet/ef/performance-considerations.md @@ -59,8 +59,8 @@ This topic describes performance characteristics of the ADO.NET Entity Framework The following is an example of a nested query in a projection clause: ```sql - SELECT c, (SELECT c, (SELECT c FROM AdventureWorksModel.Vendor AS c ) As Inner2 - FROM AdventureWorksModel.JobCandidate AS c ) As Inner1 + SELECT c, (SELECT c, (SELECT c FROM AdventureWorksModel.Vendor AS c ) As Inner2 + FROM AdventureWorksModel.JobCandidate AS c ) As Inner1 FROM AdventureWorksModel.EmployeeDepartmentHistory AS c ``` diff --git a/docs/framework/data/adonet/ef/provider-manifest-specification.md b/docs/framework/data/adonet/ef/provider-manifest-specification.md index 3bab41a5f93d1..49ce937084049 100644 --- a/docs/framework/data/adonet/ef/provider-manifest-specification.md +++ b/docs/framework/data/adonet/ef/provider-manifest-specification.md @@ -204,7 +204,7 @@ public DbProviderManifest GetProviderManifest(string manifestToken); - + diff --git a/docs/framework/data/adonet/ef/string-functions.md b/docs/framework/data/adonet/ef/string-functions.md index 52d8dedc0f6e3..ac36ab4a4b764 100644 --- a/docs/framework/data/adonet/ef/string-functions.md +++ b/docs/framework/data/adonet/ef/string-functions.md @@ -34,7 +34,7 @@ The .NET Framework Data Provider for SQL Server (SqlClient) provides `String` fu |`UNICODE(expression)`|Returns the integer value, as defined by the Unicode standard, for the first character of the input expression.

**Arguments**

`expression`: A Unicode `String`.

**Return Value**

An `Int32`.

**Example**

`SqlServer.UNICODE('a')`| |`UPPER(expression)`|Returns a `String` expression after converting lowercase character data to uppercase.

**Arguments**

`expression`: An expression of an ASCII or a Unicode String type.

**Return Value**

An ASCII or a Unicode `String` type.

**Example**

`SqlServer.UPPER('AbB')`| - For more information about the `String` functions that SqlClient supports, see [String Functions (Transact-SQL)](/sql/t-sql/functions/string-functions-transact-sql). + For more information about the `String` functions that SqlClient supports, see [String Functions (Transact-SQL)](/sql/t-sql/functions/string-functions-transact-sql). ## See also diff --git a/docs/framework/data/adonet/establishing-the-connection.md b/docs/framework/data/adonet/establishing-the-connection.md index 576a351585280..c0aab4f4bf721 100644 --- a/docs/framework/data/adonet/establishing-the-connection.md +++ b/docs/framework/data/adonet/establishing-the-connection.md @@ -73,7 +73,7 @@ End Using ```csharp // Assumes connectionString is a valid connection string. -using (OleDbConnection connection = +using (OleDbConnection connection = new OleDbConnection(connectionString)) { connection.Open(); @@ -101,7 +101,7 @@ End Using ```csharp // Assumes connectionString is a valid connection string. -using (OdbcConnection connection = +using (OdbcConnection connection = new OdbcConnection(connectionString)) { connection.Open(); @@ -126,7 +126,7 @@ End Using ```csharp // Assumes connectionString is a valid connection string. -using (OracleConnection connection = +using (OracleConnection connection = new OracleConnection(connectionString)) { connection.Open(); diff --git a/docs/framework/data/adonet/generating-commands-with-commandbuilders.md b/docs/framework/data/adonet/generating-commands-with-commandbuilders.md index bb043a62abd63..0fec209b1aff5 100644 --- a/docs/framework/data/adonet/generating-commands-with-commandbuilders.md +++ b/docs/framework/data/adonet/generating-commands-with-commandbuilders.md @@ -48,7 +48,7 @@ When the `SelectCommand` property is dynamically specified at run time, such as To automatically generate SQL statements for a `DataAdapter`, first set the `SelectCommand` property of the `DataAdapter`, then create a `CommandBuilder` object, and specify as an argument the `DataAdapter` for which the `CommandBuilder` will automatically generate SQL statements. ```vb -' Assumes that connection is a valid SqlConnection object +' Assumes that connection is a valid SqlConnection object ' inside of a Using block. Dim adapter As SqlDataAdapter = New SqlDataAdapter( _ "SELECT * FROM dbo.Customers", connection) @@ -98,7 +98,7 @@ adapter.Fill(custDS, "Customers") ```csharp // Assumes an open SqlConnection and SqlDataAdapter inside of a using block. -adapter.SelectCommand.CommandText = +adapter.SelectCommand.CommandText = "SELECT CustomerID, ContactName FROM dbo.Customers"; builder.RefreshSchema(); diff --git a/docs/framework/data/adonet/getschema-and-schema-collections.md b/docs/framework/data/adonet/getschema-and-schema-collections.md index ad4c0e740da67..589d29e58beaa 100644 --- a/docs/framework/data/adonet/getschema-and-schema-collections.md +++ b/docs/framework/data/adonet/getschema-and-schema-collections.md @@ -36,7 +36,7 @@ Module Module1 End Sub Private Function GetConnectionString() As String - ' To avoid storing the connection string in your code, + ' To avoid storing the connection string in your code, ' you can retrieve it from a configuration file. Return "Data Source=(local);Database=AdventureWorks;" _ & "Integrated Security=true;" diff --git a/docs/framework/data/adonet/handling-dataadapter-events.md b/docs/framework/data/adonet/handling-dataadapter-events.md index 56178170a2fc1..9f998d3ebb885 100644 --- a/docs/framework/data/adonet/handling-dataadapter-events.md +++ b/docs/framework/data/adonet/handling-dataadapter-events.md @@ -101,7 +101,7 @@ protected static void OnRowUpdating( { System.IO.TextWriter tw = System.IO.File.AppendText("Deletes.log"); tw.WriteLine( - "{0}: Customer {1} Deleted.", DateTime.Now, + "{0}: Customer {1} Deleted.", DateTime.Now, args.Row["CustomerID", DataRowVersion.Original]); tw.Close(); } @@ -172,7 +172,7 @@ protected static void FillError(object sender, FillErrorEventArgs args) DataRow myRow = args.DataTable.Rows.Add(new object[] {args.Values[0], args.Values[1], DBNull.Value}); //Set the RowError containing the value for the third column. - myRow.RowError = + myRow.RowError = "OverflowException Encountered. Value from data source: " + args.Values[2]; args.Continue = true; diff --git a/docs/framework/data/adonet/method-based-query-syntax-examples-element-operators.md b/docs/framework/data/adonet/method-based-query-syntax-examples-element-operators.md index 97c036473aa96..0a80529c1bfb8 100644 --- a/docs/framework/data/adonet/method-based-query-syntax-examples-element-operators.md +++ b/docs/framework/data/adonet/method-based-query-syntax-examples-element-operators.md @@ -15,8 +15,8 @@ The examples in this topic demonstrate how to use the method to retrieve the fifth address where `PostalCode` == "M4B 1V7". -[!code-csharp[DP LINQ to DataSet Examples#ElementAt](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs#elementat)] -[!code-vb[DP LINQ to DataSet Examples#ElementAt](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/VB/Module1.vb#elementat)] +[!code-csharp[DP LINQ to DataSet Examples#ElementAt](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs#elementat)] +[!code-vb[DP LINQ to DataSet Examples#ElementAt](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/VB/Module1.vb#elementat)] ## First ### Example This example uses the method to return the first contact whose first name is 'Brooke'. -[!code-csharp[DP LINQ to DataSet Examples#FirstSimple](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs#firstsimple)] -[!code-vb[DP LINQ to DataSet Examples#FirstSimple](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/VB/Module1.vb#firstsimple)] +[!code-csharp[DP LINQ to DataSet Examples#FirstSimple](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs#firstsimple)] +[!code-vb[DP LINQ to DataSet Examples#FirstSimple](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/VB/Module1.vb#firstsimple)] ## See also diff --git a/docs/framework/data/adonet/obtaining-a-dbproviderfactory.md b/docs/framework/data/adonet/obtaining-a-dbproviderfactory.md index d41b8d32f507b..c5d18c35f396f 100644 --- a/docs/framework/data/adonet/obtaining-a-dbproviderfactory.md +++ b/docs/framework/data/adonet/obtaining-a-dbproviderfactory.md @@ -19,9 +19,9 @@ The process of obtaining a involves @@ -57,14 +57,14 @@ The process of obtaining a involves - - diff --git a/docs/framework/data/adonet/optimistic-concurrency.md b/docs/framework/data/adonet/optimistic-concurrency.md index 05c4105a05941..0a7fb98601ff0 100644 --- a/docs/framework/data/adonet/optimistic-concurrency.md +++ b/docs/framework/data/adonet/optimistic-concurrency.md @@ -137,7 +137,7 @@ adapter.Update(dataSet, "Customers") Dim dataRow As DataRow For Each dataRow In dataSet.Tables("Customers").Rows - If dataRow.HasErrors Then + If dataRow.HasErrors Then Console.WriteLine(dataRow (0) & vbCrLf & dataRow.RowError) End If Next @@ -192,7 +192,7 @@ foreach (DataRow dataRow in dataSet.Tables["Customers"].Rows) protected static void OnRowUpdated(object sender, SqlRowUpdatedEventArgs args) { - if (args.RecordsAffected == 0) + if (args.RecordsAffected == 0) { args.Row.RowError = "Optimistic Concurrency Violation Encountered"; args.Status = UpdateStatus.SkipCurrentRow; diff --git a/docs/framework/data/adonet/oracle-bfiles.md b/docs/framework/data/adonet/oracle-bfiles.md index 9a4abf29e872c..0a7ce574aafb9 100644 --- a/docs/framework/data/adonet/oracle-bfiles.md +++ b/docs/framework/data/adonet/oracle-bfiles.md @@ -42,20 +42,20 @@ public class Sample connection.Open(); OracleCommand command = connection.CreateCommand(); - command.CommandText = + command.CommandText = "CREATE or REPLACE DIRECTORY MyDir as 'c:\\bfiles'"; command.ExecuteNonQuery(); - command.CommandText = + command.CommandText = "DROP TABLE MyBFileTable"; try { command.ExecuteNonQuery(); } catch { } - command.CommandText = + command.CommandText = "CREATE TABLE MyBFileTable(col1 number, col2 BFILE)"; command.ExecuteNonQuery(); - command.CommandText = + command.CommandText = "INSERT INTO MyBFileTable values ('2', BFILENAME('MyDir', " + "'MyFile.jpg'))"; command.ExecuteNonQuery(); diff --git a/docs/framework/data/adonet/oracle-lobs.md b/docs/framework/data/adonet/oracle-lobs.md index 90eddad3e6c1d..66a6c92e28c78 100644 --- a/docs/framework/data/adonet/oracle-lobs.md +++ b/docs/framework/data/adonet/oracle-lobs.md @@ -21,9 +21,9 @@ The .NET Framework Data Provider for Oracle includes the 0) - Console.WriteLine(blob.LobType + ".Read(" + buffer + ", " + + Console.WriteLine(blob.LobType + ".Read(" + buffer + ", " + buffer.Length + ") => " + actual); // Example - Reading CLOB/NCLOB data (in chunks). - // Note: You can read character data as raw Unicode bytes + // Note: You can read character data as raw Unicode bytes // (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 - // also be used. For example, the - // .NET StreamReader makes it easier to convert the raw bytes + // However, because the OracleLob object inherits directly + // from the .NET stream object, + // all the existing classes that manipluate streams can + // also be used. For example, the + // .NET StreamReader makes it easier to convert the raw bytes // into actual characters. - StreamReader streamreader = + StreamReader streamreader = new StreamReader(clob, Encoding.Unicode); char[] cbuffer = new char[100]; - while((actual = streamreader.Read(cbuffer, + while((actual = streamreader.Read(cbuffer, 0, cbuffer.Length)) >0) Console.WriteLine(clob.LobType + ".Read( - " + new string(cbuffer, 0, actual) + ", " + + " + new string(cbuffer, 0, actual) + ", " + cbuffer.Length + ") => " + actual); // Example - Reading data (all at once). - // You could use StreamReader.ReadToEnd to obtain + // You could use StreamReader.ReadToEnd to obtain // all the string data, or simply - // call OracleLob.Value to obtain a contiguous allocation + // call OracleLob.Value to obtain a contiguous allocation // of all the data. Console.WriteLine(nclob.LobType + ".Value => " + nclob.Value); } @@ -127,15 +127,15 @@ public class LobExample // Obtain a LOB. OracleLob blob = reader.GetOracleLob(1/*0:based ordinal*/); - // Perform any desired operations on the LOB + // Perform any desired operations on the LOB // (read, position, and so on). // Example - Writing binary data (directly to the backend). // To write, you can use any of the stream classes, or write - // raw binary data using - // the OracleLob write method. Writing character vs. binary + // raw binary data using + // the OracleLob write method. Writing character vs. binary // is the same; - // however note that character is always in terms of + // however note that character is always in terms of // Unicode byte counts // (for example, even number of bytes - 2 bytes for every // Unicode character). @@ -147,7 +147,7 @@ public class LobExample Console.WriteLine(blob.LobType + ".Write( " + buffer + ", 0, 2) => " + blob.Value); - // Example - Obtaining a temp LOB and copying data + // Example - Obtaining a temp LOB and copying data // into it from another LOB. OracleLob templob = CreateTempLob(cmd, blob.LobType); long actual = blob.CopyTo(templob); @@ -155,7 +155,7 @@ public class LobExample " + templob.Value + ") => " + actual); // Commit the transaction now that everything succeeded. - // Note: On error, Transaction.Dispose is called + // Note: On error, Transaction.Dispose is called // (from the using statement) // and will automatically roll back the pending transaction. cmd.Transaction.Commit(); @@ -199,10 +199,10 @@ public class LobExample { } - cmd.CommandText = + cmd.CommandText = "CREATE TABLE tablewithlobs (a int, b BLOB, c CLOB, d NCLOB)"; cmd.ExecuteNonQuery(); - cmd.CommandText = + cmd.CommandText = "INSERT INTO tablewithlobs VALUES (1, 'AA', 'AAA', N'AAAA')"; cmd.ExecuteNonQuery(); } @@ -221,7 +221,7 @@ OracleTransaction tx = conn.BeginTransaction(); OracleCommand cmd = conn.CreateCommand(); cmd.Transaction = tx; -cmd.CommandText = +cmd.CommandText = "declare xx blob; begin dbms_lob.createtemporary( xx, false, 0); :tempblob := xx; end;"; cmd.Parameters.Add(new OracleParameter("tempblob", @@ -233,7 +233,7 @@ tempLob.Write(tempbuff,0,tempbuff.Length); tempLob.EndBatch(); cmd.Parameters.Clear(); cmd.CommandText = "myTable.myProc"; -cmd.CommandType = CommandType.StoredProcedure; +cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new OracleParameter( "ImportDoc", OracleType.Blob)).Value = tempLob; cmd.ExecuteNonQuery(); diff --git a/docs/framework/data/adonet/oracle-sequences.md b/docs/framework/data/adonet/oracle-sequences.md index 657c8ccd68b83..f0edc507e106f 100644 --- a/docs/framework/data/adonet/oracle-sequences.md +++ b/docs/framework/data/adonet/oracle-sequences.md @@ -24,7 +24,7 @@ The .NET Framework Data Provider for Oracle provides support for retrieving the ```csharp public void OracleSequence(String connectionString) { - String insertString = + String insertString = "INSERT INTO SequenceTest_Table (ID, OtherColumn)" + "VALUES (SequenceTest_Sequence.NEXTVAL, :OtherColumn)" + "RETURNING ID INTO :ID"; @@ -69,7 +69,7 @@ public void OracleSequence(String connectionString) } Console.WriteLine(); - cmd.CommandText = + cmd.CommandText = "SELECT ID, OtherColumn FROM SequenceTest_Table"; OracleDataAdapter da = new OracleDataAdapter(cmd); da.InsertCommand = new OracleCommand(insertString, conn); diff --git a/docs/framework/data/adonet/oracletypes.md b/docs/framework/data/adonet/oracletypes.md index 4d3c9988a177d..c29ab90761415 100644 --- a/docs/framework/data/adonet/oracletypes.md +++ b/docs/framework/data/adonet/oracletypes.md @@ -51,7 +51,7 @@ public void Setup(string connectionString) ```csharp public void ReadOracleTypesExample(string connectionString) { - OracleConnection myConnection = + OracleConnection myConnection = new OracleConnection(connectionString); myConnection.Open(); OracleCommand myCommand = myConnection.CreateCommand(); @@ -67,25 +67,25 @@ public void ReadOracleTypesExample(string connectionString) //First column, MyVarchar2, is a VARCHAR2 data type in Oracle //Server and maps to OracleString. - OracleString oraclestring1 = + OracleString oraclestring1 = oracledatareader1.GetOracleString(0); Console.WriteLine("OracleString " + oraclestring1.ToString()); //Second column, MyNumber, is a NUMBER data type in Oracle Server //and maps to OracleNumber. - OracleNumber oraclenumber1 = + OracleNumber oraclenumber1 = oracledatareader1.GetOracleNumber(1); Console.WriteLine("OracleNumber " + oraclenumber1.ToString()); //Third column, MyDate, is a DATA data type in Oracle Server //and maps to OracleDateTime. - OracleDateTime oracledatetime1 = + OracleDateTime oracledatetime1 = oracledatareader1.GetOracleDateTime(2); Console.WriteLine("OracleDateTime " + oracledatetime1.ToString()); //Fourth column, MyRaw, is a RAW data type in Oracle Server and //maps to OracleBinary. - OracleBinary oraclebinary1 = + OracleBinary oraclebinary1 = oracledatareader1.GetOracleBinary(3); //Calling value on a null OracleBinary throws //OracleNullValueException; therefore, check for a null value. diff --git a/docs/framework/data/adonet/paging-through-a-query-result.md b/docs/framework/data/adonet/paging-through-a-query-result.md index 369332a3b48b8..859a43d456f10 100644 --- a/docs/framework/data/adonet/paging-through-a-query-result.md +++ b/docs/framework/data/adonet/paging-through-a-query-result.md @@ -51,13 +51,13 @@ Dim adapter As SqlDataAdapter = _ New SqlDataAdapter(orderSQL, connection) Dim dataSet As DataSet = New DataSet() -adapter.Fill(dataSet, "Orders") +adapter.Fill(dataSet, "Orders") ``` ```csharp int pageSize = 5; -string orderSQL = "SELECT TOP " + pageSize + +string orderSQL = "SELECT TOP " + pageSize + " * FROM Orders ORDER BY OrderID"; SqlDataAdapter adapter = new SqlDataAdapter(orderSQL, connection); @@ -73,7 +73,7 @@ Dim lastRecord As String = _ ``` ```csharp -string lastRecord = +string lastRecord = dataSet.Tables["Orders"].Rows[pageSize - 1]["OrderID"].ToString(); ``` @@ -108,7 +108,7 @@ adapter.Fill(dataSet, "Orders") ``` ```csharp -orderSQL = "SELECT TOP " + pageSize + +orderSQL = "SELECT TOP " + pageSize + " * FROM Orders WHERE OrderID > " + lastRecord + " ORDER BY OrderID"; adapter.SelectCommand.CommandText = orderSQL; diff --git a/docs/framework/data/adonet/performance-counters.md b/docs/framework/data/adonet/performance-counters.md index 38db836918685..0ce7b02392c17 100644 --- a/docs/framework/data/adonet/performance-counters.md +++ b/docs/framework/data/adonet/performance-counters.md @@ -32,7 +32,7 @@ ADO.NET 2.0 introduced expanded support for performance counters that includes s ### Connection Pool Groups and Connection Pools When using Windows Authentication (integrated security), you must monitor both the `NumberOfActiveConnectionPoolGroups` and `NumberOfActiveConnectionPools` performance counters. The reason is that connection pool groups map to unique connection strings. When integrated security is used, connection pools map to connection strings and additionally create separate pools for individual Windows identities. For example, if Fred and Julie, each within the same AppDomain, both use the connection string `"Data Source=MySqlServer;Integrated Security=true"`, a connection pool group is created for the connection string, and two additional pools are created, one for Fred and one for Julie. If John and Martha use a connection string with an identical SQL Server login, `"Data Source=MySqlServer;User Id=lowPrivUser;Password=Strong?Password"`, then only a single pool is created for the **lowPrivUser** identity. - + ### Activating Off-By-Default Counters The performance counters `NumberOfFreeConnections`, `NumberOfActiveConnections`, `SoftDisconnectsPerSecond`, and `SoftConnectsPerSecond` are off by default. Add the following information to the application's configuration file to enable them: @@ -68,7 +68,7 @@ Class Program Public Shared Sub Main() Dim prog As Program = New Program - ' Open a connection and create the performance counters. + ' Open a connection and create the performance counters. prog.connection.ConnectionString = _ GetIntegratedSecurityConnectionString() prog.SetUpPerformanceCounters() @@ -165,17 +165,17 @@ Class Program Private Declare Function GetCurrentProcessId Lib "kernel32.dll" () As Integer Private Function GetInstanceName() As String - 'This works for Winforms apps. + 'This works for Winforms apps. Dim instanceName As String = _ System.Reflection.Assembly.GetEntryAssembly.GetName.Name - ' Must replace special characters like (, ), #, /, \\ + ' Must replace special characters like (, ), #, /, \\ Dim instanceName2 As String = _ AppDomain.CurrentDomain.FriendlyName.ToString.Replace("(", "[") _ .Replace(")", "]").Replace("#", "_").Replace("/", "_").Replace("\\", "_") - 'For ASP.NET applications your instanceName will be your CurrentDomain's - 'FriendlyName. Replace the line above that sets the instanceName with this: + 'For ASP.NET applications your instanceName will be your CurrentDomain's + 'FriendlyName. Replace the line above that sets the instanceName with this: 'instanceName = AppDomain.CurrentDomain.FriendlyName.ToString.Replace("(", "[") _ ' .Replace(")", "]").Replace("#", "_").Replace("/", "_").Replace("\\", "_") @@ -195,22 +195,22 @@ Class Program End Sub Private Shared Function GetIntegratedSecurityConnectionString() As String - ' To avoid storing the connection string in your code, - ' you can retrieve it from a configuration file. - Return ("Data Source=.\SqlExpress;Integrated Security=True;" & + ' To avoid storing the connection string in your code, + ' you can retrieve it from a configuration file. + Return ("Data Source=.\SqlExpress;Integrated Security=True;" & "Initial Catalog=AdventureWorks") End Function Private Shared Function GetSqlConnectionString() As String - ' To avoid storing the connection string in your code, - ' you can retrieve it from a configuration file. - Return ("Data Source=.\SqlExpress;User Id=LowPriv;Password=Data!05;" & + ' To avoid storing the connection string in your code, + ' you can retrieve it from a configuration file. + Return ("Data Source=.\SqlExpress;User Id=LowPriv;Password=Data!05;" & "Initial Catalog=AdventureWorks") End Function Private Shared Function GetSqlConnectionStringDifferent() As String - ' To avoid storing the connection string in your code, - ' you can retrieve it from a configuration file. + ' To avoid storing the connection string in your code, + ' you can retrieve it from a configuration file. Return ("Initial Catalog=AdventureWorks;Data Source=.\SqlExpress;" & _ "User Id=LowPriv;Password=Data!05;") End Function @@ -341,7 +341,7 @@ class Program AppDomain.CurrentDomain.FriendlyName.ToString().Replace('(', '[') .Replace(')', ']').Replace('#', '_').Replace('/', '_').Replace('\\', '_'); - // For ASP.NET applications your instanceName will be your CurrentDomain's + // For ASP.NET applications your instanceName will be your CurrentDomain's // FriendlyName. Replace the line above that sets the instanceName with this: // instanceName = AppDomain.CurrentDomain.FriendlyName.ToString().Replace('(','[') // .Replace(')',']').Replace('#','_').Replace('/','_').Replace('\\','_'); diff --git a/docs/framework/data/adonet/performing-batch-operations-using-dataadapters.md b/docs/framework/data/adonet/performing-batch-operations-using-dataadapters.md index d6389d4ba6b1e..8c91f8ca1f276 100644 --- a/docs/framework/data/adonet/performing-batch-operations-using-dataadapters.md +++ b/docs/framework/data/adonet/performing-batch-operations-using-dataadapters.md @@ -76,7 +76,7 @@ public static void BatchUpdate(DataTable dataTable,Int32 batchSize) string connectionString = GetConnectionString(); // Connect to the AdventureWorks database. - using (SqlConnection connection = new + using (SqlConnection connection = new SqlConnection(connectionString)) { @@ -86,19 +86,19 @@ public static void BatchUpdate(DataTable dataTable,Int32 batchSize) // Set the UPDATE command and parameters. adapter.UpdateCommand = new SqlCommand( "UPDATE Production.ProductCategory SET " - + "Name=@Name WHERE ProductCategoryID=@ProdCatID;", + + "Name=@Name WHERE ProductCategoryID=@ProdCatID;", connection); - adapter.UpdateCommand.Parameters.Add("@Name", + adapter.UpdateCommand.Parameters.Add("@Name", SqlDbType.NVarChar, 50, "Name"); - adapter.UpdateCommand.Parameters.Add("@ProdCatID", + adapter.UpdateCommand.Parameters.Add("@ProdCatID", SqlDbType.Int, 4, "ProductCategoryID"); adapter.UpdateCommand.UpdatedRowSource = UpdateRowSource.None; // Set the INSERT command and parameter. adapter.InsertCommand = new SqlCommand( - "INSERT INTO Production.ProductCategory (Name) VALUES (@Name);", + "INSERT INTO Production.ProductCategory (Name) VALUES (@Name);", connection); - adapter.InsertCommand.Parameters.Add("@Name", + adapter.InsertCommand.Parameters.Add("@Name", SqlDbType.NVarChar, 50, "Name"); adapter.InsertCommand.UpdatedRowSource = UpdateRowSource.None; @@ -106,7 +106,7 @@ public static void BatchUpdate(DataTable dataTable,Int32 batchSize) adapter.DeleteCommand = new SqlCommand( "DELETE FROM Production.ProductCategory " + "WHERE ProductCategoryID=@ProdCatID;", connection); - adapter.DeleteCommand.Parameters.Add("@ProdCatID", + adapter.DeleteCommand.Parameters.Add("@ProdCatID", SqlDbType.Int, 4, "ProductCategoryID"); adapter.DeleteCommand.UpdatedRowSource = UpdateRowSource.None; diff --git a/docs/framework/data/adonet/performing-catalog-operations.md b/docs/framework/data/adonet/performing-catalog-operations.md index 9f76cbc1eef6d..cfeba6d4a5233 100644 --- a/docs/framework/data/adonet/performing-catalog-operations.md +++ b/docs/framework/data/adonet/performing-catalog-operations.md @@ -27,11 +27,11 @@ command.ExecuteNonQuery() ```csharp // Assumes connection is a valid SqlConnection. -string queryString = "CREATE PROCEDURE InsertCategory " + +string queryString = "CREATE PROCEDURE InsertCategory " + "@CategoryName nchar(15), " + "@Identity int OUT " + - "AS " + - "INSERT INTO Categories (CategoryName) VALUES(@CategoryName) " + + "AS " + + "INSERT INTO Categories (CategoryName) VALUES(@CategoryName) " + "SET @Identity = @@Identity " + "RETURN @@ROWCOUNT"; diff --git a/docs/framework/data/adonet/populating-a-dataset-from-a-dataadapter.md b/docs/framework/data/adonet/populating-a-dataset-from-a-dataadapter.md index 9795b344d7165..bdda10e6993a3 100644 --- a/docs/framework/data/adonet/populating-a-dataset-from-a-dataadapter.md +++ b/docs/framework/data/adonet/populating-a-dataset-from-a-dataadapter.md @@ -38,7 +38,7 @@ adapter.Fill(customers, "Customers") ```csharp // Assumes that connection is a valid SqlConnection object. -string queryString = +string queryString = "SELECT CustomerID, CompanyName FROM dbo.Customers"; SqlDataAdapter adapter = new SqlDataAdapter(queryString, connection); @@ -73,7 +73,7 @@ ordAdapter.Fill(customerOrders, "Orders") Dim relation As DataRelation = _ customerOrders.Relations.Add("CustOrders", _ - customerOrders.Tables("Customers").Columns("CustomerID"), _ + customerOrders.Tables("Customers").Columns("CustomerID"), _ customerOrders.Tables("Orders").Columns("CustomerID")) Dim pRow, cRow As DataRow diff --git a/docs/framework/data/adonet/protecting-connection-information.md b/docs/framework/data/adonet/protecting-connection-information.md index 452b813bd48ce..cf980a9322faf 100644 --- a/docs/framework/data/adonet/protecting-connection-information.md +++ b/docs/framework/data/adonet/protecting-connection-information.md @@ -14,8 +14,8 @@ Protecting access to your data source is one of the most important goals when se For situations where it is not possible to use Windows authentication, you must use extra care because user credentials are exposed in the connection string. In an ASP.NET application, you can configure a Windows account as a fixed identity that is used to connect to databases and other network resources. You enable impersonation in the identity element in the **web.config** file and specify a user name and password. ```xml - ``` diff --git a/docs/framework/data/adonet/query-expression-syntax-examples-restriction-linq-to-dataset.md b/docs/framework/data/adonet/query-expression-syntax-examples-restriction-linq-to-dataset.md index 0e54bc61c1b45..9755edad7c7c0 100644 --- a/docs/framework/data/adonet/query-expression-syntax-examples-restriction-linq-to-dataset.md +++ b/docs/framework/data/adonet/query-expression-syntax-examples-restriction-linq-to-dataset.md @@ -15,7 +15,7 @@ The examples in this topic demonstrate how to use the method to find orders that were made after December 1, 2002 and then uses the method to get the details for each order. - [!code-csharp[DP LINQ to DataSetExamples#WhereDrillDown](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs#wheredrilldown)] + [!code-csharp[DP LINQ to DataSetExamples#WhereDrillDown](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs#wheredrilldown)] [!code-vb[DP LINQ to DataSet Examples#WhereDrillDown](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/VB/Module1.vb#wheredrilldown)] ## See also diff --git a/docs/framework/data/adonet/ref-cursor-examples.md b/docs/framework/data/adonet/ref-cursor-examples.md index 10fb42c9154d5..93357925fe3aa 100644 --- a/docs/framework/data/adonet/ref-cursor-examples.md +++ b/docs/framework/data/adonet/ref-cursor-examples.md @@ -21,14 +21,14 @@ The REF CURSOR examples are comprised of the following three Microsoft Visual Ba These examples require the following PL/SQL package and package body on your server. Create the following Oracle package on the Oracle server. ```sql -CREATE OR REPLACE PACKAGE CURSPKG AS - TYPE T_CURSOR IS REF CURSOR; - PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER, - IO_CURSOR IN OUT T_CURSOR); - PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR, +CREATE OR REPLACE PACKAGE CURSPKG AS + TYPE T_CURSOR IS REF CURSOR; + PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER, + IO_CURSOR IN OUT T_CURSOR); + PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR, DEPTCURSOR OUT T_CURSOR); END CURSPKG; -/ +/ ``` Create the following Oracle package body on the Oracle server. @@ -37,38 +37,38 @@ END CURSPKG; CREATE OR REPLACE PACKAGE BODY CURSPKG AS PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER, IO_CURSOR IN OUT T_CURSOR) - IS - V_CURSOR T_CURSOR; - BEGIN - IF N_EMPNO <> 0 + IS + V_CURSOR T_CURSOR; + BEGIN + IF N_EMPNO <> 0 THEN - OPEN V_CURSOR FOR - SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME - FROM EMP, DEPT - WHERE EMP.DEPTNO = DEPT.DEPTNO + OPEN V_CURSOR FOR + SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME + FROM EMP, DEPT + WHERE EMP.DEPTNO = DEPT.DEPTNO AND EMP.EMPNO = N_EMPNO; - ELSE - OPEN V_CURSOR FOR - SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME - FROM EMP, DEPT + ELSE + OPEN V_CURSOR FOR + SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME + FROM EMP, DEPT WHERE EMP.DEPTNO = DEPT.DEPTNO; END IF; - IO_CURSOR := V_CURSOR; - END OPEN_ONE_CURSOR; + IO_CURSOR := V_CURSOR; + END OPEN_ONE_CURSOR; PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR, DEPTCURSOR OUT T_CURSOR) - IS - V_CURSOR1 T_CURSOR; - V_CURSOR2 T_CURSOR; - BEGIN + IS + V_CURSOR1 T_CURSOR; + V_CURSOR2 T_CURSOR; + BEGIN OPEN V_CURSOR1 FOR SELECT * FROM EMP; OPEN V_CURSOR2 FOR SELECT * FROM DEPT; - EMPCURSOR := V_CURSOR1; - DEPTCURSOR := V_CURSOR2; - END OPEN_TWO_CURSORS; + EMPCURSOR := V_CURSOR1; + DEPTCURSOR := V_CURSOR2; + END OPEN_TWO_CURSORS; END CURSPKG; / ``` diff --git a/docs/framework/data/adonet/retrieving-binary-data.md b/docs/framework/data/adonet/retrieving-binary-data.md index d227ddb35eb82..c4cd339e9abea 100644 --- a/docs/framework/data/adonet/retrieving-binary-data.md +++ b/docs/framework/data/adonet/retrieving-binary-data.md @@ -22,20 +22,20 @@ Dim command As SqlCommand = New SqlCommand( _ "SELECT pub_id, logo FROM pub_info", connection) ' Writes the BLOB to a file (*.bmp). -Dim stream As FileStream +Dim stream As FileStream ' Streams the binary data to the FileStream object. -Dim writer As BinaryWriter +Dim writer As BinaryWriter ' The size of the BLOB buffer. -Dim bufferSize As Integer = 100 +Dim bufferSize As Integer = 100 ' The BLOB byte() buffer to be filled by GetBytes. -Dim outByte(bufferSize - 1) As Byte +Dim outByte(bufferSize - 1) As Byte ' The bytes returned from GetBytes. -Dim retval As Long +Dim retval As Long ' The starting position in the BLOB output. -Dim startIndex As Long = 0 +Dim startIndex As Long = 0 ' The publisher id to use in the file name. -Dim pubID As String = "" +Dim pubID As String = "" ' Open the connection and read data into the DataReader. connection.Open() @@ -86,21 +86,21 @@ SqlCommand command = new SqlCommand( "SELECT pub_id, logo FROM pub_info", connection); // Writes the BLOB to a file (*.bmp). -FileStream stream; +FileStream stream; // Streams the BLOB to the FileStream object. -BinaryWriter writer; +BinaryWriter writer; // Size of the BLOB buffer. -int bufferSize = 100; +int bufferSize = 100; // The BLOB byte[] buffer to be filled by GetBytes. -byte[] outByte = new byte[bufferSize]; +byte[] outByte = new byte[bufferSize]; // The bytes returned from GetBytes. -long retval; +long retval; // The starting position in the BLOB output. -long startIndex = 0; +long startIndex = 0; // The publisher id to use in the file name. -string pubID = ""; +string pubID = ""; // Open the connection and read data into the DataReader. connection.Open(); @@ -109,7 +109,7 @@ SqlDataReader reader = command.ExecuteReader(CommandBehavior.SequentialAccess); while (reader.Read()) { // Get the publisher id, which must occur before getting the logo. - pubID = reader.GetString(0); + pubID = reader.GetString(0); // Create a file to hold the output. stream = new FileStream( diff --git a/docs/framework/data/adonet/retrieving-data-from-multiple-ref-cursors.md b/docs/framework/data/adonet/retrieving-data-from-multiple-ref-cursors.md index 63b3445673b38..05ea0fc7c3402 100644 --- a/docs/framework/data/adonet/retrieving-data-from-multiple-ref-cursors.md +++ b/docs/framework/data/adonet/retrieving-data-from-multiple-ref-cursors.md @@ -32,16 +32,16 @@ Private Sub Button1_Click( _ rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection) While (rdr.Read()) - REM do something with the values from the EMP table + REM do something with the values from the EMP table End While rdr.NextResult() While (rdr.Read()) - REM do something with the values from the DEPT table + REM do something with the values from the DEPT table End While rdr.Close() End Using -End Sub +End Sub ``` ## See also diff --git a/docs/framework/data/adonet/retrieving-data-using-a-datareader.md b/docs/framework/data/adonet/retrieving-data-using-a-datareader.md index d30a5e65ba666..ce5ce717cd02e 100644 --- a/docs/framework/data/adonet/retrieving-data-using-a-datareader.md +++ b/docs/framework/data/adonet/retrieving-data-using-a-datareader.md @@ -139,21 +139,21 @@ using (OleDbConnection connection = new OleDbConnection( For example, consider the following Oracle package and package body. ```sql -CREATE OR REPLACE PACKAGE CURSPKG AS - TYPE T_CURSOR IS REF CURSOR; - PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR, - DEPTCURSOR OUT T_CURSOR); +CREATE OR REPLACE PACKAGE CURSPKG AS + TYPE T_CURSOR IS REF CURSOR; + PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR, + DEPTCURSOR OUT T_CURSOR); END CURSPKG; -CREATE OR REPLACE PACKAGE BODY CURSPKG AS - PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR, - DEPTCURSOR OUT T_CURSOR) - IS - BEGIN - OPEN EMPCURSOR FOR SELECT * FROM DEMO.EMPLOYEE; - OPEN DEPTCURSOR FOR SELECT * FROM DEMO.DEPARTMENT; - END OPEN_TWO_CURSORS; -END CURSPKG; +CREATE OR REPLACE PACKAGE BODY CURSPKG AS + PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR, + DEPTCURSOR OUT T_CURSOR) + IS + BEGIN + OPEN EMPCURSOR FOR SELECT * FROM DEMO.EMPLOYEE; + OPEN DEPTCURSOR FOR SELECT * FROM DEMO.DEPARTMENT; + END OPEN_TWO_CURSORS; +END CURSPKG; ``` The following code creates an that returns the REF CURSORs from the previous Oracle package by adding two parameters of type to the collection. diff --git a/docs/framework/data/adonet/schema-restrictions.md b/docs/framework/data/adonet/schema-restrictions.md index ed0c6eb38a70c..d5987ee4a86ba 100644 --- a/docs/framework/data/adonet/schema-restrictions.md +++ b/docs/framework/data/adonet/schema-restrictions.md @@ -73,7 +73,7 @@ class Program { static void Main() { - string connectionString = + string connectionString = "Data Source=(local);Database=AdventureWorks;" + "Integrated Security=true;"; using (SqlConnection connection = @@ -92,7 +92,7 @@ class Program { foreach (System.Data.DataColumn col in table.Columns) { - Console.WriteLine("{0} = {1}", + Console.WriteLine("{0} = {1}", col.ColumnName, row[col]); } Console.WriteLine("============================"); diff --git a/docs/framework/data/adonet/single-table-queries-linq-to-dataset.md b/docs/framework/data/adonet/single-table-queries-linq-to-dataset.md index 323277b6c49ea..93a515e3f9993 100644 --- a/docs/framework/data/adonet/single-table-queries-linq-to-dataset.md +++ b/docs/framework/data/adonet/single-table-queries-linq-to-dataset.md @@ -12,7 +12,7 @@ Language-Integrated Query (LINQ) queries work on data sources that implement the The following example gets all the online orders from the SalesOrderHeader table and outputs the order ID, order date, and order number to the console. [!code-csharp[DP LINQ to DataSet Examples#Where1](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/CS/Program.cs#where1)] - [!code-vb[DP LINQ to DataSet Examples#Where1](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/VB/Module1.vb#where1)] + [!code-vb[DP LINQ to DataSet Examples#Where1](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP LINQ to DataSet Examples/VB/Module1.vb#where1)] The local variable query is initialized with a query expression, which operates on one or more information sources by applying one or more query operators from either the standard query operators or, in the case of LINQ to DataSet, operators specific to the class. The query expression in the previous example uses two of the standard query operators: `Where` and `Select`. diff --git a/docs/framework/data/adonet/sql-server-connection-pooling.md b/docs/framework/data/adonet/sql-server-connection-pooling.md index 8b6ada908b80c..e02acb56310ec 100644 --- a/docs/framework/data/adonet/sql-server-connection-pooling.md +++ b/docs/framework/data/adonet/sql-server-connection-pooling.md @@ -29,21 +29,21 @@ Connecting to a database server typically consists of several time-consuming ste using (SqlConnection connection = new SqlConnection( "Integrated Security=SSPI;Initial Catalog=Northwind")) { - connection.Open(); + connection.Open(); // Pool A is created. } using (SqlConnection connection = new SqlConnection( "Integrated Security=SSPI;Initial Catalog=pubs")) { - connection.Open(); + connection.Open(); // Pool B is created because the connection strings differ. } using (SqlConnection connection = new SqlConnection( "Integrated Security=SSPI;Initial Catalog=Northwind")) { - connection.Open(); + connection.Open(); // The connection string matches pool A. } ``` diff --git a/docs/framework/data/adonet/sql/aspnet-apps-using-wait-handles.md b/docs/framework/data/adonet/sql/aspnet-apps-using-wait-handles.md index 26625d397f95e..7f4f155c6fef1 100644 --- a/docs/framework/data/adonet/sql/aspnet-apps-using-wait-handles.md +++ b/docs/framework/data/adonet/sql/aspnet-apps-using-wait-handles.md @@ -31,28 +31,28 @@ Imports System.Threading ' Add this code to the page's class: Private Function GetConnectionString() As String - ' To avoid storing the connection string in your code, - ' you can retrieve it from a configuration file. + ' To avoid storing the connection string in your code, + ' you can retrieve it from a configuration file. - ' If you have not included "Asynchronous Processing=true" + ' If you have not included "Asynchronous Processing=true" ' in the connection string, the command will not be able ' to execute asynchronously. Return "Data Source=(local);Integrated Security=SSPI;" & _ "Initial Catalog=AdventureWorks;" & _ "Asynchronous Processing=true" - End Function + End Function Sub Button1_Click( _ ByVal sender As Object, ByVal e As System.EventArgs) - ' In a real-world application, you might be connecting to + ' In a real-world application, you might be connecting to ' three different servers or databases. For the example, ' we connect to only one. Dim connection1 As New SqlConnection(GetConnectionString()) Dim connection2 As New SqlConnection(GetConnectionString()) Dim connection3 As New SqlConnection(GetConnectionString()) - ' To keep the example simple, all three asynchronous + ' To keep the example simple, all three asynchronous ' processes select a row from the same table. WAITFOR ' commands are used to emulate long-running processes ' that complete after different periods of time. @@ -74,7 +74,7 @@ Imports System.Threading Dim waitHandles(2) As WaitHandle Try ' For each process, open a connection and begin execution. - ' Use the IAsyncResult object returned by + ' Use the IAsyncResult object returned by ' BeginExecuteReader to add a WaitHandle for the process ' to the array. connection1.Open() @@ -102,10 +102,10 @@ Imports System.Threading ' array element whose process just completed, or ' the WaitTimeout value. index = WaitHandle.WaitAny(waitHandles, 60000, False) - ' This example doesn't actually do anything with the - ' data returned by the processes, but the code opens + ' This example doesn't actually do anything with the + ' data returned by the processes, but the code opens ' readers for each just to demonstrate the concept. - ' Instead of using the returned data to fill the + ' Instead of using the returned data to fill the ' controls on the page, the example adds the time ' the process was completed to the corresponding ' text box. @@ -169,9 +169,9 @@ using System.Data.SqlClient; // Add this code to the page's class string GetConnectionString() - // To avoid storing the connection string in your code, - // you can retrieve it from a configuration file. - // If you have not included "Asynchronous Processing=true" + // To avoid storing the connection string in your code, + // you can retrieve it from a configuration file. + // If you have not included "Asynchronous Processing=true" // in the connection string, the command will not be able // to execute asynchronously. { @@ -181,34 +181,34 @@ string GetConnectionString() } void Button1_Click(object sender, System.EventArgs e) { - // In a real-world application, you might be connecting to + // In a real-world application, you might be connecting to // three different servers or databases. For the example, // we connect to only one. - SqlConnection connection1 = + SqlConnection connection1 = new SqlConnection(GetConnectionString()); - SqlConnection connection2 = + SqlConnection connection2 = new SqlConnection(GetConnectionString()); - SqlConnection connection3 = + SqlConnection connection3 = new SqlConnection(GetConnectionString()); - // To keep the example simple, all three asynchronous + // To keep the example simple, all three asynchronous // processes select a row from the same table. WAITFOR // commands are used to emulate long-running processes // that complete after different periods of time. - string commandText1 = "WAITFOR DELAY '0:0:01';" + - "SELECT * FROM Production.Product " + + string commandText1 = "WAITFOR DELAY '0:0:01';" + + "SELECT * FROM Production.Product " + "WHERE ProductNumber = 'BL-2036'"; - string commandText2 = "WAITFOR DELAY '0:0:05';" + - "SELECT * FROM Production.Product " + + string commandText2 = "WAITFOR DELAY '0:0:05';" + + "SELECT * FROM Production.Product " + "WHERE ProductNumber = 'BL-2036'"; - string commandText3 = "WAITFOR DELAY '0:0:10';" + - "SELECT * FROM Production.Product " + + string commandText3 = "WAITFOR DELAY '0:0:10';" + + "SELECT * FROM Production.Product " + "WHERE ProductNumber = 'BL-2036'"; try - // For each process, open a connection and begin - // execution. Use the IAsyncResult object returned by - // BeginExecuteReader to add a WaitHandle for the + // For each process, open a connection and begin + // execution. Use the IAsyncResult object returned by + // BeginExecuteReader to add a WaitHandle for the // process to the array. { connection1.Open(); @@ -236,18 +236,18 @@ void Button1_Click(object sender, System.EventArgs e) int index; for (int countWaits = 0; countWaits <= 2; countWaits++) { - // WaitAny waits for any of the processes to - // complete. The return value is either the index - // of the array element whose process just + // WaitAny waits for any of the processes to + // complete. The return value is either the index + // of the array element whose process just // completed, or the WaitTimeout value. - index = WaitHandle.WaitAny(waitHandles, + index = WaitHandle.WaitAny(waitHandles, 60000, false); - // This example doesn't actually do anything with - // the data returned by the processes, but the - // code opens readers for each just to demonstrate + // This example doesn't actually do anything with + // the data returned by the processes, but the + // code opens readers for each just to demonstrate // the concept. - // Instead of using the returned data to fill the + // Instead of using the returned data to fill the // controls on the page, the example adds the time // the process was completed to the corresponding // text box. @@ -256,11 +256,11 @@ void Button1_Click(object sender, System.EventArgs e) { case 0: SqlDataReader reader1; - reader1 = + reader1 = command1.EndExecuteReader(result1); if (reader1.Read()) { - TextBox1.Text = + TextBox1.Text = "Completed " + System.DateTime.Now.ToLongTimeString(); } @@ -268,11 +268,11 @@ void Button1_Click(object sender, System.EventArgs e) break; case 1: SqlDataReader reader2; - reader2 = + reader2 = command2.EndExecuteReader(result2); if (reader2.Read()) { - TextBox2.Text = + TextBox2.Text = "Completed " + System.DateTime.Now.ToLongTimeString(); } @@ -280,11 +280,11 @@ void Button1_Click(object sender, System.EventArgs e) break; case 2: SqlDataReader reader3; - reader3 = + reader3 = command3.EndExecuteReader(result3); if (reader3.Read()) { - TextBox3.Text = + TextBox3.Text = "Completed " + System.DateTime.Now.ToLongTimeString(); } @@ -324,27 +324,27 @@ Imports System.Threading ' Add this code to the page's class: Private Function GetConnectionString() As String - ' To avoid storing the connection string in your code, - ' you can retrieve it from a configuration file. + ' To avoid storing the connection string in your code, + ' you can retrieve it from a configuration file. - ' If you have not included "Asynchronous Processing=true" + ' If you have not included "Asynchronous Processing=true" ' in the connection string, the command will not be able ' to execute asynchronously. Return "Data Source=(local);Integrated Security=SSPI;" & _ "Initial Catalog=AdventureWorks;" & _ "Asynchronous Processing=true" - End Function + End Function Sub Button1_Click( _ ByVal sender As Object, ByVal e As System.EventArgs) - ' In a real-world application, you might be connecting to + ' In a real-world application, you might be connecting to ' three different servers or databases. For the example, ' we connect to only one. Dim connection1 As New SqlConnection(GetConnectionString()) Dim connection2 As New SqlConnection(GetConnectionString()) Dim connection3 As New SqlConnection(GetConnectionString()) - ' To keep the example simple, all three asynchronous + ' To keep the example simple, all three asynchronous ' processes select a row from the same table. WAITFOR ' commands are used to emulate long-running processes ' that complete after different periods of time. @@ -379,7 +379,7 @@ Imports System.Threading Try ' For each process, open a connection and begin execution. - ' Use the IAsyncResult object returned by + ' Use the IAsyncResult object returned by ' BeginExecuteReader to add a WaitHandle for the process ' to the array. connection1.Open() @@ -401,7 +401,7 @@ Imports System.Threading waitHandles(2) = result3.AsyncWaitHandle ' WaitAll waits for all of the processes to complete. - ' The return value is True if all processes completed, + ' The return value is True if all processes completed, ' False if any process timed out. Dim result As Boolean = _ WaitHandle.WaitAll(waitHandles, 60000, False) @@ -452,9 +452,9 @@ using System.Data.SqlClient; // Add this code to the page's class string GetConnectionString() - // To avoid storing the connection string in your code, - // you can retrieve it from a configuration file. - // If you have not included "Asynchronous Processing=true" + // To avoid storing the connection string in your code, + // you can retrieve it from a configuration file. + // If you have not included "Asynchronous Processing=true" // in the connection string, the command will not be able // to execute asynchronously. { @@ -464,23 +464,23 @@ string GetConnectionString() } void Button1_Click(object sender, System.EventArgs e) { - // In a real-world application, you might be connecting to + // In a real-world application, you might be connecting to // three different servers or databases. For the example, // we connect to only one. - SqlConnection connection1 = + SqlConnection connection1 = new SqlConnection(GetConnectionString()); - SqlConnection connection2 = + SqlConnection connection2 = new SqlConnection(GetConnectionString()); - SqlConnection connection3 = + SqlConnection connection3 = new SqlConnection(GetConnectionString()); - // To keep the example simple, all three asynchronous + // To keep the example simple, all three asynchronous // processes execute UPDATE queries that result in // no change to the data. WAITFOR // commands are used to emulate long-running processes // that complete after different periods of time. - string commandText1 = + string commandText1 = "UPDATE Production.Product " + "SET ReorderPoint = ReorderPoint + 1 " + "WHERE ReorderPoint Is Not Null;" + @@ -489,7 +489,7 @@ void Button1_Click(object sender, System.EventArgs e) "SET ReorderPoint = ReorderPoint - 1 " + "WHERE ReorderPoint Is Not Null"; - string commandText2 = + string commandText2 = "UPDATE Production.Product " + "SET ReorderPoint = ReorderPoint + 1 " + "WHERE ReorderPoint Is Not Null;" + @@ -507,9 +507,9 @@ void Button1_Click(object sender, System.EventArgs e) "SET ReorderPoint = ReorderPoint - 1 " + "WHERE ReorderPoint Is Not Null"; try - // For each process, open a connection and begin - // execution. Use the IAsyncResult object returned by - // BeginExecuteReader to add a WaitHandle for the + // For each process, open a connection and begin + // execution. Use the IAsyncResult object returned by + // BeginExecuteReader to add a WaitHandle for the // process to the array. { connection1.Open(); @@ -535,7 +535,7 @@ void Button1_Click(object sender, System.EventArgs e) }; bool result; - // WaitAll waits for all of the processes to + // WaitAll waits for all of the processes to // complete. The return value is True if the processes // all completed successfully, False if any process // timed out. @@ -543,16 +543,16 @@ void Button1_Click(object sender, System.EventArgs e) result = WaitHandle.WaitAll(waitHandles, 60000, false); if(result) { - long rowCount1 = + long rowCount1 = command1.EndExecuteNonQuery(result1); TextBox1.Text = "Completed " + System.DateTime.Now.ToLongTimeString(); - long rowCount2 = + long rowCount2 = command2.EndExecuteNonQuery(result2); TextBox2.Text = "Completed " + System.DateTime.Now.ToLongTimeString(); - long rowCount3 = + long rowCount3 = command3.EndExecuteNonQuery(result3); TextBox3.Text = "Completed " + System.DateTime.Now.ToLongTimeString(); diff --git a/docs/framework/data/adonet/sql/bulk-copy-example-setup.md b/docs/framework/data/adonet/sql/bulk-copy-example-setup.md index ef036e89bcf24..1a0f50df6b917 100644 --- a/docs/framework/data/adonet/sql/bulk-copy-example-setup.md +++ b/docs/framework/data/adonet/sql/bulk-copy-example-setup.md @@ -19,7 +19,7 @@ The class can be used to write data onl ```sql USE AdventureWorks -IF EXISTS (SELECT * FROM dbo.sysobjects +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BulkCopyDemoMatchingColumns]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE [dbo].[BulkCopyDemoMatchingColumns] @@ -32,7 +32,7 @@ CREATE TABLE [dbo].[BulkCopyDemoMatchingColumns]([ProductID] [int] IDENTITY(1,1) [ProductID] ASC ) ON [PRIMARY]) ON [PRIMARY] -IF EXISTS (SELECT * FROM dbo.sysobjects +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BulkCopyDemoDifferentColumns]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE [dbo].[BulkCopyDemoDifferentColumns] @@ -45,7 +45,7 @@ CREATE TABLE [dbo].[BulkCopyDemoDifferentColumns]([ProdID] [int] IDENTITY(1,1) N [ProdID] ASC ) ON [PRIMARY]) ON [PRIMARY] -IF EXISTS (SELECT * FROM dbo.sysobjects +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BulkCopyDemoOrderHeader]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE [dbo].[BulkCopyDemoOrderHeader] @@ -58,7 +58,7 @@ CREATE TABLE [dbo].[BulkCopyDemoOrderHeader]([SalesOrderID] [int] IDENTITY(1,1) [SalesOrderID] ASC ) ON [PRIMARY]) ON [PRIMARY] -IF EXISTS (SELECT * FROM dbo.sysobjects +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[BulkCopyDemoOrderDetail]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE [dbo].[BulkCopyDemoOrderDetail] diff --git a/docs/framework/data/adonet/sql/date-and-time-data.md b/docs/framework/data/adonet/sql/date-and-time-data.md index a46615ec4ccc9..a19b3c0a358be 100644 --- a/docs/framework/data/adonet/sql/date-and-time-data.md +++ b/docs/framework/data/adonet/sql/date-and-time-data.md @@ -53,7 +53,7 @@ SQL Server 2008 introduces new data types for handling date and time information - `SqlDbType.DateTimeOffSet` -You can specify the data type of a by using one of the preceding enumerations. +You can specify the data type of a by using one of the preceding enumerations. > [!NOTE] > You cannot set the `DbType` property of a `SqlParameter` to `SqlDbType.Date`. @@ -169,7 +169,7 @@ parameter.Value = DateTimeOffset.Parse("1666-09-02 1:00:00+0"); You can also supply parameters by using the `AddWithValue` method of a , as shown in the following code fragment. However, the `AddWithValue` method does not allow you to specify the or for the parameter. ```csharp -command.Parameters.AddWithValue( +command.Parameters.AddWithValue( "@date", DateTimeOffset.Parse("16660902")); ``` diff --git a/docs/framework/data/adonet/sql/enabling-multiple-active-result-sets.md b/docs/framework/data/adonet/sql/enabling-multiple-active-result-sets.md index 69e5ad57c5c70..40409e4128727 100644 --- a/docs/framework/data/adonet/sql/enabling-multiple-active-result-sets.md +++ b/docs/framework/data/adonet/sql/enabling-multiple-active-result-sets.md @@ -26,7 +26,7 @@ Dim connectionString As String = "Data Source=MSSQL1;" & _ ``` ```csharp -string connectionString = "Data Source=MSSQL1;" + +string connectionString = "Data Source=MSSQL1;" + "Initial Catalog=AdventureWorks;Integrated Security=SSPI;" + "MultipleActiveResultSets=True"; ``` @@ -40,7 +40,7 @@ Dim connectionString As String = "Data Source=MSSQL1;" & _ ``` ```csharp -string connectionString = "Data Source=MSSQL1;" + +string connectionString = "Data Source=MSSQL1;" + "Initial Catalog=AdventureWorks;Integrated Security=SSPI;" + "MultipleActiveResultSets=False"; ``` diff --git a/docs/framework/data/adonet/sql/enumerating-instances-of-sql-server.md b/docs/framework/data/adonet/sql/enumerating-instances-of-sql-server.md index 2e947246146a3..a2572bb7f51b8 100644 --- a/docs/framework/data/adonet/sql/enumerating-instances-of-sql-server.md +++ b/docs/framework/data/adonet/sql/enumerating-instances-of-sql-server.md @@ -21,7 +21,7 @@ Dim instance As System.Data.Sql.SqlDataSourceEnumerator = _ ``` ```csharp -System.Data.Sql.SqlDataSourceEnumerator instance = +System.Data.Sql.SqlDataSourceEnumerator instance = System.Data.Sql.SqlDataSourceEnumerator.Instance ``` diff --git a/docs/framework/data/adonet/sql/handling-null-values.md b/docs/framework/data/adonet/sql/handling-null-values.md index e1f7d4f22e936..e3038914057f5 100644 --- a/docs/framework/data/adonet/sql/handling-null-values.md +++ b/docs/framework/data/adonet/sql/handling-null-values.md @@ -132,7 +132,7 @@ SqlString.Equals shared/static method: Two empty strings=True String.Equals instance method: - Two empty strings=True + Two empty strings=True ``` ## See also diff --git a/docs/framework/data/adonet/sql/inserting-an-image-from-a-file.md b/docs/framework/data/adonet/sql/inserting-an-image-from-a-file.md index 57b86d6ddd1c9..c885afe6fcfa2 100644 --- a/docs/framework/data/adonet/sql/inserting-an-image-from-a-file.md +++ b/docs/framework/data/adonet/sql/inserting-an-image-from-a-file.md @@ -33,7 +33,7 @@ Public Shared Sub AddEmployee( _ "INSERT INTO Employees (LastName, FirstName, Title, " & _ "HireDate, ReportsTo, Photo) " & _ "Values(@LastName, @FirstName, @Title, " & _ - "@HireDate, @ReportsTo, @Photo)", connection) + "@HireDate, @ReportsTo, @Photo)", connection) command.Parameters.Add("@LastName", _ SqlDbType.NVarChar, 20).Value = lastName @@ -71,12 +71,12 @@ End Function ```csharp public static void AddEmployee( - string lastName, - string firstName, - string title, - DateTime hireDate, - int reportsTo, - string photoFilePath, + string lastName, + string firstName, + string title, + DateTime hireDate, + int reportsTo, + string photoFilePath, string connectionString) { byte[] photo = GetPhoto(photoFilePath); @@ -88,17 +88,17 @@ public static void AddEmployee( "INSERT INTO Employees (LastName, FirstName, " + "Title, HireDate, ReportsTo, Photo) " + "Values(@LastName, @FirstName, @Title, " + - "@HireDate, @ReportsTo, @Photo)", connection); + "@HireDate, @ReportsTo, @Photo)", connection); - command.Parameters.Add("@LastName", + command.Parameters.Add("@LastName", SqlDbType.NVarChar, 20).Value = lastName; - command.Parameters.Add("@FirstName", + command.Parameters.Add("@FirstName", SqlDbType.NVarChar, 10).Value = firstName; - command.Parameters.Add("@Title", + command.Parameters.Add("@Title", SqlDbType.NVarChar, 30).Value = title; - command.Parameters.Add("@HireDate", + command.Parameters.Add("@HireDate", SqlDbType.DateTime).Value = hireDate; - command.Parameters.Add("@ReportsTo", + command.Parameters.Add("@ReportsTo", SqlDbType.Int).Value = reportsTo; command.Parameters.Add("@Photo", diff --git a/docs/framework/data/adonet/sql/large-udts.md b/docs/framework/data/adonet/sql/large-udts.md index 5f29cc2a23363..601cee46e4d88 100644 --- a/docs/framework/data/adonet/sql/large-udts.md +++ b/docs/framework/data/adonet/sql/large-udts.md @@ -74,7 +74,7 @@ User-defined types (UDTs) allow a developer to extend the server's scalar type s The following code fragment demonstrates how to retrieve large UDT data. The `connectionString` variable assumes a valid connection to a SQL Server database and the `commandString` variable assumes a valid SELECT statement with the primary key column listed first. ```csharp -using (SqlConnection connection = new SqlConnection( +using (SqlConnection connection = new SqlConnection( connectionString, commandString)) { connection.Open(); diff --git a/docs/framework/data/adonet/sql/linq/data-retrieval-and-cud-operations-in-n-tier-applications.md b/docs/framework/data/adonet/sql/linq/data-retrieval-and-cud-operations-in-n-tier-applications.md index 08a001f796fd1..4f0795832294d 100644 --- a/docs/framework/data/adonet/sql/linq/data-retrieval-and-cud-operations-in-n-tier-applications.md +++ b/docs/framework/data/adonet/sql/linq/data-retrieval-and-cud-operations-in-n-tier-applications.md @@ -53,15 +53,15 @@ End Function private void GetProdsByCat_Click(object sender, EventArgs e) { // Create the WCF client proxy. - NorthwindServiceReference.Service1Client proxy = + NorthwindServiceReference.Service1Client proxy = new NorthwindClient.NorthwindServiceReference.Service1Client(); // Call the method on the service. - NorthwindServiceReference.Product[] products = + NorthwindServiceReference.Product[] products = proxy.GetProductsByCategory(1); - // If the database uses original values for concurrency checks, - // the client needs to store them and pass them back to the + // If the database uses original values for concurrency checks, + // the client needs to store them and pass them back to the // middle tier along with the new values when updating data. foreach (var v in products) { @@ -101,7 +101,7 @@ End Function ```csharp public IEnumerable GetProductsByCategory(int categoryID) { - NorthwindClasses1DataContext db = + NorthwindClasses1DataContext db = new NorthwindClasses1DataContext(connectionString); IEnumerable productQuery = @@ -109,7 +109,7 @@ public IEnumerable GetProductsByCategory(int categoryID) where prod.CategoryID == categoryID select prod; - return productQuery.AsEnumerable(); + return productQuery.AsEnumerable(); } ``` @@ -363,7 +363,7 @@ public void UpdateProductInfo(Product newProd, Product originalProd) // is appropriate for your application. // For more information, see the MSDN article // How to: Manage Change Conflicts (LINQ to SQL)/ - } + } } } ``` diff --git a/docs/framework/data/adonet/sql/linq/downloading-sample-databases.md b/docs/framework/data/adonet/sql/linq/downloading-sample-databases.md index e047f171ca47a..115674457a1cb 100644 --- a/docs/framework/data/adonet/sql/linq/downloading-sample-databases.md +++ b/docs/framework/data/adonet/sql/linq/downloading-sample-databases.md @@ -46,7 +46,7 @@ After you download one of the database backup (\*.bak) files, restore the backup ## Get SQL Server Management Studio If you want to view or modify a database that you've downloaded, you can use SQL Server Management Studio (SSMS). Download SSMS from the following page: -[Download SQL Server Management Studio (SSMS)](/sql/ssms/download-sql-server-management-studio-ssms) +[Download SQL Server Management Studio (SSMS)](/sql/ssms/download-sql-server-management-studio-ssms) You can also view and manage databases in the Visual Studio integrated development environment (IDE). In [Visual Studio](https://www.visualstudio.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=button+cta&utm_content=download+vs2017), connect to the database from **SQL Server Object Explorer**, or create a Data Connection to the database in **Server Explorer**. Open these explorer panes from the **View** menu. diff --git a/docs/framework/data/adonet/sql/linq/how-to-map-database-relationships.md b/docs/framework/data/adonet/sql/linq/how-to-map-database-relationships.md index 787327db2f257..ff4e387f12270 100644 --- a/docs/framework/data/adonet/sql/linq/how-to-map-database-relationships.md +++ b/docs/framework/data/adonet/sql/linq/how-to-map-database-relationships.md @@ -26,7 +26,7 @@ You can encode as property references in your entity class any data relationship > [!NOTE] > Relationships in relational databases are typically modeled as foreign key values that refer to primary keys in other tables. To navigate between them you explicitly associate the two tables by using a relational *join* operation. - > + > > Objects in [!INCLUDE[vbtecdlinq](../../../../../../includes/vbtecdlinq-md.md)], on the other hand, refer to each other by using property references or collections of references that you navigate by using *dot* notation. ## Example diff --git a/docs/framework/data/adonet/sql/linq/how-to-use-stored-procedures-that-take-parameters.md b/docs/framework/data/adonet/sql/linq/how-to-use-stored-procedures-that-take-parameters.md index 0585c2b06af30..73096c6349f53 100644 --- a/docs/framework/data/adonet/sql/linq/how-to-use-stored-procedures-that-take-parameters.md +++ b/docs/framework/data/adonet/sql/linq/how-to-use-stored-procedures-that-take-parameters.md @@ -15,7 +15,7 @@ ms.assetid: b935fd84-cb9c-4205-8c48-658d5db2ec93 The following example takes a single input parameter (the customer ID) and returns an out parameter (the total sales for that customer). ```sql -CREATE PROCEDURE [dbo].[CustOrderTotal] +CREATE PROCEDURE [dbo].[CustOrderTotal] @CustomerID nchar(5), @TotalSales money OUTPUT AS diff --git a/docs/framework/data/adonet/sql/linq/implementing-business-logic-linq-to-sql.md b/docs/framework/data/adonet/sql/linq/implementing-business-logic-linq-to-sql.md index 740e87f8e751b..a61562ea17e57 100644 --- a/docs/framework/data/adonet/sql/linq/implementing-business-logic-linq-to-sql.md +++ b/docs/framework/data/adonet/sql/linq/implementing-business-logic-linq-to-sql.md @@ -160,7 +160,7 @@ End Class ``` ```csharp -partial class Customer +partial class Customer { partial void OnCustomerIDChanging(string value) { diff --git a/docs/framework/data/adonet/sql/linq/index.md b/docs/framework/data/adonet/sql/linq/index.md index 829880742a87b..2aa4a9127a2c9 100644 --- a/docs/framework/data/adonet/sql/linq/index.md +++ b/docs/framework/data/adonet/sql/linq/index.md @@ -31,7 +31,7 @@ ms.assetid: 73d13345-eece-471a-af40-4cc7a2f11655 ## Related Sections [Language-Integrated Query (LINQ) - C#](../../../../../csharp/programming-guide/concepts/linq/index.md)\ Provides overviews of LINQ technologies in C#. - + [Language-Integrated Query (LINQ) - Visual Basic](../../../../../visual-basic/programming-guide/concepts/linq/index.md) Provides overviews of LINQ technologies in Visual Basic. diff --git a/docs/framework/data/adonet/sql/linq/n-tier-and-remote-applications-with-linq-to-sql.md b/docs/framework/data/adonet/sql/linq/n-tier-and-remote-applications-with-linq-to-sql.md index 31dcb7142ca0d..770289366a365 100644 --- a/docs/framework/data/adonet/sql/linq/n-tier-and-remote-applications-with-linq-to-sql.md +++ b/docs/framework/data/adonet/sql/linq/n-tier-and-remote-applications-with-linq-to-sql.md @@ -17,7 +17,7 @@ You can create n-tier or multitier applications that use [!INCLUDE[vbtecdlinq](. - [LINQ to SQL N-Tier with ASP.NET](linq-to-sql-n-tier-with-aspnet.md) -- [LINQ to SQL N-Tier with Web Services](linq-to-sql-n-tier-with-web-services.md) +- [LINQ to SQL N-Tier with Web Services](linq-to-sql-n-tier-with-web-services.md) - [Implementing N-Tier Business Logic](implementing-business-logic-linq-to-sql.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 261f64ebcc06d..0a6eb8b0bef62 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 @@ -28,16 +28,16 @@ In LINQ to SQL, the data model of a relational database maps to an object model - [Miscellaneous Mapping](#MiscMapping) - + ## Default Type Mapping You can create the object model or external mapping file automatically with the Object Relational Designer (O/R Designer) or the SQLMetal command-line tool. The default type mappings for these tools define which CLR types are chosen to map to columns inside the SQL Server database. For more information about using these tools, see [Creating the Object Model](creating-the-object-model.md). You can also use the method to create a SQL Server database based on the mapping information in the object model or external mapping file. The default type mappings for the method define which type of SQL Server columns are created to map to the CLR types in the object model. For more information, see [How to: Dynamically Create a Database](how-to-dynamically-create-a-database.md). - + ## Type Mapping Run-time Behavior Matrix The following diagram shows the expected run-time behavior of specific type mappings when data is retrieved from or saved to the database. With the exception of serialization, LINQ to SQL does not support mapping between any CLR or SQL Server data types that are not specified in this matrix. For more information on serialization support, see [Binary Serialization](#BinarySerialization). - + ![SQL Server to SQL CLR data type mapping table](./media/sql-clr-type-mapping.png) > [!NOTE] @@ -46,7 +46,7 @@ In LINQ to SQL, the data model of a relational database maps to an object model ### Custom Type Mapping With LINQ to SQL, you are not limited to the default type mappings used by the O/R Designer, SQLMetal, and the method. You can create custom type mappings by explicitly specifying them in a DBML file. Then you can use that DBML file to create the object model code and mapping file. For more information, see [SQL-CLR Custom Type Mappings](sql-clr-custom-type-mappings.md). - + ## Behavior Differences Between CLR and SQL Execution Because of differences in precision and execution between the CLR and SQL Server, you may receive different results or experience different behavior depending on where you perform your calculations. Calculations performed in LINQ to SQL queries are actually translated to Transact-SQL and then executed on the SQL Server database. Calculations performed outside LINQ to SQL queries are executed within the context of the CLR. @@ -58,7 +58,7 @@ In LINQ to SQL, the data model of a relational database maps to an object model - SQL Server may return different values for some mapped functions than the CLR. For example, equality functions will differ because SQL Server considers two strings to be equal if they only differ in trailing white space; whereas the CLR considers them to be not equal. - + ## Enum Mapping LINQ to SQL supports mapping the CLR type to SQL Server types in two ways: @@ -79,7 +79,7 @@ In LINQ to SQL, the data model of a relational database maps to an object model The method creates a SQL column of numeric type to map a CLR type. - + ## Numeric Mapping LINQ to SQL lets you map many CLR and SQL Server numeric types. The following table shows the CLR types that O/R Designer and SQLMetal select when building an object model or external mapping file based on your database. @@ -120,7 +120,7 @@ In LINQ to SQL, the data model of a relational database maps to an object model The SQL Server `MONEY` and `SMALLMONEY` types, which are also paired with the CLR type by default, have a much smaller precision, which can result in overflow or data loss exceptions when saving data to the database. - + ## Text and XML Mapping There are also many text-based and XML types that you can map with LINQ to SQL. The following table shows the CLR types that O/R Designer and SQLMetal select when building an object model or external mapping file based on your database. @@ -164,7 +164,7 @@ In LINQ to SQL, the data model of a relational database maps to an object model > [!NOTE] > LINQ to SQL does not support serialization by using . - + ## Date and Time Mapping With LINQ to SQL, you can map many SQL Server date and time types. The following table shows the CLR types that O/R Designer and SQLMetal select when building an object model or external mapping file based on your database. @@ -200,7 +200,7 @@ In LINQ to SQL, the data model of a relational database maps to an object model In Microsoft SQL Server 2000 and SQL Server 2005, you cannot map database fields to . However, operations on are supported because values can be returned from subtraction or introduced into an expression as a literal or bound variable. - + ## Binary Mapping There are many SQL Server types that can map to the CLR type . The following table shows the SQL Server types that cause O/R Designer and SQLMetal to define a CLR type when building an object model or external mapping file based on your database. @@ -228,11 +228,11 @@ In LINQ to SQL, the data model of a relational database maps to an object model Although you can map `VARBINARY(MAX)` columns with the `FILESTREAM` attribute to objects, the method is unable to automatically create columns with the `FILESTREAM` attribute. For more information about `FILESTREAM`, see [FILESTREAM Overview](https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/bb933993(v=sql.105)). - + ### Binary Serialization If a class implements the interface, you can serialize an object to any SQL binary field (`BINARY`, `VARBINARY`, `IMAGE`). The object is serialized and deserialized according to how the interface is implemented. For more information, see [Binary Serialization](../../../../../standard/serialization/binary-serialization.md). - + ## Miscellaneous Mapping The following table shows the default type mappings for some miscellaneous types that have not yet been mentioned. The following table shows the CLR types that O/R Designer and SQLMetal select when building an object model or external mapping file based on your database. diff --git a/docs/framework/data/adonet/sql/manipulating-data.md b/docs/framework/data/adonet/sql/manipulating-data.md index c36a9c563085a..790c687140ef4 100644 --- a/docs/framework/data/adonet/sql/manipulating-data.md +++ b/docs/framework/data/adonet/sql/manipulating-data.md @@ -38,7 +38,7 @@ Module Module1 Dim productCmd As SqlCommand Dim productReader As SqlDataReader - Dim vendorSQL As String = & _ + Dim vendorSQL As String = & _ "SELECT VendorId, Name FROM Purchasing.Vendor" Dim productSQL As String = _ "SELECT Production.Product.Name FROM Production.Product " & _ @@ -102,20 +102,20 @@ static void Main() int vendorID; SqlDataReader productReader = null; - string vendorSQL = + string vendorSQL = "SELECT VendorId, Name FROM Purchasing.Vendor"; - string productSQL = + string productSQL = "SELECT Production.Product.Name FROM Production.Product " + "INNER JOIN Purchasing.ProductVendor " + - "ON Production.Product.ProductID = " + + "ON Production.Product.ProductID = " + "Purchasing.ProductVendor.ProductID " + "WHERE Purchasing.ProductVendor.VendorID = @VendorId"; - using (SqlConnection awConnection = + using (SqlConnection awConnection = new SqlConnection(connectionString)) { SqlCommand vendorCmd = new SqlCommand(vendorSQL, awConnection); - SqlCommand productCmd = + SqlCommand productCmd = new SqlCommand(productSQL, awConnection); productCmd.Parameters.Add("@VendorId", SqlDbType.Int); @@ -151,7 +151,7 @@ static void Main() { // To avoid storing the connection string in your code, // you can retrieve it from a configuration file. - return "Data Source=(local);Integrated Security=SSPI;" + + return "Data Source=(local);Integrated Security=SSPI;" + "Initial Catalog=AdventureWorks;MultipleActiveResultSets=True"; } } @@ -205,7 +205,7 @@ Module Module1 "FROM Purchasing.ProductVendor " & _ "WHERE VendorID = @VendorID" Dim updateSQL As String = _ - "UPDATE Purchasing.ProductVendor " & _ + "UPDATE Purchasing.ProductVendor " & _ "SET OnOrderQty = @OrderQty " & _ "WHERE ProductID = @ProductID AND VendorID = @VendorID" @@ -257,7 +257,7 @@ Module Module1 End While End Using - Console.WriteLine("Total Records Updated: " & _ + Console.WriteLine("Total Records Updated: " & _ CStr(totalRecordsUpdated)) updateTx.Rollback() Console.WriteLine("Transaction Rolled Back") @@ -309,18 +309,18 @@ static void Main() int totalRecordsUpdated = 0; string vendorSQL = - "SELECT VendorID, Name FROM Purchasing.Vendor " + + "SELECT VendorID, Name FROM Purchasing.Vendor " + "WHERE CreditRating = 5"; string prodVendSQL = "SELECT ProductID, MaxOrderQty, MinOrderQty, OnOrderQty " + - "FROM Purchasing.ProductVendor " + + "FROM Purchasing.ProductVendor " + "WHERE VendorID = @VendorID"; string updateSQL = - "UPDATE Purchasing.ProductVendor " + + "UPDATE Purchasing.ProductVendor " + "SET OnOrderQty = @OrderQty " + "WHERE ProductID = @ProductID AND VendorID = @VendorID"; - using (SqlConnection awConnection = + using (SqlConnection awConnection = new SqlConnection(connectionString)) { awConnection.Open(); @@ -376,7 +376,7 @@ static void Main() } } } - Console.WriteLine("Total Records Updated: " + + Console.WriteLine("Total Records Updated: " + totalRecordsUpdated.ToString()); updateTx.Rollback(); Console.WriteLine("Transaction Rolled Back"); @@ -389,8 +389,8 @@ private static string GetConnectionString() { // To avoid storing the connection string in your code, // you can retrieve it from a configuration file. - return "Data Source=(local);Integrated Security=SSPI;" + - "Initial Catalog=AdventureWorks;" + + return "Data Source=(local);Integrated Security=SSPI;" + + "Initial Catalog=AdventureWorks;" + "MultipleActiveResultSets=True"; } } diff --git a/docs/framework/data/adonet/sql/modifying-large-value-max-data.md b/docs/framework/data/adonet/sql/modifying-large-value-max-data.md index e03f14ec17d08..85932c4022a2c 100644 --- a/docs/framework/data/adonet/sql/modifying-large-value-max-data.md +++ b/docs/framework/data/adonet/sql/modifying-large-value-max-data.md @@ -37,12 +37,12 @@ Large object (LOB) data types are those that exceed the maximum row size of 8 ki ```sql INSERT Production.ProductPhoto ( - ThumbnailPhoto, - ThumbnailPhotoFilePath, - LargePhoto, + ThumbnailPhoto, + ThumbnailPhotoFilePath, + LargePhoto, LargePhotoFilePath) SELECT ThumbnailPhoto.*, null, null, N'tricycle_pink.gif' -FROM OPENROWSET +FROM OPENROWSET (BULK 'c:\images\tricycle.jpg', SINGLE_BLOB) ThumbnailPhoto ``` @@ -87,7 +87,7 @@ GO UPDATE Production.Document SET DocumentSummary .WRITE (N'features',28,10) WHERE DocumentID = 3 ; -GO +GO --View the modified value. SELECT DocumentSummary FROM Production.Document @@ -225,7 +225,7 @@ while (reader.Read()) Large value types can be used in objects the same way you use smaller value types in objects. You can retrieve large value types as values, as shown in the following example. The code assumes that the following GetDocumentSummary stored procedure exists in the AdventureWorks sample database. The stored procedure takes an input parameter named @DocumentID and returns the contents of the DocumentSummary column in the @DocumentSummary output parameter. ```sql -CREATE PROCEDURE GetDocumentSummary +CREATE PROCEDURE GetDocumentSummary ( @DocumentID int, @DocumentSummary nvarchar(MAX) OUTPUT diff --git a/docs/framework/data/adonet/sql/polling-in-console-applications.md b/docs/framework/data/adonet/sql/polling-in-console-applications.md index 431cdfcfe5361..8ada7dd8b2918 100644 --- a/docs/framework/data/adonet/sql/polling-in-console-applications.md +++ b/docs/framework/data/adonet/sql/polling-in-console-applications.md @@ -21,7 +21,7 @@ Imports System.Data.SqlClient Module Module1 Sub Main() - ' The WAITFOR statement simply adds enough time to prove the + ' The WAITFOR statement simply adds enough time to prove the ' asynchronous nature of the command. Dim commandText As String = _ "UPDATE Production.Product " & _ @@ -41,10 +41,10 @@ Module Module1 Private Sub RunCommandAsynchronously( _ ByVal commandText As String, ByVal connectionString As String) - ' Given command text and connection string, asynchronously - ' execute the specified command against the connection. For - ' this example, the code displays an indicator as it's working, - ' verifying the asynchronous behavior. + ' Given command text and connection string, asynchronously + ' execute the specified command against the connection. For + ' this example, the code displays an indicator as it's working, + ' verifying the asynchronous behavior. Using connection As New SqlConnection(connectionString) Try Dim count As Integer = 0 @@ -55,7 +55,7 @@ Module Module1 While Not result.IsCompleted Console.WriteLine("Waiting ({0})", count) ' Wait for 1/10 second, so the counter - ' doesn't consume all available resources + ' doesn't consume all available resources ' on the main thread. Threading.Thread.Sleep(100) count += 1 @@ -77,17 +77,17 @@ Module Module1 End Sub Private Function GetConnectionString() As String - ' To avoid storing the connection string in your code, - ' you can retrieve it from a configuration file. + ' To avoid storing the connection string in your code, + ' you can retrieve it from a configuration file. - ' If you have not included "Asynchronous Processing=true" + ' If you have not included "Asynchronous Processing=true" ' in the connection string, the command will not be able ' to execute asynchronously. Return "Data Source=(local);Integrated Security=SSPI;" & _ "Initial Catalog=AdventureWorks; " & _ "Asynchronous Processing=true" End Function -End Module +End Module ``` ```csharp @@ -100,7 +100,7 @@ class Class1 [STAThread] static void Main() { - // The WAITFOR statement simply adds enough time to + // The WAITFOR statement simply adds enough time to // prove the asynchronous nature of the command. string commandText = @@ -123,27 +123,27 @@ class Class1 string commandText, string connectionString) { // Given command text and connection string, asynchronously - // execute the specified command against the connection. - // For this example, the code displays an indicator as it's - // working, verifying the asynchronous behavior. + // execute the specified command against the connection. + // For this example, the code displays an indicator as it's + // working, verifying the asynchronous behavior. using (SqlConnection connection = new SqlConnection(connectionString)) { try { int count = 0; - SqlCommand command = + SqlCommand command = new SqlCommand(commandText, connection); connection.Open(); - IAsyncResult result = + IAsyncResult result = command.BeginExecuteNonQuery(); while (!result.IsCompleted) { Console.WriteLine( "Waiting ({0})", count++); // Wait for 1/10 second, so the counter - // doesn't consume all available + // doesn't consume all available // resources on the main thread. System.Threading.Thread.Sleep(100); } @@ -153,7 +153,7 @@ class Class1 } catch (SqlException ex) { - Console.WriteLine("Error ({0}): {1}", + Console.WriteLine("Error ({0}): {1}", ex.Number, ex.Message); } catch (InvalidOperationException ex) @@ -171,14 +171,14 @@ class Class1 private static string GetConnectionString() { - // To avoid storing the connection string in your code, - // you can retrieve it from a configuration file. + // To avoid storing the connection string in your code, + // you can retrieve it from a configuration file. // If you have not included "Asynchronous Processing=true" // in the connection string, the command will not be able // to execute asynchronously. return "Data Source=(local);Integrated Security=SSPI;" + - "Initial Catalog=AdventureWorks; " + + "Initial Catalog=AdventureWorks; " + "Asynchronous Processing=true"; } } diff --git a/docs/framework/data/adonet/sql/provider-statistics-for-sql-server.md b/docs/framework/data/adonet/sql/provider-statistics-for-sql-server.md index 7cb36bfe942fe..b957c13482462 100644 --- a/docs/framework/data/adonet/sql/provider-statistics-for-sql-server.md +++ b/docs/framework/data/adonet/sql/provider-statistics-for-sql-server.md @@ -59,7 +59,7 @@ Module Module1 Using awConnection As New SqlConnection(connectionString) ' StatisticsEnabled is False by default. - ' It must be set to True to start the + ' It must be set to True to start the ' statistic collection process. awConnection.StatisticsEnabled = True @@ -130,16 +130,16 @@ namespace CS_Stats_Console_GetValue { string connectionString = GetConnectionString(); - using (SqlConnection awConnection = + using (SqlConnection awConnection = new SqlConnection(connectionString)) { // StatisticsEnabled is False by default. - // It must be set to True to start the + // It must be set to True to start the // statistic collection process. awConnection.StatisticsEnabled = true; string productSQL = "SELECT * FROM Production.Product"; - SqlDataAdapter productAdapter = + SqlDataAdapter productAdapter = new SqlDataAdapter(productSQL, awConnection); DataSet awDataSet = new DataSet(); @@ -187,7 +187,7 @@ namespace CS_Stats_Console_GetValue { // To avoid storing the connection string in your code, // you can retrieve it from a configuration file. - return "Data Source=localhost;Integrated Security=SSPI;" + + return "Data Source=localhost;Integrated Security=SSPI;" + "Initial Catalog=AdventureWorks"; } } @@ -214,7 +214,7 @@ Module Module1 Using awConnection As New SqlConnection(connectionString) ' StatisticsEnabled is False by default. - ' It must be set to True to start the + ' It must be set to True to start the ' statistic collection process. awConnection.StatisticsEnabled = True @@ -278,11 +278,11 @@ namespace CS_Stats_Console_GetAll { string connectionString = GetConnectionString(); - using (SqlConnection awConnection = + using (SqlConnection awConnection = new SqlConnection(connectionString)) { // StatisticsEnabled is False by default. - // It must be set to True to start the + // It must be set to True to start the // statistic collection process. awConnection.StatisticsEnabled = true; @@ -325,7 +325,7 @@ namespace CS_Stats_Console_GetAll { // To avoid storing the connection string in your code, // you can retrieve it from a configuration file. - return "Data Source=localhost;Integrated Security=SSPI;" + + return "Data Source=localhost;Integrated Security=SSPI;" + "Initial Catalog=AdventureWorks"; } } diff --git a/docs/framework/data/adonet/sql/snapshot-isolation-in-sql-server.md b/docs/framework/data/adonet/sql/snapshot-isolation-in-sql-server.md index b9002c119fe42..dd38ad7c64f61 100644 --- a/docs/framework/data/adonet/sql/snapshot-isolation-in-sql-server.md +++ b/docs/framework/data/adonet/sql/snapshot-isolation-in-sql-server.md @@ -78,7 +78,7 @@ Dim sqlTran As SqlTransaction = _ ``` ```csharp -SqlTransaction sqlTran = +SqlTransaction sqlTran = connection.BeginTransaction(IsolationLevel.Snapshot); ``` @@ -127,7 +127,7 @@ SqlTransaction sqlTran = In the previous example, the first transaction selects data, and a second transaction updates the data before the first transaction is able to complete, causing an update conflict when the first transaction tries to update the same row. You can reduce the chance of update conflicts in long-running snapshot transactions by supplying lock hints at the beginning of the transaction. The following SELECT statement uses the UPDLOCK hint to lock the selected rows: ```sql -SELECT * FROM TestSnapshotUpdate WITH (UPDLOCK) +SELECT * FROM TestSnapshotUpdate WITH (UPDLOCK) WHERE PriKey BETWEEN 1 AND 3 ``` diff --git a/docs/framework/data/adonet/sql/specifying-xml-values-as-parameters.md b/docs/framework/data/adonet/sql/specifying-xml-values-as-parameters.md index f130647e8b450..7114ceb8f388f 100644 --- a/docs/framework/data/adonet/sql/specifying-xml-values-as-parameters.md +++ b/docs/framework/data/adonet/sql/specifying-xml-values-as-parameters.md @@ -68,7 +68,7 @@ Module Module1 Dim command As New SqlCommand(commandText, connection) - ' Read the saved XML document as a + ' Read the saved XML document as a ' SqlXml-data typed variable. Dim newXml As SqlXml = _ New SqlXml(New XmlTextReader("MyTestStoreData.xml")) @@ -84,8 +84,8 @@ Module Module1 End Sub Private Function GetConnectionString() As String - ' To avoid storing the connection string in your code, - ' you can retrieve it from a configuration file. + ' To avoid storing the connection string in your code, + ' you can retrieve it from a configuration file. Return "Data Source=(local);Integrated Security=SSPI;" & _ "Initial Catalog=AdventureWorks" End Function @@ -109,28 +109,28 @@ class Class1 // Create a sample table (dropping first if it already // exists.) - string commandNewTable = - "IF EXISTS (SELECT * FROM dbo.sysobjects " + + string commandNewTable = + "IF EXISTS (SELECT * FROM dbo.sysobjects " + "WHERE id = " + - "object_id(N'[dbo].[XmlDataTypeSample]') " + - "AND OBJECTPROPERTY(id, N'IsUserTable') = 1) " + - "DROP TABLE [dbo].[XmlDataTypeSample];" + - "CREATE TABLE [dbo].[XmlDataTypeSample](" + - "[SalesID] [int] IDENTITY(1,1) NOT NULL, " + + "object_id(N'[dbo].[XmlDataTypeSample]') " + + "AND OBJECTPROPERTY(id, N'IsUserTable') = 1) " + + "DROP TABLE [dbo].[XmlDataTypeSample];" + + "CREATE TABLE [dbo].[XmlDataTypeSample](" + + "[SalesID] [int] IDENTITY(1,1) NOT NULL, " + "[SalesInfo] [xml])"; - SqlCommand commandAdd = + SqlCommand commandAdd = new SqlCommand(commandNewTable, connection); commandAdd.ExecuteNonQuery(); - string commandText = - "INSERT INTO [dbo].[XmlDataTypeSample] " + - "([SalesInfo] ) " + + string commandText = + "INSERT INTO [dbo].[XmlDataTypeSample] " + + "([SalesInfo] ) " + "VALUES(@xmlParameter )"; - SqlCommand command = + SqlCommand command = new SqlCommand(commandText, connection); - // Read the saved XML document as a + // Read the saved XML document as a // SqlXml-data typed variable. - SqlXml newXml = + SqlXml newXml = new SqlXml(new XmlTextReader("MyTestStoreData.xml")); // Supply the SqlXml value for the value of the parameter. @@ -145,8 +145,8 @@ class Class1 private static string GetConnectionString() { - // To avoid storing the connection string in your code, - // you can retrieve it from a configuration file. + // To avoid storing the connection string in your code, + // you can retrieve it from a configuration file. return "Data Source=(local);Integrated Security=true;" + "Initial Catalog=AdventureWorks; "; } diff --git a/docs/framework/data/adonet/sql/sql-server-express-user-instances.md b/docs/framework/data/adonet/sql/sql-server-express-user-instances.md index 9a0af90cde756..41530c492cc49 100644 --- a/docs/framework/data/adonet/sql/sql-server-express-user-instances.md +++ b/docs/framework/data/adonet/sql/sql-server-express-user-instances.md @@ -97,11 +97,11 @@ private static void OpenSqlConnection() // Retrieve the connection string. string connectionString = GetConnectionString(); - using (SqlConnection connection = + using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); - Console.WriteLine("ConnectionString: {0}", + Console.WriteLine("ConnectionString: {0}", connection.ConnectionString); } } diff --git a/docs/framework/data/adonet/sql/table-valued-parameters.md b/docs/framework/data/adonet/sql/table-valued-parameters.md index 29cefdc8db569..0b2a9895e7995 100644 --- a/docs/framework/data/adonet/sql/table-valued-parameters.md +++ b/docs/framework/data/adonet/sql/table-valued-parameters.md @@ -45,7 +45,7 @@ CREATE TYPE dbo.CategoryTableType AS TABLE After you create a table type, you can declare table-valued parameters based on that type. The following Transact-SQL fragment demonstrates how to declare a table-valued parameter in a stored procedure definition. Note that the READONLY keyword is required for declaring a table-valued parameter. ```sql -CREATE PROCEDURE usp_UpdateCategories +CREATE PROCEDURE usp_UpdateCategories (@tvpNewCategories dbo.CategoryTableType READONLY) ``` @@ -81,7 +81,7 @@ INSERT INTO dbo.Categories (CategoryID, CategoryName) ## Configuring a SqlParameter Example supports populating table-valued parameters from , or \ objects. You must specify a type name for the table-valued parameter by using the property of a . The `TypeName` must match the name of a compatible type previously created on the server. The following code fragment demonstrates how to configure to insert data. - + In the following example, the `addedCategories` variable contains a . To see how the variable is populated, see the examples in the next section, [Passing a Table-Valued Parameter to a Stored Procedure](#passing). ```csharp @@ -178,7 +178,7 @@ using (connection) DataTable addedCategories = CategoriesDataTable.GetChanges(DataRowState.Added); // Define the INSERT-SELECT statement. - string sqlInsert = + string sqlInsert = "INSERT INTO dbo.Categories (CategoryID, CategoryName)" + " SELECT nc.CategoryID, nc.CategoryName" + " FROM @tvpNewCategories AS nc;" diff --git a/docs/framework/data/adonet/sql/windows-applications-using-callbacks.md b/docs/framework/data/adonet/sql/windows-applications-using-callbacks.md index 47f328af01521..c83670c795d07 100644 --- a/docs/framework/data/adonet/sql/windows-applications-using-callbacks.md +++ b/docs/framework/data/adonet/sql/windows-applications-using-callbacks.md @@ -26,25 +26,25 @@ Imports System.Data.SqlClient ' Add this code to the form's class: - ' You'll need this delegate in order to display text from a + ' You'll need this delegate in order to display text from a ' thread other than the form's thread. See the HandleCallback ' procedure for more information. - ' This same delegate matches both the DisplayStatus + ' This same delegate matches both the DisplayStatus ' and DisplayResults methods. Private Delegate Sub DisplayInfoDelegate(ByVal Text As String) ' This flag ensures that the user doesn't attempt - ' to restart the command or close the form while the + ' to restart the command or close the form while the ' asynchronous command is executing. Private isExecuting As Boolean - ' This example maintains the connection object + ' This example maintains the connection object ' externally, so that it's available for closing. Private connection As SqlConnection Private Function GetConnectionString() As String - ' To avoid storing the connection string in your code, - ' you can retrieve it from a configuration file. + ' To avoid storing the connection string in your code, + ' you can retrieve it from a configuration file. ' If you have not included "Asynchronous Processing=true" ' in the connection string, the command will not be able @@ -88,7 +88,7 @@ Imports System.Data.SqlClient DisplayResults("") DisplayStatus("Connecting...") connection = New SqlConnection(GetConnectionString()) - ' To emulate a long-running query, wait for + ' To emulate a long-running query, wait for ' a few seconds before working with the data. ' This command doesn't do much, but that's the point-- ' it doesn't change your data, in the long run. @@ -106,8 +106,8 @@ Imports System.Data.SqlClient DisplayStatus("Executing...") isExecuting = True - ' Although it's not required that you pass the - ' SqlCommand object as the second parameter in the + ' Although it's not required that you pass the + ' SqlCommand object as the second parameter in the ' BeginExecuteNonQuery call, doing so makes it easier ' to call EndExecuteNonQuery in the callback procedure. Dim callback As New _ @@ -146,32 +146,32 @@ Imports System.Data.SqlClient ' You may not interact with the form and its contents ' from a different thread, and this callback procedure - ' is all but guaranteed to be running from a different - ' thread than the form. Therefore you cannot simply call + ' is all but guaranteed to be running from a different + ' thread than the form. Therefore you cannot simply call ' code that displays the results, like this: ' DisplayResults(rowText) ' Instead, you must call the procedure from the form's - ' thread. One simple way to accomplish this is to call - ' the Invoke method of the form, which calls the delegate - ' you supply from the form's thread. + ' thread. One simple way to accomplish this is to call + ' the Invoke method of the form, which calls the delegate + ' you supply from the form's thread. Dim del As New _ DisplayInfoDelegate(AddressOf DisplayResults) Me.Invoke(del, rowText) Catch ex As Exception - ' Because you're now running code in a separate thread, - ' if you don't handle the exception here, none of your - ' other code will catch the exception. Because none of - ' your code is on the call stack in this thread, there's - ' nothing higher up the stack to catch the exception if - ' you don't handle it here. You can either log the - ' exception or invoke a delegate (as in the non-error - ' case in this example) to display the error on the form. - ' In no case can you simply display the error without + ' Because you're now running code in a separate thread, + ' if you don't handle the exception here, none of your + ' other code will catch the exception. Because none of + ' your code is on the call stack in this thread, there's + ' nothing higher up the stack to catch the exception if + ' you don't handle it here. You can either log the + ' exception or invoke a delegate (as in the non-error + ' case in this example) to display the error on the form. + ' In no case can you simply display the error without ' executing a delegate as in the Try block here. - ' You can create the delegate instance as you + ' You can create the delegate instance as you ' invoke it, like this: Me.Invoke(New _ DisplayInfoDelegate(AddressOf DisplayStatus), _ @@ -191,30 +191,30 @@ using System; using System.Data; using System.Data.SqlClient; -// Hook up the form's Load event handler (you can double-click on -// the form's design surface in Visual Studio), and then add +// Hook up the form's Load event handler (you can double-click on +// the form's design surface in Visual Studio), and then add // this code to the form's class: // You'll need this delegate in order to display text from a thread // other than the form's thread. See the HandleCallback // procedure for more information. -// This same delegate matches both the DisplayStatus +// This same delegate matches both the DisplayStatus // and DisplayResults methods. private delegate void DisplayInfoDelegate(string Text); // This flag ensures that the user doesn't attempt -// to restart the command or close the form while the +// to restart the command or close the form while the // asynchronous command is executing. private bool isExecuting; -// This example maintains the connection object +// This example maintains the connection object // externally, so that it's available for closing. private SqlConnection connection; private static string GetConnectionString() { - // To avoid storing the connection string in your code, - // you can retrieve it from a configuration file. + // To avoid storing the connection string in your code, + // you can retrieve it from a configuration file. // If you have not included "Asynchronous Processing=true" in the // connection string, the command will not be able @@ -260,7 +260,7 @@ private void button1_Click(object sender, System.EventArgs e) DisplayResults(""); DisplayStatus("Connecting..."); connection = new SqlConnection(GetConnectionString()); - // To emulate a long-running query, wait for + // To emulate a long-running query, wait for // a few seconds before working with the data. // This command doesn't do much, but that's the point-- // it doesn't change your data, in the long run. @@ -278,8 +278,8 @@ private void button1_Click(object sender, System.EventArgs e) DisplayStatus("Executing..."); isExecuting = true; - // Although it's not required that you pass the - // SqlCommand object as the second parameter in the + // Although it's not required that you pass the + // SqlCommand object as the second parameter in the // BeginExecuteNonQuery call, doing so makes it easier // to call EndExecuteNonQuery in the callback procedure. AsyncCallback callback = new AsyncCallback(HandleCallback); @@ -321,32 +321,32 @@ private void HandleCallback(IAsyncResult result) // You may not interact with the form and its contents // from a different thread, and this callback procedure // is all but guaranteed to be running from a different thread - // than the form. Therefore you cannot simply call code that + // than the form. Therefore you cannot simply call code that // displays the results, like this: // DisplayResults(rowText) // Instead, you must call the procedure from the form's thread. // One simple way to accomplish this is to call the Invoke // method of the form, which calls the delegate you supply - // from the form's thread. - DisplayInfoDelegate del = + // from the form's thread. + DisplayInfoDelegate del = new DisplayInfoDelegate(DisplayResults); this.Invoke(del, rowText); } catch (Exception ex) { - // Because you're now running code in a separate thread, + // Because you're now running code in a separate thread, // if you don't handle the exception here, none of your other // code will catch the exception. Because none of your // code is on the call stack in this thread, there's nothing - // higher up the stack to catch the exception if you don't - // handle it here. You can either log the exception or - // invoke a delegate (as in the non-error case in this + // higher up the stack to catch the exception if you don't + // handle it here. You can either log the exception or + // invoke a delegate (as in the non-error case in this // example) to display the error on the form. In no case - // can you simply display the error without executing a - // delegate as in the try block here. + // can you simply display the error without executing a + // delegate as in the try block here. - // You can create the delegate instance as you + // You can create the delegate instance as you // invoke it, like this: this.Invoke(new DisplayInfoDelegate(DisplayStatus), $"Ready (last error: {ex.Message}"); diff --git a/docs/framework/data/adonet/system-requirements-for-the-dotnet-data-provider-for-oracle.md b/docs/framework/data/adonet/system-requirements-for-the-dotnet-data-provider-for-oracle.md index b3590e9341d9e..9501777605615 100644 --- a/docs/framework/data/adonet/system-requirements-for-the-dotnet-data-provider-for-oracle.md +++ b/docs/framework/data/adonet/system-requirements-for-the-dotnet-data-provider-for-oracle.md @@ -12,7 +12,7 @@ The .NET Framework Data Provider for Oracle requires Microsoft Data Access Compo Oracle Client software prior to version Oracle 9i cannot access UTF16 databases because UTF16 is a new feature in Oracle 9i. To use this feature, you must upgrade your client software to Oracle 9i or later. ## Working with the Data Provider for Oracle and Unicode Data - + The following is a list of Unicode-related issues that you should consider when working with the .NET Framework Data Provider for Oracle and Oracle client libraries. For more information, see your Oracle documentation. ### Setting the Unicode Value in a Connection String Attribute diff --git a/docs/framework/data/adonet/system-transactions-integration-with-sql-server.md b/docs/framework/data/adonet/system-transactions-integration-with-sql-server.md index 7ed64ef1763b0..effd65c0c706f 100644 --- a/docs/framework/data/adonet/system-transactions-integration-with-sql-server.md +++ b/docs/framework/data/adonet/system-transactions-integration-with-sql-server.md @@ -59,7 +59,7 @@ The .NET Framework version 2.0 introduced a transaction framework that can be ac ```csharp // This function takes arguments for the 2 connection strings and commands in order // to create a transaction involving two SQL Servers. It returns a value > 0 if the -// transaction committed, 0 if the transaction rolled back. To test this code, you can +// transaction committed, 0 if the transaction rolled back. To test this code, you can // connect to two different databases on the same server by altering the connection string, // or to another RDBMS such as Oracle by altering the code in the connection2 code block. static public int CreateTransactionScope( @@ -78,7 +78,7 @@ static public int CreateTransactionScope( { try { - // Opening the connection automatically enlists it in the + // Opening the connection automatically enlists it in the // TransactionScope as a lightweight transaction. connection1.Open(); @@ -89,8 +89,8 @@ static public int CreateTransactionScope( // if you get here, this means that command1 succeeded. By nesting // the using block for connection2 inside that of connection1, you - // conserve server and network resources by opening connection2 - // only when there is a chance that the transaction can commit. + // conserve server and network resources by opening connection2 + // only when there is a chance that the transaction can commit. using (SqlConnection connection2 = new SqlConnection(connectString2)) try { @@ -119,7 +119,7 @@ static public int CreateTransactionScope( } } - // If an exception has been thrown, Complete will not + // If an exception has been thrown, Complete will not // be called and the transaction is rolled back. scope.Complete(); } @@ -146,7 +146,7 @@ static public int CreateTransactionScope( ```vb ' This function takes arguments for the 2 connection strings and commands in order ' to create a transaction involving two SQL Servers. It returns a value > 0 if the -' transaction committed, 0 if the transaction rolled back. To test this code, you can +' transaction committed, 0 if the transaction rolled back. To test this code, you can ' connect to two different databases on the same server by altering the connection string, ' or to another RDBMS such as Oracle by altering the code in the connection2 code block. Public Function CreateTransactionScope( _ @@ -162,7 +162,7 @@ Public Function CreateTransactionScope( _ Using scope As New TransactionScope() Using connection1 As New SqlConnection(connectString1) Try - ' Opening the connection automatically enlists it in the + ' Opening the connection automatically enlists it in the ' TransactionScope as a lightweight transaction. connection1.Open() @@ -173,8 +173,8 @@ Public Function CreateTransactionScope( _ ' If you get here, this means that command1 succeeded. By nesting ' the Using block for connection2 inside that of connection1, you - ' conserve server and network resources by opening connection2 - ' only when there is a chance that the transaction can commit. + ' conserve server and network resources by opening connection2 + ' only when there is a chance that the transaction can commit. Using connection2 As New SqlConnection(connectString2) Try ' The transaction is promoted to a full distributed @@ -201,7 +201,7 @@ Public Function CreateTransactionScope( _ End Try End Using - ' If an exception has been thrown, Complete will + ' If an exception has been thrown, Complete will ' not be called and the transaction is rolled back. scope.Complete() End Using diff --git a/docs/framework/data/adonet/updating-data-in-a-data-source.md b/docs/framework/data/adonet/updating-data-in-a-data-source.md index c3d9f6e0a8c71..a44634c162d10 100644 --- a/docs/framework/data/adonet/updating-data-in-a-data-source.md +++ b/docs/framework/data/adonet/updating-data-in-a-data-source.md @@ -60,7 +60,7 @@ command.Parameters("@CategoryName").Value = "New Category" command.ExecuteNonQuery() Dim categoryID As Int32 = CInt(command.Parameters("@Identity").Value) -Dim rowCount As Int32 = CInt(command.Parameters("@RowCount").Value) +Dim rowCount As Int32 = CInt(command.Parameters("@RowCount").Value) ``` ```csharp diff --git a/docs/framework/data/transactions/committing-a-transaction-in-single-phase-and-multi-phase.md b/docs/framework/data/transactions/committing-a-transaction-in-single-phase-and-multi-phase.md index e6f1a2ebc900c..b5abcf33b8236 100644 --- a/docs/framework/data/transactions/committing-a-transaction-in-single-phase-and-multi-phase.md +++ b/docs/framework/data/transactions/committing-a-transaction-in-single-phase-and-multi-phase.md @@ -82,8 +82,8 @@ public void Rollback (Enlistment enlistment) { // Do any work necessary when rollback notification is received - // Declare done on the enlistment - enlistment.Done(); + // Declare done on the enlistment + enlistment.Done(); } ``` diff --git a/docs/framework/data/transactions/diagnostic-traces.md b/docs/framework/data/transactions/diagnostic-traces.md index 65aa9a3bf6308..b56899dd5057d 100644 --- a/docs/framework/data/transactions/diagnostic-traces.md +++ b/docs/framework/data/transactions/diagnostic-traces.md @@ -17,8 +17,8 @@ Traces are the publishing of specific messages that are generated during applica - diff --git a/docs/framework/data/transactions/implementing-an-explicit-transaction-using-committabletransaction.md b/docs/framework/data/transactions/implementing-an-explicit-transaction-using-committabletransaction.md index 4a47db536e7af..f7092df3e7f3b 100644 --- a/docs/framework/data/transactions/implementing-an-explicit-transaction-using-committabletransaction.md +++ b/docs/framework/data/transactions/implementing-an-explicit-transaction-using-committabletransaction.md @@ -56,14 +56,14 @@ public void DoTransactionalWork() } finally { - //Restore the ambient transaction + //Restore the ambient transaction Transaction.Current = oldAmbient; } } void OnCommitted(IAsyncResult asyncResult) { CommittableTransaction committableTransaction; - committableTransaction = asyncResult as CommittableTransaction; + committableTransaction = asyncResult as CommittableTransaction; Debug.Assert(committableTransaction != null); try { diff --git a/docs/framework/data/transactions/implementing-an-implicit-transaction-using-transaction-scope.md b/docs/framework/data/transactions/implementing-an-implicit-transaction-using-transaction-scope.md index 3e721033e6897..79d37311064d7 100644 --- a/docs/framework/data/transactions/implementing-an-implicit-transaction-using-transaction-scope.md +++ b/docs/framework/data/transactions/implementing-an-implicit-transaction-using-transaction-scope.md @@ -101,7 +101,7 @@ using(TransactionScope scope1 = new TransactionScope()) //... } - using(TransactionScope scope3 = new TransactionScope(TransactionScopeOption.RequiresNew)) + using(TransactionScope scope3 = new TransactionScope(TransactionScopeOption.RequiresNew)) { //... } diff --git a/docs/framework/data/transactions/managing-concurrency-with-dependenttransaction.md b/docs/framework/data/transactions/managing-concurrency-with-dependenttransaction.md index 9d4bda94d9f18..e24be34b98148 100644 --- a/docs/framework/data/transactions/managing-concurrency-with-dependenttransaction.md +++ b/docs/framework/data/transactions/managing-concurrency-with-dependenttransaction.md @@ -25,33 +25,33 @@ public class WorkerThread public void DoWork(DependentTransaction dependentTransaction) { Thread thread = new Thread(ThreadMethod); - thread.Start(dependentTransaction); + thread.Start(dependentTransaction); } - public void ThreadMethod(object transaction) - { + public void ThreadMethod(object transaction) + { DependentTransaction dependentTransaction = transaction as DependentTransaction; - Debug.Assert(dependentTransaction != null); + Debug.Assert(dependentTransaction != null); try { using(TransactionScope ts = new TransactionScope(dependentTransaction)) { - /* Perform transactional work here */ + /* Perform transactional work here */ ts.Complete(); } } finally { - dependentTransaction.Complete(); - dependentTransaction.Dispose(); + dependentTransaction.Complete(); + dependentTransaction.Dispose(); } } -//Client code +//Client code using(TransactionScope scope = new TransactionScope()) { Transaction currentTransaction = Transaction.Current; - DependentTransaction dependentTransaction; + DependentTransaction dependentTransaction; dependentTransaction = currentTransaction.DependentClone(DependentCloneOption.BlockCommitUntilComplete); WorkerThread workerThread = new WorkerThread(); workerThread.DoWork(dependentTransaction); diff --git a/docs/framework/data/wcf/calling-service-operations-wcf-data-services.md b/docs/framework/data/wcf/calling-service-operations-wcf-data-services.md index d013eef9a62b4..919f1229fac6e 100644 --- a/docs/framework/data/wcf/calling-service-operations-wcf-data-services.md +++ b/docs/framework/data/wcf/calling-service-operations-wcf-data-services.md @@ -47,7 +47,7 @@ The Open Data Protocol (OData) defines service operations for a data service. WC - [Calling a Service Operation Asynchronously](calling-service-operations-wcf-data-services.md#ExecuteAsync) - + ### Calling Execute\ to Return a Collection of Entities The following example calls a service operation named GetOrdersByCity, which takes a string parameter of `city` and returns an : @@ -56,7 +56,7 @@ The Open Data Protocol (OData) defines service operations for a data service. WC In this example, the service operation returns a collection of `Order` objects with related `Order_Detail` objects. - + ### Using CreateQuery\ to Return a Collection of Entities The following example uses the to return a that is used to call the same GetOrdersByCity service operation: @@ -65,7 +65,7 @@ The Open Data Protocol (OData) defines service operations for a data service. WC In this example, the method is used to add the parameter to the query, and the method is used to include related Order_Details objects in the results. - + ### Calling Execute\ to Return a Single Entity The following example calls a service operation named GetNewestOrder that returns only a single Order entity: @@ -74,13 +74,13 @@ The Open Data Protocol (OData) defines service operations for a data service. WC In this example, the method is used to request only a single Order entity on execution. - + ### Calling Execute\ to Return a Collection of Primitive Values The following example calls a service operation that returns a collection of string values: [!code-csharp[Astoria Northwind Client#CallServiceOperationEnumString](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#callserviceoperationenumstring)] - + ### Calling Execute\ to Return a Single Primitive Value The following example calls a service operation that returns a single string value: @@ -89,7 +89,7 @@ The Open Data Protocol (OData) defines service operations for a data service. WC Again in this example, the method is used to request only a single integer value on execution. - + ### Calling a Service Operation that Returns No Data The following example calls a service operation that returns no data: @@ -98,7 +98,7 @@ The Open Data Protocol (OData) defines service operations for a data service. WC Because not data is returned, the value of the execution is not assigned. The only indication that the request has succeeded is that no is raised. - + ### Calling a Service Operation Asynchronously The following example calls a service operation asynchronously by calling and : diff --git a/docs/framework/data/wcf/configuring-the-data-service-wcf-data-services.md b/docs/framework/data/wcf/configuring-the-data-service-wcf-data-services.md index 4dd1812810a52..a95ce458a30c2 100644 --- a/docs/framework/data/wcf/configuring-the-data-service-wcf-data-services.md +++ b/docs/framework/data/wcf/configuring-the-data-service-wcf-data-services.md @@ -41,7 +41,7 @@ With WCF Data Services, you can create data services that expose Open Data Proto ||Sets the access rights for service operations that are defined on the data service. For more information, see [Service Operations](service-operations-wcf-data-services.md). An asterisk (`*`) value can be supplied for the name parameter to set access for all service operations to the same level. We recommend that you set access to service operations to provide the least privilege access to data service resources that are required by client applications. For more information, see [Securing WCF Data Services](securing-wcf-data-services.md).| ||This configuration property enables you to more easily troubleshoot a data service by returning more information in the error response message. This option is not intended to be used in a production environment. For more information, see [Developing and Deploying WCF Data Services](developing-and-deploying-wcf-data-services.md).| - + ## Minimum Resource Access Requirements The following table details the minimum entity set rights that must be granted to execute a specific operation. Path examples are based on the Northwind data service that is created when you complete the [quickstart](quickstart-wcf-data-services.md). Because both the enumeration and the enumeration are defined by using the , you can use a logical OR operator to specify multiple permissions for a single entity set or operation. For more information, see [How to: Enable Access to the Data Service](how-to-enable-access-to-the-data-service-wcf-data-services.md). @@ -67,7 +67,7 @@ With WCF Data Services, you can create data services that expose Open Data Proto 2 This URI is supported when a property that returns a binary large object (BLOB) is defined as the media resource that belongs to an entity that is a media link entry, which in this case, is `Customers`. For more information, see [Streaming Provider](streaming-provider-wcf-data-services.md). - + ## Versioning Requirements The following data service configuration behaviors require version 2 of the OData protocol, or later versions: diff --git a/docs/framework/data/wcf/how-to-set-headers-in-the-client-request-wcf-data-services.md b/docs/framework/data/wcf/how-to-set-headers-in-the-client-request-wcf-data-services.md index 203514fa806e8..235bf79ff5080 100644 --- a/docs/framework/data/wcf/how-to-set-headers-in-the-client-request-wcf-data-services.md +++ b/docs/framework/data/wcf/how-to-set-headers-in-the-client-request-wcf-data-services.md @@ -19,7 +19,7 @@ When you use the WCF Data Services client library to access a data service that > [!NOTE] > When a data service requires you to manually set the message header for every request, consider registering the handler for the event by overriding the `OnContextCreated` partial method in the entity container that represents the data service, which in this case is `NorthwindEntities`. -[!code-csharp[Astoria Northwind Client#RegisterHeadersQuery](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#registerheadersquery)] +[!code-csharp[Astoria Northwind Client#RegisterHeadersQuery](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#registerheadersquery)] [!code-vb[Astoria Northwind Client#RegisterHeadersQuery](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#registerheadersquery)] ## Example diff --git a/docs/framework/data/wcf/linq-considerations-wcf-data-services.md b/docs/framework/data/wcf/linq-considerations-wcf-data-services.md index 8c372f6ec0617..f16848f14893c 100644 --- a/docs/framework/data/wcf/linq-considerations-wcf-data-services.md +++ b/docs/framework/data/wcf/linq-considerations-wcf-data-services.md @@ -21,8 +21,8 @@ This topic provides information about the way in which LINQ queries are composed The following example is a LINQ query that returns `Orders` that have a freight cost of more than $30 and sorts the results by the shipping date, starting with the latest ship date: -[!code-csharp[Astoria Northwind Client#AddQueryOptionsLinqSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#addqueryoptionslinqspecific)] -[!code-vb[Astoria Northwind Client#AddQueryOptionsLinqSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#addqueryoptionslinqspecific)] +[!code-csharp[Astoria Northwind Client#AddQueryOptionsLinqSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#addqueryoptionslinqspecific)] +[!code-vb[Astoria Northwind Client#AddQueryOptionsLinqSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#addqueryoptionslinqspecific)] This LINQ query is translated into the following query URI that is executed against the Northwind-based [quickstart](quickstart-wcf-data-services.md) data service: @@ -34,8 +34,8 @@ http://localhost:12345/Northwind.svc/Orders?Orderby=ShippedDate&?filter=Freight LINQ enables you to compose queries by using both the language-specific declarative query syntax, shown in the previous example, as well as a set of query methods known as standard query operators. An equivalent query to the previous example can be composed by using only the method-based syntax, as shown the following example: -[!code-csharp[Astoria Northwind Client#AddQueryOptionsLinqExpressionSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#addqueryoptionslinqexpressionspecific)] -[!code-vb[Astoria Northwind Client#AddQueryOptionsLinqExpressionSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#addqueryoptionslinqexpressionspecific)] +[!code-csharp[Astoria Northwind Client#AddQueryOptionsLinqExpressionSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#addqueryoptionslinqexpressionspecific)] +[!code-vb[Astoria Northwind Client#AddQueryOptionsLinqExpressionSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#addqueryoptionslinqexpressionspecific)] The WCF Data Services client is able to translate both kinds of composed queries into a query URI, and you can extend a LINQ query by appending query methods to a query expression. When you compose LINQ queries by appending method syntax to a query expression or a , the operations are added to the query URI in the order in which methods are called. This is equivalent to calling the method to add each query option to the query URI. @@ -49,7 +49,7 @@ http://localhost:12345/Northwind.svc/Orders?Orderby=ShippedDate&?filter=Freight ## LINQ Query Examples The examples in the following sections demonstrate the kinds of LINQ queries that can be executed against an OData service. - + ### Filtering The LINQ query examples in this section filter data in the feed returned by the service. @@ -57,78 +57,78 @@ http://localhost:12345/Northwind.svc/Orders?Orderby=ShippedDate&?filter=Freight - Using LINQ query syntax: -[!code-csharp[Astoria Northwind Client#LinqWhereClauseSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqwhereclausespecific)] -[!code-vb[Astoria Northwind Client#LinqWhereClauseSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqwhereclausespecific)] +[!code-csharp[Astoria Northwind Client#LinqWhereClauseSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqwhereclausespecific)] +[!code-vb[Astoria Northwind Client#LinqWhereClauseSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqwhereclausespecific)] - Using LINQ query methods: -[!code-csharp[Astoria Northwind Client#LinqWhereMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqwheremethodspecific)] -[!code-vb[Astoria Northwind Client#LinqWhereMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqwheremethodspecific)] +[!code-csharp[Astoria Northwind Client#LinqWhereMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqwheremethodspecific)] +[!code-vb[Astoria Northwind Client#LinqWhereMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqwheremethodspecific)] - The URI query string `$filter` option: -[!code-csharp[Astoria Northwind Client#ExplicitQueryWhereMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#explicitquerywheremethodspecific)] -[!code-vb[Astoria Northwind Client#ExplicitQueryWhereMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#explicitquerywheremethodspecific)] +[!code-csharp[Astoria Northwind Client#ExplicitQueryWhereMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#explicitquerywheremethodspecific)] +[!code-vb[Astoria Northwind Client#ExplicitQueryWhereMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#explicitquerywheremethodspecific)] All of the previous examples are translated to the query URI: `http://localhost:12345/northwind.svc/Orders()?$filter=Freight gt 30M`. - + ### Sorting The following examples show equivalent queries that sort returned data both by the company name and by postal code, descending: - Using LINQ query syntax: -[!code-csharp[Astoria Northwind Client#LinqOrderByClauseSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqorderbyclausespecific)] -[!code-vb[Astoria Northwind Client#LinqOrderByClauseSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqorderbyclausespecific)] +[!code-csharp[Astoria Northwind Client#LinqOrderByClauseSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqorderbyclausespecific)] +[!code-vb[Astoria Northwind Client#LinqOrderByClauseSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqorderbyclausespecific)] - Using LINQ query methods: -[!code-csharp[Astoria Northwind Client#LinqOrderByMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqorderbymethodspecific)] -[!code-vb[Astoria Northwind Client#LinqOrderByMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqorderbymethodspecific)] +[!code-csharp[Astoria Northwind Client#LinqOrderByMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqorderbymethodspecific)] +[!code-vb[Astoria Northwind Client#LinqOrderByMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqorderbymethodspecific)] - URI query string `$orderby` option): -[!code-csharp[Astoria Northwind Client#ExplicitQueryOrderByMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#explicitqueryorderbymethodspecific)] -[!code-vb[Astoria Northwind Client#ExplicitQueryOrderByMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#explicitqueryorderbymethodspecific)] +[!code-csharp[Astoria Northwind Client#ExplicitQueryOrderByMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#explicitqueryorderbymethodspecific)] +[!code-vb[Astoria Northwind Client#ExplicitQueryOrderByMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#explicitqueryorderbymethodspecific)] All of the previous examples are translated to the query URI: `http://localhost:12345/northwind.svc/Customers()?$orderby=CompanyName,PostalCode desc`. - + ### Projection The following examples show equivalent queries that project returned data into the narrower `CustomerAddress` type: - Using LINQ query syntax: -[!code-csharp[Astoria Northwind Client#LinqSelectClauseSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqselectclausespecific)] -[!code-vb[Astoria Northwind Client#LinqSelectClauseSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqselectclausespecific)] +[!code-csharp[Astoria Northwind Client#LinqSelectClauseSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqselectclausespecific)] +[!code-vb[Astoria Northwind Client#LinqSelectClauseSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqselectclausespecific)] - Using LINQ query methods: -[!code-csharp[Astoria Northwind Client#LinqSelectMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqselectmethodspecific)] -[!code-vb[Astoria Northwind Client#LinqSelectMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqselectmethodspecific)] +[!code-csharp[Astoria Northwind Client#LinqSelectMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqselectmethodspecific)] +[!code-vb[Astoria Northwind Client#LinqSelectMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqselectmethodspecific)] > [!NOTE] > The `$select` query option cannot be added to a query URI by using the method. We recommend that you use the LINQ method to have the client generate the `$select` query option in the request URI. Both of the previous examples are translated to the query URI: `"http://localhost:12345/northwind.svc/Customers()?$filter=Country eq 'GerGerm'&$select=CustomerID,Address,City,Region,PostalCode,Country"`. - + ### Client Paging The following examples show equivalent queries that request a page of sorted order entities that includes 25 orders, skipping the first 50 orders: - Applying query methods to a LINQ query: -[!code-csharp[Astoria Northwind Client#LinqSkipTakeMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqskiptakemethodspecific)] -[!code-vb[Astoria Northwind Client#LinqSkipTakeMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqskiptakemethodspecific)] +[!code-csharp[Astoria Northwind Client#LinqSkipTakeMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqskiptakemethodspecific)] +[!code-vb[Astoria Northwind Client#LinqSkipTakeMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqskiptakemethodspecific)] - URI query string `$skip` and `$top` options): -[!code-csharp[Astoria Northwind Client#ExplicitQuerySkipTakeMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#explicitqueryskiptakemethodspecific)] -[!code-vb[Astoria Northwind Client#ExplicitQuerySkipTakeMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#explicitqueryskiptakemethodspecific)] +[!code-csharp[Astoria Northwind Client#ExplicitQuerySkipTakeMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#explicitqueryskiptakemethodspecific)] +[!code-vb[Astoria Northwind Client#ExplicitQuerySkipTakeMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#explicitqueryskiptakemethodspecific)] Both of the previous examples are translated to the query URI: `http://localhost:12345/northwind.svc/Orders()?$orderby=OrderDate desc&$skip=50&$top=25`. - + ### Expand When you query an OData data service, you can request that entities related to the entity targeted by the query be included the returned feed. The method is called on the for the entity set targeted by the LINQ query, with the related entity set name supplied as the `path` parameter. For more information, see [Loading Deferred Content](loading-deferred-content-wcf-data-services.md). @@ -136,17 +136,17 @@ http://localhost:12345/Northwind.svc/Orders?Orderby=ShippedDate&?filter=Freight - In LINQ query syntax: -[!code-csharp[Astoria Northwind Client#LinqQueryExpandSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqqueryexpandspecific)] +[!code-csharp[Astoria Northwind Client#LinqQueryExpandSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqqueryexpandspecific)] [!code-vb[Astoria Northwind Client#LinqQueryExpandSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqqueryexpandspecific)] - With LINQ query methods: -[!code-csharp[Astoria Northwind Client#LinqQueryExpandMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqqueryexpandmethodspecific)] -[!code-vb[Astoria Northwind Client#LinqQueryExpandMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqqueryexpandmethodspecific)] +[!code-csharp[Astoria Northwind Client#LinqQueryExpandMethodSpecific](../../../../samples/snippets/csharp/VS_Snippets_Misc/astoria_northwind_client/cs/source.cs#linqqueryexpandmethodspecific)] +[!code-vb[Astoria Northwind Client#LinqQueryExpandMethodSpecific](../../../../samples/snippets/visualbasic/VS_Snippets_Misc/astoria_northwind_client/vb/source.vb#linqqueryexpandmethodspecific)] Both of the previous examples are translated to the query URI: `http://localhost:12345/northwind.svc/Orders()?$filter=CustomerID eq 'ALFKI'&$expand=Order_Details`. - + ## Unsupported LINQ Methods The following table contains the classes of LINQ methods are not supported and cannot be included in a query executed against an OData service: @@ -160,7 +160,7 @@ http://localhost:12345/Northwind.svc/Orders?Orderby=ShippedDate&?filter=Freight |Paging operators|The following paging operators are not supported against a :

-
-
-
-
-

**Note:** Paging operators that are executed on an empty sequence return null.| |Other operators|The following operators are also not supported against a :

-
-
-
-
- | - + ## Supported Expression Functions The following common-language runtime (CLR) methods and properties are supported because they can be translated in a query expression for inclusion in the request URI to an OData service: diff --git a/docs/framework/data/wcf/securing-wcf-data-services.md b/docs/framework/data/wcf/securing-wcf-data-services.md index e16f229b1a8ed..f86e45ab9dabd 100644 --- a/docs/framework/data/wcf/securing-wcf-data-services.md +++ b/docs/framework/data/wcf/securing-wcf-data-services.md @@ -28,7 +28,7 @@ WCF Data Services does not implement any kind of authentication of its own, but |ASP.NET forms authentication|Forms authentication lets you authenticate users by using your own code and then maintain an authentication token in a cookie or in the page URL. You authenticate the user name and password of your users using a login form that you create. Unauthenticated requests are redirected to a login page, where the user provides credentials and submits the form. If the application authenticates the request, the system issues a ticket that contains a key for reestablishing the identity for subsequent requests. For more information, see [Forms Authentication Provider](https://docs.microsoft.com/previous-versions/aspnet/9wff0kyh(v=vs.100)). **Security Note:** By default, the cookie that contains the forms authentication ticket is not secured when you use forms authentication in a ASP.NET Web application. You should consider requiring SSL to protect both the authentication ticket and the initial login credentials.

For an example of how to use forms authentication with WCF Data Services, see the blog post [OData and Authentication – Part 7 – Forms Authentication](https://devblogs.microsoft.com/odata/odata-and-authentication-part-7-forms-authentication/).| |Claims-based authentication|In claims-based authentication, the data service relies on a trusted "third-party" identity provider service to authenticate the user. The identity provider positively authenticates the user that is requesting access to data service resources and issues a token that grants access to the requested resources. This token is then presented to the data service, which then grants access to the user based on the trust relationship with the identity service that issued the access token.

The benefit of using a claims-based authentication provider is that they can be used to authenticate various types of clients across trust domains. By employing such a third-party provider, a data service can offload the requirements of maintaining and authenticating users. OAuth 2.0 is a claims-based authentication protocol that is supported by Windows Azure AppFabric Access Control for federated authorization as a service. This protocol supports REST-based services. For an example of how to use OAuth 2.0 with WCF Data Services, see the blog post [OData and Authentication – Part 8 – OAuth WRAP](https://devblogs.microsoft.com/odata/odata-and-authentication-part-8-oauth-wrap/).| - + ### Authentication in the Client Library By default, the WCF Data Services client library does not supply credentials when making a request to an OData service. When login credentials are required by the data service to authenticate a user, these credentials can be supplied in a accessed from the property of the , as in the following example: From d747f723f65bd714d6f02cdf68e6c9cdc736d887 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:29:15 -0400 Subject: [PATCH 05/18] fix: MD009 in docs/framework/debug-trace-profile --- .../callbackoncollecteddelegate-mda.md | 2 +- .../dangerousthreadingapi-mda.md | 2 +- .../datetimeinvalidlocalformat-mda.md | 2 +- ...dd-trace-statements-to-application-code.md | 4 +- ...-to-create-and-initialize-trace-sources.md | 14 +++---- ...initialize-and-configure-trace-switches.md | 10 ++--- ...source-and-filters-with-trace-listeners.md | 40 +++++++++---------- .../loadfromcontext-mda.md | 4 +- .../noncomvisiblebaseclass-mda.md | 10 ++--- .../opengenericcercall-mda.md | 4 +- .../performance-counters.md | 14 +++---- .../debug-trace-profile/reentrancy-mda.md | 22 +++++----- .../releasehandlefailed-mda.md | 20 +++++----- .../streamwriterbuffereddatalost-mda.md | 10 ++--- .../debug-trace-profile/trace-switches.md | 4 +- .../debug-trace-profile/virtualcercall-mda.md | 2 +- 16 files changed, 82 insertions(+), 82 deletions(-) diff --git a/docs/framework/debug-trace-profile/callbackoncollecteddelegate-mda.md b/docs/framework/debug-trace-profile/callbackoncollecteddelegate-mda.md index cfc46ef5946a3..1372f84581721 100644 --- a/docs/framework/debug-trace-profile/callbackoncollecteddelegate-mda.md +++ b/docs/framework/debug-trace-profile/callbackoncollecteddelegate-mda.md @@ -90,7 +90,7 @@ public class Entry } public static void Target() - { + { } [DllImport("Library", CallingConvention = CallingConvention.StdCall)] diff --git a/docs/framework/debug-trace-profile/dangerousthreadingapi-mda.md b/docs/framework/debug-trace-profile/dangerousthreadingapi-mda.md index 014d612f1232d..9a4872c1670c3 100644 --- a/docs/framework/debug-trace-profile/dangerousthreadingapi-mda.md +++ b/docs/framework/debug-trace-profile/dangerousthreadingapi-mda.md @@ -53,7 +53,7 @@ void FireMda() Thread t = new Thread(delegate() { Thread.Sleep(1000); }); t.Start(); // The following line activates the MDA. - t.Suspend(); + t.Suspend(); t.Resume(); t.Join(); } diff --git a/docs/framework/debug-trace-profile/datetimeinvalidlocalformat-mda.md b/docs/framework/debug-trace-profile/datetimeinvalidlocalformat-mda.md index a23c4e4aa0205..6e8d23dd6e5cb 100644 --- a/docs/framework/debug-trace-profile/datetimeinvalidlocalformat-mda.md +++ b/docs/framework/debug-trace-profile/datetimeinvalidlocalformat-mda.md @@ -74,7 +74,7 @@ String serialized = XMLConvert.ToString(myDateTime); ```csharp DateTime myDateTime = DateTime.UtcNow; -String serialized = XmlConvert.ToString(myDateTime, +String serialized = XmlConvert.ToString(myDateTime, XmlDateTimeSerializationMode.RoundtripKind); ``` diff --git a/docs/framework/debug-trace-profile/how-to-add-trace-statements-to-application-code.md b/docs/framework/debug-trace-profile/how-to-add-trace-statements-to-application-code.md index 86b80fc565737..e107c18e698e6 100644 --- a/docs/framework/debug-trace-profile/how-to-add-trace-statements-to-application-code.md +++ b/docs/framework/debug-trace-profile/how-to-add-trace-statements-to-application-code.md @@ -34,7 +34,7 @@ The methods used most often for tracing are the methods for writing output to li ```csharp bool errorFlag = false; System.Diagnostics.Trace.WriteLine ("Error in AppendData procedure."); - System.Diagnostics.Trace.WriteLineIf(errorFlag, + System.Diagnostics.Trace.WriteLineIf(errorFlag, "Error in AppendData procedure."); ``` @@ -53,7 +53,7 @@ The methods used most often for tracing are the methods for writing output to li ```csharp bool errorFlag = false; - System.Diagnostics.Trace.WriteIf(errorFlag, + System.Diagnostics.Trace.WriteIf(errorFlag, "Error in AppendData procedure."); System.Diagnostics.Debug.WriteIf(errorFlag, "Transaction abandoned."); Trace.Write("Invalid value for data request"); diff --git a/docs/framework/debug-trace-profile/how-to-create-and-initialize-trace-sources.md b/docs/framework/debug-trace-profile/how-to-create-and-initialize-trace-sources.md index 61b691c8f5abd..3965858874195 100644 --- a/docs/framework/debug-trace-profile/how-to-create-and-initialize-trace-sources.md +++ b/docs/framework/debug-trace-profile/how-to-create-and-initialize-trace-sources.md @@ -28,13 +28,13 @@ The class is used by applications to produ - - - @@ -46,10 +46,10 @@ The class is used by applications to produ
- - diff --git a/docs/framework/debug-trace-profile/how-to-create-initialize-and-configure-trace-switches.md b/docs/framework/debug-trace-profile/how-to-create-initialize-and-configure-trace-switches.md index 4d2b739b74bb8..ad338892a768d 100644 --- a/docs/framework/debug-trace-profile/how-to-create-initialize-and-configure-trace-switches.md +++ b/docs/framework/debug-trace-profile/how-to-create-initialize-and-configure-trace-switches.md @@ -15,7 +15,7 @@ ms.assetid: 5a0e41bf-f99c-4692-8799-f89617f5bcf9 # How to: Create, Initialize and Configure Trace Switches Trace switches enable you to enable, disable, and filter tracing output. - + ## Creating and initializing a trace switch In order to use trace switches, you must first create them and place them in your code. There are two predefined classes from which you can create switch objects: the class and the class. You would use if you care only about whether or not a tracing message appears; you would use if you want to discriminate between levels of tracing. If you use a , you can define your own debugging messages and associate them with different trace levels. You can use both types of switches with either tracing or debugging. By default, a is disabled and a is set to level . Trace switches can be created and placed in any part of your code that might use them. @@ -35,14 +35,14 @@ Trace switches enable you to enable, disable, and filter tracing output. ``` ```csharp - System.Diagnostics.BooleanSwitch dataSwitch = + System.Diagnostics.BooleanSwitch dataSwitch = new System.Diagnostics.BooleanSwitch("Data", "DataAccess module"); - System.Diagnostics.TraceSwitch generalSwitch = - new System.Diagnostics.TraceSwitch("General", + System.Diagnostics.TraceSwitch generalSwitch = + new System.Diagnostics.TraceSwitch("General", "Entire application"); ``` - + ## Configuring trace switches After your application has been distributed, you can still enable or disable trace output by configuring the trace switches in your application. Configuring a switch means changing its value from an external source after it has been initialized. You can change the values of the switch objects using the configuration file. You configure a trace switch to turn it on and off, or to set its level, determining the amount and type of messages it passes along to listeners. diff --git a/docs/framework/debug-trace-profile/how-to-use-tracesource-and-filters-with-trace-listeners.md b/docs/framework/debug-trace-profile/how-to-use-tracesource-and-filters-with-trace-listeners.md index af22c7e55ea1c..f7051c6dedc9a 100644 --- a/docs/framework/debug-trace-profile/how-to-use-tracesource-and-filters-with-trace-listeners.md +++ b/docs/framework/debug-trace-profile/how-to-use-tracesource-and-filters-with-trace-listeners.md @@ -33,7 +33,7 @@ One of the new features in the .NET Framework version 2.0 is an enhanced tracing { class Program { - private static TraceSource mySource = + private static TraceSource mySource = new TraceSource("TraceSourceApp"); static void Main(string[] args) { @@ -43,9 +43,9 @@ One of the new features in the .NET Framework version 2.0 is an enhanced tracing } static void Activity1() { - mySource.TraceEvent(TraceEventType.Error, 1, + mySource.TraceEvent(TraceEventType.Error, 1, "Error message."); - mySource.TraceEvent(TraceEventType.Warning, 2, + mySource.TraceEvent(TraceEventType.Warning, 2, "Warning message."); } } @@ -60,13 +60,13 @@ One of the new features in the .NET Framework version 2.0 is an enhanced tracing - - - @@ -78,10 +78,10 @@ One of the new features in the .NET Framework version 2.0 is an enhanced tracing - - @@ -102,27 +102,27 @@ One of the new features in the .NET Framework version 2.0 is an enhanced tracing { class Program { - private static TraceSource mySource = + private static TraceSource mySource = new TraceSource("TraceSourceApp"); static void Main(string[] args) { Activity1(); // Change the event type for which tracing occurs. - // The console trace listener must be specified + // The console trace listener must be specified // in the configuration file. First, save the original // settings from the configuration file. - EventTypeFilter configFilter = + EventTypeFilter configFilter = (EventTypeFilter)mySource.Listeners["console"].Filter; - // Then create a new event type filter that ensures + // Then create a new event type filter that ensures // critical messages will be written. mySource.Listeners["console"].Filter = new EventTypeFilter(SourceLevels.Critical); Activity2(); - // Allow the trace source to send messages to listeners - // for all event types. This statement will override + // Allow the trace source to send messages to listeners + // for all event types. This statement will override // any settings in the configuration file. mySource.Switch.Level = SourceLevels.All; @@ -134,20 +134,20 @@ One of the new features in the .NET Framework version 2.0 is an enhanced tracing } static void Activity1() { - mySource.TraceEvent(TraceEventType.Error, 1, + mySource.TraceEvent(TraceEventType.Error, 1, "Error message."); - mySource.TraceEvent(TraceEventType.Warning, 2, + mySource.TraceEvent(TraceEventType.Warning, 2, "Warning message."); } static void Activity2() { - mySource.TraceEvent(TraceEventType.Critical, 3, + mySource.TraceEvent(TraceEventType.Critical, 3, "Critical message."); mySource.TraceInformation("Informational message."); } static void Activity3() { - mySource.TraceEvent(TraceEventType.Error, 4, + mySource.TraceEvent(TraceEventType.Error, 4, "Error message."); mySource.TraceInformation("Informational message."); } diff --git a/docs/framework/debug-trace-profile/loadfromcontext-mda.md b/docs/framework/debug-trace-profile/loadfromcontext-mda.md index b05bb38c4d6dd..c481a544851f7 100644 --- a/docs/framework/debug-trace-profile/loadfromcontext-mda.md +++ b/docs/framework/debug-trace-profile/loadfromcontext-mda.md @@ -56,8 +56,8 @@ namespace ConsoleApplication1 static void Main(string[] args) { // The following call caused the LoadFrom context to be used - // because the assembly is loaded using LoadFrom and the path is - // located outside of the Load context probing path. + // because the assembly is loaded using LoadFrom and the path is + // located outside of the Load context probing path. Assembly.LoadFrom(@"C:\Text\Test.dll"); } } diff --git a/docs/framework/debug-trace-profile/noncomvisiblebaseclass-mda.md b/docs/framework/debug-trace-profile/noncomvisiblebaseclass-mda.md index 941449a67949e..92cc8e0719b8f 100644 --- a/docs/framework/debug-trace-profile/noncomvisiblebaseclass-mda.md +++ b/docs/framework/debug-trace-profile/noncomvisiblebaseclass-mda.md @@ -29,11 +29,11 @@ The `nonComVisibleBaseClass` managed debugging assistant (MDA) is activated when The following is an example message for a `QueryInterface` call on a COM-visible class `Derived` that derives from a non-COM-visible class `Base`. ```output -A QueryInterface call was made requesting the class interface of COM -visible managed class 'Derived'. However since this class derives from -non COM visible class 'Base', the QueryInterface call will fail. This -is done to prevent the non COM visible base class from being -constrained by the COM versioning rules. +A QueryInterface call was made requesting the class interface of COM +visible managed class 'Derived'. However since this class derives from +non COM visible class 'Base', the QueryInterface call will fail. This +is done to prevent the non COM visible base class from being +constrained by the COM versioning rules. ``` ## Configuration diff --git a/docs/framework/debug-trace-profile/opengenericcercall-mda.md b/docs/framework/debug-trace-profile/opengenericcercall-mda.md index 965bd3f4d30a3..ad0211015339b 100644 --- a/docs/framework/debug-trace-profile/opengenericcercall-mda.md +++ b/docs/framework/debug-trace-profile/opengenericcercall-mda.md @@ -43,7 +43,7 @@ The following is a sample of output from this MDA: ```output Method 'GenericMethodWithCer', which contains at least one constrained execution region, cannot be prepared automatically since it has one or more unbound generic type parameters. - The caller must ensure this method is prepared explicitly at run time prior to execution. + The caller must ensure this method is prepared explicitly at run time prior to execution. method name="GenericMethodWithCer" declaringType name="OpenGenericCERCall" ``` @@ -80,7 +80,7 @@ class Program MyClass.GenericMethodWithCer(); // This call is incorrect. A shared version of the method that - // cannot be completely analyzed will be JIT-compiled. The + // cannot be completely analyzed will be JIT-compiled. The // MDA will be activated at JIT-compile time, not at run time. MyClass.GenericMethodWithCer(); } diff --git a/docs/framework/debug-trace-profile/performance-counters.md b/docs/framework/debug-trace-profile/performance-counters.md index bba3ed886c4c5..a91b2db6de71f 100644 --- a/docs/framework/debug-trace-profile/performance-counters.md +++ b/docs/framework/debug-trace-profile/performance-counters.md @@ -21,7 +21,7 @@ This topic provides a list of performance counters you can find in the [Windows |**# of Filters / Sec**|Displays the number of .NET exception filters executed per second. An exception filter evaluates regardless of whether an exception is handled.

This counter is not an average over time; it displays the difference between the values observed in the last two samples divided by the duration of the sample interval.| |**# of Finallys / Sec**|Displays the number of finally blocks executed per second. A finally block is guaranteed to be executed regardless of how the try block was exited. Only the finally blocks executed for an exception are counted; finally blocks on normal code paths are not counted by this counter.

This counter is not an average over time; it displays the difference between the values observed in the last two samples divided by the duration of the sample interval.| |**Throw to Catch Depth / Sec**|Displays the number of stack frames traversed, from the frame that threw the exception to the frame that handled the exception, per second. This counter resets to zero when an exception handler is entered, so nested exceptions show the handler-to-handler stack depth.

This counter is not an average over time; it displays the difference between the values observed in the last two samples divided by the duration of the sample interval.| - + ## Interop performance counters The Performance console .NET CLR Interop category includes counters that provide information about an application's interaction with COM components, COM+ services, and external type libraries. The following table describes these performance counters. @@ -32,7 +32,7 @@ This topic provides a list of performance counters you can find in the [Windows |**# of Stubs**|Displays the current number of stubs created by the common language runtime. Stubs are responsible for marshaling arguments and return values from managed to unmanaged code, and vice versa, during a COM interop call or a platform invoke call.| |**# of TLB exports / sec**|Reserved for future use.| |**# of TLB imports / sec**|Reserved for future use.| - + ## JIT performance counters The Performance console .NET CLR JIT category includes counters that provide information about code that has been JIT-compiled. The following table describes these performance counters. @@ -44,7 +44,7 @@ This topic provides a list of performance counters you can find in the [Windows |**IL Bytes Jitted / sec**|Displays the number of MSIL bytes that are JIT-compiled per second. This counter is not an average over time; it displays the difference between the values observed in the last two samples divided by the duration of the sample interval.| |**Standard Jit Failures**|Displays the peak number of methods the JIT compiler has failed to compile since the application started. This failure can occur if the MSIL cannot be verified or if there is an internal error in the JIT compiler.| |**Total # of IL Bytes Jitted**|Displays the total MSIL bytes JIT-compiled since the application started. This counter is equivalent to the **# of IL Bytes Jitted** counter.| - + ## Loading performance counters The Performance console .NET CLR Loading category includes counters that provide information about assemblies, classes, and application domains that are loaded. The following table describes these performance counters. @@ -66,7 +66,7 @@ This topic provides a list of performance counters you can find in the [Windows |**Total appdomains unloaded**|Displays the total number of application domains unloaded since the application started. If an application domain is loaded and unloaded multiple times, this counter increments each time the application domain is unloaded.| |**Total Assemblies**|Displays the total number of assemblies loaded since the application started. If the assembly is loaded as domain-neutral from multiple application domains, this counter is incremented only once.| |**Total Classes Loaded**|Displays the cumulative number of classes loaded in all assemblies since the application started.| - + ## Lock and thread performance counters The Performance console .NET CLR LocksAndThreads category includes counters that provide information about managed locks and threads that an application uses. The following table describes these performance counters. @@ -82,7 +82,7 @@ This topic provides a list of performance counters you can find in the [Windows |**Queue Length Peak**|Displays the total number of threads that waited to acquire a managed lock since the application started.| |**rate of recognized threads / sec**|Displays the number of threads per second that have been recognized by the runtime. These threads are associated with a corresponding managed thread object. The runtime does not create these threads, but they have run inside the runtime at least once.

Only unique threads are tracked; threads with the same thread ID that reenter the runtime or are recreated after the thread exits are not counted twice.

This counter is not an average over time; it displays the difference between the values observed in the last two samples divided by the duration of the sample interval.| |**Total # of Contentions**|Displays the total number of times that threads in the runtime have attempted to acquire a managed lock unsuccessfully.| - + ## Memory performance counters The Performance console .NET CLR Memory category includes counters that provide information about the garbage collector. The following table describes these performance counters. @@ -111,7 +111,7 @@ This topic provides a list of performance counters you can find in the [Windows |**Promoted Finalization-Memory from Gen 0**|Displays the bytes of memory that are promoted from generation 0 to generation 1 only because they are waiting to be finalized. This counter is not cumulative; it displays the value observed at the end of the last garbage collection.| |**Promoted Memory from Gen 0**|Displays the bytes of memory that survive garbage collection and are promoted from generation 0 to generation 1. Objects that are promoted only because they are waiting to be finalized are not included in this counter. This counter is not cumulative; it displays the value observed at the end of the last garbage collection.| |**Promoted Memory from Gen 1**|Displays the bytes of memory that survive garbage collection and are promoted from generation 1 to generation 2. Objects that are promoted only because they are waiting to be finalized are not included in this counter. This counter is not cumulative; it displays the value observed at the end of the last garbage collection. This counter is reset to 0 if the last garbage collection was a generation 0 collection only.| - + ## Networking performance counters The Performance console .NET CLR Networking category includes counters that provide information about data that an application sends and receives over the network. The following table describes these performance counters. @@ -209,7 +209,7 @@ for (int i = 0; i < Array.Length; i++) - ".NET CLR Networking 4.0.0.0" - All of the above socket counters plus the new performance counters supported on .NET Framework Version 4 and later. These new counters provide performance information on objects. For more information on accessing and managing performance counters in an application, see [Performance Counters](performance-counters.md). - + ## Security performance counters The Performance console .NET CLR Security category includes counters that provide information about the security checks that the common language runtime performs for an application. The following table describes these performance counters. diff --git a/docs/framework/debug-trace-profile/reentrancy-mda.md b/docs/framework/debug-trace-profile/reentrancy-mda.md index 68c8d3c4535e1..d25f08f42975c 100644 --- a/docs/framework/debug-trace-profile/reentrancy-mda.md +++ b/docs/framework/debug-trace-profile/reentrancy-mda.md @@ -41,9 +41,9 @@ The `reentrancy` managed debugging assistant (MDA) is activated when an attempt The MDA reports that illegal reentrancy is being attempted. Examine the thread's stack to determine why this is happening and how to correct the problem. The following is sample output. ```output -Additional Information: Attempting to call into managed code without -transitioning out first. Do not attempt to run managed code inside -low-level native extensibility points. Managed Debugging Assistant +Additional Information: Attempting to call into managed code without +transitioning out first. Do not attempt to run managed code inside +low-level native extensibility points. Managed Debugging Assistant 'Reentrancy' has detected a problem in 'D:\ConsoleApplication1\ ConsoleApplication1\bin\Debug\ConsoleApplication1.vshost.exe'. ``` @@ -65,32 +65,32 @@ ConsoleApplication1\bin\Debug\ConsoleApplication1.vshost.exe'. using System; public delegate int ExceptionHandler(IntPtr ptrExceptionInfo); -public class Reenter +public class Reenter { public static ExceptionHandler keepAlive; - [System.Runtime.InteropServices.DllImport("kernel32", ExactSpelling=true, + [System.Runtime.InteropServices.DllImport("kernel32", ExactSpelling=true, CharSet=System.Runtime.InteropServices.CharSet.Auto)] - public static extern IntPtr AddVectoredExceptionHandler(int bFirst, + public static extern IntPtr AddVectoredExceptionHandler(int bFirst, ExceptionHandler handler); - static int MyHandler(IntPtr ptrExceptionInfo) + static int MyHandler(IntPtr ptrExceptionInfo) { // EXCEPTION_CONTINUE_SEARCH return 0; } void Run() {} - static void Main() + static void Main() { keepAlive = new ExceptionHandler(Reenter.MyHandler); IntPtr ret = AddVectoredExceptionHandler(1, keepAlive); - try + try { // Dispatch on null should AV. - Reenter r = null; + Reenter r = null; r.Run(); - } + } catch { } } } diff --git a/docs/framework/debug-trace-profile/releasehandlefailed-mda.md b/docs/framework/debug-trace-profile/releasehandlefailed-mda.md index f6ac9a60d1300..bf5b0ac72370e 100644 --- a/docs/framework/debug-trace-profile/releasehandlefailed-mda.md +++ b/docs/framework/debug-trace-profile/releasehandlefailed-mda.md @@ -48,10 +48,10 @@ The `releaseHandleFailed` managed debugging assistant (MDA) is activated is to n A message indicating that a or a failed to properly release the handle. For example: ```output -"A SafeHandle or CriticalHandle of type 'MyBrokenSafeHandle' -failed to properly release the handle with value 0x0000BEEF. This -usually indicates that the handle was released incorrectly via -another means (such as extracting the handle using DangerousGetHandle +"A SafeHandle or CriticalHandle of type 'MyBrokenSafeHandle' +failed to properly release the handle with value 0x0000BEEF. This +usually indicates that the handle was released incorrectly via +another means (such as extracting the handle using DangerousGetHandle and closing it directly or building another SafeHandle around it." ``` @@ -71,12 +71,12 @@ and closing it directly or building another SafeHandle around it." ```csharp bool ReleaseHandle() { - // Calling the Win32 CloseHandle function to release the - // native handle wrapped by this SafeHandle. This method returns - // false on failure, but should only fail if the input is invalid - // (which should not happen here). The method specifically must not - // fail simply because of lack of resources or other transient - // failures beyond the user’s control. That would make it unacceptable + // Calling the Win32 CloseHandle function to release the + // native handle wrapped by this SafeHandle. This method returns + // false on failure, but should only fail if the input is invalid + // (which should not happen here). The method specifically must not + // fail simply because of lack of resources or other transient + // failures beyond the user’s control. That would make it unacceptable // to call CloseHandle as part of the implementation of this method. return CloseHandle(handle); } diff --git a/docs/framework/debug-trace-profile/streamwriterbuffereddatalost-mda.md b/docs/framework/debug-trace-profile/streamwriterbuffereddatalost-mda.md index 5e0aa64e7058a..6923120bb2d40 100644 --- a/docs/framework/debug-trace-profile/streamwriterbuffereddatalost-mda.md +++ b/docs/framework/debug-trace-profile/streamwriterbuffereddatalost-mda.md @@ -24,7 +24,7 @@ The `streamWriterBufferedDataLost` managed debugging assistant (MDA) is activate ```csharp // Poorly written code. -void Write() +void Write() { StreamWriter sw = new StreamWriter("file.txt"); sw.WriteLine("Data"); @@ -43,7 +43,7 @@ GC.WaitForPendingFinalizers(); Make sure you call or on the before closing an application or any code block that has an instance of a . One of the best mechanisms for achieving this is creating the instance with a C# `using` block (`Using` in Visual Basic), which will ensure the method for the writer is invoked, resulting in the instance being correctly closed. ```csharp -using(StreamWriter sw = new StreamWriter("file.txt")) +using(StreamWriter sw = new StreamWriter("file.txt")) { sw.WriteLine("Data"); } @@ -53,12 +53,12 @@ using(StreamWriter sw = new StreamWriter("file.txt")) ```csharp StreamWriter sw; -try +try { sw = new StreamWriter("file.txt")); sw.WriteLine("Data"); } -finally +finally { if (sw != null) sw.Close(); @@ -70,7 +70,7 @@ finally ```csharp private static StreamWriter log; // static class constructor. -static WriteToFile() +static WriteToFile() { StreamWriter sw = new StreamWriter("log.txt"); sw.AutoFlush = true; diff --git a/docs/framework/debug-trace-profile/trace-switches.md b/docs/framework/debug-trace-profile/trace-switches.md index 044fb272b1d14..236f1901aaee0 100644 --- a/docs/framework/debug-trace-profile/trace-switches.md +++ b/docs/framework/debug-trace-profile/trace-switches.md @@ -62,10 +62,10 @@ MessageBox.Show(myTraceSwitch.TraceVerbose.ToString()) ``` ```csharp -System.Diagnostics.TraceSwitch myTraceSwitch = +System.Diagnostics.TraceSwitch myTraceSwitch = new System.Diagnostics.TraceSwitch("SwitchOne", "The first switch"); myTraceSwitch.Level = System.Diagnostics.TraceLevel.Info; -// This message box displays true, because setting the level to +// This message box displays true, because setting the level to // TraceLevel.Info sets all lower levels to true as well. MessageBox.Show(myTraceSwitch.TraceWarning.ToString()); // This message box displays false. diff --git a/docs/framework/debug-trace-profile/virtualcercall-mda.md b/docs/framework/debug-trace-profile/virtualcercall-mda.md index d549092f334bb..9f24136317f2d 100644 --- a/docs/framework/debug-trace-profile/virtualcercall-mda.md +++ b/docs/framework/debug-trace-profile/virtualcercall-mda.md @@ -81,7 +81,7 @@ void MethodWithCer(MyClass object) // Start of the CER. // Cannot tell at analysis time whether object is a MyClass - // or a MyDerivedClass, so we do not know which version of + // or a MyDerivedClass, so we do not know which version of // VirtualMethod we are going to call. object.VirtualMethod(); } From 0f7f4028d55b0fb8261a9572088b7d95cdbf6b2e Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:29:43 -0400 Subject: [PATCH 06/18] fix: MD009 in docs/framework/deployment --- .../best-practices-for-assembly-loading.md | 10 +++++----- ...configuring-assembly-binding-redirection.md | 18 +++++++++--------- .../how-the-runtime-locates-assemblies.md | 2 +- .../in-process-side-by-side-execution.md | 4 ++-- .../deployment/side-by-side-execution.md | 14 +++++++------- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/framework/deployment/best-practices-for-assembly-loading.md b/docs/framework/deployment/best-practices-for-assembly-loading.md index 887990da32a5c..f13c5035b2293 100644 --- a/docs/framework/deployment/best-practices-for-assembly-loading.md +++ b/docs/framework/deployment/best-practices-for-assembly-loading.md @@ -28,7 +28,7 @@ This article discusses ways to avoid problems of type identity that can lead to The first recommendation, [understand the advantages and disadvantages of load contexts](#load_contexts), provides background information for the other recommendations, because they all depend on a knowledge of load contexts. - + ## Understand the Advantages and Disadvantages of Load Contexts Within an application domain, assemblies can be loaded into one of three contexts, or they can be loaded without context: @@ -89,7 +89,7 @@ This article discusses ways to avoid problems of type identity that can lead to - In the .NET Framework versions 1.0 and 1.1, policy is not applied. - + ## Avoid Binding on Partial Assembly Names Partial name binding occurs when you specify only part of the assembly display name () when you load an assembly. For example, you might call the method with only the simple name of the assembly, omitting the version, culture, and public key token. Or you might call the method, which first calls the method and, if that fails to locate the assembly, searches the global assembly cache and loads the latest available version of the assembly. @@ -109,7 +109,7 @@ This article discusses ways to avoid problems of type identity that can lead to If you want to use the method because it makes assembly loading easy, consider that having your application fail with an error message that identifies the missing assembly is likely to provide a better user experience than automatically using an unknown version of the assembly, which might cause unpredictable behavior and security holes. - + ## Avoid Loading an Assembly into Multiple Contexts Loading an assembly into multiple contexts can cause type identity problems. If the same type is loaded from the same assembly into two different contexts, it is as if two different types with the same name had been loaded. An is thrown if you try to cast one type to the other, with the confusing message that type `MyType` cannot be cast to type `MyType`. @@ -125,7 +125,7 @@ This article discusses ways to avoid problems of type identity that can lead to The [Consider Switching to the Default Load Context](#switch_to_default) section discusses alternatives to using file path loads such as and . - + ## Avoid Loading Multiple Versions of an Assembly into the Same Context Loading multiple versions of an assembly into one load context can cause type identity problems. If the same type is loaded from two versions of the same assembly, it is as if two different types with the same name had been loaded. An is thrown if you try to cast one type to the other, with the confusing message that type `MyType` cannot be cast to type `MyType`. @@ -139,7 +139,7 @@ This article discusses ways to avoid problems of type identity that can lead to Carefully review your code to ensure that only one version of an assembly is loaded. You can use the method to determine which assemblies are loaded at any given time. - + ## Consider Switching to the Default Load Context Examine your application's assembly loading and deployment patterns. Can you eliminate assemblies that are loaded from byte arrays? Can you move assemblies into the probing path? If assemblies are located in the global assembly cache or in the application domain's probing path (that is, its and ), you can load the assembly by its identity. diff --git a/docs/framework/deployment/configuring-assembly-binding-redirection.md b/docs/framework/deployment/configuring-assembly-binding-redirection.md index d00ce473b9604..a37c3f9f4296f 100644 --- a/docs/framework/deployment/configuring-assembly-binding-redirection.md +++ b/docs/framework/deployment/configuring-assembly-binding-redirection.md @@ -19,7 +19,7 @@ By default, applications use the set of .NET Framework assemblies that shipped w ```xml - + * assembly information goes here * @@ -31,16 +31,16 @@ By default, applications use the set of .NET Framework assemblies that shipped w For example, to redirect one reference to a .NET Framework version 1.0 assembly and another reference to a .NET Framework version 1.1 assembly, you would use the pattern shown in the following pseudocode. ```xml - - - + + + - - - + + + - - + + ``` diff --git a/docs/framework/deployment/how-the-runtime-locates-assemblies.md b/docs/framework/deployment/how-the-runtime-locates-assemblies.md index a181ce6380afa..f5d66295f7873 100644 --- a/docs/framework/deployment/how-the-runtime-locates-assemblies.md +++ b/docs/framework/deployment/how-the-runtime-locates-assemblies.md @@ -135,7 +135,7 @@ Safe mode can be set for the entire application or for selected assemblies. That ### Machine Configuration File Third, the runtime examines the machine configuration file. This file, called Machine.config, resides on the local computer in the Config subdirectory of the root directory where the runtime is installed. This file can be used by administrators to specify assembly binding restrictions that are local to that computer. The settings in the machine configuration file take precedence over all other configuration settings; however, this does not mean that all configuration settings should be put in this file. The version determined by the administrator policy file is final, and cannot be overridden. Overrides specified in the Machine.config file affect all applications. For more information about configuration files, see [Configuring Apps by using Configuration Files](../configure-apps/index.md). - + ## Step 2: Checking for Previously Referenced Assemblies diff --git a/docs/framework/deployment/in-process-side-by-side-execution.md b/docs/framework/deployment/in-process-side-by-side-execution.md index 9de3a31b2237c..0847150e27cb3 100644 --- a/docs/framework/deployment/in-process-side-by-side-execution.md +++ b/docs/framework/deployment/in-process-side-by-side-execution.md @@ -39,7 +39,7 @@ Starting with the .NET Framework 4, you can use in-process side-by-side hosting > [!NOTE] > .NET Framework versions 3.0 and 3.5 are built incrementally on version 2.0, and do not need to run side by side. These are inherently the same version. - + ## Common Side-by-Side Hosting Scenarios - **Scenario 1:** Native application that uses COM components built with earlier versions of the .NET Framework. @@ -145,7 +145,7 @@ int _tmain(int argc, _TCHAR* argv[]) IDispatch* pPrintInfo; pUnk->QueryInterface(IID_IDispatch, (void**)&pPrintInfo); OLECHAR FAR* szMethod[1]; - szMethod[0]=OLESTR("PrintInfo"); + szMethod[0]=OLESTR("PrintInfo"); hr = pPrintInfo->GetIDsOfNames(IID_NULL,szMethod, 1, LOCALE_SYSTEM_DEFAULT, &dispid); DISPPARAMS dispparams; dispparams.cNamedArgs = 0; diff --git a/docs/framework/deployment/side-by-side-execution.md b/docs/framework/deployment/side-by-side-execution.md index ca7193bbf53fe..2ef937297aceb 100644 --- a/docs/framework/deployment/side-by-side-execution.md +++ b/docs/framework/deployment/side-by-side-execution.md @@ -22,7 +22,7 @@ The following illustration shows several applications using two different versio Side-by-side execution gives you more control over which versions of a component an application binds to, and more control over which version of the runtime an application uses. ## Benefits of Side-by-Side Execution - + Prior to Windows XP and the .NET Framework, DLL conflicts occurred because applications were unable to distinguish between incompatible versions of the same code. Type information contained in a DLL was bound only to a file name. An application had no way of knowing if the types contained in a DLL were the same types that the application was built with. As a result, a new version of a component could overwrite an older version and break applications. Side-by-side execution and the .NET Framework provide the following features to eliminate DLL conflicts: @@ -96,13 +96,13 @@ To mitigate partially qualified assembly references in code, you can use the [\< The following example shows the application configuration file entry to fully qualify an assembly called `myAssembly`. ```xml - - + - + version=1.0.0.0, +publicKeyToken=..., + culture=neutral"/> + ``` Whenever an assembly load statement references `myAssembly`, these configuration file settings cause the runtime to automatically translate the partially qualified `myAssembly` reference to a fully qualified reference. For example, Assembly.Load("myAssembly") becomes Assembly.Load("myAssembly, version=1.0.0.0, publicKeyToken=..., culture=neutral"). From fc7975f4579db6d44cbb1a03c3764670916786cb Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:30:25 -0400 Subject: [PATCH 07/18] fix: MD009 in docs/framework/get-started --- docs/framework/get-started/index.md | 6 +++--- docs/framework/get-started/net-core-and-open-source.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/framework/get-started/index.md b/docs/framework/get-started/index.md index 5c542a6c75b11..6d512f6d0de8b 100644 --- a/docs/framework/get-started/index.md +++ b/docs/framework/get-started/index.md @@ -11,8 +11,8 @@ ms.assetid: c693fd34-88fe-4d90-b332-19eeadf3b7e7 .NET Framework is a run-time execution environment that manages apps that target .NET Framework. It consists of the common language runtime, which provides memory management and other system services, and an extensive class library, which enables programmers to take advantage of robust, reliable code for all major areas of app development. -> [!NOTE] -> .NET Framework is available on Windows systems only. You can use [.NET Core](../../core/index.md) to run apps on Windows, MacOS, and Linux. +> [!NOTE] +> .NET Framework is available on Windows systems only. You can use [.NET Core](../../core/index.md) to run apps on Windows, MacOS, and Linux. ## What is .NET Framework? @@ -32,7 +32,7 @@ ms.assetid: c693fd34-88fe-4d90-b332-19eeadf3b7e7 - Side-by-side execution. .NET Framework helps resolve version conflicts by allowing multiple versions of the common language runtime to exist on the same computer. This means that multiple versions of apps can coexist and that an app can run on the version of .NET Framework with which it was built. Side-by-side execution applies to the .NET Framework version groups 1.0/1.1, 2.0/3.0/3.5, and 4/4.5.x/4.6.x/4.7.x/4.8. -- Multitargeting. By targeting [.NET Standard](../../standard/net-standard.md), developers create class libraries that work on multiple .NET Framework platforms supported by that version of the standard. For example, libraries that target .NET Standard 2.0 can be used by apps that target .NET Framework 4.6.1, .NET Core 2.0, and UWP 10.0.16299. +- Multitargeting. By targeting [.NET Standard](../../standard/net-standard.md), developers create class libraries that work on multiple .NET Framework platforms supported by that version of the standard. For example, libraries that target .NET Standard 2.0 can be used by apps that target .NET Framework 4.6.1, .NET Core 2.0, and UWP 10.0.16299. ## The .NET Framework for users diff --git a/docs/framework/get-started/net-core-and-open-source.md b/docs/framework/get-started/net-core-and-open-source.md index 568d948fa35b7..f70fd6251a135 100644 --- a/docs/framework/get-started/net-core-and-open-source.md +++ b/docs/framework/get-started/net-core-and-open-source.md @@ -6,7 +6,7 @@ ms.assetid: e6bd4655-ce37-4003-8462-468a6fe2c40f # .NET Core and open source This article provides a brief overview of what .NET Core is and shows how you can find more information. To find the complete list of documentation for .NET Core, visit the [.NET Core guide](../../core/index.md). - + ## What is .NET Core? .NET Core is a general purpose, modular, cross-platform and open source implementation of the .NET Standard. It contains many of the same APIs as the .NET Framework (but .NET Core is a smaller set) and includes runtime, framework, compiler and tools components that support a variety of operating systems and chip targets. The .NET Core implementation was primarily driven by the ASP.NET Core workloads but also by the need and desire to have a more modern implementation. It can be used in device, cloud and embedded/IoT scenarios. From 0c5d6ffdb1a5c2adea838c734e1ae3f6c97905fc Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:30:57 -0400 Subject: [PATCH 08/18] fix: MD009 in docs/framework/interop --- docs/framework/interop/callback-functions.md | 4 +- ...nterop-sample-com-client-and-net-server.md | 76 +++++++++---------- ...nterop-sample-net-client-and-com-server.md | 34 ++++----- ...-framework-based-com-components-for-reg.md | 26 +++---- .../interop/default-marshaling-behavior.md | 34 ++++----- .../interop/default-marshaling-for-arrays.md | 34 ++++----- ...how-to-add-references-to-type-libraries.md | 2 +- .../how-to-create-wrappers-manually.md | 8 +- .../how-to-implement-callback-functions.md | 6 +- .../how-to-map-hresults-and-exceptions.md | 2 +- ...how-to-migrate-managed-code-dcom-to-wcf.md | 36 ++++----- .../marshaling-data-with-com-interop.md | 6 +- .../marshaling-different-types-of-arrays.md | 8 +- docs/framework/interop/msgbox-sample.md | 2 +- docs/framework/interop/passing-structures.md | 26 +++---- .../interop/platform-invoke-examples.md | 4 +- .../interop/specifying-an-entry-point.md | 2 +- 17 files changed, 155 insertions(+), 155 deletions(-) diff --git a/docs/framework/interop/callback-functions.md b/docs/framework/interop/callback-functions.md index 1ac2ec3b401dc..86f2a2b4d71dc 100644 --- a/docs/framework/interop/callback-functions.md +++ b/docs/framework/interop/callback-functions.md @@ -11,8 +11,8 @@ A callback function is code within a managed application that helps an unmanaged To call most DLL functions from managed code, you create a managed definition of the function and then call it. The process is straightforward. - Using a DLL function that requires a callback function has some additional steps. First, you must determine whether the function requires a callback by looking at the documentation for the function. Next, you have to create the callback function in your managed application. Finally, you call the DLL function, passing a pointer to the callback function as an argument. - + Using a DLL function that requires a callback function has some additional steps. First, you must determine whether the function requires a callback by looking at the documentation for the function. Next, you have to create the callback function in your managed application. Finally, you call the DLL function, passing a pointer to the callback function as an argument. + The following illustration summarizes the callback function and implementation steps: ![Diagram showing the platform invoke callback process.](./media/callback-functions/platform-invoke-callback-process.gif) diff --git a/docs/framework/interop/com-interop-sample-com-client-and-net-server.md b/docs/framework/interop/com-interop-sample-com-client-and-net-server.md index c194a5f5f7946..30b02415ab528 100644 --- a/docs/framework/interop/com-interop-sample-com-client-and-net-server.md +++ b/docs/framework/interop/com-interop-sample-com-client-and-net-server.md @@ -12,7 +12,7 @@ ms.assetid: a219cb2c-9fa2-4c90-9b26-939e0788f178 # COM Interop Sample: COM Client and .NET Server This sample demonstrates the interoperation of a [COM Client](#cpconcominteropsamplecomclientnetserveranchor1) and a [.NET Server](#cpconcominteropsamplecomclientnetserveranchor2) that performs mortgage calculations. In this example, the client creates and calls an instance of the managed `Loan` class, passes four arguments (one of those four being equal to zero) to the instance, and displays the computations. Code examples from this sample appear throughout this section. - + ## COM Client ```cpp @@ -27,7 +27,7 @@ int main(int argc, char* argv[]) ILoanPtr pILoan(__uuidof(Loan)); - if (argc < 5) + if (argc < 5) { printf("Usage: ConLoan Balance Rate Term Payment\n"); printf(" Either Balance, Rate, Term, or Payment must be 0\n"); @@ -44,7 +44,7 @@ int main(int argc, char* argv[]) pILoan->put_Term(term); pILoan->put_Payment(payment); - if (openingBalance == 0.00) + if (openingBalance == 0.00) pILoan->ComputeOpeningBalance(&openingBalance); if (rate == 0.00) pILoan->ComputeRate(&rate); if (term == 0) pILoan->ComputeTerm(&term); @@ -61,17 +61,17 @@ int main(int argc, char* argv[]) double Interest = 0.0; printf("%4s%10s%12s%10s%12s\n", "Nbr", "Payment", "Principal", "Interest", "Balance"); - printf("%4s%10s%12s%10s%12s\n", "---", "-------", "---------", + printf("%4s%10s%12s%10s%12s\n", "---", "-------", "---------", "--------", "-------"); pILoan->GetFirstPmtDistribution(payment, &Balance, &Principal, &Interest, &MorePmts); - for (short PmtNbr = 1; MorePmts; PmtNbr++) + for (short PmtNbr = 1; MorePmts; PmtNbr++) { printf("%4i%10.2f%12.2f%10.2f%12.2f\n", PmtNbr, payment, Principal, Interest, Balance); - pILoan->GetNextPmtDistribution(payment, &Balance, &Principal, &Interest, &MorePmts); + pILoan->GetNextPmtDistribution(payment, &Balance, &Principal, &Interest, &MorePmts); } CoUninitialize(); @@ -79,7 +79,7 @@ int main(int argc, char* argv[]) } ``` - + ## .NET Server ```vb @@ -87,13 +87,13 @@ Imports System Imports System.Reflection -Namespace LoanLib +Namespace LoanLib - Public Interface ILoan + Public Interface ILoan Property OpeningBalance() As Double - Property Rate() As Double - Property Payment() As Double - Property Term() As Short + Property Rate() As Double + Property Payment() As Double + Property Term() As Short Property RiskRating() As String Function ComputePayment() As Double Function ComputeOpeningBalance() As Double @@ -105,7 +105,7 @@ Namespace LoanLib Function GetNextPmtDistribution(PmtAmt As Double, _ ByRef Balance As Double, ByRef PrinPortion As Double, _ ByRef IntPortion As Double) As Boolean - End Interface + End Interface Public Class Loan Implements ILoan @@ -113,7 +113,7 @@ Namespace LoanLib Private m_rate As Double Private m_payment As Double Private m_term As Short - Private m_riskRating As String + Private m_riskRating As String Public Property OpeningBalance() As Double _ Implements ILoan.OpeningBalance @@ -124,7 +124,7 @@ Namespace LoanLib Set m_openingBalance = value End Set - End Property + End Property Public Property Rate() As Double _ Implements ILoan.Rate @@ -135,7 +135,7 @@ Namespace LoanLib Set m_rate = value End Set - End Property + End Property Public Property Payment() As Double _ Implements ILoan.Payment @@ -146,7 +146,7 @@ Namespace LoanLib Set m_payment = value End Set - End Property + End Property Public Property Term() As Short _ Implements ILoan.Term @@ -157,7 +157,7 @@ Namespace LoanLib Set m_term = value End Set - End Property + End Property Public Property RiskRating() As String _ Implements ILoan.RiskRating @@ -176,7 +176,7 @@ Namespace LoanLib Payment = Util.Round(OpeningBalance *(Rate / _ (1 - Math.Pow(1 + Rate, - Term))), 2) Return Payment - End Function + End Function Public Function ComputeOpeningBalance() As Double _ Implements ILoan.ComputeOpeningBalance @@ -184,7 +184,7 @@ Namespace LoanLib OpeningBalance = Util.Round(Payment /(Rate / _ (1 - Math.Pow(1 + Rate, - Term))), 2) Return OpeningBalance - End Function + End Function Public Function ComputeRate() As Double _ Implements ILoan.ComputeRate @@ -200,7 +200,7 @@ Namespace LoanLib End If Next Return Rate - End Function + End Function Public Function ComputeTerm() As Short _ Implements ILoan.ComputeTerm @@ -216,7 +216,7 @@ Namespace LoanLib End If Next Return Term - End Function + End Function Public Function GetFirstPmtDistribution(PmtAmt As Double, _ ByRef Balance As Double, ByRef PrinPortion As Double, _ @@ -226,7 +226,7 @@ Namespace LoanLib Balance = OpeningBalance Return GetNextPmtDistribution(PmtAmt, Balance, PrinPortion, _ IntPortion) - End Function + End Function Public Function GetNextPmtDistribution(PmtAmt As Double, _ ByRef Balance As Double, ByRef PrinPortion As Double, _ @@ -239,10 +239,10 @@ Namespace LoanLib If Balance <= 0.0 Then Return False - End If + End If Return True End Function - End Class + End Class Friend Class Util @@ -267,7 +267,7 @@ namespace LoanLib { public interface ILoan { double OpeningBalance{get; set;} double Rate{get; set;} - double Payment{get; set;} + double Payment{get; set;} short Term{get; set;} String RiskRating{get; set;} @@ -286,7 +286,7 @@ namespace LoanLib { private double rate; private double payment; private short term; - private String riskRating; + private String riskRating; public double OpeningBalance { get { return openingBalance; } @@ -314,13 +314,13 @@ namespace LoanLib { } public double ComputePayment() { - Payment = Util.Round(OpeningBalance * (Rate / (1 – + Payment = Util.Round(OpeningBalance * (Rate / (1 – Math.Pow((1 + Rate), -Term))), 2); return Payment; } public double ComputeOpeningBalance() { - OpeningBalance = Util.Round(Payment / (Rate / (1 - Math.Pow((1 + OpeningBalance = Util.Round(Payment / (Rate / (1 - Math.Pow((1 + Rate), -Term))), 2); return OpeningBalance; } @@ -329,43 +329,43 @@ namespace LoanLib { double DesiredPayment = Payment; for (Rate = 0.001; Rate < 28.0; Rate += 0.001) { - Payment = Util.Round(OpeningBalance * (Rate / (1 – + Payment = Util.Round(OpeningBalance * (Rate / (1 – Math.Pow((1 + Rate), -Term))), 2); if (Payment >= DesiredPayment) break; } - return Rate; + return Rate; } public short ComputeTerm() { double DesiredPayment = Payment; for (Term = 1; Term < 480 ; Term ++) { - Payment = Util.Round(OpeningBalance * (Rate / (1 – + Payment = Util.Round(OpeningBalance * (Rate / (1 – Math.Pow((1 + Rate), -Term))),2); if (Payment <= DesiredPayment) break; } - return Term; + return Term; } - public bool GetFirstPmtDistribution(double PmtAmt, ref double + public bool GetFirstPmtDistribution(double PmtAmt, ref double Balance, out double PrinPortion, out double IntPortion) { Balance = OpeningBalance; - return GetNextPmtDistribution(PmtAmt, ref Balance, out - PrinPortion, out IntPortion); + return GetNextPmtDistribution(PmtAmt, ref Balance, out + PrinPortion, out IntPortion); } - public bool GetNextPmtDistribution(double PmtAmt, ref double + public bool GetNextPmtDistribution(double PmtAmt, ref double Balance, out double PrinPortion, out double IntPortion) { IntPortion = Util.Round(Balance * Rate, 2); PrinPortion = Util.Round(PmtAmt - IntPortion,2); Balance = Util.Round(Balance - PrinPortion,2); - if (Balance <= 0.0) + if (Balance <= 0.0) return false; return true; diff --git a/docs/framework/interop/com-interop-sample-net-client-and-com-server.md b/docs/framework/interop/com-interop-sample-net-client-and-com-server.md index 433543d12230f..1973313a86e8a 100644 --- a/docs/framework/interop/com-interop-sample-net-client-and-com-server.md +++ b/docs/framework/interop/com-interop-sample-net-client-and-com-server.md @@ -15,7 +15,7 @@ This sample demonstrates how a [.NET client](#cpconcominteropsamplenetclientcoms In this example, the client creates and calls an instance of the **Loan** coclass, passes four arguments (one of those four being equal to zero) to the instance, and displays the computations. Code fragments from this sample appear throughout this section. - + ## .NET Client ```vb @@ -54,7 +54,7 @@ Public Class LoanApp End If If ln.Payment = 0.0 Then ln.ComputePayment() - End If + End If Console.WriteLine("Balance = {0,10:0.00}", ln.OpeningBalance) Console.WriteLine("Rate = {0,10:0.0%}", ln.Rate) Console.WriteLine("Term = {0,10:0.00}", ln.Term) @@ -98,10 +98,10 @@ public class LoanApp { Loan ln = new Loan(); - if (Args.Length < 4) + if (Args.Length < 4) { Console.WriteLine("Usage: ConLoan Balance Rate Term Payment"); - Console.WriteLine(" Either Balance, Rate, Term, or Payment + Console.WriteLine(" Either Balance, Rate, Term, or Payment must be 0"); return; } @@ -131,21 +131,21 @@ public class LoanApp { Console.WriteLine("{0,4}{1,10}{2,12}{3,10}{4,12}", "---", "-------", "---------", "--------", "-------"); - MorePmts = ln.GetFirstPmtDistribution(ln.Payment, out Balance, + MorePmts = ln.GetFirstPmtDistribution(ln.Payment, out Balance, out Principal, out Interest); for (short PmtNbr = 1; MorePmts; PmtNbr++) { Console.WriteLine("{0,4}{1,10:0.00}{2,12:0.00}{3,10:0.00} {4,12:0.00}", PmtNbr, ln.Payment, Principal, Interest, Balance); - MorePmts = ln.GetNextPmtDistribution(ln.Payment, ref Balance, - out Principal, out Interest); + MorePmts = ln.GetNextPmtDistribution(ln.Payment, ref Balance, + out Principal, out Interest); } } } ``` - + ## COM Server ```cpp @@ -155,7 +155,7 @@ public class LoanApp { #include "LoanLib.h" #include "Loan.h" -static double Round(double value, short digits); +static double Round(double value, short digits); STDMETHODIMP CLoan::get_OpeningBalance(double *pVal) { @@ -207,7 +207,7 @@ STDMETHODIMP CLoan::put_Term(short newVal) STDMETHODIMP CLoan::ComputePayment(double *pVal) { - Payment = Round(OpeningBalance * (Rate / + Payment = Round(OpeningBalance * (Rate / (1 - pow((1 + Rate), -Term))),2); *pVal = Payment; return S_OK; @@ -215,7 +215,7 @@ STDMETHODIMP CLoan::ComputePayment(double *pVal) STDMETHODIMP CLoan::ComputeOpeningBalance(double *pVal) { - OpeningBalance = Round(Payment / (Rate / + OpeningBalance = Round(Payment / (Rate / (1 - pow((1 + Rate), -Term))),2); *pVal = OpeningBalance ; return S_OK; @@ -227,14 +227,14 @@ STDMETHODIMP CLoan::ComputeRate(double *pVal) for (Rate = 0.001; Rate < 28.0; Rate += 0.001) { - Payment = Round(OpeningBalance * (Rate / + Payment = Round(OpeningBalance * (Rate / (1 - pow((1 + Rate), -Term))),2); if (Payment >= DesiredPayment) break; } - *pVal = Rate; + *pVal = Rate; return S_OK; } @@ -243,19 +243,19 @@ STDMETHODIMP CLoan::ComputeTerm(short *pVal) double DesiredPayment = Payment; for (Term = 1; Term < 480 ; Term ++) { - Payment = Round(OpeningBalance * (Rate / + Payment = Round(OpeningBalance * (Rate / (1 - pow((1 + Rate), -Term))),2); if (Payment <= DesiredPayment) break; } - *pVal = Term; + *pVal = Term; return S_OK; } STDMETHODIMP CLoan::GetFirstPmtDistribution(double PmtAmt, double *Balance, double *PrinPortion, double *IntPortion, VARIANT_BOOL *pVal) { *Balance = OpeningBalance; - GetNextPmtDistribution(PmtAmt, Balance, PrinPortion, IntPortion, + GetNextPmtDistribution(PmtAmt, Balance, PrinPortion, IntPortion, pVal); return S_OK; } @@ -284,7 +284,7 @@ STDMETHODIMP CLoan::put_RiskRating(BSTR newVal) RiskRating = newVal; return S_OK; } -static double Round(double value, short digits) +static double Round(double value, short digits) { double factor = pow(10, digits); return floor(value * factor + 0.5)/factor; diff --git a/docs/framework/interop/configure-net-framework-based-com-components-for-reg.md b/docs/framework/interop/configure-net-framework-based-com-components-for-reg.md index d71adf448a639..c8be5b763c7c6 100644 --- a/docs/framework/interop/configure-net-framework-based-com-components-for-reg.md +++ b/docs/framework/interop/configure-net-framework-based-com-components-for-reg.md @@ -36,10 +36,10 @@ Registration-free activation for .NET Framework-based components is only slightl ```xml - ``` @@ -48,18 +48,18 @@ Registration-free activation for .NET Framework-based components is only slightl ```xml - - @@ -116,7 +116,7 @@ Registration-free activation for .NET Framework-based components is only slightl _ ar() As Integer) -Sub New2( _ +Sub New2( _ ar() As DateTime) -Sub New3(ByRef _ +Sub New3(ByRef _ ar() As String) ``` ```csharp void New1([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VT_I4)] int[] ar) ; -void New2([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VT_DATE)] +void New2([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VT_DATE)] DateTime[] ar); -void New3([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VT_BSTR)] +void New3([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VT_BSTR)] ref String[] ar); ``` @@ -108,7 +108,7 @@ Sub New2( type to the array parameter of the managed method definition in one of the following ways: -- Identify another parameter that contains the number of elements in the array. The parameters are identified by position, starting with the first parameter as number 0. +- Identify another parameter that contains the number of elements in the array. The parameters are identified by position, starting with the first parameter as number 0. ```vb Sub [New](ElemCnt As Integer, _ @@ -148,7 +148,7 @@ void New3(ref String ar); ```csharp void New( - int ElemCnt, + int ElemCnt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] int[] ar ); ``` @@ -221,12 +221,12 @@ Sub [New]( - @@ -153,9 +153,9 @@ public class CustomerService: ICustomerManager - @@ -174,7 +174,7 @@ customerServiceHost.Open(); To call the service from the client, you need to create a channel factory for the service, and request a channel, which will enable you to directly call the `GetCustomer` method directly from the client. The channel implements the service’s interface and handles the underlying request/reply logic for you. The return value from that method call is the deserialized copy of the service response. ```csharp -ChannelFactory factory = +ChannelFactory factory = new ChannelFactory("customermanager"); ICustomerManager service = factory.CreateChannel(); Customer customer = service.GetCustomer("Mary", "Smith"); @@ -300,7 +300,7 @@ public interface ISessionBoundObject ```csharp public class SessionBoundFactory : ISessionBoundFactory { - public static ChannelFactory _factory = + public static ChannelFactory _factory = new ChannelFactory("sessionbound"); public SessionBoundFactory() @@ -337,12 +337,12 @@ public class SessionBoundFactory : ISessionBoundFactory @@ -368,15 +368,15 @@ sessionBoundServiceHost.Open(); - - - + ``` diff --git a/docs/framework/interop/marshaling-data-with-com-interop.md b/docs/framework/interop/marshaling-data-with-com-interop.md index 6af6bc05bb70a..f00e91b9ed5d5 100644 --- a/docs/framework/interop/marshaling-data-with-com-interop.md +++ b/docs/framework/interop/marshaling-data-with-com-interop.md @@ -17,9 +17,9 @@ COM interop provides support for both using COM objects from managed code and ex The following sections link to topics that describe the processes for customizing interop wrappers when you can (or must) supply the marshaler with additional type information. ## In This Section -[How to: Create Wrappers Manually](how-to-create-wrappers-manually.md) -Describes how to create a COM wrapper manually in managed source code. - +[How to: Create Wrappers Manually](how-to-create-wrappers-manually.md) +Describes how to create a COM wrapper manually in managed source code. + [How to: Migrate Managed-Code DCOM to WCF](how-to-migrate-managed-code-dcom-to-wcf.md) Describes how to migrate managed DCOM code to WCF for the most secure solution. diff --git a/docs/framework/interop/marshaling-different-types-of-arrays.md b/docs/framework/interop/marshaling-different-types-of-arrays.md index ae35d60a06737..3419144c4a9cb 100644 --- a/docs/framework/interop/marshaling-different-types-of-arrays.md +++ b/docs/framework/interop/marshaling-different-types-of-arrays.md @@ -83,14 +83,14 @@ An array is a reference type in managed code that contains one or more elements ```cpp typedef struct _MYPOINT { - int x; - int y; + int x; + int y; } MYPOINT; typedef struct _MYPERSON { - char* first; - char* last; + char* first; + char* last; } MYPERSON; ``` diff --git a/docs/framework/interop/msgbox-sample.md b/docs/framework/interop/msgbox-sample.md index 52a9a3c9ea25f..4597712dd9367 100644 --- a/docs/framework/interop/msgbox-sample.md +++ b/docs/framework/interop/msgbox-sample.md @@ -18,7 +18,7 @@ This sample demonstrates how to pass string types by value as In parameters and - **MessageBox** exported from User32.dll. ```cpp - int MessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, + int MessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType); ``` diff --git a/docs/framework/interop/passing-structures.md b/docs/framework/interop/passing-structures.md index f926ca76de823..c4ef601458bfe 100644 --- a/docs/framework/interop/passing-structures.md +++ b/docs/framework/interop/passing-structures.md @@ -51,7 +51,7 @@ Public Structure Rect Public bottom As Integer End Structure -Friend Class NativeMethods +Friend Class NativeMethods Friend Declare Auto Function PtInRect Lib "user32.dll" ( ByRef r As Rect, p As Point) As Boolean End Class @@ -64,7 +64,7 @@ using System.Runtime.InteropServices; public struct Point { public int x; public int y; -} +} [StructLayout(LayoutKind.Explicit)] public struct Rect { @@ -72,7 +72,7 @@ public struct Rect { [FieldOffset(4)] public int top; [FieldOffset(8)] public int right; [FieldOffset(12)] public int bottom; -} +} internal static class NativeMethods { @@ -96,7 +96,7 @@ Imports System.Runtime.InteropServices Public Class MySystemTime Public wYear As Short Public wMonth As Short - Public wDayOfWeek As Short + Public wDayOfWeek As Short Public wDay As Short Public wHour As Short Public wMinute As Short @@ -111,7 +111,7 @@ Friend Class NativeMethods hWnd As IntPtr, lpText As String, lpCaption As String, uType As UInteger) As Integer End Class -Public Class TestPlatformInvoke +Public Class TestPlatformInvoke Public Shared Sub Main() Dim sysTime As New MySystemTime() NativeMethods.GetSystemTime(sysTime) @@ -122,7 +122,7 @@ Public Class TestPlatformInvoke ControlChars.CrLf & "Month: " & sysTime.wMonth & _ ControlChars.CrLf & "DayOfWeek: " & sysTime.wDayOfWeek & _ ControlChars.CrLf & "Day: " & sysTime.wDay - NativeMethods.MessageBox(IntPtr.Zero, dt, "Platform Invoke Sample", 0) + NativeMethods.MessageBox(IntPtr.Zero, dt, "Platform Invoke Sample", 0) End Sub End Class ``` @@ -130,14 +130,14 @@ End Class ```csharp [StructLayout(LayoutKind.Sequential)] public class MySystemTime { - public ushort wYear; + public ushort wYear; public ushort wMonth; - public ushort wDayOfWeek; - public ushort wDay; - public ushort wHour; - public ushort wMinute; - public ushort wSecond; - public ushort wMilliseconds; + public ushort wDayOfWeek; + public ushort wDay; + public ushort wHour; + public ushort wMinute; + public ushort wSecond; + public ushort wMilliseconds; } internal static class NativeMethods { diff --git a/docs/framework/interop/platform-invoke-examples.md b/docs/framework/interop/platform-invoke-examples.md index 3c26009e8a2af..e5ee3eeed2c27 100644 --- a/docs/framework/interop/platform-invoke-examples.md +++ b/docs/framework/interop/platform-invoke-examples.md @@ -17,8 +17,8 @@ ms.assetid: 15926806-f0b7-487e-93a6-4e9367ec689f # Platform Invoke Examples The following examples demonstrate how to define and call the **MessageBox** function in User32.dll, passing a simple string as an argument. In the examples, the field is set to **Auto** to let the target platform determine the character width and string marshaling. - [!code-cpp[Conceptual.Interop.PInvoke#1](../../../samples/snippets/cpp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/cpp/Example.cpp#1)] - [!code-csharp[Conceptual.Interop.PInvoke#1](../../../samples/snippets/csharp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/cs/Example1.cs#1)] + [!code-cpp[Conceptual.Interop.PInvoke#1](../../../samples/snippets/cpp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/cpp/Example.cpp#1)] + [!code-csharp[Conceptual.Interop.PInvoke#1](../../../samples/snippets/csharp/VS_Snippets_CLR/Conceptual.Interop.PInvoke/cs/Example1.cs#1)] [!code-vb[Conceptual.Interop.PInvoke#1](../../../samples/snippets/visualbasic/VS_Snippets_CLR/Conceptual.Interop.PInvoke/vb/Example1.vb#1)] For additional examples, see [Marshaling Data with Platform Invoke](marshaling-data-with-platform-invoke.md). diff --git a/docs/framework/interop/specifying-an-entry-point.md b/docs/framework/interop/specifying-an-entry-point.md index db708bc3ac129..2f01576b0202e 100644 --- a/docs/framework/interop/specifying-an-entry-point.md +++ b/docs/framework/interop/specifying-an-entry-point.md @@ -24,7 +24,7 @@ An entry point identifies the location of a function in a DLL. Within a managed This topic demonstrates how to rename a DLL function in managed code. ## Renaming a Function in Visual Basic - + Visual Basic uses the **Function** keyword in the **Declare** statement to set the field. The following example shows a basic declaration. ```vb From 2db727bae2de690ae13af844a468c26b3d89c995 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:31:39 -0400 Subject: [PATCH 09/18] fix: MD009 in docs/framework/mef --- .../mef/composition-analysis-tool-mefx.md | 14 +++++++------- docs/framework/mef/index.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/framework/mef/composition-analysis-tool-mefx.md b/docs/framework/mef/composition-analysis-tool-mefx.md index 6fd41be03657c..01a84575f0176 100644 --- a/docs/framework/mef/composition-analysis-tool-mefx.md +++ b/docs/framework/mef/composition-analysis-tool-mefx.md @@ -10,11 +10,11 @@ ms.assetid: c48a7f93-83bb-4a06-aea0-d8e7bd1502ad # Composition Analysis Tool (Mefx) The Composition Analysis Tool (Mefx) is a command-line application that analyzes library (.dll) and application (.exe) files containing Managed Extensibility Framework (MEF) parts. The primary purpose of Mefx is to provide developers a way to diagnose composition failures in their MEF applications without the requirement to add cumbersome tracing code to the application itself. It can also be useful to help understand parts from a library provided by a third party. This topic describes how to use Mefx and provides a reference for its syntax. - + ## Getting Mefx Mefx is available on GitHub at [Managed Extensibility Framework](https://github.com/MicrosoftArchive/mef/releases/tag/4.0). Simply download and unzip the tool. - + ## Basic Syntax Mefx is invoked from the command line in the following format: @@ -33,7 +33,7 @@ mefx /file:MyAddIn.dll /directory:Program\AddIns [action...] After the list of files and directories, you must specify a command, and any options for that command. - + ## Listing Available Parts Use the `/parts` action to list all the parts declared in the files loaded. The result is a simple list of part names. @@ -51,7 +51,7 @@ mefx /file:MyAddIn.dll /type:MyAddIn.AddIn /verbose [Export] MyAddIn.MemberPart (ContractName=" MyAddIn.MemberPart") ``` - + ## Listing Imports and Exports The `/imports` and `/exports` actions will list all the imported parts and all the exported parts, respectively. You can also list the parts that import or export a particular type by using the `/importers` or `/exporters` actions. @@ -62,7 +62,7 @@ MyAddin.AddIn You can also apply the `/verbose` option to these actions. - + ## Finding Rejected Parts Once it has loaded the available parts, Mefx uses the MEF composition engine to compose them. Parts that cannot be successfully composed are referred to as *rejected*. To list all the rejected parts, use the `/rejected` action. @@ -99,7 +99,7 @@ from: ClassLibrary1.ChainOne from: AssemblyCatalog (Assembly="ClassLibrary1, Ver The interesting information is contained in the `[Exception]` and `[Unsuitable]` results. The `[Exception]` result provides information about why a part was rejected. The `[Unsuitable]` result indicates why an otherwise-matching part could not be used to fill an import; in this case, because that part was itself rejected for missing imports. - + ## Analyzing Primary Causes If several parts are linked in a long dependency chain, a problem involving a part near the bottom may cause the entire chain to be rejected. Diagnosing these problems can be difficult because the root cause of the failure is not always obvious. To help with the problem, you can use the `/causes` action, which attempts to find the root cause of any cascading rejection. @@ -108,7 +108,7 @@ from: ClassLibrary1.ChainOne from: AssemblyCatalog (Assembly="ClassLibrary1, Ver > [!NOTE] > In most cases, Mefx will be able to diagnose the root cause of a cascading failure. However, in cases where parts are added programmatically to a container, cases involving hierarchical containers, or cases involving custom `ExportProvider` implementations, Mefx will not be able to diagnose the cause. In general, the previously described cases should be avoided where possible, as failures are generally difficult to diagnose. - + ## White Lists The `/whitelist` option enables you to specify a text file that lists parts that are expected to be rejected. Unexpected rejections will then be flagged. This can be useful when you analyze an incomplete library, or a sub-library that is missing some dependencies. The `/whitelist` option can be applied to the `/rejected` or `/causes` actions. diff --git a/docs/framework/mef/index.md b/docs/framework/mef/index.md index 27c811cb5550e..81bbe41b47508 100644 --- a/docs/framework/mef/index.md +++ b/docs/framework/mef/index.md @@ -333,7 +333,7 @@ public String Calculate(string input) int right; char operation; // Finds the operator. - int fn = FindFirstNonDigit(input); + int fn = FindFirstNonDigit(input); if (fn < 0) return "Could not parse command."; try From 82a69f032c4866b243a65b676cf6de79d68c5d94 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:32:13 -0400 Subject: [PATCH 10/18] fix: MD009 in docs/framework/migration-guide --- ...determine-which-net-framework-updates-are-installed.md | 2 +- .../migration-guide/mitigation-new-64-bit-jit-compiler.md | 4 ++-- .../migration-guide/mitigation-path-colon-checks.md | 2 +- .../migration-guide/mitigation-path-normalization.md | 4 ++-- .../mitigation-png-frames-in-icon-objects.md | 4 ++-- .../mitigation-serialization-control-characters.md | 8 ++++---- ...itigation-x509certificateclaimset-findclaims-method.md | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/framework/migration-guide/how-to-determine-which-net-framework-updates-are-installed.md b/docs/framework/migration-guide/how-to-determine-which-net-framework-updates-are-installed.md index a96ee53eeebc8..fe6a586933e30 100644 --- a/docs/framework/migration-guide/how-to-determine-which-net-framework-updates-are-installed.md +++ b/docs/framework/migration-guide/how-to-determine-which-net-framework-updates-are-installed.md @@ -68,7 +68,7 @@ $DotNetVersions = Get-ChildItem HKLM:\SOFTWARE\WOW6432Node\Microsoft\Updates | W "*.NET Framework*"} ForEach($Version in $DotNetVersions){ - + $Updates = Get-ChildItem $Version.PSPath $Version.PSChildName ForEach ($Update in $Updates){ diff --git a/docs/framework/migration-guide/mitigation-new-64-bit-jit-compiler.md b/docs/framework/migration-guide/mitigation-new-64-bit-jit-compiler.md index 52feb376a7d92..3041c3cc3a2a3 100644 --- a/docs/framework/migration-guide/mitigation-new-64-bit-jit-compiler.md +++ b/docs/framework/migration-guide/mitigation-new-64-bit-jit-compiler.md @@ -30,7 +30,7 @@ Starting with the .NET Framework 4.6, the runtime includes a new 64-bit JIT comp - Under certain conditions, if an `if` statement is used to test for a condition before entering a `try` block and in the exit from the `try` block, and the same condition is evaluated in the `catch` or `finally` block, the new 64-bit JIT compiler removes the `if` condition from the `catch` or `finally` block when it optimizes code. As a result, code inside the `if` statement in the `catch` or `finally` block is executed unconditionally. - + ## Mitigation of known issues If you encounter the issues listed above, you can address them by doing any of the following: @@ -40,7 +40,7 @@ Starting with the .NET Framework 4.6, the runtime includes a new 64-bit JIT comp - Compile with the older 64-bit JIT compiler. See the [Mitigation of other issues](#Other) section for more information on how to do this. - + ## Mitigation of other issues If you encounter any other difference in behavior between code compiled with the older 64-bit compiler and the new 64-bit JIT compiler, or between the debug and release versions of your app that are both compiled with the new 64-bit JIT compiler, you can do the following to compile your app with the older 64-bit JIT compiler: diff --git a/docs/framework/migration-guide/mitigation-path-colon-checks.md b/docs/framework/migration-guide/mitigation-path-colon-checks.md index 7d1d43570b34c..0db9db36ba496 100644 --- a/docs/framework/migration-guide/mitigation-path-colon-checks.md +++ b/docs/framework/migration-guide/mitigation-path-colon-checks.md @@ -20,7 +20,7 @@ Starting with apps that target the .NET Framework 4.6.2, a number of changes wer ```xml - + ``` diff --git a/docs/framework/migration-guide/mitigation-path-normalization.md b/docs/framework/migration-guide/mitigation-path-normalization.md index 33fa5eeb7c96b..53f67b0ce2c80 100644 --- a/docs/framework/migration-guide/mitigation-path-normalization.md +++ b/docs/framework/migration-guide/mitigation-path-normalization.md @@ -41,7 +41,7 @@ Apps that target the .NET Framework 4.6.1 and earlier versions but are running u ```xml - + ``` @@ -49,7 +49,7 @@ Apps that target the .NET Framework 4.6.1 or earlier but are running on the .NET ```xml - + ``` diff --git a/docs/framework/migration-guide/mitigation-png-frames-in-icon-objects.md b/docs/framework/migration-guide/mitigation-png-frames-in-icon-objects.md index d0dcdf4246783..682d59cb93434 100644 --- a/docs/framework/migration-guide/mitigation-png-frames-in-icon-objects.md +++ b/docs/framework/migration-guide/mitigation-png-frames-in-icon-objects.md @@ -15,14 +15,14 @@ Starting with the .NET Framework 4.6, the ](../configure-apps/file-schema/runtime/runtime-element.md) section of your app.config file: ```xml - ``` If the app.config file already contains the `AppContextSwitchOverrides` element, the new value should be merged with the `value` attribute like this: ```xml - ``` diff --git a/docs/framework/migration-guide/mitigation-serialization-control-characters.md b/docs/framework/migration-guide/mitigation-serialization-control-characters.md index 66a15451d43f9..24303e13aee48 100644 --- a/docs/framework/migration-guide/mitigation-serialization-control-characters.md +++ b/docs/framework/migration-guide/mitigation-serialization-control-characters.md @@ -10,15 +10,15 @@ ms.assetid: e065d458-a128-44f2-9f17-66af9d5be954 --- # Mitigation: Serialization of control characters with the DataContractJsonSerializer -Starting with .NET Framework 4.7, the way in which control characters are serialized with the has changed to conform to ECMAScript V6 and V8. - +Starting with .NET Framework 4.7, the way in which control characters are serialized with the has changed to conform to ECMAScript V6 and V8. + ## Impact In .NET Framework 4.6.2 and earlier versions, the did not serialize some special control characters, such as `\b`, `\f`, and `\t`, in a way that was compatible with the ECMAScript V6 and V8 standards. For apps that target versions of .NET Framework starting with .NET Framework 4.7, serialization of these control characters is compatible with ECMAScript V6 and V8. The following APIs are affected: -- +- ## Mitigation @@ -31,7 +31,7 @@ If this behavior is not desirable, you can opt out of this feature by adding the ``` - + ## See also - [Application compatibility](application-compatibility.md) diff --git a/docs/framework/migration-guide/mitigation-x509certificateclaimset-findclaims-method.md b/docs/framework/migration-guide/mitigation-x509certificateclaimset-findclaims-method.md index 69d3981d7754b..921713415df89 100644 --- a/docs/framework/migration-guide/mitigation-x509certificateclaimset-findclaims-method.md +++ b/docs/framework/migration-guide/mitigation-x509certificateclaimset-findclaims-method.md @@ -16,7 +16,7 @@ Starting with apps that target the .NET Framework 4.6.1, the - + ``` @@ -24,7 +24,7 @@ Starting with apps that target the .NET Framework 4.6.1, the - + ``` From f0f069bffe5b0684c29ddbfb69fc97caae2d22f9 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:32:43 -0400 Subject: [PATCH 11/18] fix: MD009 in docs/framework/misc --- docs/framework/misc/code-access-security.md | 6 +-- ...run-partially-trusted-code-in-a-sandbox.md | 22 +++++----- docs/framework/misc/link-demands.md | 2 +- .../misc/securing-exception-handling.md | 40 +++++++++---------- docs/framework/misc/securing-method-access.md | 24 +++++------ .../misc/security-and-serialization.md | 4 +- .../misc/security-transparent-code-level-1.md | 6 +-- .../framework/misc/using-the-assert-method.md | 18 ++++----- 8 files changed, 61 insertions(+), 61 deletions(-) diff --git a/docs/framework/misc/code-access-security.md b/docs/framework/misc/code-access-security.md index a16b5150306b9..55fdf0ce6e80c 100644 --- a/docs/framework/misc/code-access-security.md +++ b/docs/framework/misc/code-access-security.md @@ -32,7 +32,7 @@ ms.assetid: 859af632-c80d-4736-8d6f-1e01b09ce127 All managed code that targets the common language runtime receives the benefits of code access security, even if that code does not make a single code access security call. For more information, see [Code Access Security Basics](code-access-security-basics.md). - + ## Key Functions of Code Access Security Code access security helps limit the access that code has to protected resources and operations. In the .NET Framework, code access security performs the following functions: @@ -44,7 +44,7 @@ ms.assetid: 859af632-c80d-4736-8d6f-1e01b09ce127 - Enforces restrictions on code at run time by comparing the granted permissions of every caller on the call stack to the permissions that callers must have. - + ## Walking the Call Stack To determine whether code is authorized to access a resource or perform an operation, the runtime's security system walks the call stack, comparing the granted permissions of each caller to the permission being demanded. If any caller in the call stack does not have the demanded permission, a security exception is thrown and access is refused. The stack walk is designed to help prevent luring attacks, in which less-trusted code calls highly trusted code and uses it to perform unauthorized actions. Demanding permissions of all callers at run time affects performance, but it is essential to help protect code from luring attacks by less-trusted code. To optimize performance, you can have your code perform fewer stack walks; however, you must be sure that you do not expose a security weakness whenever you do this. @@ -53,7 +53,7 @@ ms.assetid: 859af632-c80d-4736-8d6f-1e01b09ce127 ![Code access security](media/slide-10a.gif "slide_10a") Security stack walk - + ## Related Topics |Title|Description| diff --git a/docs/framework/misc/how-to-run-partially-trusted-code-in-a-sandbox.md b/docs/framework/misc/how-to-run-partially-trusted-code-in-a-sandbox.md index 38a3d0237e74f..bb2f1380d1621 100644 --- a/docs/framework/misc/how-to-run-partially-trusted-code-in-a-sandbox.md +++ b/docs/framework/misc/how-to-run-partially-trusted-code-in-a-sandbox.md @@ -77,8 +77,8 @@ AppDomain.CreateDomain( string friendlyName, The signature for this method is: ```csharp - public static AppDomain CreateDomain(string friendlyName, - Evidence securityInfo, AppDomainSetup info, PermissionSet grantSet, + public static AppDomain CreateDomain(string friendlyName, + Evidence securityInfo, AppDomainSetup info, PermissionSet grantSet, params StrongName[] fullTrustAssemblies) ``` @@ -139,7 +139,7 @@ AppDomain.CreateDomain( string friendlyName, ```csharp public void ExecuteUntrustedCode(string assemblyName, string typeName, string entryPoint, Object[] parameters) { - //Load the MethodInfo for a method in the new assembly. This might be a method you know, or + //Load the MethodInfo for a method in the new assembly. This might be a method you know, or //you can use Assembly.EntryPoint to get to the entry point in an executable. MethodInfo target = Assembly.Load(assemblyName).GetType(typeName).GetMethod(entryPoint); try @@ -149,7 +149,7 @@ AppDomain.CreateDomain( string friendlyName, } catch (Exception ex) { - //When information is obtained from a SecurityException extra information is provided if it is + //When information is obtained from a SecurityException extra information is provided if it is //accessed in full-trust. new PermissionSet(PermissionState.Unrestricted).Assert(); Console.WriteLine("SecurityException caught:\n{0}", ex.ToString()); @@ -204,7 +204,7 @@ using System.Security.Permissions; using System.Reflection; using System.Runtime.Remoting; -//The Sandboxer class needs to derive from MarshalByRefObject so that we can create it in another +//The Sandboxer class needs to derive from MarshalByRefObject so that we can create it in another // AppDomain and refer to it from the default AppDomain. class Sandboxer : MarshalByRefObject { @@ -215,12 +215,12 @@ class Sandboxer : MarshalByRefObject private static Object[] parameters = { 45 }; static void Main() { - //Setting the AppDomainSetup. It is very important to set the ApplicationBase to a folder + //Setting the AppDomainSetup. It is very important to set the ApplicationBase to a folder //other than the one in which the sandboxer resides. AppDomainSetup adSetup = new AppDomainSetup(); adSetup.ApplicationBase = Path.GetFullPath(pathToUntrusted); - //Setting the permissions for the AppDomain. We give the permission to execute and to + //Setting the permissions for the AppDomain. We give the permission to execute and to //read/discover the location where the untrusted code is loaded. PermissionSet permSet = new PermissionSet(PermissionState.None); permSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); @@ -232,19 +232,19 @@ class Sandboxer : MarshalByRefObject AppDomain newDomain = AppDomain.CreateDomain("Sandbox", null, adSetup, permSet, fullTrustAssembly); //Use CreateInstanceFrom to load an instance of the Sandboxer class into the - //new AppDomain. + //new AppDomain. ObjectHandle handle = Activator.CreateInstanceFrom( newDomain, typeof(Sandboxer).Assembly.ManifestModule.FullyQualifiedName, typeof(Sandboxer).FullName ); - //Unwrap the new domain instance into a reference in this domain and use it to execute the + //Unwrap the new domain instance into a reference in this domain and use it to execute the //untrusted code. Sandboxer newDomainInstance = (Sandboxer) handle.Unwrap(); newDomainInstance.ExecuteUntrustedCode(untrustedAssembly, untrustedClass, entryPoint, parameters); } public void ExecuteUntrustedCode(string assemblyName, string typeName, string entryPoint, Object[] parameters) { - //Load the MethodInfo for a method in the new Assembly. This might be a method you know, or + //Load the MethodInfo for a method in the new Assembly. This might be a method you know, or //you can use Assembly.EntryPoint to get to the main function in an executable. MethodInfo target = Assembly.Load(assemblyName).GetType(typeName).GetMethod(entryPoint); try @@ -254,7 +254,7 @@ class Sandboxer : MarshalByRefObject } catch (Exception ex) { - // When we print informations from a SecurityException extra information can be printed if we are + // When we print informations from a SecurityException extra information can be printed if we are //calling it with a full-trust stack. new PermissionSet(PermissionState.Unrestricted).Assert(); Console.WriteLine("SecurityException caught:\n{0}", ex.ToString()); diff --git a/docs/framework/misc/link-demands.md b/docs/framework/misc/link-demands.md index 3710a45c76ed5..0a31f4a30f9d4 100644 --- a/docs/framework/misc/link-demands.md +++ b/docs/framework/misc/link-demands.md @@ -35,7 +35,7 @@ ms.assetid: a33fd5f9-2de9-4653-a4f0-d9df25082c4d _ Public Shared Function ReadData() As String ' Access a custom resource. -End Function +End Function ``` ```csharp diff --git a/docs/framework/misc/securing-exception-handling.md b/docs/framework/misc/securing-exception-handling.md index 31a96eccbb518..69bcafcc8039a 100644 --- a/docs/framework/misc/securing-exception-handling.md +++ b/docs/framework/misc/securing-exception-handling.md @@ -14,13 +14,13 @@ ms.assetid: 1f3da743-9742-47ff-96e6-d0dd1e9e1c19 In Visual C++ and Visual Basic, a filter expression further up the stack runs before any **finally** statement. The **catch** block associated with that filter runs after the **finally** statement. For more information, see [Using User-Filtered Exceptions](../../standard/exceptions/using-user-filtered-exception-handlers.md). This section examines the security implications of this order. Consider the following pseudocode example that illustrates the order in which filter statements and **finally** statements run. ```cpp -void Main() +void Main() { - try + try { Sub(); - } - except (Filter()) + } + except (Filter()) { Console.WriteLine("catch"); } @@ -29,18 +29,18 @@ bool Filter () { Console.WriteLine("filter"); return true; } -void Sub() +void Sub() { - try + try { Console.WriteLine("throw"); throw new Exception(); - } - finally + } + finally { Console.WriteLine("finally"); } -} +} ``` This code prints the following. @@ -55,16 +55,16 @@ Catch The filter runs before the **finally** statement, so security issues can be introduced by anything that makes a state change where execution of other code could take advantage. For example: ```cpp -try +try { Alter_Security_State(); // This means changing anything (state variables, - // switching unmanaged context, impersonation, and - // so on) that could be exploited if malicious + // switching unmanaged context, impersonation, and + // so on) that could be exploited if malicious // code ran before state is restored. Do_some_work(); -} -finally +} +finally { Restore_Security_State(); // This simply restores the state change above. @@ -95,7 +95,7 @@ Public Class UserCode obj.YourMethod() Catch e As Exception When FilterFunc Console.WriteLine("An error occurred: '{0}'", e) - Console.WriteLine("Current Culture: {0}", + Console.WriteLine("Current Culture: {0}", Thread.CurrentThread.CurrentUICulture) End Try End Sub @@ -115,13 +115,13 @@ YourObject.YourMethod() { CultureInfo saveCulture = Thread.CurrentThread.CurrentUICulture; - try + try { Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE"); // Do something that throws an exception. } catch { throw; } - finally + finally { Thread.CurrentThread.CurrentUICulture = saveCulture; } @@ -136,14 +136,14 @@ YourObject.YourMethod() YourObject.YourMethod() { CultureInfo saveCulture = Thread.CurrentThread.CurrentUICulture; - try + try { - try + try { Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE"); // Do something that throws an exception. } - finally + finally { Thread.CurrentThread.CurrentUICulture = saveCulture; } diff --git a/docs/framework/misc/securing-method-access.md b/docs/framework/misc/securing-method-access.md index 9cd0ef8345410..5f707e7de59dc 100644 --- a/docs/framework/misc/securing-method-access.md +++ b/docs/framework/misc/securing-method-access.md @@ -45,7 +45,7 @@ End Class public class Class1 { -} +} ``` ## Excluding Classes and Members from Use by Untrusted Code @@ -61,7 +61,7 @@ public class Class1 For public nonsealed classes: ```vb - _ Public Class CanDeriveFromMe End Class @@ -108,7 +108,7 @@ public abstract class CannotCreateInstanceOfMe_CanCastToMe {} For public virtual functions: ```vb -Class Base1 +Class Base1 _ Public Overridable Sub CanOverrideOrCallMe() End Sub 'CanOverrideOrCallMe @@ -116,7 +116,7 @@ End Class 'Base1 ``` ```csharp -class Base1 +class Base1 { [System.Security.Permissions.PermissionSetAttribute( System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] @@ -160,9 +160,9 @@ End Class 'Derived ```csharp class Derived : Base1 -{ -[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")] - public override void CanOverrideOrCallMe() +{ +[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")] + public override void CanOverrideOrCallMe() { base.CanOverrideOrCallMe(); } @@ -177,15 +177,15 @@ Class Derived _ Public Overrides Sub CanOverrideOrCallMe() MyBase.CanOverrideOrCallMe() - End Sub 'CanOverrideOrCallMe + End Sub 'CanOverrideOrCallMe End Class 'Derived ``` ```csharp class Derived : Base1 -{ -[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] - public override void CanOverrideOrCallMe() +{ +[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] + public override void CanOverrideOrCallMe() { base.CanOverrideOrCallMe(); } @@ -207,7 +207,7 @@ Class Implemented ``` ```csharp -public interface ICanCastToMe +public interface ICanCastToMe { [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")] diff --git a/docs/framework/misc/security-and-serialization.md b/docs/framework/misc/security-and-serialization.md index 8e524da4a6c7b..5e51e77809fc1 100644 --- a/docs/framework/misc/security-and-serialization.md +++ b/docs/framework/misc/security-and-serialization.md @@ -29,9 +29,9 @@ Because serialization can allow other code to see or modify object instance data ``` ```csharp - [SecurityPermissionAttribute(SecurityAction.Demand,SerializationFormatter + [SecurityPermissionAttribute(SecurityAction.Demand,SerializationFormatter =true)] - public override void GetObjectData(SerializationInfo info, + public override void GetObjectData(SerializationInfo info, StreamingContext context) { } diff --git a/docs/framework/misc/security-transparent-code-level-1.md b/docs/framework/misc/security-transparent-code-level-1.md index adccd16bc6300..5ebb7f3eaeb07 100644 --- a/docs/framework/misc/security-transparent-code-level-1.md +++ b/docs/framework/misc/security-transparent-code-level-1.md @@ -26,7 +26,7 @@ ms.assetid: 5fd8f46d-3961-46a7-84af-2eb1f48e75cf - [Security Transparency Examples](#security_transparency_examples) - + ## The Level 1 Transparency Model When you use Level 1 transparency, you are using a security model that separates code into security-transparent, security-safe-critical, and security-critical methods. @@ -49,7 +49,7 @@ ms.assetid: 5fd8f46d-3961-46a7-84af-2eb1f48e75cf For backward compatibility with earlier versions of the .NET Framework, all members that are not annotated with transparency attributes are considered to be security-safe-critical. All types that are not annotated are considered to be transparent. There are no static analysis rules to validate transparency. Therefore, you may need to debug transparency errors at run time. - + ## Transparency Attributes The following table describes the three attributes that you use to annotate your code for transparency. @@ -72,7 +72,7 @@ ms.assetid: 5fd8f46d-3961-46a7-84af-2eb1f48e75cf |`SecurityCritical(SecurityCriticalScope.Everything)`|All types and members are security-critical.| |`SecurityCritical`|All code defaults to transparent. However, individual types and members can have other attributes.| - + ## Security Transparency Examples To use the .NET Framework 2.0 transparency rules (level 1 transparency), use the following assembly annotation: diff --git a/docs/framework/misc/using-the-assert-method.md b/docs/framework/misc/using-the-assert-method.md index d990ed3eddbc6..cd6c0925aded3 100644 --- a/docs/framework/misc/using-the-assert-method.md +++ b/docs/framework/misc/using-the-assert-method.md @@ -49,7 +49,7 @@ ms.assetid: 1e40f4d3-fb7d-4f19-b334-b6076d469ea9 - Method A is contained in assembly A, method B is contained in assembly B, and so on. - ![Diagram that shows the Assert method assemblies.](./media/using-the-assert-method/assert-method-assemblies.gif) + ![Diagram that shows the Assert method assemblies.](./media/using-the-assert-method/assert-method-assemblies.gif) In this scenario, method A calls B, B calls C, C calls E, and E calls F. Method C asserts permission to read files on the C drive (permission P1), and method E demands permission to read .txt files on the C drive (permission P1A). When the demand in F is encountered at run time, a stack walk is performed to check the permissions of all callers of F, starting with E. E has been granted P1A permission, so the stack walk proceeds to examine the permissions of C, where C's assertion is discovered. Because the demanded permission (P1A) is a subset of the asserted permission (P1), the stack walk stops and the security check automatically succeeds. It does not matter that assemblies A and B have not been granted permission P1A. By asserting P1, method C ensures that its callers can access the resource protected by P1, even if the callers have not been granted permission to access that resource. @@ -78,7 +78,7 @@ Namespace LogUtil End Sub - Public Sub + Public Sub MakeLog() Dim TextStream As New StreamWriter("C:\Log.txt") TextStream.WriteLine("This Log was created on {0}", DateTime.Now) ' @@ -98,17 +98,17 @@ namespace LogUtil public class Log { public Log() - { - } + { + } [FileIOPermission(SecurityAction.Assert, All = @"C:\Log.txt")] public void MakeLog() - { + { StreamWriter TextStream = new StreamWriter(@"C:\Log.txt"); TextStream.WriteLine("This Log was created on {0}", DateTime.Now); TextStream.Close(); } } -} +} ``` The following code fragments show imperative syntax for overriding security checks using the **Assert** method. In this example, an instance of the **FileIOPermission** object is declared. Its constructor is passed **FileIOPermissionAccess.AllAccess** to define the type of access allowed, followed by a string describing the file's location. Once the **FileIOPermission** object is defined, you only need to call its **Assert** method to override the security check. @@ -145,11 +145,11 @@ namespace LogUtil public class Log { public Log() - { - } + { + } public void MakeLog() { - FileIOPermission FilePermission = new FileIOPermission(FileIOPermissionAccess.AllAccess,@"C:\Log.txt"); + FileIOPermission FilePermission = new FileIOPermission(FileIOPermissionAccess.AllAccess,@"C:\Log.txt"); FilePermission.Assert(); StreamWriter TextStream = new StreamWriter(@"C:\Log.txt"); TextStream.WriteLine("This Log was created on {0}", DateTime.Now); From e2a4c9ae5543ec4d02de6e28a3c111c9f1de96d1 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:33:11 -0400 Subject: [PATCH 12/18] fix: MD009 in docs/framework/net-native --- .../net-native/apis-that-rely-on-reflection.md | 2 +- .../net-native/assembly-element-net-native.md | 10 +++++----- .../net-native/attributeimplies-element-net-native.md | 2 +- .../net-native/directives-element-net-native.md | 4 ++-- docs/framework/net-native/event-element-net-native.md | 4 ++-- .../example-handling-exceptions-when-binding-data.md | 6 +++--- .../net-native/impliestype-element-net-native.md | 2 +- .../measuring-startup-improvement-with-net-native.md | 2 +- docs/framework/net-native/method-element-net-native.md | 4 ++-- ...missingruntimeartifactexception-class-net-native.md | 2 +- .../net-native/namespace-element-net-native.md | 4 ++-- .../runtime-exceptions-in-net-native-apps.md | 4 ++-- .../net-native/subtypes-element-net-native.md | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/framework/net-native/apis-that-rely-on-reflection.md b/docs/framework/net-native/apis-that-rely-on-reflection.md index bcce2ef450a88..c6839e976822f 100644 --- a/docs/framework/net-native/apis-that-rely-on-reflection.md +++ b/docs/framework/net-native/apis-that-rely-on-reflection.md @@ -28,7 +28,7 @@ This operation cannot be carried out as metadata for the following type was remo You can add the following run-time directive to the runtime directives file to add `Activate` metadata for the specific instantiation over `AppClass` of : ```xml - ``` diff --git a/docs/framework/net-native/assembly-element-net-native.md b/docs/framework/net-native/assembly-element-net-native.md index 1765d7ea879c8..917529a54108a 100644 --- a/docs/framework/net-native/assembly-element-net-native.md +++ b/docs/framework/net-native/assembly-element-net-native.md @@ -9,7 +9,7 @@ Applies runtime reflection policy to all the types in a specified assembly. ## Syntax ```xml -` element must be a child of the [\](application-element-net-native.md) element. ```xml - - - - + + + + ``` diff --git a/docs/framework/net-native/attributeimplies-element-net-native.md b/docs/framework/net-native/attributeimplies-element-net-native.md index 390fa70fe5546..60d115ddad660 100644 --- a/docs/framework/net-native/attributeimplies-element-net-native.md +++ b/docs/framework/net-native/attributeimplies-element-net-native.md @@ -12,7 +12,7 @@ Defines policy for code elements the containing attribute is applied to. Element (.NET Native) The root element in every runtime directives file for .NET Native. - `` + `` ## Syntax ```xml - + ``` diff --git a/docs/framework/net-native/event-element-net-native.md b/docs/framework/net-native/event-element-net-native.md index 37d9f3f19f213..95e58276f0a9d 100644 --- a/docs/framework/net-native/event-element-net-native.md +++ b/docs/framework/net-native/event-element-net-native.md @@ -9,8 +9,8 @@ Applies runtime reflection policy to an event. ## Syntax ```xml - ``` diff --git a/docs/framework/net-native/example-handling-exceptions-when-binding-data.md b/docs/framework/net-native/example-handling-exceptions-when-binding-data.md index 3778706a19aa6..6ba45f3daf245 100644 --- a/docs/framework/net-native/example-handling-exceptions-when-binding-data.md +++ b/docs/framework/net-native/example-handling-exceptions-when-binding-data.md @@ -10,7 +10,7 @@ ms.assetid: bd63ed96-9853-46dc-ade5-7bd1b0f39110 The following example shows how to resolve a [MissingMetadataException](missingmetadataexception-class-net-native.md) exception that is thrown when an app compiled with the .NET Native tool chain tries to bind data. Here’s the exception information: ```output -This operation cannot be carried out as metadata for the following type was removed for performance reasons: +This operation cannot be carried out as metadata for the following type was removed for performance reasons: App.ViewModels.MainPageVM ``` @@ -25,8 +25,8 @@ System::Reflection::PropertyInfo.GetValue+0x22 System::Runtime::InteropServices::WindowsRuntime::CustomPropertyImpl.GetValue+0x42 App!$66_Interop::McgNative.Func_IInspectable_IInspectable+0x158 App!$66_Interop::McgNative::__vtable_Windows_UI_Xaml_Data__ICustomProperty.GetValue__STUB+0x46 -Windows_UI_Xaml!DirectUI::PropertyProviderPropertyAccess::GetValue+0x3f -Windows_UI_Xaml!DirectUI::PropertyAccessPathStep::GetValue+0x31 +Windows_UI_Xaml!DirectUI::PropertyProviderPropertyAccess::GetValue+0x3f +Windows_UI_Xaml!DirectUI::PropertyAccessPathStep::GetValue+0x31 Windows_UI_Xaml!DirectUI::PropertyPathListener::ConnectPathStep+0x113 ``` diff --git a/docs/framework/net-native/impliestype-element-net-native.md b/docs/framework/net-native/impliestype-element-net-native.md index e16ac9f46b284..beaf91ffde3a5 100644 --- a/docs/framework/net-native/impliestype-element-net-native.md +++ b/docs/framework/net-native/impliestype-element-net-native.md @@ -13,7 +13,7 @@ Applies policy to a type, if that policy has been applied to the containing type Activate="policy_type" Browse="policy_type" Dynamic="policy_type" - Serialize="policy_type" + Serialize="policy_type" DataContractSerializer="policy_setting" DataContractJsonSerializer="policy_setting" XmlSerializer="policy_setting" diff --git a/docs/framework/net-native/measuring-startup-improvement-with-net-native.md b/docs/framework/net-native/measuring-startup-improvement-with-net-native.md index 88479cfb0844b..494b67b4de2f0 100644 --- a/docs/framework/net-native/measuring-startup-improvement-with-net-native.md +++ b/docs/framework/net-native/measuring-startup-improvement-with-net-native.md @@ -54,7 +54,7 @@ ms.assetid: c4d25b24-9c1a-4b3e-9705-97ba0d6c0289 You can also invoke PerfView from the command line. To log only the events from your provider, open the Command Prompt window and enter the command: ```console -perfview -KernelEvents:Process -OnlyProviders:*MyCompany-MyApp collect outputFile +perfview -KernelEvents:Process -OnlyProviders:*MyCompany-MyApp collect outputFile ``` where: diff --git a/docs/framework/net-native/method-element-net-native.md b/docs/framework/net-native/method-element-net-native.md index 1c1c8beaa4677..9c0d7800e03dc 100644 --- a/docs/framework/net-native/method-element-net-native.md +++ b/docs/framework/net-native/method-element-net-native.md @@ -118,10 +118,10 @@ Applies runtime reflection policy to a constructor or method. - + - + diff --git a/docs/framework/net-native/missingruntimeartifactexception-class-net-native.md b/docs/framework/net-native/missingruntimeartifactexception-class-net-native.md index 1393a6d7bf0dc..1b2215389c178 100644 --- a/docs/framework/net-native/missingruntimeartifactexception-class-net-native.md +++ b/docs/framework/net-native/missingruntimeartifactexception-class-net-native.md @@ -66,7 +66,7 @@ ms.assetid: d5b3d13e-689f-4584-8ba6-44f5167a8590 > [!IMPORTANT] > Because this exception indicates that the implementation code needed by your application isn’t available at run time, you shouldn’t handle this exception in a `try`/`catch` block. Instead, you should diagnose the cause of the exception and eliminate it by using a runtime directives file. Typically, you eliminate this exception by specifying the appropriate `Activate` or `Dynamic` policy for a program element in the runtime directives file (\*.rd.xml file). To get the entry that you can add to your runtime directives file that eliminates the exception, you can use one of two troubleshooters: -> +> > - The [MissingMetadataException troubleshooter](https://dotnet.github.io/native/troubleshooter/type.html) for types. > - The [MissingMetadataException troubleshooter](https://dotnet.github.io/native/troubleshooter/method.html) for methods. diff --git a/docs/framework/net-native/namespace-element-net-native.md b/docs/framework/net-native/namespace-element-net-native.md index 1ad5bd23d0c55..9091b175ff38b 100644 --- a/docs/framework/net-native/namespace-element-net-native.md +++ b/docs/framework/net-native/namespace-element-net-native.md @@ -9,8 +9,8 @@ Applies runtime reflection policy to all the types in a specified namespace. ## Syntax ```xml - [!NOTE] > You can control whether the debug and release builds are compiled with the .NET Native tool chain by checking or unchecking the **Compile with .NET Native tool chain** box. Note, however, that the Windows Store will always compile the production version of your app with the .NET Native tool chain. - + ## Runtime exception messages To minimize application executable size, .NET Native does not include the full text of exception messages. As a result, runtime exceptions thrown in release builds may not display the full text of exception messages. Instead, the text may consist of a substring along with a link to follow for more information. For example, the exception information may appear as: @@ -45,7 +45,7 @@ Exception thrown: 'System.AggregateException' in NativeApp.exe. Additional information: Value does not fall within the expected range. ``` - + ## Runtime call stack Because of inlining and other optimizations, the call stack displayed by an app compiled by the .NET Native tool chain may not help you to clearly identify the path to a runtime exception. diff --git a/docs/framework/net-native/subtypes-element-net-native.md b/docs/framework/net-native/subtypes-element-net-native.md index 42028e3d3141a..7ec7b1a0508d3 100644 --- a/docs/framework/net-native/subtypes-element-net-native.md +++ b/docs/framework/net-native/subtypes-element-net-native.md @@ -12,7 +12,7 @@ Applies runtime policy to all classes inherited from the containing type. Date: Tue, 10 Mar 2020 18:33:42 -0400 Subject: [PATCH 13/18] fix: MD009 in docs/framework/network-programming --- .../asynchronous-client-socket-example.md | 14 +++--- .../asynchronous-server-socket-example.md | 20 ++++----- .../automatic-proxy-detection.md | 2 +- .../enabling-network-tracing.md | 2 +- .../network-programming/handling-errors.md | 24 +++++----- .../how-to-access-http-specific-properties.md | 2 +- ...n-user-information-to-group-connections.md | 4 +- .../how-to-create-a-socket.md | 4 +- ...-get-interface-and-protocol-information.md | 22 +++++----- ...nfiguration-file-to-enable-ipv6-support.md | 2 +- .../network-programming/how-to-ping-a-host.md | 6 +-- ...n-based-cache-policy-for-an-application.md | 8 ++-- .../how-to-set-cache-policy-for-a-request.md | 4 +- ...-to-access-protocol-specific-properties.md | 2 +- .../listening-with-sockets.md | 2 +- .../making-asynchronous-requests.md | 44 +++++++++---------- .../network-programming-samples.md | 6 +-- .../ntlm-and-kerberos-authentication.md | 2 +- .../security-in-network-programming.md | 2 +- .../synchronous-client-socket-example.md | 2 +- .../synchronous-server-socket-example.md | 8 ++-- .../using-an-asynchronous-client-socket.md | 10 ++--- .../using-an-asynchronous-server-socket.md | 16 +++---- .../using-streams-on-the-network.md | 6 +-- .../network-programming/using-udp-services.md | 20 ++++----- 25 files changed, 117 insertions(+), 117 deletions(-) diff --git a/docs/framework/network-programming/asynchronous-client-socket-example.md b/docs/framework/network-programming/asynchronous-client-socket-example.md index dd52f9003c920..ba7b19ec67507 100644 --- a/docs/framework/network-programming/asynchronous-client-socket-example.md +++ b/docs/framework/network-programming/asynchronous-client-socket-example.md @@ -102,7 +102,7 @@ Public Class AsynchronousClient Private Shared Sub ReceiveCallback(ByVal ar As IAsyncResult) - ' Retrieve the state object and the client socket + ' Retrieve the state object and the client socket ' from the asynchronous state object. Dim state As StateObject = CType(ar.AsyncState, StateObject) Dim client As Socket = state.workSocket @@ -172,11 +172,11 @@ public class AsynchronousClient { private const int port = 11000; // ManualResetEvent instances signal completion. - private static ManualResetEvent connectDone = + private static ManualResetEvent connectDone = new ManualResetEvent(false); - private static ManualResetEvent sendDone = + private static ManualResetEvent sendDone = new ManualResetEvent(false); - private static ManualResetEvent receiveDone = + private static ManualResetEvent receiveDone = new ManualResetEvent(false); // The response from the remote device. @@ -186,7 +186,7 @@ public class AsynchronousClient { // Connect to a remote device. try { // Establish the remote endpoint for the socket. - // The name of the + // The name of the // remote device is "host.contoso.com". IPHostEntry ipHostInfo = Dns.GetHostEntry("host.contoso.com"); IPAddress ipAddress = ipHostInfo.AddressList[0]; @@ -197,7 +197,7 @@ public class AsynchronousClient { SocketType.Stream, ProtocolType.Tcp); // Connect to the remote endpoint. - client.BeginConnect( remoteEP, + client.BeginConnect( remoteEP, new AsyncCallback(ConnectCallback), client); connectDone.WaitOne(); @@ -255,7 +255,7 @@ public class AsynchronousClient { private static void ReceiveCallback( IAsyncResult ar ) { try { - // Retrieve the state object and the client socket + // Retrieve the state object and the client socket // from the asynchronous state object. StateObject state = (StateObject) ar.AsyncState; Socket client = state.workSocket; diff --git a/docs/framework/network-programming/asynchronous-server-socket-example.md b/docs/framework/network-programming/asynchronous-server-socket-example.md index dd8b2c3aad20e..617a4bdb1726d 100644 --- a/docs/framework/network-programming/asynchronous-server-socket-example.md +++ b/docs/framework/network-programming/asynchronous-server-socket-example.md @@ -39,9 +39,9 @@ Public Class AsynchronousSocketListener Public Shared allDone As New ManualResetEvent(False) ' This server waits for a connection and then uses asychronous operations to - ' accept the connection, get data from the connected client, + ' accept the connection, get data from the connected client, ' echo that data back to the connected client. - ' It then disconnects from the client and waits for another client. + ' It then disconnects from the client and waits for another client. Public Shared Sub Main() ' Establish the local endpoint for the socket. Dim ipHostInfo As IPHostEntry = Dns.GetHostEntry(Dns.GetHostName()) @@ -88,18 +88,18 @@ Public Class AsynchronousSocketListener Dim state As StateObject = CType(ar.AsyncState, StateObject) Dim handler As Socket = state.workSocket - ' Read data from the client socket. + ' Read data from the client socket. Dim bytesRead As Integer = handler.EndReceive(ar) If bytesRead > 0 Then ' There might be more data, so store the data received so far. state.sb.Append(Encoding.ASCII.GetString(state.buffer, 0, bytesRead)) - ' Check for end-of-file tag. If it is not there, read + ' Check for end-of-file tag. If it is not there, read ' more data. content = state.sb.ToString() If content.IndexOf("") > -1 Then - ' All the data has been read from the + ' All the data has been read from the ' client. Display it on the console. Console.WriteLine("Read {0} bytes from socket. " + vbLf + " Data : {1}", content.Length, content) ' Echo the data back to the client. @@ -151,7 +151,7 @@ public class StateObject { // Receive buffer. public byte[] buffer = new byte[BufferSize]; // Received data string. - public StringBuilder sb = new StringBuilder(); + public StringBuilder sb = new StringBuilder(); } public class AsynchronousSocketListener { @@ -184,7 +184,7 @@ public class AsynchronousSocketListener { // Start an asynchronous socket to listen for connections. Console.WriteLine("Waiting for a connection..."); - listener.BeginAccept( + listener.BeginAccept( new AsyncCallback(AcceptCallback), listener ); @@ -224,7 +224,7 @@ public class AsynchronousSocketListener { StateObject state = (StateObject) ar.AsyncState; Socket handler = state.workSocket; - // Read data from the client socket. + // Read data from the client socket. int bytesRead = handler.EndReceive(ar); if (bytesRead > 0) { @@ -232,11 +232,11 @@ public class AsynchronousSocketListener { state.sb.Append(Encoding.ASCII.GetString( state.buffer, 0, bytesRead)); - // Check for end-of-file tag. If it is not there, read + // Check for end-of-file tag. If it is not there, read // more data. content = state.sb.ToString(); if (content.IndexOf("") > -1) { - // All the data has been read from the + // All the data has been read from the // client. Display it on the console. Console.WriteLine("Read {0} bytes from socket. \n Data : {1}", content.Length, content ); diff --git a/docs/framework/network-programming/automatic-proxy-detection.md b/docs/framework/network-programming/automatic-proxy-detection.md index 4a267ffbb47f7..342afe019263f 100644 --- a/docs/framework/network-programming/automatic-proxy-detection.md +++ b/docs/framework/network-programming/automatic-proxy-detection.md @@ -56,7 +56,7 @@ Public Shared Sub DisableForMyRequest(ByVal resource As Uri) Dim request As WebRequest = WebRequest.Create(resource) request.Proxy = Nothing Dim response As WebResponse = request.GetResponse() - End Sub + End Sub ``` Requests that do not have a proxy use your application domain's default proxy, which is available in the property. diff --git a/docs/framework/network-programming/enabling-network-tracing.md b/docs/framework/network-programming/enabling-network-tracing.md index d5bd14dce7408..149cc0192d720 100644 --- a/docs/framework/network-programming/enabling-network-tracing.md +++ b/docs/framework/network-programming/enabling-network-tracing.md @@ -34,7 +34,7 @@ Network tracing provides access to information about method invocations and netw - +
``` diff --git a/docs/framework/network-programming/handling-errors.md b/docs/framework/network-programming/handling-errors.md index f5b4bdf2ae343..07de4b9787e72 100644 --- a/docs/framework/network-programming/handling-errors.md +++ b/docs/framework/network-programming/handling-errors.md @@ -66,19 +66,19 @@ When the **Status** property is **WebExceptionStatus.ProtocolError**, a **WebRes The following example shows how to catch a **WebException**. ```csharp -try +try { // Create a request instance. - WebRequest myRequest = + WebRequest myRequest = WebRequest.Create("http://www.contoso.com"); // Get the response. WebResponse myResponse = myRequest.GetResponse(); - //Get a readable stream from the server. + //Get a readable stream from the server. Stream sr = myResponse.GetResponseStream(); //Read from the stream and write any data to the console. bytesread = sr.Read( myBuffer, 0, length); - while( bytesread > 0 ) + while( bytesread > 0 ) { for (int i=0; i 0 @@ -142,8 +142,8 @@ Catch webExcp As WebException Console.WriteLine(webExcp.ToString()) ' Get the WebException status code. Dim status As WebExceptionStatus = webExcp.Status - ' If status is WebExceptionStatus.ProtocolError, - ' there has been a protocol error and a WebResponse + ' If status is WebExceptionStatus.ProtocolError, + ' there has been a protocol error and a WebResponse ' should exist. Display the protocol error. If status = WebExceptionStatus.ProtocolError Then Console.Write("The server returned protocol error ") diff --git a/docs/framework/network-programming/how-to-access-http-specific-properties.md b/docs/framework/network-programming/how-to-access-http-specific-properties.md index 7bf0cef18a06e..eb161b74354e6 100644 --- a/docs/framework/network-programming/how-to-access-http-specific-properties.md +++ b/docs/framework/network-programming/how-to-access-http-specific-properties.md @@ -26,7 +26,7 @@ HttpWResp.Close() ``` ```csharp -HttpWebRequest HttpWReq = +HttpWebRequest HttpWReq = (HttpWebRequest)WebRequest.Create("http://www.contoso.com"); // Turn off connection keep-alives. HttpWReq.KeepAlive = false; diff --git a/docs/framework/network-programming/how-to-assign-user-information-to-group-connections.md b/docs/framework/network-programming/how-to-assign-user-information-to-group-connections.md index f360e27b353e6..4c77f42d56388 100644 --- a/docs/framework/network-programming/how-to-assign-user-information-to-group-connections.md +++ b/docs/framework/network-programming/how-to-assign-user-information-to-group-connections.md @@ -39,7 +39,7 @@ ms.assetid: 7ce550d6-8f7c-4ea7-add8-5bc27a7b51be 3. Set the credentials and Connection GroupName for the Web request, and call **GetResponse** to retrieve a **WebResponse** object. ```csharp - myWebRequest.Credentials = new NetworkCredential(UserName, SecurelyStoredPassword, Domain); + myWebRequest.Credentials = new NetworkCredential(UserName, SecurelyStoredPassword, Domain); myWebRequest.ConnectionGroupName = secureGroupName; WebResponse myWebResponse=myWebRequest.GetResponse(); @@ -73,7 +73,7 @@ String secureGroupName = Encoding.Default.GetString(updHash); // Create a request for a specific URL. WebRequest myWebRequest=WebRequest.Create("http://www.contoso.com"); -myWebRequest.Credentials = new NetworkCredential(UserName, SecurelyStoredPassword, Domain); +myWebRequest.Credentials = new NetworkCredential(UserName, SecurelyStoredPassword, Domain); myWebRequest.ConnectionGroupName = secureGroupName; WebResponse myWebResponse=myWebRequest.GetResponse(); diff --git a/docs/framework/network-programming/how-to-create-a-socket.md b/docs/framework/network-programming/how-to-create-a-socket.md index 033332dcc27c6..e2e54ea580b51 100644 --- a/docs/framework/network-programming/how-to-create-a-socket.md +++ b/docs/framework/network-programming/how-to-create-a-socket.md @@ -25,7 +25,7 @@ Before you can use a socket to communicate with remote devices, the socket must The following example creates a Socket that can be used to communicate on a TCP/IP-based network, such as the Internet. ```csharp -Socket s = new Socket(AddressFamily.InterNetwork, +Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); ``` @@ -37,7 +37,7 @@ Dim s as New Socket(AddressFamily.InterNetwork, _ To use UDP instead of TCP, change the protocol type, as in the following example: ```csharp -Socket s = new Socket(AddressFamily.InterNetwork, +Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); ``` diff --git a/docs/framework/network-programming/how-to-get-interface-and-protocol-information.md b/docs/framework/network-programming/how-to-get-interface-and-protocol-information.md index 90c9b4df6e6cf..d28e58d2c42cd 100644 --- a/docs/framework/network-programming/how-to-get-interface-and-protocol-information.md +++ b/docs/framework/network-programming/how-to-get-interface-and-protocol-information.md @@ -31,32 +31,32 @@ public static void ShowTcpStatistics(NetworkInterfaceComponent version) throw new ArgumentException("version"); break; } - Console.WriteLine(" Minimum Transmission Timeout. : {0}", + Console.WriteLine(" Minimum Transmission Timeout. : {0}", tcpstat.MinimumTransmissionTimeout); - Console.WriteLine(" Maximum Transmission Timeout. : {0}", + Console.WriteLine(" Maximum Transmission Timeout. : {0}", tcpstat.MaximumTransmissionTimeout); Console.WriteLine(" Connection Data:"); - Console.WriteLine(" Current : {0}", + Console.WriteLine(" Current : {0}", tcpstat.CurrentConnections); - Console.WriteLine(" Cumulative : {0}", + Console.WriteLine(" Cumulative : {0}", tcpstat.CumulativeConnections); - Console.WriteLine(" Initiated : {0}", + Console.WriteLine(" Initiated : {0}", tcpstat.ConnectionsInitiated); - Console.WriteLine(" Accepted : {0}", + Console.WriteLine(" Accepted : {0}", tcpstat.ConnectionsAccepted); - Console.WriteLine(" Failed Attempts : {0}", + Console.WriteLine(" Failed Attempts : {0}", tcpstat.FailedConnectionAttempts); - Console.WriteLine(" Reset : {0}", + Console.WriteLine(" Reset : {0}", tcpstat.ResetConnections); Console.WriteLine(""); Console.WriteLine(" Segment Data:"); - Console.WriteLine(" Received ................... : {0}", + Console.WriteLine(" Received ................... : {0}", tcpstat.SegmentsReceived); - Console.WriteLine(" Sent : {0}", + Console.WriteLine(" Sent : {0}", tcpstat.SegmentsSent); - Console.WriteLine(" Retransmitted : {0}", + Console.WriteLine(" Retransmitted : {0}", tcpstat.SegmentsResent); Console.WriteLine(""); diff --git a/docs/framework/network-programming/how-to-modify-the-computer-configuration-file-to-enable-ipv6-support.md b/docs/framework/network-programming/how-to-modify-the-computer-configuration-file-to-enable-ipv6-support.md index c26f79e2415b2..5b65ea53ebb72 100644 --- a/docs/framework/network-programming/how-to-modify-the-computer-configuration-file-to-enable-ipv6-support.md +++ b/docs/framework/network-programming/how-to-modify-the-computer-configuration-file-to-enable-ipv6-support.md @@ -22,7 +22,7 @@ The following code example shows how to modify the computer configuration file, ………… ………… - + …………… ……………… diff --git a/docs/framework/network-programming/how-to-ping-a-host.md b/docs/framework/network-programming/how-to-ping-a-host.md index 22af66e5846b4..37a16735f2cc2 100644 --- a/docs/framework/network-programming/how-to-ping-a-host.md +++ b/docs/framework/network-programming/how-to-ping-a-host.md @@ -71,8 +71,8 @@ namespace Examples.System.Net.NetworkInformation.PingTest { Console.WriteLine ("Ping canceled."); - // Let the main thread resume. - // UserToken is the AutoResetEvent object that the main thread + // Let the main thread resume. + // UserToken is the AutoResetEvent object that the main thread // is waiting for. ((AutoResetEvent)e.UserState).Set (); } @@ -83,7 +83,7 @@ namespace Examples.System.Net.NetworkInformation.PingTest Console.WriteLine ("Ping failed:"); Console.WriteLine (e.Error.ToString ()); - // Let the main thread resume. + // Let the main thread resume. ((AutoResetEvent)e.UserState).Set(); } diff --git a/docs/framework/network-programming/how-to-set-a-location-based-cache-policy-for-an-application.md b/docs/framework/network-programming/how-to-set-a-location-based-cache-policy-for-an-application.md index e82bcb40ec278..a5e47e10e02b5 100644 --- a/docs/framework/network-programming/how-to-set-a-location-based-cache-policy-for-an-application.md +++ b/docs/framework/network-programming/how-to-set-a-location-based-cache-policy-for-an-application.md @@ -49,7 +49,7 @@ Location-based cache policies allow an application to explicitly define caching ```csharp public static void DoNotUseCache() { - HttpRequestCachePolicy policy = new HttpRequestCachePolicy + HttpRequestCachePolicy policy = new HttpRequestCachePolicy (HttpRequestCacheLevel.NoCacheNoStore); HttpWebRequest.DefaultCachePolicy = policy; } @@ -70,7 +70,7 @@ Location-based cache policies allow an application to explicitly define caching ```csharp public static void OnlyUseCache() { - HttpRequestCachePolicy policy = new HttpRequestCachePolicy + HttpRequestCachePolicy policy = new HttpRequestCachePolicy (HttpRequestCacheLevel.CacheOnly); HttpWebRequest.DefaultCachePolicy = policy; } @@ -91,7 +91,7 @@ Location-based cache policies allow an application to explicitly define caching ```csharp public static void DoNotUseLocalCache() { - HttpRequestCachePolicy policy = new HttpRequestCachePolicy + HttpRequestCachePolicy policy = new HttpRequestCachePolicy (HttpRequestCacheLevel.Refresh); HttpWebRequest.DefaultCachePolicy = policy; } @@ -112,7 +112,7 @@ Location-based cache policies allow an application to explicitly define caching ```csharp public static void SendToServer() { - HttpRequestCachePolicy policy = new HttpRequestCachePolicy + HttpRequestCachePolicy policy = new HttpRequestCachePolicy (HttpRequestCacheLevel.Reload); HttpWebRequest.DefaultCachePolicy = policy; } diff --git a/docs/framework/network-programming/how-to-set-cache-policy-for-a-request.md b/docs/framework/network-programming/how-to-set-cache-policy-for-a-request.md index 28ffe05f946a1..5dfb0a3f24ba4 100644 --- a/docs/framework/network-programming/how-to-set-cache-policy-for-a-request.md +++ b/docs/framework/network-programming/how-to-set-cache-policy-for-a-request.md @@ -23,12 +23,12 @@ using System.IO; namespace Examples.System.Net.Cache { public class CacheExample - { + { public static void UseCacheForOneDay(Uri resource) { // Create a policy that allows items in the cache // to be used if they have been cached one day or less. - HttpRequestCachePolicy requestPolicy = + HttpRequestCachePolicy requestPolicy = new HttpRequestCachePolicy (HttpCacheAgeControl.MaxAge, TimeSpan.FromDays(1)); diff --git a/docs/framework/network-programming/how-to-typecast-a-webrequest-to-access-protocol-specific-properties.md b/docs/framework/network-programming/how-to-typecast-a-webrequest-to-access-protocol-specific-properties.md index bcf7d68cbfeb0..bb58c9207f387 100644 --- a/docs/framework/network-programming/how-to-typecast-a-webrequest-to-access-protocol-specific-properties.md +++ b/docs/framework/network-programming/how-to-typecast-a-webrequest-to-access-protocol-specific-properties.md @@ -12,7 +12,7 @@ This example shows how to typecast a WebRequest so that you can access protocol ## Example ```csharp -HttpWebRequest httpreq = +HttpWebRequest httpreq = (HttpWebRequest) WebRequest.Create("http://www.contoso.com/"); ``` diff --git a/docs/framework/network-programming/listening-with-sockets.md b/docs/framework/network-programming/listening-with-sockets.md index e0c952a8cfd5f..636af91ac610d 100644 --- a/docs/framework/network-programming/listening-with-sockets.md +++ b/docs/framework/network-programming/listening-with-sockets.md @@ -39,7 +39,7 @@ IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 11000); ```vb Dim listener As New Socket(ipAddress.AddressFamily, _ - SocketType.Stream, ProtocolType.Tcp) + SocketType.Stream, ProtocolType.Tcp) listener.Bind(localEndPoint) listener.Listen(100) ``` diff --git a/docs/framework/network-programming/making-asynchronous-requests.md b/docs/framework/network-programming/making-asynchronous-requests.md index 696694165d417..6bff8056c7397 100644 --- a/docs/framework/network-programming/making-asynchronous-requests.md +++ b/docs/framework/network-programming/making-asynchronous-requests.md @@ -63,18 +63,18 @@ public class RequestState RequestData = new StringBuilder(String.Empty); Request = null; ResponseStream = null; - } + } } // ClientGetAsync issues the async request. -class ClientGetAsync +class ClientGetAsync { public static ManualResetEvent allDone = new ManualResetEvent(false); const int BUFFER_SIZE = 1024; - public static void Main(string[] args) + public static void Main(string[] args) { - if (args.Length < 1) + if (args.Length < 1) { showusage(); return; @@ -96,7 +96,7 @@ class ClientGetAsync IAsyncResult r = (IAsyncResult) wreq.BeginGetResponse( new AsyncCallback(RespCallback), rs); - // Wait until the ManualResetEvent is set so that the application + // Wait until the ManualResetEvent is set so that the application // does not exit until after the callback is called. allDone.WaitOne(); @@ -121,18 +121,18 @@ class ClientGetAsync // Call EndGetResponse, which produces the WebResponse object // that came from the request issued above. - WebResponse resp = req.EndGetResponse(ar); + WebResponse resp = req.EndGetResponse(ar); // Start reading data from the response stream. Stream ResponseStream = resp.GetResponseStream(); - // Store the response stream in RequestState to read + // Store the response stream in RequestState to read // the stream asynchronously. rs.ResponseStream = ResponseStream; // Pass rs.BufferRead to BeginRead. Read data into rs.BufferRead - IAsyncResult iarRead = ResponseStream.BeginRead(rs.BufferRead, 0, - BUFFER_SIZE, new AsyncCallback(ReadCallBack), rs); + IAsyncResult iarRead = ResponseStream.BeginRead(rs.BufferRead, 0, + BUFFER_SIZE, new AsyncCallback(ReadCallBack), rs); } private static void ReadCallBack(IAsyncResult asyncResult) @@ -140,10 +140,10 @@ class ClientGetAsync // Get the RequestState object from AsyncResult. RequestState rs = (RequestState)asyncResult.AsyncState; - // Retrieve the ResponseStream that was set in RespCallback. + // Retrieve the ResponseStream that was set in RespCallback. Stream responseStream = rs.ResponseStream; - // Read rs.BufferRead to verify that it contains data. + // Read rs.BufferRead to verify that it contains data. int read = responseStream.EndRead( asyncResult ); if (read > 0) { @@ -152,7 +152,7 @@ class ClientGetAsync // Convert byte stream to Char array and then to String. // len contains the number of characters converted to Unicode. - int len = + int len = rs.StreamDecode.GetChars(rs.BufferRead, 0, read, charBuffer, 0); String str = new String(charBuffer, 0, len); @@ -160,12 +160,12 @@ class ClientGetAsync // Append the recently read data to the RequestData stringbuilder // object contained in RequestState. rs.RequestData.Append( - Encoding.ASCII.GetString(rs.BufferRead, 0, read)); + Encoding.ASCII.GetString(rs.BufferRead, 0, read)); - // Continue reading data until + // Continue reading data until // responseStream.EndRead returns –1. - IAsyncResult ar = responseStream.BeginRead( - rs.BufferRead, 0, BUFFER_SIZE, + IAsyncResult ar = responseStream.BeginRead( + rs.BufferRead, 0, BUFFER_SIZE, new AsyncCallback(ReadCallBack), rs); } else @@ -173,16 +173,16 @@ class ClientGetAsync if(rs.RequestData.Length>0) { // Display data to the console. - string strContent; + string strContent; strContent = rs.RequestData.ToString(); } // Close down the response stream. - responseStream.Close(); + responseStream.Close(); // Set the ManualResetEvent so the main thread can exit. - allDone.Set(); + allDone.Set(); } return; - } + } } ``` @@ -296,9 +296,9 @@ Class ClientGetAsync ' len contains the number of characters converted to Unicode. Dim len As Integer = _ rs.StreamDecode.GetChars(rs.BufferRead, 0, read, charBuffer, 0) - Dim str As String = new String(charBuffer, 0, len) + Dim str As String = new String(charBuffer, 0, len) - ' Append the recently read data to the RequestData stringbuilder + ' Append the recently read data to the RequestData stringbuilder ' object contained in RequestState. rs.RequestData.Append( _ Encoding.ASCII.GetString(rs.BufferRead, 0, read)) diff --git a/docs/framework/network-programming/network-programming-samples.md b/docs/framework/network-programming/network-programming-samples.md index 037139994e132..8cbf04a093486 100644 --- a/docs/framework/network-programming/network-programming-samples.md +++ b/docs/framework/network-programming/network-programming-samples.md @@ -4,7 +4,7 @@ ms.date: "03/30/2017" ms.assetid: 8efacc29-7367-47c2-8638-a4f66385ad91 --- # Network Programming Samples -This section contains descriptions and links to downloadable network programming samples that use classes in the , , , , , , , , and related namespaces. +This section contains descriptions and links to downloadable network programming samples that use classes in the , , , , , , , , and related namespaces. > [!NOTE] > All samples are available in the [.NET Framework SDK version 2.0 Samples Download](https://www.microsoft.com/download/confirmation.aspx?id=22181), which was released for the .NET Framework 2.0 and may be dated. @@ -18,8 +18,8 @@ This section contains descriptions and links to downloadable network programming [HttpListener Technology Sample](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/y7cbb2y2(v=vs.85)) Shows how to process HTTP requests from within an application. - - [HttpListener ASPX Host Application Sample](https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2008/dd767375(v%3dvs.90)) + + [HttpListener ASPX Host Application Sample](https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2008/dd767375(v%3dvs.90)) Demonstrates how to use the features of the class to create an HTTP server that routes calls to a hosted ASP.NET application. [Mailer Technology Sample](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/whw7xbk2(v=vs.85)) diff --git a/docs/framework/network-programming/ntlm-and-kerberos-authentication.md b/docs/framework/network-programming/ntlm-and-kerberos-authentication.md index 08d26f97096b0..39a09e87cf4a4 100644 --- a/docs/framework/network-programming/ntlm-and-kerberos-authentication.md +++ b/docs/framework/network-programming/ntlm-and-kerberos-authentication.md @@ -33,7 +33,7 @@ WReq.Credentials = _ ```csharp String MyURI = "http://www.contoso.com/"; WebRequest WReq = WebRequest.Create (MyURI); -WReq.Credentials = +WReq.Credentials = new NetworkCredential(UserName, SecurelyStoredPassword, Domain); ``` diff --git a/docs/framework/network-programming/security-in-network-programming.md b/docs/framework/network-programming/security-in-network-programming.md index ebc6959327b80..ec800011aa163 100644 --- a/docs/framework/network-programming/security-in-network-programming.md +++ b/docs/framework/network-programming/security-in-network-programming.md @@ -21,7 +21,7 @@ The .NET Framework namespace classes provide built-in support [Transport Layer Security (TLS) best practices with .NET Framework](tls.md) Describes TLS best practices with the .NET Framwork. - + [Using Secure Sockets Layer](using-secure-sockets-layer.md) Describes how to use Secure Sockets Layer (SSL) connections. diff --git a/docs/framework/network-programming/synchronous-client-socket-example.md b/docs/framework/network-programming/synchronous-client-socket-example.md index a7b8f1539174f..51d459f97e5e0 100644 --- a/docs/framework/network-programming/synchronous-client-socket-example.md +++ b/docs/framework/network-programming/synchronous-client-socket-example.md @@ -84,7 +84,7 @@ public class SynchronousSocketClient { IPEndPoint remoteEP = new IPEndPoint(ipAddress,11000); // Create a TCP/IP socket. - Socket sender = new Socket(ipAddress.AddressFamily, + Socket sender = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp ); // Connect the socket to the remote endpoint. Catch any errors. diff --git a/docs/framework/network-programming/synchronous-server-socket-example.md b/docs/framework/network-programming/synchronous-server-socket-example.md index 2312df2cf8573..aab50dd3fd7eb 100644 --- a/docs/framework/network-programming/synchronous-server-socket-example.md +++ b/docs/framework/network-programming/synchronous-server-socket-example.md @@ -30,7 +30,7 @@ Public Class SynchronousSocketListener Dim bytes() As Byte = New [Byte](1024) {} ' Establish the local endpoint for the socket. - ' Dns.GetHostName returns the name of the + ' Dns.GetHostName returns the name of the ' host running the application. Dim ipHostInfo As IPHostEntry = Dns.GetHostEntry(Dns.GetHostName()) Dim ipAddress As IPAddress = ipHostInfo.AddressList(0) @@ -40,7 +40,7 @@ Public Class SynchronousSocketListener Dim listener As New Socket(ipAddress.AddressFamily, _ SocketType.Stream, ProtocolType.Tcp) - ' Bind the socket to the local endpoint and + ' Bind the socket to the local endpoint and ' listen for incoming connections. listener.Bind(localEndPoint) @@ -90,7 +90,7 @@ public class SynchronousSocketListener { byte[] bytes = new Byte[1024]; // Establish the local endpoint for the socket. - // Dns.GetHostName returns the name of the + // Dns.GetHostName returns the name of the // host running the application. IPHostEntry ipHostInfo = Dns.GetHostEntry(Dns.GetHostName()); IPAddress ipAddress = ipHostInfo.AddressList[0]; @@ -100,7 +100,7 @@ public class SynchronousSocketListener { Socket listener = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp ); - // Bind the socket to the local endpoint and + // Bind the socket to the local endpoint and // listen for incoming connections. try { listener.Bind(localEndPoint); diff --git a/docs/framework/network-programming/using-an-asynchronous-client-socket.md b/docs/framework/network-programming/using-an-asynchronous-client-socket.md index 850accc38ddfc..f47d92443272e 100644 --- a/docs/framework/network-programming/using-an-asynchronous-client-socket.md +++ b/docs/framework/network-programming/using-an-asynchronous-client-socket.md @@ -40,7 +40,7 @@ End Sub 'Connect ```csharp public static void Connect(EndPoint remoteEP, Socket client) { - client.BeginConnect(remoteEP, + client.BeginConnect(remoteEP, new AsyncCallback(ConnectCallback), client ); connectDone.WaitOne(); @@ -156,11 +156,11 @@ private static void SendCallback(IAsyncResult ar) { ```vb Public Class StateObject ' Client socket. - Public workSocket As Socket = Nothing + Public workSocket As Socket = Nothing ' Size of receive buffer. Public BufferSize As Integer = 256 ' Receive buffer. - Public buffer(256) As Byte + Public buffer(256) As Byte ' Received data string. Public sb As New StringBuilder() End Class 'StateObject @@ -220,7 +220,7 @@ private static void Receive(Socket client) { ```vb Private Shared Sub ReceiveCallback(ar As IAsyncResult) Try - ' Retrieve the state object and the client socket + ' Retrieve the state object and the client socket ' from the asynchronous state object. Dim state As StateObject = CType(ar.AsyncState, StateObject) Dim client As Socket = state.workSocket @@ -253,7 +253,7 @@ End Sub 'ReceiveCallback ```csharp private static void ReceiveCallback( IAsyncResult ar ) { try { - // Retrieve the state object and the client socket + // Retrieve the state object and the client socket // from the asynchronous state object. StateObject state = (StateObject) ar.AsyncState; Socket client = state.workSocket; diff --git a/docs/framework/network-programming/using-an-asynchronous-server-socket.md b/docs/framework/network-programming/using-an-asynchronous-server-socket.md index 6b13420cdd92c..df9aae2982804 100644 --- a/docs/framework/network-programming/using-an-asynchronous-server-socket.md +++ b/docs/framework/network-programming/using-an-asynchronous-server-socket.md @@ -95,7 +95,7 @@ public void StartListening() Socket listener = new Socket(localEP.Address.AddressFamily, SocketType.Stream, ProtocolType.Tcp); - try + try { listener.Bind(localEP); listener.Listen(10); @@ -133,14 +133,14 @@ End Sub 'AcceptCallback ``` ```csharp -public void AcceptCallback(IAsyncResult ar) +public void AcceptCallback(IAsyncResult ar) { allDone.Set(); Socket listener = (Socket) ar.AsyncState; Socket handler = listener.EndAccept(ar); - // Additional code to read data goes here. + // Additional code to read data goes here. } ``` @@ -156,7 +156,7 @@ End Class 'StateObject ``` ```csharp -public class StateObject +public class StateObject { public Socket workSocket = null; public const int BufferSize = 1024; @@ -213,7 +213,7 @@ Public Shared Sub ReadCallback(ar As IAsyncResult) Dim state As StateObject = CType(ar.AsyncState, StateObject) Dim handler As Socket = state.workSocket - ' Read data from the client socket. + ' Read data from the client socket. Dim read As Integer = handler.EndReceive(ar) ' Data was read from the client socket. @@ -247,10 +247,10 @@ public static void ReadCallback(IAsyncResult ar) state.sb.Append(Encoding.ASCII.GetString(state.buffer,0,read)); handler.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0, new AsyncCallback(ReadCallback), state); - } - else + } + else { - if (state.sb.Length > 1) + if (state.sb.Length > 1) { // All the data has been read from the client; // display it on the console. diff --git a/docs/framework/network-programming/using-streams-on-the-network.md b/docs/framework/network-programming/using-streams-on-the-network.md index 595117a44cccb..1c82ff6164a40 100644 --- a/docs/framework/network-programming/using-streams-on-the-network.md +++ b/docs/framework/network-programming/using-streams-on-the-network.md @@ -32,7 +32,7 @@ Network resources are represented in the .NET Framework as streams. By treating To send data to the network using the returned stream, call on your . The **WebRequest** will send request headers to the server; then you can send data to the network resource by calling the , , or method on the returned stream. Some protocols, such as HTTP, may require you to set protocol-specific properties before sending data. The following code example shows how to set HTTP-specific properties for sending data. It assumes that the variable `sendData` contains the data to send and that the variable `sendLength` is the number of bytes of data to send. ```csharp -HttpWebRequest request = +HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://www.contoso.com/"); request.Method = "POST"; request.ContentLength = sendLength; @@ -80,7 +80,7 @@ End Try // Create a response object. WebResponse response = request.GetResponse(); // Get a readable stream from the server. -StreamReader sr = +StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.ASCII); // Use the stream. Remember when you are through with the stream to close it. sr.Close(); @@ -90,7 +90,7 @@ sr.Close(); ' Create a response object. Dim response As WebResponse = request.GetResponse() ' Get a readable stream from the server. -Dim sr As _ +Dim sr As _ New StreamReader(response.GetResponseStream(), Encoding.ASCII) ' Use the stream. Remember when you are through with the stream to close it. sr.Close() diff --git a/docs/framework/network-programming/using-udp-services.md b/docs/framework/network-programming/using-udp-services.md index 62519342fe0d2..2ca564d3fa2ff 100644 --- a/docs/framework/network-programming/using-udp-services.md +++ b/docs/framework/network-programming/using-udp-services.md @@ -42,7 +42,7 @@ Imports System.Text Public Class UDPListener Private Const listenPort As Integer = 11000 - + Private Shared Sub StartListener() Dim listener As New UdpClient(listenPort) Dim groupEP As New IPEndPoint(IPAddress.Any, listenPort) @@ -59,7 +59,7 @@ Public Class UDPListener listener.Close() End Try End Sub 'StartListener - + Public Shared Sub Main() StartListener() End Sub 'Main @@ -75,19 +75,19 @@ using System.Text; public class UDPListener { private const int listenPort = 11000; - + private static void StartListener() { UdpClient listener = new UdpClient(listenPort); IPEndPoint groupEP = new IPEndPoint(IPAddress.Any, listenPort); - + try { while (true) { Console.WriteLine("Waiting for broadcast"); byte[] bytes = listener.Receive(ref groupEP); - + Console.WriteLine($"Received broadcast from {groupEP} :"); Console.WriteLine($" {Encoding.ASCII.GetString(bytes, 0, bytes.Length)}"); } @@ -101,7 +101,7 @@ public class UDPListener listener.Close(); } } - + public static void Main() { StartListener(); @@ -139,14 +139,14 @@ class Program static void Main(string[] args) { Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); - + IPAddress broadcast = IPAddress.Parse("192.168.1.255"); - + byte[] sendbuf = Encoding.ASCII.GetBytes(args[0]); IPEndPoint ep = new IPEndPoint(broadcast, 11000); - + s.SendTo(sendbuf, ep); - + Console.WriteLine("Message sent to the broadcast address"); } } From b6dfcb96a16a37fbd1442d4a2c5dce5c210ca45f Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:34:09 -0400 Subject: [PATCH 14/18] fix: MD009 in docs/framework/performance --- .../clr-etw-keywords-and-levels.md | 10 +- .../performance/clr-etw-providers.md | 6 +- ...-perform-lazy-initialization-of-objects.md | 2 +- .../performance/lazy-initialization.md | 2 +- .../performance/loader-etw-events.md | 2 +- .../writing-large-responsive-apps.md | 104 +++++++++--------- 6 files changed, 63 insertions(+), 63 deletions(-) diff --git a/docs/framework/performance/clr-etw-keywords-and-levels.md b/docs/framework/performance/clr-etw-keywords-and-levels.md index a23d5d1c5f211..5ac32a369686a 100644 --- a/docs/framework/performance/clr-etw-keywords-and-levels.md +++ b/docs/framework/performance/clr-etw-keywords-and-levels.md @@ -24,7 +24,7 @@ Event tracing for Windows (ETW) events can be filtered by category and level. Ev - [Keyword combinations for symbol resolution for the rundown provider](#rundown_combo) - + ### CLR ETW Runtime Keywords The following table lists the CLR ETW runtime keywords, their values, and what they are used for. @@ -47,7 +47,7 @@ Event tracing for Windows (ETW) events can be filtered by category and level. Ev |`PerfTrackKeyWord`|0x2000000|Enables the collection of the `ModuleLoad` and `ModuleRange` events.| |`StackKeyword`|0x40000000|Enables the collection of CLR [stack trace events](stack-etw-event.md).| - + ### CLR ETW Rundown Keywords The following table lists the CLR ETW rundown keywords, their values, and what they are used for. @@ -61,9 +61,9 @@ Event tracing for Windows (ETW) events can be filtered by category and level. Ev |`AppDomainResourceManagementRundownKeyword`|0x00000800|Enables the collection of events for resource monitoring at an level when used with `StartRundownKeyword` or `EndRundownKeyword`.| |`ThreadingKeyword`|0x00010000|Enables the collection of thread pool events.| |`OverrideAndSuppressNGenEventsRundownKeyword`|0x00040000|(Available in the .NET Framework 4.5 and later.) Suppresses the high-overhead `NGenRundownKeyword` keyword and prevents the generation of events for methods that are inside NGen modules. Starting with the .NET Framework 4.5, profiling tools should use `OverrideAndSuppressNGenEventsRundownKeyword` and `NGenRundownKeyword` together to suppress the generation of events for methods in NGen modules. This enables the profiling tool to use the more efficient NGen PDBs to get information about methods in NGen modules. The CLR in the .NET Framework 4 and earlier versions does not support the creation of NGen PDBs. In these earlier versions, the CLR will not recognize `OverrideAndSuppressNGenEventsRundownKeyword` and will process `NGenRundownKeyword` to generate events for methods in NGen modules.| -|`PerfTrackKeyWord`|0x2000000|Enables the collection of the `ModuleDCStart`, `ModuleDCEnd`, `ModuleRangeDCStart`, and `ModuleRangeDCEnd` events.| +|`PerfTrackKeyWord`|0x2000000|Enables the collection of the `ModuleDCStart`, `ModuleDCEnd`, `ModuleRangeDCStart`, and `ModuleRangeDCEnd` events.| - + ### Keyword Combinations for Symbol Resolution for the Runtime Provider |Keywords and flags|Application domain, assembly, module load/unload events|Method load/unload events (except dynamic events)|Dynamic method load/destroy events| @@ -75,7 +75,7 @@ Event tracing for Windows (ETW) events can be filtered by category and level. Ev |`NGenKeyword` +

`StartEnumerationKeyword`|None.|Load events.|Not applicable.| |`NGenKeyword` +

`EndEnumerationKeyword`|None.|Unload events.|Not applicable.| - + ### Keyword Combinations for Symbol Resolution for the Rundown Provider |Keywords and flags|Application domain, assembly, module DCStart/DCEnd events|Method DCStart/DCEnd events (including dynamic method events)| diff --git a/docs/framework/performance/clr-etw-providers.md b/docs/framework/performance/clr-etw-providers.md index 01fdc94bdc8a2..cfc702d2f82d8 100644 --- a/docs/framework/performance/clr-etw-providers.md +++ b/docs/framework/performance/clr-etw-providers.md @@ -53,7 +53,7 @@ The common language runtime (CLR) has two providers: the runtime provider and th 1. Turn on ETW logging by using the CLR runtime provider: ```console - xperf -start clr -on e13c0d23-ccbc-4e12-931b-d9cc2eee27e4:0x1CCBD:0x5 -f clr1.etl + xperf -start clr -on e13c0d23-ccbc-4e12-931b-d9cc2eee27e4:0x1CCBD:0x5 -f clr1.etl ``` The log will be saved to the clr1.etl file. @@ -61,7 +61,7 @@ The common language runtime (CLR) has two providers: the runtime provider and th 2. To stop profiling while the process continues to execute, start the rundown provider to capture the `DCEnd` events: ```console - xperf -start clrRundown -on A669021C-C450-4609-A035-5AF59AF4DF18:0xB8:0x5 -f clr2.etl + xperf -start clrRundown -on A669021C-C450-4609-A035-5AF59AF4DF18:0xB8:0x5 -f clr2.etl ``` This enables the collection of `DCEnd` events to start a rundown session. You may need to wait 30 to 60 seconds for all events to be collected. The log will be saved to the clr1.et2 file. @@ -69,7 +69,7 @@ The common language runtime (CLR) has two providers: the runtime provider and th 3. Turn off all ETW profiling: ```console - xperf -stop clrRundown + xperf -stop clrRundown xperf -stop clr ``` diff --git a/docs/framework/performance/how-to-perform-lazy-initialization-of-objects.md b/docs/framework/performance/how-to-perform-lazy-initialization-of-objects.md index 071474553d391..77107742ab0bc 100644 --- a/docs/framework/performance/how-to-perform-lazy-initialization-of-objects.md +++ b/docs/framework/performance/how-to-perform-lazy-initialization-of-objects.md @@ -42,7 +42,7 @@ End Sub ``` ```csharp - static bool someCondition = false; + static bool someCondition = false; //Initializing a value with a big computation, computed in parallel Lazy _data = new Lazy(delegate { diff --git a/docs/framework/performance/lazy-initialization.md b/docs/framework/performance/lazy-initialization.md index 41af7e5f695b1..f0343bb39ea18 100644 --- a/docs/framework/performance/lazy-initialization.md +++ b/docs/framework/performance/lazy-initialization.md @@ -77,7 +77,7 @@ ms.assetid: 56b4ae5c-4745-44ff-ad78-ffe4fcde6b9b Specifying allows multiple threads to attempt to initialize the instance. Only one thread can win this race, and all the other threads receive the value that was initialized by the successful thread. If an exception is thrown on a thread during initialization, that thread does not receive the value set by the successful thread. Exceptions are not cached, so a subsequent attempt to access the property can result in successful initialization. This differs from the way exceptions are treated in other modes, which is described in the following section. For more information, see the enumeration. - + ## Exceptions in Lazy Objects As stated earlier, a object always returns the same object or value that it was initialized with, and therefore the property is read-only. If you enable exception caching, this immutability also extends to exception behavior. If a lazy-initialized object has exception caching enabled and throws an exception from its initialization method when the property is first accessed, that same exception is thrown on every subsequent attempt to access the property. In other words, the constructor of the wrapped type is never re-invoked, even in multithreaded scenarios. Therefore, the object cannot throw an exception on one access and return a value on a subsequent access. diff --git a/docs/framework/performance/loader-etw-events.md b/docs/framework/performance/loader-etw-events.md index 52c5952113cfc..588f88312f3ba 100644 --- a/docs/framework/performance/loader-etw-events.md +++ b/docs/framework/performance/loader-etw-events.md @@ -66,7 +66,7 @@ These events collect information relating to loading and unloading application d |BindingID|win:UInt64|ID that uniquely identifies the assembly binding.| |AssemblyFlags|win:UInt32|0x1: Domain neutral assembly.

0x2: Dynamic assembly.

0x4: Assembly has a native image.

0x8: Collectible assembly.| |AssemblyName|win:UnicodeString|Fully qualified assembly name.| -|ClrInstanceID|win:UInt16|Unique ID for the instance of CLR or CoreCLR.| +|ClrInstanceID|win:UInt16|Unique ID for the instance of CLR or CoreCLR.| ## Module Events The following table shows the keyword and level. diff --git a/docs/framework/performance/writing-large-responsive-apps.md b/docs/framework/performance/writing-large-responsive-apps.md index 47799f53c020c..f9b628d2d15d0 100644 --- a/docs/framework/performance/writing-large-responsive-apps.md +++ b/docs/framework/performance/writing-large-responsive-apps.md @@ -7,47 +7,47 @@ ms.author: "wiwagn" --- # Writing Large, Responsive .NET Framework Apps -This article provides tips for improving the performance of large .NET Framework apps, or apps that process a large amount of data such as files or databases. These tips come from rewriting the C# and Visual Basic compilers in managed code, and this article includes several real examples from the C# compiler. +This article provides tips for improving the performance of large .NET Framework apps, or apps that process a large amount of data such as files or databases. These tips come from rewriting the C# and Visual Basic compilers in managed code, and this article includes several real examples from the C# compiler. -The .NET Framework is highly productive for building apps. Powerful and safe languages and a rich collection of libraries make app building highly fruitful. However, with great productivity comes responsibility. You should use all the power of the .NET Framework, but be prepared to tune your code’s performance when needed. +The .NET Framework is highly productive for building apps. Powerful and safe languages and a rich collection of libraries make app building highly fruitful. However, with great productivity comes responsibility. You should use all the power of the .NET Framework, but be prepared to tune your code’s performance when needed. ## Why the new compiler performance applies to your app - The .NET Compiler Platform ("Roslyn") team rewrote the C# and Visual Basic compilers in managed code to provide new APIs for modeling and analyzing code, building tools, and enabling much richer, code-aware experiences in Visual Studio. Rewriting the compilers and building Visual Studio experiences on the new compilers revealed useful performance insights that are applicable to any large .NET Framework app or any app that processes a lot of data. You don't need to know about compilers to take advantage of the insights and examples from the C# compiler. + The .NET Compiler Platform ("Roslyn") team rewrote the C# and Visual Basic compilers in managed code to provide new APIs for modeling and analyzing code, building tools, and enabling much richer, code-aware experiences in Visual Studio. Rewriting the compilers and building Visual Studio experiences on the new compilers revealed useful performance insights that are applicable to any large .NET Framework app or any app that processes a lot of data. You don't need to know about compilers to take advantage of the insights and examples from the C# compiler. - Visual Studio uses the compiler APIs to build all the IntelliSense features that users love, such as colorization of identifiers and keywords, syntax completion lists, squiggles for errors, parameter tips, code issues, and code actions. Visual Studio provides this help while developers are typing and changing their code, and Visual Studio must remain responsive while the compiler continually models the code developers edit. + Visual Studio uses the compiler APIs to build all the IntelliSense features that users love, such as colorization of identifiers and keywords, syntax completion lists, squiggles for errors, parameter tips, code issues, and code actions. Visual Studio provides this help while developers are typing and changing their code, and Visual Studio must remain responsive while the compiler continually models the code developers edit. - When your end users interact with your app, they expect it to be responsive. Typing or command handling should never be blocked. Help should pop up quickly or give up if the user continues typing. Your app should avoid blocking the UI thread with long computations that make the app feel sluggish. + When your end users interact with your app, they expect it to be responsive. Typing or command handling should never be blocked. Help should pop up quickly or give up if the user continues typing. Your app should avoid blocking the UI thread with long computations that make the app feel sluggish. For more information about Roslyn compilers, see [The .NET Compiler Platform SDK](../../csharp/roslyn-sdk/index.md). ## Just the Facts - Consider these facts when tuning performance and creating responsive .NET Framework apps. + Consider these facts when tuning performance and creating responsive .NET Framework apps. ### Fact 1: Don’t prematurely optimize - Writing code that is more complex than it needs to be incurs maintenance, debugging, and polishing costs. Experienced programmers have an intuitive grasp of how to solve coding problems and write more efficient code. However, they sometimes prematurely optimize their code. For example, they use a hash table when a simple array would suffice, or use complicated caching that may leak memory instead of simply recomputing values. Even if you’re an experience programmer, you should test for performance and analyze your code when you find issues. + Writing code that is more complex than it needs to be incurs maintenance, debugging, and polishing costs. Experienced programmers have an intuitive grasp of how to solve coding problems and write more efficient code. However, they sometimes prematurely optimize their code. For example, they use a hash table when a simple array would suffice, or use complicated caching that may leak memory instead of simply recomputing values. Even if you’re an experience programmer, you should test for performance and analyze your code when you find issues. ### Fact 2: If you’re not measuring, you’re guessing - Profiles and measurements don’t lie. Profiles show you whether the CPU is fully loaded or whether you’re blocked on disk I/O. Profiles tell you what kind and how much memory you’re allocating and whether your CPU is spending a lot of time in [garbage collection](../../standard/garbage-collection/index.md) (GC). + Profiles and measurements don’t lie. Profiles show you whether the CPU is fully loaded or whether you’re blocked on disk I/O. Profiles tell you what kind and how much memory you’re allocating and whether your CPU is spending a lot of time in [garbage collection](../../standard/garbage-collection/index.md) (GC). - You should set performance goals for key customer experiences or scenarios in your app and write tests to measure performance. Investigate failing tests by applying the scientific method: use profiles to guide you, hypothesize what the issue might be, and test your hypothesis with an experiment or code change. Establish baseline performance measurements over time with regular testing, so you can isolate changes that cause regressions in performance. By approaching performance work in a rigorous way, you’ll avoid wasting time with code updates you don’t need. + You should set performance goals for key customer experiences or scenarios in your app and write tests to measure performance. Investigate failing tests by applying the scientific method: use profiles to guide you, hypothesize what the issue might be, and test your hypothesis with an experiment or code change. Establish baseline performance measurements over time with regular testing, so you can isolate changes that cause regressions in performance. By approaching performance work in a rigorous way, you’ll avoid wasting time with code updates you don’t need. ### Fact 3: Good tools make all the difference - Good tools let you drill quickly into the biggest performance issues (CPU, memory, or disk) and help you locate the code that causes those bottlenecks. Microsoft ships a variety of performance tools such as [Visual Studio Profiler](/visualstudio/profiling/beginners-guide-to-performance-profiling) and [PerfView](https://www.microsoft.com/download/details.aspx?id=28567). + Good tools let you drill quickly into the biggest performance issues (CPU, memory, or disk) and help you locate the code that causes those bottlenecks. Microsoft ships a variety of performance tools such as [Visual Studio Profiler](/visualstudio/profiling/beginners-guide-to-performance-profiling) and [PerfView](https://www.microsoft.com/download/details.aspx?id=28567). - PerfView is a free and amazingly powerful tool that helps you focus on deep issues such as disk I/O, GC events, and memory. You can capture performance-related [Event Tracing for Windows](../wcf/samples/etw-tracing.md) (ETW) events and view easily per app, per process, per stack, and per thread information. PerfView shows you how much and what kind of memory your app allocates, and which functions or call stacks contribute how much to the memory allocations. For details, see the rich help topics, demos, and videos included with the tool (such as the [PerfView tutorials](https://channel9.msdn.com/Series/PerfView-Tutorial) on Channel 9). + PerfView is a free and amazingly powerful tool that helps you focus on deep issues such as disk I/O, GC events, and memory. You can capture performance-related [Event Tracing for Windows](../wcf/samples/etw-tracing.md) (ETW) events and view easily per app, per process, per stack, and per thread information. PerfView shows you how much and what kind of memory your app allocates, and which functions or call stacks contribute how much to the memory allocations. For details, see the rich help topics, demos, and videos included with the tool (such as the [PerfView tutorials](https://channel9.msdn.com/Series/PerfView-Tutorial) on Channel 9). ### Fact 4: It’s all about allocations - You might think that building a responsive .NET Framework app is all about algorithms, such as using quick sort instead of bubble sort, but that's not the case. The biggest factor in building a responsive app is allocating memory, especially when your app is very large or processes large amounts of data. + You might think that building a responsive .NET Framework app is all about algorithms, such as using quick sort instead of bubble sort, but that's not the case. The biggest factor in building a responsive app is allocating memory, especially when your app is very large or processes large amounts of data. - Almost all the work to build responsive IDE experiences with the new compiler APIs involved avoiding allocations and managing caching strategies. PerfView traces show that the performance of the new C# and Visual Basic compilers is rarely CPU bound. The compilers can be I/O bound when reading hundreds of thousands or millions of lines of code, reading metadata, or emitting generated code. The UI thread delays are nearly all due to garbage collection. The .NET Framework GC is highly tuned for performance and does much of its work concurrently while app code executes. However, a single allocation can trigger an expensive [gen2](../../standard/garbage-collection/fundamentals.md) collection, stopping all threads. + Almost all the work to build responsive IDE experiences with the new compiler APIs involved avoiding allocations and managing caching strategies. PerfView traces show that the performance of the new C# and Visual Basic compilers is rarely CPU bound. The compilers can be I/O bound when reading hundreds of thousands or millions of lines of code, reading metadata, or emitting generated code. The UI thread delays are nearly all due to garbage collection. The .NET Framework GC is highly tuned for performance and does much of its work concurrently while app code executes. However, a single allocation can trigger an expensive [gen2](../../standard/garbage-collection/fundamentals.md) collection, stopping all threads. ## Common allocations and examples - The example expressions in this section have hidden allocations that appear small. However, if a large app executes the expressions enough times, they can causes hundreds of megabytes, even gigabytes, of allocations. For example, one-minute tests that simulated a developer’s typing in the editor allocated gigabytes of memory and led the performance team to focus on typing scenarios. + The example expressions in this section have hidden allocations that appear small. However, if a large app executes the expressions enough times, they can causes hundreds of megabytes, even gigabytes, of allocations. For example, one-minute tests that simulated a developer’s typing in the editor allocated gigabytes of memory and led the performance team to focus on typing scenarios. ### Boxing - [Boxing](../../csharp/programming-guide/types/boxing-and-unboxing.md) occurs when value types that normally live on the stack or in data structures are wrapped in an object. That is, you allocate an object to hold the data, and then return a pointer to the object. The .NET Framework sometimes boxes values due to the signature of a method or the type of a storage location. Wrapping a value type in an object causes memory allocation. Many boxing operations can contribute megabytes or gigabytes of allocations to your app, which means that your app will cause more GCs. The .NET Framework and the language compilers avoid boxing when possible, but sometimes it happens when you least expect it. + [Boxing](../../csharp/programming-guide/types/boxing-and-unboxing.md) occurs when value types that normally live on the stack or in data structures are wrapped in an object. That is, you allocate an object to hold the data, and then return a pointer to the object. The .NET Framework sometimes boxes values due to the signature of a method or the type of a storage location. Wrapping a value type in an object causes memory allocation. Many boxing operations can contribute megabytes or gigabytes of allocations to your app, which means that your app will cause more GCs. The .NET Framework and the language compilers avoid boxing when possible, but sometimes it happens when you least expect it. - To see boxing in PerfView, open a trace and look at GC Heap Alloc Stacks under your app’s process name (remember, PerfView reports on all processes). If you see types like and under allocations, you are boxing value types. Choosing one of these types will show the stacks and functions in which they are boxed. + To see boxing in PerfView, open a trace and look at GC Heap Alloc Stacks under your app’s process name (remember, PerfView reports on all processes). If you see types like and under allocations, you are boxing value types. Choosing one of these types will show the stacks and functions in which they are boxed. **Example 1: string methods and value type arguments** @@ -69,9 +69,9 @@ public class BoxingExample } ``` - This code provides logging functionality, so an app may call the `Log` function frequently, maybe millions of times. The problem is that the call to `string.Format` resolves to the overload. + This code provides logging functionality, so an app may call the `Log` function frequently, maybe millions of times. The problem is that the call to `string.Format` resolves to the overload. - This overload requires the .NET Framework to box the `int` values into objects to pass them to this method call. A partial fix is to call `id.ToString()` and `size.ToString()` and pass all strings (which are objects) to the `string.Format` call. Calling `ToString()` does allocate a string, but that allocation will happen anyway inside `string.Format`. + This overload requires the .NET Framework to box the `int` values into objects to pass them to this method call. A partial fix is to call `id.ToString()` and `size.ToString()` and pass all strings (which are objects) to the `string.Format` call. Calling `ToString()` does allocate a string, but that allocation will happen anyway inside `string.Format`. You might consider that this basic call to `string.Format` is just string concatenation, so you might write this code instead: @@ -91,7 +91,7 @@ var s = id.ToString() + ":" + size.ToString(); **Example 2: enum boxing** - This example was responsible for a huge amount of allocation in the new C# and Visual Basic compilers due to frequent use of enumeration types, especially in dictionary lookup operations. + This example was responsible for a huge amount of allocation in the new C# and Visual Basic compilers due to frequent use of enumeration types, especially in dictionary lookup operations. ```csharp public enum Color @@ -110,7 +110,7 @@ public class BoxingExample } ``` - This problem is very subtle. PerfView would report this as boxing because the method boxes the underlying representation of the enumeration type, for implementation reasons. If you look closely in PerfView, you may see two boxing allocations for each call to . The compiler inserts one, and the .NET Framework inserts the other. + This problem is very subtle. PerfView would report this as boxing because the method boxes the underlying representation of the enumeration type, for implementation reasons. If you look closely in PerfView, you may see two boxing allocations for each call to . The compiler inserts one, and the .NET Framework inserts the other. **Fix for example 2** @@ -120,12 +120,12 @@ public class BoxingExample ((int)color).GetHashCode() ``` - Another common source of boxing on enumeration types is the method. The argument passed to has to be boxed. In most cases, replacing calls to with a bitwise test is simpler and allocation-free. + Another common source of boxing on enumeration types is the method. The argument passed to has to be boxed. In most cases, replacing calls to with a bitwise test is simpler and allocation-free. - Keep the first performance fact in mind (that is, don’t prematurely optimize) and don’t start rewriting all your code in this way. Be aware of these boxing costs, but change your code only after profiling your app and finding the hot spots. + Keep the first performance fact in mind (that is, don’t prematurely optimize) and don’t start rewriting all your code in this way. Be aware of these boxing costs, but change your code only after profiling your app and finding the hot spots. ### Strings - String manipulations are some of the biggest culprits for allocations, and they often show up in PerfView in the top five allocations. Programs use strings for serialization, JSON, and REST APIs. You can use strings as programmatic constants for interoperating with systems when you can’t use enumeration types. When your profiling shows that strings are highly affecting performance, look for calls to methods such as , , , , , and so on. Using to avoid the cost of creating one string from many pieces helps, but even allocating the object might become a bottleneck that you need to manage. + String manipulations are some of the biggest culprits for allocations, and they often show up in PerfView in the top five allocations. Programs use strings for serialization, JSON, and REST APIs. You can use strings as programmatic constants for interoperating with systems when you can’t use enumeration types. When your profiling shows that strings are highly affecting performance, look for calls to methods such as , , , , , and so on. Using to avoid the cost of creating one string from many pieces helps, but even allocating the object might become a bottleneck that you need to manage. **Example 3: string operations** @@ -156,17 +156,17 @@ public void WriteFormattedDocComment(string text) else { /* ... */ } ``` - You can see that this code does a lot of string manipulation. The code uses library methods to split lines into separate strings, to trim white space, to check whether the argument `text` is an XML documentation comment, and to extract substrings from lines. + You can see that this code does a lot of string manipulation. The code uses library methods to split lines into separate strings, to trim white space, to check whether the argument `text` is an XML documentation comment, and to extract substrings from lines. - On the first line inside `WriteFormattedDocComment`, the `text.Split` call allocates a new three-element array as the argument every time it’s called. The compiler has to emit code to allocate this array each time. That’s because the compiler doesn’t know if stores the array somewhere where the array might be modified by other code, which would affect later calls to `WriteFormattedDocComment`. The call to also allocates a string for every line in `text` and allocates other memory to perform the operation. + On the first line inside `WriteFormattedDocComment`, the `text.Split` call allocates a new three-element array as the argument every time it’s called. The compiler has to emit code to allocate this array each time. That’s because the compiler doesn’t know if stores the array somewhere where the array might be modified by other code, which would affect later calls to `WriteFormattedDocComment`. The call to also allocates a string for every line in `text` and allocates other memory to perform the operation. - `WriteFormattedDocComment` has three calls to the method. Two are in inner loops that duplicate work and allocations. To make matters worse, calling the method with no arguments allocates an empty array (for the `params` parameter) in addition to the string result. + `WriteFormattedDocComment` has three calls to the method. Two are in inner loops that duplicate work and allocations. To make matters worse, calling the method with no arguments allocates an empty array (for the `params` parameter) in addition to the string result. - Lastly, there is a call to the method, which usually allocates a new string. + Lastly, there is a call to the method, which usually allocates a new string. **Fix for example 3** - Unlike the earlier examples, small edits cannot fix these allocations. You need to step back, look at the problem, and approach it differently. For example, you'll notice that the argument to `WriteFormattedDocComment()` is a string that has all the information that the method needs, so the code could do more indexing instead of allocating many partial strings. + Unlike the earlier examples, small edits cannot fix these allocations. You need to step back, look at the problem, and approach it differently. For example, you'll notice that the argument to `WriteFormattedDocComment()` is a string that has all the information that the method needs, so the code could do more indexing instead of allocating many partial strings. The compiler’s performance team tackled all these allocations with code like this: @@ -187,10 +187,10 @@ private bool TrimmedStringStartsWith(string text, int start, string prefix) { return true; } -// etc... +// etc... ``` - The first version of `WriteFormattedDocComment()` allocated an array, several substrings, and a trimmed substring along with an empty `params` array. It also checked for "///". The revised code uses only indexing and allocates nothing. It finds the first character that is not white space, and then checks character by character to see if the string starts with "///". The new code uses `IndexOfFirstNonWhiteSpaceChar` instead of to return the first index (after a specified start index) where a non-white-space character occurs. The fix is not complete, but you can see how to apply similar fixes for a complete solution. By applying this approach throughout the code, you can remove all allocations in `WriteFormattedDocComment()`. + The first version of `WriteFormattedDocComment()` allocated an array, several substrings, and a trimmed substring along with an empty `params` array. It also checked for "///". The revised code uses only indexing and allocates nothing. It finds the first character that is not white space, and then checks character by character to see if the string starts with "///". The new code uses `IndexOfFirstNonWhiteSpaceChar` instead of to return the first index (after a specified start index) where a non-white-space character occurs. The fix is not complete, but you can see how to apply similar fixes for a complete solution. By applying this approach throughout the code, you can remove all allocations in `WriteFormattedDocComment()`. **Example 4: StringBuilder** @@ -220,7 +220,7 @@ public class Example } ``` - The focus is on the line that creates a new instance. The code causes an allocation for `sb.ToString()` and internal allocations within the implementation, but you cannot control those allocations if you want the string result. + The focus is on the line that creates a new instance. The code causes an allocation for `sb.ToString()` and internal allocations within the implementation, but you cannot control those allocations if you want the string result. **Fix for example 4** @@ -262,13 +262,13 @@ private static string GetStringAndReleaseBuilder(StringBuilder sb) } ``` - Because the new compilers use threading, these implementations use a thread-static field ( attribute) to cache the , and you likely can forgo the `ThreadStatic` declaration. The thread-static field holds a unique value for each thread that executes this code. + Because the new compilers use threading, these implementations use a thread-static field ( attribute) to cache the , and you likely can forgo the `ThreadStatic` declaration. The thread-static field holds a unique value for each thread that executes this code. - `AcquireBuilder()` returns the cached instance if there is one, after clearing it and setting the field or cache to null. Otherwise, `AcquireBuilder()` creates a new instance and returns it, leaving the field or cache set to null. + `AcquireBuilder()` returns the cached instance if there is one, after clearing it and setting the field or cache to null. Otherwise, `AcquireBuilder()` creates a new instance and returns it, leaving the field or cache set to null. - When you’re done with , you call `GetStringAndReleaseBuilder()` to get the string result, save the instance in the field or cache, and then return the result. It is possible for execution to re-enter this code and to create multiple objects (although that rarely happens). The code saves only the last released instance for later use. This simple caching strategy significantly reduced allocations in the new compilers. Parts of the .NET Framework and MSBuild ("MSBuild") use a similar technique to improve performance. + When you’re done with , you call `GetStringAndReleaseBuilder()` to get the string result, save the instance in the field or cache, and then return the result. It is possible for execution to re-enter this code and to create multiple objects (although that rarely happens). The code saves only the last released instance for later use. This simple caching strategy significantly reduced allocations in the new compilers. Parts of the .NET Framework and MSBuild ("MSBuild") use a similar technique to improve performance. - This simple caching strategy adheres to good cache design because it has a size cap. However, there is more code now than in the original, which means more maintenance costs. You should adopt the caching strategy only if you’ve found a performance problem, and PerfView has shown that allocations are a significant contributor. + This simple caching strategy adheres to good cache design because it has a size cap. However, there is more code now than in the original, which means more maintenance costs. You should adopt the caching strategy only if you’ve found a performance problem, and PerfView has shown that allocations are a significant contributor. ### LINQ and lambdas Language-Integrated Query (LINQ), in conjunction with lambda expressions, is an example of a productivity feature. However, its use may have a significant impact on performance over time, and you might find you need to rewrite your code. @@ -317,12 +317,12 @@ Lambda1Environment l = new Lambda1Environment() { capturedName = name }; var predicate = new Func(l.Evaluate); ``` - The two `new` allocations (one for the environment class and one for the delegate) are explicit now. + The two `new` allocations (one for the environment class and one for the delegate) are explicit now. Now look at the call to `FirstOrDefault`. This extension method on the type incurs an allocation too. Because `FirstOrDefault` takes an object as its first argument, you can expand the call to the following code (simplified a bit for discussion): ```csharp -// Expanded return symbols.FirstOrDefault(predicate) ... +// Expanded return symbols.FirstOrDefault(predicate) ... IEnumerable enumerable = symbols; IEnumerator enumerator = enumerable.GetEnumerator(); while(enumerator.MoveNext()) @@ -333,9 +333,9 @@ var predicate = new Func(l.Evaluate); return default(Symbol); ``` - The `symbols` variable has type . The collection type implements and cleverly defines an enumerator ( interface) that implements with a `struct`. Using a structure instead of a class means that you usually avoid any heap allocations, which, in turn, can affect garbage collection performance. Enumerators are typically used with the language’s `foreach` loop, which uses the enumerator structure as it is returned on the call stack. Incrementing the call stack pointer to make room for an object does not affect GC the way a heap allocation does. + The `symbols` variable has type . The collection type implements and cleverly defines an enumerator ( interface) that implements with a `struct`. Using a structure instead of a class means that you usually avoid any heap allocations, which, in turn, can affect garbage collection performance. Enumerators are typically used with the language’s `foreach` loop, which uses the enumerator structure as it is returned on the call stack. Incrementing the call stack pointer to make room for an object does not affect GC the way a heap allocation does. - In the case of the expanded `FirstOrDefault` call, the code needs to call `GetEnumerator()` on an . Assigning `symbols` to the `enumerable` variable of type `IEnumerable` loses the information that the actual object is a . This means that when the code fetches the enumerator with `enumerable.GetEnumerator()`, the .NET Framework has to box the returned structure to assign it to the `enumerator` variable. + In the case of the expanded `FirstOrDefault` call, the code needs to call `GetEnumerator()` on an . Assigning `symbols` to the `enumerable` variable of type `IEnumerable` loses the information that the actual object is a . This means that when the code fetches the enumerator with `enumerable.GetEnumerator()`, the .NET Framework has to box the returned structure to assign it to the `enumerator` variable. **Fix for example 5** @@ -353,7 +353,7 @@ public Symbol FindMatchingSymbol(string name) } ``` - This code doesn’t use LINQ extension methods, lambdas, or enumerators, and it incurs no allocations. There are no allocations because the compiler can see that the `symbols` collection is a and can bind the resulting enumerator (a structure) to a local variable with the right type to avoid boxing. The original version of this function was a great example of the expressive power of C# and the productivity of the .NET Framework. This new and more efficient version preserves those qualities without adding any complex code to maintain. + This code doesn’t use LINQ extension methods, lambdas, or enumerators, and it incurs no allocations. There are no allocations because the compiler can see that the `symbols` collection is a and can bind the resulting enumerator (a structure) to a local variable with the right type to avoid boxing. The original version of this function was a great example of the expressive power of C# and the productivity of the .NET Framework. This new and more efficient version preserves those qualities without adding any complex code to maintain. ### Async method caching @@ -381,7 +381,7 @@ class Compilation { /*...*/ } ``` - You can see that calling `GetSyntaxTreeAsync()` instantiates a `Parser`, parses the code, and then returns a object, `Task`. The expensive part is allocating the `Parser` instance and parsing the code. The function returns a so that callers can await the parsing work and free the UI thread to be responsive to user input. + You can see that calling `GetSyntaxTreeAsync()` instantiates a `Parser`, parses the code, and then returns a object, `Task`. The expensive part is allocating the `Parser` instance and parsing the code. The function returns a so that callers can await the parsing work and free the UI thread to be responsive to user input. Several Visual Studio features might try to get the same syntax tree, so you might write the following code to cache the parsing result to save time and allocations. However, this code incurs an allocation: @@ -403,7 +403,7 @@ class Compilation { /*...*/ } ``` - You see that the new code with caching has a `SyntaxTree` field named `cachedResult`. When this field is null, `GetSyntaxTreeAsync()` does the work and saves the result in the cache. `GetSyntaxTreeAsync()` returns the `SyntaxTree` object. The problem is that when you have an `async` function of type `Task`, and you return a value of type `SyntaxTree`, the compiler emits code to allocate a Task to hold the result (by using `Task.FromResult()`). The Task is marked as completed, and the result is immediately available. In the code for the new compilers, objects that were already completed occurred so often that fixing these allocations improved responsiveness noticeably. + You see that the new code with caching has a `SyntaxTree` field named `cachedResult`. When this field is null, `GetSyntaxTreeAsync()` does the work and saves the result in the cache. `GetSyntaxTreeAsync()` returns the `SyntaxTree` object. The problem is that when you have an `async` function of type `Task`, and you return a value of type `SyntaxTree`, the compiler emits code to allocate a Task to hold the result (by using `Task.FromResult()`). The Task is marked as completed, and the result is immediately available. In the code for the new compilers, objects that were already completed occurred so often that fixing these allocations improved responsiveness noticeably. **Fix for example 6** @@ -416,7 +416,7 @@ class Compilation { /*...*/ public Task GetSyntaxTreeAsync() { - return this.cachedResult ?? + return this.cachedResult ?? (this.cachedResult = GetSyntaxTreeUncachedAsync()); } @@ -429,32 +429,32 @@ class Compilation { /*...*/ } ``` - This code changes the type of `cachedResult` to `Task` and employs an `async` helper function that holds the original code from `GetSyntaxTreeAsync()`. `GetSyntaxTreeAsync()` now uses the [null coalescing operator](../../csharp/language-reference/operators/null-coalescing-operator.md) to return `cachedResult` if it isn't null. If `cachedResult` is null, then `GetSyntaxTreeAsync()` calls `GetSyntaxTreeUncachedAsync()` and caches the result. Notice that `GetSyntaxTreeAsync()` doesn’t await the call to `GetSyntaxTreeUncachedAsync()` as the code would normally. Not using await means that when `GetSyntaxTreeUncachedAsync()` returns its object, `GetSyntaxTreeAsync()` immediately returns the . Now, the cached result is a , so there are no allocations to return the cached result. + This code changes the type of `cachedResult` to `Task` and employs an `async` helper function that holds the original code from `GetSyntaxTreeAsync()`. `GetSyntaxTreeAsync()` now uses the [null coalescing operator](../../csharp/language-reference/operators/null-coalescing-operator.md) to return `cachedResult` if it isn't null. If `cachedResult` is null, then `GetSyntaxTreeAsync()` calls `GetSyntaxTreeUncachedAsync()` and caches the result. Notice that `GetSyntaxTreeAsync()` doesn’t await the call to `GetSyntaxTreeUncachedAsync()` as the code would normally. Not using await means that when `GetSyntaxTreeUncachedAsync()` returns its object, `GetSyntaxTreeAsync()` immediately returns the . Now, the cached result is a , so there are no allocations to return the cached result. ### Additional considerations - Here are a few more points about potential problems in large apps or apps that process a lot of data. + Here are a few more points about potential problems in large apps or apps that process a lot of data. **Dictionaries** - Dictionaries are used ubiquitously in many programs, and though dictionaries are very convenient and inherently efficient. However, they’re often used inappropriately. In Visual Studio and the new compilers, analysis shows that many of the dictionaries contained a single element or were empty. An empty has ten fields and occupies 48 bytes on the heap on an x86 machine. Dictionaries are great when you need a mapping or associative data structure with constant-time lookup. However, when you have only a few elements, you waste a lot of space by using a dictionary. Instead, for example, you could iteratively look through a `List>`, just as fast. If you use a dictionary only to load it with data and then read from it (a very common pattern), using a sorted array with an N(log(N)) lookup might be nearly as fast, depending on the number of elements you're using. + Dictionaries are used ubiquitously in many programs, and though dictionaries are very convenient and inherently efficient. However, they’re often used inappropriately. In Visual Studio and the new compilers, analysis shows that many of the dictionaries contained a single element or were empty. An empty has ten fields and occupies 48 bytes on the heap on an x86 machine. Dictionaries are great when you need a mapping or associative data structure with constant-time lookup. However, when you have only a few elements, you waste a lot of space by using a dictionary. Instead, for example, you could iteratively look through a `List>`, just as fast. If you use a dictionary only to load it with data and then read from it (a very common pattern), using a sorted array with an N(log(N)) lookup might be nearly as fast, depending on the number of elements you're using. **Classes vs. structures** - In a way, classes and structures provide a classic space/time tradeoff for tuning your apps. Classes incur 12 bytes of overhead on an x86 machine even if they have no fields, but they are inexpensive to pass around because it only takes a pointer to refer to a class instance. Structures incur no heap allocations if they aren’t boxed, but when you pass large structures as function arguments or return values, it takes CPU time to atomically copy all the data members of the structures. Watch out for repeated calls to properties that return structures, and cache the property’s value in a local variable to avoid excessive data copying. + In a way, classes and structures provide a classic space/time tradeoff for tuning your apps. Classes incur 12 bytes of overhead on an x86 machine even if they have no fields, but they are inexpensive to pass around because it only takes a pointer to refer to a class instance. Structures incur no heap allocations if they aren’t boxed, but when you pass large structures as function arguments or return values, it takes CPU time to atomically copy all the data members of the structures. Watch out for repeated calls to properties that return structures, and cache the property’s value in a local variable to avoid excessive data copying. **Caches** - A common performance trick is to cache results. However, a cache without a size cap or disposal policy can be a memory leak. When processing large amounts of data, if you hold on to a lot of memory in caches, you can cause garbage collection to override the benefits of your cached lookups. + A common performance trick is to cache results. However, a cache without a size cap or disposal policy can be a memory leak. When processing large amounts of data, if you hold on to a lot of memory in caches, you can cause garbage collection to override the benefits of your cached lookups. In this article, we discussed how you should be aware of performance bottleneck symptoms that can affect your app's responsiveness, especially for large systems or systems that process a large amount of data. Common culprits include boxing, string manipulations, LINQ and lambda, caching in async methods, caching without a size limit or disposal policy, inappropriate use of dictionaries, and passing around structures. Keep in mind the four facts for tuning your apps: -- Don’t prematurely optimize – be productive and tune your app when you spot problems. +- Don’t prematurely optimize – be productive and tune your app when you spot problems. -- Profiles don’t lie – you’re guessing if you’re not measuring. +- Profiles don’t lie – you’re guessing if you’re not measuring. -- Good tools make all the difference – download PerfView and try it out. +- Good tools make all the difference – download PerfView and try it out. -- It's all about allocations – that is where the compiler platform team spent most of their time improving the performance of the new compilers. +- It's all about allocations – that is where the compiler platform team spent most of their time improving the performance of the new compilers. ## See also From 078f000396ea332b3c0e2d87e9f098a049d9d0e3 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:34:44 -0400 Subject: [PATCH 15/18] fix: MD009 in docs/framework/reflection-and-codedom --- .../collectible-assemblies.md | 32 +++++++++---------- ...emitting-dynamic-methods-and-assemblies.md | 8 ++--- ...an-xml-documentation-file-using-codedom.md | 12 +++---- ...-to-hook-up-a-delegate-using-reflection.md | 2 +- .../reflection-and-generic-types.md | 6 ++-- .../reflection-and-codedom/reflection.md | 2 +- .../security-issues-in-reflection-emit.md | 8 ++--- 7 files changed, 35 insertions(+), 35 deletions(-) diff --git a/docs/framework/reflection-and-codedom/collectible-assemblies.md b/docs/framework/reflection-and-codedom/collectible-assemblies.md index 4aade77b1fea2..f49c2b8644f06 100644 --- a/docs/framework/reflection-and-codedom/collectible-assemblies.md +++ b/docs/framework/reflection-and-codedom/collectible-assemblies.md @@ -15,26 +15,26 @@ To enable unloading, use the or that represents `T`. +- An instance of or that represents `T`. > [!IMPORTANT] > You must release all objects that represent parts of the assembly. The that defines `T` keeps a reference to the , and the object keeps a reference to the , so references to these objects must be released. Even the existence of a or an used in the construction of `T` prevents unloading. - A static reference to `T` by another dynamically defined type `T1` that is still reachable by executing code. For example, `T1` might derive from `T`, or `T` might be the type of a parameter in a method of `T1`. - + - A **ByRef** to a static field that belongs to `T`. - A , , or that refers to `T` or to a component of `T`. -- An instance of any reflection object that could be used indirectly or directly to access the object that represents `T`. For example, the object for `T` can be obtained from an array type whose element type is `T`, or from a generic type that has `T` as a type argument. +- An instance of any reflection object that could be used indirectly or directly to access the object that represents `T`. For example, the object for `T` can be obtained from an array type whose element type is `T`, or from a generic type that has `T` as a type argument. - A method `M` on the call stack of any thread, where `M` is a method of `T` or a module-level method that is defined in the assembly. @@ -46,30 +46,30 @@ If only one item from this list exists for only one type or one method in the as > The runtime does not actually unload the assembly until finalizers have run for all items in the list. For purposes of tracking lifetime, a constructed generic type such as `List` (in C#) or `List(Of Integer)` (in Visual Basic) that is created and used in the generation of a collectible assembly is considered to have been defined either in the assembly that contains the generic type definition or in an assembly that contains the definition of one of its type arguments. The exact assembly that is used is an implementation detail and subject to change. - + ## Restrictions on collectible assemblies -The following restrictions apply to collectible assemblies: +The following restrictions apply to collectible assemblies: -- **Static references** +- **Static references** Types in an ordinary dynamic assembly cannot have static references to types that are defined in a collectible assembly. For example, if you define an ordinary type that inherits from a type in a collectible assembly, a exception is thrown. A type in a collectible assembly can have static references to a type in another collectible assembly, but this extends the lifetime of the referenced assembly to the lifetime of the referencing assembly. -- **COM interop** +- **COM interop** No COM interfaces can be defined within a collectible assembly, and no instances of types within a collectible assembly can be converted into COM objects. A type in a collectible assembly cannot serve as a COM callable wrapper (CCW) or runtime callable wrapper (RCW). However, types in collectible assemblies can use objects that implement COM interfaces. -- **Platform invoke** +- **Platform invoke** Methods that have the attribute will not compile when they are declared in a collectible assembly. The instruction cannot be used in the implementation of a type in a collectible assembly, and such types cannot be marshaled to unmanaged code. However, you can call into native code by using an entry point that is declared in a non-collectible assembly. - -- **Marshaling** + +- **Marshaling** Objects (in particular, delegates) that are defined in collectible assemblies cannot be marshaled. This is a restriction on all transient emitted types. -- **Assembly loading** +- **Assembly loading** Reflection emit is the only mechanism that is supported for loading collectible assemblies. Assemblies that are loaded by using any other form of assembly loading cannot be unloaded. - -- **Context-bound objects** + +- **Context-bound objects** Context-static variables are not supported. Types in a collectible assembly cannot extend . However, code in collectible assemblies can use context-bound objects that are defined elsewhere. -- **Thread-static data**    +- **Thread-static data** Thread-static variables are not supported. ## See also diff --git a/docs/framework/reflection-and-codedom/emitting-dynamic-methods-and-assemblies.md b/docs/framework/reflection-and-codedom/emitting-dynamic-methods-and-assemblies.md index b709f2e34614f..4e24b5039dbc9 100644 --- a/docs/framework/reflection-and-codedom/emitting-dynamic-methods-and-assemblies.md +++ b/docs/framework/reflection-and-codedom/emitting-dynamic-methods-and-assemblies.md @@ -35,16 +35,16 @@ Another useful resource for working with metadata and MSIL is the Common Languag [Security issues in reflection emit](security-issues-in-reflection-emit.md) Describes security issues related to creating dynamic assemblies using reflection emit. -[How to: Define and execute dynamic methods](how-to-define-and-execute-dynamic-methods.md) +[How to: Define and execute dynamic methods](how-to-define-and-execute-dynamic-methods.md) Shows how to execute a simple dynamic method and a dynamic method bound to an instance of a class. -[How to: Define a generic type with reflection emit](how-to-define-a-generic-type-with-reflection-emit.md) +[How to: Define a generic type with reflection emit](how-to-define-a-generic-type-with-reflection-emit.md) Shows how to create a simple generic type with two type parameters, how to apply class, interface, and special constraints to the type parameters, and how to create members that use the type parameters of the class as parameter types and return types. -[How to: Define a generic method with reflection emit](how-to-define-a-generic-method-with-reflection-emit.md) +[How to: Define a generic method with reflection emit](how-to-define-a-generic-method-with-reflection-emit.md) Shows how to create, emit, and invoke a simple generic method. -[Collectible assemblies for dynamic type generation](collectible-assemblies.md) +[Collectible assemblies for dynamic type generation](collectible-assemblies.md) Introduces collectible assemblies, which are dynamic assemblies that can be unloaded without unloading the application domain in which they were created. ## Reference diff --git a/docs/framework/reflection-and-codedom/how-to-create-an-xml-documentation-file-using-codedom.md b/docs/framework/reflection-and-codedom/how-to-create-an-xml-documentation-file-using-codedom.md index ae9e0f20cae26..f473832a3e455 100644 --- a/docs/framework/reflection-and-codedom/how-to-create-an-xml-documentation-file-using-codedom.md +++ b/docs/framework/reflection-and-codedom/how-to-create-an-xml-documentation-file-using-codedom.md @@ -45,22 +45,22 @@ CodeDOM can be used to create code that generates XML documentation. The process The code example creates the following XML documentation in the HelloWorldDoc.xml file. ```xml - + - HelloWorld + HelloWorld - Create a Hello World application. - + Create a Hello World application. + - Main method for HelloWorld application. - Add a new paragraph to the description. + Main method for HelloWorld application. + Add a new paragraph to the description. diff --git a/docs/framework/reflection-and-codedom/how-to-hook-up-a-delegate-using-reflection.md b/docs/framework/reflection-and-codedom/how-to-hook-up-a-delegate-using-reflection.md index 4b50461a5149f..ab2670ada2fe1 100644 --- a/docs/framework/reflection-and-codedom/how-to-hook-up-a-delegate-using-reflection.md +++ b/docs/framework/reflection-and-codedom/how-to-hook-up-a-delegate-using-reflection.md @@ -61,7 +61,7 @@ When you use reflection to load and run assemblies, you cannot use language feat [!code-csharp[HookUpDelegate#12](../../../samples/snippets/csharp/VS_Snippets_CLR/HookUpDelegate/cs/source.cs#12)] [!code-vb[HookUpDelegate#12](../../../samples/snippets/visualbasic/VS_Snippets_CLR/HookUpDelegate/vb/source.vb#12)] - + ### To generate an event handler at run time by using a dynamic method 1. Event-handler methods can be generated at run time, using lightweight dynamic methods and reflection emit. To construct an event handler, you need the return type and parameter types of the delegate. These can be obtained by examining the delegate's `Invoke` method. The following code uses the `GetDelegateReturnType` and `GetDelegateParameterTypes` methods to obtain this information. The code for these methods can be found in the Example section later in this topic. diff --git a/docs/framework/reflection-and-codedom/reflection-and-generic-types.md b/docs/framework/reflection-and-codedom/reflection-and-generic-types.md index 42fc95587db1e..53d06e2a57e2a 100644 --- a/docs/framework/reflection-and-codedom/reflection-and-generic-types.md +++ b/docs/framework/reflection-and-codedom/reflection-and-generic-types.md @@ -44,7 +44,7 @@ From the point of view of reflection, the difference between a generic type and Generic type and method definitions are the templates from which instantiable types are created. Generic types in the .NET Framework class library, such as , are generic type definitions. ### Is the Type or Method Open or Closed? - A generic type or method is closed if instantiable types have been substituted for all its type parameters, including all the type parameters of all enclosing types. You can only create an instance of a generic type if it is closed. The property returns `true` if a type is open. For methods, the method performs the same function. + A generic type or method is closed if instantiable types have been substituted for all its type parameters, including all the type parameters of all enclosing types. You can only create an instance of a generic type if it is closed. The property returns `true` if a type is open. For methods, the method performs the same function. ## Generating Closed Generic Types Once you have a generic type or method definition, use the method to create a closed generic type or the method to create a for a closed generic method. @@ -54,7 +54,7 @@ From the point of view of reflection, the difference between a generic type and For example, if you have a object representing `Dictionary` (`Dictionary(Of Integer, String)` in Visual Basic) and you want to create the type `Dictionary`, you can use the method to get a representing `Dictionary` and then use the method to produce a representing `Dictionary`. - For an example of an open generic type that is not a generic type, see "Type Parameter or Type Argument" later in this topic. + For an example of an open generic type that is not a generic type, see "Type Parameter or Type Argument" later in this topic. ## Examining Type Arguments and Type Parameters Use the method to obtain an array of objects that represent the type parameters or type arguments of a generic type, and use the method to do the same for a generic method. @@ -108,7 +108,7 @@ generic ref class D : B {}; To determine whether a type parameter is covariant or contravariant, apply the mask to the value that is returned by the property. If the result is , the type parameter is invariant. See [Covariance and Contravariance](../../standard/generics/covariance-and-contravariance.md). #### Special Constraints - To determine the special constraints of a type parameter, apply the mask to the value that is returned by the property. If the result is , there are no special constraints. A type parameter can be constrained to be a reference type, to be a non-nullable value type, and to have a parameterless constructor. + To determine the special constraints of a type parameter, apply the mask to the value that is returned by the property. If the result is , there are no special constraints. A type parameter can be constrained to be a reference type, to be a non-nullable value type, and to have a parameterless constructor. ## Invariants For a table of the invariant conditions for common terms in reflection for generic types, see . For additional terms relating to generic methods, see . diff --git a/docs/framework/reflection-and-codedom/reflection.md b/docs/framework/reflection-and-codedom/reflection.md index a9f82c634c984..61a5b5db1e078 100644 --- a/docs/framework/reflection-and-codedom/reflection.md +++ b/docs/framework/reflection-and-codedom/reflection.md @@ -61,7 +61,7 @@ For example, when you use the C# `typeof` operator (`GetType` in Visual Basic) t These runtime classes are `internal` (`Friend` in Visual Basic). They are not documented separately from their base classes, because their behavior is described by the base class documentation. - + ## Related Topics diff --git a/docs/framework/reflection-and-codedom/security-issues-in-reflection-emit.md b/docs/framework/reflection-and-codedom/security-issues-in-reflection-emit.md index 1649ef6fbcb03..ad4ac3e77c991 100644 --- a/docs/framework/reflection-and-codedom/security-issues-in-reflection-emit.md +++ b/docs/framework/reflection-and-codedom/security-issues-in-reflection-emit.md @@ -26,7 +26,7 @@ The .NET Framework provides three ways to emit Microsoft intermediate language ( > [!NOTE] > The permissions that are required for reflecting on code and emitting code have changed with succeeding releases of the .NET Framework. See [Version Information](#Version_Information), later in this topic. - + ## Dynamic Assemblies Dynamic assemblies are created by using overloads of the method. Most overloads of this method are deprecated in the .NET Framework 4, because of the elimination of machine-wide security policy. (See [Security Changes](../security/security-changes.md).) The remaining overloads can be executed by any code, regardless of trust level. These overloads fall into two groups: those that specify a list of attributes to apply to the dynamic assembly when it is created, and those that do not. If you do not specify the transparency model for the assembly, by applying the attribute when you create it, the transparency model is inherited from the emitting assembly. @@ -51,7 +51,7 @@ The .NET Framework provides three ways to emit Microsoft intermediate language ( - Debug symbols are not generated. (`Internet` and `LocalIntranet` permission sets do not include the necessary permissions.) - + ## Anonymously Hosted Dynamic Methods Anonymously hosted dynamic methods are created by using the two constructors that do not specify an associated type or module, and . These constructors place the dynamic methods in a system-provided, fully trusted, security-transparent assembly. No permissions are required to use these constructors or to emit code for the dynamic methods. @@ -84,7 +84,7 @@ The .NET Framework provides three ways to emit Microsoft intermediate language ( > [!NOTE] > Dynamic methods do not support debug symbols. - + ## Dynamic Methods Associated with Existing Assemblies To associate a dynamic method with a type or module in an existing assembly, use any of the constructors that specify the associated type or module. The permissions that are required to call these constructors vary, because associating a dynamic method with an existing type or module gives the dynamic method access to nonpublic types and members: @@ -129,7 +129,7 @@ The .NET Framework provides three ways to emit Microsoft intermediate language ( > [!NOTE] > Dynamic methods do not support debug symbols. - + ## Version Information Starting with the .NET Framework 4, machine-wide security policy is eliminated and security transparency becomes the default enforcement mechanism. See [Security Changes](../security/security-changes.md). From caaa808fc3705f4c4f82767af1b6b69141093918 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:35:12 -0400 Subject: [PATCH 16/18] fix: MD009 in docs/framework/resources --- .../resources/retrieving-resources-in-desktop-apps.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/framework/resources/retrieving-resources-in-desktop-apps.md b/docs/framework/resources/retrieving-resources-in-desktop-apps.md index ad8518de14ece..b239a0ab25fd3 100644 --- a/docs/framework/resources/retrieving-resources-in-desktop-apps.md +++ b/docs/framework/resources/retrieving-resources-in-desktop-apps.md @@ -23,7 +23,7 @@ ms.assetid: eca16922-1c46-4f68-aefe-e7a12283641f When you work with localized resources in .NET Framework desktop apps, you should ideally package the resources for the default or neutral culture with the main assembly and create a separate satellite assembly for each language or culture that your app supports. You can then use the class as described in the next section to access named resources. If you choose not to embed your resources in the main assembly and satellite assemblies, you can also access binary .resources files directly, as discussed in the section [Retrieving Resources from .resources files](#from_file) later in this article. To retrieve resources in Windows 8.x Store apps, see [Creating and retrieving resources in Windows Store apps](https://docs.microsoft.com/previous-versions/windows/apps/hh694557(v=vs.140)). - + ## Retrieving Resources from Assemblies The class provides access to resources at run time. You use the method to retrieve string resources and the or method to retrieve non-string resources. Each method has two overloads: @@ -137,13 +137,13 @@ GetObject.exe For more information about assembly versioning, see [Assembly Versioning](../../standard/assembly/versioning.md) and [How the Runtime Locates Assemblies](../deployment/how-the-runtime-locates-assemblies.md). - + ## Retrieving Resources from .resources Files If you choose not to deploy resources in satellite assemblies, you can still use a object to access resources from .resources files directly. To do this, you must deploy the .resources files correctly. Then you use the method to instantiate a object and specify the directory that contains the standalone .resources files. ### Deploying .resources Files - When you embed .resources files in an application assembly and satellite assemblies, each satellite assembly has the same file name, but is placed in a subdirectory that reflects the satellite assembly's culture. In contrast, when you access resources from .resources files directly, you can place all the .resources files in a single directory, usually a subdirectory of the application directory. The name of the app's default .resources file consists of a root name only, with no indication of its culture (for example, strings.resources). The resources for each localized culture are stored in a file whose name consists of the root name followed by the culture (for example, strings.ja.resources or strings.de-DE.resources). - + When you embed .resources files in an application assembly and satellite assemblies, each satellite assembly has the same file name, but is placed in a subdirectory that reflects the satellite assembly's culture. In contrast, when you access resources from .resources files directly, you can place all the .resources files in a single directory, usually a subdirectory of the application directory. The name of the app's default .resources file consists of a root name only, with no indication of its culture (for example, strings.resources). The resources for each localized culture are stored in a file whose name consists of the root name followed by the culture (for example, strings.ja.resources or strings.de-DE.resources). + The following illustration shows where resource files should be located in the directory structure. It also gives the naming conventions for .resource files. ![Illustration that shows the main directory for your application.](./media/retrieving-resources-in-desktop-apps/resource-application-directory.gif) @@ -166,7 +166,7 @@ Prompt=What is your name? Resources for the French (France) culture are stored in the following file, which is named Strings.fr-FR.txt: -```text +```text Greeting=Bon jour Prompt=Comment vous appelez-vous? ``` From 3f2c5756d422f9c352f61f9c1ce361b7c5a3f75a Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:36:43 -0400 Subject: [PATCH 17/18] fix: MD009 in docs/framework/tools --- ...-windows-forms-activex-control-importer.md | 2 +- ...ol-exe-code-access-security-policy-tool.md | 2 +- .../tools/lc-exe-license-compiler.md | 4 ++-- docs/framework/tools/mgmtclassgen-exe.md | 10 ++++----- ...anaged-profile-guided-optimization-tool.md | 2 +- ...svcs-exe-net-services-installation-tool.md | 2 +- .../resgen-exe-resource-file-generator.md | 22 +++++++++---------- docs/framework/tools/signtool-exe.md | 8 +++---- .../tools/sn-exe-strong-name-tool.md | 6 ++--- .../tools/tlbexp-exe-type-library-exporter.md | 2 +- .../tools/tlbimp-exe-type-library-importer.md | 6 ++--- 11 files changed, 33 insertions(+), 33 deletions(-) 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 e1cc845d5c88f..217601c0ba052 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 @@ -67,7 +67,7 @@ aximp [options]{file.dll | file.ocx} ## Example The following command generates MediaPlayer.dll and AxMediaPlayer.dll for the Media Player control `msdxm.ocx`. -```console +```console aximp c:\systemroot\system32\msdxm.ocx ``` diff --git a/docs/framework/tools/caspol-exe-code-access-security-policy-tool.md b/docs/framework/tools/caspol-exe-code-access-security-policy-tool.md index c18d68fa8c7f0..8cc7c0118a91f 100644 --- a/docs/framework/tools/caspol-exe-code-access-security-policy-tool.md +++ b/docs/framework/tools/caspol-exe-code-access-security-policy-tool.md @@ -113,7 +113,7 @@ caspol [options] Caspol.exe must be granted the equivalent of the **Everything** permission set to function. The tool has a protective mechanism that prevents policy from being modified in ways that would prevent Caspol.exe from being granted the permissions it needs to run. If you try to make such changes, Caspol.exe notifies you that the requested policy change will break the tool, and the policy change is rejected. You can turn this protective mechanism off for a given command by using the **–force** option. - + ## Manually Editing the Security Configuration Files Three security configuration files correspond to the three policy levels supported by Caspol.exe: one for the machine policy, one for a given user's policy, and one for the enterprise policy. These files are created on disk only when machine, user, or enterprise policy is changed using Caspol.exe. You can use the **–reset** option in Caspol.exe to save the default security policy to disk, if needed. diff --git a/docs/framework/tools/lc-exe-license-compiler.md b/docs/framework/tools/lc-exe-license-compiler.md index a7487062d60f2..d67e2d8456cb5 100644 --- a/docs/framework/tools/lc-exe-license-compiler.md +++ b/docs/framework/tools/lc-exe-license-compiler.md @@ -75,8 +75,8 @@ lc /target:myApp /complist:hostapplic.txt /complist:hostapplic2.txt /complist: h ```text /target:hostapp.exe -/complist:hostapplic.txt -/i:WFCPrj.dll +/complist:hostapplic.txt +/i:WFCPrj.dll /outdir:"C:\My Folder" ``` diff --git a/docs/framework/tools/mgmtclassgen-exe.md b/docs/framework/tools/mgmtclassgen-exe.md index f381c00930958..af9f030c35ffb 100644 --- a/docs/framework/tools/mgmtclassgen-exe.md +++ b/docs/framework/tools/mgmtclassgen-exe.md @@ -18,8 +18,8 @@ The Management Strongly Typed Class Generator tool enables you to quickly genera ## Syntax ```console -mgmtclassgen -WMIClass [options] +mgmtclassgen +WMIClass [options] ``` |Argument|Description| @@ -99,11 +99,11 @@ Imports System Imports System.Management Imports ROOT.CIMV2.Win32 -Public Class App - Public Shared Sub Main() +Public Class App + Public Shared Sub Main() ' Enumerate instances of the Win32_process. ' Print the Name property of the instance. - Dim ps As Process + Dim ps As Process For Each ps In Process.GetInstances() Console.WriteLine(ps.Name) Next ps diff --git a/docs/framework/tools/mpgo-exe-managed-profile-guided-optimization-tool.md b/docs/framework/tools/mpgo-exe-managed-profile-guided-optimization-tool.md index 109b1c2ff30f2..d40728f1487f0 100644 --- a/docs/framework/tools/mpgo-exe-managed-profile-guided-optimization-tool.md +++ b/docs/framework/tools/mpgo-exe-managed-profile-guided-optimization-tool.md @@ -98,7 +98,7 @@ mpgo –Scenario -AppID -Timeout - By default, Mpgo.exe is not on the Visual Studio build path. You must either add the path to Visual Studio or specify the full path on the Mpgo command line. You can use either the `–Scenario` or the `–Import` parameter in the post-build event in Visual Studio. However, the typical process is to use `–Scenario` one time from a Developer Command Prompt for Visual Studio, and then use `–Import` to update the optimized assemblies after each build; for example: `"C:\Program Files\Microsoft Visual Studio 11.0\Team Tools\Performance Tools\mpgo.exe" -import "$(OutDir)tmp" -assemblylist "$(TargetPath)" -outdir "$(OutDir)\"`. - + ## Examples The following Mpgo.exe command from a Developer Command Prompt for Visual Studio optimizes a tax application: diff --git a/docs/framework/tools/regsvcs-exe-net-services-installation-tool.md b/docs/framework/tools/regsvcs-exe-net-services-installation-tool.md index 42e3871d7e69c..fff2bb88b5e57 100644 --- a/docs/framework/tools/regsvcs-exe-net-services-installation-tool.md +++ b/docs/framework/tools/regsvcs-exe-net-services-installation-tool.md @@ -28,7 +28,7 @@ The .NET Services Installation tool performs the following actions: ```console regsvcs [/c | /fc | /u] [/tlb:typeLibraryFile] [/extlb] [/reconfig] [/componly] [/appname:applicationName] -[/nologo] [/quiet]assemblyFile.dll +[/nologo] [/quiet]assemblyFile.dll ``` ## Parameters diff --git a/docs/framework/tools/resgen-exe-resource-file-generator.md b/docs/framework/tools/resgen-exe-resource-file-generator.md index f19b82644f263..cc558e001e1c6 100644 --- a/docs/framework/tools/resgen-exe-resource-file-generator.md +++ b/docs/framework/tools/resgen-exe-resource-file-generator.md @@ -54,7 +54,7 @@ resgen /? ## Syntax ```console -resgen [-define:symbol1[,symbol2,...]] [/useSourcePath] filename.extension | /compile filename.extension... [outputFilename.extension] [/r:assembly] [/str:lang[,namespace[,class[,file]]] [/publicclass]] +resgen [-define:symbol1[,symbol2,...]] [/useSourcePath] filename.extension | /compile filename.extension... [outputFilename.extension] [/r:assembly] [/str:lang[,namespace[,class[,file]]] [/publicclass]] ``` ```console @@ -120,14 +120,14 @@ resgen filename.extension [outputDirectory] - [Generating a Strongly Typed Resource Class](resgen-exe-resource-file-generator.md#Strong) - + ### Compiling Resources into a Binary File The most common use of Resgen.exe is to compile a text-based resource file (a .txt or .restext file) or an XML-based resource file (a .resx file) into a binary .resources file. The output file then can be embedded in a main assembly by a language compiler or in a satellite assembly by [Assembly Linker (AL.exe)](al-exe-assembly-linker.md). The syntax to compile a resource file is: ```console -resgen inputFilename [outputFilename] +resgen inputFilename [outputFilename] ``` where the parameters are: @@ -143,7 +143,7 @@ resgen inputFilename [outputFilename] The following command reads the name/value pairs in Resources.txt and writes a binary .resources file named Resources.resources. Because the output file name is not specified explicitly, it receives the same name as the input file by default. ```console -resgen Resources.txt +resgen Resources.txt ``` The following command reads the name/value pairs in Resources.restext and writes a binary resources file named StringResources.resources. @@ -158,7 +158,7 @@ resgen Resources.restext StringResources.resources resgen Resources.resx Resources.resources ``` - + ### Converting Between Resource File Types In addition to compiling text-based or XML-based resource files into binary .resources files, Resgen.exe can convert any supported file type to any other supported file type. This means that it can perform the following conversions: @@ -193,7 +193,7 @@ resgen Resources.resx Resources.txt resgen Resources.resx Resources.restext ``` - + ### Compiling or Converting Multiple Files You can use the `/compile` switch to convert a list of resource files from one format to another in a single operation. The syntax is: @@ -207,7 +207,7 @@ resgen /compile filename.extension [filename.extension...] resgen /compile StringResources.txt TableResources.resx ImageResources.resx ``` - + ### Exporting Resources to a .resw File If you're developing a Windows 8.x Store app, you may want to use resources from an existing desktop app. However, the two kinds of applications support different file formats. In desktop apps, resources in text (.txt or .restext) or .resx files are compiled into binary .resources files. In Windows 8.x Store apps, .resw files are compiled into binary package resource index (PRI) files. You can use Resgen.exe to bridge this gap by extracting resources from an executable or a satellite assembly and writing them to one or more .resw files that can be used when developing a Windows 8.x Store app. @@ -234,7 +234,7 @@ resgen filename.extension [outputDirectory] resgen MyApp.exe Win8Resources ``` - + ### Conditionally Compiling Resources Starting with the .NET Framework 4.5, Resgen.exe supports conditional compilation of string resources in text (.txt and .restext) files. This enables you to use a single text-based resource file in multiple build configurations. @@ -244,7 +244,7 @@ resgen MyApp.exe Win8Resources ```text #ifdef PRODUCTION -AppTitle=My Software Company Project Manager +AppTitle=My Software Company Project Manager #endif #ifdef CONSULT AppTitle=My Consulting Company Project Manager @@ -263,7 +263,7 @@ resgen /define:CONSULT UIResources.restext This produces a .resources file that contains two string resources. The value of the `AppTitle` resource is "My Consulting Company Project Manager". - + ### Generating a Strongly Typed Resource Class Resgen.exe supports strongly typed resources, which encapsulates access to resources by creating classes that contain a set of static read-only properties. This provides an alternative to calling the methods of the class directly to retrieve resources. You can enable strongly typed resource support by using the `/str` option in Resgen.exe, which wraps the functionality of the class. When you specify the `/str` option, the output of Resgen.exe is a class that contains strongly typed properties that match the resources that are referenced in the input parameter. This class provides strongly typed read-only access to the resources that are available in the file processed. @@ -318,7 +318,7 @@ resgen inputFilename [outputFilename] /str:language[,namespace,[classname[,filen For example, the following command compiles a resource file named StringResources.txt into StringResources.resources and generates a class named `StringResources` in a Visual Basic source code file named StringResources.vb that can be used to access the Resource Manager. ```console -resgen StringResources.txt /str:vb,,StringResources +resgen StringResources.txt /str:vb,,StringResources ``` ## See also diff --git a/docs/framework/tools/signtool-exe.md b/docs/framework/tools/signtool-exe.md index 4eec3e2c9da0c..8492318b13cc7 100644 --- a/docs/framework/tools/signtool-exe.md +++ b/docs/framework/tools/signtool-exe.md @@ -44,7 +44,7 @@ signtool [command] [options] [file_name | ...] |**/v**|Displays verbose output regardless of whether the command runs successfully or fails, and displays warning messages.| |**/debug**|Displays debugging information.| - + ## catdb Command Options The following table lists the options that can be used with the `catdb` command. @@ -55,7 +55,7 @@ signtool [command] [options] [file_name | ...] |`/r`|Removes the specified catalogs from the catalog database. If this option is not specified, Sign Tool adds the specified catalogs to the catalog database.| |`/u`|Specifies that a unique name is automatically generated for the added catalog files. If necessary, the catalog files are renamed to prevent name conflicts with existing catalog files. If this option is not specified, Sign Tool overwrites any existing catalog that has the same name as the catalog being added.| - + ## sign Command Options The following table lists the options that can be used with the `sign` command. @@ -91,7 +91,7 @@ signtool [command] [options] [file_name | ...] For usage examples, see [Using SignTool to Sign a File](/windows/desktop/SecCrypto/using-signtool-to-sign-a-file). - + ## TimeStamp Command Options The following table lists the options that can be used with the `TimeStamp` command. @@ -105,7 +105,7 @@ signtool [command] [options] [file_name | ...] For a usage example, see [Adding Time Stamps to Previously Signed Files](/windows/desktop/SecCrypto/adding-time-stamps-to-previously-signed-files). - + ## Verify Command Options |Verify option|Description| diff --git a/docs/framework/tools/sn-exe-strong-name-tool.md b/docs/framework/tools/sn-exe-strong-name-tool.md index b9e2e530b28b7..11e63244f8054 100644 --- a/docs/framework/tools/sn-exe-strong-name-tool.md +++ b/docs/framework/tools/sn-exe-strong-name-tool.md @@ -22,7 +22,7 @@ The Strong Name tool (Sn.exe) helps sign assemblies with [strong names](../../st The Strong Name tool is automatically installed with Visual Studio. To start the tool, use the Developer Command Prompt (or the Visual Studio Command Prompt in Windows 7). For more information, see [Command Prompts](developer-command-prompt-for-vs.md). > [!NOTE] -> On 64-bit computers, run the 32-bit version of Sn.exe by using the Developer Command Prompt for Visual Studio and the 64-bit version by using the Visual Studio x64 Win64 Command Prompt. +> On 64-bit computers, run the 32-bit version of Sn.exe by using the Developer Command Prompt for Visual Studio and the 64-bit version by using the Visual Studio x64 Win64 Command Prompt. At the command prompt, type the following: @@ -57,7 +57,7 @@ sn [-quiet][option [parameter(s)]] |`-t[p] infile`|Displays the token for the public key stored in *infile*. The contents of *infile* must be a public key previously generated from a key pair file using **-p**. Do not use the **-t[p]** option to extract the token directly from a key pair file.

Sn.exe computes the token by using a hash function from the public key. To save space, the common language runtime stores public key tokens in the manifest as part of a reference to another assembly when it records a dependency to an assembly that has a strong name. The **-tp** option displays the public key in addition to the token. If the attribute has been applied to the assembly, the token is for the identity key, and the name of the hash algorithm and the identity key is displayed.

Note that this option does not verify the assembly signature and should not be used to make trust decisions. This option only displays the raw public key token data.| |`-T[p] assembly`|Displays the public key token for *assembly.* The *assembly* must be the name of a file that contains an assembly manifest.

Sn.exe computes the token by using a hash function from the public key. To save space, the runtime stores public key tokens in the manifest as part of a reference to another assembly when it records a dependency to an assembly that has a strong name. The **-Tp** option displays the public key in addition to the token. If the attribute has been applied to the assembly, the token is for the identity key, and the name of the hash algorithm and the identity key is displayed.

Note that this option does not verify the assembly signature and should not be used to make trust decisions. This option only displays the raw public key token data.| |`-TS assembly infile`|Test-signs the signed or partially signed *assembly* with the key pair in *infile*.| -|`-TSc assembly container`|Test-signs the signed or partially signed *assembly* with the key pair in the key container *container*.| +|`-TSc assembly container`|Test-signs the signed or partially signed *assembly* with the key pair in the key container *container*.| |`-v assembly`|Verifies the strong name in *assembly*, where *assembly* is the name of a file that contains an assembly manifest.| |`-vf assembly`|Verifies the strong name in *assembly.* Unlike the **-v** option, **-vf** forces verification even if it is disabled using the **-Vr** option.| |`-Vk regfile.reg assembly [userlist] [infile]`|Creates a registration entries (.reg) file you can use to register the specified assembly for verification skipping. The rules for assembly naming that apply to the **-Vr** option apply to **–Vk** as well. For information about the *userlist* and *infile* options, see the **–Vr** option.| @@ -77,7 +77,7 @@ sn [-quiet][option [parameter(s)]] > [!NOTE] > For parameters (for example, –**Vr)** that write to protected resources such as the registry, run SN.exe as an administrator. -The Strong Name tool assumes that public/private key pairs are generated with the `AT_SIGNATURE` algorithm identifier. Public/private key pairs generated with the `AT_KEYEXCHANGE` algorithm generate an error. +The Strong Name tool assumes that public/private key pairs are generated with the `AT_SIGNATURE` algorithm identifier. Public/private key pairs generated with the `AT_KEYEXCHANGE` algorithm generate an error. ## Examples The following command creates a new, random key pair and stores it in `keyPair.snk`. diff --git a/docs/framework/tools/tlbexp-exe-type-library-exporter.md b/docs/framework/tools/tlbexp-exe-type-library-exporter.md index 89eaf387e5d41..d17ecff2c9f53 100644 --- a/docs/framework/tools/tlbexp-exe-type-library-exporter.md +++ b/docs/framework/tools/tlbexp-exe-type-library-exporter.md @@ -73,7 +73,7 @@ tlbexp assemblyName [options] the following type library is generated: -```cpp +```cpp [id(0x60020004)] HRESULT StructUnkSafe([out, retval] SAFEARRAY(IUnknown*)* pRetVal); [id(0x60020005)] diff --git a/docs/framework/tools/tlbimp-exe-type-library-importer.md b/docs/framework/tools/tlbimp-exe-type-library-importer.md index 594b9110f1589..7d83523e9ce6f 100644 --- a/docs/framework/tools/tlbimp-exe-type-library-importer.md +++ b/docs/framework/tools/tlbimp-exe-type-library-importer.md @@ -71,16 +71,16 @@ tlbimp tlbFile [options] It is often useful or necessary to be able to assign [strong names](../../standard/assembly/strong-named.md) to assemblies. Therefore, Tlbimp.exe includes options for supplying the information necessary to generate strongly named assemblies. Both the **/keyfile:** and **/keycontainer:** options sign assemblies with strong names. Therefore, it is logical to supply only one of these options at a time. You can specify multiple reference assemblies by using the **/reference** option multiple times. - + Due to the way in which Tlbimp.exe generates assemblies, it is not possible to retarget an assembly to a different `mscorlib` version. For example, if you desire to generate an assembly that targets .NET Framework 2.0, the Tlbimp.exe shipped with the .NET Framework 2.0/3.0/3.5 SDK must be used. In order to target .NET Framework 4.x, the Tlbimp.exe shipped with a .NET Framework 4.x SDK should be used. - + A resource ID can optionally be appended to a type library file when importing a type library from a module containing multiple type libraries. Tlbimp.exe is able to locate this file only if it is in the current directory or if you specify the full path. See the example later in this topic. ## Examples The following command generates an assembly with the same name as the type library found in `myTest.tlb` and with the .dll extension. ```console -tlbimp myTest.tlb +tlbimp myTest.tlb ``` The following command generates an assembly with the name `myTest.dll`. From e8425f0c73c5391920e60c2251ee3f0fd23917a4 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 10 Mar 2020 18:37:15 -0400 Subject: [PATCH 18/18] fix: MD009 in docs/framework/ui-automation --- .../accessibility-best-practices.md | 38 +++++++++---------- .../caching-in-ui-automation-clients.md | 20 +++++----- ...e-ui-automation-provider-implementation.md | 4 +- ...ttern-mapping-for-ui-automation-clients.md | 2 +- ...-the-ui-automation-dock-control-pattern.md | 6 +-- ...-the-ui-automation-grid-control-pattern.md | 6 +-- ...-ui-automation-griditem-control-pattern.md | 6 +-- ...automation-multipleview-control-pattern.md | 6 +-- ...i-automation-rangevalue-control-pattern.md | 6 +-- ...he-ui-automation-scroll-control-pattern.md | 6 +-- ...i-automation-scrollitem-control-pattern.md | 6 +-- ...ui-automation-selection-control-pattern.md | 6 +-- ...utomation-selectionitem-control-pattern.md | 6 +-- ...the-ui-automation-table-control-pattern.md | 6 +-- ...ui-automation-tableitem-control-pattern.md | 6 +-- ...he-ui-automation-toggle-control-pattern.md | 6 +-- ...ui-automation-transform-control-pattern.md | 6 +-- ...the-ui-automation-value-control-pattern.md | 6 +-- ...he-ui-automation-window-control-pattern.md | 6 +-- docs/framework/ui-automation/index.md | 2 +- .../obtaining-ui-automation-elements.md | 14 +++---- ...xtpattern-and-embedded-objects-overview.md | 10 ++--- ...tion-and-microsoft-active-accessibility.md | 18 ++++----- .../ui-automation-and-screen-scaling.md | 4 +- ...automation-control-patterns-for-clients.md | 6 +-- ...ui-automation-control-patterns-overview.md | 8 ++-- .../ui-automation-control-types-overview.md | 4 +- .../ui-automation-events-for-clients.md | 2 +- .../ui-automation-events-overview.md | 6 +-- .../ui-automation/ui-automation-overview.md | 4 +- .../ui-automation-properties-overview.md | 8 ++-- .../ui-automation-providers-overview.md | 4 +- ...utomation-support-for-standard-controls.md | 6 +-- ...ion-support-for-the-button-control-type.md | 8 ++-- ...n-support-for-the-calendar-control-type.md | 8 ++-- ...n-support-for-the-checkbox-control-type.md | 8 ++-- ...n-support-for-the-combobox-control-type.md | 8 ++-- ...n-support-for-the-datagrid-control-type.md | 4 +- ...tion-support-for-the-group-control-type.md | 8 ++-- ...ion-support-for-the-header-control-type.md | 8 ++-- ...support-for-the-headeritem-control-type.md | 8 ++-- ...-support-for-the-hyperlink-control-type.md | 8 ++-- ...tion-support-for-the-image-control-type.md | 8 ++-- ...ation-support-for-the-list-control-type.md | 8 ++-- ...n-support-for-the-listitem-control-type.md | 8 ++-- ...ation-support-for-the-menu-control-type.md | 8 ++-- ...on-support-for-the-menubar-control-type.md | 8 ++-- ...ation-support-for-the-pane-control-type.md | 10 ++--- ...upport-for-the-progressbar-control-type.md | 8 ++-- ...upport-for-the-radiobutton-control-type.md | 8 ++-- ...-support-for-the-scrollbar-control-type.md | 8 ++-- ...-support-for-the-separator-control-type.md | 8 ++-- ...ion-support-for-the-slider-control-type.md | 8 ++-- ...on-support-for-the-spinner-control-type.md | 8 ++-- ...-support-for-the-statusbar-control-type.md | 8 ++-- ...mation-support-for-the-tab-control-type.md | 8 ++-- ...on-support-for-the-tabitem-control-type.md | 8 ++-- ...tion-support-for-the-table-control-type.md | 8 ++-- ...ation-support-for-the-text-control-type.md | 8 ++-- ...tion-support-for-the-thumb-control-type.md | 8 ++-- ...n-support-for-the-titlebar-control-type.md | 6 +-- ...on-support-for-the-toolbar-control-type.md | 8 ++-- ...on-support-for-the-tooltip-control-type.md | 8 ++-- ...ation-support-for-the-tree-control-type.md | 8 ++-- ...n-support-for-the-treeitem-control-type.md | 8 ++-- .../ui-automation-tree-overview.md | 8 ++-- 66 files changed, 255 insertions(+), 255 deletions(-) diff --git a/docs/framework/ui-automation/accessibility-best-practices.md b/docs/framework/ui-automation/accessibility-best-practices.md index 957ea08e4d97e..5604c02955fa4 100644 --- a/docs/framework/ui-automation/accessibility-best-practices.md +++ b/docs/framework/ui-automation/accessibility-best-practices.md @@ -12,61 +12,61 @@ ms.assetid: e6d5cd98-21a3-4b01-999c-fb953556d0e6 Implementing the following best practices in controls or applications will improve their accessibility for people who use assistive technology devices. Many of these best practices focus on good [!INCLUDE[TLA#tla_ui](../../../includes/tlasharptla-ui-md.md)] design. Each best practice includes implementation information for [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)] controls or applications. In many cases, the work to meet these best practices is already included in [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] controls. - + ## Programmatic Access Programmatic access involves ensuring that all [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] elements are labeled, property values are exposed, and appropriate events are raised. For standard [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] controls, most of this work is already done through . Custom controls require additional work to ensure that programmatic access is correctly implemented. - + ### Enable Programmatic Access to all UI Elements and Text User interface (UI) elements should enable programmatic access. If the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] is a standard [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] control, support for programmatic access is included in the control. If the control is a custom control – a control that has been subclassed from a common control or a control that has been subclassed from Control – then you must check the implementation for areas that may need modification. Following this best practice allows assistive technology vendors to identify and manipulate elements of your product's [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)]. - + ### Place Names, Titles, and Descriptions on UI Objects, Frames, and Pages Assistive technologies, especially screen readers, use the title to understand the location of the frame, object, or page in the navigation scheme. Therefore, the title must be very descriptive. For example, a Web page title of "Microsoft Web Page" is useless if the user has navigated deeply into some particular area. A descriptive title is critical for users who are blind and depend on screen readers. Similarly, for [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)] controls, and are important for assistive technology devices. Following this best practice allows assistive technologys to identify and manipulate [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] in sample controls and applications. - + ### Ensure Programmatic Events Are Triggered by All UI Activities Following this best practice allows assistive technologys to listen for changes in the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] and notify the user about these changes. - + ## User Settings The best practice in this section ensures that controls or applications do not override user settings. - + ### Respect All System-Wide Settings and Do Not Interfere with Accessibility Functions Users can use the Control Panel to set some system-wide flags; other flags can be set programmatically. These settings should not be changed by controls or applications. Also, applications must support the accessibility settings of their host operating system. Following this best practice allows users to set accessibility settings and know that those settings will not be changed by applications. - + ## Visual UI Design Best Practices in this section ensure that controls or applications use color and images effectively and are able to be used by Assistive technologies. - + ### Don't Hard-Code Colors People who are color blind, have low vision, or are using a black and white screen might not be able to use applications with hard-coded colors. Following this best practice allows users to adjust color combinations based on individual needs. - + ### Support High Contrast and all System Display Attributes Applications should not disrupt or disable user-selected, system-wide contrast settings, color selections, or other system-wide display settings and attributes. System-wide settings adopted by a user enhance the accessibility of applications, so they should not be disabled or disregarded by applications. Color should be used in their correct foreground-on-background combination to provide proper contrast. Unrelated colors should not be mixed, and colors should not be reversed. Many users require specific high-contrast combinations, such as white text on a black background. Drawing these reversed, as black text on a white background causes the background to bleed over the foreground and can make reading difficult for some users. - + ### Ensure All UI Correctly Scales by Any DPI Setting Ensure that all [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] can correctly scale by any dots per inch (dpi) setting. Also, ensure that [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] elements fit in a screen of 1024 x 768 with 120 dots per inch (dpi). - + ## Navigation Best Practices in this section ensure that navigation has been addressed for controls and applications. - + ### Provide Keyboard Interface for All UI Elements Tab stops, especially when carefully planned, give users another way to navigate the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)]. @@ -76,7 +76,7 @@ ms.assetid: e6d5cd98-21a3-4b01-999c-fb953556d0e6 - logical tab order - + ### Show the Keyboard Focus Users need to know which object has the keyboard focus so that they can anticipate the effect of their keystrokes. To highlight the keyboard focus, use colors, fonts, or graphics such as rectangles or magnification. To audibly highlight the keyboard focus, change the volume, pitch or tonal quality. @@ -90,7 +90,7 @@ ms.assetid: e6d5cd98-21a3-4b01-999c-fb953556d0e6 - selections and/or focused items should be visually highlighted - + ### Support Navigation Standards and Powerful Navigation Schemes Different aspects of keyboard navigation provide different ways for users to navigate the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)]. @@ -102,25 +102,25 @@ ms.assetid: e6d5cd98-21a3-4b01-999c-fb953556d0e6 - all menu items have an access key; all buttons have accelerator keys, all commands have an accelerator key. - + ### Do Not Let Mouse Location Interfere with Keyboard Navigation Mouse location should not interfere with keyboard navigation. For example, if the mouse is positioned someplace and the user is navigating with the keyboard, a mouse click should not happen unless initiated by the user. - + ## Multimodal Interface Best Practices in this section ensure that application [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] includes alternatives for visual elements. - + ### Provide User-Selectable Equivalents for Non-Text Elements For each non-text element, provide a user-selectable equivalent for text, transcripts, or audio descriptions, such as alt text, captions, or visual feedback. Non-text elements cover a wide range of [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] elements including: images, image map regions, animations, applets, frames, scripts, graphical buttons, sounds, stand-alone audio files and video. Non-text elements are important when they contain visual information, speech, or general audio information that the user needs access to in order to understand the content of the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)]. - + ### Use Color but Also Provide Alternatives to Color Use color to enhance, emphasize, or reiterate information shown by other means, but do not communicate information by using color alone. Users who are color blind or have a monochrome display need alternatives to color. - + ### Use Standard Input APIs with Device-Independent Calls Device-independent calls ensure keyboard and mouse feature equality, while providing assistive technology with needed information about the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)]. diff --git a/docs/framework/ui-automation/caching-in-ui-automation-clients.md b/docs/framework/ui-automation/caching-in-ui-automation-clients.md index be77fa7fbb2e6..fa065fab592bc 100644 --- a/docs/framework/ui-automation/caching-in-ui-automation-clients.md +++ b/docs/framework/ui-automation/caching-in-ui-automation-clients.md @@ -22,31 +22,31 @@ ms.assetid: 94c15031-4975-43cc-bcd5-c9439ed21c9c The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties and control patterns of an element can be cached. - + ## Options for Caching The specifies the following options for caching. - + ### Properties to Cache You can specify properties to cache by calling for each property before activating the request. - + ### Control Patterns to Cache You can specify control patterns to cache by calling for each pattern before activating the request. When a pattern is cached, its properties are not automatically cached; you must specify the properties you want cached by using . - + ### Scope and Filtering of Caching You can specify the elements whose properties and patterns you want to cache by setting the property before activating the request. The scope is relative to the elements that are retrieved while the request is active. For example, if you set only , and then retrieve an , the properties and patterns of children of that element are cached, but not those of the element itself. To ensure that caching is done for the retrieved element itself, you must include in the property. It is not possible to set the scope to or . However, a parent element can be cached when a child element is cached; see Retrieving Cached Children and Parents in this topic. The extent of caching is also affected by the property. By default, caching is performed only for elements that appear in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree. However, you can change this property to apply caching to all elements, or only to elements that appear in the content view. - + ### Strength of the Element References When you retrieve an , by default you have access to all properties and patterns of that element, including those that were not cached. However, for greater efficiency you can specify that the reference to the element refers to cached data only, by setting the property of the to . In this case, you do not have access to any non-cached properties and patterns of retrieved elements. This means that you cannot access any properties through or the `Current` property of or any control pattern; nor can you retrieve a pattern by using or . On cached patterns, you can call methods that retrieve array properties, such as , but not any that perform actions on the control, such as . An example of an application that might not need full references to objects is a screen reader, which would prefetch the and properties of elements in a window but would not need the objects themselves. - + ## Activating the CacheRequest Caching is performed only when objects are retrieved while a is active for the current thread. There are two ways to activate a . @@ -54,7 +54,7 @@ ms.assetid: 94c15031-4975-43cc-bcd5-c9439ed21c9c Another way, which is useful when you wish to nest cache requests, is to call . This puts the request on a stack and activates it. The request remains active until it is removed from the stack by . The request becomes temporarily inactive if another request is pushed onto the stack; only the top request on the stack is active. - + ## Retrieving Cached Properties You can retrieve the cached properties of an element through the following methods and properties. @@ -66,7 +66,7 @@ ms.assetid: 94c15031-4975-43cc-bcd5-c9439ed21c9c , like , exposes individual properties as members of a structure. However, you do not need to retrieve this structure; you can access the individual properties directly. For example, the property can be obtained from `element.Cached.Name`, where `element` is an . - + ## Retrieving Cached Control Patterns You can retrieve the cached control patterns of an element through the following methods. @@ -78,7 +78,7 @@ ms.assetid: 94c15031-4975-43cc-bcd5-c9439ed21c9c You can retrieve the cached properties of a control pattern by using the `Cached` property of the pattern object. You can also retrieve the current values through the `Current` property, but only if was not specified when the was retrieved. ( is the default value, and this permits access to the current values.) - + ## Retrieving Cached Children and Parents When you retrieve an and request caching for children of that element through the property of the request, it is subsequently possible to get the child elements from the property of the element you retrieved. @@ -87,7 +87,7 @@ ms.assetid: 94c15031-4975-43cc-bcd5-c9439ed21c9c > [!NOTE] > You cannot cache parents or ancestors of the root element of the request. - + ## Updating the Cache The cache is valid only as long as nothing changes in the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)]. Your application is responsible for updating the cache, typically in response to events. diff --git a/docs/framework/ui-automation/client-side-ui-automation-provider-implementation.md b/docs/framework/ui-automation/client-side-ui-automation-provider-implementation.md index 8f0c40139a2d4..f594883940b8c 100644 --- a/docs/framework/ui-automation/client-side-ui-automation-provider-implementation.md +++ b/docs/framework/ui-automation/client-side-ui-automation-provider-implementation.md @@ -23,11 +23,11 @@ ms.assetid: 3584c0a1-9cd0-4968-8b63-b06390890ef6 Applications can also register other client-side providers. - + ## Distributing Client-Side Providers [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] expects to find client-side providers in a managed-code assembly. The namespace in this assembly should have the same name as the assembly. For example, an assembly called ContosoProxies.dll would contain the ContosoProxies namespace. Within the namespace, create a class. In the implementation of the static field, create an array of structures describing the providers. - + ## Registering and Configuring Client-Side Providers Client-side providers in a dynamic-link library (DLL) are loaded by calling . No further action is required by a client application to make use of the providers. diff --git a/docs/framework/ui-automation/control-pattern-mapping-for-ui-automation-clients.md b/docs/framework/ui-automation/control-pattern-mapping-for-ui-automation-clients.md index 5845d813f7f4c..9a5239604f2d7 100644 --- a/docs/framework/ui-automation/control-pattern-mapping-for-ui-automation-clients.md +++ b/docs/framework/ui-automation/control-pattern-mapping-for-ui-automation-clients.md @@ -23,7 +23,7 @@ ms.assetid: 8b81645b-8be3-4e26-9c98-4fb0fceca06b > [!NOTE] > Some controls have conditional support for several control patterns depending on the functionality of the control. For example, the menu item control has conditional support for the , , , or control pattern, depending on its function in the menu control. - + ## UI Automation Control Patterns for Clients |Control Type|Supported|Conditional Support|Not Supported| diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-dock-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-dock-control-pattern.md index fddb68e151ad5..3fdff8220f0ee 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-dock-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-dock-control-pattern.md @@ -18,7 +18,7 @@ ms.assetid: ea3d2212-7c8e-4dd7-bf08-73141ca2d4fb ![Docking container with two docked children.](./media/uia-dockpattern-dockingexample.PNG "UIA_DockPattern_DockingExample") Docking Example from Visual Studio Where "Class View" Window Is DockPosition.Right and "Error List" Window Is DockPosition.Bottom - + ## Implementation Guidelines and Conventions When implementing the Dock control pattern, note the following guidelines and conventions: @@ -30,7 +30,7 @@ Docking Example from Visual Studio Where "Class View" Window Is DockPosition.Rig - On a multi-monitor system, controls should dock to the left or right side of the current monitor. If that is not possible, they should dock to the left side of the leftmost monitor or the right side of the rightmost monitor. - + ## Required Members for IDockProvider The following properties and methods are required for implementing the IDockProvider interface. @@ -41,7 +41,7 @@ Docking Example from Visual Studio Where "Class View" Window Is DockPosition.Rig This control pattern has no associated events. - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-grid-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-grid-control-pattern.md index db260f9123b01..a6014c01392e3 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-grid-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-grid-control-pattern.md @@ -15,7 +15,7 @@ ms.assetid: 234d11a0-7ce7-4309-8989-2f4720e02f78 The control pattern is used to support controls that act as containers for a collection of child elements. The children of this element must implement and be organized in a two-dimensional logical coordinate system that can be traversed by row and column. For examples of controls that implement this control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing the Grid control pattern, note the following guidelines and conventions: @@ -36,7 +36,7 @@ Example of a Grid Control with Empty Coordinates - Use a to track traversal through the items or cells of a grid. - + ## Required Members for IGridProvider The following properties and methods are required for implementing the IGridProvider interface. @@ -48,7 +48,7 @@ Example of a Grid Control with Empty Coordinates This control pattern has no associated events. - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-griditem-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-griditem-control-pattern.md index deeb616b36352..780c2d0e22702 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-griditem-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-griditem-control-pattern.md @@ -15,7 +15,7 @@ ms.assetid: bffbae08-fe2a-42fd-ab84-f37187518916 The control pattern is used to support individual child controls of containers that implement . For examples of controls that implement this control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing , note the following guidelines and conventions: @@ -27,7 +27,7 @@ ms.assetid: bffbae08-fe2a-42fd-ab84-f37187518916 - Controls that implement can typically be traversed (that is, a UI Automation client can move to adjacent controls) by using the keyboard. - + ## Required Members for IGridItemProvider The following properties and methods are required for implementing . @@ -41,7 +41,7 @@ ms.assetid: bffbae08-fe2a-42fd-ab84-f37187518916 This control pattern has no associated methods or events. - + ## Exceptions This control pattern has no associated exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-multipleview-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-multipleview-control-pattern.md index 22d5ffde94be0..3ba0c283e5ad4 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-multipleview-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-multipleview-control-pattern.md @@ -17,7 +17,7 @@ ms.assetid: 5bf1b248-ffee-48c8-9613-0b134bbe9f6a Examples of controls that can present multiple views include the list view (which can show its contents as thumbnails, tiles, icons, or details), Microsoft Excel charts (pie, line, bar, cell value with a formula), Microsoft Word documents (normal, Web layout, print layout, reading layout, outline), Microsoft Outlook calendar (year, month, week, day), and Microsoft Windows Media Player skins. The supported views are determined by the control developer and are specific to each control. - + ## Implementation Guidelines and Conventions When implementing the Multiple View control pattern, note the following guidelines and conventions: @@ -29,7 +29,7 @@ ms.assetid: 5bf1b248-ffee-48c8-9613-0b134bbe9f6a - View names must be suitable for use in Text to Speech, Braille, and other human-readable applications. - + ## Required Members for IMultipleViewProvider The following properties and methods are required for implementing IMultipleViewProvider. @@ -42,7 +42,7 @@ ms.assetid: 5bf1b248-ffee-48c8-9613-0b134bbe9f6a There are no events associated with this control pattern. - + ## Exceptions Provider must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-rangevalue-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-rangevalue-control-pattern.md index a28e3c677bf9f..945d2bc643ab0 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-rangevalue-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-rangevalue-control-pattern.md @@ -15,7 +15,7 @@ ms.assetid: 225feaa4-918e-418b-938e-7389338d0a69 The control pattern is used to support controls that can be set to a value within a range. For examples of controls that implement this control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing the Range Value control pattern, note the following guidelines and conventions: @@ -26,7 +26,7 @@ ms.assetid: 225feaa4-918e-418b-938e-7389338d0a69 ![Progress bar.](./media/uia-rangevaluepattern-progress-bar.PNG "UIA_RangeValuePattern_Progress_Bar") Example of a Progress Bar Where Value Is of Type Integer and Minimum and Maximum Property Values Are Normalized to 0 and 100, Respectively - + ## Required Members for IRangeValueProvider |Required member|Member type|Notes| @@ -41,7 +41,7 @@ Example of a Progress Bar Where Value Is of Type Integer and Minimum and Maximum This control pattern has no associated events. - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-scroll-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-scroll-control-pattern.md index 51248d94c1c10..c3a30a3828956 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-scroll-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-scroll-control-pattern.md @@ -20,7 +20,7 @@ Example of a Scrolling Control that Does Not Use Scrollbars For examples of controls that implement this control, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing the Scroll control pattern, note the following guidelines and conventions: @@ -36,7 +36,7 @@ Example of a Scrolling Control that Does Not Use Scrollbars - is locale-specific. Setting HorizontalScrollPercent = 100.0 must set the scrolling location of the control to the equivalent of its rightmost position for languages such as English that read left to right. Alternately, for languages such as Arabic that read right to left, setting HorizontalScrollPercent = 100.0 must set the scroll location to the leftmost position. - + ## Required Members for IScrollProvider The following properties and methods are required for implementing . @@ -53,7 +53,7 @@ Example of a Scrolling Control that Does Not Use Scrollbars This control pattern has no associated events. - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-scrollitem-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-scrollitem-control-pattern.md index 193c0841e657e..3145a2e7b435f 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-scrollitem-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-scrollitem-control-pattern.md @@ -15,13 +15,13 @@ ms.assetid: 903bab5c-80c1-44d7-bdc2-0a418893b987 The control pattern is used to support individual child controls of containers that implement . This control pattern acts as a communication channel between a child control and its container to ensure that the container can change the currently visible content (or region) within its viewport to display the child control. For examples of controls that implement this control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing the Scroll Item control pattern, note the following guidelines and conventions: - Items contained within a Window or Canvas control are not required to implement the IScrollItemProvider interface. As an alternative, however, they must expose a valid location for the . This will allow a UI Automation client application to use the control pattern methods on the container to display the child item. - + ## Required Members for IScrollItemProvider The following method is required for implementing the IScrollProvider interface. @@ -31,7 +31,7 @@ ms.assetid: 903bab5c-80c1-44d7-bdc2-0a418893b987 This control pattern has no associated properties or events. - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-selection-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-selection-control-pattern.md index 14a276f2fa86d..68fd0e27fc9c7 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-selection-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-selection-control-pattern.md @@ -15,7 +15,7 @@ ms.assetid: 449c3068-a5d6-4f66-84c6-1bcc7dd4d209 The control pattern is used to support controls that act as containers for a collection of selectable child items. The children of this element must implement . For examples of controls that implement this control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing the Selection control pattern, note the following guidelines and conventions: @@ -30,7 +30,7 @@ Example of Color Swatch String Mapping - Menus do not support . If you are working with menu items that include both graphics and text (such as the **Preview Pane** items in the **View** menu in Microsoft Outlook) and need to convey state, you should implement . - + ## Required Members for ISelectionProvider The following properties, methods, and events are required for the interface. @@ -43,7 +43,7 @@ Example of Color Swatch String Mapping The and properties can be dynamic. For example, the initial state of a control might not have any items selected by default, indicating that is `false`. However, after an item is selected, the control must always have at least one item selected. Similarly, in rare cases, a control might allow multiple items to be selected on initialization, but subsequently allow only single selections to be made. - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-selectionitem-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-selectionitem-control-pattern.md index 6fe73ebe3e276..36e39482ded18 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-selectionitem-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-selectionitem-control-pattern.md @@ -15,13 +15,13 @@ ms.assetid: 76b0949a-5b23-4cfc-84cc-154f713e2e12 The control pattern is used to support controls that act as individual, selectable child items of container controls that implement . For examples of controls that implement the SelectionItem control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md) - + ## Implementation Guidelines and Conventions When implementing the Selection Item control pattern, note the following guidelines and conventions: - Single-selection controls that manage child controls that implement , such as the **Screen Resolution** slider in the **Display Properties** dialog box, should implement and their children should implement both and . - + ## Required Members for ISelectionItemProvider The following properties, methods, and events are required for implementing . @@ -34,7 +34,7 @@ ms.assetid: 76b0949a-5b23-4cfc-84cc-154f713e2e12 - If the result of a , an , or a is a single selected item, an should be raised; otherwise send / as appropriate. - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-table-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-table-control-pattern.md index 2b2705ab159f4..54e7c1a56332c 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-table-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-table-control-pattern.md @@ -15,7 +15,7 @@ ms.assetid: 880cd85c-aa8c-4fb5-9369-45491d34bb78 The control pattern is used to support controls that act as containers for a collection of child elements. The children of this element must implement and be organized in a two-dimensional logical coordinate system that can be traversed by row and column. This control pattern is analogous to , with the distinction that any control implementing must also expose a column and/or row header relationship for each child element. For examples of controls that implement this control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing the Table control pattern, note the following guidelines and conventions: @@ -36,7 +36,7 @@ Example of a Table with Complex Column Headers ![Table with ambiguous RowOrColumnMajor property.](./media/uia-tablepattern-roworcolumnmajorproperty.PNG "UIA_TablePattern_RowOrColumnMajorProperty") Example of a Table with Ambiguous RowOrColumnMajor Property - + ## Required Members for ITableProvider The following properties and methods are required for the ITableProvider interface. @@ -48,7 +48,7 @@ Example of a Table with Ambiguous RowOrColumnMajor Property This control pattern has no associated events. - + ## Exceptions This control pattern has no associated exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-tableitem-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-tableitem-control-pattern.md index 185c4a5267727..7676d5136f156 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-tableitem-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-tableitem-control-pattern.md @@ -15,12 +15,12 @@ ms.assetid: ac178408-1485-436f-8d3e-eee3bf80cb24 The control pattern is used to support child controls of containers that implement . Access to individual cell functionality is provided by the required concurrent implementation of . This control pattern is analogous to with the distinction that any control implementing must programmatically expose the relationship between the individual cell and its row and column information. For examples of controls that implement this control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions - For related grid item functionality, see [Implementing the UI Automation GridItem Control Pattern](implementing-the-ui-automation-griditem-control-pattern.md). - + ## Required Members for ITableItemProvider |Required member|Member type|Notes| @@ -30,7 +30,7 @@ ms.assetid: ac178408-1485-436f-8d3e-eee3bf80cb24 This control pattern has no associated properties or events. - + ## Exceptions This control pattern has no associated exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-toggle-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-toggle-control-pattern.md index 3e8c8c9184a3e..65f7521e9c8f7 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-toggle-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-toggle-control-pattern.md @@ -15,7 +15,7 @@ ms.assetid: 3cfe875f-b0c0-413d-9703-5f14e6a1a30e The control pattern is used to support controls that can cycle through a set of states and maintain a state once set. For examples of controls that implement this control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing the Toggle control pattern, note the following guidelines and conventions: @@ -27,7 +27,7 @@ ms.assetid: 3cfe875f-b0c0-413d-9703-5f14e6a1a30e - The RadioButton control does not implement , as it is not capable of cycling through its valid states. - + ## Required Members for IToggleProvider The following properties and methods are required for implementing . @@ -38,7 +38,7 @@ ms.assetid: 3cfe875f-b0c0-413d-9703-5f14e6a1a30e This control pattern has no associated events. - + ## Exceptions This control pattern has no associated exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-transform-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-transform-control-pattern.md index e599c17a4d8e9..7d1336027f7aa 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-transform-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-transform-control-pattern.md @@ -15,7 +15,7 @@ ms.assetid: 5f49d843-5845-4800-9d9c-56ce0d146844 The control pattern is used to support controls that can be moved, resized, or rotated within a two-dimensional space. For examples of controls that implement this control pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing the Transform control pattern, note the following guidelines and conventions: @@ -27,7 +27,7 @@ ms.assetid: 5f49d843-5845-4800-9d9c-56ce0d146844 - All parameters and property values are absolute and independent of locale. - + ## Required Members for ITransformProvider The following properties and methods are required for implementing . @@ -42,7 +42,7 @@ ms.assetid: 5f49d843-5845-4800-9d9c-56ce0d146844 This control pattern has no associated events. - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-value-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-value-control-pattern.md index bbcf0cd9c0474..c6d4619cc7d53 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-value-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-value-control-pattern.md @@ -15,7 +15,7 @@ ms.assetid: b0fcdd87-3add-4345-bca9-e891205e02ba The control pattern is used to support controls that have an intrinsic value not spanning a range and that can be represented as a string. This string can be editable, depending on the control and its settings. For examples of controls that implement this pattern, see [Control Pattern Mapping for UI Automation Clients](control-pattern-mapping-for-ui-automation-clients.md). - + ## Implementation Guidelines and Conventions When implementing the Value control pattern, note the following guidelines and conventions: @@ -37,7 +37,7 @@ Example of Color Swatch String Mapping - A control should have its set to `true` and its set to `false` before allowing a call to . - + ## Required Members for IValueProvider The following properties and methods are required for implementing . @@ -47,7 +47,7 @@ Example of Color Swatch String Mapping ||Property|None| ||Method|None| - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/implementing-the-ui-automation-window-control-pattern.md b/docs/framework/ui-automation/implementing-the-ui-automation-window-control-pattern.md index 3f0db3be450b9..381f7082e73b9 100644 --- a/docs/framework/ui-automation/implementing-the-ui-automation-window-control-pattern.md +++ b/docs/framework/ui-automation/implementing-the-ui-automation-window-control-pattern.md @@ -15,7 +15,7 @@ ms.assetid: a28cb286-296e-4a62-b4cb-55ad636ebccc The control pattern is used to support controls that provide fundamental window-based functionality within a traditional graphical user interface (GUI). Examples of controls that must implement this control pattern include top-level application windows, multiple-document interface (MDI) child windows, resizable split pane controls, modal dialogs and balloon help windows. - + ## Implementation Guidelines and Conventions When implementing the Window control pattern, note the following guidelines and conventions: @@ -29,7 +29,7 @@ ms.assetid: a28cb286-296e-4a62-b4cb-55ad636ebccc - Full-screen mode is not supported by IWindowProvider as it is feature-specific to an application and is not typical window behavior. - + ## Required Members for IWindowProvider The following properties, methods, and events are required for the IWindowProvider interface. @@ -48,7 +48,7 @@ ms.assetid: a28cb286-296e-4a62-b4cb-55ad636ebccc ||Event|None| ||Event|Is not guaranteed to be | - + ## Exceptions Providers must throw the following exceptions. diff --git a/docs/framework/ui-automation/index.md b/docs/framework/ui-automation/index.md index 97a2c37b298c7..d217c7c2d9542 100644 --- a/docs/framework/ui-automation/index.md +++ b/docs/framework/ui-automation/index.md @@ -28,4 +28,4 @@ ms.assetid: e7ec856e-41ee-47b1-9d57-b75a3dad088c ## Related sections -- [Accessibility Samples](https://github.com/Microsoft/WPF-Samples/tree/master/Accessibility) +- [Accessibility Samples](https://github.com/Microsoft/WPF-Samples/tree/master/Accessibility) diff --git a/docs/framework/ui-automation/obtaining-ui-automation-elements.md b/docs/framework/ui-automation/obtaining-ui-automation-elements.md index 18ff09e68bc64..820556f1dfb7a 100644 --- a/docs/framework/ui-automation/obtaining-ui-automation-elements.md +++ b/docs/framework/ui-automation/obtaining-ui-automation-elements.md @@ -15,7 +15,7 @@ ms.assetid: c2caaf45-e59c-42a1-bc9b-77a6de520171 > [!CAUTION] > If your client application might attempt to find elements in its own user interface, you must make all [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] calls on a separate thread. For more information, see [UI Automation Threading Issues](ui-automation-threading-issues.md). - + ## Root Element All searches for objects must have a starting-place. This can be any element, including the desktop, an application window, or a control. @@ -24,7 +24,7 @@ ms.assetid: c2caaf45-e59c-42a1-bc9b-77a6de520171 > [!CAUTION] > In general, you should try to obtain only direct children of the . A search for descendants may iterate through hundreds or even thousands of elements, possibly resulting in a stack overflow. If you are attempting to obtain a specific element at a lower level, you should start your search from the application window or from a container at a lower level. - + ## Conditions For most techniques you can use to retrieve [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] elements, you must specify a , which is a set of criteria defining what elements you want to retrieve. @@ -36,7 +36,7 @@ ms.assetid: c2caaf45-e59c-42a1-bc9b-77a6de520171 Conditions can be combined using Boolean logic by constructing objects of types , , and . - + ## Search Scope Searches done by using or must have a scope as well as a starting-place. @@ -44,17 +44,17 @@ ms.assetid: c2caaf45-e59c-42a1-bc9b-77a6de520171 The scope of a search is defined by a bitwise combination of values from the enumeration. - + ## Finding a Known Element To find a known element, identified by its , , or some other property or combination of properties, it is easiest to use the method. If the element sought is an application window, the starting-point of the search can be the . This way of finding [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] elements is most useful in automated testing scenarios. - + ## Finding Elements in a Subtree To find all elements meeting specific criteria that are related to a known element, you can use . For example, you could use this method to retrieve list items or menu items from a list or menu, or to identify all controls in a dialog box. - + ## Walking a Subtree If you have no prior knowledge of the applications that your client may be used with, you can construct a subtree of all elements of interest by using the class. Your application might do this in response to a focus-changed event; that is, when an application or control receives input focus, the UI Automation client examines children and perhaps all descendants of the focused element. @@ -72,7 +72,7 @@ ms.assetid: c2caaf45-e59c-42a1-bc9b-77a6de520171 The method can be used for navigating to an element in the subtree from another element that is not part of the view. For example, suppose you have created a view of a subtree by using . Your application then receives notification that a scroll bar has received the input focus. Because a scroll bar is not a content element, it is not present in your view of the subtree. However, you can pass the representing the scroll bar to and retrieve the nearest ancestor that is in the content view. - + ## Other Ways to Retrieve an Element In addition to searches and navigation, you can retrieve an in the following ways. diff --git a/docs/framework/ui-automation/textpattern-and-embedded-objects-overview.md b/docs/framework/ui-automation/textpattern-and-embedded-objects-overview.md index 287f17fb4c040..1094f64cdad03 100644 --- a/docs/framework/ui-automation/textpattern-and-embedded-objects-overview.md +++ b/docs/framework/ui-automation/textpattern-and-embedded-objects-overview.md @@ -16,7 +16,7 @@ ms.assetid: 93fdfbb9-0025-4b72-8ca0-0714adbb70d5 In [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] an embedded object is any element that has non-textual boundaries; for example, an image, hyperlink, table, or document type such as an Microsoft Excel spreadsheet or Microsoft Windows Media file. This differs from the standard definition, where an element is created in one application and embedded, or linked, within another. Whether the object can be edited within its original application is irrelevant in the context of [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)]. - + ## Embedded Objects and the UI Automation Tree Embedded objects are treated as individual elements within the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree. They are exposed as children of the text container so that they can be accessed through the same model as other controls in [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)]. @@ -26,7 +26,7 @@ Example of a Text Container with Table, Image, and Hyperlink Embedded Objects ![Content view for the preceding example](./media/uia-textpattern-embedded-objects-overview-example2.PNG "UIA_TextPattern_Embedded_Objects_Overview_Example2") Example of the Content View for a Portion of the Preceding Text Container - + ## Expose Embedded Objects Using TextPattern and TextPatternRange Used in conjunction, the control pattern class and the class expose methods and properties that facilitate navigation and querying of embedded objects. @@ -48,7 +48,7 @@ Example of a text stream with embedded objects and their range spans ![Range adjustments by Move & ExpandToEnclosingUnit](./media/uia-textpattern-moveandexpand-examples.png "UIA_TextPattern_MoveAndExpand_Examples") Examples of how a text range is adjusted for Move() and ExpandToEnclosingUnit() - + ## Common Scenarios The following sections present examples of the most common scenarios that involve embedded objects. @@ -91,7 +91,7 @@ Examples of how a text range is adjusted for Move() and ExpandToEnclosingUnit() ||Returns the innermost that encloses the text range; in this case, the that represents the text provider itself.| | with parameters of (TextUnit.Word, 1).|Moves the text range span to "http" since the text of the hyperlink is comprised of individual words. In this case, the hyperlink is not treated as a single object.

The URL {[http]} is embedded in text.| - + ### Image **Example 1 - A text range that contains an embedded image** @@ -114,7 +114,7 @@ Examples of how a text range is adjusted for Move() and ExpandToEnclosingUnit() ||Returns the innermost that encloses the text range; in this case, the that represents the text provider itself.| | with parameters of (TextUnit.Word, 1).|Moves the text range span to "is ". Because only text-based embedded objects are considered part of the text stream, the image in this example does not affect Move or its return value (1 in this case).| - + ### Table ### Table used for examples diff --git a/docs/framework/ui-automation/ui-automation-and-microsoft-active-accessibility.md b/docs/framework/ui-automation/ui-automation-and-microsoft-active-accessibility.md index c1428d5d5fca3..fb477575264b2 100644 --- a/docs/framework/ui-automation/ui-automation-and-microsoft-active-accessibility.md +++ b/docs/framework/ui-automation/ui-automation-and-microsoft-active-accessibility.md @@ -16,15 +16,15 @@ ms.assetid: 87bee662-0a3e-4232-a421-20e7a5968321 This topic includes the main features of [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] and explains how these features differ from Active Accessibility. - + ## Programming Languages + ## Support in Windows Presentation Foundation Windows Presentation Foundation (WPF) is the new model for creating user interfaces. WPF elements do not contain native support for Active Accessibility; however, they do support [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)], which includes bridging support for Active Accessibility clients. Only clients written specifically for [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] can take full advantage of the accessibility features of WPF, such as the rich support for text. - + ## Servers and Clients In Active Accessibility, servers and clients communicate directly, largely through the server's implementation of `IAccessible`. @@ -32,13 +32,13 @@ ms.assetid: 87bee662-0a3e-4232-a421-20e7a5968321 UI Automation providers can provide information to Active Accessibility clients, and Active Accessibility servers can provide information to UI Automation client applications. However, because Active Accessibility does not expose as much information as [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)], the two models are not fully compatible. - + ## UI Elements Active Accessibility presents [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] elements either as an `IAccessible` interface or as a child identifier. It is difficult to compare two `IAccessible` pointers to determine if they refer to the same element. In [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)], every element is represented as an object. Comparison is done by using the equality operator or the method, both of which compare the unique runtime identifiers of the elements. - + ## Tree Views and Navigation The [!INCLUDE[TLA#tla_ui](../../../includes/tlasharptla-ui-md.md)] elements on the screen can be seen as a tree structure with the desktop as the root, application windows as immediate children, and elements within applications as further descendants. @@ -52,7 +52,7 @@ ms.assetid: 87bee662-0a3e-4232-a421-20e7a5968321 Navigation in [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] is more consistent than in Active Accessibility. Some elements such as drop-down lists and pop-up windows appear twice in the Active Accessibility tree, and navigation from them may have unexpected results. It is actually impossible to properly implement Active Accessibility for a rebar control. [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] enables reparenting and repositioning, so that an element can be placed anywhere in the tree despite the hierarchy imposed by ownership of windows. - + ## Roles and Control Types Active Accessibility uses the `accRole` property (`IAccessible::get_actRole`) to retrieve a description of the element's role in the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)], such as ROLE_SYSTEM_SLIDER or ROLE_SYSTEM_MENUITEM. The role of an element is the main clue to its available functionality. Interaction with a control is achieved by using fixed methods such as `IAccessible::accSelect` and `IAccessible::accDoDefaultAction`. The interaction between the client application and the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] is limited to what can be done through `IAccessible`. @@ -106,7 +106,7 @@ ms.assetid: 87bee662-0a3e-4232-a421-20e7a5968321 For more information about the different control types, see [UI Automation Control Types](ui-automation-control-types.md). - + ## States and Properties In Active Accessibility, elements support a common set of properties, and some properties (such as `accState`) must describe very different things, depending on the element's role. Servers must implement all methods of `IAccessible` that return a property, even those that are not relevant to the element. @@ -172,7 +172,7 @@ ms.assetid: 87bee662-0a3e-4232-a421-20e7a5968321 For a complete list of [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] property identifiers, see [UI Automation Properties Overview](ui-automation-properties-overview.md). - + ## Events The event mechanism in [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)], unlike that in Active Accessibility, does not rely on Windows event routing (which is closely tied in with window handles) and does not require the client application to set up hooks. Subscriptions to events can be fine-tuned not just to particular events but to particular parts of the tree. Providers can also fine-tune their raising of events by keeping track of what events are being listened for. @@ -237,7 +237,7 @@ ms.assetid: 87bee662-0a3e-4232-a421-20e7a5968321 |No equivalent| event| |No equivalent|| - + ## Security Some `IAccessible` customization scenarios require wrapping a base `IAccessible` and calling through to it. This has security implications, since a partially trusted component should not be an intermediary on a code path. diff --git a/docs/framework/ui-automation/ui-automation-and-screen-scaling.md b/docs/framework/ui-automation/ui-automation-and-screen-scaling.md index 29d9cbc9251e0..d98191d115fd1 100644 --- a/docs/framework/ui-automation/ui-automation-and-screen-scaling.md +++ b/docs/framework/ui-automation/ui-automation-and-screen-scaling.md @@ -17,7 +17,7 @@ ms.assetid: 4380cad7-e509-448f-b9a5-6de042605fd4 Starting with Windows Vista, Windows enables users to change the dots per inch (dpi) setting so that most user interface (UI) elements on the screen appear larger. Although this feature has long been available in Windows, in previous versions the scaling had to be implemented by applications. Starting with Windows Vista, the Desktop Window Manager performs default scaling for all applications that do not handle their own scaling. UI Automation client applications must take this feature into account. - + ## Scaling in Windows Vista The default dpi setting is 96, which means that 96 pixels occupy a width or height of one notional inch. The exact measure of an "inch" depends on the size and physical resolution of the monitor. For example, on a monitor 12 inches wide, at a horizontal resolution of 1280 pixels, a horizontal line of 96 pixels extends about 9/10 of an inch. @@ -34,7 +34,7 @@ Starting with Windows Vista, Windows enables users to change the dots per inch ( Logical coordinates are important, because they make the behavior of the operating system and applications consistent regardless of the dpi setting. For example, normally returns the logical coordinates. If you move the cursor over an element in a dialog box, the same coordinates are returned regardless of the dpi setting. If you draw a control at (100, 100), it is drawn to those logical coordinates, and will occupy the same relative position at any dpi setting. - + ## Scaling in UI Automation Clients The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] API does not use logical coordinates. The following methods and properties either return physical coordinates or take them as parameters. diff --git a/docs/framework/ui-automation/ui-automation-control-patterns-for-clients.md b/docs/framework/ui-automation/ui-automation-control-patterns-for-clients.md index f0b9cfaea48cc..fa6e3cc5e9271 100644 --- a/docs/framework/ui-automation/ui-automation-control-patterns-for-clients.md +++ b/docs/framework/ui-automation/ui-automation-control-patterns-for-clients.md @@ -16,7 +16,7 @@ ms.assetid: 571561d8-5f49-43a9-a054-87735194e013 For a complete list of control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). - + ## Getting Control Patterns Clients retrieve a control pattern from an by calling either or . @@ -26,13 +26,13 @@ ms.assetid: 571561d8-5f49-43a9-a054-87735194e013 [!code-csharp[UIATextPattern_snip#1037](../../../samples/snippets/csharp/VS_Snippets_Wpf/UIATextPattern_snip/CSharp/SearchWindow.cs#1037)] - + ## Retrieving Properties on Control Patterns Clients can retrieve the property values on control patterns by calling either or and casting the object returned to an appropriate type. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). In addition to the `GetPropertyValue` methods, property values can be retrieved through the common language runtime (CLR) accessors to access the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties on a pattern. - + ## Controls with Variable Patterns Some control types support different patterns depending on their state or the manner in which the control is being used. Examples of controls that can have variable patterns are list views (thumbnails, tiles, icons, list, details), Microsoft Excel Charts (Pie, Line, Bar, Cell Value with a formula), Microsoft Word's document area (Normal, Web Layout, Outline, Print Layout, Print Preview), and Microsoft Windows Media Player skins. diff --git a/docs/framework/ui-automation/ui-automation-control-patterns-overview.md b/docs/framework/ui-automation/ui-automation-control-patterns-overview.md index 3981cdb86f084..69d3c858e816f 100644 --- a/docs/framework/ui-automation/ui-automation-control-patterns-overview.md +++ b/docs/framework/ui-automation/ui-automation-control-patterns-overview.md @@ -17,7 +17,7 @@ ms.assetid: cc229b33-234b-469b-ad60-f0254f32d45d > [!NOTE] > Aggregate controls—built with child controls that provide the [!INCLUDE[TLA#tla_ui](../../../includes/tlasharptla-ui-md.md)] for functionality exposed by the parent—should implement all control patterns normally associated with each child control. In turn, those same control patterns are not required to be implemented by the child controls. - + ## UI Automation Control Pattern Components Control patterns support the methods, properties, events, and relationships needed to define a discrete piece of functionality available in a control. @@ -29,7 +29,7 @@ ms.assetid: cc229b33-234b-469b-ad60-f0254f32d45d Control patterns relate to [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] as interfaces relate to Component Object Model (COM) objects. In COM, you can query an object to ask what interfaces it supports and then use those interfaces to access functionality. In [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)], UI Automation clients can ask a control which control patterns it supports and then interact with the control through the properties, methods, events, and structures exposed by the supported control patterns. For example, for a multiline edit box, UI Automation providers implement . When a client knows that an supports the control pattern, it can use the properties, methods, and events exposed by that control pattern to manipulate the control, or access information about the control. - + ## UI Automation Providers and Clients UI Automation providers implement control patterns to expose the appropriate behavior for a specific piece of functionality supported by the control. @@ -37,11 +37,11 @@ ms.assetid: cc229b33-234b-469b-ad60-f0254f32d45d Clients use methods (such as or ) or the common language runtime (CLR) accessors to access the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties on a pattern. Each control pattern class has a field member (for example, or ) that identifies that control pattern and can be passed as a parameter to or to retrieve that pattern for an . - + ## Dynamic Control Patterns Some controls do not always support the same set of control patterns. Control patterns are considered supported when they are available to a UI Automation client. For example, a multiline edit box enables vertical scrolling only when it contains more lines of text than can be displayed in its viewable area. Scrolling is disabled when enough text is removed so that scrolling is no longer required. For this example, the ScrollPattern control pattern is dynamically supported depending on the current state of the control (how much text is in the edit box). - + ## Control Pattern Classes and Interfaces The following table describes the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns. The table also lists the classes used by UI Automation clients to access the control patterns, as well as the interfaces used by UI Automation providers to implement them. diff --git a/docs/framework/ui-automation/ui-automation-control-types-overview.md b/docs/framework/ui-automation/ui-automation-control-types-overview.md index 608a4100a0adf..64468f8a078e0 100644 --- a/docs/framework/ui-automation/ui-automation-control-types-overview.md +++ b/docs/framework/ui-automation/ui-automation-control-types-overview.md @@ -14,7 +14,7 @@ ms.assetid: 75159ef8-bd43-4d13-acb7-1f1fe9253160 Having a well-known identifier makes it easier for assistive technology devices to determine what types of controls are available in the [!INCLUDE[TLA#tla_ui](../../../includes/tlasharptla-ui-md.md)] and how to interact with the controls. - + ## UI Automation Control Type Requisites [!INCLUDE[TLA#tla_uiautomation](../../../includes/tlasharptla-uiautomation-md.md)] control types provide a set of conditions that providers must meet. When these conditions are met, the control can use the specific control type name. Each control type has conditions for the following: @@ -26,7 +26,7 @@ ms.assetid: 75159ef8-bd43-4d13-acb7-1f1fe9253160 When a control meets the conditions for a particular control type, the property value will indicate that control type. - + ## Current UI Automation Control Types The following list contains the current set of [!INCLUDE[TLA#tla_uiautomation](../../../includes/tlasharptla-uiautomation-md.md)] control types: diff --git a/docs/framework/ui-automation/ui-automation-events-for-clients.md b/docs/framework/ui-automation/ui-automation-events-for-clients.md index 58b61f39e2e13..f906a025cf6a8 100644 --- a/docs/framework/ui-automation/ui-automation-events-for-clients.md +++ b/docs/framework/ui-automation/ui-automation-events-for-clients.md @@ -21,7 +21,7 @@ ms.assetid: b909e388-3f24-4997-b6d4-bd9c35c2dc27 For a broader view of [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events, see [UI Automation Events Overview](ui-automation-events-overview.md). - + ## Subscribing to Events Client applications subscribe to events of a particular kind by registering an event handler, using one of the following methods. diff --git a/docs/framework/ui-automation/ui-automation-events-overview.md b/docs/framework/ui-automation/ui-automation-events-overview.md index 80f71b38710f5..9034a6d2b790e 100644 --- a/docs/framework/ui-automation/ui-automation-events-overview.md +++ b/docs/framework/ui-automation/ui-automation-events-overview.md @@ -18,7 +18,7 @@ ms.assetid: 69eebd8b-39ed-40e7-93cc-4457c4caf746 Efficiency is improved by allowing provider applications to raise events selectively, depending on whether any clients are subscribed to those events, or not at all, if no clients are listening for any events. - + ## Types of Events [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events fall into the following categories. @@ -41,7 +41,7 @@ ms.assetid: 69eebd8b-39ed-40e7-93cc-4457c4caf746 - `TextChangedEvent` - + ## UI Automation Event Identifiers [!INCLUDE[TLA#tla_uiautomation](../../../includes/tlasharptla-uiautomation-md.md)] events are identified by objects. The property contains a value that uniquely identifies the kind of event. @@ -56,7 +56,7 @@ ms.assetid: 69eebd8b-39ed-40e7-93cc-4457c4caf746 |||| |||| - + ## UI Automation Event Arguments The following classes encapsulate event arguments. diff --git a/docs/framework/ui-automation/ui-automation-overview.md b/docs/framework/ui-automation/ui-automation-overview.md index 0a3450a71722d..f89d9df2547b7 100644 --- a/docs/framework/ui-automation/ui-automation-overview.md +++ b/docs/framework/ui-automation/ui-automation-overview.md @@ -24,7 +24,7 @@ UI Automation provides full functionality on supported Windows operating systems UI Automation providers offer some support for Microsoft Active Accessibility client applications through a built-in bridging service. - + ## Providers and Clients [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] has four main components, as shown in the following table. @@ -55,7 +55,7 @@ UI Automation provides full functionality on supported Windows operating systems ||UIAutomationClientUIAutomationTypes|Developers of UI Automation providers for frameworks other than [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)]; used to implement the TextPattern control pattern.| ||PresentationFramework|Developers of UI Automation providers for [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)].| - + ## UI Automation Model [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] exposes every piece of the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] to client applications as an . Elements are contained in a tree structure, with the desktop as the root element. Clients can filter the raw view of the tree as a control view or a content view. Applications can also create custom views. diff --git a/docs/framework/ui-automation/ui-automation-properties-overview.md b/docs/framework/ui-automation/ui-automation-properties-overview.md index fa9845006fcf9..36faf02b9cbeb 100644 --- a/docs/framework/ui-automation/ui-automation-properties-overview.md +++ b/docs/framework/ui-automation/ui-automation-properties-overview.md @@ -18,7 +18,7 @@ ms.assetid: a6c31d7b-b33e-49b3-b5c1-31a345f9b7c8 - [Server-Side UI Automation Provider Implementation](server-side-ui-automation-provider-implementation.md) - + ## Property Identifiers Every property is identified by a number and a name. The names of properties are used only for debugging and diagnosis. Providers use the numeric IDs to identify incoming property requests. Client applications, however, only use , which encapsulates the number and name, to identify properties they wish to retrieve. @@ -45,7 +45,7 @@ ms.assetid: a6c31d7b-b33e-49b3-b5c1-31a345f9b7c8 |Value and read/write capabilities of an element that has a value||| |Capabilities and state of a window||| - + ## Properties by Category The following tables categorize the properties whose IDs are found in and . These properties are common to all controls. All but a few of them are likely to be static over the lifetime of the provider application; most dynamic properties are associated with control patterns. @@ -129,7 +129,7 @@ ms.assetid: a6c31d7b-b33e-49b3-b5c1-31a345f9b7c8 ||| ||| - + ## Localization [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] providers should present the following properties in the language of the operating system: @@ -143,7 +143,7 @@ ms.assetid: a6c31d7b-b33e-49b3-b5c1-31a345f9b7c8 - - + ## Properties and Events Closely tied in with the properties in [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] is the concept of property-changed events. For dynamic properties, the client application needs a way to know that a property value has changed, so that it can update its cache of information or react to the new information in some other way. diff --git a/docs/framework/ui-automation/ui-automation-providers-overview.md b/docs/framework/ui-automation/ui-automation-providers-overview.md index bd179dfd478ff..cf29cba45f1f7 100644 --- a/docs/framework/ui-automation/ui-automation-providers-overview.md +++ b/docs/framework/ui-automation/ui-automation-providers-overview.md @@ -16,7 +16,7 @@ ms.assetid: 859557b8-51e1-4d15-92e8-318d2dcdb2f7 This topic provides an overview of how control developers implement [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] providers, particularly for controls in Windows Forms and Win32 windows. - + ## Types of Providers UI Automation providers fall into two categories: client-side providers and server-side providers. @@ -30,7 +30,7 @@ ms.assetid: 859557b8-51e1-4d15-92e8-318d2dcdb2f7 Server-side providers communicate with client applications across the process boundary by exposing interfaces to the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] core system, which in turn serves requests from clients. - + ## UI Automation Provider Concepts This section provides brief explanations of some of the key concepts you need to understand in order to implement UI Automation providers. diff --git a/docs/framework/ui-automation/ui-automation-support-for-standard-controls.md b/docs/framework/ui-automation/ui-automation-support-for-standard-controls.md index 1d548373e8bbc..7dd66a1111278 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-standard-controls.md +++ b/docs/framework/ui-automation/ui-automation-support-for-standard-controls.md @@ -12,11 +12,11 @@ ms.assetid: 3770ea8a-2655-4add-9c59-fe0610ad5084 This topic contains information about [!INCLUDE[TLA#tla_uiautomation](../../../includes/tlasharptla-uiautomation-md.md)] support for standard controls in applications developed for the [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)], Win32, and Windows Forms frameworks. - + ## Windows Presentation Foundation Controls All [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] control elements that provide information or support for user interaction have full native support for [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)]. Other elements, such as panels, are not visible to [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)]. - + ## Win32 Controls Most Win32 controls are exposed to [!INCLUDE[TLA#tla_uiautomation](../../../includes/tlasharptla-uiautomation-md.md)] through client-side providers in UIAutomationClientsideProviders.dll. This assembly is automatically registered for use with UI Automation client applications. @@ -86,7 +86,7 @@ ms.assetid: 3770ea8a-2655-4add-9c59-fe0610ad5084 |ScrollBar (when used as a standalone control)|Slider| |SuperGrid|Custom| - + ## Windows Forms Controls Windows Forms controls are exposed to [!INCLUDE[TLA#tla_uiautomation](../../../includes/tlasharptla-uiautomation-md.md)] through client-side providers in UIAutomationClientsideProviders.dll. This assembly is automatically registered for use with UI Automation client applications. diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-button-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-button-control-type.md index e16008fe62a2b..003bd48f3d86a 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-button-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-button-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 057c983a-da83-4c50-86c7-26fe381076a6 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Button control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all button controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to button controls and describes what can be contained in each view. For more information about the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 057c983a-da83-4c50-86c7-26fe381076a6 |------------------|------------------| |Button

- Image (0 or more)
- Text (0 or more)|Button| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to the controls that implement the Button control type (such as button controls). For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -44,7 +44,7 @@ ms.assetid: 057c983a-da83-4c50-86c7-26fe381076a6 ||"button"|Localized string corresponding to the Button control type.| ||See notes.|The name of the button control is the text that is used to label it. Whenever an image is used to label a button, alternate text must be supplied for the button's Name property.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all button controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -54,7 +54,7 @@ ms.assetid: 057c983a-da83-4c50-86c7-26fe381076a6 ||See notes.|All buttons should support the Invoke control pattern or the Toggle control pattern. Toggle is supported if the button can be cycled through a series of up to three states. Typically this is seen as an on/off switch for specific features.| ||See notes.|When a button is hosted as a child of a split button, the child button can support the ExpandCollapse pattern instead of the Invoke or Toggle pattern. The ExpandCollapse pattern can be used for opening or closing a menu or other sub-structure associated with the button element.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all button controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-calendar-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-calendar-control-type.md index 45afa5b65008f..158c4a918686b 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-calendar-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-calendar-control-type.md @@ -17,7 +17,7 @@ ms.assetid: e91a7393-a7f9-4838-a1a6-857438b24bc9 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Calendar control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all calendar controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to calendar controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: e91a7393-a7f9-4838-a1a6-857438b24bc9 Calendar controls can be represented in many different forms within the user interface. The only guaranteed controls to be in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree are the data grid, header, header item, and list item controls. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to the calendar controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -44,7 +44,7 @@ ms.assetid: e91a7393-a7f9-4838-a1a6-857438b24bc9 ||"calendar"|Localized string corresponding to the Calendar control type.| ||See notes.|The calendar control typically gets its name from the current day’s date.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all calendar controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -56,7 +56,7 @@ ms.assetid: e91a7393-a7f9-4838-a1a6-857438b24bc9 ||Yes|The calendar control always has a header within its subtree for the days of the week, so the Table pattern must be supported.| ||No|The Value control pattern is not necessary for calendar controls because you cannot set the value directly on the control. If a specific date is associated with the control, the information should be provided by the Selection control pattern.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all calendar controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-checkbox-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-checkbox-control-type.md index 9a0c6c27921da..d26ef468223bf 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-checkbox-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-checkbox-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 9c2a0e70-3a39-4ba9-96ea-a7fe531fae9f The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the CheckBox control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all check box controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to check box controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -44,7 +44,7 @@ ms.assetid: 9c2a0e70-3a39-4ba9-96ea-a7fe531fae9f ||"check box"|Localized string corresponding to the CheckBox control type.| ||See notes.|The value of the check box control's `Name` property is the text that is displayed beside the box that maintains the toggle state.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all check box controls. For more information about control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -52,7 +52,7 @@ ms.assetid: 9c2a0e70-3a39-4ba9-96ea-a7fe531fae9f |---------------------|-------------|-----------| ||Required|Allows the check box to be cycled through its internal states programmatically.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all check box controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). @@ -65,7 +65,7 @@ ms.assetid: 9c2a0e70-3a39-4ba9-96ea-a7fe531fae9f ||Required|None| | property-changed event.|Required|None| - + ## Default Action The default action of the check box is to cause a radio button to become focused and toggle its current state. As mentioned previously, check boxes either present a binary (Yes/No) (On/Off) decision to the user or a tertiary (On, Off, Indeterminate). If the check box is binary the default action causes the "on" state to become "off" or the "off" state to become "on". In a tertiary state check box the default action cycles through the states of the check box in the same order as if the user had sent successive mouse clicks to the control. diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-combobox-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-combobox-control-type.md index 913fd801d20bc..e19b38cc62db2 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-combobox-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-combobox-control-type.md @@ -17,7 +17,7 @@ ms.assetid: bb321126-4770-41da-983a-67b7b89d45dd The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the ComboBox control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all combo box controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to combo box controls and describes what can be contained in each view. For more information about the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: bb321126-4770-41da-983a-67b7b89d45dd The edit control in the control view of the combo box is necessary only if the combo box can be edited to take any input, as is the case of the combo box in the Run dialog box. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to combo box controls. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -45,7 +45,7 @@ ms.assetid: bb321126-4770-41da-983a-67b7b89d45dd ||"combo box"|Localized string corresponding to the ComboBox control type.| ||See notes.|The combo box control typically gets its name from a static text control.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all combo box controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -56,7 +56,7 @@ ms.assetid: bb321126-4770-41da-983a-67b7b89d45dd ||Depends|If the combo box has the ability to take arbitrary text values, the Value pattern must be supported. This pattern provides the ability to programmatically set the string contents of the combo box. If the Value pattern is not supported, this indicates that the user must make a selection from the list items within the subtree of the combo box.| ||Never|The Scroll pattern is never supported on a combo box directly. It is supported if a list box contained within a combo box can scroll. It may only be supported when the list box is visible on the screen.| - + ## Required Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all combo box controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-datagrid-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-datagrid-control-type.md index 1b4068a303e98..0bc27615b1ae7 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-datagrid-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-datagrid-control-type.md @@ -24,7 +24,7 @@ ms.assetid: a3db4a3f-feb5-4e5f-9b42-aae7fa816e8a |------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------| |DataGrid

  • Header (0, 1, or 2)

    • HeaderItem (number of columns or rows)
  • DataItem (0 or more; can be structured in hierarchy)
|DataGrid

- DataItem (0 or more; can be structured in hierarchy)| - + ## Required UI Automation Properties The following table lists the properties whose value or definition is especially relevant to data grid controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -61,7 +61,7 @@ ms.assetid: a3db4a3f-feb5-4e5f-9b42-aae7fa816e8a - Table Item control pattern - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all data grid controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-group-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-group-control-type.md index cf4f0d7c4820b..4d51217069315 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-group-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-group-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 18e01bab-01f8-4567-b867-88dce9c4a435 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Group control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all group controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to group controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: 18e01bab-01f8-4567-b867-88dce9c4a435 Typically group controls will have the [UI Automation Support for the ListItem Control Type](ui-automation-support-for-the-listitem-control-type.md), [UI Automation Support for the TreeItem Control Type](ui-automation-support-for-the-treeitem-control-type.md), or [UI Automation Support for the DataItem Control Type](ui-automation-support-for-the-dataitem-control-type.md) control types found underneath them in the subtree. Because 'Group' is a generic container, it is possible for any type of control to be under the Group control in the tree. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to group controls. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -44,7 +44,7 @@ ms.assetid: 18e01bab-01f8-4567-b867-88dce9c4a435 ||True|The group control is always included in the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| ||True|The calendar group is always included in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported for the Group control type. For more information about control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -52,7 +52,7 @@ ms.assetid: 18e01bab-01f8-4567-b867-88dce9c4a435 |---------------------|-------------|-----------| ||Depends|Group controls that can be used to show or hide information must support the Expand Collapse pattern.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all group controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-header-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-header-control-type.md index 1d8d2778386fc..099db5c8f1f54 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-header-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-header-control-type.md @@ -17,7 +17,7 @@ ms.assetid: d2e48891-2dbe-409e-8655-2f753908e29b The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Header control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all header controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to header controls and describes what can be contained in each view. For more information about the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -29,7 +29,7 @@ ms.assetid: d2e48891-2dbe-409e-8655-2f753908e29b Header controls have zero children in the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to header controls. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -47,7 +47,7 @@ ms.assetid: d2e48891-2dbe-409e-8655-2f753908e29b ||False|The header control is not included in the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| ||True|The header control is always included in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all header controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -55,7 +55,7 @@ ms.assetid: d2e48891-2dbe-409e-8655-2f753908e29b |---------------------|-------------|-----------| ||Depends|Implement this control pattern if the header control can be resized.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all header controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-headeritem-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-headeritem-control-type.md index 4c7025bb88ea4..e041619b5ef87 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-headeritem-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-headeritem-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 09ce1310-ee31-493c-a71e-010bafc42fcf Header item controls are examples of controls that implement the HeaderItem control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements in the following sections apply to all header controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to header item controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 09ce1310-ee31-493c-a71e-010bafc42fcf |------------------|------------------| |HeaderItem|None| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to header item controls. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -43,7 +43,7 @@ ms.assetid: 09ce1310-ee31-493c-a71e-010bafc42fcf ||True|The header item control is always included in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| ||See notes.|This property provides information for sort orders by the header item.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all header item controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -52,7 +52,7 @@ ms.assetid: 09ce1310-ee31-493c-a71e-010bafc42fcf ||Depends|Implement this control pattern if the header item control can be resized.| ||Depends|Implement this control pattern if the header item control can be clicked to sort the data.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all header item controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-hyperlink-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-hyperlink-control-type.md index 985509847aa93..28feff9dc42ab 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-hyperlink-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-hyperlink-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 110cceea-5932-4955-a1a6-13afc51422b2 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Hyperlink control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all hyperlink controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to hyperlinks controls and describes what can be contained in each view. For more information about the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 110cceea-5932-4955-a1a6-13afc51422b2 |------------------|------------------| |Hyperlink|Hyperlink| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to the Hyperlink control type. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -43,7 +43,7 @@ ms.assetid: 110cceea-5932-4955-a1a6-13afc51422b2 ||True|The hyperlink control is always included in the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| ||True|The hyperlink control is always included in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| - + ## Required UI Automation Control Patterns and Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all hyperlink controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -53,7 +53,7 @@ ms.assetid: 110cceea-5932-4955-a1a6-13afc51422b2 ||Depends|Hyperlink controls should support the Value control pattern when the link contains information that is usable and meaningful to the user.| ||For example, `"https://www...."`|A URL for an Internet or Intranet address is an example of a hyperlink that contains information that is meaningful to the user. A programmatic link, however, is meaningful only to an application and is not recommended for the Value property.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all hyperlink controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-image-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-image-control-type.md index a2c357e3b27ad..dc563119703ab 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-image-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-image-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 4e0eeefb-e09b-46d2-b83b-0a7e35543ab8 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Image control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all image controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to image controls and describes what can be contained in each view. For more information about the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 4e0eeefb-e09b-46d2-b83b-0a7e35543ab8 |------------------|------------------| |Image|Image (Depends whether the image contains information (based on the value of `IsContentElement` property))| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to the Image control type. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -44,7 +44,7 @@ ms.assetid: 4e0eeefb-e09b-46d2-b83b-0a7e35543ab8 ||See notes.|The HelpText property exposes a localized string which describes the actual visual appearance of the control (for example, a red square with a white ‘X’) or other tooltip information associated with the image.

This property must be supported when a long description is needed to convey more information about the image control. For example, a complicated chart or diagram. This property maps to the HTML LongDesc tag and the Scalable Vector Graphics (SVG) Desc tag. Developers working with image controls must support a property to allow the visual description to be set on the control. This property must be mapped to the UI Automation VisualDescription property.| ||See notes.|If the image control represents state information about a particular item on the screen, the control should be contained within the item. When the image is contained within an item the item must support the status property and raise appropriate notifications when the status changes.

If an image is a standalone control and is conveying status this property must be supported.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all image controls. For more information about control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -55,7 +55,7 @@ ms.assetid: 4e0eeefb-e09b-46d2-b83b-0a7e35543ab8 ||Never|If the image control contains a clickable image, the control should support a control type that supports the Invoke pattern, such as the Button control type.| ||Never|Image controls should not support the Selection Item pattern.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all image controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-list-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-list-control-type.md index 50f4194b5897d..2fdd311382e82 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-list-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-list-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 0e959fcb-50f2-413b-948d-7167d279bc11 The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements in the following sections apply to all controls that implement the List control type, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. List container controls are an example of controls that implement the List control type. - + ## Required UI Automation Tree Structure The following table depicts the two views of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertain to list controls and describes what can be contained in each view. The control view contains only elements that are controls, and the content view removes redundant information from the tree. For example, a text control used to label a combo box will be exposed as the `ComboBox NameProperty`. Because the text control is already exposed in this manner through the control view it is unnecessary to have it exposed twice; therefore it is removed from the content view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -44,7 +44,7 @@ A list control must not have items that have a hierarchical relationship other t The selectable items within the list control will be available from the descendants in the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree of the list control. All items within the list control must belong to the same selection group. The selectable items in the list should be exposed as ListItem (instead of DataItem) control types. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to list controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -63,7 +63,7 @@ A list control must not have items that have a hierarchical relationship other t ||True|If the container can accept keyboard input then this property value should be true.| ||See notes.|The Help text for list controls should explain why the user is being asked to make a choice from a list of options. For example, "Selection an item from this list will set the display resolution for your monitor."| - + ## Required UI Automation Control Patterns and Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by list controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -77,7 +77,7 @@ A list control must not have items that have a hierarchical relationship other t ||Depends|Implement this control pattern if the control can support multiple views of the items in the container.| ||Never|`ITableProvider` is never supported for the List control type. If the control should support this control pattern, then the control should be based on the Data Grid control type.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all list controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-listitem-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-listitem-control-type.md index ddb85bf680d65..b3abfa73857e1 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-listitem-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-listitem-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 34f533bf-fc14-4e78-8fee-fb7107345fab The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the ListItem control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all list controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to list item controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: 34f533bf-fc14-4e78-8fee-fb7107345fab The children of a list item control within the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree must always be "0". If the structure of the control is such that other items are contained underneath the list item then it should follow the requirements for the [UI Automation Support for the TreeItem Control Type](ui-automation-support-for-the-treeitem-control-type.md) control type. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to list item controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -47,7 +47,7 @@ ms.assetid: 34f533bf-fc14-4e78-8fee-fb7107345fab ||Depends|This property should be exposed for list item controls that are representing an underlying object. These list item controls typically have an icon associated with the control that users associate with the underlying object.| ||Depends|This property must return a value for whether the list item is currently scrolled into view within the parent container that implements Scroll control pattern.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by list item controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -61,7 +61,7 @@ ms.assetid: 34f533bf-fc14-4e78-8fee-fb7107345fab ||Depends|If item to item spatial navigation is supported within the list container and the container is arranged in rows and columns then the Grid Item control pattern must be implemented.| ||Depends|If the item has a command that can be performed on it, separate from selection, then this pattern must be implemented. This is typically an action associated with double-clicking the list item control. Examples would be launching a document from Microsoft Windows Explorer, or playing a music file in Microsoft Windows Media Player.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all list item controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-menu-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-menu-control-type.md index c7ce2e9ad5df8..9df3225860364 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-menu-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-menu-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 016323cb-f800-4938-b77b-2eb25d646090 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Menu control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all list controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to menu controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: 016323cb-f800-4938-b77b-2eb25d646090 Menu controls always appear in the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree. Menu control types should appear under the control that their information is referring to. UI Automation clients must listen for `MenuOpenedEvent` to ensure that they consistently obtain information conveyed by menu controls. Context menu controls are a special case. They appear as children of the Desktop. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to the Menu control type. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -39,11 +39,11 @@ ms.assetid: 016323cb-f800-4938-b77b-2eb25d646090 ||False|The menu control is not included in the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| ||True|The menu control is always included in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| - + ## Required UI Automation Control Patterns There are no required control patterns for the Menu control type. - + ## Required UI Automation Events Menu controls must raise `MenuOpenedEvent` when they appear on the screen. The `MenuOpenedEvent` will include the text of the control. The `MenuClosedEvent` must be raised when a menu disappears from the screen. diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-menubar-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-menubar-control-type.md index db5f7109b396a..73a13e3a601c3 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-menubar-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-menubar-control-type.md @@ -17,7 +17,7 @@ ms.assetid: c1202b21-c1f0-4560-853c-7b99bd73ad97 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the MenuBar control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all list controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to menu bar controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: c1202b21-c1f0-4560-853c-7b99bd73ad97 Menu bar controls can contain other controls such as edit controls and combo boxes within its structure. These additional controls correspond to the "other controls" listed above in the control and content views. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to the menu bar controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -47,7 +47,7 @@ ms.assetid: c1202b21-c1f0-4560-853c-7b99bd73ad97 ||`Null`|Menu bars never have accelerator keys.| ||"ALT"|Pressing the ALT key should always bring focus to the menu bar within the application.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by menu bar controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -57,7 +57,7 @@ ms.assetid: c1202b21-c1f0-4560-853c-7b99bd73ad97 ||Depends|If the control can be docked to different parts of the screen, implement .| ||Depends|If the control can be resized, rotated or moved it must implement .| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all menu bar controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-pane-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-pane-control-type.md index de7eceea86118..8bb2b74ded0bf 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-pane-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-pane-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 79761191-4449-4630-899c-9cbdb8867d3f The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Pane control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all list controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to pane controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 79761191-4449-4630-899c-9cbdb8867d3f |------------------|------------------| |Pane|Pane| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to pane controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -44,7 +44,7 @@ ms.assetid: 79761191-4449-4630-899c-9cbdb8867d3f ||""|The help text for pane controls should explain why the purpose of the frame and how it relates to other frames. A description is necessary if the purpose and relationship of frames is not clear from the value of the `NameProperty`. "| ||See notes.|If a specific key combination gives focus to the pane then that information should be exposed through this property.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all pane controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -55,7 +55,7 @@ ms.assetid: 79761191-4449-4630-899c-9cbdb8867d3f ||Depends|Implement this control pattern if the pane control can be docked.| ||Depends|Implement this control pattern if the pane control can be scrolled.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all pane controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). @@ -77,7 +77,7 @@ ms.assetid: 79761191-4449-4630-899c-9cbdb8867d3f ||Required|None| ||Required|None| - + ## Pane Control Type Example The following image illustrates a control that implements the Pane control type. diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-progressbar-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-progressbar-control-type.md index b0a8ef712ec2b..c634b18a7c226 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-progressbar-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-progressbar-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 302e778c-24b0-4789-814a-c8d37cf53a5f The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the ProgressBar control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all list controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to progress bar controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: 302e778c-24b0-4789-814a-c8d37cf53a5f The progress bar controls do not have any children in the control or content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to progress bar controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -44,7 +44,7 @@ ms.assetid: 302e778c-24b0-4789-814a-c8d37cf53a5f ||True|The progress bar control is always included in the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| ||True|The progress bar control is always included in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| - + ## Required UI Automation Control Patterns and Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by progress bar controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -59,7 +59,7 @@ ms.assetid: 302e778c-24b0-4789-814a-c8d37cf53a5f ||NaN|This property is not required because progress bar controls are read-only.| ||NaN|This property is not required because progress bar controls are read-only.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all progress bar controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-radiobutton-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-radiobutton-control-type.md index d9b04533de61d..8ca375d3e8bc2 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-radiobutton-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-radiobutton-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 87170464-7857-41f1-bcf7-bb41be31cb53 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the RadioButton control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all list controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to radio button controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: 87170464-7857-41f1-bcf7-bb41be31cb53 There are no children in the control view or the content view. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to the RadioButton control type. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -44,7 +44,7 @@ ms.assetid: 87170464-7857-41f1-bcf7-bb41be31cb53 ||True|The radio button control is always included in the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| ||True|The radio button control is always included in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all radio button controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -54,7 +54,7 @@ ms.assetid: 87170464-7857-41f1-bcf7-bb41be31cb53 ||See notes.|The `SelectionContainerProperty` must always be completed so that a UI Automation client can determine what other radio buttons within a specific context relate to one another. For the Win32 version of the radio button, this property will not be supported because it is not possible to obtain this information from that legacy framework.| ||Never|The radio button cannot cycle through its state once it has been set. This pattern must never be supported on radio button.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all radio button controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-scrollbar-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-scrollbar-control-type.md index bc115b9ecf89b..00f6bdd7240f2 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-scrollbar-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-scrollbar-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 329891d7-b609-49e6-920a-09ea8a627d07 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the ScrollBar control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all list controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to scroll bar controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: 329891d7-b609-49e6-920a-09ea8a627d07 The scroll bar control always has three to five children. Because the subtree has more than one button control, you must set a specific value to each item to make them discoverable for test automation tools. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to scroll bar controls. Note that a scroll bar control never has content; its functionality is exposed through the Scroll control pattern, which is supported on the container being scrolled. @@ -47,7 +47,7 @@ ms.assetid: 329891d7-b609-49e6-920a-09ea8a627d07 ||True|The scroll bar must always be a control.| ||True|The scroll bar control must always expose its horizontal or vertical orientation.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by scroll bar controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). Note that when a scroll bar is used as a control for mouse manipulation only, it does not support control patterns. If it is used as a slider control within an application, it must be given the Slider control type. @@ -56,7 +56,7 @@ ms.assetid: 329891d7-b609-49e6-920a-09ea8a627d07 ||Never|The Scroll control pattern is never directly supported on the scroll bar.| ||Depends|This functionality is required to be supported only if the Scroll control pattern is not supported on the container that has the scroll bar.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all scroll bar controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-separator-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-separator-control-type.md index a2fa4372a02a6..edc0412c7dad7 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-separator-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-separator-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 89f42247-c699-4afa-91e1-2baaf0d86c9d The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Separator control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all list controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the Control View and the Content View of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to separator controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 89f42247-c699-4afa-91e1-2baaf0d86c9d |------------------|------------------| |Separator|- The Separator control never has content.| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to separator controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -42,11 +42,11 @@ ms.assetid: 89f42247-c699-4afa-91e1-2baaf0d86c9d ||False|The separator control is never content.| ||True|The separator control must always be a control.| - + ## Required UI Automation Control Patterns The separator control is not required to support any control patterns. - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all separator controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-slider-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-slider-control-type.md index 96e85109d4213..b0d7b0fd3e715 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-slider-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-slider-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 045ea62f-7b50-46cf-a5a9-8eb97704355f The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Slider control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all slider controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the Control View and the Content View of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to slider controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 045ea62f-7b50-46cf-a5a9-8eb97704355f |------------------|------------------| |Slider

- Button (2 or 4)
- Thumb (only 1)
- List Item (0 or more)|Slider

- List Item (0 or more)| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to the Slider control type. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -42,7 +42,7 @@ ms.assetid: 045ea62f-7b50-46cf-a5a9-8eb97704355f ||True|The edit control is always included in the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| ||True|The edit control is always included in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all slider controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -52,7 +52,7 @@ ms.assetid: 045ea62f-7b50-46cf-a5a9-8eb97704355f ||Depends|A slider should support the RangeValue control pattern if the content can be set to a value within a numerical range.| ||Depends|A slider should support the Value control pattern if the content represents one value among a discrete set of options.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all slider controls. diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-spinner-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-spinner-control-type.md index 5fcbb1100401a..2dcb367bea810 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-spinner-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-spinner-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 3a29d185-65d8-42e3-bcc3-7f43e96f40c5 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Spinner control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all spinner controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertain to spinner controls when they support the Range Value, Value, and Selection control patterns and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -35,7 +35,7 @@ ms.assetid: 3a29d185-65d8-42e3-bcc3-7f43e96f40c5 To ensure that the two buttons in the control view subtree can be distinguished by automated test tools, assign the `SmallIncrement` or `SmallDecrement` `AutomationId` as appropriate. For some implementations, the associated Edit control may be a peer of the Spinner control. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to spinner controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -52,7 +52,7 @@ ms.assetid: 3a29d185-65d8-42e3-bcc3-7f43e96f40c5 ||True|The spinner control must always be content.| ||True|The Spinner control must always be a control.| - + ## Required UI Automation Control Patterns and Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by spinner controls. For more information about control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -63,7 +63,7 @@ ms.assetid: 3a29d185-65d8-42e3-bcc3-7f43e96f40c5 ||Depends|Spinner controls that span a numeric range can support this pattern.| ||Depends|Spinner controls that span a discrete set of options or numbers can support this pattern.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all spinner controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-statusbar-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-statusbar-control-type.md index ab22f22964ff1..ee296162bd380 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-statusbar-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-statusbar-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 48dee94a-5119-4939-a4c7-ffeaf794c732 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the StatusBar control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all status bar controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to status bar controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 48dee94a-5119-4939-a4c7-ffeaf794c732 |------------------|------------------| |StatusBar

- Edit (0 or more)
- Progress Bar (0 or many)
- Image (0 or many)
- Button (0 or many)|StatusBar

- Edit (0 or more)
- ProgressBar (0 or many)
- Image (0 or many)
- Button (0 or many)| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to progress bar controls. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -46,7 +46,7 @@ ms.assetid: 48dee94a-5119-4939-a4c7-ffeaf794c732 ||False|Not applicable| ||`Null`|Status bars do not have accelerator keys.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by status bar controls. For more information about control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -54,7 +54,7 @@ ms.assetid: 48dee94a-5119-4939-a4c7-ffeaf794c732 |---------------------|-------------|-----------| ||Optional|Status bar controls should support the Grid control pattern so that individual pieces can be monitored and easily referenced for information.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all status bar controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-tab-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-tab-control-type.md index af29cc5fbb8b1..04fc88c95e58b 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-tab-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-tab-control-type.md @@ -17,7 +17,7 @@ ms.assetid: f8be2732-836d-4e4d-85e2-73aa39479bf4 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Tab control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all tab controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to tab controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -31,7 +31,7 @@ ms.assetid: f8be2732-836d-4e4d-85e2-73aa39479bf4 |------------------|------------------| |Tab

  • TabItem (1 or more)
  • Group (0 or more)

    • TabItem (0 or more)
  • ScrollBar (0 or more)

    • Button (0 or 2)
|Tab

  • TabItem (1 or more)
  • Group (0 or more)

    • TabItem (0 or more)
| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to the Tab control type. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -50,7 +50,7 @@ ms.assetid: f8be2732-836d-4e4d-85e2-73aa39479bf4 ||True|The tab control is always included in the control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree.| ||See notes.|The tab control must always indicate whether it is positioned horizontally or vertically.| - + ## Required UI Automation Control Patterns and Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by all tab controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -61,7 +61,7 @@ ms.assetid: f8be2732-836d-4e4d-85e2-73aa39479bf4 ||False|Tab controls are always single-selection containers.| ||Depends|The Scroll pattern must be supported in the tab control has widgets that allow for a set of tab items to be scrolled through.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all tab controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-tabitem-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-tabitem-control-type.md index 97506c233427c..e93eb378e52df 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-tabitem-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-tabitem-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 9b21160d-e1c2-468b-9275-26e4369ae40d The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the TabItem control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all tab item controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to tab item controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 9b21160d-e1c2-468b-9275-26e4369ae40d |------------------|------------------| |TabItem

  • Image (0 or 1)
  • Text
  • Pane

    • Various controls (0 or more)
|TabItem

  • Pane

    • Various controls (0 or more)
| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to tab item controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -42,7 +42,7 @@ ms.assetid: 9b21160d-e1c2-468b-9275-26e4369ae40d ||True|The tab item control must always be content.| ||True|The tab item control must always be a control.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by tab item controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -51,7 +51,7 @@ ms.assetid: 9b21160d-e1c2-468b-9275-26e4369ae40d ||Yes|The tab item control must support SelectionItemPattern.| ||No|The tab item control never supports InvokePattern.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all tab item controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-table-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-table-control-type.md index 9a0d6ce072990..9378e314190a4 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-table-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-table-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 9050dde5-6469-4c83-abb7-f861c24ff985 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Table control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all table controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to table controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: 9050dde5-6469-4c83-abb7-f861c24ff985 If a table control has row or column headers, they must be exposed in the Control View of the UI Automation tree. The Content View does not need to expose this information because it can be accessed using the TablePattern. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to Table controls. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -45,7 +45,7 @@ ms.assetid: 9050dde5-6469-4c83-abb7-f861c24ff985 ||True|The table control must always be content.| ||True|The table control must always be a control.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by Table controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -56,7 +56,7 @@ ms.assetid: 9050dde5-6469-4c83-abb7-f861c24ff985 ||Yes|The table control always has the capability of having headers associated with the content.| ||Yes (required with child objects)|The inner objects of a table should support both the GridItem and TableItem control patterns. The table itself need not support the GridItem or TableItem control patterns unless the table is part of another table.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all table controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-text-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-text-control-type.md index c0fbc932d2a12..a7a53c3116806 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-text-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-text-control-type.md @@ -17,7 +17,7 @@ ms.assetid: ab0d0ada-8a71-4547-9c03-aadf675938f2 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Text control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all text controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to text controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -35,7 +35,7 @@ ms.assetid: ab0d0ada-8a71-4547-9c03-aadf675938f2 Text controls may not be in the Content View of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree because text is often displayed through the `NameProperty` of another control. For example the text that is used to label a Combo Box control is exposed through the control's `NameProperty` value. Because the Combo Box control is in the content view of the UI Automation Tree, it is not necessary for the text control to be there. Text controls always have 0 children in the content view - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to text controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -52,7 +52,7 @@ ms.assetid: ab0d0ada-8a71-4547-9c03-aadf675938f2 ||Depends|The text control will be content if it contains information not exposed in another control's NameProperty.| ||True|The text control must always be a control.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by text controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -63,7 +63,7 @@ ms.assetid: ab0d0ada-8a71-4547-9c03-aadf675938f2 ||Depends|If the text element is contained within a Table control, this must be supported.| ||Depends|If the text element is contained within a table control, this must be supported.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all text controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-thumb-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-thumb-control-type.md index f7315a05d897f..65a6bfe25b3fb 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-thumb-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-thumb-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 13636338-e320-4355-b071-ede20a3fb1de The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Thumb control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all thumb controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to thumb controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -27,7 +27,7 @@ ms.assetid: 13636338-e320-4355-b071-ede20a3fb1de Thumb controls never appear in Content View because they only exist for being manipulated with a mouse. Their functionality is exposed though another control pattern, such as Scroll Pattern, Transform Pattern, or RangeValue Pattern, being supported on the Thumb container. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to thumb controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -44,7 +44,7 @@ ms.assetid: 13636338-e320-4355-b071-ede20a3fb1de ||False|The Thumb control is never content.| ||True|The Thumb control must always be a control.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by thumb controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -52,7 +52,7 @@ ms.assetid: 13636338-e320-4355-b071-ede20a3fb1de |---------------------------------------|--------------------|-----------| ||Required|Enables the thumb control to be moved on the screen.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all thumb controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-titlebar-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-titlebar-control-type.md index 826656667756b..dcb07693ee6d6 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-titlebar-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-titlebar-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 3b7a4e13-0305-45d5-bc33-1f4133c50782 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the TitleBar control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all title bar controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to title bar controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 3b7a4e13-0305-45d5-bc33-1f4133c50782 |------------------|------------------| |TitleBar

- Menu (0 or 1)
- Button (0 or more)|Not applicable. (the title bar control has no content.)| - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to TitleBar controls. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -46,7 +46,7 @@ ms.assetid: 3b7a4e13-0305-45d5-bc33-1f4133c50782 ||""|Title bars never have accelerator keys.| ||""|The title bar control does not have an access key.| - + ## Required UI Automation Control Patterns The TitleBar control type is not required to support any control patterns. Its functionality is exposed through the Window control pattern on the Window control. diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-toolbar-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-toolbar-control-type.md index f6e80c44d5a99..4465da32004fb 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-toolbar-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-toolbar-control-type.md @@ -15,7 +15,7 @@ ms.assetid: 85152efd-f4c5-430c-8878-3371cc598616 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the ToolBar control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all tool bar controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to tool bar controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -25,7 +25,7 @@ ms.assetid: 85152efd-f4c5-430c-8878-3371cc598616 A tool bar control can contain any type of control within its subtree. They most often contain buttons, combo boxes, and split buttons. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to tool bar controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -42,7 +42,7 @@ ms.assetid: 85152efd-f4c5-430c-8878-3371cc598616 ||True|The tool bar control is always content.| ||True|The tool bar control must always be a control.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by tool bar controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -52,7 +52,7 @@ ms.assetid: 85152efd-f4c5-430c-8878-3371cc598616 ||Depends|If the tool bar can be docked to different parts of the screen, then it must support this pattern.| ||Depends|If the tool bar can be resized, rotated, or moved, it must support this pattern.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all tool bar controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-tooltip-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-tooltip-control-type.md index d21327f6c7c22..f0fe61c82c9fc 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-tooltip-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-tooltip-control-type.md @@ -17,7 +17,7 @@ ms.assetid: c3779d78-3164-43ae-8dae-bfaeafffdd65 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the ToolTip control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all tool tip controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to tool tip controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -29,7 +29,7 @@ ms.assetid: c3779d78-3164-43ae-8dae-bfaeafffdd65 Tool tips should appear beneath the control that their information is referring to. Clients must listen for the `ToolTipOpenedEvent` to ensure that they consistently obtain information contained in tool tips. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to tool tip controls. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -46,7 +46,7 @@ ms.assetid: c3779d78-3164-43ae-8dae-bfaeafffdd65 ||Depends|If the tool tip control can receive keyboard focus, it must be in the Content View of the tree. If it is text only, then it is available as the HelpTextProperty from the control that raised it.| ||True|The tool tip control must always be a control.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by tool tip controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -55,7 +55,7 @@ ms.assetid: c3779d78-3164-43ae-8dae-bfaeafffdd65 ||Depends|Tool tips that can be closed by clicking a UI item must support WindowPattern so that they can closed automatically.| ||Depends|For better accessibility, a tool tip control can support the Text control pattern, although it is not required. The Text control pattern is useful when the text has rich style and attributes (for example, color, bold, and italics).| - + ## Required UI Automation Events Tool tip controls must raise the `ToolTipOpenedEvent` when they appear on the screen. The event will include a reference to the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] element of the tool tip itself. diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-tree-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-tree-control-type.md index dcd8c175c4270..ce21613fc7515 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-tree-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-tree-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 312dd04d-a86b-4072-8b12-2beeabdff5e3 The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the Tree control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all tree controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to tree controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -33,7 +33,7 @@ ms.assetid: 312dd04d-a86b-4072-8b12-2beeabdff5e3 The content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree consists of zero or many items within the container (items can be based on the Tree Item, Data Item, or other control type). - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to list controls. For more information about [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -50,7 +50,7 @@ ms.assetid: 312dd04d-a86b-4072-8b12-2beeabdff5e3 ||"tree"|Localized string corresponding to the List control type.| ||See notes.|The value of a tree control's name property usually comes from text that labels the control. If there is no text label, then the application developer must provide a value for this property.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by list controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -61,7 +61,7 @@ ms.assetid: 312dd04d-a86b-4072-8b12-2beeabdff5e3 ||See notes.|The value of this property is exposed if the control requires that an item be selected.| ||Depends|Implement this control pattern if the contents of the tree container can be scrolled.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all tree controls. For more information on events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-support-for-the-treeitem-control-type.md b/docs/framework/ui-automation/ui-automation-support-for-the-treeitem-control-type.md index 0b468aa2065c1..00e0d86e39ce8 100644 --- a/docs/framework/ui-automation/ui-automation-support-for-the-treeitem-control-type.md +++ b/docs/framework/ui-automation/ui-automation-support-for-the-treeitem-control-type.md @@ -17,7 +17,7 @@ ms.assetid: 229f341a-477f-434e-b877-4db9973068eb The following sections define the required [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree structure, properties, control patterns, and events for the TreeItem control type. The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] requirements apply to all tree item controls, whether [!INCLUDE[TLA#tla_winclient](../../../includes/tlasharptla-winclient-md.md)], Win32, or Windows Forms. - + ## Required UI Automation Tree Structure The following table depicts the control view and the content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree that pertains to tree item controls and describes what can be contained in each view. For more information on the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree, see [UI Automation Tree Overview](ui-automation-tree-overview.md). @@ -31,7 +31,7 @@ ms.assetid: 229f341a-477f-434e-b877-4db9973068eb The control view can contain additional details for a control, including an associated image or a button. For example, an item in an outline view might contain an image as well as a button to expand or collapse the outline. These detail objects don't appear in the content view because the information is already represented by the parent tree item. Tree items that are scrolled off the screen will appear in both the control and content views of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree and should have the set to true. - + ## Required UI Automation Properties The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties whose value or definition is especially relevant to list controls. For more information on [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] properties, see [UI Automation Properties for Clients](ui-automation-properties-for-clients.md). @@ -50,7 +50,7 @@ ms.assetid: 229f341a-477f-434e-b877-4db9973068eb ||"tree item"|Localized string corresponding to the TreeItem control type.| ||See notes.|This property exposes the text displayed for each tree item control.| - + ## Required UI Automation Control Patterns The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] control patterns required to be supported by list controls. For more information on control patterns, see [UI Automation Control Patterns Overview](ui-automation-control-patterns-overview.md). @@ -64,7 +64,7 @@ ms.assetid: 229f341a-477f-434e-b877-4db9973068eb ||Yes|This property will expose the same container for all items within the container.| ||Depends|Implement this control pattern if the tree item has an associated check box.| - + ## Required UI Automation Events The following table lists the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] events required to be supported by all tree item controls. For more information about events, see [UI Automation Events Overview](ui-automation-events-overview.md). diff --git a/docs/framework/ui-automation/ui-automation-tree-overview.md b/docs/framework/ui-automation/ui-automation-tree-overview.md index cad1db672728f..5760cfe6fda07 100644 --- a/docs/framework/ui-automation/ui-automation-tree-overview.md +++ b/docs/framework/ui-automation/ui-automation-tree-overview.md @@ -18,7 +18,7 @@ ms.assetid: 03b98058-bdb3-47a0-8ff7-45e6cdf67166 UI Automation providers support the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree by implementing navigation among items within a fragment, which consists of a root (usually hosted in a window) and a subtree. However, providers are not concerned with navigation from one control to another. This is managed by the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] core, using information from the default window providers. - + ## Views of the Automation Tree The [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree can be filtered to create views that contain only those objects relevant for a particular client. This approach allows clients to customize the structure presented through [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] to their particular needs. @@ -28,13 +28,13 @@ ms.assetid: 03b98058-bdb3-47a0-8ff7-45e6cdf67166 [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] provides three default views. These views are defined by the type of filtering performed; the scope of any view is defined by the application. In addition, the application can apply other filters on properties; for example, to include only enabled controls in a control view. - + ### Raw View The raw view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree is the full tree of objects for which the desktop is the root. The raw view closely follows the native programmatic structure of an application and therefore is the most detailed view available. It is also the base on which the other views of the tree are built. Because this view depends on the underlying [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] framework, the raw view of a [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] button will have a different raw view than a Win32 button. The raw view is obtained by searching for elements without specifying properties or by using the to navigate the tree. - + ### Control View The control view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree simplifies the assistive technology product's task of describing the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] to the end user and helping that end user interact with the application because it closely maps to the [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] structure perceived by an end user. @@ -42,7 +42,7 @@ ms.assetid: 03b98058-bdb3-47a0-8ff7-45e6cdf67166 The control view is obtained by searching for elements that have the property set to `true`, or by using the to navigate the tree. - + ### Content View The content view of the [!INCLUDE[TLA2#tla_uiautomation](../../../includes/tla2sharptla-uiautomation-md.md)] tree is a subset of the control view. It contains [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] items that convey the true information in a user interface, including [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] items that can receive keyboard focus and some text that is not a label on a [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] item. For example, the values in a drop-down combo box will appear in the content view because they represent the information being used by an end user. In the content view, a combo box and list box are both represented as a collection of [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] items where one, or perhaps more than one, item can be selected. The fact that one is always open and one can expand and collapse is irrelevant in the content view because it is designed to show the data, or content, that is being presented to the user.