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) )); }
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)); }