public LinkedListItem NewWithData(ListItemData data)
 {
     if (IsDummy)
     {
         throw new InvalidOperationException();
     }
     return(new LinkedListItem(data)
     {
         Deleted = Deleted,
     });
 }
示例#2
0
        // override object.Equals
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            ListItemData objAsLid = obj as ListItemData;

            return(NodeId == objAsLid.NodeId &&
                   Value == objAsLid.Value);
        }
 public LinkedListItem(ListItemData data, bool isDummy = false)
 {
     Data    = data;
     IsDummy = isDummy;
 }