Open.Core.PropertyListBuilder.GetPropertyValue C# (CSharp) Method

GetPropertyValue() private method

private GetPropertyValue ( object instance, DictionaryEntry property ) : string
instance object
property System.Collections.DictionaryEntry
return string
        private string GetPropertyValue(object instance, DictionaryEntry property)
        {
            // Retrieve the value.
            object value = null;
            bool hasError = false;
            try
            {
                Function func = Helper.Reflection.GetFunction(instance, property.Key);
                if (func != null) value = func.Call(instance);
            }
            catch (Exception e)
            {
                hasError = true;
                value = "ERROR: " + e.Message;
            }

            // Finish up.
            return FormatPropertyValue(value, hasError);
        }