But UmbracoSettings appears to internal so I can't access it from my library.
Is there another way of accessing data from umbracoSettings.config? It looks like there used to be an umbraco.UmbracoSettings but I can't find that either. Am I doing completely the wrong thing by even trying? If so, what should I be doing instead?
Referencing all of the Umbraco dlls (I just have a class library in Visual Studio set up with the NuGet package UmbracoCms.Core added to it) I can do something like this:
public class Class1
{
public static void Test()
{
var x = umbraco.UmbracoSettings.AddTrailingSlash;
}
}
And I can access all other settings in the umbracoSettings.config.
Yes, this is marked as obsolete, but still in the v7 codebase, so it won't go anywhere until at least v8.
As I said on StackOverflow, you're probably better off using the Media Protect package or maybe you can use that and write a little bit of extra custom code to make it fit your needs.
Can I access UmbracoSettings from my code in 6.1.6?
I'm trying to create a custom
MediaFileSystem
for a site using Umbraco 6.1.6 and trying to base my code on the existing class as a starting point.The problem I am running into is that there are references to
UmbracoSettings
in the class:But
UmbracoSettings
appears to internal so I can't access it from my library.Is there another way of accessing data from umbracoSettings.config? It looks like there used to be an umbraco.UmbracoSettings but I can't find that either. Am I doing completely the wrong thing by even trying? If so, what should I be doing instead?
Referencing all of the Umbraco dlls (I just have a class library in Visual Studio set up with the NuGet package UmbracoCms.Core added to it) I can do something like this:
And I can access all other settings in the umbracoSettings.config.
Yes, this is marked as obsolete, but still in the v7 codebase, so it won't go anywhere until at least v8.
As I said on StackOverflow, you're probably better off using the Media Protect package or maybe you can use that and write a little bit of extra custom code to make it fit your needs.
is working on a reply...