Show / Hide Table of Contents

Class LinqExtensions

A linq extensions.

Inheritance
System.Object
LinqExtensions
Namespace: Microsoft.Health.Fhir.CodeGenCommon.Extensions
Assembly: Microsoft.Health.Fhir.CodeGenCommon.dll
Syntax
public static class LinqExtensions : object

Methods

| Improve this Doc View Source

CopyTo(HashSet<String>, HashSet<String>)

A HashSet<string> extension method that copies to.

Declaration
public static void CopyTo(this HashSet<string> source, HashSet<string> dest)
Parameters
Type Name Description
HashSet<System.String> source

The source dictionary to copy.

HashSet<System.String> dest

Destination for the.

| Improve this Doc View Source

DeepCopy<KT, VT>(Dictionary<KT, VT>)

A Dictionary<KT,VT> extension method that deep copies the dictionary.

Declaration
public static Dictionary<KT, VT> DeepCopy<KT, VT>(this Dictionary<KT, VT> source)
    where VT : ICloneable
Parameters
Type Name Description
Dictionary<KT, VT> source

The source dictionary to copy.

Returns
Type Description
Dictionary<KT, VT>

A Dictionary<KT,VT>

Type Parameters
Name Description
KT

Key Type.

VT

Value Type.

| Improve this Doc View Source

DeepCopy<KT, VT>(Dictionary<KT, List<VT>>)

A Dictionary<KT,VT> extension method that deep copies the dictionary.

Declaration
public static Dictionary<KT, List<VT>> DeepCopy<KT, VT>(this Dictionary<KT, List<VT>> source)
    where VT : ICloneable
Parameters
Type Name Description
Dictionary<KT, List<VT>> source

The source dictionary to copy.

Returns
Type Description
Dictionary<KT, List<VT>>

A Dictionary<KT,VT>

Type Parameters
Name Description
KT

Key Type.

VT

Value Type.

| Improve this Doc View Source

ForEach<T>(IEnumerable<T>, Action<T>)

An IEnumerable<T> extension method that applies an operation to all items in this collection.

Declaration
public static void ForEach<T>(this IEnumerable<T> ie, Action<T> action)
Parameters
Type Name Description
IEnumerable<T> ie

The IE to act on.

Action<T> action

The action.

Type Parameters
Name Description
T

Generic type parameter.

| Improve this Doc View Source

ForEach<T>(IEnumerable<T>, Func<T, Int32, Boolean>)

An IEnumerable<T> extension method that applies an operation to all items in this collection.

Declaration
public static bool ForEach<T>(this IEnumerable<T> ie, Func<T, int, bool> action)
Parameters
Type Name Description
IEnumerable<T> ie

The IE to act on.

Func<T, System.Int32, System.Boolean> action

The action.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

Type Parameters
Name Description
T

Generic type parameter.

| Improve this Doc View Source

ShallowCopy<KT, VT>(Dictionary<KT, VT>)

A Dictionary<KT,VT> extension method that shallow copies the given source.

Declaration
public static Dictionary<KT, VT> ShallowCopy<KT, VT>(this Dictionary<KT, VT> source)
Parameters
Type Name Description
Dictionary<KT, VT> source

The source dictionary to copy.

Returns
Type Description
Dictionary<KT, VT>

A Dictionary<KT,VT>

Type Parameters
Name Description
KT

Key Type.

VT

Value Type.

| Improve this Doc View Source

ShallowCopy<KT, VT>(Dictionary<KT, List<VT>>)

A Dictionary<KT,VT> extension method that shallow copies the given source.

Declaration
public static Dictionary<KT, List<VT>> ShallowCopy<KT, VT>(this Dictionary<KT, List<VT>> source)
Parameters
Type Name Description
Dictionary<KT, List<VT>> source

The source dictionary to copy.

Returns
Type Description
Dictionary<KT, List<VT>>

A Dictionary<KT,VT>

Type Parameters
Name Description
KT

Type of the kt.

VT

Type of the vt.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX