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
Namespace: Microsoft.Health.Fhir.SpecManager.Models
Assembly: Microsoft.Health.Fhir.SpecManager.dll
Syntax
public class FhirExpandoClass : object
Constructors
| Improve this Doc View SourceFhirExpandoClass()
Initializes a new instance of the Fhir
Declaration
public FhirExpandoClass()
FhirExpandoClass(String[], Int32)
Initializes a new instance of the Fhir
Declaration
public FhirExpandoClass(string[] keys, int hashCode)
Parameters
Type | Name | Description |
---|---|---|
System. |
keys | Gets the names of the keys that can be stored in the FhirExpando class. The list is sorted ordinally. |
System. |
hashCode | The hash code. |
Fields
| Improve this Doc View SourceEmpty
The empty FhirExpando class - all FhirExpando objects start off w/ this class.
Declaration
public static FhirExpandoClass Empty
Field Value
Type | Description |
---|---|
Fhir |
Properties
| Improve this Doc View SourceKeys
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. |
Methods
| Improve this Doc View SourceFindNewClass(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. |
newKey | The new key. |
Returns
Type | Description |
---|---|
Fhir |
The found new class. |
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. |
name | |
System. |
caseInsensitive | |
Fhir |
obj |
Returns
Type | Description |
---|---|
System. |
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. |
name |
Returns
Type | Description |
---|---|
System. |