Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/StorableAttributeTests.cs @ 17960

Last change on this file since 17960 was 17180, checked in by swagner, 5 years ago

#2875: Removed years in copyrights

File size: 2.5 KB
RevLine 
[6846]1#region License Information
2/* HeuristicLab
[17180]3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
[6846]4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
[16565]22using HEAL.Attic;
[6846]23
[9764]24namespace HeuristicLab.Persistence.Tests {
[6846]25
[16565]26  [StorableType("EF55A82D-7D9B-486E-B811-4DCC389FDB05")]
[6846]27  class DemoClass {
28
29    [Storable(Name = "TestProperty", DefaultValue = 12)]
30    public object o = null;
31
32    [Storable]
33    public int x = 2;
34
35    public int y = 0;
[16565]36
37    [StorableConstructor]
38    protected DemoClass(StorableConstructorFlag _) {
39    }
40    public DemoClass() {
41    }
[6846]42  }
43
[16565]44  [StorableType("31F18F9A-C25D-449D-900A-FEBF95D7CE39")]
[6846]45  class Base {
46    public string baseName;
47    [Storable]
48    public virtual string Name {
49      get { return "Base"; }
50      set { baseName = value; }
51    }
[16565]52
53    [StorableConstructor]
54    protected Base(StorableConstructorFlag _) {
55    }
56    public Base() {
57    }
[6846]58  }
59
[16565]60  [StorableType("DF26C284-08C4-4703-A1A4-AFE834079B85")]
[6846]61  class Override : Base {
62    [Storable]
63    public override string Name {
64      get { return "Override"; }
65      set { base.Name = value; }
66    }
[16565]67
68    [StorableConstructor]
69    protected Override(StorableConstructorFlag _) : base(_) {
70    }
71    public Override() {
72    }
[6846]73  }
74
[16565]75  [StorableType("6BFB1984-6670-4D5E-AEAC-3E77C627AF98")]
[6846]76  class Intermediate : Override {
[16565]77    [StorableConstructor]
78    protected Intermediate(StorableConstructorFlag _) : base(_) {
79    }
80    public Intermediate() {
81    }
[6846]82  }
83
[16565]84  [StorableType("856F9BDB-A20C-4B80-981B-5B4F5188FBCD")]
[6846]85  class New : Intermediate {
86    public string newName;
87    [Storable]
88    public new string Name {
89      get { return "New"; }
90      set { newName = value; }
91    }
[16565]92
93    [StorableConstructor]
94    protected New(StorableConstructorFlag _) : base(_) {
95    }
96    public New() {
97    }
[6846]98  }
99}
Note: See TracBrowser for help on using the repository browser.