/// <summary> /// Creates a new instance of the node. /// </summary> public static ObjectSource Construct(IServerInternal server) { ObjectSource instance = new ObjectSource(server, null); instance.Initialize(null, null, null, 0, ObjectTypes.BaseObjectType); return(instance); }
/// <summary> /// Reports an event produced by the object. /// </summary> public virtual void ReportEvent(BaseEvent e) { lock (DataLock) { if (m_reportEventsToParent) { ObjectSource parent = Parent as ObjectSource; if (parent != null) { parent.ReportEvent(e); } } List <IEventMonitoredItem> monitoredItems = new List <IEventMonitoredItem>(); if (MonitoredItems != null) { foreach (IMonitoredItem monitoredItem in MonitoredItems) { IEventMonitoredItem eventItem = monitoredItem as IEventMonitoredItem; if (eventItem != null) { monitoredItems.Add(eventItem); } } if (monitoredItems.Count > 0) { EventManager.ReportEvent(e, monitoredItems); } } } }
/// <summary cref="NodeSource.Clone(NodeSource)" /> public override NodeSource Clone(NodeSource parent) { lock (DataLock) { ObjectSource clone = this; clone.Initialize(this); return(clone); } }
/// <summary cref="NodeSource.Initialize(NodeSource)" /> public override void Initialize(NodeSource source) { lock (DataLock) { base.Initialize(source); ObjectSource instance = (ObjectSource)source; m_eventNotifier = instance.m_eventNotifier; } }
/// <summary> /// Creates a new instance of the node. /// </summary> public static ObjectSource Construct( IServerInternal server, NodeSource parent, NodeId referenceTypeId, NodeId nodeId, QualifiedName browseName, uint numericId) { ObjectSource instance = new ObjectSource(server, parent); instance.Initialize(referenceTypeId, nodeId, browseName, numericId, ObjectTypes.BaseObjectType); return instance; }
/// <summary> /// Creates a new instance of the node. /// </summary> public static ObjectSource Construct( IServerInternal server, NodeSource parent, NodeId referenceTypeId, NodeId nodeId, QualifiedName browseName, uint numericId) { ObjectSource instance = new ObjectSource(server, parent); instance.Initialize(referenceTypeId, nodeId, browseName, numericId, ObjectTypes.BaseObjectType); return(instance); }
/// <summary> /// Creates a new instance of the node. /// </summary> public static ObjectSource Construct(IServerInternal server) { ObjectSource instance = new ObjectSource(server, null); instance.Initialize(null, null, null, 0, ObjectTypes.BaseObjectType); return instance; }