コード例 #1
0
        /// <summary>Snippet for SearchHashesAsync</summary>
        public async Task SearchHashesAsync()
        {
            // Snippet: SearchHashesAsync(ByteString, IEnumerable<ThreatType>, CallSettings)
            // Additional: SearchHashesAsync(ByteString, IEnumerable<ThreatType>, CancellationToken)
            // Create client
            WebRiskServiceClient webRiskServiceClient = await WebRiskServiceClient.CreateAsync();

            // Initialize request argument(s)
            ByteString hashPrefix = ByteString.Empty;
            IEnumerable <ThreatType> threatTypes = new ThreatType[]
            {
                ThreatType.Unspecified,
            };
            // Make the request
            SearchHashesResponse response = await webRiskServiceClient.SearchHashesAsync(hashPrefix, threatTypes);

            // End snippet
        }
コード例 #2
0
        /// <summary>Snippet for SearchHashesAsync</summary>
        public async Task SearchHashesRequestObjectAsync()
        {
            // Snippet: SearchHashesAsync(SearchHashesRequest, CallSettings)
            // Additional: SearchHashesAsync(SearchHashesRequest, CancellationToken)
            // Create client
            WebRiskServiceClient webRiskServiceClient = await WebRiskServiceClient.CreateAsync();

            // Initialize request argument(s)
            SearchHashesRequest request = new SearchHashesRequest
            {
                HashPrefix  = ByteString.Empty,
                ThreatTypes =
                {
                    ThreatType.Unspecified,
                },
            };
            // Make the request
            SearchHashesResponse response = await webRiskServiceClient.SearchHashesAsync(request);

            // End snippet
        }