Exemplo n.º 1
0
        public void SaveSettings(SiteSettingsBase settings)
        {
            MethodInfo methodInfo    = GetType().GetMethods().First(x => x.Name == "SaveSettings" && x.IsGenericMethod);
            MethodInfo genericMethod = methodInfo.MakeGenericMethod(settings.GetType());

            genericMethod.Invoke(this, new object[] { settings });
        }
Exemplo n.º 2
0
 private string GetFileLocation(SiteSettingsBase settings)
 {
     return(GetFileLocation(settings.GetType()));
 }
Exemplo n.º 3
0
        public void MarkAsMigrated(SiteSettingsBase siteSettings)
        {
            string fileLocation = GetFileLocation(siteSettings.GetType());

            File.Move(fileLocation, GetMigratedFileLocation(siteSettings.GetType()));
        }