Skip to content

Commit

Permalink
demo
Browse files Browse the repository at this point in the history
  • Loading branch information
dunitian committed Dec 4, 2016
1 parent f16ec93 commit c27130c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Demo/Demo.csproj
Expand Up @@ -33,6 +33,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Snowflake.Net, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Snowflake.Net.4.0.0\lib\Snowflake.Net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -46,6 +50,9 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
10 changes: 8 additions & 2 deletions Demo/Program.cs
@@ -1,10 +1,16 @@
namespace Demo
using Snowflake.Net;
using System;

namespace Demo
{
class Program
{
static void Main(string[] args)
{

var worker = new IdWorker(1, 1);
long id = worker.NextId();
Console.WriteLine($"生成的ID为:{id},他的长度是:{id.ToString().Length}");
Console.ReadKey();
}
}
}
4 changes: 4 additions & 0 deletions Demo/packages.config
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Snowflake.Net" version="4.0.0" targetFramework="net451" />
</packages>

0 comments on commit c27130c

Please sign in to comment.