Exemplo n.º 1
0
 private object[] GetIncludeFilterClauseDescription(ValueSetFilter filter, uri codeSystem)
 {
     return(new object[]
     {
         filter.property.value + " ",
         BootstrapHtml.Abbreviation(filter.op.value.GetDescription(), Html.B(filter.op.value.GetName())),
         " ",
         GetCodeWithHyperlink(filter.value.value, codeSystem.value)
     });
 }
Exemplo n.º 2
0
        public void AddExtensionDefinitions(SDTreeNode treeNode, IStructureDefinitionResolver resolver)
        {
            if (!treeNode.GetNodeType().IsExtension())
            {
                return;
            }

            ElementDefinitionType[] type = treeNode.GetElementDefinitionType();

            if (type == null)
            {
                return;
            }

            if (type.Length != 1)
            {
                return;
            }

            if (type.First().profile == null)
            {
                return;
            }

            if (type.First().profile.Length != 1)
            {
                return;
            }

            uri profileUri = type.First().profile.First();

            if (profileUri == null)
            {
                return;
            }

            StructureDefinition structureDefinition = resolver.GetStructureDefinition(profileUri.value);

            if (structureDefinition == null)
            {
                throw new Exception("Could not find extension " + profileUri.value);
            }

            treeNode.ExtensionDefinition = structureDefinition;
        }
Exemplo n.º 3
0
        private XElement GenerateCodeTable(ValueSetCode[] codes, uri codeSystem, bool isExternal)
        {
            bool showDefinition = (!isExternal) && (!codes.All(t => string.IsNullOrWhiteSpace(t.Definition)));

            return(BootstrapHtml.Table(Styles.TableLayoutFixedClassName, new object[]
            {
                Html.THead(new object[]
                {
                    Html.Th(Styles.TableColumn20pcClassName, "Code"),
                    Html.Th(Styles.TableColumn20pcClassName, "Display"),
                    Html.Th(showDefinition ? "Definition" : string.Empty)
                }),
                Html.TBody
                (
                    codes.Select(t => Html.Tr(new object[]
                {
                    Html.Td(GetCodeWithHyperlink(t.Code, codeSystem.WhenNotNull(s => s.value))),
                    Html.Td(t.DisplayName ?? (isExternal ? "(see external code system)" : string.Empty)),
                    Html.Td(showDefinition ? t.Definition : string.Empty)
                }))
                )
            }));
        }
Exemplo n.º 4
0
 public static implicit operator Url([NotNull] Uri uri) => new Url(uri);
Exemplo n.º 5
0
 await SendPostRequestAsync(uri, CreateFormContent(FormData));
Exemplo n.º 6
0
 await nav.Navigate(uri, args);
Exemplo n.º 7
0
 PostFormUrlEncoded(uri, data, requestInfo)
 .Then(DeserializeJson <TResult>);
Exemplo n.º 8
0
 var response = await RequestNetatmoApi(uri, parameters);
Exemplo n.º 9
0
 public string sendRequest(IRequest request, uri url)
 {
     return(request.sendRequest(url));
 }
Exemplo n.º 10
0
 (uri, clientOptions) => new ShareServiceClient(uri, clientOptions),
 (uri, sharedKeyCredential, clientOptions) => new ShareServiceClient(uri, sharedKeyCredential, clientOptions),
        private XElement GetTypeTableCell(ElementDefinitionType[] types, SDTreeNode associatedTreeNode = null)
        {
            string result = string.Empty;

            if (types == null)
            {
                if (associatedTreeNode != null)
                {
                    ElementDefinition associatedElement = associatedTreeNode.Element;

                    if (associatedElement.nameReference != null)
                    {
                        if (!string.IsNullOrWhiteSpace(associatedElement.nameReference.value))
                        {
                            return(Html.Td("(see element " + associatedElement.nameReference.value + ")"));
                        }
                    }
                }

                return(Html.Td(string.Empty));
            }

            if (types.Length == 0)
            {
                return(Html.Td(string.Empty));
            }
            else if (types.Length == 1)
            {
                ElementDefinitionType type = types.Single();

                if (type.IsReference())
                {
                    return(Html.Td(GetReferenceTypeName(new ElementDefinitionType[] { type })));
                }
                else if (type.IsExtension())
                {
                    uri profileUri = type.profile.WhenNotNull(t => t.FirstOrDefault());

                    if (profileUri != null)
                    {
                        StructureDefinition structureDefinition = _resourceFileSet.GetStructureDefinition(profileUri.value);

                        if (structureDefinition.IsComplexExtension())
                        {
                            return(Html.Td("(complex extension)"));
                        }
                        else
                        {
                            ElementDefinitionType[] elementDefinitionTypes = structureDefinition.GetSimpleExtensionType();
                            return(GetTypeTableCell(elementDefinitionTypes));
                        }
                    }
                    else
                    {
                        return(Html.Td(string.Empty));
                    }
                }
                else
                {
                    return(Html.Td(GetNonReferenceTypeName(type)));
                }
            }
            else
            {
                if (types.All(t => t.IsReference()))
                {
                    return(Html.Td(GetReferenceTypeName(types)));
                }

                return(Html.Td(types.Select(t => GetNonReferenceTypeName(t)).Intersperse(" | ")));
            }
        }
Exemplo n.º 12
0
 public string sendRequest(uri url)
 {
     // instantiate actual http request here and return response
 }
Exemplo n.º 13
0
 => await testLspServer.InsertTextAsync(uri, changes);
Exemplo n.º 14
0
 => DownloadHTML(uri, CancellationToken.None, keyValuePairs);
Exemplo n.º 15
0
 => P_TryDeconstructManifestResourceUri(uri: uri, partial: true, assemblyName: out assemblyName, name: out var name, exception: out exception);
Exemplo n.º 16
0
 ErrorCodes.InvalidImage => throw new RemoteInvalidImageException(uri, error.Description),
Exemplo n.º 17
0
 default,     // file shares don't suppot oauth
 (uri, azureSasCredential, clientOptions) => new ShareServiceClient(uri, azureSasCredential, clientOptions),
 () => new ShareClientOptions(serviceVersion));
Exemplo n.º 18
0
 _ => throw new RemoteImageException(uri, error.ErrorCode, error.Description)
Exemplo n.º 19
0
 => new Response <object>((await client.PutAsync(uri, CreateContent(@object)).ConfigureAwait(false)).StatusCode, default);
Exemplo n.º 20
0
 (uri, sharedKeyCredential, clientOptions) => new ShareServiceClient(uri, sharedKeyCredential, clientOptions),
 default,     // file shares don't suppot oauth
 (uri, azureSasCredential, clientOptions) => new ShareServiceClient(uri, azureSasCredential, clientOptions),
Exemplo n.º 21
0
 Private Sub GetPOSTResponse(uri As Uri, data As String, callback As Action(Of Response))
Exemplo n.º 22
0
 private async Task <(bool hadResult, HttpResponseMessage response)> CheckUrl(Uri uri, string path) => await CheckUrl(new Uri(uri, path));
Exemplo n.º 23
0
 => Rpc = new TezosRpc(uri, timeout, chain);