コード例 #1
0
        protected virtual void OnNewPack(NewPackEventArgs e)
        {
            EventHandler <NewPackEventArgs> temp = Volatile.Read(ref NewPack);

            if (temp != null)
            {
                temp(this, e);
            }
        }
コード例 #2
0
 private void PostMsg(Object sender, NewPackEventArgs e)
 {
     Console.WriteLine("Message about new pack");
     Console.WriteLine("From={0}, TO={1}, Content={2}, Delivery={3}", e.From, e.To, e.Content, e.Delivery);
 }
コード例 #3
0
        public void SimulateNewPack(string from, string to, string content, string delivery)
        {
            NewPackEventArgs e = new NewPackEventArgs(from, to, content, delivery);

            OnNewPack(e);
        }