DefinedInParent() private method

private DefinedInParent ( string name ) : bool
name string
return bool
        private bool SerializeLockList(ConfigurationLockCollection list, String elementKey, XmlWriter writer) {
            StringBuilder sb;

            sb = new StringBuilder();

            if (list != null) {
                foreach (string key in list) {
                    if (!list.DefinedInParent(key)) {
                        if (sb.Length != 0)
                            sb.Append(',');
                        sb.Append((string)key);
                    }
                }
            }

            if (writer != null && sb.Length != 0)
                writer.WriteAttributeString(elementKey, sb.ToString());
            return (sb.Length != 0);
        }
 private bool SerializeLockList(ConfigurationLockCollection list, string elementKey, XmlWriter writer)
 {
     StringBuilder builder = new StringBuilder();
     if (list != null)
     {
         foreach (string str in list)
         {
             if (!list.DefinedInParent(str))
             {
                 if (builder.Length != 0)
                 {
                     builder.Append(',');
                 }
                 builder.Append(str);
             }
         }
     }
     if ((writer != null) && (builder.Length != 0))
     {
         writer.WriteAttributeString(elementKey, builder.ToString());
     }
     return (builder.Length != 0);
 }
Beispiel #3
0
 private bool SerializeLockList(ConfigurationLockCollection list, string elementKey, XmlWriter writer)
 {
     StringBuilder stringBuilder = new StringBuilder();
       if (list != null)
       {
     foreach (string name in list)
     {
       if (!list.DefinedInParent(name))
       {
     if (stringBuilder.Length != 0)
       stringBuilder.Append(',');
     stringBuilder.Append(name);
       }
     }
       }
       if (writer != null && stringBuilder.Length != 0)
     writer.WriteAttributeString(elementKey, ((object) stringBuilder).ToString());
       return stringBuilder.Length != 0;
 }