Changeset 6224 for branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs
- Timestamp:
- 05/17/11 15:10:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs
r5445 r6224 30 30 public sealed class StorableClassAttribute : Attribute { 31 31 32 33 /// <summary>34 /// Specify how members are selected for serialization.35 /// </summary>36 public StorableClassType Type { get; private set; }37 38 /// <summary>39 /// Mark a class to be serialize by the <c>StorableSerizlier</c>40 /// </summary>41 /// <param name="type">The storable class type.</param>42 public StorableClassAttribute(StorableClassType type) {43 Type = type;44 }45 46 32 /// <summary> 47 33 /// Initializes a new instance of the <see cref="StorableClassAttribute"/> class. … … 51 37 public StorableClassAttribute() { } 52 38 53 /// <summary>54 /// Checks if the <see cref="StorableClassAttribute"/> is present on a type.55 /// </summary>56 /// <param name="type">The type which should be checked for the <see cref="StorableClassAttribute"/></param>57 /// <returns></returns>58 public static bool IsStorableClass(Type type) {59 object[] attribs = type.GetCustomAttributes(typeof(StorableClassAttribute), false);60 return attribs.Length > 0;61 }62 63 39 } 64 40 }
Note: See TracChangeset
for help on using the changeset viewer.