Last change
on this file since 1542 was
1542,
checked in by epitzer, 15 years ago
|
Numerous small changes, coding conventions, renames, mini refactoring (#548)
|
File size:
655 bytes
|
Line | |
---|
1 | using System.Collections.Generic;
|
---|
2 |
|
---|
3 | namespace HeuristicLab.Persistence.Core {
|
---|
4 |
|
---|
5 | public class Tag {
|
---|
6 | internal List<Thunk> globalFinalFixes; // reference to final fixes of Deserializer
|
---|
7 | public string Name { get; private set; }
|
---|
8 | public object Value { get; set; }
|
---|
9 |
|
---|
10 | public Tag(string name, object value) {
|
---|
11 | Name = name;
|
---|
12 | Value = value;
|
---|
13 | }
|
---|
14 | public Tag(object value) {
|
---|
15 | Name = null;
|
---|
16 | Value = value;
|
---|
17 | }
|
---|
18 | public void SafeSet(Setter setter) {
|
---|
19 | if ( Value as ParentReference != null)
|
---|
20 | globalFinalFixes.Add(() => setter(Value));
|
---|
21 | else
|
---|
22 | setter(Value);
|
---|
23 | }
|
---|
24 | }
|
---|
25 |
|
---|
26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.