JetBrains.ReSharper.Psi.Secret.Formatter.SecretFormatterHelper.CreateWhitespaces C# (CSharp) Method

CreateWhitespaces() private method

private CreateWhitespaces ( [ wsTexts ) : IWhitespaceNode[]
wsTexts [
return IWhitespaceNode[]
        private static IWhitespaceNode[] CreateWhitespaces([NotNull] this IEnumerable<string> wsTexts)
        {
            if (wsTexts == null)
            {
                throw new ArgumentNullException("wsTexts");
            }

            return wsTexts.Where(text => !text.IsEmpty()).Select(
                text =>
                {
                    if (text.IsNewLine())
                    {
                        return CreateNewLine("\r\n");
                    }
                    // consistency check (remove in release?)
                    if (!NTriplesLexer.IsWhitespace(text))
                    {
                        throw new ApplicationException("Inconsistent space structure");
                    }
                    return CreateSpace(text);
                }).ToArray();
        }