Hi
I'm writing an application which has script/plugin system.
I want to provide a central place where settings are stored/recalled,
dividing settings into private and public ones (per plugin).
So basically my question is:
Is there a reliable way to know from which dll the Property was called?
(Without relying on the plugin, giving its name as a parameter)
Simplified example:
I've read that stacktrace isn't really reliable, so is there any other way?
I'm writing an application which has script/plugin system.
I want to provide a central place where settings are stored/recalled,
dividing settings into private and public ones (per plugin).
So basically my question is:
Is there a reliable way to know from which dll the Property was called?
(Without relying on the plugin, giving its name as a parameter)
Simplified example:
Visual Basic:
Class cMain
Sub new(Main as cMain)
Dim P1 = new cPlugin(Me)
Dim P2 = new cPlugin2(Me)
End Sub
Public Property Settings(Key as String) as Object
'Get: Return GetSetting([Pluginname], Key)
'Set: GetSetting([Pluginname], Key) = Value
End Property
End Class
Class cPlugin
Sub new(Main as cMain)
Main.Settings("Key") = [SomeObj]
End Sub
End Class
Class cPlugin2
Sub new(Main as cMain)
Main.Settings("Key") = [SomeObj]
End Sub
End Class
I've read that stacktrace isn't really reliable, so is there any other way?