1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/lishilei0523-h-opc

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Это зеркальный репозиторий, синхронизируется ежедневно с исходного репозитория.
Клонировать/Скачать
Node.cs 1.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Lee Отправлено 6 лет назад 9dd4266
namespace Hylasoft.Opc.Common
{
/// <summary>
/// Base class representing a node on the OPC server
/// </summary>
public abstract class Node
{
/// <summary>
/// Gets the displayed name of the node
/// </summary>
public string Name { get; protected set; }
/// <summary>
/// Gets the dot-separated fully qualified tag of the node
/// </summary>
public string Tag { get; protected set; }
/// <summary>
/// Gets the parent node. If the node is root, returns null
/// </summary>
public Node Parent { get; private set; }
/// <summary>
/// Creates a new node
/// </summary>
/// <param name="name">the name of the node</param>
/// <param name="parent">The parent node</param>
protected Node(string name, Node parent = null)
{
this.Name = name;
this.Parent = parent;
if (parent != null && !string.IsNullOrEmpty(parent.Tag))
this.Tag = parent.Tag + '.' + name;
else
this.Tag = name;
}
/// <summary>
/// Overrides ToString()
/// </summary>
public override string ToString()
{
return this.Tag;
}
}
}

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/lishilei0523-h-opc.git
git@gitlife.ru:oschina-mirror/lishilei0523-h-opc.git
oschina-mirror
lishilei0523-h-opc
lishilei0523-h-opc
master