DataServiceContext.WritingEntity 事件

定義

實體已完全序列化為要求訊息中的 XML 之後發生。Occurs after an entity has been fully serialized into XML in a request message.

public:
 event EventHandler<System::Data::Services::Client::ReadingWritingEntityEventArgs ^> ^ WritingEntity;
public event EventHandler<System.Data.Services.Client.ReadingWritingEntityEventArgs> WritingEntity;
member this.WritingEntity : EventHandler<System.Data.Services.Client.ReadingWritingEntityEventArgs> 
Public Custom Event WritingEntity As EventHandler(Of ReadingWritingEntityEventArgs) 
Public Event WritingEntity As EventHandler(Of ReadingWritingEntityEventArgs) 

事件類型

EventHandler<ReadingWritingEntityEventArgs>

備註

處理 WritingEntity 事件讓您能夠在傳送前變更要求中的 XML。Handling the WritingEntity event enables you to change the XML in a request before it is sent.

當您呼叫 WritingEntity 但所提供的 BeginSaveChanges(SaveChangesOptions, AsyncCallback, Object) 值不包含 Batch 時,SaveChangesOptions 事件可能會發生在不同的執行緒上。The WritingEntity event may occur on a different thread when you call BeginSaveChanges(SaveChangesOptions, AsyncCallback, Object) without including Batch in the supplied SaveChangesOptions value.

適用於