Ejemplo n.º 1
0
        public override void UpdateVars()
        {
            projectReferences = new List <ProjectReference>();
            if (m_Properties.Contains("projectReferences"))
            {
                var el = m_Properties["projectReferences"].AsArray();
                foreach (var value in el.values)
                {
                    PBXElementDict dict = value.AsDict();
                    if (dict.Contains("ProductGroup") && dict.Contains("ProjectRef"))
                    {
                        string group      = dict["ProductGroup"].AsString();
                        string projectRef = dict["ProjectRef"].AsString();
                        projectReferences.Add(ProjectReference.Create(group, projectRef));
                    }
                }
            }
            targets         = GetPropertyList("targets");
            buildConfigList = GetPropertyString("buildConfigurationList");

            // update knownAssetTags
            knownAssetTags = new List <string>();
            if (m_Properties.Contains("attributes"))
            {
                var el = m_Properties["attributes"].AsDict();
                if (el.Contains("knownAssetTags"))
                {
                    var tags = el["knownAssetTags"].AsArray();
                    foreach (var tag in tags.values)
                    {
                        knownAssetTags.Add(tag.AsString());
                    }
                }

                capabilities = new List <PBXCapabilityType.TargetCapabilityPair>();
                teamIDs      = new Dictionary <string, string>();

                if (el.Contains("TargetAttributes"))
                {
                    var targetAttr = el["TargetAttributes"].AsDict();
                    foreach (var attr in targetAttr.values)
                    {
                        if (attr.Key == "DevelopmentTeam")
                        {
                            teamIDs.Add(attr.Key, attr.Value.AsString());
                        }

                        if (attr.Key == "SystemCapabilities")
                        {
                            var caps = el["SystemCapabilities"].AsDict();
                            foreach (var cap in caps.values)
                            {
                                capabilities.Add(new PBXCapabilityType.TargetCapabilityPair(attr.Key, PBXCapabilityType.StringToPBXCapabilityType(cap.Value.AsString())));
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public override void UpdateVars()
        {
            this.projectReferences = new List <ProjectReference>();
            if (this.m_Properties.Contains("projectReferences"))
            {
                foreach (PBXElement pbxElement in this.m_Properties["projectReferences"].AsArray().values)
                {
                    PBXElementDict pbxElementDict = pbxElement.AsDict();
                    if (pbxElementDict.Contains("ProductGroup") && pbxElementDict.Contains("ProjectRef"))
                    {
                        this.projectReferences.Add(ProjectReference.Create(pbxElementDict["ProductGroup"].AsString(), pbxElementDict["ProjectRef"].AsString()));
                    }
                }
            }
            this.targets         = this.GetPropertyList("targets");
            this.buildConfigList = this.GetPropertyString("buildConfigurationList");
            this.knownAssetTags  = new List <string>();
            if (!this.m_Properties.Contains("attributes"))
            {
                return;
            }
            PBXElementDict pbxElementDict1 = this.m_Properties["attributes"].AsDict();

            if (pbxElementDict1.Contains("knownAssetTags"))
            {
                foreach (PBXElement pbxElement in pbxElementDict1["knownAssetTags"].AsArray().values)
                {
                    this.knownAssetTags.Add(pbxElement.AsString());
                }
            }
            this.capabilities = new List <PBXCapabilityType.TargetCapabilityPair>();
            this.teamIDs      = new Dictionary <string, string>();
            if (pbxElementDict1.Contains("TargetAttributes"))
            {
                foreach (KeyValuePair <string, PBXElement> keyValuePair1 in (IEnumerable <KeyValuePair <string, PBXElement> >)pbxElementDict1["TargetAttributes"].AsDict().values)
                {
                    if (keyValuePair1.Key == "DevelopmentTeam")
                    {
                        this.teamIDs.Add(keyValuePair1.Key, keyValuePair1.Value.AsString());
                    }
                    if (keyValuePair1.Key == "SystemCapabilities")
                    {
                        foreach (KeyValuePair <string, PBXElement> keyValuePair2 in (IEnumerable <KeyValuePair <string, PBXElement> >)pbxElementDict1["SystemCapabilities"].AsDict().values)
                        {
                            this.capabilities.Add(new PBXCapabilityType.TargetCapabilityPair(keyValuePair1.Key, PBXCapabilityType.StringToPBXCapabilityType(keyValuePair2.Value.AsString())));
                        }
                    }
                }
            }
        }