Show / Hide Table of Contents

Class FhirUtils

A fhir utilities.

Inheritance
System.Object
FhirUtils
Namespace: Microsoft.Health.Fhir.CodeGenCommon.Models
Assembly: Microsoft.Health.Fhir.CodeGenCommon.dll
Syntax
public abstract class FhirUtils : object

Fields

| Improve this Doc View Source

DefinitionalResourceNames

Declaration
public static readonly Dictionary<string, string> DefinitionalResourceNames
Field Value
Type Description
Dictionary<System.String, System.String>
| Improve this Doc View Source

ReplacementsPascal

(Immutable) The pascal.

Declaration
public static readonly Dictionary<char[], string> ReplacementsPascal
Field Value
Type Description
Dictionary<System.Char[], System.String>
| Improve this Doc View Source

ReplacementsWithUnderscores

(Immutable) The underscore.

Declaration
public static readonly Dictionary<char[], string> ReplacementsWithUnderscores
Field Value
Type Description
Dictionary<System.Char[], System.String>

Methods

| Improve this Doc View Source

SanitizedToConvention(String, FhirTypeBase.NamingConvention)

Sanitized to convention.

Declaration
public static string SanitizedToConvention(string sanitized, FhirTypeBase.NamingConvention convention)
Parameters
Type Name Description
System.String sanitized

The sanitized.

FhirTypeBase.NamingConvention convention

The convention.

Returns
Type Description
System.String

A string.

| Improve this Doc View Source

SanitizeForCode(String, HashSet<String>, out String, out String)

Sanitize for code.

Declaration
public static void SanitizeForCode(string input, HashSet<string> reservedWords, out string name, out string value)
Parameters
Type Name Description
System.String input

The input.

HashSet<System.String> reservedWords

The reserved words.

System.String name

[out] The sanitized name for the code.

System.String value

[out] The sanitized value for the code.

| Improve this Doc View Source

SanitizeForProperty(String, HashSet<String>, FhirTypeBase.NamingConvention, Dictionary<Char[], String>, Boolean)

Sanitize for property.

Declaration
public static string SanitizeForProperty(string value, HashSet<string> reservedWords, FhirTypeBase.NamingConvention convertToConvention = FhirTypeBase.NamingConvention.None, Dictionary<char[], string> replacements = null, bool checkForGmt = false)
Parameters
Type Name Description
System.String value

The value.

HashSet<System.String> reservedWords

The reserved words.

FhirTypeBase.NamingConvention convertToConvention
Dictionary<System.Char[], System.String> replacements

(Optional) The replacements.

System.Boolean checkForGmt

(Optional) True to check for GMT.

Returns
Type Description
System.String

A string.

| Improve this Doc View Source

SanitizeForQuoted(String, Boolean, Boolean)

Sanitize for quoted.

Declaration
public static string SanitizeForQuoted(string input, bool escapeToHtml = false, bool condenseWhitespace = false)
Parameters
Type Name Description
System.String input
System.Boolean escapeToHtml

(Optional) The input.

System.Boolean condenseWhitespace

(Optional) True to condense whitespace.

Returns
Type Description
System.String

A string.

| Improve this Doc View Source

SanitizeForValue(String)

Sanitize for value.

Declaration
public static string SanitizeForValue(string input)
Parameters
Type Name Description
System.String input

The input.

Returns
Type Description
System.String

A string.

| Improve this Doc View Source

SanitizeToAscii(String)

Sanitize to Printable ASCII.

Declaration
public static string SanitizeToAscii(string value)
Parameters
Type Name Description
System.String value

The value.

Returns
Type Description
System.String

A string.

| Improve this Doc View Source

ToConvention(String, String, FhirTypeBase.NamingConvention, Boolean, String, HashSet<String>)

Converts this object to a convention.

Declaration
public static string ToConvention(string name, string path, FhirTypeBase.NamingConvention convention, bool concatenatePath = false, string concatenationDelimiter = "", HashSet<string> reservedWords = null)
Parameters
Type Name Description
System.String name

The value.

System.String path

Full pathname of the file.

FhirTypeBase.NamingConvention convention

The convention.

System.Boolean concatenatePath

(Optional) True to concatenate path.

System.String concatenationDelimiter

(Optional) The concatenation delimiter.

HashSet<System.String> reservedWords

(Optional) The reserved words.

Returns
Type Description
System.String

The given data converted to a string.

  • Improve this Doc
  • View Source
In This Article
  • Fields
    • DefinitionalResourceNames
    • ReplacementsPascal
    • ReplacementsWithUnderscores
  • Methods
    • SanitizedToConvention(String, FhirTypeBase.NamingConvention)
    • SanitizeForCode(String, HashSet<String>, out String, out String)
    • SanitizeForProperty(String, HashSet<String>, FhirTypeBase.NamingConvention, Dictionary<Char[], String>, Boolean)
    • SanitizeForQuoted(String, Boolean, Boolean)
    • SanitizeForValue(String)
    • SanitizeToAscii(String)
    • ToConvention(String, String, FhirTypeBase.NamingConvention, Boolean, String, HashSet<String>)
Back to top Generated by DocFX