Show / Hide Table of Contents

Class FhirExpando

Represents an object with members that can be dynamically added and removed at runtime. This implementation has modifications to support FHIR. Based off the DotNet ExpandoObject: https://github.com/Microsoft/referencesource/blob/master/System.Core/Microsoft/Scripting/Actions/ExpandoObject.cs

Inheritance
System.Object
FhirExpando
Implements
IDictionary<System.String, System.Object>
INotifyPropertyChanged
Namespace: Microsoft.Health.Fhir.SpecManager.Models
Assembly: Microsoft.Health.Fhir.SpecManager.dll
Syntax
public class FhirExpando : IDynamicMetaObjectProvider

Constructors

| Improve this Doc View Source

FhirExpando()

Initializes a new instance of the FhirExpando class with no members.

Declaration
public FhirExpando()

Properties

| Improve this Doc View Source

Count

Gets the number of elements contained in the System.Collections.Generic.ICollection`1 .

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

IsReadOnly

Gets a value indicating whether the System.Collections.Generic.ICollection`1 is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Item[String]

Gets or sets the element with the specified key.

Declaration
public object this[string key] { get; set; }
Parameters
Type Name Description
System.String key

The key of the element to get or set.

Property Value
Type Description
System.Object

The element with the specified key.

| Improve this Doc View Source

Item[String, String]

Gets or sets the element with the specified key.

Declaration
public object this[string key1, string key2] { get; set; }
Parameters
Type Name Description
System.String key1

The key of the element to get or set.

System.String key2

The second key.

Property Value
Type Description
System.Object

The element with the specified key.

| Improve this Doc View Source

Keys

Gets an System.Collections.Generic.ICollection`1 containing the keys of the System.Collections.Generic.IDictionary`2 .

Declaration
public ICollection<string> Keys { get; }
Property Value
Type Description
ICollection<System.String>
| Improve this Doc View Source

Values

Gets an System.Collections.Generic.ICollection`1 containing the values in the System.Collections.Generic.IDictionary`2.

Declaration
public ICollection<object> Values { get; }
Property Value
Type Description
ICollection<System.Object>

Methods

| Improve this Doc View Source

Add(KeyValuePair<String, Object>)

Adds an item to the System.Collections.Generic.ICollection`1.

Declaration
public void Add(KeyValuePair<string, object> item)
Parameters
Type Name Description
KeyValuePair<System.String, System.Object> item

The object to add to the System.Collections.Generic.ICollection`1 .

| Improve this Doc View Source

Add(String, Object)

Adds an element with the provided key and value to the System.Collections.Generic.IDictionary`2 .

Declaration
public void Add(string key, object value)
Parameters
Type Name Description
System.String key

The object to use as the key of the element to add.

System.Object value

The object to use as the value of the element to add.

| Improve this Doc View Source

Clear()

Removes all items from the System.Collections.Generic.ICollection`1.

Declaration
public void Clear()
| Improve this Doc View Source

Contains(KeyValuePair<String, Object>)

Determines whether the System.Collections.Generic.ICollection`1 contains a specific value.

Declaration
public bool Contains(KeyValuePair<string, object> item)
Parameters
Type Name Description
KeyValuePair<System.String, System.Object> item

The object to locate in the System.Collections.Generic.ICollection`1 .

Returns
Type Description
System.Boolean

true if item is found in the System.Collections.Generic.ICollection`1 ; otherwise, false.

| Improve this Doc View Source

ContainsKey(String)

Determines whether the System.Collections.Generic.IDictionary`2 contains an element with the specified key.

Declaration
public bool ContainsKey(string key)
Parameters
Type Name Description
System.String key

The key to locate in the System.Collections.Generic.IDictionary`2 .

Returns
Type Description
System.Boolean

true if the System.Collections.Generic.IDictionary`2 contains an element with the key; otherwise, false.

| Improve this Doc View Source

CopyTo(KeyValuePair<String, Object>[], Int32)

Copies the elements of the System.Collections.Generic.ICollection`1 to an System.Array , starting at a particular System.Array index.

Declaration
public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
Parameters
Type Name Description
KeyValuePair<System.String, System.Object>[] array

The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection`1 . The System.Array must have zero-based indexing.

System.Int32 arrayIndex

The zero-based index in array at which copying begins.

| Improve this Doc View Source

GetAllExtensions(String[])

Gets the extensions in this collection.

Declaration
public IEnumerable<FhirExpando> GetAllExtensions(params string[] relativePath)
Parameters
Type Name Description
System.String[] relativePath

A variable-length parameters list containing the relative path to the extension node, from this node.

Returns
Type Description
IEnumerable<FhirExpando>

An enumerator that allows foreach to be used to process the extensions in this collection.

| Improve this Doc View Source

GetBool(String[])

Gets a bool.

Declaration
public bool? GetBool(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.Nullable<System.Boolean>

The bool.

| Improve this Doc View Source

GetByteArray(String[])

Gets byte array.

Declaration
public byte[] GetByteArray(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.Byte[]

An array of byte.

| Improve this Doc View Source

GetDecimal(String[])

Gets a decimal.

Declaration
public decimal? GetDecimal(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.Nullable<System.Decimal>

The decimal.

| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<System.String, System.Object>>

An enumerator that can be used to iterate through the collection.

| Improve this Doc View Source

GetExpando(String[])

Gets an expando.

Declaration
public FhirExpando GetExpando(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
FhirExpando

The expando.

| Improve this Doc View Source

GetExpandoEnumerable(String[])

Gets the expando enumerables in this collection.

Declaration
public IEnumerable<FhirExpando> GetExpandoEnumerable(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
IEnumerable<FhirExpando>

An enumerator that allows foreach to be used to process the expando enumerables in this collection.

| Improve this Doc View Source

GetExtension(String, String[])

Gets the first extension.

Declaration
public FhirExpando GetExtension(string url, params string[] relativePath)
Parameters
Type Name Description
System.String url

URL of the resource.

System.String[] relativePath

A variable-length parameters list containing the relative path to the extension node, from this node.

Returns
Type Description
FhirExpando

The first extension.

| Improve this Doc View Source

GetExtensions(String, String[])

Gets the extensions in this collection.

Declaration
public IEnumerable<FhirExpando> GetExtensions(string url, params string[] relativePath)
Parameters
Type Name Description
System.String url

URL of the resource.

System.String[] relativePath

A variable-length parameters list containing the relative path to the extension node, from this node.

Returns
Type Description
IEnumerable<FhirExpando>

An enumerator that allows foreach to be used to process the extensions in this collection.

| Improve this Doc View Source

GetExtensionsValueString(String, String[])

Declaration
public string[] GetExtensionsValueString(string url, params string[] path)
Parameters
Type Name Description
System.String url
System.String[] path
Returns
Type Description
System.String[]
| Improve this Doc View Source

GetExtensionValueCode(String, String[])

Gets extension valueCode.

Declaration
public string GetExtensionValueCode(string url, params string[] relativePath)
Parameters
Type Name Description
System.String url

URL of the resource.

System.String[] relativePath

A variable-length parameters list containing the relative path to the extension node, from this node.

Returns
Type Description
System.String

The extension value.

| Improve this Doc View Source

GetExtensionValueCodeArray(String, String[])

Gets extension value code array.

Declaration
public string[] GetExtensionValueCodeArray(string url, params string[] path)
Parameters
Type Name Description
System.String url

URL of the resource.

System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.String[]

An array of string.

| Improve this Doc View Source

GetExtensionValueCodeList(String, String[])

Gets extension value code list.

Declaration
public List<string> GetExtensionValueCodeList(string url, params string[] path)
Parameters
Type Name Description
System.String url

URL of the resource.

System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
List<System.String>

The extension value code list.

| Improve this Doc View Source

GetExtensionValueInteger(String, String[])

Gets extension value integer.

Declaration
public int? GetExtensionValueInteger(string url, params string[] relativePath)
Parameters
Type Name Description
System.String url

URL of the resource.

System.String[] relativePath

A variable-length parameters list containing the relative path to the extension node, from this node.

Returns
Type Description
System.Nullable<System.Int32>

The extension value integer.

| Improve this Doc View Source

GetExtensionValueString(String, String[])

Gets extension value string.

Declaration
public string GetExtensionValueString(string url, params string[] relativePath)
Parameters
Type Name Description
System.String url

URL of the resource.

System.String[] relativePath

A variable-length parameters list containing the relative path to the extension node, from this node.

Returns
Type Description
System.String

The extension value string.

| Improve this Doc View Source

GetExtensionValueStringArray(String, String[])

Gets extension value string array.

Declaration
public string[] GetExtensionValueStringArray(string url, params string[] path)
Parameters
Type Name Description
System.String url

URL of the resource.

System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.String[]

An array of string.

| Improve this Doc View Source

GetInt(String[])

Gets an int.

Declaration
public int? GetInt(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.Nullable<System.Int32>

The int.

| Improve this Doc View Source

GetLong(String[])

Gets a long.

Declaration
public long? GetLong(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.Nullable<System.Int64>

The long.

| Improve this Doc View Source

GetObject(String[])

Gets a string.

Declaration
public object GetObject(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.Object

The string.

| Improve this Doc View Source

GetString(String[])

Gets a string.

Declaration
public string GetString(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.String

The string.

| Improve this Doc View Source

GetStringArray(String[])

Gets string array.

Declaration
public string[] GetStringArray(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
System.String[]

An array of byte.

| Improve this Doc View Source

GetStringList(String[])

Gets string list.

Declaration
public List<string> GetStringList(params string[] path)
Parameters
Type Name Description
System.String[] path

A variable-length parameters list containing path.

Returns
Type Description
List<System.String>

The string list.

| Improve this Doc View Source

Remove(KeyValuePair<String, Object>)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection`1 .

Declaration
public bool Remove(KeyValuePair<string, object> item)
Parameters
Type Name Description
KeyValuePair<System.String, System.Object> item

The object to remove from the System.Collections.Generic.ICollection`1 .

Returns
Type Description
System.Boolean

true if item was successfully removed from the System.Collections.Generic.ICollection`1 ; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection`1.

| Improve this Doc View Source

Remove(String)

Removes the element with the specified key from the System.Collections.Generic.IDictionary`2 .

Declaration
public bool Remove(string key)
Parameters
Type Name Description
System.String key

The key of the element to remove.

Returns
Type Description
System.Boolean

true if the element is successfully removed; otherwise, false . This method also returns false if key was not found in the original System.Collections.Generic.IDictionary`2.

| Improve this Doc View Source

TryGetValue(String, out Object)

Gets the value associated with the specified key.

Declaration
public bool TryGetValue(string key, out object value)
Parameters
Type Name Description
System.String key

The key whose value to get.

System.Object value

[out] When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns
Type Description
System.Boolean

true if the object that implements System.Collections.Generic.IDictionary`2 contains an element with the specified key; otherwise, false.

Implements

IDictionary<, >
INotifyPropertyChanged
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX