private void LookupLocation([NotNull] LoadLocationQuery message) { // first, generate Location from SharePoint object _log.Debug("Entered LocationActor-LookupLocation"); var locations = new List <Location>(); var location = message.Location; Location parent; if (location.Scope == Core.Models.Enums.Scope.Farm) { locations.AddRange(dataService.LoadFarmAndWebApps(out parent)); } else { locations.AddRange(dataService.LoadNonFarmLocationAndChildren(location, out parent)); } Sender.Tell(new Core.Messages.Tasks.LocationsLoaded( message.TaskId, parent, locations)); }
private void HandleLocationsLoaded([NotNull] LocationsLoaded message) { TrackLocationsProcessed(message); #if DEBUG var dbgMsg = new FeatureAdmin.Messages.LogMessage(Core.Models.Enums.LogLevel.Debug, string.Format("Debug Load progress: {0}", StatusReport) ); eventAggregator.PublishOnUIThread(dbgMsg); #endif // if web apps are loaded, load children if (message.Parent.Scope == Enums.Scope.Farm) { foreach (Location l in message.ChildLocations) { if (l.Scope == Enums.Scope.WebApplication) { // initiate read of locations var loadWebAppChildren = new LoadLocationQuery(Id, l); LoadTask(loadWebAppChildren); } } } if (Preparations.Completed && FarmFeatureDefinitions.Completed) { // publish locations to wpf eventAggregator.PublishOnUIThread(message); } else { tempLocationStore.Add(message); } SendProgress(); }
private void InitiateLoadTask(Location startLocation) { repository.Clear(); // initiate read of all feature definitions var fdQuery = new LoadFeatureDefinitionQuery(Id); featureDefinitionActor.Tell(fdQuery); // initiate read of locations var loadQuery = new LoadLocationQuery(Id, startLocation); LoadTask(loadQuery); }
private void HandlyLoadLocationQuery([NotNull] LoadLocationQuery message) { _log.Debug("Entered LocationActor-LookupLocationHandlyLoadLocationQuery"); var location = message.Location; if (location.Scope == Core.Models.Enums.Scope.Farm) { Sender.Tell(dataService.LoadFarmAndWebApps()); } else { Sender.Tell(dataService.LoadNonFarmLocationAndChildren(location)); } }
private void InitiateLoadTask(Location startLocation) { // initiate clean all feature definition and location collections var clearMessage = new ClearItems(Id); eventAggregator.PublishOnUIThread(clearMessage); // initiate read of all feature definitions var fdQuery = new LoadFeatureDefinitionQuery(Id); featureDefinitionActor.Tell(fdQuery); // initiate read of locations var loadQuery = new LoadLocationQuery(Id, startLocation); LoadTask(loadQuery); }
private void LoadTask([NotNull] LoadLocationQuery loadQuery) { _log.Debug("Entered LoadTask"); var locationId = loadQuery.Location.Id; if (!locationActors.ContainsKey(locationId)) { IActorRef newLocationActor = Context.ActorOf(Context.DI().Props <LocationActor>()); locationActors.Add(locationId, newLocationActor); newLocationActor.Tell(loadQuery); } else { locationActors[locationId].Tell(loadQuery); } }
private void LookupLocation([NotNull] LoadLocationQuery message) { // first, generate Location from SharePoint object _log.Debug("Entered LocationActor-LookupLocation"); var location = message.Location; Core.Messages.Tasks.LocationsLoaded loadedMessage; if (location.Scope == Core.Models.Enums.Scope.Farm) { loadedMessage = dataService.LoadFarmAndWebApps(); } else { loadedMessage = dataService.LoadNonFarmLocationAndChildren(location); } Sender.Tell(loadedMessage); }
private void HandleLocationsLoaded([NotNull] LocationsLoaded message) { TrackLocationsProcessed(message); // if web apps are loaded, load children if (message.Parent.Scope == Enums.Scope.Farm) { foreach (Location l in message.ChildLocations) { if (l.Scope == Enums.Scope.WebApplication) { // initiate read of locations var loadWebAppChildren = new LoadLocationQuery(Id, l); LoadTask(loadWebAppChildren); } } } repository.AddLoadedLocations(message); SendProgress(); }