public UnitGraphEdge AddConversion(UnitGraphNode to, Func<Measure, Measure> edgeToTarget) { UnitGraphEdge unitGraphEdge; var success = targets.TryGetValue(to, out unitGraphEdge); if (!success) targets.Add(to, unitGraphEdge = new UnitGraphEdge(unit, edgeToTarget, to.Unit)); return unitGraphEdge; }
public UnitGraphEdge AddConversion(UnitGraphNode to, Func <Measure, Measure> edgeToTarget) { UnitGraphEdge unitGraphEdge; var success = targets.TryGetValue(to, out unitGraphEdge); if (!success) { targets.Add(to, unitGraphEdge = new UnitGraphEdge(unit, edgeToTarget, to.Unit)); } return(unitGraphEdge); }
public bool Equals(UnitGraphEdge other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other.to, to) && Equals(other.from, from)); }
public bool Equals(UnitGraphEdge other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.to, to) && Equals(other.from, from); }