新建服务端的NFX项目,为了方便开发调试

This commit is contained in:
大石头 2019-03-20 22:37:48 +08:00
parent caa7216cb3
commit 12eda78539
5 changed files with 118 additions and 25 deletions

View File

@ -135,18 +135,6 @@ namespace Stardust.Server
XTrace.WriteLine(services.ToJson());
return false;
}
[Api(nameof(GetAll))]
public List<String> GetAll()
{
var list = new List<String>();
for (var i = 0; i < 10; i++)
{
list.Add(Rand.NextString(8));
}
return list;
}
#endregion
#region 线

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("星尘服务平台")]
[assembly: AssemblyDescription("星尘,轻量级服务框架。远程方法调用,服务自动注册和发现,负载均衡,动态伸缩,故障转移,性能监控。")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("新生命开发团队")]
[assembly: AssemblyProduct("Stardust.Server")]
[assembly: AssemblyCopyright("版权所有(C) 新生命开发团队 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("9a7251dd-7ee7-45c6-9eb6-f80789d3bcd7")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.2019.0320")]

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9A7251DD-7EE7-45C6-9EB6-F80789D3BCD7}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Stardust.Server</RootNamespace>
<AssemblyName>Stardust.Server</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>false</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="NewLife.Core">
<HintPath>..\DLL\NewLife.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="XCode">
<HintPath>..\DLL\XCode.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Stardust.Server\Program.cs">
<Link>Program.cs</Link>
</Compile>
<Compile Include="..\Stardust.Server\Setting.cs">
<Link>Setting.cs</Link>
</Compile>
<Compile Include="..\Stardust.Server\StarService.cs">
<Link>StarService.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Stardust.Data\Stardust.Data.csproj">
<Project>{8b5fc187-6592-4717-99c3-d97743062fd3}</Project>
<Name>Stardust.Data</Name>
</ProjectReference>
<ProjectReference Include="..\Stardust\Stardust.csproj">
<Project>{aadbd913-749c-467e-a63f-c118c4c82351}</Project>
<Name>Stardust</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -32,19 +32,6 @@ namespace Test
sc.Star = star;
var rs = star.InvokeAsync<List<String>>("GetAll").Result;
//if (set.Debug)
{
var ns = sc.EnsureCreate() as NetServer;
ns.Log = XTrace.Log;
#if DEBUG
ns.LogSend = true;
ns.LogReceive = true;
sc.EncoderLog = XTrace.Log;
#endif
}
sc.Start();
_Server = sc;

View File

@ -20,6 +20,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test", "Test\Test.csproj",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stardust.Server", "Stardust.Server\Stardust.Server.csproj", "{73B28F07-E99F-45A8-B9A0-90E7BAC133A3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stardust.ServerFx", "Stardust.ServerFx\Stardust.ServerFx.csproj", "{9A7251DD-7EE7-45C6-9EB6-F80789D3BCD7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -50,6 +52,10 @@ Global
{73B28F07-E99F-45A8-B9A0-90E7BAC133A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73B28F07-E99F-45A8-B9A0-90E7BAC133A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73B28F07-E99F-45A8-B9A0-90E7BAC133A3}.Release|Any CPU.Build.0 = Release|Any CPU
{9A7251DD-7EE7-45C6-9EB6-F80789D3BCD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A7251DD-7EE7-45C6-9EB6-F80789D3BCD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A7251DD-7EE7-45C6-9EB6-F80789D3BCD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A7251DD-7EE7-45C6-9EB6-F80789D3BCD7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE