access the creator object of a class

  • Thread starter Thread starter Max-Ph. Blickenstorfer
  • Start date Start date
M

Max-Ph. Blickenstorfer

I am currently in a black hole looking for a way accessing the creator
object of a class within the class. Something like parent of winform
controls.

Thanks for you time

Max
 
Max,

You aren't going to be able to get this unless your child takes a
reference to the parent that created it. Either that, or you need to have
some sort of class factory that creates your objects, which will hold
references to the objects that it creates.

Hope this helps.
 
Thank you Nicholas,
I need to use a server side db connection and pass this in some way to the
client-activated remote objects (who are created server side). Ideally I
could catch/control the object creation in the host application (how that
then). The host app does create the db connection and registers the service.
So basically if there is possibility to trap a create-object request in the
host app we could assign the connection through a setMethod before returning
the ref. to the proxy. ???

Best Regards
Max


Nicholas Paldino said:
Max,

You aren't going to be able to get this unless your child takes a
reference to the parent that created it. Either that, or you need to have
some sort of class factory that creates your objects, which will hold
references to the objects that it creates.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Max-Ph. Blickenstorfer said:
I am currently in a black hole looking for a way accessing the creator
object of a class within the class. Something like parent of winform
controls.

Thanks for you time

Max
 
Back
Top