System.Configuration.ConfigurationLockCollection.DefinedInParent C# (CSharp) Method

DefinedInParent() private method

private DefinedInParent ( string name ) : bool
name string
return bool
        internal bool DefinedInParent(string name) {
            if (name == null)
                return false;
            if (_bExceptionList)
            {
                string ParentListEnclosed = "," + SeedList + ",";                
                if (name.Equals(_ignoreName) || ParentListEnclosed.IndexOf("," + name + ",", StringComparison.Ordinal) >= 0) {
                    return true;
                }
            }
            return (internalDictionary.Contains(name) &&
                ((ConfigurationValueFlags)internalDictionary[name] & ConfigurationValueFlags.Inherited) != 0);
        }

Usage Example

        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);
        }
All Usage Examples Of System.Configuration.ConfigurationLockCollection::DefinedInParent