UnityEditor.iOS.Xcode.PBX.PBXElementDict.CreateDict C# (CSharp) Method

CreateDict() public method

public CreateDict ( string key ) : PBXElementDict
key string
return PBXElementDict
        public PBXElementDict CreateDict(string key)
        {
            PBXElementDict dict = new PBXElementDict();
            this.values[key] = dict;
            return dict;
        }

Usage Example

Example #1
0
 public override void UpdateProps()
 {
     this.m_Properties.values.Remove("projectReferences");
     if (this.projectReferences.Count > 0)
     {
         PBXElementArray array = this.m_Properties.CreateArray("projectReferences");
         foreach (ProjectReference projectReference in this.projectReferences)
         {
             PBXElementDict pbxElementDict = array.AddDict();
             pbxElementDict.SetString("ProductGroup", projectReference.group);
             pbxElementDict.SetString("ProjectRef", projectReference.projectRef);
         }
     }
     this.SetPropertyList("targets", this.targets);
     this.SetPropertyString("buildConfigurationList", this.buildConfigList);
     if (this.knownAssetTags.Count > 0)
     {
         PBXElementArray array = (!this.m_Properties.Contains("attributes") ? this.m_Properties.CreateDict("attributes") : this.m_Properties["attributes"].AsDict()).CreateArray("knownAssetTags");
         foreach (string val in this.knownAssetTags)
         {
             array.AddString(val);
         }
     }
     foreach (PBXCapabilityType.TargetCapabilityPair targetCapabilityPair in this.capabilities)
     {
         PBXElementDict pbxElementDict1 = this.m_Properties.Contains("attributes") ? this.m_Properties["attributes"].AsDict() : this.m_Properties.CreateDict("attributes");
         PBXElementDict pbxElementDict2 = pbxElementDict1.Contains("TargetAttributes") ? pbxElementDict1["TargetAttributes"].AsDict() : pbxElementDict1.CreateDict("TargetAttributes");
         PBXElementDict pbxElementDict3 = pbxElementDict2.Contains(targetCapabilityPair.targetGuid) ? pbxElementDict2[targetCapabilityPair.targetGuid].AsDict() : pbxElementDict2.CreateDict(targetCapabilityPair.targetGuid);
         PBXElementDict pbxElementDict4 = pbxElementDict3.Contains("SystemCapabilities") ? pbxElementDict3["SystemCapabilities"].AsDict() : pbxElementDict3.CreateDict("SystemCapabilities");
         string         id = targetCapabilityPair.capability.id;
         (pbxElementDict4.Contains(id) ? pbxElementDict4[id].AsDict() : pbxElementDict4.CreateDict(id)).SetString("enabled", "1");
     }
     foreach (KeyValuePair <string, string> keyValuePair in this.teamIDs)
     {
         PBXElementDict pbxElementDict1 = this.m_Properties.Contains("attributes") ? this.m_Properties["attributes"].AsDict() : this.m_Properties.CreateDict("attributes");
         PBXElementDict pbxElementDict2 = pbxElementDict1.Contains("TargetAttributes") ? pbxElementDict1["TargetAttributes"].AsDict() : pbxElementDict1.CreateDict("TargetAttributes");
         (pbxElementDict2.Contains(keyValuePair.Key) ? pbxElementDict2[keyValuePair.Key].AsDict() : pbxElementDict2.CreateDict(keyValuePair.Key)).SetString("DevelopmentTeam", keyValuePair.Value);
     }
 }