예제 #1
0
        public virtual async Task <Variable> SetProperty(string sPropertyName, Variable argValue)
        {
            sPropertyName = Variable.GetActualPropertyName(sPropertyName, GetProperties());
            switch (sPropertyName)
            {
            case "Name": return(await SetNameProperty(argValue.AsString()));

            case "Color": return(SetColorProperty(argValue.AsString()));

            case "Translate": return(Translate(argValue));

            default: return(Variable.EmptyInstance);
            }
        }
예제 #2
0
        public virtual Variable GetProperty(string sPropertyName, List <Variable> args = null, ParsingScript script = null)
        {
            sPropertyName = Variable.GetActualPropertyName(sPropertyName, GetProperties());
            switch (sPropertyName)
            {
            case "Name": return(GetNameProperty());

            case "Color": return(GetColorProperty());

            case "Translate":
                return(args != null && args.Count > 0 ?
                       Translate(args[0]) : Variable.EmptyInstance);

            default:
                return(Variable.EmptyInstance);
            }
        }