protected string GetImportRelativePathFromNamespaces(CodeNamespace currentNamespace, CodeNamespace importNamespace) { var result = currentNamespace.GetDifferential(importNamespace, prefix, separator); return(result.State switch { NamespaceDifferentialTrackerState.Same => "./", NamespaceDifferentialTrackerState.Downwards => $"./{GetRemainingImportPath(result.DownwardsSegments)}", NamespaceDifferentialTrackerState.Upwards => GetUpwardsMoves(result.UpwardsMovesCount), NamespaceDifferentialTrackerState.UpwardsAndThenDownwards => $"{GetUpwardsMoves(result.UpwardsMovesCount)}{GetRemainingImportPath(result.DownwardsSegments)}", _ => throw new NotImplementedException(), });