Beispiel #1
0
        protected TValue[] GetArray <TValue>() where TValue : IConvertible
        {
            var defval = this.GetMetaDataValue("Default", default(TValue[]));

            var defarray = defval?.Select(item => item.ConvertToString <TValue>())
                           .ToArray();

            var array = _Properties.GetArray(SerializationKey, defarray);

            return(array?
                   .Select(item => item.ConvertToValue <TValue>())
                   .ToArray());
        }
Beispiel #2
0
        public static Guid[] GetReferenceIds(this IPropertyProvider properties, string key, params string[] defval)
        {
            var values = properties.GetArray(key, defval);

            if (values == null)
            {
                values = new string[0];
            }

            return(values
                   .Select(item => _ParseGuidReference(item))
                   .ToArray());
        }
Beispiel #3
0
        public string[] GetArray(string serializationKey, string[] defval)
        {
            var underlayingCollection = GetDefaultArray(serializationKey, defval);

            return(_Current.GetArray(serializationKey, underlayingCollection));
        }
Beispiel #4
0
 public string[] GetArray(string serializationKey, string[] defval)
 {
     return(_Properties.GetArray(serializationKey, defval));
 }
Beispiel #5
0
 public string[] GetDefaultArray(string serializationKey, string[] defval)
 {
     return(_Base == null ? defval : _Base.GetArray(serializationKey, defval));
 }