Пример #1
0
 public void FunctionsTest(string expression, double val, CssValueType unit)
 {
     var expr = Expression.Parse(expression);
     var eval = expr.Evaluate(new ScssEnvironment());
     Assert.AreEqual(val, eval.Number);
     Assert.AreEqual(unit, eval.Type);
 }
Пример #2
0
    private bool method_0(string A_0)
    {
        int num = 13;

        if ((A_0.StartsWith(BookmarkStart.b("ᐲ", 13)) || A_0.StartsWith(BookmarkStart.b("ᄲ", num))) && (A_0.Length > 1))
        {
            this.object_0       = A_0.Substring(1, A_0.Length - 2);
            this.cssValueType_0 = CssValueType.String;
            return(true);
        }
        return(false);
    }
Пример #3
0
    private bool method_1(string A_0)
    {
        Color color = smethod_9(A_0);

        if (!color.IsEmpty)
        {
            this.object_0       = color;
            this.cssValueType_0 = CssValueType.Color;
            return(true);
        }
        return(false);
    }
Пример #4
0
 private Class1125(string A_0)
 {
     if (!this.method_0(A_0))
     {
         string str = A_0.ToLower();
         if (((!this.method_1(str) && !this.method_2(str)) && !this.method_4(str)) && !this.method_5(str))
         {
             this.object_0       = A_0;
             this.cssValueType_0 = CssValueType.Identifier;
         }
     }
 }
Пример #5
0
    private bool method_5(string A_0)
    {
        double d = Class1041.smethod_15(A_0);

        if (!double.IsNaN(d))
        {
            this.object_0       = d;
            this.cssValueType_0 = CssValueType.Number;
            return(true);
        }
        return(false);
    }
Пример #6
0
 private bool method_4(string A_0)
 {
     if (A_0.EndsWith(BookmarkStart.b("ᜱ", 12)))
     {
         double d = Class1041.smethod_15(A_0.Substring(0, A_0.Length - 1));
         if (!double.IsNaN(d))
         {
             this.object_0       = d;
             this.cssValueType_0 = CssValueType.Percentage;
             return(true);
         }
     }
     return(false);
 }
Пример #7
0
 private bool method_3(string A_0, string A_1, CssUnitType A_2)
 {
     if (A_0.EndsWith(A_1))
     {
         double d = Class1041.smethod_15(A_0.Substring(0, A_0.Length - A_1.Length));
         if (!double.IsNaN(d))
         {
             this.object_0       = d;
             this.cssValueType_0 = CssValueType.Length;
             this.cssUnitType_0  = A_2;
             return(true);
         }
     }
     return(false);
 }
Пример #8
0
 /// <summary>
 /// Creates a new CSS value.
 /// </summary>
 /// <param name="text">The text that represents the value.</param>
 /// <param name="type">The type of of the value.</param>
 CssValue(String text, CssValueType type)
 {
     _text = text;
     _type = type;
 }
Пример #9
0
 /// <summary>
 /// Creates a new CSS value.
 /// </summary>
 internal CSSValue()
 {
     _type = CssValueType.Custom;
 }
Пример #10
0
 /// <summary>
 /// Constructor for CssValue
 /// </summary>
 /// <param name="type">The type of value</param>
 /// <param name="cssText">The entire content of the value</param>
 /// <param name="readOnly">Specifies if the instance is read-only</param>
 public CssValue(CssValueType type, string cssText, bool readOnly)
 {
     _cssText      = cssText.Trim();
     _cssValueType = type;
     _readOnly     = readOnly;
 }
Пример #11
0
 /// <summary>
 /// Creates a new CSS value.
 /// </summary>
 internal CSSValue()
 {
     _type = CssValueType.Custom;
 }
Пример #12
0
 /// <summary>
 /// Constructor for CssValue
 /// </summary>
 /// <param name="type">The type of value</param>
 /// <param name="cssText">The entire content of the value</param>
 /// <param name="readOnly">Specifies if the instance is read-only</param>
 public CssValue(CssValueType type, string cssText, bool readOnly)
 {
     _cssText = cssText.Trim();
     _cssValueType = type;
     _readOnly = readOnly;
 }
Пример #13
0
 /// <summary>
 /// Creates a new CSS value.
 /// </summary>
 /// <param name="type">The type of of the value.</param>
 internal CSSValue(CssValueType type = CssValueType.Custom)
 {
     _type = type;
 }
Пример #14
0
 public UnitExpression(Expression inner, CssValueType type)
 {
     Inner = inner;
     Type = type;
 }
Пример #15
0
 private Class1125(object A_0, CssValueType A_1, CssUnitType A_2)
 {
     this.object_0       = A_0;
     this.cssValueType_0 = A_1;
     this.cssUnitType_0  = A_2;
 }