AsString() public method

public AsString ( ) : string
return string
Esempio n. 1
0
 public static void WriteDictKeyValue(StringBuilder sb, string key, PBXElement value, int indent, bool compact, PropertyCommentChecker checker, GUIDToCommentMap comments)
 {
     if (!compact)
     {
         sb.Append("\n");
         sb.Append(Serializer.GetIndent(indent));
     }
     Serializer.WriteStringImpl(sb, key, checker.CheckKeyInDict(key), comments);
     sb.Append(" = ");
     if (value is PBXElementString)
     {
         Serializer.WriteStringImpl(sb, value.AsString(), checker.CheckStringValueInDict(key, value.AsString()), comments);
     }
     else if (value is PBXElementDict)
     {
         Serializer.WriteDict(sb, value.AsDict(), indent, compact, checker.NextLevel(key), comments);
     }
     else if (value is PBXElementArray)
     {
         Serializer.WriteArray(sb, value.AsArray(), indent, compact, checker.NextLevel(key), comments);
     }
     sb.Append(";");
     if (!compact)
     {
         return;
     }
     sb.Append(" ");
 }
Esempio n. 2
0
        internal string GetPropertyString(string name)
        {
            PBXElement pbxElement = this.m_Properties[name];

            if (pbxElement == null)
            {
                return((string)null);
            }
            return(pbxElement.AsString());
        }
Esempio n. 3
0
        public override void UpdateVars()
        {
            this.baseConfigurationReference = this.GetPropertyString("baseConfigurationReference");
            this.entries = new SortedDictionary <string, BuildConfigEntryData>();
            if (!this.m_Properties.Contains("buildSettings"))
            {
                return;
            }
            PBXElementDict pbxElementDict = this.m_Properties["buildSettings"].AsDict();

            foreach (string index in (IEnumerable <string>)pbxElementDict.values.Keys)
            {
                PBXElement pbxElement1 = pbxElementDict[index];
                if (pbxElement1 is PBXElementString)
                {
                    if (this.entries.ContainsKey(index))
                    {
                        this.entries[index].val.Add(pbxElement1.AsString());
                    }
                    else
                    {
                        this.entries.Add(index, BuildConfigEntryData.FromNameValue(index, pbxElement1.AsString()));
                    }
                }
                else if (pbxElement1 is PBXElementArray)
                {
                    foreach (PBXElement pbxElement2 in pbxElement1.AsArray().values)
                    {
                        if (pbxElement2 is PBXElementString)
                        {
                            if (this.entries.ContainsKey(index))
                            {
                                this.entries[index].val.Add(pbxElement2.AsString());
                            }
                            else
                            {
                                this.entries.Add(index, BuildConfigEntryData.FromNameValue(index, pbxElement2.AsString()));
                            }
                        }
                    }
                }
            }
        }
 public override void UpdateVars()
 {
     this.entries = new SortedDictionary <string, BuildConfigEntryData>();
     if (base.m_Properties.Contains("buildSettings"))
     {
         PBXElementDict dict = base.m_Properties["buildSettings"].AsDict();
         foreach (string str in dict.values.Keys)
         {
             PBXElement element = dict[str];
             if (element is PBXElementString)
             {
                 if (this.entries.ContainsKey(str))
                 {
                     this.entries[str].val.Add(element.AsString());
                 }
                 else
                 {
                     this.entries.Add(str, BuildConfigEntryData.FromNameValue(str, element.AsString()));
                 }
             }
             else if (element is PBXElementArray)
             {
                 foreach (PBXElement element2 in element.AsArray().values)
                 {
                     if (element2 is PBXElementString)
                     {
                         if (this.entries.ContainsKey(str))
                         {
                             this.entries[str].val.Add(element2.AsString());
                         }
                         else
                         {
                             this.entries.Add(str, BuildConfigEntryData.FromNameValue(str, element2.AsString()));
                         }
                     }
                 }
             }
         }
     }
 }
Esempio n. 5
0
        public static void WriteDictKeyValue(StringBuilder sb, string key, PBXElement value, int indent, bool compact, 
                                             PropertyCommentChecker checker, GUIDToCommentMap comments)
        {
            if (!compact)
            {
                sb.Append("\n");
                sb.Append(GetIndent(indent));
            }
            WriteStringImpl(sb, key, checker.CheckKeyInDict(key), comments);
            sb.Append(" = ");

            if (value is PBXElementString)
                WriteStringImpl(sb, value.AsString(), checker.CheckStringValueInDict(key, value.AsString()), comments);
            else if (value is PBXElementDict)
                WriteDict(sb, value.AsDict(), indent, compact, checker.NextLevel(key), comments);
            else if (value is PBXElementArray)
                WriteArray(sb, value.AsArray(), indent, compact, checker.NextLevel(key), comments);
            sb.Append(";");
            if (compact)
                sb.Append(" ");
        }
Esempio n. 6
0
        protected string GetPropertyString(string name)
        {
            PBXElement element = this.m_Properties[name];

            return(element?.AsString());
        }