Esempio n. 1
0
        public NativeMethods()
        {
            this.grpcsharp_init           = NativeCalls.grpcsharp_init;
            this.grpcsharp_shutdown       = NativeCalls.grpcsharp_shutdown;
            this.grpcsharp_version_string = NativeCalls.grpcsharp_version_string;

            this.grpcsharp_batch_context_create = NativeCalls.grpcsharp_batch_context_create;
            this.grpcsharp_batch_context_recv_initial_metadata                   = NativeCalls.grpcsharp_batch_context_recv_initial_metadata;
            this.grpcsharp_batch_context_recv_message_length                     = NativeCalls.grpcsharp_batch_context_recv_message_length;
            this.grpcsharp_batch_context_recv_message_to_buffer                  = NativeCalls.grpcsharp_batch_context_recv_message_to_buffer;
            this.grpcsharp_batch_context_recv_status_on_client_status            = NativeCalls.grpcsharp_batch_context_recv_status_on_client_status;
            this.grpcsharp_batch_context_recv_status_on_client_details           = NativeCalls.grpcsharp_batch_context_recv_status_on_client_details;
            this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = NativeCalls.grpcsharp_batch_context_recv_status_on_client_trailing_metadata;
            this.grpcsharp_batch_context_recv_close_on_server_cancelled          = NativeCalls.grpcsharp_batch_context_recv_close_on_server_cancelled;
            this.grpcsharp_batch_context_destroy = NativeCalls.grpcsharp_batch_context_destroy;

            this.grpcsharp_composite_call_credentials_create = NativeCalls.grpcsharp_composite_call_credentials_create;
            this.grpcsharp_call_credentials_release          = NativeCalls.grpcsharp_call_credentials_release;

            this.grpcsharp_call_cancel                  = NativeCalls.grpcsharp_call_cancel;
            this.grpcsharp_call_cancel_with_status      = NativeCalls.grpcsharp_call_cancel_with_status;
            this.grpcsharp_call_start_unary             = NativeCalls.grpcsharp_call_start_unary;
            this.grpcsharp_call_start_client_streaming  = NativeCalls.grpcsharp_call_start_client_streaming;
            this.grpcsharp_call_start_server_streaming  = NativeCalls.grpcsharp_call_start_server_streaming;
            this.grpcsharp_call_start_duplex_streaming  = NativeCalls.grpcsharp_call_start_duplex_streaming;
            this.grpcsharp_call_send_message            = NativeCalls.grpcsharp_call_send_message;
            this.grpcsharp_call_send_close_from_client  = NativeCalls.grpcsharp_call_send_close_from_client;
            this.grpcsharp_call_send_status_from_server = NativeCalls.grpcsharp_call_send_status_from_server;
            this.grpcsharp_call_recv_message            = NativeCalls.grpcsharp_call_recv_message;
            this.grpcsharp_call_recv_initial_metadata   = NativeCalls.grpcsharp_call_recv_initial_metadata;
            this.grpcsharp_call_start_serverside        = NativeCalls.grpcsharp_call_start_serverside;
            this.grpcsharp_call_send_initial_metadata   = NativeCalls.grpcsharp_call_send_initial_metadata;
            this.grpcsharp_call_set_credentials         = NativeCalls.grpcsharp_call_set_credentials;
            this.grpcsharp_call_get_peer                = NativeCalls.grpcsharp_call_get_peer;
            this.grpcsharp_call_destroy                 = NativeCalls.grpcsharp_call_destroy;

            this.grpcsharp_channel_args_create      = NativeCalls.grpcsharp_channel_args_create;
            this.grpcsharp_channel_args_set_string  = NativeCalls.grpcsharp_channel_args_set_string;
            this.grpcsharp_channel_args_set_integer = NativeCalls.grpcsharp_channel_args_set_integer;
            this.grpcsharp_channel_args_destroy     = NativeCalls.grpcsharp_channel_args_destroy;

            this.grpcsharp_override_default_ssl_roots           = NativeCalls.grpcsharp_override_default_ssl_roots;
            this.grpcsharp_ssl_credentials_create               = NativeCalls.grpcsharp_ssl_credentials_create;
            this.grpcsharp_composite_channel_credentials_create = NativeCalls.grpcsharp_composite_channel_credentials_create;
            this.grpcsharp_channel_credentials_release          = NativeCalls.grpcsharp_channel_credentials_release;

            this.grpcsharp_insecure_channel_create          = NativeCalls.grpcsharp_insecure_channel_create;
            this.grpcsharp_secure_channel_create            = NativeCalls.grpcsharp_secure_channel_create;
            this.grpcsharp_channel_create_call              = NativeCalls.grpcsharp_channel_create_call;
            this.grpcsharp_channel_check_connectivity_state = NativeCalls.grpcsharp_channel_check_connectivity_state;
            this.grpcsharp_channel_watch_connectivity_state = NativeCalls.grpcsharp_channel_watch_connectivity_state;
            this.grpcsharp_channel_get_target = NativeCalls.grpcsharp_channel_get_target;
            this.grpcsharp_channel_destroy    = NativeCalls.grpcsharp_channel_destroy;

            this.grpcsharp_sizeof_grpc_event = NativeCalls.grpcsharp_sizeof_grpc_event;

            this.grpcsharp_completion_queue_create   = NativeCalls.grpcsharp_completion_queue_create;
            this.grpcsharp_completion_queue_shutdown = NativeCalls.grpcsharp_completion_queue_shutdown;
            this.grpcsharp_completion_queue_next     = NativeCalls.grpcsharp_completion_queue_next;
            this.grpcsharp_completion_queue_pluck    = NativeCalls.grpcsharp_completion_queue_pluck;
            this.grpcsharp_completion_queue_destroy  = NativeCalls.grpcsharp_completion_queue_destroy;

            this.gprsharp_free = NativeCalls.gprsharp_free;

            this.grpcsharp_metadata_array_create           = NativeCalls.grpcsharp_metadata_array_create;
            this.grpcsharp_metadata_array_add              = NativeCalls.grpcsharp_metadata_array_add;
            this.grpcsharp_metadata_array_count            = NativeCalls.grpcsharp_metadata_array_count;
            this.grpcsharp_metadata_array_get_key          = NativeCalls.grpcsharp_metadata_array_get_key;
            this.grpcsharp_metadata_array_get_value        = NativeCalls.grpcsharp_metadata_array_get_value;
            this.grpcsharp_metadata_array_get_value_length = NativeCalls.grpcsharp_metadata_array_get_value_length;
            this.grpcsharp_metadata_array_destroy_full     = NativeCalls.grpcsharp_metadata_array_destroy_full;

            this.grpcsharp_redirect_log = NativeCalls.grpcsharp_redirect_log;

            this.grpcsharp_metadata_credentials_create_from_plugin = NativeCalls.grpcsharp_metadata_credentials_create_from_plugin;
            this.grpcsharp_metadata_credentials_notify_from_plugin = NativeCalls.grpcsharp_metadata_credentials_notify_from_plugin;

            this.gprsharp_now                = NativeCalls.gprsharp_now;
            this.gprsharp_inf_future         = NativeCalls.gprsharp_inf_future;
            this.gprsharp_inf_past           = NativeCalls.gprsharp_inf_past;
            this.gprsharp_convert_clock_type = NativeCalls.gprsharp_convert_clock_type;
            this.gprsharp_sizeof_timespec    = NativeCalls.gprsharp_sizeof_timespec;
        }
Esempio n. 2
0
        public NativeMethods(UnmanagedLibrary library)
        {
            this.grpcsharp_init           = GetMethodDelegate <Delegates.grpcsharp_init_delegate>(library);
            this.grpcsharp_shutdown       = GetMethodDelegate <Delegates.grpcsharp_shutdown_delegate>(library);
            this.grpcsharp_version_string = GetMethodDelegate <Delegates.grpcsharp_version_string_delegate>(library);

            this.grpcsharp_batch_context_create = GetMethodDelegate <Delegates.grpcsharp_batch_context_create_delegate>(library);
            this.grpcsharp_batch_context_recv_initial_metadata                   = GetMethodDelegate <Delegates.grpcsharp_batch_context_recv_initial_metadata_delegate>(library);
            this.grpcsharp_batch_context_recv_message_length                     = GetMethodDelegate <Delegates.grpcsharp_batch_context_recv_message_length_delegate>(library);
            this.grpcsharp_batch_context_recv_message_to_buffer                  = GetMethodDelegate <Delegates.grpcsharp_batch_context_recv_message_to_buffer_delegate>(library);
            this.grpcsharp_batch_context_recv_status_on_client_status            = GetMethodDelegate <Delegates.grpcsharp_batch_context_recv_status_on_client_status_delegate>(library);
            this.grpcsharp_batch_context_recv_status_on_client_details           = GetMethodDelegate <Delegates.grpcsharp_batch_context_recv_status_on_client_details_delegate>(library);
            this.grpcsharp_batch_context_recv_status_on_client_trailing_metadata = GetMethodDelegate <Delegates.grpcsharp_batch_context_recv_status_on_client_trailing_metadata_delegate>(library);
            this.grpcsharp_batch_context_recv_close_on_server_cancelled          = GetMethodDelegate <Delegates.grpcsharp_batch_context_recv_close_on_server_cancelled_delegate>(library);
            this.grpcsharp_batch_context_destroy = GetMethodDelegate <Delegates.grpcsharp_batch_context_destroy_delegate>(library);

            this.grpcsharp_request_call_context_create           = GetMethodDelegate <Delegates.grpcsharp_request_call_context_create_delegate>(library);
            this.grpcsharp_request_call_context_call             = GetMethodDelegate <Delegates.grpcsharp_request_call_context_call_delegate>(library);
            this.grpcsharp_request_call_context_method           = GetMethodDelegate <Delegates.grpcsharp_request_call_context_method_delegate>(library);
            this.grpcsharp_request_call_context_host             = GetMethodDelegate <Delegates.grpcsharp_request_call_context_host_delegate>(library);
            this.grpcsharp_request_call_context_deadline         = GetMethodDelegate <Delegates.grpcsharp_request_call_context_deadline_delegate>(library);
            this.grpcsharp_request_call_context_request_metadata = GetMethodDelegate <Delegates.grpcsharp_request_call_context_request_metadata_delegate>(library);
            this.grpcsharp_request_call_context_destroy          = GetMethodDelegate <Delegates.grpcsharp_request_call_context_destroy_delegate>(library);

            this.grpcsharp_composite_call_credentials_create = GetMethodDelegate <Delegates.grpcsharp_composite_call_credentials_create_delegate>(library);
            this.grpcsharp_call_credentials_release          = GetMethodDelegate <Delegates.grpcsharp_call_credentials_release_delegate>(library);

            this.grpcsharp_call_cancel                  = GetMethodDelegate <Delegates.grpcsharp_call_cancel_delegate>(library);
            this.grpcsharp_call_cancel_with_status      = GetMethodDelegate <Delegates.grpcsharp_call_cancel_with_status_delegate>(library);
            this.grpcsharp_call_start_unary             = GetMethodDelegate <Delegates.grpcsharp_call_start_unary_delegate>(library);
            this.grpcsharp_call_start_client_streaming  = GetMethodDelegate <Delegates.grpcsharp_call_start_client_streaming_delegate>(library);
            this.grpcsharp_call_start_server_streaming  = GetMethodDelegate <Delegates.grpcsharp_call_start_server_streaming_delegate>(library);
            this.grpcsharp_call_start_duplex_streaming  = GetMethodDelegate <Delegates.grpcsharp_call_start_duplex_streaming_delegate>(library);
            this.grpcsharp_call_send_message            = GetMethodDelegate <Delegates.grpcsharp_call_send_message_delegate>(library);
            this.grpcsharp_call_send_close_from_client  = GetMethodDelegate <Delegates.grpcsharp_call_send_close_from_client_delegate>(library);
            this.grpcsharp_call_send_status_from_server = GetMethodDelegate <Delegates.grpcsharp_call_send_status_from_server_delegate>(library);
            this.grpcsharp_call_recv_message            = GetMethodDelegate <Delegates.grpcsharp_call_recv_message_delegate>(library);
            this.grpcsharp_call_recv_initial_metadata   = GetMethodDelegate <Delegates.grpcsharp_call_recv_initial_metadata_delegate>(library);
            this.grpcsharp_call_start_serverside        = GetMethodDelegate <Delegates.grpcsharp_call_start_serverside_delegate>(library);
            this.grpcsharp_call_send_initial_metadata   = GetMethodDelegate <Delegates.grpcsharp_call_send_initial_metadata_delegate>(library);
            this.grpcsharp_call_set_credentials         = GetMethodDelegate <Delegates.grpcsharp_call_set_credentials_delegate>(library);
            this.grpcsharp_call_get_peer                = GetMethodDelegate <Delegates.grpcsharp_call_get_peer_delegate>(library);
            this.grpcsharp_call_destroy                 = GetMethodDelegate <Delegates.grpcsharp_call_destroy_delegate>(library);

            this.grpcsharp_channel_args_create      = GetMethodDelegate <Delegates.grpcsharp_channel_args_create_delegate>(library);
            this.grpcsharp_channel_args_set_string  = GetMethodDelegate <Delegates.grpcsharp_channel_args_set_string_delegate>(library);
            this.grpcsharp_channel_args_set_integer = GetMethodDelegate <Delegates.grpcsharp_channel_args_set_integer_delegate>(library);
            this.grpcsharp_channel_args_destroy     = GetMethodDelegate <Delegates.grpcsharp_channel_args_destroy_delegate>(library);

            this.grpcsharp_override_default_ssl_roots           = GetMethodDelegate <Delegates.grpcsharp_override_default_ssl_roots>(library);
            this.grpcsharp_ssl_credentials_create               = GetMethodDelegate <Delegates.grpcsharp_ssl_credentials_create_delegate>(library);
            this.grpcsharp_composite_channel_credentials_create = GetMethodDelegate <Delegates.grpcsharp_composite_channel_credentials_create_delegate>(library);
            this.grpcsharp_channel_credentials_release          = GetMethodDelegate <Delegates.grpcsharp_channel_credentials_release_delegate>(library);

            this.grpcsharp_insecure_channel_create          = GetMethodDelegate <Delegates.grpcsharp_insecure_channel_create_delegate>(library);
            this.grpcsharp_secure_channel_create            = GetMethodDelegate <Delegates.grpcsharp_secure_channel_create_delegate>(library);
            this.grpcsharp_channel_create_call              = GetMethodDelegate <Delegates.grpcsharp_channel_create_call_delegate>(library);
            this.grpcsharp_channel_check_connectivity_state = GetMethodDelegate <Delegates.grpcsharp_channel_check_connectivity_state_delegate>(library);
            this.grpcsharp_channel_watch_connectivity_state = GetMethodDelegate <Delegates.grpcsharp_channel_watch_connectivity_state_delegate>(library);
            this.grpcsharp_channel_get_target = GetMethodDelegate <Delegates.grpcsharp_channel_get_target_delegate>(library);
            this.grpcsharp_channel_destroy    = GetMethodDelegate <Delegates.grpcsharp_channel_destroy_delegate>(library);

            this.grpcsharp_sizeof_grpc_event = GetMethodDelegate <Delegates.grpcsharp_sizeof_grpc_event_delegate>(library);

            this.grpcsharp_completion_queue_create   = GetMethodDelegate <Delegates.grpcsharp_completion_queue_create_delegate>(library);
            this.grpcsharp_completion_queue_shutdown = GetMethodDelegate <Delegates.grpcsharp_completion_queue_shutdown_delegate>(library);
            this.grpcsharp_completion_queue_next     = GetMethodDelegate <Delegates.grpcsharp_completion_queue_next_delegate>(library);
            this.grpcsharp_completion_queue_pluck    = GetMethodDelegate <Delegates.grpcsharp_completion_queue_pluck_delegate>(library);
            this.grpcsharp_completion_queue_destroy  = GetMethodDelegate <Delegates.grpcsharp_completion_queue_destroy_delegate>(library);

            this.gprsharp_free = GetMethodDelegate <Delegates.gprsharp_free_delegate>(library);

            this.grpcsharp_metadata_array_create       = GetMethodDelegate <Delegates.grpcsharp_metadata_array_create_delegate>(library);
            this.grpcsharp_metadata_array_add          = GetMethodDelegate <Delegates.grpcsharp_metadata_array_add_delegate>(library);
            this.grpcsharp_metadata_array_count        = GetMethodDelegate <Delegates.grpcsharp_metadata_array_count_delegate>(library);
            this.grpcsharp_metadata_array_get_key      = GetMethodDelegate <Delegates.grpcsharp_metadata_array_get_key_delegate>(library);
            this.grpcsharp_metadata_array_get_value    = GetMethodDelegate <Delegates.grpcsharp_metadata_array_get_value_delegate>(library);
            this.grpcsharp_metadata_array_destroy_full = GetMethodDelegate <Delegates.grpcsharp_metadata_array_destroy_full_delegate>(library);

            this.grpcsharp_redirect_log = GetMethodDelegate <Delegates.grpcsharp_redirect_log_delegate>(library);

            this.grpcsharp_metadata_credentials_create_from_plugin = GetMethodDelegate <Delegates.grpcsharp_metadata_credentials_create_from_plugin_delegate>(library);
            this.grpcsharp_metadata_credentials_notify_from_plugin = GetMethodDelegate <Delegates.grpcsharp_metadata_credentials_notify_from_plugin_delegate>(library);

            this.grpcsharp_ssl_server_credentials_create = GetMethodDelegate <Delegates.grpcsharp_ssl_server_credentials_create_delegate>(library);
            this.grpcsharp_server_credentials_release    = GetMethodDelegate <Delegates.grpcsharp_server_credentials_release_delegate>(library);

            this.grpcsharp_server_create = GetMethodDelegate <Delegates.grpcsharp_server_create_delegate>(library);
            this.grpcsharp_server_register_completion_queue = GetMethodDelegate <Delegates.grpcsharp_server_register_completion_queue_delegate>(library);
            this.grpcsharp_server_add_insecure_http2_port   = GetMethodDelegate <Delegates.grpcsharp_server_add_insecure_http2_port_delegate>(library);
            this.grpcsharp_server_add_secure_http2_port     = GetMethodDelegate <Delegates.grpcsharp_server_add_secure_http2_port_delegate>(library);
            this.grpcsharp_server_start                        = GetMethodDelegate <Delegates.grpcsharp_server_start_delegate>(library);
            this.grpcsharp_server_request_call                 = GetMethodDelegate <Delegates.grpcsharp_server_request_call_delegate>(library);
            this.grpcsharp_server_cancel_all_calls             = GetMethodDelegate <Delegates.grpcsharp_server_cancel_all_calls_delegate>(library);
            this.grpcsharp_server_shutdown_and_notify_callback = GetMethodDelegate <Delegates.grpcsharp_server_shutdown_and_notify_callback_delegate>(library);
            this.grpcsharp_server_destroy                      = GetMethodDelegate <Delegates.grpcsharp_server_destroy_delegate>(library);

            this.gprsharp_now                = GetMethodDelegate <Delegates.gprsharp_now_delegate>(library);
            this.gprsharp_inf_future         = GetMethodDelegate <Delegates.gprsharp_inf_future_delegate>(library);
            this.gprsharp_inf_past           = GetMethodDelegate <Delegates.gprsharp_inf_past_delegate>(library);
            this.gprsharp_convert_clock_type = GetMethodDelegate <Delegates.gprsharp_convert_clock_type_delegate>(library);
            this.gprsharp_sizeof_timespec    = GetMethodDelegate <Delegates.gprsharp_sizeof_timespec_delegate>(library);

            this.grpcsharp_test_callback = GetMethodDelegate <Delegates.grpcsharp_test_callback_delegate>(library);
            this.grpcsharp_test_nop      = GetMethodDelegate <Delegates.grpcsharp_test_nop_delegate>(library);
        }