Esempio n. 1
0
        /// <summary>
        /// Busqueda en el diccionario
        /// </summary>
        /// <param name="property">Propiedades de las entidades</param>
        /// <param name="index">Index de las entidades</param>
        /// <returns></returns>
        public EntitySearchDisplayInfo GetInfoFromProperty(KindProperty property, int index)
        {
            var indexName = ResourcesHelper.GetName(property, index);

            var rm = ResourcesHelper.GetResourceCollection(property);

            var info = new EntitySearchDisplayInfo
            {
                Title       = new ResourceManager(rm.Titles).GetString(indexName),
                Column      = rm.Columns == null ? null : new ResourceManager(rm.Columns).GetString(indexName),
                Description = new ResourceManager(rm.Descriptions).GetString(indexName),
                ShortName   = new ResourceManager(rm.ShortNames).GetString(indexName),
            };

            if (info.Title == null && info.Column == null && info.Description == null || info.ShortName == null)
            {
                return(null);
            }

            return(info);
        }