Silverlight - dynamic code support?

I am trying to understand a little about the relationship of server-side code with client code in Silverlight.

I would suggest that you cannot just β€œeval” the line and have new code, but can you load the assembly on the server side and enable it with the Silverlight code that is sent to the client?

I am completely β€œnoob” when it comes to Silverlight, so I may not completely understand how this works, so any clarification would be appreciated.

[change]

Just as I understand what I'm trying to do, I would like to write simple code (as in logic), compile it on the server, and then send it back to the client, it can be used on the client side. I'm not sure if it will be a DLL or even possible ...

+3
source share
2 answers

This guy has a working downloadable sample that does exactly what you want:

http://www.nokola.com/trycsharp/HowToBuild.aspx

It mainly uses Microsoft.CSharp.CSharpCodeProvider to compile the code, but uses the Sivlerlight DLLS so it works properly.

You can even compose a whole SilverLight page (XAML and CS), but you have to do it with MSBuild, how to do it beforehand compose a passage to generate a .g.cs file that wires up the Xaml object C # code.

Both methods are server only.

+2
source

Are you interested in working with dynamic languages ​​on the Silverlight platform? If so, you're in luck:

http://silverlight.net/learn/dynamiclanguages.aspx/

# Silverlight (. System.Reflection.Emit .NET Framework ).

1: , . , Xaml , :

http://msdn.microsoft.com/en-us/magazine/2009.01.cuttingedge.aspx

, SLL- (, Reflection.Emit). DLL Xap, , .

DLL SL : http://www.shinedraw.com/data-handling/flash-vs-silverlight-loading-external-assemblylibrary-dynamically/

, DLL SL, .

0

Source: https://habr.com/ru/post/1713158/


All Articles