Improve documentation
This commit is contained in:
parent
838fefba8b
commit
87362f93c1
3 changed files with 4 additions and 5 deletions
|
@ -11,7 +11,7 @@ namespace AspectedRouting.IO.md
|
|||
{
|
||||
private readonly List<string> parts = new List<string>();
|
||||
|
||||
public string ToString()
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Join("\n\n", parts);
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace AspectedRouting.Language.Expression
|
|||
|
||||
internal IExpression OptimizeInternal(out bool somethingChanged)
|
||||
{
|
||||
if (Types.Count() == 0)
|
||||
if (!Types.Any())
|
||||
{
|
||||
throw new ArgumentException("This application contain no valid types, so cannot be optimized" + this);
|
||||
}
|
||||
|
|
|
@ -88,15 +88,14 @@ namespace AspectedRouting.Language
|
|||
}
|
||||
|
||||
var eSmallest = e.SpecializeToSmallestType();
|
||||
if (eSmallest == null || eSmallest.Types.Count() == 0)
|
||||
if (eSmallest == null || !eSmallest.Types.Any())
|
||||
{
|
||||
throw new Exception("Could not specialize " + e);
|
||||
}
|
||||
|
||||
// TODO FIX THIS so that it works
|
||||
// An argument 'optimizes' it's types from 'string -> bool' to 'string -> string'
|
||||
var eOpt = eSmallest.Optimize(out _);
|
||||
if (eOpt == null || eOpt.Types.Count() == 0)
|
||||
if (eOpt == null || !eOpt.Types.Any())
|
||||
{
|
||||
throw new Exception("Could not optimize " + eSmallest);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue