public AjaxContinuation get_dependencies_type(AssetDependenciesRequest request) { var logs = _assetLogs.Entries .Select(l => l.Name); IEnumerable <IGrouping <string, string> > fileNames = logs.GroupBy(x => new FileInfo(x).Extension); var javascripts = fileNames.Where(g => g.Key == ".js"); object data = null; foreach (var javascript in javascripts) { var dependencies = javascript.Select(x => _graph.FileDependencyFor(x)); data = dependencies.Select(d => new { d, fromName = d.Name }).SelectMany(@t => @t.d.Dependencies(), (@t, sub) => new { source = @t.fromName, target = sub.Name, type = "suit" }); } var datum = AjaxContinuation.Successful(); datum["datum"] = data; return(datum); }
private FormRequest requestFor <T>() where T : class, new() { var services = new InMemoryServiceLocator(); services.Add <IChainResolver>(new ChainResolutionCache(theGraph)); services.Add <IChainUrlResolver>(new ChainUrlResolver(new OwinHttpRequest())); theRequest = new InMemoryFubuRequest(); theNotification = Notification.Valid(); theRequest.Set(theNotification); services.Add(theRequest); var request = new FormRequest(new ChainSearch { Type = typeof(T) }, new T()); request.Attach(services); request.ReplaceTag(new FormTag("test")); theContinuation = AjaxContinuation.Successful(); theContinuation.ShouldRefresh = true; var resolver = MockRepository.GenerateStub <IAjaxContinuationResolver>(); resolver.Stub(x => x.Resolve(theNotification)).Return(theContinuation); services.Add(resolver); return(request); }
public void Successful_builder_method() { var success = AjaxContinuation.Successful(); success.Errors.Any().ShouldBeFalse(); success.Success.ShouldBeTrue(); }
public AjaxContinuation post_ajax(AjaxModel user) { var continuation = AjaxContinuation.Successful(); continuation.Message = "User created: " + user.Name; return(continuation); }
public AjaxContinuation post_ajax(AjaxIn input) { var continuation = AjaxContinuation.Successful(); continuation.Message = input.Message; return(continuation); }
public AjaxContinuation post_products_create(Product product) { _repository.Update(product); var continuation = AjaxContinuation.Successful(); continuation.ShouldRefresh = true; return(continuation); }
public AjaxContinuation Command(AddProductModel model) { var product = _mapper.Map <AddProductModel, Product>(model); _service.Save(product); var result = AjaxContinuation.Successful(); result["id"] = product.Id; return(result); }
public AjaxContinuation post_project_properties_Name(ProjectViewModel model) { var project = TopicGraph.AllTopics.TryFindProject(model.Name); model.Project.Filename = project.Filename; model.Project.WriteTo(project.Filename); model.Project.Index = project.Index; model.Project.Splash = project.Splash; TopicGraph.AllTopics.AddProject(model.Project); return(AjaxContinuation.Successful()); }
protected override DoNext performInvoke() { try { var message = _request.Get <T>(); _serviceBus.Send(message); _request.Set(AjaxContinuation.Successful()); } catch (Exception e) { _request.Set(new AjaxContinuation { Success = false }); _logger.Error("Error trying to publish message of type " + typeof(T).FullName, e); } return(DoNext.Continue); }
public AjaxContinuation post_project_ProjectName(TopicToken topic) { if (_lastTimestamp == _reloaded.Timestamp.ToString()) { return(AjaxContinuation.Successful()); } var existing = _tokenCache.TopicStructureFor(topic.ProjectName); var collector = new DeltaCollector(existing, topic); var orderedDeltas = collector.OrderedDeltas().ToArray(); orderedDeltas.Each(x => Debug.WriteLine(x)); collector.ExecuteDeltas(); Task.Factory.StartNew(() => { EventAggregator.SendMessage(new RecycleApplication()); }); _lastTimestamp = _reloaded.Timestamp.ToString(); return(AjaxContinuation.Successful()); }
public AjaxContinuation post_update_target(PostedData data) { return(AjaxContinuation.Successful()); }
public AjaxContinuation post_ignored(IgnoredModel input) { return(AjaxContinuation.Successful()); }
public AjaxContinuation put_team(Team team) { return(AjaxContinuation.Successful()); }
public AjaxContinuation post_save_character(CharacterInput input) { return(AjaxContinuation.Successful()); }
// Because JsonInput implements the FubuMVC.Core.JsonMessage // marker interface, this endpoint will be configured as // "Asymmetric Json" public AjaxContinuation post_json_input(JsonInput input) { return(AjaxContinuation.Successful()); }
public AjaxContinuation post_ajax(AjaxRequest request) { return(AjaxContinuation.Successful()); }
public AjaxContinuation get_alternative_for_actionless_view(ActionlessView3 input) { return(AjaxContinuation.Successful()); }
public AjaxContinuation delete_js_method3(Method1Input input) { return(AjaxContinuation.Successful()); }
public AjaxContinuation get_different(FormInput input) { return(AjaxContinuation.Successful()); }
public AjaxContinuation post_form_Name(FormInput input) { return(AjaxContinuation.Successful()); }
public AjaxContinuation post_input_Name(InputWithPattern patter) { return(AjaxContinuation.Successful()); }
public AjaxContinuation post_integration(IntegratedJsonBindingTarget target) { _recorder.Record(target); return(AjaxContinuation.Successful()); }
public AjaxContinuation get_something(T input) { return(AjaxContinuation.Successful()); }
public AjaxContinuation get_success() { return(AjaxContinuation.Successful()); }
public AjaxContinuation get_with_input(AjaxControllerInput input) { return(AjaxContinuation.Successful()); }
public AjaxContinuation post_name(NamedEntity entity) { _repository.Update(entity); return(AjaxContinuation.Successful()); }
public AjaxContinuation post_ajax_test(TestItem item) { return(AjaxContinuation.Successful()); }