//private string _readonlyName;

        public Constructorless(SharedObject shared, AbstractObject abstractObject, string readonlyName, string name)
        {
            _shared        = shared;
            AbstractObject = abstractObject;
            _readonlyName  = readonlyName;
            _name          = name;
        }
        public void NoDefaultConstructor()
        {
            var shared = new SharedObject();

            var target = new Constructorless(shared, new ConcreteObject("John"), "George", "Ringo");

            var serializedResult = DataContractXmlSerializer <Constructorless> .ToString(target);

            Assert.IsNotNull(serializedResult);

            var deserializedResult = DataContractXmlSerializer <Constructorless> .FromString(serializedResult);

            deserializedResult.Initialize(shared);

            Assert.AreEqual("George", deserializedResult.ReadonlyName);
            Assert.AreEqual("Ringo", deserializedResult.Name);
            //Assert.AreEqual("John", deserializedResult.AbstractObject.Name);
        }
 public void Initialize(SharedObject shared)
 {
     _shared = shared;
 }