public bool Equals(Parent?other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other.ParentID == ParentID && other.Value1.Equals(Value1)); }
internal Joint(XmlNode node) { Name = Utils.ParseString(node.Attributes?["name"]); string typeStr = Utils.ParseString(node.Attributes?["type"]); Type = GetJointType(typeStr, node); Origin?origin = null; Parent?parent = null; Child? child = null; Axis? axis = null; Limit? limit = null; foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "origin": origin = new Origin(childNode); break; case "parent": parent = new Parent(childNode); break; case "child": child = new Child(childNode); break; case "axis": axis = new Axis(childNode); break; case "limit": limit = new Limit(childNode); break; } } Origin = origin ?? Origin.Identity; Parent = parent ?? throw new MalformedUrdfException(node); Child = child ?? throw new MalformedUrdfException(node); Axis = axis ?? Axis.Right; Limit = limit ?? Limit.Empty; }
public static bool GetBool3(Parent?obj) { throw new InvalidOperationException(); }