Esempio n. 1
0
 /// <summary>
 /// Create an event stream, that calls a continuation when it updates to
 /// determine if the event is triggered.
 /// </summary>
 public Event(Continuation <bool> continuation)
 {
     stream   = new EventStream(continuation);
     client   = CallContext.Client;
     streamId = Core.Instance.AddStream(client, stream);
     Message  = new Messages.Event(new Messages.Stream(streamId));
 }
Esempio n. 2
0
 /// <summary>
 /// Create an event stream.
 /// </summary>
 public Event()
 {
     stream   = new EventStream();
     client   = CallContext.Client;
     streamId = Core.Instance.AddStream(client, stream);
     Message  = new Messages.Event(new Messages.Stream(streamId));
 }
Esempio n. 3
0
        /// <summary>
        /// Create an event stream, that calls a function when it updates to
        /// determine if the event is triggered.
        /// </summary>
        public Event(Func <Event, bool> func)
        {
            var continuation = new FunctionContinuation(this, func);

            stream   = new EventStream(continuation);
            client   = CallContext.Client;
            streamId = Core.Instance.AddStream(client, stream);
            Message  = new Messages.Event(new Messages.Stream(streamId));
        }