I have some data for my SP feature that is using the hierarchical object store to persist the data. I would like to read this data using the Client Object Model in an application that will be running on the users desktop machine. I can't seem to find a class that would allow me to do that. Is this possible? If so, how would I access it? Below is sample code of my persisted object class. I create this object using the static method on the class in an Administrative Console page. I want to be able to read (in this example) the value of the _myFavoriteMeat
property from a client application (my application is straight C# 3.5 Winforms application).
[System.Runtime.InteropServices.GuidAttribute("AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA")]
public class MyCustomSettings : SPPersistedObject
{
[Persisted]
string _myFavoriteMeat;
public MyCustomSettings() : base() {}
public MyCustomerSettings(SPPersistedObject parent)
: base("MySettingsName", parent)
{
}
public static MyCustomSettings GetSettings()
{
MyCustomSettings settings = SPFarm.Local.GetChild<MyCustomSettings>("MySettingsName");
if (settings == null)
{
settings = new MyCustomSettings(SPFarm.Local);
}
return settings;
}
public string MyFavoriteMeat
{
get
{
return _myFavoriteMeat;
}
set
{
_myFavoriteMeat = value;
}
}
}