Skip to content

Commit

Permalink
Fix emulation mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Apr 15, 2021
1 parent f08c0f9 commit 3e199e3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion cli/Squidex.CLI/Squidex.CLI/Commands/App_Schemas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using Squidex.CLI.Commands.Implementation;
using Squidex.CLI.Commands.Models;
using Squidex.CLI.Configuration;
using Squidex.ClientLibrary;
using Squidex.ClientLibrary.Management;

#pragma warning disable IDE0059 // Value assigned to symbol is never used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================

using System;

namespace Squidex.CLI.Commands.Implementation
{
public interface ILogger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

using System;
using System.Collections.Generic;
using Squidex.ClientLibrary;

namespace Squidex.CLI.Commands.Implementation.ImExport
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using System.IO;
using Newtonsoft.Json;
using Squidex.CLI.Commands.Implementation;
using Squidex.ClientLibrary;

namespace Squidex.CLI.Commands.Models
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================

using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Squidex.CLI.Commands.Implementation;

namespace Squidex.CLI.Configuration
{
Expand All @@ -23,7 +23,7 @@ public override HttpResponseMessage Send(HttpRequestMessage request, Cancellatio
{
if (request.Method != HttpMethod.Get)
{
throw new InvalidOperationException("Not possible in emulation mode.");
throw new CLIException("Emulated");
}

return base.Send(request, cancellationToken);
Expand All @@ -33,7 +33,7 @@ public override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
{
if (request.Method != HttpMethod.Get)
{
throw new InvalidOperationException("Not possible in emulation mode.");
throw new CLIException("Emulated");
}

return base.SendAsync(request, cancellationToken);
Expand Down

0 comments on commit 3e199e3

Please sign in to comment.