public void SetConfig(WebConfiguration config, SPWeb web)
 {
     web.Properties[s] = SerializeHelper.ToXmlString <WebConfiguration>(config);
     web.Properties.Update();
 }
        public WebConfiguration GetConfigOrdefault(SPWeb web)
        {
            var str = web.Properties[s];

            return(SerializeHelper.ParseOrDefault <WebConfiguration>(str));
        }
 public void SetConfig(FarmConfiguration config, SPFarm farm)
 {
     farm.Properties[s] = SerializeHelper.ToXmlString <FarmConfiguration>(config);
     farm.Update();
 }
        public FarmConfiguration GetConfigOrdefault(SPFarm farm)
        {
            var str = farm.Properties[s] as string;

            return(SerializeHelper.ParseOrDefault <FarmConfiguration>(str));
        }