private static bool TryProcessKey(MarkerFileContent content, Definitions.Section section, string keyName, string keyValue, [NotNullWhen(false)] out string?exceptionMessage) { return(section switch { Definitions.Section.NoSection => GlobalSectionLoader.TryProcess(keyName, out exceptionMessage),//(_content, keyName, keyValue); Definitions.Section.CommonInfos => CommonInfosSectionLoader.TryProcess(content, keyName, keyValue, out exceptionMessage), Definitions.Section.MarkerInfos => MarkerInfosSectionLoader.TryProcess(content, keyName, keyValue, out exceptionMessage), _ => throw new NotImplementedException(), // should never happen });
private static bool TryProcessKey(HeaderFileContent content, Definitions.Section section, string keyName, string keyValue, [NotNullWhen(false)] out string?exceptionMessage) { return(section switch { Definitions.Section.NoSection => GlobalSectionLoader.TryProcess(keyName, out exceptionMessage), // (content, keyName, keyValue) Definitions.Section.CommonInfos => CommonInfosSectionLoader.TryProcess(content, keyName, keyValue, out exceptionMessage), Definitions.Section.BinaryInfos => BinaryInfosSectionLoader.TryProcess(content, keyName, keyValue, out exceptionMessage), Definitions.Section.ChannelInfos => ChannelInfosSectionLoader.TryProcess(content, keyName, keyValue, out exceptionMessage), Definitions.Section.Coordinates => CoordinatesInfosSectionLoader.TryProcess(content, keyName, keyValue, out exceptionMessage), Definitions.Section.Comment => throw new NotImplementedException(), // should never happen Definitions.Section.Unknown => throw new NotImplementedException(), // should never happen _ => throw new NotImplementedException(), // should never happen });