-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I didn't find and documented restrictions on the assembly names. If we take the new AssemblyName(...) function as reference implementation, basically only restrictions are no `,`, `=`, `/`, `\` and nullbytes (invalid UTF-16 is also allowed 🤦 :D) So this allows whatever we can allow. Assembly name is always at the end, so there is no point in placing restrictions on it. resolves #1728
- Loading branch information
Showing
4 changed files
with
75 additions
and
34 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/Framework/Framework/Compilation/Parser/Binding/Parser/AssemblyNameBindingParserNode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using DotVVM.Framework.Compilation.Parser.Binding.Tokenizer; | ||
using System.Diagnostics; | ||
using System.Collections.Immutable; | ||
|
||
namespace DotVVM.Framework.Compilation.Parser.Binding.Parser | ||
{ | ||
[DebuggerDisplay("{DebuggerDisplay,nq}")] | ||
public class AssemblyNameBindingParserNode : BindingParserNode | ||
{ | ||
public string Name { get; } | ||
public AssemblyNameBindingParserNode(List<BindingToken> tokens) | ||
{ | ||
Tokens = tokens; | ||
Name = string.Concat(tokens.Select(t => t.Text)); | ||
} | ||
|
||
public AssemblyNameBindingParserNode(string name) | ||
: this(new List<BindingToken>() { new BindingToken(name, BindingTokenType.Identifier, 0, 0, 0, 0)}) | ||
{ } | ||
|
||
public override IEnumerable<BindingParserNode> EnumerateChildNodes() | ||
=> Enumerable.Empty<BindingParserNode>(); | ||
|
||
public override string ToDisplayString() => $"{Name}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters