DemoFile.Game.Cs 0.21.1

dotnet add package DemoFile.Game.Cs --version 0.21.1                
NuGet\Install-Package DemoFile.Game.Cs -Version 0.21.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DemoFile.Game.Cs" Version="0.21.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DemoFile.Game.Cs --version 0.21.1                
#r "nuget: DemoFile.Game.Cs, 0.21.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DemoFile.Game.Cs as a Cake Addin
#addin nuget:?package=DemoFile.Game.Cs&version=0.21.1

// Install DemoFile.Game.Cs as a Cake Tool
#tool nuget:?package=DemoFile.Game.Cs&version=0.21.1                

DemoFile.Game.Cs NuGet

DemoFile.Net is a blazing fast demo parser library for Source 2 games, written in C#. It is cross-platform, and can be used on Windows, Mac or Linux.

[!IMPORTANT] This DemoFile.Game.Cs package provides support for parsing Counter-Strike 2 demos. See DemoFile on NuGet for more information about the base library.

Features

Feature Availability
CSTV / GOTV demos ✅ Full support
POV demos ✅ Full support
HTTP broadcasts ⌛ Coming soon
Game events (e.g. player_death) ✅ Full support
Entity updates (player positions, grenades, etc.) ✅ Full support
Seeking forwards/backwards through the demo ✅ Full support

Examples

using DemoFile;

internal class Program
{
    public static async Task Main(string[] args)
    {
        var path = args.SingleOrDefault() ?? throw new Exception("Expected a single argument: <path to .dem>");

        var demo = new CsDemoParser();
        demo.Source1GameEvents.PlayerDeath += e =>
        {
            Console.WriteLine($"{e.Attacker?.PlayerName} [{e.Weapon}] {e.Player?.PlayerName}");
        };

        await demo.ReadAllAsync(File.OpenRead(path));

        Console.WriteLine("\nFinished!");
    }
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.21.1 66 9/14/2024
0.21.1-g27b712d66f 46 9/14/2024
0.0.0-g27b712d66f 43 9/14/2024