Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Properties | Private Member Functions | Static Private Member Functions | Static Private Attributes
Mozilla.XPCOM.Components Class Reference

List of all members.

Public Member Functions

static IntPtr GetTestImpl ()

Static Public Member Functions

static void Init ()
static object CreateInstance (string contractId, Type iface)

Properties

static IntPtr ServiceManager [get]
static AssemblyBuilder ProxyAssembly [get]

Private Member Functions

static int StartXPCOM (out IntPtr srvmgr)

Static Private Member Functions

static void RegisterAppDomainHooks ()
static Assembly AssemblyResolve (object sender, ResolveEventArgs args)
static Assembly TypeResolve (object sender, ResolveEventArgs args)

Static Private Attributes

static IntPtr serviceManager = IntPtr.Zero

Detailed Description

Definition at line 9 of file components.cs.


Member Function Documentation

static Assembly Mozilla.XPCOM.Components.AssemblyResolve ( object  sender,
ResolveEventArgs  args 
) [inline, static, private]

Definition at line 31 of file components.cs.

    {
        Console.WriteLine("Resolving: {0}", args.Name);
        return null;
    }
static object Mozilla.XPCOM.Components.CreateInstance ( string  contractId,
Type  iface 
) [inline, static]

Definition at line 77 of file components.cs.

    {
        String typeName = iface.FullName;
        String proxyName = typeName.Replace(".Interfaces.", ".Proxies.");
        Console.WriteLine("Need proxy class {0} for {1}", proxyName, typeName);
        Type proxyType = System.Type.GetType(proxyName);
        if (contractId == "@off.net/test-component;1") {
            ConstructorInfo ctor = 
                proxyType.GetConstructor(BindingFlags.NonPublic |
                                         BindingFlags.Instance,
                                         null, new Type[1] { typeof(IntPtr) },
                                         null);
            return ctor.Invoke(new object[] { GetTestImpl() });
        }
        return null;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static void Mozilla.XPCOM.Components.Init ( void  ) [inline, static]

Definition at line 60 of file components.cs.

    {
        if (serviceManager != IntPtr.Zero)
            return;

        int res = StartXPCOM(out serviceManager);
        if (res != 0) {
            throw new Exception(String.Format("StartXPCOM failed: {0:X2}",
                                              res));
        }

        RegisterAppDomainHooks();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static void Mozilla.XPCOM.Components.RegisterAppDomainHooks ( ) [inline, static, private]

Definition at line 22 of file components.cs.

    {
        AppDomain.CurrentDomain.TypeResolve += 
            new ResolveEventHandler(TypeResolve);
        AppDomain.CurrentDomain.AssemblyResolve +=
            new ResolveEventHandler(AssemblyResolve);
        Console.WriteLine("XPCOM AppDomain hooks registered.");
    }
static int Mozilla.XPCOM.Components.StartXPCOM ( out IntPtr  srvmgr) [private]
static Assembly Mozilla.XPCOM.Components.TypeResolve ( object  sender,
ResolveEventArgs  args 
) [inline, static, private]

Definition at line 43 of file components.cs.

    {
        if (args.Name.StartsWith("Mozilla.XPCOM.Proxies.")) {
            ProxyGenerator gen = new ProxyGenerator(args.Name);
            return gen.Generate();
        }
        
#if NOTYET
        if (args.Name.StartsWith("Mozilla.XPCOM.Interfaces.")) {
            InterfaceGenerator gen = new InterfaceGenerator(args.Name);
            return gen.Generate();
        }
#endif

        return null;
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 14 of file components.cs.


Property Documentation

AssemblyBuilder Mozilla.XPCOM.Components.ProxyAssembly [static, get]

Definition at line 37 of file components.cs.

Definition at line 16 of file components.cs.


The documentation for this class was generated from the following file: