public void GlobalSetup() { _wpDoc = WordprocessingDocument.Open(Utils.GetAssetPath("transaction-formatted.docx"), false); _body = _wpDoc.MainDocumentPart.Document.Body; _bodyText = _body.InnerText; BuildNodes(); _tags = TagsFactory.Build(_nodes.ToArray()); _tempNodes = new List <HtmlNode>(NodeCount); _tempNodes.AddRange(_nodes.Take(NodeCount).Select(x => x.Clone())); _tempNodesAr = _tempNodes.ToArray(); _tempsTags = new ITag[TagCount]; Array.Copy(_tags, _tempsTags, TagCount); Console.WriteLine($"Total node count: {_nodes.Count}, targeting {NodeCount} for this benchmark"); Console.WriteLine($"Running at {Math.Round(100 * SizeRatio(), 3)}% of the document"); }
public ValueSetMetadataModule( ISwaggerModelCatalog modelCatalog, ISwaggerTagCatalog tagCatalog, TerminologySqlSettings settings) : base(modelCatalog, tagCatalog) { modelCatalog.AddModels( typeof(CodeSetCodeApiModel), typeof(CodeSystem), typeof(FindByTermQuery), typeof(PagedCollection <ValueSetApiModel>), typeof(PagerSettings), typeof(ValueSetApiModel), typeof(ValueSetCodeApiModel), typeof(ValueSetCreationApiModel)); // /{valueSetId} this.RouteDescriber.DescribeRouteWithParams( "GetValueSet", "Returns one or more ValueSet(s) by ValueSetUniqueId(s)", "Gets a ValueSet by it's ValueSetUniqueId or a collection of ValueSets by CSV of ValueSetUniqueId(s)", new[] { new HttpResponseMetadata <ValueSetApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 404, Message = "Not Found" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetValueSetIdArray(), ParameterFactory.GetSummary(), ParameterFactory.GetCodeSystemCodesArray() }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetPaged", "Returns a paged list of ValueSets", "Gets a paged collection of ValueSets", new[] { new HttpResponseMetadata <PagedCollection <ValueSetApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetSkip(), ParameterFactory.GetTop(settings.DefaultItemsPerPage), ParameterFactory.GetSummary(), ParameterFactory.GetCodeSystemCodesArray() }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "Find", "Search by 'Name' of ValueSet operation", "Gets a paged collection of ValueSet's matching the 'Name' filter", new[] { new HttpResponseMetadata <PagedCollection <ValueSetApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { //ParameterFactory.GetContentType(), new BodyParameter <FindByTermQuery>(modelCatalog) { Required = false } }, new[] { TagsFactory.GetValueSetFindTag() }); this.RouteDescriber.DescribeRouteWithParams( "AddValueSet", "Creates a new value set", "Creates a new value set", new[] { new HttpResponseMetadata <ValueSetApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { //ParameterFactory.GetContentType(), new BodyParameter <ValueSetCreationApiModel>(modelCatalog) { Required = true } }, new[] { TagsFactory.GetValueSetTag() }); }
public ValueSetMetadataModule( ISwaggerModelCatalog modelCatalog, ISwaggerTagCatalog tagCatalog, TerminologySqlSettings settings) : base(modelCatalog, tagCatalog) { modelCatalog.AddModels( typeof(ValueSetFindByTermQuery), typeof(PagedCollection <ValueSetApiModel>), typeof(PagedCollection <ValueSetItemApiModel>), typeof(PagerSettings), typeof(ValueSetApiModel), typeof(ValueSetItemApiModel), typeof(ValueSetCodeApiModel), typeof(ValueSetCodeCountApiModel), typeof(ClientTermValueSetApiModel), typeof(CodeOperation), typeof(ValueSetCopyApiModel), typeof(ValueSetStatus), typeof(CodeOperationSource), typeof(OperationInstruction), typeof(SortDirection), typeof(Guid) ); // /{valueSetGuid} this.RouteDescriber.DescribeRouteWithParams( "GetValueSet", "Returns a ValueSet by it's ValueSetGuid", "Gets a ValueSet by it's ValueSetGuid", new[] { new HttpResponseMetadata <ValueSetApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 400, Message = "Bad Request" }, new HttpResponseMetadata { Code = 404, Message = "Not Found" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetValueSetGuid(), ParameterFactory.GetSummary(), ParameterFactory.GetCodeSystemGuidsArray() }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetMultipleValueSets", "Gets multiple ValueSets", "Gets a collection of ValueSet's given a collection of ValueSetGuid(s)", new[] { new HttpResponseMetadata <PagedCollection <ValueSetApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { new BodyParameter <MultipleValueSetsQuery>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetPaged", "Returns a paged list of ValueSets", "Gets a paged collection of ValueSets", new[] { new HttpResponseMetadata <PagedCollection <ValueSetApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetSkip(), ParameterFactory.GetTop(settings.DefaultItemsPerPage), ParameterFactory.GetSummary(), ParameterFactory.GetCodeSystemGuidsArray(), ParameterFactory.GetQueryStringStatusCode(), ParameterFactory.GetOrderBy("Name") }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetValueSetVersions", "Gets all versions of a ValueSet", "Gets all versions of a ValueSet by it's published ID (Usually OID)", new[] { new HttpResponseMetadata <ValueSetApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 404, Message = "Not Found" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetValueSetReferenceId(), ParameterFactory.GetSummary(), ParameterFactory.GetCodeSystemGuidsArray() }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "Search", "Search by 'Name' of ValueSet operation", "Gets a paged collection of ValueSet's matching the 'Name' filter", new[] { new HttpResponseMetadata <PagedCollection <ValueSetApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { new BodyParameter <ValueSetFindByTermQuery>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "AddValueSet", "Creates a new value set", "Creates a new value set", new[] { new HttpResponseMetadata <ValueSetApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 400, Message = "Bad Request" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { new BodyParameter <ClientTermValueSetApiModel>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "PatchValueSet", "Updates a value set", "Updates a value set", new[] { new HttpResponseMetadata <ValueSetApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 400, Message = "Bad Request" }, new HttpResponseMetadata { Code = 404, Message = "Not Found" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetValueSetGuid(), new BodyParameter <ClientTermValueSetApiModel>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "ChangeValueSetStatus", "Updates the status of an existing value set", "Updates the status of an existing value set. Draft may be changed to active. Active may be changed to Archived. Archived may be changed to Active.", new[] { new HttpResponseMetadata <ValueSetApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetValueSetGuid(), ParameterFactory.GetPathStatusCode() }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "CopyValueSet", "Creates a copy of a ValueSet", "Creates a copy of a ValueSet", new[] { new HttpResponseMetadata <ValueSetApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 404, Message = "Not Found" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { new BodyParameter <ValueSetCopyApiModel>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "CompareValueSets", "Compares two or more ValueSets", "Compares two or more ValueSets", new[] { new HttpResponseMetadata <ValueSetApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { new BodyParameter <CompareValueSetsQuery>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetValueSetTag() }); this.RouteDescriber.DescribeRouteWithParams( "DeleteValueSet", "Deletes a client term ValueSet", "Deletes a client term ValueSet. Request is only valid for client term value sets with a 'Draft' status.", new[] { new HttpResponseMetadata { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 404, Message = "Not Found" }, new HttpResponseMetadata { Code = 400, Message = "Bad Request" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetValueSetGuid() }, new[] { TagsFactory.GetValueSetTag() }); }
public ITag[] BuildTags() => TagsFactory.Build(_tempNodesAr);
public CodeSystemMetadataModule( ISwaggerModelCatalog modelCatalog, ISwaggerTagCatalog tagCatalog) : base(modelCatalog, tagCatalog) { modelCatalog.AddModel <CodeSystemApiModel>(); modelCatalog.AddModel <MultipleCodeSystemQuery>(); modelCatalog.AddModel <Guid>(); this.RouteDescriber.DescribeRouteWithParams( "GetAll", "Returns the collection of all available code systems", "Gets a collection of all available code systems", new[] { new HttpResponseMetadata <IEnumerable <CodeSystemApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, Array.Empty <Parameter>(), new[] { TagsFactory.GetCodeSystemTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetCodeSystem", "Returns a code system by it's CodeSystemGuid (key)", "Gets a CodeSystem by it's CodeSystemGuid", new[] { new HttpResponseMetadata <CodeSystemApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 404, Message = "Not Found" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetCodeSystemGuid() }, new[] { TagsFactory.GetCodeSystemTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetCodeSystems", "Gets multiple CodeSystems", "Gets an array of CodeSystems matching the CodeSystemGuid collection", new[] { new HttpResponseMetadata <IEnumerable <CodeSystemApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { new BodyParameter <MultipleCodeSystemQuery>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetCodeSystemTag() }); }
public SyntaxTreeBuilder(TagsFactory factory) { tagsFactory = factory; Clear(); }
public ValueSetCodeMetadataModule( ISwaggerModelCatalog modelCatalog, ISwaggerTagCatalog tagCatalog) : base(modelCatalog, tagCatalog) { modelCatalog.AddModel <PagedCollection <ValueSetCodeApiModel> >(); this.RouteDescriber.DescribeRouteWithParams( "GetAllValueSetCodesPaged", "Returns a paged list of value set codes", "Gets a paged collection of value set codes", new[] { new HttpResponseMetadata <PagedCollection <ValueSetCodeApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetSkip(), ParameterFactory.GetTop(), ParameterFactory.GetCodeSystemGuidsArray() }, new[] { TagsFactory.GetValueSetCodeTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetValueSetCodes", "Returns a list of value set codes for a given a CodeGuid", "Gets a list of value set codes for a given a CodeGuid", new[] { new HttpResponseMetadata <IEnumerable <ValueSetCodeApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetCodeGuid() }, new[] { TagsFactory.GetValueSetCodeTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetValueSetCodePagedByValueSet", "Returns a paged list of value set codes", "Gets a paged collection of value set codes", new[] { new HttpResponseMetadata <PagedCollection <ValueSetCodeApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetValueSetGuid(), ParameterFactory.GetSkip(), ParameterFactory.GetTop(), ParameterFactory.GetCodeSystemGuidsArray() }, new[] { TagsFactory.GetValueSetCodeTag() }); }
public CodeSystemCodeMetadataModule( ISwaggerModelCatalog modelCatalog, ISwaggerTagCatalog tagCatalog, TerminologySqlSettings settings) : base(modelCatalog, tagCatalog) { modelCatalog.AddModel <CodeSystemCodeApiModel>(); modelCatalog.AddModel <PagedCollection <CodeSystemCodeApiModel> >(); modelCatalog.AddModel <MultipleCodeSystemCodeQuery>(); modelCatalog.AddModel <FindByTermQuery>(); modelCatalog.AddModel <BatchCodeQuery>(); modelCatalog.AddModel <BatchCodeResultApiModel>(); modelCatalog.AddModel <Guid>(); this.RouteDescriber.DescribeRouteWithParams( "GetCodeSystemCode", "Returns a code system code by it's CodeGuid (key)", "Gets a CodeSystemCode by it's CodeGuid", new[] { new HttpResponseMetadata <CodeSystemCodeApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 404, Message = "Not Found" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetCodeGuid() }, new[] { TagsFactory.GetCodeSystemCodeTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetPagedCodeSystemCodes", "Returns a paged collection of code system codes", "Gets a paged collection of code system codes", new[] { new HttpResponseMetadata <PagedCollection <ValueSetApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { ParameterFactory.GetSkip(), ParameterFactory.GetTop(settings.DefaultItemsPerPage), ParameterFactory.GetCodeSystemGuidsArray() }, new[] { TagsFactory.GetCodeSystemCodeTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetCodeSystemCodes", "Gets multiple code system codes", "Gets an array of code system codes matching the CodeGuid collection", new[] { new HttpResponseMetadata <IEnumerable <CodeSystemCodeApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { new BodyParameter <MultipleCodeSystemCodeQuery>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetCodeSystemCodeTag() }); this.RouteDescriber.DescribeRouteWithParams( "GetBatchCodes", "Gets a batch code system codes and non matching 'codes' given an array of 'codes', optionally constrained by code system", "Gets an array of code system codes matching the 'codes' collection and an array non matching 'codes', optionally constrained by code system", new[] { new HttpResponseMetadata <BatchCodeResultApiModel> { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 400, Message = "Bad Request" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { new BodyParameter <BatchCodeQuery>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetCodeSystemCodeTag() }); this.RouteDescriber.DescribeRouteWithParams( "SearchCodeSystemCodes", "Search by 'Name' or 'Code' code system code operation", "Gets a paged collection of code system codes matching the 'Name' or 'Code' filter", new[] { new HttpResponseMetadata <PagedCollection <CodeSystemCodeApiModel> > { Code = 200, Message = "OK" }, new HttpResponseMetadata { Code = 500, Message = "Internal Server Error" } }, new[] { new BodyParameter <FindByTermQuery>(modelCatalog) { Required = true, Name = "Model" } }, new[] { TagsFactory.GetCodeSystemCodeTag() }); }