Пример #1
0
        /// <summary>Appends a description of this event.</summary>
        public void ToString(StringBuilder text)
        {
            text.Append(GetType().GetNameCS());

            text.Append(": PersistentCalls=");
            UltEventUtils.AppendDeepToString(text, _PersistentCalls.GetEnumerator(), "\n    ");

            text.Append("\n    DynamicCalls=");
#if UNITY_EDITOR
            var invocationList = GetDynamicCallInvocationList();
#else
            var invocationList = DynamicCallsBase != null?DynamicCallsBase.GetInvocationList() : null;
#endif
            var enumerator = invocationList != null?invocationList.GetEnumerator() : null;

            UltEventUtils.AppendDeepToString(text, enumerator, "\n    ");
        }
Пример #2
0
    public void Main()
    {
        GetType().InvokeMember(
            "f1",
            BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Instance,
            null,
            this,
            null
            );

        var x = new DynamicCallsBase();

        x.GetType().InvokeMember(
            "f2",
            BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Instance,
            null,
            x,
            null
            );
    }