Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
soxtoby committed Sep 25, 2024
1 parent 2cc2959 commit 95fc691
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Examples/AspNetCoreExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

var builder = WebApplication.CreateBuilder(args);

var slackSettings = builder.Configuration.GetSection("Slack").Get<SlackSettings>();
var slackSettings = builder.Configuration.GetSection("Slack").Get<SlackSettings>()!;

builder.Services.AddSlackNet(c => c
// Configure the tokens used to authenticate with Slack
Expand Down
2 changes: 1 addition & 1 deletion SlackNet/Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static JsonSerializerSettings SerializerSettings(ISlackTypeResolver slac

public static ISlackTypeResolver SlackTypeResolver(params Assembly[] assembliesContainingSlackTypes) => new SlackTypeResolver(assembliesContainingSlackTypes);

public static Assembly[] AssembliesContainingSlackTypes => new[] { typeof(Default).GetTypeInfo().Assembly };
public static Assembly[] AssembliesContainingSlackTypes => [typeof(Default).GetTypeInfo().Assembly];

public static IWebSocketFactory WebSocketFactory => new WebSocketFactory();

Expand Down
6 changes: 3 additions & 3 deletions SlackNet/SlackRtmClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ await _webSocket.Connect(
/// <summary>
/// Is the client connecting or has it connected.
/// </summary>
public bool Connected =>
_webSocket?.State == WebSocketState.Connecting
|| _webSocket?.State == WebSocketState.Open;
public bool Connected => _webSocket?.State
is WebSocketState.Connecting
or WebSocketState.Open;

/// <summary>
/// Send a simple message. For more complicated messages, use <see cref="ChatApi.PostMessage"/> instead.
Expand Down

0 comments on commit 95fc691

Please sign in to comment.