在 mscorlib.dll 中不允許的類型和成員
適用於:SQL Server
SQL Server通用語言整合 (CLR) 程式設計不允許使用具有HostProtectionAttribute 的 HostProtectionAttribute類型或成員,其指定System.Security.Permissions.HostProtectionResource列舉,其值為ExternalProcessMgmt、ExternalThreading、MayLeakOnAbort、SecurityInfrastructure、SelfAffectingProcessMgmnt、SelfAffectingThreading、 SharedState、同步處理或UI。 下列資料表所列出 mscorlib.dll 組件的成員和類型之主機保護屬性 (HPA) 值是不允許的。
注意
此清單是根據支援的組件產生的。 如需詳細資訊,請參閱支援的程式庫.NET Framework。
類型或成員 | HPA 值 |
---|---|
SyncStream.BeginRead() | ExternalThreading |
SyncStream.BeginWrite() | ExternalThreading |
System.Collections.ArrayList.Synchronized() | 同步處理 |
System.Collections.Hashtable.Synchronized() | 同步處理 |
System.Collections.Queue.Synchronized() | 同步處理 |
System.Collections.SortedList.Synchronized() | 同步處理 |
System.Collections.Stack.Synchronized() | 同步處理 |
System.Console.Beep() | UI |
System.Console.get_Error() | UI |
System.Console.get_In() | UI |
System.Console.get_KeyAvailable() | UI |
System.Console.get_Out() | UI |
System.Console.OpenStandardError() | UI |
System.Console.OpenStandardInput() | UI |
System.Console.OpenStandardOutput() | UI |
System.Console.Read() | UI |
System.Console.ReadKey() | UI |
System.Console.ReadLine() | UI |
System.Console.SetError() | UI |
System.Console.SetIn() | UI |
System.Console.SetOut() | UI |
System.Console.Write() | UI |
System.Console.WriteLine() | UI |
System.Diagnostics.LogMessageEventHandler | ExternalThreading, Synchronization |
System.IO.FileStream.BeginRead() | ExternalThreading |
System.IO.FileStream.BeginWrite() | ExternalThreading |
System.IO.Stream.Synchronized() | 同步處理 |
System.IO.TextReader.Synchronized() | 同步處理 |
System.IO.TextWriter.Synchronized() | 同步處理 |
System.Reflection.Emit.AssemblyBuilder | MayLeakOnAbort |
System.Reflection.Emit.ConstructorBuilder | MayLeakOnAbort |
System.Reflection.Emit.CustomAttributeBuilder | MayLeakOnAbort |
System.Reflection.Emit.EnumBuilder | MayLeakOnAbort |
System.Reflection.Emit.EventBuilder | MayLeakOnAbort |
System.Reflection.Emit.FieldBuilder | MayLeakOnAbort |
System.Reflection.Emit.MethodBuilder | MayLeakOnAbort |
System.Reflection.Emit.MethodRental | MayLeakOnAbort |
System.Reflection.Emit.ModuleBuilder | MayLeakOnAbort |
System.Reflection.Emit.PropertyBuilder | MayLeakOnAbort |
System.Reflection.Emit.TypeBuilder | MayLeakOnAbort |
System.Reflection.Emit.UnmanagedMarshal | MayLeakOnAbort |
System.Security.Principal.WindowsPrincipal | SecurityInfrastructure |
System.Threading.AutoResetEvent | ExternalThreading, Synchronization |
System.Threading.EventWaitHandle | ExternalThreading, Synchronization |
System.Threading.ManualResetEvent | ExternalThreading, Synchronization |
System.Threading.Monitor | ExternalThreading, Synchronization |
System.Threading.Mutex | ExternalThreading, Synchronization |
System.Threading.ReaderWriterLock | ExternalThreading, Synchronization |
System.Threading.Thread.AllocateDataSlot() | ExternalThreading, SharedState |
System.Threading.Thread.AllocateNamedDataSlot() | ExternalThreading, SharedState |
System.Threading.Thread.BeginCriticalRegion() | ExternalThreading, Synchronization |
System.Threading.Thread.EndCriticalRegion() | ExternalThreading, Synchronization |
System.Threading.Thread.FreeNamedDataSlot() | ExternalThreading, SharedState |
System.Threading.Thread.GetData() | ExternalThreading, SharedState |
System.Threading.Thread.GetNamedDataSlot() | ExternalThreading, SharedState |
System.Threading.Thread.Join() | ExternalThreading, Synchronization |
System.Threading.Thread.set_ApartmentState() | Synchronization, SelfAffectingThreading |
System.Threading.Thread.set_CurrentUICulture() | ExternalThreading |
System.Threading.Thread.set_IsBackground() | SelfAffectingThreading |
System.Threading.Thread.set_Name() | ExternalThreading |
System.Threading.Thread.set_Priority() | SelfAffectingThreading |
System.Threading.Thread.SetApartmentState() | Synchronization, SelfAffectingThreading |
System.Threading.Thread.SetData() | ExternalThreading, SharedState |
System.Threading.Thread.SpinWait() | ExternalThreading, Synchronization |
System.Threading.Thread.Start() | ExternalThreading, Synchronization |
System.Threading.Thread.TrySetApartmentState() | Synchronization, SelfAffectingThreading |
System.Threading.ThreadPool | ExternalThreading, Synchronization |
System.Threading.Timer | ExternalThreading, Synchronization |
System.Threading.TimerBase | ExternalThreading, Synchronization |
另請參閱
主機保護屬性和 CLR 整合程式設計
Microsoft.VisualBasic.dll 中不允許的型別和成員
在 System.dll 中不允許的類型和成員
在 System.Data.dll 中不允許的類型和成員
System.Core.dll 中不允許的類型和成員
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應