Skip to content

Commit

Permalink
Updated namespace to reflect the nuget package
Browse files Browse the repository at this point in the history
  • Loading branch information
BLM16 committed Dec 28, 2021
1 parent f79bc5d commit 9f15462
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 32 deletions.
34 changes: 13 additions & 21 deletions Calculator.Examples/ConsoleIO.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
using System;
using Calculator;
using BLM16.Util.Calculator;

namespace Examples;

class ConsoleIO
while (true)
{
static void Main(string[] args)
try
{
while (true)
{
try
{
Console.Write("Enter your equation: ");
var eq = Console.ReadLine();

var calculator = new Calculator.Calculator();
var res = calculator.Calculate(eq);
Console.Write("Enter your equation: ");
var eq = Console.ReadLine();

var calculator = new Calculator();
var res = calculator.Calculate(eq);

Console.WriteLine($"Result: {res}\n");
}
catch (MathSyntaxException e)
{
Console.WriteLine(e + "\n");
}
}
Console.WriteLine($"Result: {res}\n");
}
catch (MathSyntaxException e)
{
Console.WriteLine(e + "\n");
}
}
1 change: 1 addition & 0 deletions Calculator.Tests/Calculator.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Version>2.0.0</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageTags>calculator</PackageTags>
<RootNamespace>BLM16.Util.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Calculator.Tests/LexerTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;

namespace Calculator.Tests;
namespace BLM16.Util.Calculator.Tests;

/// <summary>
/// Contains the tests for the Lexer class
Expand Down
2 changes: 1 addition & 1 deletion Calculator.Tests/ParserTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;

namespace Calculator.Tests;
namespace BLM16.Util.Calculator.Tests;

/// <summary>
/// Contains the tests for the Parser class
Expand Down
2 changes: 1 addition & 1 deletion Calculator.Tests/StandardizerTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Calculator.Tests;
namespace BLM16.Util.Calculator.Tests;

/// <summary>
/// Contains the tests for the Standardizer class
Expand Down
2 changes: 1 addition & 1 deletion Calculator/Calculator.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Calculator.Tests")]
namespace Calculator;
namespace BLM16.Util.Calculator;

/// <summary>
/// Contains the required logic to evaluate an equation from a string
Expand Down
3 changes: 2 additions & 1 deletion Calculator/Calculator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
<Copyright>Copyright © 2021 Bradley Myers. All rights reserved.</Copyright>
<RepositoryUrl>https://github.com/BLM16/Tokenized-Calculator</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>2.0.0</Version>
<Version>2.1.0</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageTags>calculator; math; solve</PackageTags>
<PackageId>BLM16.Util.$(AssemblyName)</PackageId>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>This library parses and solves math equations from strings. Order of Operations Rules are followed.</Description>
<NeutralLanguage>en-CA</NeutralLanguage>
<RootNamespace>BLM16.Util.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Calculator/Lexer.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;

namespace Calculator;
namespace BLM16.Util.Calculator;

/// <summary>
/// Has the logic to tokenize an equation
Expand Down
2 changes: 1 addition & 1 deletion Calculator/MathSyntaxException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Calculator;
namespace BLM16.Util.Calculator;

/// <summary>
/// Exception for malformed equations
Expand Down
2 changes: 1 addition & 1 deletion Calculator/Operator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Calculator;
namespace BLM16.Util.Calculator;

/// <summary>
/// An operator used by the calculator
Expand Down
2 changes: 1 addition & 1 deletion Calculator/Parser.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;

namespace Calculator;
namespace BLM16.Util.Calculator;

/// <summary>
/// Has the logic to evaluate an equation
Expand Down
2 changes: 1 addition & 1 deletion Calculator/Standardizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Linq;
using System.Text.RegularExpressions;

namespace Calculator;
namespace BLM16.Util.Calculator;

/// <summary>
/// Has the logic to standardize an equation into something the calculator can parse
Expand Down
2 changes: 1 addition & 1 deletion Calculator/Token.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Calculator;
namespace BLM16.Util.Calculator;

/// <summary>
/// Builtin token types
Expand Down

0 comments on commit 9f15462

Please sign in to comment.