AspNetEdit.Editor.ComponentModel.Document.GetDirectives C# (CSharp) Méthode

GetDirectives() public méthode

Gets all of the directives of a given type
public GetDirectives ( string directiveType ) : AspNetEdit.Editor.ComponentModel.DocumentDirective[]
directiveType string
Résultat AspNetEdit.Editor.ComponentModel.DocumentDirective[]
        public DocumentDirective[] GetDirectives(string directiveType)
        {
            ArrayList localDirectiveList = new ArrayList ();
            foreach (DictionaryEntry de in directives)
            {
                if (de.Value is DocumentDirective)
                {
                    if (0 == string.Compare (((DocumentDirective)de.Value).Name, directiveType, true, CultureInfo.InvariantCulture))
                        localDirectiveList.Add (de.Value);
                }
                else
                    foreach (DocumentDirective d in (ArrayList)de.Value)
                        if (0 == string.Compare (directiveType, d.Name, true, CultureInfo.InvariantCulture))
                            localDirectiveList.Add (d);
            }

            return (DocumentDirective[]) localDirectiveList.ToArray (typeof (DocumentDirective));
        }