/// <summary> /// This looks lame but it means we don't have to go into Umbraco and configure stuff. /// </summary> public static void Synchronize() { var dataSync = new DataTypeSync(); var mediaSync = new MediaTypeSync(); var docSync = new DocTypeSync(); var memberSync = new MemberTypeSync(); var memberGroupSync = new MemberGroupSync(); //Sync all the types dataSync.SyncAll(); mediaSync.SyncAll(); docSync.SyncAll(); memberSync.SyncAll(); memberGroupSync.SyncAll(); //Syncing tasks that user wants to run. var syncTaskTypes = ReflectionHelper.GetTypesThatImplementInterface(typeof(ISyncTask)); foreach (var syncTaskType in syncTaskTypes) { var task = Activator.CreateInstance(syncTaskType) as ISyncTask; task.Run(); } AssemblyVersionHelper.Update(); }
/// <summary> /// This looks lame but it means we don't have to go into Umbraco and configure stuff. /// </summary> public static void Synchronize() { var dataSync = new DataTypeSync(); var mediaSync = new MediaTypeSync(); var docSync = new DocTypeSync(); var memberSync = new MemberTypeSync(); var memberGroupSync = new MemberGroupSync(); //Sync all the types dataSync.SyncAll(); mediaSync.SyncAll(); docSync.SyncAll(); memberSync.SyncAll(); memberGroupSync.SyncAll(); //Syncing tasks that user wants to run. var syncTaskTypes = ReflectionHelper.GetTypesThatImplementInterface(typeof(ISyncTask)); foreach (var task in syncTaskTypes.Select(syncTaskType => Activator.CreateInstance(syncTaskType) as ISyncTask)) { task.Run(); } AssemblyVersionHelper.Update(); }