HostOnlyAttribute.cs
using System;
using Sandbox;
namespace Orizon;
/// <summary>
/// Marks a method as host-only, meaning it can only be called by the host.
/// </summary>
/// <remarks>
/// This attribute is used to generate a wrapper method that checks if the caller is the host before calling the method.
/// If the method is called on the client, an exception will be thrown.
/// </remarks>
[AttributeUsage( AttributeTargets.Method )]
[CodeGenerator( CodeGeneratorFlags.Instance | CodeGeneratorFlags.WrapMethod, "Orizon.Core.HostOnlyHelper.__host_only_wrapper" )]
internal sealed class HostOnlyAttribute : Attribute;