Ejemplo n.º 1
0
        public static int Main(string[] args)
        {
            AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(AssemblyLoadHandler);
            if (XmlIsLoaded())
            {
                return((int)ReturnValues.ALREADYLOADED);
            }
            retValue = ReturnValues.GOOD;
            LocalClass local = BuildSomething();

            return((int)retValue);
        }
Ejemplo n.º 2
0
        static LocalClass BuildSomething()
        {
            XamlSchemaContext schema       = new XamlSchemaContext();
            XamlObjectWriter  xow          = new XamlObjectWriter(schema);
            XamlType          xamlType     = schema.GetXamlType(typeof(LocalClass));
            XamlMember        xamlProperty = xamlType.GetMember("Title");

            xow.WriteStartObject(xamlType);
            xow.WriteStartMember(xamlProperty);
            xow.WriteValue("This is a string");
            xow.WriteEndMember();
            xow.WriteEndObject();

            object o = xow.Result;

            LocalClass local = (LocalClass)o;

            return(local);
        }