Treefrog.Framework.Model.StringProperty.Parse C# (CSharp) Method

Parse() public method

public Parse ( string value ) : void
value string
return void
        public override void Parse(string value)
        {
            Value = value;
        }

Usage Example

Ejemplo n.º 1
0
        public void ParseString()
        {
            Property prop = new StringProperty("test", "orange");
            AttachEvents(prop);

            prop.ValueChanged += (s, e) =>
            {
                Assert.AreSame(prop, s);
                Assert.AreEqual("green", ((StringProperty)prop).Value);
            };

            prop.Parse("green");

            Assert.AreEqual("green", ((StringProperty)prop).Value);
            Assert.AreEqual(EventFlags.ValueChanged | EventFlags.Modified, _eventsFired);
        }