Regextra.Template.GetSinglePropertyValue C# (CSharp) Méthode

GetSinglePropertyValue() private static méthode

private static GetSinglePropertyValue ( object item, Match m, IFormatProvider provider ) : string
item object
m System.Text.RegularExpressions.Match
provider IFormatProvider
Résultat string
        private static string GetSinglePropertyValue(object item, Match m, IFormatProvider provider)
        {
            object current;
            try
            {
                current = GetPropertyValue(item, m.Groups[PROPERTY].Value);
            }
            catch (ArgumentOutOfRangeException ex)
            {
                throw new MissingFieldException(item.GetType().Name, m.Groups[PROPERTY].Value);
            }

            if (m.Groups[FORMAT].Value != String.Empty)
            {
                string result = FormatProperty(current, m, provider);
                return result;
            }
            else
            {
                return current.ToString();
            }
        }