public static AssignmentExpressionSyntax GenerateInitializerSyntax(this EmbeddedDrawableProperty prop)
 {
     return(AssignmentExpression(
                kind: SyntaxKind.SimpleAssignmentExpression,
                left: IdentifierName(prop.Name),
                right: prop.ExpressionGenerator.GenerateSyntax(prop.ParsedValue, prop.PropertyInfo.PropertyType)
                ));
 }
예제 #2
0
        public static DrawableProperty Parse(IPropertyInfo property, string value)
        {
            if (LocalBoundDrawableProperty.Syntax.IsMatch(value))
            {
                return(LocalBoundDrawableProperty.Parse(property, value));
            }

            if (ConfigBoundDrawableProperty.Syntax.IsMatch(value))
            {
                return(ConfigBoundDrawableProperty.Parse(property, value));
            }

            return(EmbeddedDrawableProperty.Parse(property, value));
        }