示例#1
0
        public void PositionalParameters1()
        {
            // Note: this can be read, but cannot be written to XML.
            var obj = new PositionalParametersClass1("foo", 5);
            var r   = new XamlObjectReader(obj);

            PositionalParameters1(r);
        }
示例#2
0
        public void Write_PositionalParameters1()
        {
            // PositionalParameters can only be written when the
            // instance is NOT the root object.
            //
            // A single positional parameter can be written as an
            // attribute, but there are two in PositionalParameters1.
            //
            // A default constructor could be used to not use
            // PositionalParameters, but there isn't in this type.
            var obj = new PositionalParametersClass1("foo", 5);

            XamlServices.Save(obj);
        }
示例#3
0
 public PositionalParametersWrapper(string foo, int bar)
 {
     Body = new PositionalParametersClass1(foo, bar);
 }