Esempio n. 1
0
        private void determineElementName(ElementRequest request)
        {
            // TODO -- this is a klooge because of the tag wrapping around partials
            if (request.Accessor == null)
            {
                return;
            }

            var prefix = ElementPrefix ?? string.Empty;

            request.ElementId = prefix + _namingConvention.GetName(typeof(T), request.Accessor);
        }
Esempio n. 2
0
 public override void Activate(ElementRequest request)
 {
     request.ElementId = string.IsNullOrEmpty(request.ElementId)
         ? _naming.GetName(request.HolderType(), request.Accessor)
         : request.ElementId;
 }
Esempio n. 3
0
        private void determineElementName(ElementRequest request)
        {
            string str = ElementPrefix ?? string.Empty;

            request.ElementId = str + _namingConvention.GetName(typeof(T), request.Accessor);
        }
 public static string GetName <TModel, TProperty>(
     this IElementNamingConvention elementNaming,
     Expression <Func <TModel, TProperty> > property)
 {
     return(elementNaming.GetName(typeof(TModel), property.ToAccessor()));
 }