public bool IsSame(PropertyClass other) { return (MyStringProperty == null ? other.MyStringProperty == null : MyStringProperty.Equals(other.MyStringProperty)); }
public void Property() { var value = new PropertyClass { MyStringProperty = "Hello World!" }; var w = new Writer(); var cs = new ClassSerializer(typeof(PropertyClass)); Assert.True(cs.Write(w, value, null)); Assert.AreEqual("!Test.PropertyClass{MyStringProperty:\"Hello World!\"}", w.ToString()); var r = new Reader(w.ToString()); var result = cs.Read(r, null, null) as PropertyClass; Assert.IsNotNull(result); Assert.IsFalse(r.AnyLeft, "Any characters left."); Assert.IsTrue(value.IsSame(result), "Read back value is not the same."); }
public CascadedClass(PropertyClass myPropertyInstance) { MyEmptyClass = new EmptyClass(); MyPropertyClass = myPropertyInstance; }
public CascadedClass() { MyEmptyClass = new EmptyClass(); MyPropertyClass = new PropertyClass(); }