Skip to content

Latest commit

 

History

History
806 lines (622 loc) · 49.7 KB

File metadata and controls

806 lines (622 loc) · 49.7 KB

Code Metrics

This file is dynamically maintained by a bot, please do not edit this by hand. It represents various code metrics, such as cyclomatic complexity, maintainability index, and so on.

MyJetWallet.Sdk.ServiceBus ⚠️

The MyJetWallet.Sdk.ServiceBus.csproj project file contains:

  • 2 namespaces.
  • 14 named types.
  • 794 total lines of source code.
  • Approximately 230 lines of executable code.
  • The highest cyclomatic complexity is 8 ⚠️.
MyJetWallet.Sdk.ServiceBus.Models ✔️

The MyJetWallet.Sdk.ServiceBus.Models namespace contains 1 named types.

  • 1 named types.
  • 17 total lines of source code.
  • Approximately 3 lines of executable code.
  • The highest cyclomatic complexity is 1 ✔️.
DeduplicationNoSqlEntity ✔️
  • The DeduplicationNoSqlEntity contains 3 members.
  • 15 total lines of source code.
  • Approximately 3 lines of executable code.
  • The highest cyclomatic complexity is 1 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Method 13 90 1 ✔️ 0 2 7 / 1
Method 8 100 1 ✔️ 0 0 1 / 1
Method 10 100 1 ✔️ 0 0 1 / 1

🔗 to DeduplicationNoSqlEntity class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus.Models

MyJetWallet.Sdk.ServiceBus ⚠️

The MyJetWallet.Sdk.ServiceBus namespace contains 13 named types.

  • 13 named types.
  • 777 total lines of source code.
  • Approximately 227 lines of executable code.
  • The highest cyclomatic complexity is 8 ⚠️.
ContractToDomainMapper ✔️
  • The ContractToDomainMapper contains 1 members.
  • 31 total lines of source code.
  • Approximately 13 lines of executable code.
  • The highest cyclomatic complexity is 3 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Method 9 60 3 ✔️ 0 7 28 / 13

🔗 to ContractToDomainMapper class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

DomainToContractMapper ✔️
  • The DomainToContractMapper contains 1 members.
  • 25 total lines of source code.
  • Approximately 8 lines of executable code.
  • The highest cyclomatic complexity is 2 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Method 9 67 2 ✔️ 0 5 22 / 8

🔗 to DomainToContractMapper class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

ExecutorWithRetry<T> ✔️
  • The ExecutorWithRetry<T> contains 10 members.
  • 54 total lines of source code.
  • Approximately 19 lines of executable code.
  • The highest cyclomatic complexity is 4 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Field 12 100 0 ✔️ 0 2 1 / 0
Field 17 100 0 ✔️ 0 0 1 / 0
Field 14 100 0 ✔️ 0 1 1 / 0
Field 13 100 0 ✔️ 0 1 1 / 0
Field 15 100 0 ✔️ 0 1 1 / 0
Field 16 100 0 ✔️ 0 0 1 / 0
Method 19 69 1 ✔️ 0 3 14 / 6
Property 10 100 2 ✔️ 0 0 1 / 0
Method 34 58 4 ✔️ 0 5 27 / 13
Property 11 100 2 ✔️ 0 0 1 / 0

🔗 to ExecutorWithRetry&lt;T&gt; class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

IDeduplicator<T> ✔️
  • The IDeduplicator<T> contains 2 members.
  • 5 total lines of source code.
  • Approximately 0 lines of executable code.
  • The highest cyclomatic complexity is 1 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Method 8 100 1 ✔️ 0 1 1 / 0
Method 7 100 1 ✔️ 0 1 1 / 0

🔗 to IDeduplicator&lt;T&gt; class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

IServiceBusManager ✔️
  • The IServiceBusManager contains 5 members.
  • 11 total lines of source code.
  • Approximately 0 lines of executable code.
  • The highest cyclomatic complexity is 1 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Property 14 100 1 ✔️ 0 0 1 / 0
Property 12 100 1 ✔️ 0 0 1 / 0
Property 10 100 1 ✔️ 0 0 1 / 0
Method 7 100 1 ✔️ 0 0 1 / 0
Method 8 100 1 ✔️ 0 0 1 / 0

🔗 to IServiceBusManager class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

IServiceBusPublisher<T> ✔️
  • The IServiceBusPublisher<T> contains 2 members.
  • 6 total lines of source code.
  • Approximately 0 lines of executable code.
  • The highest cyclomatic complexity is 1 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Method 8 100 1 ✔️ 0 1 1 / 0
Method 10 100 1 ✔️ 0 2 1 / 0

🔗 to IServiceBusPublisher&lt;T&gt; class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

MyServiceBusDeduplicator<T> ✔️
  • The MyServiceBusDeduplicator<T> contains 11 members.
  • 59 total lines of source code.
  • Approximately 20 lines of executable code.
  • The highest cyclomatic complexity is 3 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Field 18 100 0 ✔️ 0 1 1 / 0
Field 19 93 0 ✔️ 0 2 1 / 1
Field 20 100 0 ✔️ 0 1 1 / 0
Field 17 100 0 ✔️ 0 0 1 / 0
Field 15 100 0 ✔️ 0 1 1 / 0
Field 16 100 0 ✔️ 0 2 1 / 0
Method 22 69 1 ✔️ 0 9 9 / 6
Method 40 74 2 ✔️ 0 8 9 / 4
Method 59 75 3 ✔️ 0 7 11 / 4
Method 32 84 2 ✔️ 0 6 7 / 2
Method 50 80 3 ✔️ 0 7 8 / 3

🔗 to MyServiceBusDeduplicator&lt;T&gt; class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

MyServiceBusPublisher<T> ✔️
  • The MyServiceBusPublisher<T> contains 7 members.
  • 30 total lines of source code.
  • Approximately 9 lines of executable code.
  • The highest cyclomatic complexity is 1 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Field 10 100 0 ✔️ 0 1 1 / 0
Field 12 100 0 ✔️ 0 0 1 / 0
Field 11 100 0 ✔️ 0 0 1 / 0
Method 14 76 1 ✔️ 0 2 7 / 4
Method 27 91 1 ✔️ 0 3 4 / 1
Method 32 79 1 ✔️ 0 4 5 / 3
Method 22 91 1 ✔️ 0 3 4 / 1

🔗 to MyServiceBusPublisher&lt;T&gt; class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

MyServiceBusSubscriber<T> ✔️
  • The MyServiceBusSubscriber<T> contains 17 members.
  • 179 total lines of source code.
  • Approximately 55 lines of executable code.
  • The highest cyclomatic complexity is 7 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Field 14 100 0 ✔️ 0 0 1 / 0
Field 13 100 0 ✔️ 0 0 1 / 0
Field 19 100 0 ✔️ 0 1 1 / 0
Field 15 100 0 ✔️ 0 2 1 / 0
Field 17 93 0 ✔️ 0 3 1 / 1
Field 18 93 0 ✔️ 0 4 1 / 1
Field 16 93 0 ✔️ 0 0 1 / 1
Method 21 68 3 ✔️ 0 3 24 / 7
Method 46 89 1 ✔️ 0 2 6 / 1
Method 53 82 1 ✔️ 0 3 7 / 2
Method 138 61 7 ✔️ 0 10 35 / 13
Method 113 62 4 ✔️ 0 6 24 / 11
Method 66 70 3 ✔️ 0 8 20 / 6
Method 87 65 5 ✔️ 0 11 25 / 8
Method 61 96 1 ✔️ 0 2 4 / 1
Method 174 85 2 ✔️ 0 6 7 / 2
Method 182 85 2 ✔️ 0 7 7 / 2

🔗 to MyServiceBusSubscriber&lt;T&gt; class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

MyServiceBusTcpClientFactory ⚠️
  • The MyServiceBusTcpClientFactory contains 14 members.
  • 194 total lines of source code.
  • Approximately 53 lines of executable code.
  • The highest cyclomatic complexity is 8 ⚠️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Field 196 93 0 ✔️ 0 1 1 / 1
Method 16 61 8 ⚠️ 0 4 13 / 11
Method 197 78 2 ✔️ 0 5 10 / 3
Method 180 75 1 ✔️ 0 7 14 / 4
Method 43 80 1 ✔️ 0 4 12 / 3
Method 120 74 1 ✔️ 0 7 16 / 4
Method 137 83 1 ✔️ 0 5 12 / 2
Method 150 83 1 ✔️ 0 5 12 / 2
Method 163 74 1 ✔️ 0 7 16 / 4
Method 56 78 1 ✔️ 0 5 14 / 3
Method 71 74 1 ✔️ 0 7 16 / 4
Method 88 83 1 ✔️ 0 6 13 / 2
Method 102 75 1 ✔️ 0 8 17 / 4
Method 30 71 2 ✔️ 0 6 12 / 6

🔗 to MyServiceBusTcpClientFactory class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

ServiceBusContracts ✔️
  • The ServiceBusContracts contains 1 members.
  • 4 total lines of source code.
  • Approximately 0 lines of executable code.
  • The highest cyclomatic complexity is 2 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Property 5 100 2 ✔️ 0 0 1 / 0

🔗 to ServiceBusContracts class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

ServiceBusLifeTime ✔️
  • The ServiceBusLifeTime contains 10 members.
  • 118 total lines of source code.
  • Approximately 43 lines of executable code.
  • The highest cyclomatic complexity is 7 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Field 12 100 0 ✔️ 0 0 1 / 0
Field 17 93 0 ✔️ 0 0 1 / 1
Field 13 100 0 ✔️ 0 1 1 / 0
Field 14 100 0 ✔️ 0 1 1 / 0
Field 15 93 0 ✔️ 0 0 1 / 1
Method 19 76 1 ✔️ 0 4 7 / 4
Method 109 67 4 ✔️ 0 5 17 / 7
Method 56 57 7 ✔️ 0 5 37 / 15
Method 94 78 2 ✔️ 0 4 14 / 4
Method 27 61 6 ✔️ 0 4 28 / 11

🔗 to ServiceBusLifeTime class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

ServiceBusManager ✔️
  • The ServiceBusManager contains 7 members.
  • 27 total lines of source code.
  • Approximately 7 lines of executable code.
  • The highest cyclomatic complexity is 6 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Field 21 100 0 ✔️ 0 1 1 / 0
Method 23 85 1 ✔️ 0 1 5 / 2
Property 19 100 1 ✔️ 0 0 1 / 0
Property 42 95 6 ✔️ 0 2 1 / 2
Property 40 100 2 ✔️ 0 0 1 / 0
Method 29 86 1 ✔️ 0 2 5 / 2
Method 35 100 1 ✔️ 0 2 4 / 1

🔗 to ServiceBusManager class diagram

🔝 back to MyJetWallet.Sdk.ServiceBus

🔝 back to MyJetWallet.Sdk.ServiceBus

TestApp ✔️

The TestApp.csproj project file contains:

  • 1 namespaces.
  • 2 named types.
  • 54 total lines of source code.
  • Approximately 41 lines of executable code.
  • The highest cyclomatic complexity is 3 ✔️.
<global namespace> ✔️

The <global namespace> namespace contains 2 named types.

  • 2 named types.
  • 54 total lines of source code.
  • Approximately 41 lines of executable code.
  • The highest cyclomatic complexity is 3 ✔️.
<Program>$ ✔️
  • The <Program>$ contains 1 members.
  • 48 total lines of source code.
  • Approximately 40 lines of executable code.
  • The highest cyclomatic complexity is 3 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Method 1 54 3 ✔️ 0 9 48 / 20

🔝 back to <global namespace>

TestMessage ✔️
  • The TestMessage contains 2 members.
  • 6 total lines of source code.
  • Approximately 1 lines of executable code.
  • The highest cyclomatic complexity is 0 ✔️.
Member kind Line number Maintainability index Cyclomatic complexity Depth of inheritance Class coupling Lines of source / executable code
Field 48 100 0 ✔️ 0 2 1 / 1
Field 47 93 0 ✔️ 0 0 1 / 1

🔗 to TestMessage class diagram

🔝 back to <global namespace>

🔝 back to TestApp

Metric definitions

  • Maintainability index: Measures ease of code maintenance. Higher values are better.
  • Cyclomatic complexity: Measures the number of branches. Lower values are better.
  • Depth of inheritance: Measures length of object inheritance hierarchy. Lower values are better.
  • Class coupling: Measures the number of classes that are referenced. Lower values are better.
  • Lines of source code: Exact number of lines of source code. Lower values are better.
  • Lines of executable code: Approximates the lines of executable code. Lower values are better.

Mermaid class diagrams

DeduplicationNoSqlEntity class diagram
classDiagram
class DeduplicationNoSqlEntity{
    +GeneratePartitionKey(string topicName)$ string
    +GenerateRowKey(string messageId)$ string
    +Create(string topicName, string handledMessageId, TimeSpan expiration)$ DeduplicationNoSqlEntity
}

Loading
ContractToDomainMapper class diagram
classDiagram
class ContractToDomainMapper{
    +ByteArrayToServiceBusContract<T>(ReadOnlyMemory<byte> data)$ T
}

Loading
DomainToContractMapper class diagram
classDiagram
class DomainToContractMapper{
    +ServiceBusContractToByteArray(object src)$ byte[]
}

Loading
ExecutorWithRetry<T> class diagram
classDiagram
class ExecutorWithRetry<T>{
    -Func<T, ValueTask> _callback
    -ILogger _logger
    -Func<T, string> _errorMessageGetter
    -Func<T, string> _packageIdGetter
    -int _retryCount
    -int _delayInMs
    +int Counter
    +string LastId
    +torWithRetry(Func<T, ValueTask> callback, ILogger logger, Func<T, string> errorMessageGetter, Func<T, string> packageIdGetter, int retryCount, int delayInMs) void
    +Execute(T package) ValueTask
}

Loading
IDeduplicator<T> class diagram
classDiagram
class IDeduplicator<T>{
    +IsDuplicate(T item)* Task<bool>
    +AddToRegistry(T item)* Task
}

Loading
IServiceBusManager class diagram
classDiagram
class IServiceBusManager{
    +bool IsStarted*
    +bool IsConnected*
    +string HostPort*
    +Start()* void
    +Stop()* void
}

Loading
IServiceBusPublisher<T> class diagram
classDiagram
class IServiceBusPublisher<T>{
    +PublishAsync(T message)* Task
    +PublishAsync(IEnumerable<T> messageList)* Task
}

Loading
MyServiceBusDeduplicator<T> class diagram
classDiagram
IDeduplicator~T~ <|-- MyServiceBusDeduplicator<T> : implements
class MyServiceBusDeduplicator<T>{
    -Func<T, string> _toStringFunc
    -IMyNoSqlServerDataWriter<DeduplicationNoSqlEntity> _writer
    -string _topicName
    -TimeSpan _expirationTime
    -Dictionary<string, DateTime> _registry
    -MyTaskTimer _timer
    +viceBusDeduplicator(Func<T, string> toStringFunc, Func<string> getUrl, string tableName, string topicName, TimeSpan expirationTime, ILogger logger) void
    +IsDuplicate(T item) Task<bool>
    +AddToRegistry(T item) Task
    +RefreshRegistry() Task
    +CleanRegistry() Task
}

Loading
MyServiceBusPublisher<T> class diagram
classDiagram
IServiceBusPublisher~T~ <|-- MyServiceBusPublisher<T> : implements
class MyServiceBusPublisher<T>{
    -MyServiceBusTcpClient _client
    -string _topicName
    -bool _immediatelyPersist
    +viceBusPublisher(MyServiceBusTcpClient client, string topicName, bool immediatelyPersist) void
    +PublishAsync11(T valueToPublish) ValueTask
    +PublishAsync(T message) Task
    +PublishAsync(IEnumerable<T> messageList) Task
}

Loading
MyServiceBusSubscriber<T> class diagram
classDiagram
ISubscriber~IReadOnlyList~ <|-- MyServiceBusSubscriber<T> : implements
class MyServiceBusSubscriber<T>{
    -int _chunkSize
    -bool _batchSubscribe
    -Action<Exception> _deserializeExceptionHandler
    -bool _withDeduplication
    -List<Func<T, ValueTask>> _list
    -List<Func<IReadOnlyList<T>, ValueTask>> _listBatch
    -IDeduplicator<T> _deduplicator
    +viceBusSubscriber(MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType, bool batchSubscribe, bool withDeduplication) void
    +viceBusSubscriber(MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType, bool batchSubscribe, int chunkSize) void
    +viceBusSubscriber(MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType, IDeduplicator<T> deduplicator) void
    +SetDeserializeExceptionHandler(Action<Exception> deserializeExceptionHandler) void
    +HandlerSingle(IMyServiceBusMessage data) ValueTask
    +HandlerSingleWithDeduplication(IMyServiceBusMessage data) ValueTask
    +HandlerBatch(IConfirmationContext ctx, IReadOnlyList<IMyServiceBusMessage> data) ValueTask
    +HandleBatchMessages(IReadOnlyList<IMyServiceBusMessage> data) Task
    +Subscribe(Func<T, ValueTask> callback) void
    +Subscribe(Func<IReadOnlyList<T>, ValueTask> callback) void
}

Loading
MyServiceBusTcpClientFactory class diagram
classDiagram
class MyServiceBusTcpClientFactory{
    -ILogger _deserializeExceptionHandlerLogger$
    +Create(Func<string> getHostPort, ILogger logger)$ MyServiceBusTcpClient
    +RegisterMyServiceBusTcpClient(ContainerBuilder builder, Func<string> getHostPort, ILoggerFactory loggerFactory)$ MyServiceBusTcpClient
    +RegisterMyServiceBusPublisher<T>(ContainerBuilder builder, MyServiceBusTcpClient client, string topicName, bool immediatelyPersist)$ ContainerBuilder
    +RegisterMyServiceBusSubscriberSingle<T>(ContainerBuilder builder, MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType)$ ContainerBuilder
    +RegisterMyServiceBusSubscriberSingle<T>(ContainerBuilder builder, MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType, Action<Exception> deserializeExceptionHandler)$ ContainerBuilder
    +RegisterMyServiceBusSubscriberSingle<T>(ContainerBuilder builder, MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType, IDeduplicator<T> _deduplicator)$ ContainerBuilder
    +RegisterMyServiceBusSubscriberSingle<T>(ContainerBuilder builder, MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType, IDeduplicator<T> _deduplicator, Action<Exception> deserializeExceptionHandler)$ ContainerBuilder
    +RegisterMyServiceBusSubscriberBatch<T>(ContainerBuilder builder, MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType, Action<Exception> deserializeExceptionHandler)$ ContainerBuilder
    +RegisterMyServiceBusSubscriberBatch<T>(ContainerBuilder builder, MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType)$ ContainerBuilder
    +RegisterMyServiceBusSubscriberBatch<T>(ContainerBuilder builder, MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType, int chunkSize)$ ContainerBuilder
    +RegisterMyServiceBusSubscriberBatch<T>(ContainerBuilder builder, MyServiceBusTcpClient client, string topicName, string queueName, TopicQueueType queryType, int chunkSize, Action<Exception> deserializeExceptionHandler)$ ContainerBuilder
    +RegisterMyServiceBusDeduplicator<T>(ContainerBuilder builder, Func<T, string> tToStrFunc, Func<string> noSqlWriterUrl, string tableName, string topicName, TimeSpan expirationTime, ILoggerFactory loggerFactory)$ MyServiceBusDeduplicator<T>
    +GetDeserializeExceptionHandlerLogger(ILoggerFactory loggerFactory, string topicName)$ Action<Exception>
}

Loading
ServiceBusContracts class diagram
classDiagram
class ServiceBusContracts{
    +bool IsDebug$
}

Loading
ServiceBusLifeTime class diagram
classDiagram
class ServiceBusLifeTime{
    -IServiceBusManager[] _clients
    -ILogger<ServiceBusLifeTime> _logger
    -MyTaskTimer _timer
    -bool _watcherStarted
    -int _countFailConnect
    +.ctor(IServiceBusManager[] clients, ILogger<ServiceBusLifeTime> logger) ServiceBusLifeTime
    +Watcher() Task
    +Start() void
    +Stop() void
    +GetIssues() (string, List<string>)
}

Loading
ServiceBusManager class diagram
classDiagram
IServiceBusManager <|-- ServiceBusManager : implements
class ServiceBusManager{
    -MyServiceBusTcpClient _client
    +string HostPort
    +bool IsStarted
    +bool IsConnected
    +.ctor(MyServiceBusTcpClient client, string hostPort) ServiceBusManager
    +Start() void
    +Stop() void
}

Loading
TestMessage class diagram
classDiagram
class TestMessage{
    -string TopicName$
    -int Id
}

Loading

This file is maintained by a bot.