Hi Stephen,
On 2019/10/23 15:46, Stephen Russell wrote:
I'd just abandon learning this hybrid and use that time learning a better replacement. The code samples are walking on thin ice between how you use to do it in FOX and how you do it in any client/server environment.
I realize your sentiments. However, there are still many people that have not done the migration "learning curve" to .NET
It is easy to state a hybrid environment. X# is definitely not a "hybrid" environment. It is build on exactly the same platform as c# the Roslyn project.
Hence, it is a migration platform supporting XBase style commands. But under the hood it is actually c# in XBase syntax.
Here is code to fetch a schedule of games for a team in a table that will show an image for each team as well as the event's data. In basic functionality, you get data, tweak it and pass it to be presented.
Yes and line for line without the funny "{};" c# each line can be converted to pure X#.NET code:
var Schedule = db.schedules.ToList() //Calls data from a view
on the server
foreach local game as schedule in Schedule game.logolocation = "/icons/" + game.logolocation + ".jpg" // Create the path for the team logo next // endfor if you prefer VFP syntax Schedule.Sort({x, y => DateTime.Compare(x.eventDate, y.eventDate) // Sort the schedule return View("Index", Schedule) // bring it on home })
On top of that. Throw this at the X# compiler, open ILSpy and you will see that code written in c#. Add the ILSpy X# language plug-in and take any c# assembly and view it as if was written in X#. Save this from ILSpy and voila out comes a Visual Studio X# solution.
Definitely not a "hybrid" environment. Except maybe for USE/SKIP/GOTOP etc. that X# understand but c# will choke on... But via ILSpy even these can be understood by c#.
Just my 2c.
Johan