Skip to content

Conversation

@archaim
Copy link
Contributor

@archaim archaim commented Dec 21, 2019

Добавлен клиент к WebApi шины в ClientTools.
Поднята версия сборок.

Добавлен клиент к WebApi шины в ClientTools.
Поднята версия сборок.
<metadata>
<id>NewPlatform.Flexberry.ServiceBus.ClientTools</id>
<version>1.2.0</version>
<version>1.2.1</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Делаем всё через beta версии. К тому же в этом PR столько изменений, что тянет на изменении минорной версии. Надо указать во всех nuspec-файлах 1.3.0-beta01.

using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Net;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using-и внутри namespace должны быть.

/// <summary>
/// URL of REST-API of Service Bus.
/// </summary>
public string BaseUrl { get; set; } = "http://localhost:7085/RestService";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем нужно такое умолчание? Как минимум, надо про это написать в комментарии.

public async Task<ICollection<ServiceBusMessageInfo>> GetMessagesAsync(string clientId, CancellationToken cancellationToken)
{
if (clientId == null)
throw new ArgumentNullException(nameof(clientId));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Всегда используем {}.

var response = await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers = Enumerable.ToDictionary(response.Headers, h => h.Key, h => h.Value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var используем только если по правой части хорошо понятно что это за тип. Тут и вокруг поправить.

<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>7.3</LangVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У меня как-то в другом проекте эта директива вызывала падение сборки под mono.

<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Настройки разошлись. См. конфигурацию выше.


public OptimizedSendingManager(ISubscriptionsManager subscriptionsManager, IStatisticsService statisticsService, IDataService dataService, ILogger logger, bool useLegacySenders = true)
: base(subscriptionsManager, statisticsService, dataService, logger, useLegacySenders)
public OptimizedSendingManager(ISubscriptionsManager subscriptionsManager, IStatisticsService statisticsService, IDataService dataService, ILogger logger)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это изменение API требует перекомпиляции решения на основе этого класса, поэтому, по правилам semver надо поднимать хотя бы вторую цифру, а не третью.

// // Файл документации для моделей.
// c.IncludeXmlComments(Path.Combine(execDirPath, "NewPlatform.Flexberry.ServiceBus.Objects.xml"));
// }).EnableSwaggerUi();
config.EnableSwagger(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может сделать это опциональным? Не всем инстанциям шины это надо. Хорошо бы законфигурировать или дать возможность отключить.

/// If <c>true</c>, legacy types of message senders will be created.
/// </summary>
private readonly bool useLegacySenders;
public bool UseLegacySenders = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В комментарии можно указать про default value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants