// Copyright (c) 2007 Omer Rauchwerger (a.k.a rauchy) (omer@rauchy.net)
// All rights reserved.
//
// This file is part of Regionerate.
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
using System;
namespace Rauchy.Regionerate.ServiceLayer.Components.Tools
{
///
/// Removes whitespace from the specified code.
///
/// The code.
/// The same code blocks, without the unwanted whitespace.
///
/// Thrown when code is null.
///
///
/// Handles type-level whitespace only, does not remove method-level or property-level whitespace.
///
public sealed class WhitespaceRemover : TypeCodeTextRemover
{
#region Methods (1)
///
/// Determines wether a line, when not placed in a method or property (or such), should be removed.
///
///
/// If the line is completely empty, it should be removed.
///
/// The line.
protected override bool ShouldRemove( string line )
{
return ( line.Trim().Length == 0 );
}
#endregion
}
}