DataServiceContext.WritingEntity 事件
實體已完全序列化為要求訊息中的 XML 之後發生。
命名空間: System.Data.Services.Client
組件: Microsoft.Data.Services.Client (在 Microsoft.Data.Services.Client.dll 中)
語法
'宣告
Public Event WritingEntity As EventHandler(Of ReadingWritingEntityEventArgs)
'用途
Dim instance As DataServiceContext
Dim handler As EventHandler(Of ReadingWritingEntityEventArgs)
AddHandler instance.WritingEntity, handler
public event EventHandler<ReadingWritingEntityEventArgs> WritingEntity
public:
event EventHandler<ReadingWritingEntityEventArgs^>^ WritingEntity {
void add (EventHandler<ReadingWritingEntityEventArgs^>^ value);
void remove (EventHandler<ReadingWritingEntityEventArgs^>^ value);
}
member WritingEntity : IEvent<EventHandler<ReadingWritingEntityEventArgs>,
ReadingWritingEntityEventArgs>
JScript 支援使用事件,但不支援新的宣告。
備註
處理 WritingEntity 事件讓您能夠在傳送前變更要求中的 XML。
當您呼叫 BeginSaveChanges(SaveChangesOptions, AsyncCallback, Object) 但所提供的 SaveChangesOptions 值不包含 Batch 時,WritingEntity 事件可能會發生在不同的執行緒上。