From c061cf5be4245b68e06957ec51b10de932ba5a97 Mon Sep 17 00:00:00 2001 From: marcos henrich Date: Wed, 2 Apr 2014 15:40:48 +0100 Subject: [PATCH] Added property IsEmpty to Block. --- src/Generator/Generators/Template.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Generator/Generators/Template.cs b/src/Generator/Generators/Template.cs index e0827000..927d3c49 100644 --- a/src/Generator/Generators/Template.cs +++ b/src/Generator/Generators/Template.cs @@ -165,6 +165,17 @@ namespace CppSharp.Generators return builder.ToString(); } + public bool IsEmpty + { + get + { + if (Blocks.Any(block => !block.IsEmpty)) + return false; + + return string.IsNullOrEmpty(Text.ToString()); + } + } + #region ITextGenerator implementation public uint Indent { get { return Text.Indent; } }