2012-11-08 3 views
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(); 
         } 

감사합니다.

답변

3

클라이언트 개체 모델에서는 수행 할 수 없습니다. SP.List 개체의 MSDN 설명서를 참조하십시오. http://msdn.microsoft.com/en-us/library/ee554951. 그러나 클라이언트 측에서 호출되어 이벤트 발생을 차단하는 사용자 정의 웹 서비스를 개발할 수 있습니다.

+0

답변 해 주셔서 감사합니다. –