~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Tests/XamlDom/ExampleClass.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.ComponentModel;
 
6
using System.Windows.Markup;
 
7
 
 
8
namespace ICSharpCode.WpfDesign.Tests.XamlDom
 
9
{
 
10
        [ContentProperty("StringProp")]
 
11
        public class ExampleClass : ISupportInitialize
 
12
        {
 
13
                internal static int nextUniqueIndex;
 
14
                
 
15
                string stringProp, otherProp, otherProp2;
 
16
                int uniqueIndex = nextUniqueIndex++;
 
17
                
 
18
                public ExampleClass()
 
19
                {
 
20
                        TestHelperLog.Log("ctor" + Identity);
 
21
                }
 
22
                
 
23
                protected string Identity {
 
24
                        get {
 
25
                                return GetType().Name + " (" + uniqueIndex + ")";
 
26
                        }
 
27
                }
 
28
                
 
29
                void ISupportInitialize.BeginInit()
 
30
                {
 
31
                        TestHelperLog.Log("BeginInit " + Identity);
 
32
                }
 
33
                
 
34
                void ISupportInitialize.EndInit()
 
35
                {
 
36
                        TestHelperLog.Log("EndInit " + Identity);
 
37
                }
 
38
                
 
39
                public string StringProp {
 
40
                        get {
 
41
                                TestHelperLog.Log("StringProp.get " + Identity);
 
42
                                return stringProp;
 
43
                        }
 
44
                        set {
 
45
                                TestHelperLog.Log("StringProp.set to " + value + " - " + Identity);
 
46
                                stringProp = value;
 
47
                        }
 
48
                }
 
49
                
 
50
                public string OtherProp {
 
51
                        get {
 
52
                                TestHelperLog.Log("OtherProp.get " + Identity);
 
53
                                return otherProp;
 
54
                        }
 
55
                        set {
 
56
                                TestHelperLog.Log("OtherProp.set to " + value + " - " + Identity);
 
57
                                otherProp = value;
 
58
                        }
 
59
                }
 
60
                
 
61
                public string OtherProp2 {
 
62
                        get {
 
63
                                TestHelperLog.Log("OtherProp2.get " + Identity);
 
64
                                return otherProp2;
 
65
                        }
 
66
                        set {
 
67
                                TestHelperLog.Log("OtherProp2.set to " + value + " - " + Identity);
 
68
                                otherProp2 = value;
 
69
                        }
 
70
                }
 
71
                
 
72
                object objectProp;
 
73
                
 
74
                public object ObjectProp {
 
75
                        get {
 
76
                                TestHelperLog.Log("ObjectProp.get " + Identity);
 
77
                                return objectProp;
 
78
                        }
 
79
                        set {
 
80
                                TestHelperLog.Log("ObjectProp.set to " + value + " - " + Identity);
 
81
                                objectProp = value;
 
82
                        }
 
83
                }
 
84
        }
 
85
}