Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.Tests/HeuristicLab.Persistence.Attic/StorableAttributeTests.cs @ 17231

Last change on this file since 17231 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
[16559]22using HEAL.Attic;
[6846]23
[16559]24namespace HeuristicLab.Persistence.Attic.Tests {
[6846]25
[16462]26  [StorableType("E0862640-FD57-4F1B-929D-03E38D8EA5D3")]
[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;
[16462]36
37    [StorableConstructor]
38    protected DemoClass(StorableConstructorFlag _) {
39    }
40    public DemoClass() {
41    }
[6846]42  }
43
[16462]44  [StorableType("7C5431ED-9754-44B9-870D-F62E822A74CE")]
[6846]45  class Base {
46    public string baseName;
47    [Storable]
48    public virtual string Name {
49      get { return "Base"; }
50      set { baseName = value; }
51    }
[16462]52
53    [StorableConstructor]
54    protected Base(StorableConstructorFlag _) {
55    }
56    public Base() {
57    }
[6846]58  }
59
[16462]60  [StorableType("39BC0BDD-C5F4-4FAA-B227-558909E7AE6C")]
[6846]61  class Override : Base {
62    [Storable]
63    public override string Name {
64      get { return "Override"; }
65      set { base.Name = value; }
66    }
[16462]67
68    [StorableConstructor]
69    protected Override(StorableConstructorFlag _) : base(_) {
70    }
71    public Override() {
72    }
[6846]73  }
74
[16462]75  [StorableType("50E13067-A343-4059-B44B-54511ED813AE")]
[6846]76  class Intermediate : Override {
[16462]77    [StorableConstructor]
78    protected Intermediate(StorableConstructorFlag _) : base(_) {
79    }
80    public Intermediate() {
81    }
[6846]82  }
83
[16462]84  [StorableType("DA7868B2-81CC-48AC-AEC3-2E3AD2E0A34E")]
[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    }
[16462]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.