Inherit a class only with Enum Values

P

Peri

I have 3 layers.

First - UI Layer (Windows Application - Thick Client)
Second - Biz Layer (DLL)
Third - Messaging Layer (DLL)

The Messaging Layer is referenced in Biz Layer and Biz Layer is reference in
UI Layer.

I have one class called "MessageValueEnum" in the Messaging layer which
contains arround 20 sets of Enum values. I would like to access these enum
values both in the Biz Layer and UI Layer.

Since the Messaging layer is referenced in Biz layer, I am able to use
Imports and acces all the enum values in "MessageValueEnum". But I am not
able to access this Enum valeus in the UI Layer. Can you please help me out
in telling me the best way of accessing Enum Values in UI Layer.

Thanks and Regards,

Peri
 
T

Tom Shelton

I have 3 layers.

First - UI Layer (Windows Application - Thick Client)
Second - Biz Layer (DLL)
Third - Messaging Layer (DLL)

The Messaging Layer is referenced in Biz Layer and Biz Layer is reference in
UI Layer.

I have one class called "MessageValueEnum" in the Messaging layer which
contains arround 20 sets of Enum values. I would like to access these enum
values both in the Biz Layer and UI Layer.

Since the Messaging layer is referenced in Biz layer, I am able to use
Imports and acces all the enum values in "MessageValueEnum". But I am not
able to access this Enum valeus in the UI Layer. Can you please help me out
in telling me the best way of accessing Enum Values in UI Layer.

Thanks and Regards,

Peri

Create a separate dll that contains the objects that you want the biz
and ui layers to access, and then reference it from both... i
commonly do something like:

myapp.exe
mybizlayer.dll
mydatalayer.dll
mydataobjects.dll

My data objects is often referenced by myapp, mybizlayer, and
mydatalayer, because those data objects have to pass between all three
layers.
 
P

Peri

Thanks Tom, But is there any other better solution to this?

I have 3 layers.

First - UI Layer (Windows Application - Thick Client)
Second - Biz Layer (DLL)
Third - Messaging Layer (DLL)

The Messaging Layer is referenced in Biz Layer and Biz Layer is reference
in
UI Layer.

I have one class called "MessageValueEnum" in the Messaging layer which
contains arround 20 sets of Enum values. I would like to access these enum
values both in the Biz Layer and UI Layer.

Since the Messaging layer is referenced in Biz layer, I am able to use
Imports and acces all the enum values in "MessageValueEnum". But I am not
able to access this Enum valeus in the UI Layer. Can you please help me
out
in telling me the best way of accessing Enum Values in UI Layer.

Thanks and Regards,

Peri

Create a separate dll that contains the objects that you want the biz
and ui layers to access, and then reference it from both... i
commonly do something like:

myapp.exe
mybizlayer.dll
mydatalayer.dll
mydataobjects.dll

My data objects is often referenced by myapp, mybizlayer, and
mydatalayer, because those data objects have to pass between all three
layers.
 
F

Family Tree Mike

Better in what respect? I believe it to be common to use this approach
across tiers.
 

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

Top