예제 #1
0
        public void DistributedObjectDestroyedEventArgs()
        {
            var memberId = Guid.NewGuid();
            var args     = new DistributedObjectCreatedEventArgs("serviceName", "name", memberId);

            Assert.That(args.Name, Is.EqualTo("name"));
            Assert.That(args.ServiceName, Is.EqualTo("serviceName"));
            Assert.That(args.SourceMemberId, Is.EqualTo(memberId));
        }
 /// <summary>
 /// Handles an object being created.
 /// </summary>
 /// <param name="args">The event arguments.</param>
 public ValueTask OnObjectCreated(DistributedObjectCreatedEventArgs args)
 {
     // triggers ObjectLifecycle event
     return(ForEachHandler <DistributedObjectCreatedEventHandler, DistributedObjectCreatedEventArgs>(
                (handler, sender, a) => handler.HandleAsync(sender, a), args));
 }