EntityCollection<TEntity>.OnSerializing 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
在內部用來序列化實體物件。
命名空間: System.Data.Entity.Core.Objects.DataClasses
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<BrowsableAttribute(False)> _
<SuppressMessageAttribute("Microsoft.Usage", "CA2238:ImplementSerializationMethodsCorrectly")> _
<OnSerializingAttribute> _
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
Public Sub OnSerializing ( _
context As StreamingContext _
)
'用途
Dim instance As EntityCollection
Dim context As StreamingContext
instance.OnSerializing(context)
[BrowsableAttribute(false)]
[SuppressMessageAttribute("Microsoft.Usage", "CA2238:ImplementSerializationMethodsCorrectly")]
[OnSerializingAttribute]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public void OnSerializing(
StreamingContext context
)
[BrowsableAttribute(false)]
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA2238:ImplementSerializationMethodsCorrectly")]
[OnSerializingAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
public:
void OnSerializing(
StreamingContext context
)
[<BrowsableAttribute(false)>]
[<SuppressMessageAttribute("Microsoft.Usage", "CA2238:ImplementSerializationMethodsCorrectly")>]
[<OnSerializingAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
member OnSerializing :
context:StreamingContext -> unit
public function OnSerializing(
context : StreamingContext
)
參數
- context
類型:System.Runtime.Serialization.StreamingContext
資料流內容。