Skip to content

Commit

Permalink
Rename namespace: JsonRpc.Standard.xxx -> JsonRpc.xxx
Browse files Browse the repository at this point in the history
Moved RPC message related classes into JsonRpc.Messages.
  • Loading branch information
CXuesong committed Apr 21, 2019
1 parent 392c541 commit 24d6a8e
Show file tree
Hide file tree
Showing 66 changed files with 110 additions and 169 deletions.
2 changes: 1 addition & 1 deletion ConsoleTestApp/ILibraryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using JsonRpc.Standard.Contracts;
using JsonRpc.Contracts;

namespace ConsoleTestApp
{
Expand Down
6 changes: 3 additions & 3 deletions ConsoleTestApp/LibraryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JsonRpc.Standard;
using JsonRpc.Standard.Contracts;
using JsonRpc.Standard.Server;
using JsonRpc.Contracts;
using JsonRpc.Messages;
using JsonRpc.Server;

namespace ConsoleTestApp
{
Expand Down
1 change: 0 additions & 1 deletion ConsoleTestApp/LibrarySession.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Threading;
using JsonRpc.Standard.Server;

namespace ConsoleTestApp
{
Expand Down
10 changes: 4 additions & 6 deletions ConsoleTestApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow;
using JsonRpc.Client;
using JsonRpc.Contracts;
using JsonRpc.DynamicProxy.Client;
using JsonRpc.Standard;
using JsonRpc.Standard.Client;
using JsonRpc.Standard.Contracts;
using JsonRpc.Standard.Server;
using JsonRpc.Server;
using JsonRpc.Streams;
using Nerdbank;

Expand Down Expand Up @@ -40,7 +38,7 @@ static void Main(string[] args)
// simplicity, here we just use a concrete class.
var session = new LibrarySessionFeature();
serverHandler.DefaultFeatures.Set(session);
// Connect the datablocks
// Connect the MessageReader/Writer to the handler.
// If we want server to stop, just stop the source
using (var reader = new ByLineTextMessageReader(streams.Item1))
using (var writer = new ByLineTextMessageWriter(streams.Item1))
Expand Down
2 changes: 1 addition & 1 deletion JsonRpc.AspNetCore/AspNetCoreFeatureCollection.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using JsonRpc.Standard.Server;
using JsonRpc.Server;
using Microsoft.AspNetCore.Http;

namespace JsonRpc.AspNetCore
Expand Down
4 changes: 2 additions & 2 deletions JsonRpc.AspNetCore/AspNetCoreRpcServerHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.IO;
using System.Text;
using System.Threading.Tasks;
using JsonRpc.Standard;
using JsonRpc.Standard.Server;
using JsonRpc.Messages;
using JsonRpc.Server;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;

Expand Down
2 changes: 1 addition & 1 deletion JsonRpc.AspNetCore/HttpContextServiceFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using JsonRpc.Standard.Server;
using JsonRpc.Server;
using Microsoft.AspNetCore.Http;

namespace JsonRpc.AspNetCore
Expand Down
4 changes: 1 addition & 3 deletions JsonRpc.AspNetCore/JsonRpcAspNetExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.IO;
using System.Reflection;
using JsonRpc.Standard;
using JsonRpc.Standard.Contracts;
using JsonRpc.Standard.Server;
using JsonRpc.Server;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
Expand Down
2 changes: 1 addition & 1 deletion JsonRpc.AspNetCore/JsonRpcBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using JsonRpc.Standard.Server;
using JsonRpc.Server;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

Expand Down
4 changes: 2 additions & 2 deletions JsonRpc.AspNetCore/JsonRpcOptions.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using System.Text;
using JsonRpc.Standard.Contracts;
using JsonRpc.Standard.Server;
using JsonRpc.Contracts;
using JsonRpc.Server;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

Expand Down
5 changes: 2 additions & 3 deletions JsonRpc.Commons/Client/Exceptions.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using System;
using System.Collections.Generic;
using System.Runtime.ExceptionServices;
using System.Security;
using System.Text;
using JsonRpc.Messages;
using Newtonsoft.Json;
#if NET45
using System.Runtime.Serialization;
#endif

namespace JsonRpc.Standard.Client
namespace JsonRpc.Client
{
/// <summary>
/// The base exception class that indicates the general error of JSON RPC client.
Expand Down
5 changes: 2 additions & 3 deletions JsonRpc.Commons/Client/IJsonRpcClientHandler.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using JsonRpc.Messages;

namespace JsonRpc.Standard.Client
namespace JsonRpc.Client
{
/// <summary>
/// Provides methods for transmitting the client-side JSON RPC messages.
Expand Down
8 changes: 2 additions & 6 deletions JsonRpc.Commons/Client/JsonRpcClient.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using JsonRpc.Standard.Contracts;
using JsonRpc.Standard.Server;
using JsonRpc.Messages;
using Newtonsoft.Json.Linq;

namespace JsonRpc.Standard.Client
namespace JsonRpc.Client
{

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion JsonRpc.Commons/Contracts/Attributes.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Reflection;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Declares a JSON RPC method scope. Defines some common traits of the methods in the scope.
Expand Down
6 changes: 2 additions & 4 deletions JsonRpc.Commons/Contracts/IJsonRpcMethodBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
using System.Linq;
using System.Reflection;
using System.Threading;
using JsonRpc.Standard.Server;
using Newtonsoft.Json;
using JsonRpc.Server;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Defines method to choose the best match among a set of RPC methods according to the JSON RPC request.
Expand Down
2 changes: 1 addition & 1 deletion JsonRpc.Commons/Contracts/IJsonRpcRequestMarshaler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Threading;
using Newtonsoft.Json.Linq;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{

/// <summary>
Expand Down
4 changes: 1 addition & 3 deletions JsonRpc.Commons/Contracts/IJsonValueConverter.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Used to convert value from/to JToken.
Expand Down
10 changes: 2 additions & 8 deletions JsonRpc.Commons/Contracts/IRpcMethodInvoker.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using JsonRpc.Standard.Server;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using JsonRpc.Server;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Defines method to invoke the specified JSON RPC method.
Expand Down
6 changes: 2 additions & 4 deletions JsonRpc.Commons/Contracts/JsonRpcClientContract.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Contract details used in JSON RPC calls.
Expand Down
5 changes: 2 additions & 3 deletions JsonRpc.Commons/Contracts/JsonRpcContractResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using JsonRpc.Standard.Server;
using JsonRpc.Server;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Provides methods that can build <see cref="JsonRpcServerContract"/> for service and client.
Expand Down
8 changes: 1 addition & 7 deletions JsonRpc.Commons/Contracts/JsonRpcMethod.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Provides information to map a JSON RPC method to a CLR method.
Expand Down
7 changes: 2 additions & 5 deletions JsonRpc.Commons/Contracts/JsonRpcNamingStrategy.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Used to map JSON RPC method and argument names into CLR counterparts.
Expand Down
3 changes: 2 additions & 1 deletion JsonRpc.Commons/Contracts/JsonRpcParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
using System.Collections;
using System.Reflection;
using System.Threading;
using JsonRpc.Messages;
using Newtonsoft.Json.Linq;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Provides information to map an argument in JSON RPC method to a CLR method argument.
Expand Down
7 changes: 2 additions & 5 deletions JsonRpc.Commons/Contracts/JsonRpcServerContract.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json.Serialization;
using System.Collections.Generic;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{
/// <summary>
/// Contract details used in JSON RPC calls.
Expand Down
2 changes: 1 addition & 1 deletion JsonRpc.Commons/Contracts/MarshaledRequestParameters.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Threading;
using Newtonsoft.Json.Linq;

namespace JsonRpc.Standard.Contracts
namespace JsonRpc.Contracts
{

public struct MarshaledRequestParameters
Expand Down
1 change: 1 addition & 0 deletions JsonRpc.Commons/JsonRpc.Commons.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<RootNamespace>JsonRpc</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace JsonRpc.Standard
namespace JsonRpc.Messages
{
/// <summary>
/// Represents the base abstract JSON-RPC message.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace JsonRpc.Standard
namespace JsonRpc.Messages
{
/// <summary>
/// Contains event arguments for <see cref="Message"/> related events.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using System;
using System.Collections;
using System.Text;
using JsonRpc.Standard.Client;
using JsonRpc.Client;
using JsonRpc.Server;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace JsonRpc.Standard
namespace JsonRpc.Messages
{
/// <summary>
/// Error codes, including those who are defined by the JSON-RPC 2.0 specification.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;

namespace JsonRpc.Standard
namespace JsonRpc.Messages
{
internal static class RpcSerializer
{
Expand Down
5 changes: 1 addition & 4 deletions JsonRpc.Commons/Server/DefaultServiceFactory.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using JsonRpc.Standard.Contracts;

namespace JsonRpc.Standard.Server
namespace JsonRpc.Server
{
/// <summary>
/// A factory that creates the specified JSON RPC service instance.
Expand Down
4 changes: 1 addition & 3 deletions JsonRpc.Commons/Server/FeatureCollection.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Text;

namespace JsonRpc.Standard.Server
namespace JsonRpc.Server
{
/// <summary>
/// Manages a collection of features.
Expand Down
Loading

0 comments on commit 24d6a8e

Please sign in to comment.