public static Key ExtractKey(this Localhost localhost, Bundle.EntryComponent entry) { Uri uri = new Uri(entry.Request.Url, UriKind.RelativeOrAbsolute); Key compare = ExtractKey(uri); // This fails!! ResourceIdentity does not work in this case. return(localhost.LocalUriToKey(uri)); }
public HALResponse Index() { var listRepresentation = new RepositoyListRepresentation { Repositories = RepositoryService .Get .Select(_ => new HALResponse( new RepositoryRepresentation { Name = _.Name }) .AddLinks(new[] { new Link("item", Localhost.Url($"/repositories/{_.Name}")) }) ) }; return(new HALResponse(listRepresentation) .AddLinks(new[] { new Link(Link.RelForSelf, Localhost.Url("/repositories"), "Repositories") })); }
protected async System.Threading.Tasks.Task Grid0RowCreate(dynamic args) { var localhostCreateCardResult = await Localhost.CreateCard(args); await grid0.Reload(); await InvokeAsync(() => { StateHasChanged(); }); }
private IEnumerable <Link> GetLinks(string repoName) { yield return(new Link(Link.RelForSelf, Localhost.Url($"/repositories/{repoName}"))); if (this.User.Identity.IsAuthenticated) { yield return(new Link("delete", Localhost.Url($"/repositories/{repoName}"), "Delete", "DELETE")); } }
// // You can use the following additional attributes as you write your tests: // // Use ClassInitialize to run code before running the first test in the class // [ClassInitialize()] // public static void MyClassInitialize(TestContext testContext) { } // // Use ClassCleanup to run code after all tests in a class have run // [ClassCleanup()] // public static void MyClassCleanup() { } // // Use TestInitialize to run code before running each test // [TestInitialize()] // public void MyTestInitialize() { } // // Use TestCleanup to run code after each test has run // [TestCleanup()] // public void MyTestCleanup() { } // #endregion //[TestMethod] public void TestSearch() { IFhirModel _fhirModel = new FhirModel(ModelInfo.SearchParameters); ILocalhost _localhost = new Localhost(new Uri("http://localhost")); // MongoIndexStore _indexStore = // // TODO: Add test logic here // }
protected async System.Threading.Tasks.Task Load() { var localhostGetClientsResult = await Localhost.GetClients(); getClientsForclientIdResult = localhostGetClientsResult; brief = new Flashcardgenerator.Models.Localhost.Brief() { }; }
protected async System.Threading.Tasks.Task Load() { var localhostGetClientsResult = await Localhost.GetClients(); getClientsResult = localhostGetClientsResult; var localhostGetBriefsResult = await Localhost.GetBriefs(); getBriefsResult = localhostGetBriefsResult; }
public static Localhost GetLocalhost() { var localhost = new Localhost(); localhost.Add(Settings.Endpoint, _default: true); localhost.Add("http://hl7.org/fhir/"); localhost.Add("localhost"); localhost.Add("localhost."); return(localhost); }
protected async System.Threading.Tasks.Task Load() { hasChanges = false; canEdit = true; var localhostGetClientByclientIdResult = await Localhost.GetClientByclientId(clientId); client = localhostGetClientByclientIdResult; }
protected async System.Threading.Tasks.Task Load() { hasChanges = false; canEdit = true; var localhostGetCategoryBycategoryIdResult = await Localhost.GetCategoryBycategoryId(categoryId); category = localhostGetCategoryBycategoryIdResult; }
protected async System.Threading.Tasks.Task Load() { var localhostGetBriefsResult = await Localhost.GetBriefs(new Query() { Expand = "Client,Brief($expand=Client)" }); getBriefsResult = localhostGetBriefsResult; sentence = new Flashcardgenerator.Models.Localhost.Sentence() { }; }
protected async System.Threading.Tasks.Task Load() { var localhostGetBriefsResult = await Localhost.GetBriefs(new Query() { Expand = "Client" }); getBriefs = localhostGetBriefsResult; Globals.selectedBriefId = 0; Globals.progressBarVal = 0; }
protected async System.Threading.Tasks.Task Grid0RowExpand(Flashcardgenerator.Models.Localhost.Brief args) { master = args; var localhostGetCardsResult = await Localhost.GetCards(new Query() { Filter = $@"i => i.briefId == {args.briefId}" }); if (localhostGetCardsResult != null) { args.Cards = localhostGetCardsResult.ToList(); } }
protected async System.Threading.Tasks.Task Load() { if (string.IsNullOrEmpty(search)) { search = ""; } var localhostGetBriefsResult = await Localhost.GetBriefs(new Query() { Filter = $@"i => i.briefType.Contains(@0) || i.opposingParty.Contains(@1)", FilterParameters = new object[] { search, search }, Expand = "Client" }); getBriefsResult = localhostGetBriefsResult; }
protected async System.Threading.Tasks.Task Load() { if (string.IsNullOrEmpty(search)) { search = ""; } var localhostGetCardsResult = await Localhost.GetCards(new Query() { Filter = $@"briefId eq ""{Globals.selectedBriefId}""", Expand = "Brief,Category,Sentence,Client" }); getCardsResult = localhostGetCardsResult; }
protected async System.Threading.Tasks.Task Load() { if (string.IsNullOrEmpty(search)) { search = ""; } var localhostGetClientsResult = await Localhost.GetClients(new Query() { Filter = $@"i => i.longName.Contains(@0) || i.shortName.Contains(@1)", FilterParameters = new object[] { search, search }, Expand = "" }); getClientsResult = localhostGetClientsResult; }
protected async System.Threading.Tasks.Task Load() { hasChanges = false; canEdit = true; var localhostGetBriefBybriefIdResult = await Localhost.GetBriefBybriefId(briefId); brief = localhostGetBriefBybriefIdResult; var localhostGetClientsResult = await Localhost.GetClients(); getClientsForclientIdResult = localhostGetClientsResult; }
protected async System.Threading.Tasks.Task Load() { if (string.IsNullOrEmpty(search)) { search = ""; } var localhostGetCategoriesResult = await Localhost.GetCategories(new Query() { Filter = $@"i => i.name.Contains(@0)", FilterParameters = new object[] { search } }); getCategoriesResult = localhostGetCategoriesResult; }
public async Task CreateSentencesFromLastUpload() { DocProcessing newDoc = new DocProcessing(); try { newDoc.Process(UploadController.cGlobals.lastUploadDir); } catch (System.Exception ArgumentException) { NotificationService.Notify(new NotificationMessage() { Severity = NotificationSeverity.Error, Summary = $"Error", Detail = $"Please upload a file." }); } IList <string> strings = (IList <string>)Segmenter.Segment(newDoc.getAllText()); int listCount = (strings).Count; int count = 0; try { { foreach (string iter in strings) { Globals.progressBarVal = (int)(count); Card c = new Card(); c.Answer = iter; { c.briefId = (int)Globals.selectedBriefId; } ; await Localhost.CreateCard(c); count++; } } } catch (System.Exception ArgumentException) { NotificationService.Notify(new NotificationMessage() { Severity = NotificationSeverity.Error, Summary = $"Error", Detail = $"Processing failed." }); } }
public HALResponse Index() { return (new HALResponse(null) .AddLinks(new[] { new Link(Link.RelForSelf, Localhost.Url("/"), "Home"), new Link("repositories", Localhost.Url("/repositories"), "Repositories"), new Link("users", Localhost.Url("/users"), "Users"), new Link("settings", Localhost.Url("/settings"), "Settings"), })); }
protected async System.Threading.Tasks.Task Form0Submit(Flashcardgenerator.Models.Localhost.Category args) { try { var localhostCreateCategoryResult = await Localhost.CreateCategory(category); DialogService.Close(category); } catch (System.Exception localhostCreateCategoryException) { NotificationService.Notify(new NotificationMessage() { Severity = NotificationSeverity.Error, Summary = $"Error", Detail = $"Unable to create new Category!" }); } }
protected async System.Threading.Tasks.Task Load() { hasChanges = false; canEdit = true; var localhostGetSentenceBysentenceIdResult = await Localhost.GetSentenceBysentenceId(sentenceId); sentence = localhostGetSentenceBysentenceIdResult; var localhostGetBriefsResult = await Localhost.GetBriefs(new Query() { Expand = "Client" }); getBriefsForbriefIdResult = localhostGetBriefsResult; }
protected async System.Threading.Tasks.Task Load() { var localhostGetBriefsResult = await Localhost.GetBriefs(); getBriefsForbriefIdResult = localhostGetBriefsResult; var localhostGetCategoriesResult = await Localhost.GetCategories(); getCategoriesForcategoryIdResult = localhostGetCategoriesResult; var localhostGetSentencesResult = await Localhost.GetSentences(); getSentencesForsentenceIdResult = localhostGetSentencesResult; card = new Flashcardgenerator.Models.Localhost.Card() { }; }
protected async System.Threading.Tasks.Task Form0Submit(Flashcardgenerator.Models.Localhost.Client args) { try { var localhostUpdateClientResult = await Localhost.UpdateClient(clientId, client); DialogService.Close(client); } catch (System.Exception localhostUpdateClientException) { NotificationService.Notify(new NotificationMessage() { Severity = NotificationSeverity.Error, Summary = $"Error", Detail = $"Unable to update Client" }); hasChanges = localhostUpdateClientException is DbUpdateConcurrencyException; } }
protected async System.Threading.Tasks.Task Splitbutton0Click(RadzenSplitButtonItem args) { if (args?.Value == "csv") { await Localhost.ExportClientsToCSV(new Query() { Filter = $@"{grid0.Query.Filter}", OrderBy = $"{grid0.Query.OrderBy}", Expand = "", Select = "clientId,isCurrent,longName,shortName" }, $"Clients"); } if (args == null || args.Value == "xlsx") { await Localhost.ExportClientsToExcel(new Query() { Filter = $@"{grid0.Query.Filter}", OrderBy = $"{grid0.Query.OrderBy}", Expand = "", Select = "clientId,isCurrent,longName,shortName" }, $"Clients"); } }
protected async System.Threading.Tasks.Task Splitbutton0Click(RadzenSplitButtonItem args) { if (args?.Value == "csv") { await Localhost.ExportSentencesToCSV(new Query() { Filter = $@"{grid0.Query.Filter}", OrderBy = $"{grid0.Query.OrderBy}", Expand = "Brief", Select = "Brief.briefType,content,sentenceId,verified" }, $"Sentences"); } if (args == null || args.Value == "xlsx") { await Localhost.ExportSentencesToExcel(new Query() { Filter = $@"{grid0.Query.Filter}", OrderBy = $"{grid0.Query.OrderBy}", Expand = "Brief", Select = "Brief.briefType,content,sentenceId,verified" }, $"Sentences"); } }
protected async System.Threading.Tasks.Task Splitbutton0Click(RadzenSplitButtonItem args) { if (args?.Value == "csv") { await Localhost.ExportCardsToCSV(new Query() { Filter = $@"{grid0.Query.Filter}", OrderBy = $"{grid0.Query.OrderBy}", Expand = "Brief,Category,Sentence", Select = "Answer,Brief.briefType,cardId,Category.name,Question,Sentence.content,Verified" }, $"Cards"); } if (args == null || args.Value == "xlsx") { await Localhost.ExportCardsToExcel(new Query() { Filter = $@"{grid0.Query.Filter}", OrderBy = $"{grid0.Query.OrderBy}", Expand = "Brief,Category,Sentence", Select = "Answer,Brief.briefType,cardId,Category.name,Question,Sentence.content,Verified" }, $"Cards"); } }
protected async System.Threading.Tasks.Task Splitbutton0Click(RadzenSplitButtonItem args) { if (args?.Value == "csv") { await Localhost.ExportBriefsToCSV(new Query() { Filter = $@"{grid0.Query.Filter}", OrderBy = $"{grid0.Query.OrderBy}", Expand = "Client", Select = "briefId,briefType,Client.longName,isTestBrief,opposingParty" }, $"Brief 2"); } if (args == null || args.Value == "xlsx") { await Localhost.ExportBriefsToExcel(new Query() { Filter = $@"{grid0.Query.Filter}", OrderBy = $"{grid0.Query.OrderBy}", Expand = "Client", Select = "briefId,briefType,Client.longName,isTestBrief,opposingParty" }, $"Brief 2"); } }
protected async System.Threading.Tasks.Task Load() { hasChanges = false; canEdit = true; var localhostGetCardBycardIdResult = await Localhost.GetCardBycardId(cardId); card = localhostGetCardBycardIdResult; var localhostGetBriefsResult = await Localhost.GetBriefs(); getBriefsForbriefIdResult = localhostGetBriefsResult; var localhostGetCategoriesResult = await Localhost.GetCategories(); getCategoriesForcategoryIdResult = localhostGetCategoriesResult; var localhostGetSentencesResult = await Localhost.GetSentences(); getSentencesForsentenceIdResult = localhostGetSentencesResult; }
protected async System.Threading.Tasks.Task GridDeleteButtonClick(MouseEventArgs args, dynamic data) { try { if (await DialogService.Confirm("Are you sure you want to delete this record?") == true) { var localhostDeleteClientResult = await Localhost.DeleteClient(data.clientId); if (localhostDeleteClientResult != null) { await grid0.Reload(); } } } catch (System.Exception localhostDeleteClientException) { NotificationService.Notify(new NotificationMessage() { Severity = NotificationSeverity.Error, Summary = $"Error", Detail = $"Unable to delete Client" }); } }