/// <summary> /// Returns true if specified type of node should be skip /// </summary> /// <param name="type">type of node to analyze</param> /// <param name="skipByType">set 'true' for skip nodes by specified types of nodes. Overwise, set 'false, for process only specified types of nodes </param> /// <param name="types">array of types of nodes to skip or process depends by <paramref name="skipByType"/></param> /// <returns></returns> private static bool mustSkipByNodeType(DDType type, bool skipByType, params DDType[] types) { bool bMustSkip = !skipByType; foreach (var t in types) { if (type == t) { bMustSkip = skipByType; break; } } return(bMustSkip); }
public DDNode(string name, DDType type) { if (!IsNameCorect(name)) { throw new DDNodeIncorrectNameException(name); } attributes = new DDAttributesCollection(); Name = name; childNodes = new Dictionary <string, DDNode>(); if ((type == null) || (type.Name == null)) { Type.Name = new DDType(string.Empty); } else { Type = type; } }
public DDNode(DDType type) : this(Guid.NewGuid().ToString(), type) { }
public DDNode(Enum name, DDType type) : this(name.ToString(), type) { }
private DDNode(string name, DDNode parent, DDType type) : this(name, type) { Parent = parent; }