public ChannelDelegateWrapper(RC.ChannelDelegate managed)
 {
     this.managed = managed;
     if (managed != null)
     {
         NativeDelegate = new ChannelDelegateNative(NativeCallback);
     }
 }
        public static RC.ChannelDelegate GetManagedDelegate(ChannelDelegateNative native)
        {
            if (native == null)
            {
                return(null);
            }
            ChannelDelegateWrapper wrapper = (ChannelDelegateWrapper)native.Target;

            if (wrapper == null)
            {
                return(null);
            }
            return(wrapper.managed);
        }