Exemplo n.º 1
0
        public static string ExpandProperties(object target, string inString, char startSeperator, char endSeperator, char formatSeperator,
                                              IChoPropertyReplacer propertyReplacer)
        {
            ChoGuard.ArgumentNotNull(propertyReplacer, "Property Replacer");

            return(ExpandProperties(target, inString, startSeperator, endSeperator, formatSeperator, new IChoPropertyReplacer[] { propertyReplacer }));
        }
Exemplo n.º 2
0
        public bool Add(IChoPropertyReplacer propertyReplacer)
        {
            ChoGuard.ArgumentNotNull(propertyReplacer, "PropertyReplacer");
            lock (_padLock)
            {
                if (_propertyReplacers.ContainsKey(propertyReplacer.Name))
                {
                    return(false);
                }

                _propertyReplacers.Add(propertyReplacer.Name, propertyReplacer);
                return(true);
            }
        }
Exemplo n.º 3
0
 public bool Remove(IChoPropertyReplacer propertyReplacer)
 {
     ChoGuard.ArgumentNotNull(propertyReplacer, "PropertyReplacer");
     return(Remove(propertyReplacer.GetType().Name));
 }
Exemplo n.º 4
0
 public static string ExpandProperties(string inString, char startSeperator, char endSeperator, char formatSeperator,
                                       IChoPropertyReplacer propertyReplacer)
 {
     return(ExpandProperties(null, inString, startSeperator, endSeperator, formatSeperator, propertyReplacer));
 }
Exemplo n.º 5
0
        public static string ExpandProperties(object target, string inString, IChoPropertyReplacer propertyReplacer)
        {
            ChoGuard.ArgumentNotNull(propertyReplacer, "Property Replacer");

            return(ExpandProperties(target, inString, new IChoPropertyReplacer[] { propertyReplacer }));
        }
Exemplo n.º 6
0
        //public static string ExpandProperties(string inString, ChoCustomPropertyReplaceHandler propertyReplaceHandler)
        //{
        //    return ExpandProperties(null, inString, propertyReplaceHandler);
        //}

        //public static string ExpandProperties(object target, string inString, ChoCustomPropertyReplaceHandler propertyReplaceHandler)
        //{
        //    return ExpandProperties(target, inString, StartSeperator, EndSeperator, FormatSeperator, new ChoCustomPropertyReplacer(propertyReplaceHandler));
        //}

        public static string ExpandProperties(string inString, IChoPropertyReplacer propertyReplacer)
        {
            return(ExpandProperties(null, inString, propertyReplacer));
        }