public JEVisRelationshipWS(JEVisDataSourceWS ds, JsonRelationship json) { // logger.trace("New Relationship: {}->{}", json.getFrom(), json.getTo()); this.ds = ds; this.json = json; type = json.GetType(); }
internal bool AddRelationship(JsonRelationship jsonRelationship) { Guard.IsNotNull(jsonRelationship.User, nameof(jsonRelationship.User)); User user = GetOrAddUser(jsonRelationship.User); bool status = true; user.RelationshipType = jsonRelationship.Type; if (jsonRelationship.Presence is not null) { bool added = AddPresence(jsonRelationship.Presence); status = status && added; } return(status); }