Hi,

I encapsulated the send and receive codes into a class I created in
different apps(.cs files). I created a constructor for each class at these
two apps and put the declaration for factory, connection, and channel in
this constructor so that the object that will be created out of classes from
app1 and app2 will exploit the connection when declaring queues, exchanges,
etc in the respective publish and subscribe methods. However, when I try to
use factory, connection and channel in the subscribe and publish methods, I
got an error saying it doesn't know those attributes. How can you make
connection, hostname etc public to the class so that methods in the class
exploit this declaration?

Regards,
Demi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110712/72f17b1a/attachment.htm>

Search Discussions

  • Simone Busoli at Jul 12, 2011 at 7:30 pm
    Demi, I am under the impression that you're trying to program in a
    programming language that you're not familiar with, I would suggest that you
    first develop some basic skills about your programming environment, and then
    exploit them to build the system you need. This is a very general
    programming question which I don't think has a lot to do with RabbitMQ. To
    begin with, if you're working with the .NET framework, I would suggest you
    to use an IDE like Visual Studio, MonoDevelop or SharpDevelop.
    On Jul 12, 2011 9:22 PM, "Demi Zike" wrote:
    Hi,

    I encapsulated the send and receive codes into a class I created in
    different apps(.cs files). I created a constructor for each class at these
    two apps and put the declaration for factory, connection, and channel in
    this constructor so that the object that will be created out of classes from
    app1 and app2 will exploit the connection when declaring queues,
    exchanges,
    etc in the respective publish and subscribe methods. However, when I try to
    use factory, connection and channel in the subscribe and publish methods, I
    got an error saying it doesn't know those attributes. How can you make
    connection, hostname etc public to the class so that methods in the class
    exploit this declaration?

    Regards,
    Demi
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110712/e13d73e1/attachment.htm>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedJul 12, '11 at 7:22p
activeJul 12, '11 at 7:30p
posts2
users2
websiterabbitmq.com
irc#rabbitmq

2 users in discussion

Demi Zike: 1 post Simone Busoli: 1 post

People

Translate

site design / logo © 2021 Grokbase