示例#1
0
        internal static T?GetEnumPropertyOrNull <T>(IAnchorStoreObject item, StorePropertyDefinition propertyDefinition) where T : struct
        {
            object valueOrDefault = item.GetValueOrDefault <object>(propertyDefinition, null);

            if (valueOrDefault == null)
            {
                return(null);
            }
            return(new T?(AnchorHelper.GetEnumProperty <T>(propertyDefinition, valueOrDefault)));
        }
示例#2
0
 internal static T GetEnumProperty <T>(IAnchorStoreObject item, StorePropertyDefinition propertyDefinition) where T : struct
 {
     return(AnchorHelper.GetEnumProperty <T>(propertyDefinition, item[propertyDefinition]));
 }