Beispiel #1
0
 public PeriodicValue(IPropertyValue[] options, IEnumerable <Token> tokens, string[] labels)
 {
     _top     = options[0];
     _right   = options[1] ?? _top;
     _bottom  = options[2] ?? _top;
     _left    = options[3] ?? _right;
     Original = new TokenValue(tokens);
     _labels  = labels;
 }
Beispiel #2
0
        internal bool TrySetValue(TokenValue newTokenValue)
        {
            var value = Converter.Convert(newTokenValue ?? DotNetCSS.TokenValue.Initial);

            if (value != null)
            {
                DeclaredValue = value;
                return(true);
            }

            return(false);
        }
Beispiel #3
0
        internal bool TrySetValue(TokenValue tokenValue)
        {
            bool result;

            if (tokenValue == null)
            {
                result = !IsMinimum && !IsMaximum && Converter.ConvertDefault() != null;
            }
            else
            {
                result = Converter.Convert(tokenValue) != null;
            }

            if (result)
            {
                _tokenValue = tokenValue;
            }

            return(result);
        }
Beispiel #4
0
 public BorderRadiusValue(IPropertyValue horizontal, IPropertyValue vertical, TokenValue original)
 {
     _horizontal = horizontal;
     _vertical   = vertical;
     Original    = original;
 }
Beispiel #5
0
 public OptionsValue(IPropertyValue[] options, IEnumerable <Token> tokens)
 {
     _options = options;
     Original = new TokenValue(tokens);
 }
Beispiel #6
0
 public AnyValue(IEnumerable <Token> tokens)
 {
     Original = new TokenValue(tokens);
 }
Beispiel #7
0
 public ArgumentsValue(IPropertyValue[] arguments, IEnumerable <Token> tokens)
 {
     _arguments = arguments;
     Original   = new TokenValue(tokens);
 }
Beispiel #8
0
 public FunctionValue(string name, IPropertyValue arguments, IEnumerable <Token> tokens)
 {
     _name      = name;
     _arguments = arguments;
     Original   = new TokenValue(tokens);
 }
Beispiel #9
0
 public StopValue(IPropertyValue color, IPropertyValue position, IEnumerable <Token> tokens)
 {
     _color    = color;
     _position = position;
     Original  = new TokenValue(tokens);
 }
Beispiel #10
0
 public UrlValue(string value, IEnumerable <Token> tokens)
 {
     _value   = value;
     Original = new TokenValue(tokens);
 }
Beispiel #11
0
 public DeclarationCondition(Property property, TokenValue tokenValue)
 {
     _property   = property;
     _tokenValue = tokenValue;
 }
Beispiel #12
0
 public StartValue(string start, IPropertyValue value, IEnumerable <Token> tokens)
 {
     _start   = start;
     _value   = value;
     Original = new TokenValue(tokens);
 }
Beispiel #13
0
 public StringsValue(string[] values, IEnumerable <Token> tokens)
 {
     _values  = values;
     Original = new TokenValue(tokens);
 }
Beispiel #14
0
 public IdentifierValue(string identifier, IEnumerable <Token> tokens)
 {
     CssText  = identifier;
     Original = new TokenValue(tokens);
 }
Beispiel #15
0
 public ListValue(IPropertyValue[] values, IEnumerable <Token> tokens)
 {
     _values  = values;
     Original = new TokenValue(tokens);
 }
Beispiel #16
0
 public StructValue(T value, IEnumerable <Token> tokens)
 {
     _value   = value;
     Original = new TokenValue(tokens);
 }
Beispiel #17
0
 public GradientValue(IPropertyValue initial, IPropertyValue[] stops, IEnumerable <Token> tokens)
 {
     _initial = initial;
     _stops   = stops;
     Original = new TokenValue(tokens);
 }