public void Test() { ClassEventArgs e = new ClassEventArgs(1, "1st"); Console.WriteLine("EventManagerClass::Test()"); OnSmthEvent(e); }
protected virtual void OnSmthEvent(ClassEventArgs e) { Console.WriteLine("EventManagerClass::OnSmthEvent()"); EventHandler <ClassEventArgs> tmp = SmthEvent; if (tmp != null) { Delegate[] delegates = tmp.GetInvocationList(); tmp(this, e); } }
public virtual void DoSmth(Object sender, ClassEventArgs e) { Console.WriteLine("{0}{1}\tSender: {2}{1}\tArguments: {{ FInt: {3}, FString: \"{4}\" }}{1}", this.GetType().FullName, Environment.NewLine, sender.GetType().FullName, e.FInt, e.FString); }
public override void DoSmth(object sender, ClassEventArgs e) { Console.WriteLine(";)"); base.DoSmth(sender, e); }
public ClassEventArgs(ClassEventArgs obj) : this(obj.FInt, obj.FString) { }