Generic List for ID Objects Cross Assembly with Provider andInterfaces

S

Schemed

Hello,

I spent yesterday trying to figure this out to no avail. It appears
to be a no brainer case for generics but so far I am stuck having to
pass values as an object type.

I have four Assemblies.

1.) BookDatabase :
- database tier
- Implements Abstract BookProvider

2.) BookObject :
- Implements Interface IBookObj

3.) SearchEngine/Indexer (Lucene) :
- Implements Interface ISearchEngine

4.) ProviderObj :
- Declares interface and abstract object
- Plumbs the above three assemblies togethor
- ie.

namespace ProviderObj
{
public abstract class BookProviderAbstract : ProviderBase
{
public abstract object[] GetBookIds(int startRowIndex,
int maxRows);

public abstract void LoadBooks(IBookObj[] Books,
object[] BookIds);

:
:
:

}

public interface IBookObj
{
object ID
{
get;
set;
}

:
:
:

}

public interface ISearchEngine
{
object[] GetBookIDsAuthoredBy(string Author)

:
:
:

}
}

I would like to be able to use generics for the ID object
(IBookObj.ID). The ID object type would be defined in Assembly 2 -
the BookObject.

Any help would be tremendously appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top