Exemplo n.º 1
0
        void InitCollections()
        {
            dataFiles  = new StringCollection();
            assemblies = new StringCollection();

            XmlNodeList elems = Element.SelectNodes("Runtime/*");

            foreach (XmlElement elem in elems)
            {
                if (elem.LocalName == "Import")
                {
                    string asm = elem.GetAttribute("assembly");
                    if (asm.Length > 0)
                    {
                        assemblies.Add(asm);
                    }
                    else
                    {
                        string file = elem.GetAttribute("file");
                        if (file.Length > 0)
                        {
                            dataFiles.Add(file);
                        }
                    }
                }
                else if (elem.LocalName == "ScanExclude")
                {
                    string path = elem.GetAttribute("path");
                    if (path.Length > 0)
                    {
                        IgnorePaths.Add(path);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public CompatIos()
        {
            IgnorePaths.Add("Compat.iOS.cs");

            GlobalReplacements.Add(new XamarinCompatReplacement("MonoTouch"));
            EnumBackingTypeReplacements.Add(new XamarinCompatReplacement("MonoTouch"));
        }
Exemplo n.º 3
0
        void ReadPmcsElement(XmlTextReader reader, string basePath)
        {
            while (reader.Read())
            {
                if (!reader.IsStartElement())
                {
                    continue;
                }

                switch (reader.Name)
                {
                case "replacements":
                    ReadReplacementsElement(reader);
                    break;

                case "compiler":
                    ReadCompilerElement(reader);
                    break;

                case "ignore":
                    IgnorePaths.Add(reader.ReadString());
                    break;

                case "include":
                    Load(Path.Combine(basePath, reader.ReadString()));
                    break;

                default:
                    throw new XmlException("<pmcs>: unexpected element <" +
                                           reader.Name + ">; expected <replacements> or <compiler>");
                }
            }
        }
Exemplo n.º 4
0
        public CompatMac()
        {
            CompilerOptions.Add("-sdk:4.0");
            CompilerOptions.Add("-define:ARCH_32");
            CompilerOptions.Add("-define:XAMMAC_SYSTEM_MONO");

            IgnorePaths.Add("Compat.mac.cs");

            GlobalReplacements.Add(new XamarinCompatReplacement("MonoMac"));
            EnumBackingTypeReplacements.Add(new XamarinCompatReplacement("MonoMac"));
        }
Exemplo n.º 5
0
        protected XamCore2Common(ArchDefine arch)
        {
            CompilerOptions.Add("-define:XAMCORE_2_0");

            if (arch != ArchDefine.None)
            {
                CompilerOptions.Add("-define:" + arch.ToString());
            }

            IgnorePaths.Add("Compat.mac.cs");
            IgnorePaths.Add("Compat.iOS.cs");

            GlobalReplacements.Add(new Xamarin20Replacement());
            EnumBackingTypeReplacements.Add(new Xamarin20Replacement());
        }