5 namespace SiliconStudio.Core.Reflection
7 internal sealed
class ShadowAttributes
9 private readonly ShadowContainer container;
10 private readonly
object memberKey;
12 public ShadowAttributes(ShadowContainer container,
object memberKey)
14 if (container == null)
throw new ArgumentNullException(
"container");
15 if (memberKey == null)
throw new ArgumentNullException(
"memberKey");
17 this.container = container;
18 this.memberKey = memberKey;
21 public ShadowContainer Container
37 public bool HasAttribute(PropertyKey key)
39 return Attributes.ContainsKey(key);
42 public T GetAttribute<T>(PropertyKey<T> key)
44 return Attributes.Get(key);
47 public bool TryGetAttribute<T>(PropertyKey<T> key, out
T value)
49 return Attributes.TryGetValue(key, out value);
52 public void SetAttribute<T>(PropertyKey<T> key,
T value)
54 Attributes.SetObject(key, value);
57 public PropertyContainer Attributes;