Exemplo n.º 1
0
        protected T GetProperty <T>(string propertyName)
        {
            var propertyValue = (T)this[propertyName];

            if (propertyValue != null || BaseBot == null)
            {
                return(propertyValue);
            }

            return(BaseBot.GetProperty <T>(propertyName));
        }
Exemplo n.º 2
0
        protected string GetProperty(string propertyName)
        {
            var propertyValue = (string)this[propertyName];

            // We have to check for empty string since missing string elements are deserialized as string.Empty!?
            if (!string.IsNullOrEmpty(propertyValue) || BaseBot == null)
            {
                return(propertyValue);
            }

            return(BaseBot.GetProperty(propertyName));
        }