Advertisement
Guest User

Untitled

a guest
May 26th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. EventReceiverDefinitionCreationInformation receiver = new EventReceiverDefinitionCreationInformation();
  2. receiver.EventType = EventReceiverType.ItemUpdated;
  3.  
  4. //Get WCF URL where this message was handled
  5. OperationContext op = OperationContext.Current;
  6. Message msg = op.RequestContext.RequestMessage;
  7.  
  8. receiver.ReceiverUrl = msg.Headers.To.ToString();
  9. receiver.ReceiverName = RECEIVER_NAME;
  10. //Add the new event receiver to a list in the host web
  11. requestList.EventReceivers.Add(receiver);
  12.  
  13. ctx.ExecuteQuery();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement