This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "unit tests and coverage" && ls && pwd && dotnet test --filter UnitTest --results-directory /testresults --logger "trx;LogFileName=test_results.xml" /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=/testresults/coverage/ /p:Exclude="[xunit.*]*%2c[StackExchange.*]*" | |
dotnet tool install dotnet-reportgenerator-globaltool --version 4.8.5 --tool-path /tools | |
/tools/reportgenerator "-reports:/testresults/coverage/coverage.cobertura.xml" "-targetdir:/testresults/coverage/reports" "-reporttypes:HTMLInline;HTMLChart" | |
ls -la /testresults/coverage/reports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface CosmosTransactionalRepository<TKey, TValue> where TKey : IComparable<TKey>, IEquatable<TKey> | |
{ | |
event EventHandler<NotifyDictionaryChangedEventArgs<TKey, TValue>> DictionaryChanged; | |
Task AddAsync(ITransaction tx, TKey key, TValue value); | |
Task<TValue> AddOrUpdateManyAsync(ITransaction tx, KeyValuePair<TKey, TValue>> records, Func<TKey, TValue, TValue> updateValueFactory, TimeSpan timeout = default, CancellationToken cancellationToken = default); | |
Task<TValue> AddOrUpdateAsync(ITransaction tx, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory, TimeSpan timeout = default, CancellationToken cancellationToken = default); | |
Task<TValue> GetOrAddAsync(ITransaction tx, TKey key, TValue value, TimeSpan timeout, CancellationToken cancellationToken); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FieldSelector<TValue>: Expression<Func<TValue, object>> {} | |
public interface IIndexedDictionary<TKey, TValue> : IEnumerable<TValue> | |
where TKey : IEquatable<TKey> | |
{ | |
// I dont see the value vs 2 steps , maybe accross multiple indexes... | |
// purposes is to apply a brute force predicate on an index eg ( x => return (x == myName); ) | |
IEnumerable<KeyValuePair<TKey,TIndexType>> GetSlice<TIndexType>(FieldSelector<TValue> field, TIndexType minValue = default(TIndexType), TIndexType maxValue = default(TIndexType) ); | |
// the following which returns the objects has not been included so consumers can interact with the store explicitly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using Cosmos.Common.Contracts; | |
using System; | |
// fixme | |
namespace Cosmos.Services | |
{ |