Skip to content

Commit 491dce8

Browse files
authored
Merge pull request #1940 from MicrosoftDocs/master-jdaly-2019-9-5
Added paragraph about AppDomain event dependencies
2 parents 3991b3c + adc3dc0 commit 491dce8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

powerapps-docs/developer/common-data-service/best-practices/business-logic/develop-iplugin-implementations-stateless.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.devlang: na
1313
ms.topic: article
1414
ms.tgt_pltfrm: na
1515
ms.workload: na
16-
ms.date: 1/15/2019
16+
ms.date: 9/05/2019
1717
ms.author: jowells
1818
search.audienceType:
1919
- developer
@@ -40,7 +40,11 @@ Members of classes that implement the <xref href="Microsoft.Xrm.Sdk.IPlugin?text
4040

4141
## Guidance
4242

43-
When implementing <xref:Microsoft.Xrm.Sdk.IPlugin>, do not use member fields and properties and write the <xref:Microsoft.Xrm.Sdk.IPlugin.Execute*> method as a stateless operation. All per invocation state information should be accessed via the execution context only. Do not attempt to store any execution state data in member fields or properties for use during the current or next plug-in invocation unless that data was obtained from the configuration parameter provided to the overloaded constructor.
43+
When implementing <xref:Microsoft.Xrm.Sdk.IPlugin>, do not use member fields and properties and write the <xref:Microsoft.Xrm.Sdk.IPlugin.Execute*> method as a stateless operation. All per invocation state information should be accessed via the execution context only.
44+
45+
Do not attempt to store any execution state data in member fields or properties for use during the current or next plug-in invocation unless that data was obtained from the configuration parameter provided to the overloaded constructor.
46+
47+
Do not use code that registers to AppDomain events. Plugin logic should not rely on any AppDomain events or properties, since the internal implementation of the plugin infrastructure can change the execution behavior at any point of time. This can cause failures even if the code worked at some point in time.
4448

4549
Read-only, static, and constant members are inherently thread-safe and can also be used reliably within a plug-in class. The following are some examples on how to maintain thread-safe plug-ins:
4650

0 commit comments

Comments
 (0)