Changeset 14927 for branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StorableAttribute.cs
- Timestamp:
- 05/04/17 17:19:35 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/StorableAttribute.cs
r14925 r14927 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using System.Reflection; 23 24 using System.Text; 24 25 25 namespace HeuristicLab.Persistence .Default.CompositeSerializers.Storable{26 namespace HeuristicLab.Persistence { 26 27 27 28 28 29 /// <summary> 29 30 /// Mark the member of a class to be considered by the <c>StorableSerializer</c>. 30 /// The class must be marked as <c>[StorableClass ]</c> and the31 /// <c>Storable ClassType</c> should be set to <c>MarkedOnly</c> for31 /// The class must be marked as <c>[StorableClass("05FE6F11-87C6-435E-800A-166AFACCF5AC")]</c> and the 32 /// <c>StorableMemberSelection</c> should be set to <c>MarkedOnly</c> for 32 33 /// this attribute to kick in. 33 34 /// </summary> … … 37 38 Inherited = false)] 38 39 public class StorableAttribute : Attribute { 40 public static bool IsStorable(MemberInfo memberInfo) { 41 return Attribute.IsDefined(memberInfo, typeof(StorableAttribute), false); 42 } 43 public static StorableAttribute GetStorableAttribute(MemberInfo memberInfo) { 44 return (StorableAttribute)Attribute.GetCustomAttribute(memberInfo, typeof(StorableAttribute), false); 45 } 39 46 40 47 /// <summary>
Note: See TracChangeset
for help on using the changeset viewer.