Hi Kevin,
>>I need to factory drive classes instantiation in my application. There is a application factory, but since it is derived from an abstract class, I can only use it for overriding methods from MM. I also see the documentation talks about a generic factory. The documentation shows how to set up the classes table for it, but that is where it stops.
>
>You can simply extend the existing Factory.cs/Factory.vb file for your application-specific needs--you don't need to create a new factory.
>
>>Has anybody been using the generic factory?
>
>The Generic factory is specifically suited for data-driving class instantiation. If you don't need this feature then I don't recommend using it.
>
Then this should be correct?
in App.cs I create a reference to the factory so it is created
Factory factory = mmAppBase.Factory;
Then add a CreateRfid in the application level factory class
public RfidReaderBase CreateRfidReader()
{
return new RfidReaderIntermec();
}
I add a property to the app.cs file
public RfidReaderBase Rfid
{
get
{
if (rfid == null)
{
rfid = factory.CreateRfidReader();
rfid.Initialize();
}
return rfid;
}
}
private RfidReaderBase rfid;
Timothy Bryan