-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use .net standard, set up versioning and nuget variables
- Loading branch information
1 parent
e48792d
commit a7c360b
Showing
17 changed files
with
80 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
Heroes.ReplayParser.ConsoleApplication/ConsoleApplication1/App.config
This file was deleted.
Oops, something went wrong.
70 changes: 0 additions & 70 deletions
70
Heroes.ReplayParser.ConsoleApplication/ConsoleApplication1/ConsoleApplication1.csproj
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
Heroes.ReplayParser.ConsoleApplication/ConsoleApplication1/ConsoleApplication1.sln
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
Heroes.ReplayParser.ConsoleApplication/ConsoleApplication1/Program.cs
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
Heroes.ReplayParser.ConsoleApplication/ConsoleApplication1/nuget.config
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System.IO; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Heroes.ReplayParser; | ||
|
||
namespace ConsoleApplication1 | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
var heroesAccountsFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"Heroes of the Storm\Accounts"); | ||
var randomReplayFileName = Directory.GetFiles(heroesAccountsFolder, "*.StormReplay", SearchOption.AllDirectories).OrderBy(i => Guid.NewGuid()).First(); | ||
|
||
// Attempt to parse the replay | ||
// Ignore errors can be set to true if you want to attempt to parse currently unsupported replays, such as 'VS AI' or 'PTR Region' replays | ||
var replayParseResult = DataParser.ParseReplay(randomReplayFileName, ignoreErrors: false, deleteFile: false); | ||
|
||
// If successful, the Replay object now has all currently available information | ||
if (replayParseResult.Item1 == DataParser.ReplayParseResult.Success) | ||
{ | ||
var replay = replayParseResult.Item2; | ||
|
||
Console.WriteLine("Replay Build: " + replay.ReplayBuild); | ||
Console.WriteLine("Map: " + replay.Map); | ||
foreach (var player in replay.Players.OrderByDescending(i => i.IsWinner)) | ||
Console.WriteLine("Player: " + player.Name + ", Win: " + player.IsWinner + ", Hero: " + player.Character + ", Lvl: " + player.CharacterLevel + ", Talents: " + string.Join(",", player.Talents.Select(i => i.TalentID + ":" + i.TalentName))); | ||
|
||
Console.WriteLine("Press Any Key to Close"); | ||
} | ||
else | ||
Console.WriteLine("Failed to Parse Replay: " + replayParseResult.Item1); | ||
|
||
Console.Read(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>8.0.30703</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{AAF78D53-A1DA-424A-B1AA-09895EAB3B2B}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Heroes.ReplayParser</RootNamespace> | ||
<AssemblyName>Heroes.ReplayParser</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile> | ||
</TargetFrameworkProfile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SignAssembly>false</SignAssembly> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AssemblyOriginatorKeyFile> | ||
</AssemblyOriginatorKeyFile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> | ||
<DebugSymbols>true</DebugSymbols> | ||
<OutputPath>bin\x86\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<DebugType>full</DebugType> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<ErrorReport>prompt</ErrorReport> | ||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> | ||
<OutputPath>bin\x86\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<Optimize>true</Optimize> | ||
<DebugType>pdbonly</DebugType> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<ErrorReport>prompt</ErrorReport> | ||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Drawing" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="DataParser.cs" /> | ||
<Compile Include="Message.cs" /> | ||
<Compile Include="MPQFiles\ReplayResumableEvents.cs" /> | ||
<Compile Include="Statistics.cs" /> | ||
<Compile Include="Unit.cs" /> | ||
<Compile Include="MPQFiles\MpqHeader.cs" /> | ||
<Compile Include="Player.cs" /> | ||
<Compile Include="Replay.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="MPQFiles\ReplayAttributeEvents.cs"> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
<Compile Include="MPQFiles\ReplayDetails.cs" /> | ||
<Compile Include="MPQFiles\ReplayGameEvents.cs" /> | ||
<Compile Include="MPQFiles\ReplayInitData.cs" /> | ||
<Compile Include="MPQFiles\ReplayMessageEvents.cs" /> | ||
<Compile Include="MPQFiles\ReplayServerBattlelobby.cs" /> | ||
<Compile Include="MPQFiles\ReplayTrackerEvents.cs" /> | ||
<Compile Include="BitReader.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\MpqTool\MpqTool.csproj"> | ||
<Project>{fa50e172-836b-47bb-8745-60595e4fb12a}</Project> | ||
<Name>MpqTool</Name> | ||
</ProjectReference> | ||
</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. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<PackageId>Heroes.ReplayParser</PackageId> | ||
<Authors>Ben Barrett</Authors> | ||
<Company>barrett777</Company> | ||
<Description>A library for parsing Heroes of the Storm replay files (.StormReplay)</Description> | ||
<RepositoryUrl>https://github.com/barrett777/Heroes.ReplayParser</RepositoryUrl> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="GitVersionTask" Version="5.1.3"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\MpqTool\MpqTool.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.