Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
samatstariongroup committed Oct 6, 2024
1 parent a145c9b commit 034f21e
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 137 deletions.
128 changes: 0 additions & 128 deletions uml4net.CodeGenerator/Extensions/GenericExtensions.cs

This file was deleted.

10 changes: 5 additions & 5 deletions uml4net.CodeGenerator/Generators/CorePocoGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace uml4net.CodeGenerator.Generators

using System.IO;

using uml4net.CodeGenerator.Extensions;
using uml4net.Extensions;

using uml4net.POCO.Packages;
using uml4net.POCO.StructuredClassifiers;
Expand Down Expand Up @@ -179,10 +179,10 @@ public async Task<string> GenerateClass(IPackage package, DirectoryInfo outputDi
/// </summary>
protected override void RegisterHelpers()
{
//ECoreNetto.HandleBars.BooleanHelper.RegisterBooleanHelper(this.Handlebars);
//ECoreNetto.HandleBars.StringHelper.RegisterStringHelper(this.Handlebars);
//ECoreNetto.HandleBars.StructuralFeatureHelper.RegisterStructuralFeatureHelper(this.Handlebars);
//ECoreNetto.HandleBars.GeneralizationHelper.RegisterGeneralizationHelper(this.Handlebars);
uml4net.HandleBars.BooleanHelper.RegisterBooleanHelper(this.Handlebars);
uml4net.HandleBars.StringHelper.RegisterStringHelper(this.Handlebars);
uml4net.HandleBars.PropertyHelper.RegisterStructuralFeatureHelper(this.Handlebars);
uml4net.HandleBars.GeneralizationHelper.RegisterGeneralizationHelper(this.Handlebars);

//this.Handlebars.RegisteredDocumentationHelper();
//this.Handlebars.RegisterTypeNameHelper();
Expand Down
1 change: 0 additions & 1 deletion uml4net.CodeGenerator/uml4net.CodeGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

<ItemGroup>
<Folder Include="Generators\" />
<Folder Include="Extensions\" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions uml4net.Extensions/ElementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
// </copyright>
// ------------------------------------------------------------------------------------------------

using uml4net.POCO.CommonStructure;

namespace uml4net.Extensions
{
using System;
Expand All @@ -28,6 +26,8 @@ namespace uml4net.Extensions

using HtmlAgilityPack;

using uml4net.POCO.CommonStructure;

/// <summary>
/// Extension methods for <see cref="IElement"/> interface
/// </summary>
Expand Down
44 changes: 44 additions & 0 deletions uml4net.Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,49 @@ public static string Prefix(this string input, string prefix)
{
return $"{prefix}{input}";
}

/// <summary>
/// Returns the opposite value of a boolean
/// </summary>
/// <param name="value">
/// the subject boolean
/// </param>
/// <returns>
/// true or false
/// </returns>
public static bool FlipIt(bool value)
{
return !value;
}

/// <summary>
/// Increments the value with 1
/// </summary>
/// <param name="value">
/// the value that is to be incremented
/// </param>
/// <returns>
/// the value incremented with 1
/// </returns>
public static int Increment(int value)
{
var result = value + 1;
return result;
}

/// <summary>
/// Increments the value with 1
/// </summary>
/// <param name="value">
/// the value that is to be incremented
/// </param>
/// <returns>
/// the value incremented with 1
/// </returns>
public static int Decrement(int value)
{
var result = value - 1;
return result;
}
}
}
1 change: 1 addition & 0 deletions uml4net.HandleBars/GeneralizationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace uml4net.HandleBars
{
using System;
using System.Linq;

using HandlebarsDotNet;

using uml4net.POCO;
Expand Down
1 change: 0 additions & 1 deletion uml4net.HandleBars/PropertyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ namespace uml4net.HandleBars

using HandlebarsDotNet;

using uml4net;
using uml4net.Extensions;

using uml4net.POCO.Classification;
Expand Down

0 comments on commit 034f21e

Please sign in to comment.