Exemplo n.º 1
0
 public SyncVarHook(EventDefinition @event, SyncHookType hookType)
 {
     Event         = @event;
     this.hookType = hookType;
 }
Exemplo n.º 2
0
        private static SyncVarHook FindHookMethod(FieldDefinition syncVar, string hookFunctionName, SyncHookType hookType, TypeReference originalType)
        {
            switch (hookType)
            {
            default:
            case SyncHookType.Automatic:
                return(FindAutomatic(syncVar, hookFunctionName, originalType));

            case SyncHookType.MethodWith1Arg:
                return(FindMethod1Arg(syncVar, hookFunctionName, originalType));

            case SyncHookType.MethodWith2Arg:
                return(FindMethod2Arg(syncVar, hookFunctionName, originalType));

            case SyncHookType.EventWith1Arg:
                return(FindEvent1Arg(syncVar, hookFunctionName, originalType));

            case SyncHookType.EventWith2Arg:
                return(FindEvent2Arg(syncVar, hookFunctionName, originalType));
            }
        }
Exemplo n.º 3
0
 public SyncVarHook(MethodDefinition method, SyncHookType hookType)
 {
     Method        = method;
     this.hookType = hookType;
 }