Skip to content

Commit

Permalink
Optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
Codespilot committed Jul 5, 2023
1 parent 16bd32f commit 4f005a2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Source/Euonia.Bus.RabbitMq/CommandConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private async void HandleMessageReceived(object _, BasicDeliverEventArgs args)
var props = args.BasicProperties;
var replyNeeded = !string.IsNullOrEmpty(props.CorrelationId);

var message = CommandConsumer<TCommand>.Deserialize(body.ToArray());
var message = Deserialize(body.ToArray());
OnMessageReceived(new MessageReceivedEventArgs(message, messageContext));

var taskCompletion = new TaskCompletionSource<object>();
Expand Down
2 changes: 1 addition & 1 deletion Source/Euonia.Bus.RabbitMq/RabbitMqMessageBusOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class RabbitMqMessageBusOptions
/// Gets or sets the exchange type.
/// Values: fanout, direct, headers, topic
/// </summary>
public string ExchangeType { get; set; } = global::RabbitMQ.Client.ExchangeType.Fanout;
public string ExchangeType { get; set; } = RabbitMQ.Client.ExchangeType.Fanout;

/// <summary>
///
Expand Down
2 changes: 1 addition & 1 deletion Source/Euonia.Core/System/SnowflakeId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public long Next()
if (_sequence == 0)
{
//一微妙内产生的ID计数已达上限,等待下一微妙
timestamp = GetNextTimestamp(SnowflakeId._lastTimestamp);
timestamp = GetNextTimestamp(_lastTimestamp);
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion Source/Euonia.Linq/Queryable/QueryCriteria.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public sealed class QueryCriteria<TEntity>
public QueryCriteria(ISpecification<TEntity> specification, int offset, int size)
{
Specification = specification;
this.Offset = offset;
Offset = offset;
Size = size;
}

Expand Down

0 comments on commit 4f005a2

Please sign in to comment.