Esempio n. 1
0
        private static void PostCreateEventHandler(object src, PostPropertyEventArgs evnt)
        {
            Assert.That(((ResultProperty)src).PropertyName, Is.EqualTo("Document"));
            Account account = (Account)evnt.Target;

            Assert.That(account.Document, Is.Null);

            account.Document = new Document();
            account.Document.Id = 55;
        }
        /// <summary>
        /// Raises the <see cref="PostPropertyEventArgs"/>.
        /// </summary>
        /// <param name="target">The target.</param>
        protected void RaisePostPropertyEvent(object target)
        {
            EventHandler<PostPropertyEventArgs> handlers = (EventHandler<PostPropertyEventArgs>)events[PostPropertyEvent];

            if (handlers != null)
            {
                PostPropertyEventArgs evnt = new PostPropertyEventArgs();
                evnt.Target = target;
                handlers(this, evnt);
            }
        }