Show / Hide Table of Contents

Class FhirExpandoClass

Represents a dynamically assigned class within a FhirExpando. FhirExpando objects which share the same members will share the same class. Classes are dynamically assigned as the expando object gains members. Based off the DotNet ExpandoClass implementation: https://github.com/microsoft/referencesource/blob/master/System.Core/Microsoft/Scripting/Actions/ExpandoClass.cs

Inheritance
System.Object
FhirExpandoClass
Namespace: Microsoft.Health.Fhir.SpecManager.Models
Assembly: Microsoft.Health.Fhir.SpecManager.dll
Syntax
public class FhirExpandoClass : object

Constructors

| Improve this Doc View Source

FhirExpandoClass()

Initializes a new instance of the FhirExpandoClass class. This is the class used when an empty FhirExpando is initially constructed.

Declaration
public FhirExpandoClass()
| Improve this Doc View Source

FhirExpandoClass(String[], Int32)

Initializes a new instance of the FhirExpandoClass class. Constructs an instance that can hold onto the specified keys. The keys must be sorted ordinally. The hash code must be precalculated for the keys.

Declaration
public FhirExpandoClass(string[] keys, int hashCode)
Parameters
Type Name Description
System.String[] keys

Gets the names of the keys that can be stored in the FhirExpando class. The list is sorted ordinally.

System.Int32 hashCode

The hash code.

Fields

| Improve this Doc View Source

Empty

The empty FhirExpando class - all FhirExpando objects start off w/ this class.

Declaration
public static FhirExpandoClass Empty
Field Value
Type Description
FhirExpandoClass

Properties

| Improve this Doc View Source

Keys

Gets the names of the keys that can be stored in the FhirExpando class. The list is sorted ordinally.

Declaration
public string[] Keys { get; }
Property Value
Type Description
System.String[]

Methods

| Improve this Doc View Source

FindNewClass(String)

Finds or creates a new FhirExpandoClass given the existing set of keys in this FhirExpandoClass plus the new key to be added. Members in an FhirExpandoClass are always stored case sensitively.

Declaration
public FhirExpandoClass FindNewClass(string newKey)
Parameters
Type Name Description
System.String newKey

The new key.

Returns
Type Description
FhirExpandoClass

The found new class.

| Improve this Doc View Source

GetValueIndex(String, Boolean, FhirExpando)

Gets the index at which the value should be stored for the specified name.

Declaration
public int GetValueIndex(string name, bool caseInsensitive, FhirExpando obj)
Parameters
Type Name Description
System.String name
System.Boolean caseInsensitive
FhirExpando obj
Returns
Type Description
System.Int32
| Improve this Doc View Source

GetValueIndexCaseSensitive(String)

Gets the index at which the value should be stored for the specified name case sensitively. Returns the index even if the member is marked as deleted.

Declaration
public int GetValueIndexCaseSensitive(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
System.Int32
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX