Exemple #1
0
 private void AttachmentChanged(DateTime eventTime, ResourceBE attachment, params string[] path)
 {
     try {
         XUri     channel       = _channel.At(FILES).At(path);
         XUri     attachmentUri = AttachmentBL.Instance.GetUri(attachment);
         XUri     resource      = attachmentUri.WithHost(_wikiid);
         string[] origin        = new string[] { attachmentUri.AsServerUri().ToString() };
         Queue(eventTime, channel, resource, origin, new XDoc("deki-event")
               .Elem("channel", channel)
               .Elem("fileid", attachment.MetaXml.FileId ?? 0)
               .Elem("uri", attachmentUri.AsServerUri().ToString())
               .Elem("content.uri", attachmentUri.AsServerUri().ToString())
               .Elem("revision.uri", attachmentUri.At("info").With("revision", attachment.Revision.ToString()).AsServerUri().ToString())
               .Elem("path", attachmentUri.Path));
     } catch (Exception e) {
         _log.WarnExceptionMethodCall(e, "AttachmentChanged", "event couldn't be created");
     }
 }
Exemple #2
0
 private void UserChanged(DateTime eventTime, UserBE user, params string[] path)
 {
     try {
         XUri channel  = _channel.At(USERS).At(path);
         XUri resource = UserBL.GetUri(user).WithHost(_wikiid);
         Queue(eventTime, channel, resource, new string[] { resource.AsServerUri().ToString() }, new XDoc("deki-event")
               .Elem("channel", channel)
               .Elem("userid", user.ID)
               .Elem("uri", UserBL.GetUri(user).AsServerUri().ToString())
               .Elem("path", UserBL.GetUriUiHomePage(user).Path.TrimStart('/')));
     } catch (Exception e) {
         _log.WarnExceptionMethodCall(e, "UserChanged", "event couldn't be created");
     }
 }
Exemple #3
0
 //--- Methods ---
 public void InstanceStarted(DateTime eventTime)
 {
     try {
         XUri channel  = _channel.At(SITE, STARTED);
         XUri resource = _apiUri.AsServerUri();
         Queue(eventTime, channel, resource, new[] { _apiUri.AsServerUri().ToString() }, new XDoc("deki-event")
               .Elem("channel", channel)
               .Elem("uri", _apiUri.AsServerUri().ToString()));
     } catch (Exception e) {
         _log.WarnExceptionMethodCall(e, "InstanceStarted", "event couldn't be created");
     }
 }