Hi,

On Sat, Mar 30, 2013 at 3:50 PM, Jb Evain <[email protected]> wrote:
> On Sat, Mar 30, 2013 at 1:59 PM, Alex Rønne Petersen <[email protected]> wrote:
>> Even if we assume that we cannot throw a path at ANR.Parse (), an
>> assembly name like "Foo, Bar" can still screw things up. So other than
>> saying "just don't feed paths to it", other rules about what an
>> assembly name can contain apply.
>>
>> So the question is: How strict is it supposed to be?
>
> Admittedly, ANR.Parse is a tad naive in its current form.
>
> What's the ecma335 saying in this case?

It doesn't seem to say much other than the .assembly grammar:

.assembly DottedName ‘{’ AsmDecl* ‘}’

> Also, how does SR.AssemblyName behaves?

csharp> using System.Reflection;
csharp> new AssemblyName ("foo");
foo
csharp> new AssemblyName ("foo, bar");
System.IO.FileLoadException: The assembly name is invalid.
  at System.Reflection.AssemblyName..ctor (System.String assemblyName)
[0x00000] in <filename unknown>:0
  at Class12.Host (System.Object& $retval) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Evaluator.Evaluate (System.String input,
System.Object& result, System.Boolean& result_set) [0x00000] in
<filename unknown>:0
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in
<filename unknown>:0

I suppose Cecil's behavior is acceptable given the above. It does make
me wonder how any tool or CLI implementation is supposed to behave if
it gets fed a non-DottedName assembly name somehow...

>
> --
> --
> --
> mono-cecil
> ---
> You received this message because you are subscribed to the Google Groups 
> "mono-cecil" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
--
mono-cecil
--- 
You received this message because you are subscribed to the Google Groups 
"mono-cecil" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to