Sets the actual implementation of the BrowserFactory class.
Declaring type: BrowserFactory
Namespace: Vrml.EAI
Assembly: VrmlEAI.NET
Collapse/Expand Syntax
C#
public static void SetBrowserFactoryImpl (
        BrowserFactoryImpl fac
) 
Parameters
fac
The BrowserFactory implementation.
Collapse/Expand Remarks

This method is used only in very rare circumstances. By default, the BrowserFactory tries to determine the implementation itself when you try to create an instance of the Browser interface for the first time. By using this method, you can override the default BrowserFactory implementation.

The BrowserFactory tries to determine the default implementation by looking for a key "vrml.eai.factory.class" in the configuration file of your application. E.g. when the name of your application is "MyApp.exe", you can put a configuration file with the name "MyApp.exe.config" next to the executable with the following contents:

C#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="vrml.eai.factory.class" value="MyBrowserFactoryImpl,MyLib" />
  </appSettings>
</configuration>
This tells the BrowserFactory to use the class "MyBrowserFactoryImpl" in the library "MyLib.dll".

When the BrowserFactory does not find a BrowserFactory implementation in the configuration file, it loads a browser-specific implementation (in the case of Instant Player, it's the class "Avalon.Vrml.EAI.BrowserFactoryImpl" in "AvalonEAI.NET.dll").

You have to set the actual implementation before you call any other method of this class. Once the implementation is set, you cannot change it anymore.