SIOC FAQ

FAQ Topics

I have found a bug, want a feature... How do I contact you.

Please contact us using this email address.

How do I make a class a singleton.

To mark a class as a singeton add the 'singleton=yes' attribute to the XML object definition.

<?xml version="1.0" encoding="utf-8" ?>

<objects xmlns:testns="TestAssembly, TestAssembly">

    <object id="Simple" type="testns:SimpleClass" sigleton="yes" />

</objects>

The singeton wil be created on the first request to obtain the object.

If you require a singleton created at application start, the 'create-on-load=yes' attribute should also be set.

<?xml version="1.0" encoding="utf-8" ?>

<objects xmlns:testns="TestAssembly, TestAssembly">

    <object id="Simple" type="testns:SimpleClass" sigleton="yes" create-on-load="yes" />

</objects>

How do I free resources for a singleton.

If a singleton object implements the IDisposable interface, the Dispose method will be called when the SIOC context is unloaded.

How do I call an initialiser method.

To define a method that should be called after an object is fully contructed, add the attribute 'init-method=SomeMethod' to the XML object definition.

<?xml version="1.0" encoding="utf-8" ?>

<objects xmlns:testns="TestAssembly, TestAssembly">

    <object id="Simple" type="testns:SimpleClass" init-method="Init" />

</objects>

This will call the 'Init' method on the object after it is constructed.

How is SIOC licensed.

Please see the licensing page..

How do I obtain license.

Please see the licensing page..