コード例 #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);
                    }
                }
            }
        }
コード例 #2
0
        public CompatIos()
        {
            IgnorePaths.Add("Compat.iOS.cs");

            GlobalReplacements.Add(new XamarinCompatReplacement("MonoTouch"));
            EnumBackingTypeReplacements.Add(new XamarinCompatReplacement("MonoTouch"));
        }
コード例 #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>");
                }
            }
        }
コード例 #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"));
        }
コード例 #5
0
        public void Load(Profile other)
        {
            if (other.Name != null)
            {
                Name = other.Name;
            }

            IgnorePaths.AddRange(other.IgnorePaths);
            CompilerExecutable = other.CompilerExecutable;
            CompilerOptions.AddRange(other.CompilerOptions);
            GlobalReplacements.AddRange(other.GlobalReplacements);
            EnumBackingTypeReplacements.AddRange(other.EnumBackingTypeReplacements);
        }
コード例 #6
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());
        }