/// <summary> /// Parses a browse path. /// </summary> public static QualifiedNameCollection Parse(string browsePath) { QualifiedNameCollection browseNames = new QualifiedNameCollection(); if (String.IsNullOrEmpty(browsePath)) { return(browseNames); } StringBuilder buffer = new StringBuilder(); bool escaped = false; for (int ii = 0; ii < browsePath.Length; ii++) { char ch = browsePath[ii]; if (escaped) { buffer.Append(ch); escaped = false; continue; } if (ch == '&') { escaped = true; continue; } if (ch == '/') { if (buffer.Length > 0) { QualifiedName browseName = QualifiedName.Parse(buffer.ToString()); browseNames.Add(browseName); } buffer.Length = 0; continue; } buffer.Append(ch); } if (buffer.Length > 0) { QualifiedName browseName = QualifiedName.Parse(buffer.ToString()); browseNames.Add(browseName); } return(browseNames); }
/// <summary> /// Creates a deep copy of the collection. /// </summary> /// <remarks> /// Creates a deep copy of the collection. /// </remarks> public object Clone() { QualifiedNameCollection clone = new QualifiedNameCollection(this.Count); foreach (QualifiedName element in this) { clone.Add((QualifiedName) Utils.Clone(element)); } return clone; }
/// <summary> /// Creates an operand that references a component/property of a type. /// </summary> public SimpleAttributeOperand( NodeId typeId, QualifiedName browsePath) { m_typeDefinitionId = typeId; m_browsePath = new QualifiedNameCollection(); m_attributeId = Attributes.Value; m_indexRange = null; m_browsePath.Add(browsePath); }
/// <summary> /// Creates a deep copy of the collection. /// </summary> /// <remarks> /// Creates a deep copy of the collection. /// </remarks> public new object MemberwiseClone() { QualifiedNameCollection clone = new QualifiedNameCollection(this.Count); foreach (QualifiedName element in this) { clone.Add((QualifiedName)Utils.Clone(element)); } return(clone); }