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.
AppContextThread.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="AppContextThread.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;
11using System.Threading;
12using Csla;
13
15{
16 public class AppContextThread
17 {
18 //public static bool StaticRemoved = false;
19
20 private string _Name = string.Empty;
21 private bool _run = true;
22
23 public bool Removed
24 {
25 get
26 {
27 lock (this)
28 {
29 // TODO: Is this test relevant on Csla 6?
30 //if (Csla.ApplicationContext.ClientContext[this._Name] == null ||
31 // Csla.ApplicationContext.GlobalContext[this._Name] == null)
32 //{
33 // return true;
34 //}
35 return false;
36 }
37 }
38 }
39
40 public AppContextThread(string Name)
41 {
42 this._Name = Name;
43 }
44
45 public void Stop()
46 {
47 _run = false;
48 }
49
50 public void Run()
51 {
52 lock (this)
53 {
54 TestResults.Add(this._Name, this._Name);
55 //Csla.ApplicationContext.ClientContext.Add(this._Name, this._Name);
56 }
57 while (_run)
58 {
59 //if (this.Removed) AppContextThread.StaticRemoved = true;
60 Thread.Sleep(10);
61 }
62 }
63 }
64}
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