QueryableExtensions::SumAsync Method
Asynchronously computes the sum of a sequence of Decimal values.
Assembly: EntityFramework (in EntityFramework.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | SumAsync(IQueryable<Decimal>^) | Asynchronously computes the sum of a sequence of Decimal values. |
![]() ![]() | SumAsync(IQueryable<Decimal>^, CancellationToken) | Asynchronously computes the sum of a sequence of Decimal values. |
![]() ![]() | SumAsync(IQueryable<Double>^) | Asynchronously computes the sum of a sequence of Double values. |
![]() ![]() | SumAsync(IQueryable<Double>^, CancellationToken) | Asynchronously computes the sum of a sequence of Double values. |
![]() ![]() | SumAsync(IQueryable<Int32>^) | Asynchronously computes the sum of a sequence of Int32 values. |
![]() ![]() | SumAsync(IQueryable<Int32>^, CancellationToken) | Asynchronously computes the sum of a sequence of Int32 values. |
![]() ![]() | SumAsync(IQueryable<Int64>^) | Asynchronously computes the sum of a sequence of Int64 values. |
![]() ![]() | SumAsync(IQueryable<Int64>^, CancellationToken) | Asynchronously computes the sum of a sequence of Int64 values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Decimal>>^) | Asynchronously computes the sum of a sequence of nullable Decimal values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Decimal>>^, CancellationToken) | Asynchronously computes the sum of a sequence of nullable Decimal values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Double>>^) | Asynchronously computes the sum of a sequence of nullable Double values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Double>>^, CancellationToken) | Asynchronously computes the sum of a sequence of nullable Double values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Int32>>^) | Asynchronously computes the sum of a sequence of nullable Int32 values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Int32>>^, CancellationToken) | Asynchronously computes the sum of a sequence of nullable Int32 values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Int64>>^) | Asynchronously computes the sum of a sequence of nullable Int64 values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Int64>>^, CancellationToken) | Asynchronously computes the sum of a sequence of nullable Int64 values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Single>>^) | Asynchronously computes the sum of a sequence of nullable Single values. |
![]() ![]() | SumAsync(IQueryable<Nullable<Single>>^, CancellationToken) | Asynchronously computes the sum of a sequence of nullable Single values. |
![]() ![]() | SumAsync(IQueryable<Single>^) | Asynchronously computes the sum of a sequence of Single values. |
![]() ![]() | SumAsync(IQueryable<Single>^, CancellationToken) | Asynchronously computes the sum of a sequence of Single values. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Decimal>^>^) | Asynchronously computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Decimal>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Double>^>^) | Asynchronously computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Double>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Int32>^>^) | Asynchronously computes the sum of the sequence of Int32 values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Int32>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of Int32 values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Int64>^>^) | Asynchronously computes the sum of the sequence of Int64 values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Int64>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of Int64 values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Decimal>>^>^) | Asynchronously computes the sum of the sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Decimal>>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Double>>^>^) | Asynchronously computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Double>>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Int32>>^>^) | Asynchronously computes the sum of the sequence of nullable Int32 values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Int32>>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of nullable Int32 values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Int64>>^>^) | Asynchronously computes the sum of the sequence of nullable Int64 values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Int64>>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of nullable Int64 values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Single>>^>^) | Asynchronously computes the sum of the sequence of nullable Single values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Nullable<Single>>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of nullable Single values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Single>^>^) | Asynchronously computes the sum of the sequence of Single values that is obtained by invoking a projection function on each element of the input sequence. |
![]() ![]() | SumAsync<TSource>(IQueryable<TSource>^, Expression<Func<TSource, Single>^>^, CancellationToken) | Asynchronously computes the sum of the sequence of Single values that is obtained by invoking a projection function on each element of the input sequence. |
QueryableExtensions::SumAsync Method (IQueryable<Decimal>^)
Asynchronously computes the sum of a sequence of Decimal values.
public: [ExtensionAttribute] static Task<Decimal>^ SumAsync( IQueryable<Decimal>^ source )
Parameters
- source
-
Type:
System.Linq::IQueryable<Decimal>^
A sequence of Decimal values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Decimal>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Decimal>^, CancellationToken)
Asynchronously computes the sum of a sequence of Decimal values.
public: [ExtensionAttribute] static Task<Decimal>^ SumAsync( IQueryable<Decimal>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Decimal>^
A sequence of Decimal values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Decimal>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Double>^)
Asynchronously computes the sum of a sequence of Double values.
Parameters
- source
-
Type:
System.Linq::IQueryable<Double>^
A sequence of Double values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Double>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Double>^, CancellationToken)
Asynchronously computes the sum of a sequence of Double values.
public: [ExtensionAttribute] static Task<double>^ SumAsync( IQueryable<double>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Double>^
A sequence of Double values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Double>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Int32>^)
Asynchronously computes the sum of a sequence of Int32 values.
Parameters
- source
-
Type:
System.Linq::IQueryable<Int32>^
A sequence of Int32 values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Int32>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Int32>^, CancellationToken)
Asynchronously computes the sum of a sequence of Int32 values.
public: [ExtensionAttribute] static Task<int>^ SumAsync( IQueryable<int>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Int32>^
A sequence of Int32 values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Int32>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Int64>^)
Asynchronously computes the sum of a sequence of Int64 values.
public: [ExtensionAttribute] static Task<long long>^ SumAsync( IQueryable<long long>^ source )
Parameters
- source
-
Type:
System.Linq::IQueryable<Int64>^
A sequence of Int64 values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Int64>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Int64>^, CancellationToken)
Asynchronously computes the sum of a sequence of Int64 values.
public: [ExtensionAttribute] static Task<long long>^ SumAsync( IQueryable<long long>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Int64>^
A sequence of Int64 values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Int64>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Decimal>>^)
Asynchronously computes the sum of a sequence of nullable Decimal values.
public: [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<Nullable<Decimal>>^ SumAsync( IQueryable<Nullable<Decimal>>^ source )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Decimal>>^
A sequence of nullable Decimal values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Decimal>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Decimal>>^, CancellationToken)
Asynchronously computes the sum of a sequence of nullable Decimal values.
public: [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<Nullable<Decimal>>^ SumAsync( IQueryable<Nullable<Decimal>>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Decimal>>^
A sequence of nullable Decimal values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Decimal>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Double>>^)
Asynchronously computes the sum of a sequence of nullable Double values.
public: [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<double>>^ SumAsync( IQueryable<Nullable<double>>^ source )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Double>>^
A sequence of nullable Double values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Double>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Double>>^, CancellationToken)
Asynchronously computes the sum of a sequence of nullable Double values.
public: [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<Nullable<double>>^ SumAsync( IQueryable<Nullable<double>>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Double>>^
A sequence of nullable Double values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Double>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Int32>>^)
Asynchronously computes the sum of a sequence of nullable Int32 values.
public: [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<int>>^ SumAsync( IQueryable<Nullable<int>>^ source )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Int32>>^
A sequence of nullable Int32 values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Int32>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Int32>>^, CancellationToken)
Asynchronously computes the sum of a sequence of nullable Int32 values.
public: [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<int>>^ SumAsync( IQueryable<Nullable<int>>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Int32>>^
A sequence of nullable Int32 values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Int32>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Int64>>^)
Asynchronously computes the sum of a sequence of nullable Int64 values.
public: [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<long long>>^ SumAsync( IQueryable<Nullable<long long>>^ source )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Int64>>^
A sequence of nullable Int64 values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Int64>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Int64>>^, CancellationToken)
Asynchronously computes the sum of a sequence of nullable Int64 values.
public: [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<long long>>^ SumAsync( IQueryable<Nullable<long long>>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Int64>>^
A sequence of nullable Int64 values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Int64>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Single>>^)
Asynchronously computes the sum of a sequence of nullable Single values.
public: [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<float>>^ SumAsync( IQueryable<Nullable<float>>^ source )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Single>>^
A sequence of nullable Single values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Single>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Nullable<Single>>^, CancellationToken)
Asynchronously computes the sum of a sequence of nullable Single values.
public: [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<float>>^ SumAsync( IQueryable<Nullable<float>>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Nullable<Single>>^
A sequence of nullable Single values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Single>>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Single>^)
Asynchronously computes the sum of a sequence of Single values.
Parameters
- source
-
Type:
System.Linq::IQueryable<Single>^
A sequence of Single values to calculate the sum of.
Return Value
Type: System.Threading.Tasks::Task<Single>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync Method (IQueryable<Single>^, CancellationToken)
Asynchronously computes the sum of a sequence of Single values.
public: [ExtensionAttribute] static Task<float>^ SumAsync( IQueryable<float>^ source, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<Single>^
A sequence of Single values to calculate the sum of.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Single>^A task that represents the asynchronous operation. The task result contains the sum of the values in the sequence.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Decimal>^>^)
Asynchronously computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<Decimal>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Decimal>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Decimal>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Decimal>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Decimal>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [ExtensionAttribute] static Task<Decimal>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Decimal>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Decimal>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Decimal>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Double>^>^)
Asynchronously computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<double>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, double>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Double>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Double>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Double>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<double>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, double>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Double>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Double>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Int32>^>^)
Asynchronously computes the sum of the sequence of Int32 values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<int>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, int>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Int32>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Int32>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Int32>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of Int32 values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<int>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, int>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Int32>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Int32>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Int64>^>^)
Asynchronously computes the sum of the sequence of Int64 values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<long long>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, long long>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Int64>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Int64>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Int64>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of Int64 values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] static Task<long long>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, long long>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Int64>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Int64>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Decimal>>^>^)
Asynchronously computes the sum of the sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<Decimal>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<Decimal>>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Decimal>>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Decimal>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Decimal>>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<Decimal>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<Decimal>>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Decimal>>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Decimal>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Double>>^>^)
Asynchronously computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<Nullable<double>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<double>>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Double>>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Double>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Double>>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<Nullable<double>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<double>>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Double>>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Double>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Int32>>^>^)
Asynchronously computes the sum of the sequence of nullable Int32 values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<int>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<int>>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Int32>>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Int32>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Int32>>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of nullable Int32 values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<int>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<int>>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Int32>>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Int32>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Int64>>^>^)
Asynchronously computes the sum of the sequence of nullable Int64 values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<Nullable<long long>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<long long>>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Int64>>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Int64>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Int64>>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of nullable Int64 values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [ExtensionAttribute] static Task<Nullable<long long>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<long long>>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Int64>>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Int64>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
| OverflowException | The number of elements in source is larger than MaxValue . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Single>>^>^)
Asynchronously computes the sum of the sequence of nullable Single values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<Nullable<float>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<float>>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Single>>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Single>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Nullable<Single>>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of nullable Single values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] static Task<Nullable<float>>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, Nullable<float>>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Nullable<Single>>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Nullable<Single>>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Single>^>^)
Asynchronously computes the sum of the sequence of Single values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] static Task<float>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, float>^>^ selector )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Single>^>^
A projection function to apply to each element.
Return Value
Type: System.Threading.Tasks::Task<Single>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
QueryableExtensions::SumAsync<TSource> Method (IQueryable<TSource>^, Expression<Func<TSource, Single>^>^, CancellationToken)
Asynchronously computes the sum of the sequence of Single values that is obtained by invoking a projection function on each element of the input sequence.
public: generic<typename TSource> [SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [ExtensionAttribute] [SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] static Task<float>^ SumAsync( IQueryable<TSource>^ source, Expression<Func<TSource, float>^>^ selector, CancellationToken cancellationToken )
Parameters
- source
-
Type:
System.Linq::IQueryable<TSource>^
A sequence of values of type TSource .
- selector
-
Type:
System.Linq.Expressions::Expression<Func<TSource, Single>^>^
A projection function to apply to each element.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks::Task<Single>^A task that represents the asynchronous operation. The task result contains the sum of the projected values.
Type Parameters
- TSource
The type of the elements of source .
| Exception | Condition |
|---|---|
| ArgumentNullException | source or selector is null . |
| InvalidOperationException | source does not implement IDbAsyncQueryProvider . |
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.

