Skip to content

Commit

Permalink
Split out ServerHostHandle class into separate source file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jthelin committed May 23, 2016
1 parent 0ea0271 commit 1e12dc6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
20 changes: 0 additions & 20 deletions ServerHost/ServerHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@

namespace Server.Host
{
/// <summary>
/// Data holder class for information related to a hosted in-process test server instance.
/// </summary>
/// <typeparam name="TServer">Type of the server.</typeparam>
public class ServerHostHandle<TServer>
{
internal ServerHostHandle()
{
// Prevent the arbitrary creation of ServerHostHandle objects.
}

/// <summary> The name of this server. </summary>
public string ServerName { get; internal set; }
/// <summary> Reference to the Server instance in the hosted AppDomain.
/// This should be a <c>MarshalByRefObject</c> to allow cross-domain API calls.</summary>
public TServer Server { get; internal set; }
/// <summary> Reference to the AppDomain this server is running in. </summary>
public AppDomain AppDomain { get; internal set; }
}

/// <summary>
/// A hosting / test framework class for loading server instances into individual AppDomains in current process.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions ServerHost/ServerHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServerHost.cs" />
<Compile Include="ServerHostHandle.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
27 changes: 27 additions & 0 deletions ServerHost/ServerHostHandle.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) Jorgen Thelin. All rights reserved.
// Licensed with Apache 2.0 https://github.com/jthelin/ServerHost/blob/master/LICENSE

using System;

namespace Server.Host
{
/// <summary>
/// Data holder class for information related to a hosted in-process test server instance.
/// </summary>
/// <typeparam name="TServer">Type of the server.</typeparam>
public class ServerHostHandle<TServer>
{
internal ServerHostHandle()
{
// Prevent the arbitrary creation of ServerHostHandle objects.
}

/// <summary> The name of this server. </summary>
public string ServerName { get; internal set; }
/// <summary> Reference to the Server instance in the hosted AppDomain.
/// This should be a <c>MarshalByRefObject</c> to allow cross-domain API calls.</summary>
public TServer Server { get; internal set; }
/// <summary> Reference to the AppDomain this server is running in. </summary>
public AppDomain AppDomain { get; internal set; }
}
}

0 comments on commit 1e12dc6

Please sign in to comment.