Beispiel #1
0
 public              FScriptDelegate this[int index]
 {
     get
     {
         return(BlittableTypeMarshaler <FScriptDelegate> .FromNative(InvocationList.Data, index));
     }
     set
     {
         BlittableTypeMarshaler <FScriptDelegate> .ToNative(InvocationList.Data, index, value);
     }
 }
Beispiel #2
0
        public void ProcessMulticastDelegate(IntPtr parameters)
        {
            // Create an unmanaged version of this delegate and then destroy the underlying TArray once complete
            FMulticastScriptDelegate scriptDelegate = new FMulticastScriptDelegate();

            scriptDelegate.InvocationList.AddZeroed(Marshal.SizeOf(typeof(FScriptDelegate)), Count);
            for (int i = 0; i < Count; ++i)
            {
                BlittableTypeMarshaler <FScriptDelegate> .ToNative(scriptDelegate.InvocationList.Data, i, this[i]);
            }
            Native_FMulticastScriptDelegate.ProcessMulticastDelegate(ref scriptDelegate, parameters);
            // Something may have modified the delegate? Copy it back from the native array.
            CopyFrom(scriptDelegate);
            scriptDelegate.InvocationList.Destroy();
        }