logo WinWrap®

NET5: Script Caching

NET5: Script Caching

  • Manage script lifetimes
  • BasicIdeCtl synchronized with a BasicNoUIObj in the same thread
  • Application evaluates function defined by script
  • DesignMode controls script editing/evaluation for the application
  • NET 5 Sample Implementation

NET5+: Script Caching

For an explanation of how this sample works please refer to the Script Caching solution.

Sample source: ScriptCaching-Net5.zip

NET5+: Script Caching

Please refer to NET4: Script Caching for details regarding script caching.

Special Requirements for .NET 5+ and COM

This Script Caching solution extends the WWB-COM and WWB.NET languages using COM implemented by .NET 5+ types. Unfortunately, a .NET 5+ assembly doesn't supply a type library. To make up for this deficiency this sample uses a .NET 4 project to create a type library file (.tlb) which provides the necessary information for extending the WWB-COM and WWB.NET languages.

// .NET 5+ does not create a type library or type info for COM interop // use type library created by .NET 4 basicNoUIObj_.AddExtension(@"{}<APPDIR>\ScriptCaching-Net5.tlb", null); // add the language extensions, specify type because .NET 5+ does not implement IDispatch::GetTypeInfo basicNoUIObj_.AddExtension("(Extensions)", extensions_);

Copyright Polar Engineering, Inc.