Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions seqcli.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IO/@EntryIndexedValue">IO</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MS/@EntryIndexedValue">MS</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=apikey/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=appinstance/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -16,6 +18,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gravatar/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=hackily/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mdash/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=nologo/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=n_0027est/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=retentionpolicies/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=retentionpolicy/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -32,4 +35,5 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Tokenizes/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=trailingindent/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unawaited/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unclosable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=xmpweb/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
12 changes: 6 additions & 6 deletions src/Roastery/Fake/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public Person(string? name, string? address)
}

static readonly string[] Forenames =
{
[
"Akeem",
"Alice",
"Alok",
Expand All @@ -40,10 +40,10 @@ public Person(string? name, string? address)
"Yoshi",
"Zach",
"Zeynep"
};
];

static readonly string[] Surnames =
{
[
"Anderson",
"Alvarez",
"Brookes",
Expand All @@ -60,10 +60,10 @@ public Person(string? name, string? address)
"Smith",
"Xia",
"Zheng"
};
];

static readonly string[] Streets =
{
[
"Lilac Road",
"Lilly Street",
"Carnation Street",
Expand All @@ -78,7 +78,7 @@ public Person(string? name, string? address)
"Trillium Creek Parkway",
"Grevillea Street",
"Kurrajong Street"
};
];

public static Person Generate()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Roastery/Web/FaultInjectionMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ public FaultInjectionMiddleware(ILogger logger, HttpServer next)
{
_logger = logger.ForContext<FaultInjectionMiddleware>();
_next = next;
_faults = new Func<HttpRequest, Task<HttpResponse>>[]
{
_faults =
[
Unauthorized,
Unauthorized,
Unauthorized,
Timeout,
Timeout,
Disposed
};
];
}

Task<HttpResponse> Unauthorized(HttpRequest request)
Expand Down
2 changes: 1 addition & 1 deletion src/Roastery/Web/Router.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Router(IEnumerable<Controller> controllers, ILogger logger)
{
using var _ = LogContext.PushProperty("Controller", controllerName);
using var __ = LogContext.PushProperty("Action", actionName);
return (Task<HttpResponse>) method.Invoke(controller, new object[] {r})!;
return (Task<HttpResponse>) method.Invoke(controller, [r])!;
});

_logger.Debug("Binding route HTTP {HttpMethod} {RouteTemplate} to action method {Controller}.{Action}()",
Expand Down
16 changes: 5 additions & 11 deletions src/SeqCli/Apps/Definitions/AppMetadataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,15 @@ static Dictionary<string, AppSettingDefinition> GetAvailableSettings(Type mainRe
});
}

static readonly HashSet<Type> IntegerTypes = new()
{
static readonly HashSet<Type> IntegerTypes =
[
typeof(short), typeof(ushort), typeof(int), typeof(uint),
typeof(long), typeof(ulong)
};
];

static readonly HashSet<Type> DecimalTypes = new()
{
typeof(float), typeof(double), typeof(decimal)
};
static readonly HashSet<Type> DecimalTypes = [typeof(float), typeof(double), typeof(decimal)];

static readonly HashSet<Type> BooleanTypes = new()
{
typeof(bool)
};
static readonly HashSet<Type> BooleanTypes = [typeof(bool)];

internal static AppSettingType GetSettingType(Type type)
{
Expand Down
4 changes: 2 additions & 2 deletions src/SeqCli/Cli/Commands/ApiKey/RemoveCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ protected override async Task<int> Run()

var connection = _connectionFactory.Connect(_connection);

var toRemove = _entityIdentity.Id != null ?
new[] {await connection.ApiKeys.FindAsync(_entityIdentity.Id)} :
var toRemove = _entityIdentity.Id != null ? [await connection.ApiKeys.FindAsync(_entityIdentity.Id)]
:
(await connection.ApiKeys.ListAsync())
.Where(ak => _entityIdentity.Title == ak.Title)
.ToArray();
Expand Down
4 changes: 2 additions & 2 deletions src/SeqCli/Cli/Commands/AppInstance/RemoveCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ protected override async Task<int> Run()

var connection = _connectionFactory.Connect(_connection);

var toRemove = _entityIdentity.Id != null ?
new[] {await connection.AppInstances.FindAsync(_entityIdentity.Id)} :
var toRemove = _entityIdentity.Id != null ? [await connection.AppInstances.FindAsync(_entityIdentity.Id)]
:
(await connection.AppInstances.ListAsync())
.Where(ak => _entityIdentity.Title == ak.Title)
.ToArray();
Expand Down
4 changes: 2 additions & 2 deletions src/SeqCli/Cli/Commands/Dashboard/RemoveCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ protected override async Task<int> Run()

var connection = _connectionFactory.Connect(_connection);

var toRemove = _entityIdentity.Id != null ?
new[] { await connection.Dashboards.FindAsync(_entityIdentity.Id) } :
var toRemove = _entityIdentity.Id != null ? [await connection.Dashboards.FindAsync(_entityIdentity.Id)]
:
(await connection.Dashboards.ListAsync(ownerId: _entityOwner.OwnerId, shared: _entityOwner.IncludeShared))
.Where(dashboard => _entityIdentity.Title == dashboard.Title)
.ToArray();
Expand Down
4 changes: 2 additions & 2 deletions src/SeqCli/Cli/Commands/Feed/RemoveCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ protected override async Task<int> Run()

var connection = _connectionFactory.Connect(_connection);

var toRemove = _id != null ?
new[] {await connection.Feeds.FindAsync(_id)} :
var toRemove = _id != null ? [await connection.Feeds.FindAsync(_id)]
:
(await connection.Feeds.ListAsync())
.Where(f => _name == f.Name)
.ToArray();
Expand Down
Loading