Пример #1
0
 public virtual bool HasAttribute <_T0>(StructGeneralAttribute.Key <_T0> attribute)
     where _T0 : StructGeneralAttribute
 {
     return(attributes.ContainsKey(attribute.GetName()));
 }
Пример #2
0
 public virtual T GetAttribute <T>(StructGeneralAttribute.Key <T> attribute)
     where T : StructGeneralAttribute
 {
     //noinspection unchecked
     return((T)attributes.GetOrNull(attribute.GetName()));
 }