Esempio n. 1
0
 private static void Persist(ConfigObjC config, string path)
 {
     XmlSerializer serializer = new XmlSerializer(config.GetType());
     using (XmlWriter writer = XmlWriter.Create(path)) {
         serializer.Serialize(writer, config);
     } 
 }
Esempio n. 2
0
        }                                                   // filter system interfaces from generated outout


        public static ConfigObjC ConfigObjCForAssembly(string assemblyXmlPath)
        {
            ConfigObjC config = null;
            string     path   = null;

            if (assemblyXmlPath != null)
            {
                // get the config path
                path = Path.ChangeExtension(assemblyXmlPath, "codegen.config.objc.xml");

                if (File.Exists(path))
                {
                    XmlSerializer deserializer = new XmlSerializer(typeof(ConfigObjC));
                    try
                    {
                        using (XmlReader reader = XmlReader.Create(path))
                        {
                            config = (ConfigObjC)deserializer.Deserialize(reader);
                        }
                    }
                    catch (Exception e)
                    {
                        throw e;
                    }
                }
            }

            if (config == null)
            {
                config = new ConfigObjC();
            }

            return(config);
        }
Esempio n. 3
0
        public bool FilterSystemInterfaces { get; set; }    // filter system interfaces from generated outout


        public static ConfigObjC ConfigObjCForAssembly(string assemblyXmlPath)
        {
            ConfigObjC config = null;
            string path = null;

            if (assemblyXmlPath != null)
            {
                // get the config path
                path = Path.ChangeExtension(assemblyXmlPath, "codegen.config.objc.xml");

                if (File.Exists(path))
                {
                    XmlSerializer deserializer = new XmlSerializer(typeof (ConfigObjC));
                    try
                    {
                        using (XmlReader reader = XmlReader.Create(path))
                        {
                            config = (ConfigObjC) deserializer.Deserialize(reader);
                        }
                    }
                    catch (Exception e)
                    {
                        throw e;
                    }
                }
            }

            if (config == null)
            {
                config = new ConfigObjC();
            }

            return config;
        }
Esempio n. 4
0
        private static void Persist(ConfigObjC config, string path)
        {
            XmlSerializer serializer = new XmlSerializer(config.GetType());

            using (XmlWriter writer = XmlWriter.Create(path)) {
                serializer.Serialize(writer, config);
            }
        }