GSF.ServiceProcess.ClientHelper.SendRequest C# (CSharp) Метод

SendRequest() публичный Метод

Sends a request to the ServiceHelper using RemotingClient.
public SendRequest ( ClientRequest request ) : void
request ClientRequest object to be sent.
Результат void
        public void SendRequest(ClientRequest request)
        {
            try
            {
                // Intercept TRANSFER requests for uploads.
                if (request.Command == "TRANSFER" && request.Arguments.Exists("upload"))
                {
                    string source = FilePath.GetAbsolutePath(request.Arguments["orderedarg1"]);
                    if (File.Exists(source))
                    {
                        // Attach the file content.
                        request.Attachments.Add(File.ReadAllBytes(source));
                    }
                    else
                    {
                        // File does not exist.
                        throw new FileNotFoundException($"File '{source}' does not exist");
                    }
                }

                // Pass the request along.
                m_remotingClient.SendAsync(request);
            }
            catch (Exception ex)
            {
                UpdateStatus(UpdateType.Alarm, "Error processing request - {0}", ex.Message);
            }
        }

Same methods

ClientHelper::SendRequest ( string request ) : void