Ejemplo n.º 1
0
 internal static void Publish(Guid subject, Guid trigger, string data)
 {
     if ((data ?? "").Length > 2048) throw new ArgumentException("Data string length is limited to 2048 characters.");
     var request = new Request {Subject = subject, Trigger = trigger, Data = data ?? ""};
     Requests.Enqueue(request);
     Barrier.Set();
 }
Ejemplo n.º 2
0
 private ResourceRepresentation DeliverResource(string body, Request arg)
 {
     return new ResourceRepresentation
                {
                    NetResourceIdentifier = _nri1,
                    Body = body,
                    Cacheable = true,
                    Energy = 100,
                    Expires = DateTime.MaxValue,
                    MediaType = "text/plain",
                    Modified = DateTime.Now,
                    RevokationTokens = new[] { _revocation }
                };
 }