SEARCH
TOOLBOX
LANGUAGES
modified on 1 June 2010 at 00:57 ••• 1,909 views

O2 Scripting Environment/Features/File:Ref

From

Jump to: navigation, search

In addition to the straitforward //O2File:xxx and //O2Ref:xxx extra code mappings that are regularlly used by O2 Scripts, for the cases where there is a need to cache the compilation of a script compilation, the special tag //O2File:Ref:xxxx can be used.

This is needed in the cases where one wants to 'pass around' objects that were created from classes originally created from local C# files.

For example the following script (when executed in the 'Quick Development GUI' module) will not work if instead of //O2File:Ref:WatiN_IE_ExtensionMethods.cs we use //O2File:WatiN_IE_ExtensionMethods.cs (note the lack of 'Ref:' in the 2nd case)

if (panel.tag<WatiN_IE>().isNull())
{
	panel.clear();
	panel.tag(panel.add_IE());
} 
var ie = panel.tag<WatiN_IE>();
//ie.open("http://www.google.com");  
return ie.links();
 
//O2File:Ref:WatiN_IE_ExtensionMethods.cs
//O2Ref:WatiN.Core.1x.dll
MediaWiki Appliance - Powered by TurnKey Linux