Beispiel #1
0
        public void UAInstanceEqualsTest()
        {
            UAInstance _first  = TestData.CreateUAObject();
            UAInstance _second = TestData.CreateUAObject();

            _second.ParentNodeId = Guid.NewGuid().ToString();
            Assert.IsTrue(_first != _second);
        }
Beispiel #2
0
 private static void UpdateInstance(IInstanceFactory nodeDesign, UAInstance nodeSet, IUANodeBase nodeContext, Action <TraceMessage> traceEvent)
 {
     nodeDesign.ModelingRule   = nodeContext.ModelingRule;
     nodeDesign.TypeDefinition = nodeContext.ExportBaseTypeBrowseName(false);
     //nodeSet.ParentNodeId - The NodeId of the Node that is the parent of the Node within the information model. This field is used to indicate
     //that a tight coupling exists between the Node and its parent (e.g. when the parent is deleted the child is deleted
     //as well). This information does not appear in the AddressSpace and is intended for use by design tools.
 }
        /// <summary>
        /// Indicates whether the the inherited parent object is also equal to another object.
        /// </summary>
        /// <param name="other">An object to compare with this object.</param>
        /// <returns><c>true</c> if the current object is equal to the <paramref name="other">other</paramref>; otherwise,, <c>false</c> otherwise.</returns>
        protected override bool ParentEquals(UANode other)
        {
            UAInstance _other = other as UAInstance;

            if (_other == null)
            {
                return(false);
            }
            return(this.ParentNodeId == _other.ParentNodeId);
        }