Ejemplo n.º 1
0
        public CallbacksImpl(ICallbacks callbacks)
        {
            _callbacks = callbacks;

            _isTypeValidDelegate = IsTypeValid;
            GCHandle.Alloc(_isTypeValidDelegate);

            _releaseNetReferenceDelegate = ReleaseNetReference;
            GCHandle.Alloc(_releaseNetReferenceDelegate);

            _releaseNetDelegateGCHandleDelegate = ReleaseNetDelegateGCHandle;
            GCHandle.Alloc(_releaseNetDelegateGCHandleDelegate);

            _createLazyTypeInfoDelegate = CreateLazyTypeInfo;
            GCHandle.Alloc(_createLazyTypeInfoDelegate);

            _loadTypeInfoDelegate = LoadTypeInfo;
            GCHandle.Alloc(_loadTypeInfoDelegate);

            _instantiateTypeDelgate = InstantiateType;
            GCHandle.Alloc(_instantiateTypeDelgate);

            _callComponentCompletedDelegate = CallComponentCompleted;
            GCHandle.Alloc(_callComponentCompletedDelegate);

            _callObjectDestroyedDelegate = CallObjectDestroyed;
            GCHandle.Alloc(_callObjectDestroyedDelegate);

            _readPropertyDelegate = ReadProperty;
            GCHandle.Alloc(_readPropertyDelegate);

            _writePropertyDelegate = WriteProperty;
            GCHandle.Alloc(_writePropertyDelegate);

            _invokeMethodDelegate = InvokeMethod;
            GCHandle.Alloc(_invokeMethodDelegate);

            _gcCollectDelegate = GCCollect;
            GCHandle.Alloc(_gcCollectDelegate);

            _raiseNetSignalsDelegate = RaiseNetSignals;
            GCHandle.Alloc(_raiseNetSignalsDelegate);

            _awaitTaskDelegate = AwaitTask;
            GCHandle.Alloc(_awaitTaskDelegate);

            _serializeDelegate = Serialize;
            GCHandle.Alloc(_serializeDelegate);

            _invokeDelegateDelegate = InvokeDelegate;
            GCHandle.Alloc(_invokeDelegateDelegate);
        }
Ejemplo n.º 2
0
 // --- Private Static Methods ---
 private static void InitStaticFields()
 {
     _methodInvokeDelegate = new InvokeDelegateDelegate(InvokeDelegate);
     _methodInvokeMethod   = new InvokeMethodDelegate(InvokeMethod);
 }