Exemplo n.º 1
0
        string UpdateStatusAction(string sessionID, string action)
        {
            string result = "";

            try
            {
                //action = approve, deny or hold.
                string         computerName = SecurityUtilities.GetComputerName();
                string         userName     = SecurityUtilities.GetUserName();
                Authentication auth;
                if (Utilities.Auth == null)
                {
                    auth = SecurityUtilities.GetAuthentication(serviceName);
                }
                else
                {
                    auth = Utilities.Auth;
                }
                HttpsClient client      = new HttpsClient();
                Uri         fhirAddress = new Uri(UpdatePendingStatusUri);
                result = client.UpdatePendingStatus(fhirAddress, auth, sessionID, action, computerName, userName);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Exemplo n.º 2
0
        public static BrokerConnectionInfo Create(string name, string path, string rCommandLineArguments = null)
        {
            rCommandLineArguments = rCommandLineArguments ?? string.Empty;

            Uri uri;

            if (!Uri.TryCreate(path, UriKind.Absolute, out uri))
            {
                return(new BrokerConnectionInfo());
            }

            if (uri.IsFile)
            {
                return(new BrokerConnectionInfo(name, uri, rCommandLineArguments, string.Empty, false, string.Empty));
            }

            var fragment      = uri.Fragment;
            var interpreterId = string.IsNullOrEmpty(fragment) ? string.Empty : fragment.Substring(1);

            uri = new Uri(uri.GetLeftPart(UriPartial.Query));
            string username = SecurityUtilities.GetUserName(GetCredentialAuthority(name));

            return(new BrokerConnectionInfo(name, uri, rCommandLineArguments, interpreterId, true, username));
        }