Skip to content

Commit

Permalink
Remove the DynamicDependencies attributes
Browse files Browse the repository at this point in the history
This gives a better message to users that distributed transactions don't work with trimming.
  • Loading branch information
eerhardt committed Sep 8, 2022
1 parent b01ba13 commit c909e17
Showing 1 changed file with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,6 @@ private static extern void DtcGetTransactionManagerExW(
[MarshalAs(UnmanagedType.Interface)] out ITransactionDispenser ppvObject);

[RequiresUnreferencedCode("Distributed transactions support may not be compatible with trimming. If your program creates a distributed transaction via System.Transactions, the correctness of the application cannot be guaranteed after trimming.")]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(IConnectionPoint))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(IConnectionPointContainer))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(IEnumConnectionPoints))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(IEnumConnections))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(IPrepareInfo))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(IResourceManager))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(IResourceManagerFactory2))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(IResourceManagerSink))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITmNodeName))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransaction))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionCloner))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionDispenser))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionEnlistmentAsync))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionExport))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionExportFactory))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionImport))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionImportWhereabouts))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionOptions))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionOutcomeEvents))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionPhase0EnlistmentAsync))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionPhase0Factory))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionPhase0NotifyAsync))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionReceiver))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionReceiverFactory))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionResourceAsync))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionTransmitter))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionTransmitterFactory))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionVoterBallotAsync2))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionVoterFactory2))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ITransactionVoterNotifyAsync2))]
private static void DtcGetTransactionManager(string? nodeName, out ITransactionDispenser localDispenser) =>
DtcGetTransactionManagerExW(nodeName, null, Guids.IID_ITransactionDispenser_Guid, 0, null, out localDispenser);

Expand Down

0 comments on commit c909e17

Please sign in to comment.