consulo / consulo-unity3d

Frameworks: Unity3D
Apache License 2.0
103 stars 10 forks source link

Used argument show "unused" #133

Closed winxalex closed 7 years ago

winxalex commented 7 years ago
screen shot 2017-11-07 at 1 00 29 pm
VISTALL commented 7 years ago

Hi. Reproduced.


using System.Reflection;

namespace ws.winx.unity.events {
    public class InvokableCall<T> {
        public InvokableCall(MethodInfo methodInfo) {
        }

        public virtual void Invoke(object[] args) {

        }
    }

    public class CachedInvokableCall<T> : InvokableCall<T> {
        private readonly object[] m_Arg1 = new object[1];

        public CachedInvokableCall(MethodInfo methodInfo, T argument) : base(methodInfo) {
            this.m_Arg1[0] = argument;
        }

        public override void Invoke(object[] args) {
            base.Invoke(this.m_Arg1);
        }
    }
}

Problem with this

Thanks