public bool TryGetVolSurface(string name, out IVolSurface volSurface) { if (VolSurfaces.TryGetValue(name, out volSurface)) { return(true); } if (TryGetInverseSurface(name, out volSurface)) { return(true); } volSurface = null; return(false); }
public IVolSurface GetVolSurface(string name) => VolSurfaces.TryGetValue(name, out var curve) ? curve : throw new Exception($"Surface named {name} not found");
private bool TryGetInverseSurface(string name, out IVolSurface volSurface) { var inverseName = name.Substring(name.Length - 3, 3) + "/" + name.Substring(0, 3); return(VolSurfaces.TryGetValue(inverseName, out volSurface)); }