mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-26 07:58:12 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
28 lines
624 B
C#
28 lines
624 B
C#
using Sandbox;
|
|
using System;
|
|
|
|
[AttributeUsage( AttributeTargets.Property )]
|
|
[CodeGenerator( CodeGeneratorFlags.WrapPropertySet | CodeGeneratorFlags.Instance, "OnWrapSet" )]
|
|
[CodeGenerator( CodeGeneratorFlags.WrapPropertySet | CodeGeneratorFlags.Static, "WrapSet.OnWrapSetStatic" )]
|
|
public class WrapSet : Attribute
|
|
{
|
|
public static void OnWrapSetStatic<T>( WrappedPropertySet<T> p )
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
public partial class TestWrapSet
|
|
{
|
|
[WrapSet]
|
|
public static bool StaticProperty { get; set; }
|
|
|
|
[WrapSet]
|
|
public bool InstanceProperty { set; }
|
|
|
|
internal void OnWrapSet<T>( WrappedPropertySet<T> p )
|
|
{
|
|
return null;
|
|
}
|
|
}
|