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