CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
TestEventSink.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="TestEventSink.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>no summary</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using System.Text;
11
13{
14 [Serializable( )]
15 public class TestEventSink
16 {
17 public void Reg(Core.BusinessBase obj)
18 {
19 obj.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler
20 (PrivateOnIsDirtyChanged);
21 obj.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(OnIsDirtyChanged);
22 }
23
24 private void PrivateOnIsDirtyChanged(object sender,
25 System.ComponentModel.PropertyChangedEventArgs e)
26 {
27 TestResults.Add("Test.PrivateOnIsDirtyChanged", "Test.PrivateOnIsDirtyChanged");
28 Console.WriteLine("PrivateOnIsDirtyChanged event handler output assigned with reg method");
29 }
30
31 public void OnIsDirtyChanged(object sender,
32 System.ComponentModel.PropertyChangedEventArgs e)
33 {
34 TestResults.Add("Test.OnIsDirtyChanged", "Test.OnIsDirtyChanged");
35 }
36 }
37}
void OnIsDirtyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
void Reg(Core.BusinessBase obj)
Static dictionary-like class that offers similar functionality to GlobalContext This is used in tests...
Definition: TestResults.cs:21
static void Add(string key, string value)
Add an item to the test results, to indicate an outcome of a particular operation
Definition: TestResults.cs:29
@ Serializable
Prevents updating or inserting until the transaction is complete.