1
관리되는 클라이언트 개체 모델에서 목록 항목 업데이트를 수행 할 때 이벤트 발생을 비활성화하는 방법이 있습니까?클라이언트 개체 모델 - 이벤트 실행 사용 안 함
서버 모델에서 다음을 수행합니다. 그러나 Managed Client Object Model에서 동일한 작업을 수행하는 방법을 찾을 수 없습니다.
class DisabledEventsScope : SPItemEventReceiver, IDisposable
{ // Boolean to hold the original value of the EventFiringEnabled property
bool _originalValue;
public DisabledEventsScope()
{
// Save off the original value of EventFiringEnabled
_originalValue = base.EventFiringEnabled;
// Set EventFiringEnabled to false to disable it
base.EventFiringEnabled = false;
}
public void Dispose()
{
// Set EventFiringEnabled back to its original value
base.EventFiringEnabled = _originalValue;
}
}
using (DisabledEventsScope scope = new DisabledEventsScope())
{
// State-changing operation occurs here.
spItem.Update();
}
감사합니다.
답변 해 주셔서 감사합니다. –