Accessing Site Property from extension

I'm writing a series of extensions which all need to use a common url. This URL is constant in its use within the extensions, but needs to be configurable depending on environment. 

Currently I'm storing it as a site property and passing it in as a parameter for each method, but this doesn't seem.... quite ideal.

Is there a better way of accessing a site property from within an extension so I don't need to repeatedly pass it around?

Hi MichaelR,

I think your current approach is the good approach.

Don't make your extension dependent on the availability of a site property, just have it passed as input parameter.

This way your methods can be stateless. Just input, processing and output.



Hi MichaelR,

As Daniel Mentioned the way your passing parametrs is the best approach, extensions don't have access directly to site properties. Oustsytem has restriction to extensions for accesing the site properties..