public CheckInViewModel()
        {
            checkInStore = ServiceLocator.Instance.Resolve<ICheckInStore>();
            userStore = ServiceLocator.Instance.Resolve<IUserStore>();

            azure = ServiceLocator.Instance.Resolve<IAzureClient>();
            log = ServiceLocator.Instance.Resolve<IAppInsights>();          
        }
 void Initialize()
 {
     if (azure == null || azure == null || userStore == null)
     {
         azure = ServiceLocator.Instance.Resolve<IAzureClient>();
         userStore = ServiceLocator.Instance.Resolve<IUserStore>();
     }
 }
 void Initialize()
 {
     if (azure == null || searchService == null)
     {
         azure = ServiceLocator.Instance.Resolve<IAzureClient>();
         searchService = ServiceLocator.Instance.Resolve<ISearchService>();
         barcodeService = ServiceLocator.Instance.Resolve<IBarcodeService>();
     }
 }
Exemple #4
0
 public ApiService(IAzureClient azureClient, IFileSystem fs, ICertificateService certs, ISimpleCredentialStore credentialStore, 
     LoggingService log, JobScheduler jobScheduler, SigningJobCreator jobCreator)
 {
     _azure = azureClient.GetRoot();
     _azureClient = azureClient;
     _credentialStore = credentialStore;
     _log = log;
     _jobScheduler = jobScheduler;
     _jobCreator = jobCreator;
 }
		public AzureProductProvider(AzureOptions azureOptions,
									IAzureClient azureClient,
									IProductRepository repository,
									IConverter<string, Product> stringConverter,
									IConverter<Product, ProductEntity> entityConverter)
		{
			_azureOptions = azureOptions;
			_azureClient = azureClient;
			_repository = repository;
			_stringConverter = stringConverter;
			_entityConverter = entityConverter;
		}
		public AzureCategoryProvider(AzureOptions azureOptions,
									 IAzureClient azureClient,
									 ICategoryRepository repository,
									 IConverter<Category, string> stringConverter,
									 IConverter<Category, CategoryEntity> entityConverter)
		{
			_azureOptions = azureOptions;
			_azureClient = azureClient;
			_repository = repository;
			_stringConverter = stringConverter;
			_entityConverter = entityConverter;
		}
 public SocialAuthViewController(IntPtr handle): base(handle)
 {
     azure = ServiceLocator.Instance.Resolve<IAzureClient>();
     logger = ServiceLocator.Instance.Resolve<IAppInsights>();
 }
Exemple #8
0
 public TaskGroupService(IAzureClient azureClient)
 {
     _azureClient = azureClient;
 }
 public HomeController(IAzureClient azureClient)
 {
     _azureClient = azureClient;
 }
		private static IAzureProductProvider CreateProvider(AzureOptions azureOptions = null,
															IAzureClient azureClient = null,
															IProductRepository repository = null,
															IConverter<string, Product> stringConverter = null,
															IConverter<Product, ProductEntity> entityConverter = null)
		{
			return new AzureProductProvider(
				azureOptions ?? new AzureOptions(),
				azureClient ?? CreateClient(null),
				repository ?? Mock.Of<IProductRepository>(),
				stringConverter ?? CreateStringConverter(),
				entityConverter ?? CreateEntityConverter());
		}
Exemple #11
0
 /// <summary>
 /// Initializes DELETE LRO Operation
 /// </summary>
 /// <param name="client"></param>
 /// <param name="response"></param>
 /// <param name="customHeaders"></param>
 /// <param name="cancellationToken"></param>
 public DeleteLro(IAzureClient client, AzureOperationResponse <TResourceBody, TRequestHeaders> response,
                  Dictionary <string, List <string> > customHeaders,
                  CancellationToken cancellationToken) : base(client, response, customHeaders, cancellationToken)
 {
     SetFinalGetCallback = false;
 }
Exemple #12
0
        public ExecuteMagic(IAzureClient azureClient, ILogger <ExecuteMagic> logger)
            : base(
                azureClient,
                "azure.execute",
                new Microsoft.Jupyter.Core.Documentation
        {
            Summary     = "Submits a job to an Azure Quantum workspace and waits for completion.",
            Description = $@"
                        This magic command allows for submitting a Q# operation or function
                        to be run on the specified target in the current Azure Quantum workspace.
                        The command waits a specified amount of time for the job to complete before returning.

                        The Azure Quantum workspace must have been previously initialized
                        using the [`%azure.connect` magic command](https://docs.microsoft.com/qsharp/api/iqsharp-magic/azure.connect),
                        and an execution target for the job must have been specified using the
                        [`%azure.target` magic command](https://docs.microsoft.com/qsharp/api/iqsharp-magic/azure.target).

                        #### Required parameters

                        - Q# operation or function name. This must be the first parameter, and must be a valid Q# operation
                        or function name that has been defined either in the notebook or in a Q# file in the same folder.
                        - Arguments for the Q# operation or function must also be specified as `key=value` pairs.
                        
                        #### Optional parameters

                        - `{AzureSubmissionContext.ParameterNameJobName}=<string>`: Friendly name to identify this job. If not specified,
                        the Q# operation or function name will be used as the job name.
                        - `{AzureSubmissionContext.ParameterNameShots}=<integer>` (default=500): Number of times to repeat execution of the
                        specified Q# operation or function.
                        - `{AzureSubmissionContext.ParameterNameTimeout}=<integer>` (default=30): Time to wait (in seconds) for job completion
                        before the magic command returns.
                        - `{AzureSubmissionContext.ParameterNamePollingInterval}=<integer>` (default=5): Interval (in seconds) to poll for
                        job status while waiting for job execution to complete.
                        
                        #### Possible errors

                        - {AzureClientError.NotConnected.ToMarkdown()}
                        - {AzureClientError.NoTarget.ToMarkdown()}
                        - {AzureClientError.NoOperationName.ToMarkdown()}
                        - {AzureClientError.InvalidTarget.ToMarkdown()}
                        - {AzureClientError.UnrecognizedOperationName.ToMarkdown()}
                        - {AzureClientError.InvalidEntryPoint.ToMarkdown()}
                        - {AzureClientError.JobSubmissionFailed.ToMarkdown()}
                        - {AzureClientError.JobNotCompleted.ToMarkdown()}
                        - {AzureClientError.JobOutputDownloadFailed.ToMarkdown()}
                    ".Dedent(),
            Examples    = new[]
            {
                @"
                            Run a Q# operation defined as `operation MyOperation(a : Int, b : Int) : Result`
                            on the active target in the current Azure Quantum workspace:
                            ```
                            In []: %azure.execute MyOperation a=5 b=10
                            Out[]: Submitting MyOperation to target provider.qpu...
                                   Job successfully submitted for 500 shots.
                                      Job name: MyOperation
                                      Job ID: <Azure Quantum job ID>
                                   Waiting up to 30 seconds for Azure Quantum job to complete...
                                   [1:23:45 PM] Current job status: Waiting
                                   [1:23:50 PM] Current job status: Executing
                                   [1:23:55 PM] Current job status: Succeeded
                                   <detailed results of completed job>
                            ```
                        ".Dedent(),
                @"
                            Run a Q# operation defined as `operation MyOperation(a : Int, b : Int) : Result`
                            on the active target in the current Azure Quantum workspace,
                            specifying a custom job name, number of shots, timeout, and polling interval:
                            ```
                            In []: %azure.submit MyOperation a=5 b=10 jobName=""My job"" shots=100 timeout=60 poll=10
                            Out[]: Submitting MyOperation to target provider.qpu...
                                   Job successfully submitted for 100 shots.
                                      Job name: My job
                                      Job ID: <Azure Quantum job ID>
                                   Waiting up to 60 seconds for Azure Quantum job to complete...
                                   [1:23:45 PM] Current job status: Waiting
                                   [1:23:55 PM] Current job status: Waiting
                                   [1:24:05 PM] Current job status: Executing
                                   [1:24:15 PM] Current job status: Succeeded
                                   <detailed results of completed job>
                            ```
                        ".Dedent(),
            },
        }, logger)
        {
        }
 public SearchService()
 {
     azure = ServiceLocator.Instance.Resolve<IAzureClient>();
 }
 public SigningJobCreator(IAzureClient azureClient, LoggingService log, ICertificateService certs)
 {
     _azureClient = azureClient;
     _log = log;
     _certs = certs;
 }
Exemple #15
0
 public SetCommand(SetOptions options, ReleaseTransformer releaseTransformer, VariableContainerTransformer variableContainerTransformer, IUrlStore urlStore, IAzureClient azureClient, IOutput output)
 {
     _options                      = options;
     _releaseTransformer           = releaseTransformer;
     _variableContainerTransformer = variableContainerTransformer;
     _urlStore                     = urlStore;
     _azureClient                  = azureClient;
     _output = output;
 }
Exemple #16
0
        public SubmitMagic(IAzureClient azureClient)
            : base(
                azureClient,
                "azure.submit",
                new Documentation
        {
            Summary     = "Submits a job to an Azure Quantum workspace.",
            Description = $@"
                        This magic command allows for submitting a Q# operation or function
                        for execution on the specified target in the current Azure Quantum workspace.
                        The command returns immediately after the job is submitted.

                        The Azure Quantum workspace must have been previously initialized
                        using the [`%azure.connect` magic command](https://docs.microsoft.com/qsharp/api/iqsharp-magic/azure.connect),
                        and an execution target for the job must have been specified using the
                        [`%azure.target` magic command](https://docs.microsoft.com/qsharp/api/iqsharp-magic/azure.target).

                        #### Required parameters

                        - Q# operation or function name. This must be the first parameter, and must be a valid Q# operation
                        or function name that has been defined either in the notebook or in a Q# file in the same folder.
                        - Arguments for the Q# operation or function must also be specified as `key=value` pairs.

                        #### Optional parameters

                        - `{AzureSubmissionContext.ParameterNameJobName}=<string>`: Friendly name to identify this job. If not specified,
                        the Q# operation or function name will be used as the job name.
                        - `{AzureSubmissionContext.ParameterNameShots}=<integer>` (default=500): Number of times to repeat execution of the
                        specified Q# operation or function.
                        
                        #### Possible errors

                        - {AzureClientError.NotConnected.ToMarkdown()}
                        - {AzureClientError.NoTarget.ToMarkdown()}
                        - {AzureClientError.NoOperationName.ToMarkdown()}
                        - {AzureClientError.InvalidTarget.ToMarkdown()}
                        - {AzureClientError.UnrecognizedOperationName.ToMarkdown()}
                        - {AzureClientError.InvalidEntryPoint.ToMarkdown()}
                        - {AzureClientError.JobSubmissionFailed.ToMarkdown()}
                    ".Dedent(),
            Examples    = new[]
            {
                @"
                            Submit a Q# operation defined as `operation MyOperation(a : Int, b : Int) : Result`
                            for execution on the active target in the current Azure Quantum workspace:
                            ```
                            In []: %azure.submit MyOperation a=5 b=10
                            Out[]: Submitting MyOperation to target provider.qpu...
                                   Job successfully submitted for 500 shots.
                                      Job name: MyOperation
                                      Job ID: <Azure Quantum job ID>
                                   <detailed properties of submitted job>
                            ```
                        ".Dedent(),
                @"
                            Submit a Q# operation defined as `operation MyOperation(a : Int, b : Int) : Result`
                            for execution on the active target in the current Azure Quantum workspace,
                            specifying a custom job name, number of shots, timeout, and polling interval:
                            ```
                            In []: %azure.submit MyOperation a=5 b=10 jobName=""My job"" shots=100
                            Out[]: Submitting MyOperation to target provider.qpu...
                                   Job successfully submitted for 100 shots.
                                      Job name: My job
                                      Job ID: <Azure Quantum job ID>
                                   <detailed properties of submitted job>
                            ```
                        ".Dedent(),
            },
        })
        {
        }
Exemple #17
0
        /// <summary>
        /// Gets a resource from the specified URL.
        /// </summary>
        /// <param name="client">IAzureClient</param>
        /// <param name="operationUrl">URL of the resource.</param>
        /// <param name="customHeaders">Headers that will be added to request</param>
        /// <param name="cancellationToken">Cancellation token</param>
        /// <returns></returns>
        private static async Task <AzureOperationResponse <JObject> > GetRawAsync(
            this IAzureClient client,
            string operationUrl,
            Dictionary <string, List <string> > customHeaders,
            CancellationToken cancellationToken)
        {
            // Validate
            if (operationUrl == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "operationUrl");
            }

            // Tracing
            bool   shouldTrace  = ServiceClientTracing.IsEnabled;
            string invocationId = null;

            if (shouldTrace)
            {
                invocationId = ServiceClientTracing.NextInvocationId.ToString();
                var tracingParameters = new Dictionary <string, object>();
                tracingParameters.Add("operationUrl", operationUrl);
                ServiceClientTracing.Enter(invocationId, client, "GetAsync", tracingParameters);
            }

            // Construct URL
            string url = operationUrl.Replace(" ", "%20");

            // Create HTTP transport objects
            HttpRequestMessage httpRequest = new HttpRequestMessage();

            httpRequest.Method     = HttpMethod.Get;
            httpRequest.RequestUri = new Uri(url);

            // Set Headers
            if (customHeaders != null)
            {
                foreach (var header in customHeaders)
                {
                    httpRequest.Headers.Add(header.Key, header.Value);
                }
            }

            // Set Credentials
            if (client.Credentials != null)
            {
                cancellationToken.ThrowIfCancellationRequested();
                await client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
            }

            // Send Request
            if (shouldTrace)
            {
                ServiceClientTracing.SendRequest(invocationId, httpRequest);
            }
            cancellationToken.ThrowIfCancellationRequested();
            HttpResponseMessage httpResponse = await client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);

            if (shouldTrace)
            {
                ServiceClientTracing.ReceiveResponse(invocationId, httpResponse);
            }
            cancellationToken.ThrowIfCancellationRequested();
            string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);

            HttpStatusCode statusCode = httpResponse.StatusCode;

            if (statusCode != HttpStatusCode.OK &&
                statusCode != HttpStatusCode.Accepted &&
                statusCode != HttpStatusCode.Created &&
                statusCode != HttpStatusCode.NoContent)
            {
                CloudError errorBody = JsonConvert.DeserializeObject <CloudError>(responseContent, client.DeserializationSettings);
                throw new CloudException(string.Format(CultureInfo.InvariantCulture,
                                                       Resources.LongRunningOperationFailed, statusCode))
                      {
                          Body     = errorBody,
                          Request  = httpRequest,
                          Response = httpResponse
                      };
            }

            JObject body = null;

            if (!string.IsNullOrWhiteSpace(responseContent))
            {
                try
                {
                    body = JObject.Parse(responseContent);
                }
                catch
                {
                    // failed to deserialize, return empty body
                }
            }

            return(new AzureOperationResponse <JObject>
            {
                Request = httpRequest,
                Response = httpResponse,
                Body = body
            });
        }
Exemple #18
0
 public ArmManager(IAuthHelper authHelper, IAzureClient client, ISettings settings)
 {
     _authHelper = authHelper;
     _client     = client;
     _settings   = settings;
 }
 public TagsService(IAzureClient client)
 {
     _client = client;
 }
Exemple #20
0
 private void SetupDefaultGetAsync(IAzureClient azureClient)
 {
     azureClient.GetAsync(Arg.Any <string>())
     .Returns(Task.FromResult(CreateValidBuildJson()));
 }
 public ImageService()
 {
     azure = ServiceLocator.Instance.Resolve<IAzureClient>();
     logger = ServiceLocator.Instance.Resolve<IAppInsights>();
 }
 public TrendsService()
 {
     azure = ServiceLocator.Instance.Resolve<IAzureClient>();
     insights = ServiceLocator.Instance.Resolve<IAppInsights>();
 }
 /// <summary>
 /// Initializes POST LRO Operation
 /// </summary>
 /// <param name="client"></param>
 /// <param name="response"></param>
 /// <param name="customHeaders"></param>
 /// <param name="cancellationToken"></param>
 public POSTLro(IAzureClient client, AzureOperationResponse <TResourceBody, TRequestHeaders> response,
                Dictionary <string, List <string> > customHeaders,
                CancellationToken cancellationToken) : base(client, response, customHeaders, cancellationToken)
 {
 }
Exemple #24
0
 public BeersViewModel()
 {
     checkInStore = ServiceLocator.Instance.Resolve <ICheckInStore>();
     azure        = ServiceLocator.Instance.Resolve <IAzureClient>();
 }
 public AppFeedbackViewModel()
 {
     azure = ServiceLocator.Instance.Resolve<IAzureClient>();
 }
 public AzureClientMagicBase(IAzureClient azureClient, string keyword, Documentation docs) :
     base(keyword, docs)
 {
     this.AzureClient = azureClient;
 }
 public DiscoverBreweriesViewModel()
 {
     azure = ServiceLocator.Instance.Resolve<IAzureClient>();
     breweryStore = ServiceLocator.Instance.Resolve<IBreweryStore>();
 }
Exemple #28
0
 internal LROPollState(HttpOperationResponse <TResourceBody, TRequestHeaders> response, IAzureClient client)
     : base(response, client.LongRunningOperationRetryTimeout)
 {
     SdkClient                 = client;
     InitialResponse           = response;
     InitialResponseStatusCode = Response.StatusCode;
     CurrentStatusCode         = InitialResponseStatusCode;
 }
 public TrendingBeersViewModel()
 {
     azure = ServiceLocator.Instance.Resolve<IAzureClient>();
     trendsService = ServiceLocator.Instance.Resolve<ITrendsService>();
 }
Exemple #30
0
        public SubmitMagic(IAzureClient azureClient, ILogger <SubmitMagic> logger)
            : base(
                azureClient,
                "azure.submit",
                new Microsoft.Jupyter.Core.Documentation
        {
            Summary     = "Submits a job to an Azure Quantum workspace.",
            Description = $@"
                        This magic command allows for submitting a Q# operation or function
                        to be run on the specified target in the current Azure Quantum workspace.
                        The command returns immediately after the job is submitted.

                        The Azure Quantum workspace must have been previously initialized
                        using the [`%azure.connect` magic command]({KnownUris.ReferenceForMagicCommand("azure.connect")}),
                        and an execution target for the job must have been specified using the
                        [`%azure.target` magic command]({KnownUris.ReferenceForMagicCommand("azure.target")}).

                        #### Required parameters

                        - Q# operation or function name. This must be the first parameter, and must be a valid Q# operation
                        or function name that has been defined either in the notebook or in a Q# file in the same folder.
                        - Arguments for the Q# operation or function must also be specified as `key=value` pairs.

                        #### Optional parameters

                        - `{AzureSubmissionContext.ParameterNameJobName}=<string>`: Friendly name to identify this job. If not specified,
                        the Q# operation or function name will be used as the job name.
                        - `{AzureSubmissionContext.ParameterNameJobParams}=<JSON key:value pairs>`: Provider-specific job parameters
                        expressed in JSON as one or more `key`:`value` pairs to be passed to the execution target. Values must be strings.
                        - `{AzureSubmissionContext.ParameterNameShots}=<integer>` (default=500): Number of times to repeat execution of the
                        specified Q# operation or function.
                        
                        #### Possible errors

                        - {AzureClientError.NotConnected.ToMarkdown()}
                        - {AzureClientError.NoTarget.ToMarkdown()}
                        - {AzureClientError.NoOperationName.ToMarkdown()}
                        - {AzureClientError.InvalidTarget.ToMarkdown()}
                        - {AzureClientError.UnrecognizedOperationName.ToMarkdown()}
                        - {AzureClientError.InvalidEntryPoint.ToMarkdown()}
                        - {AzureClientError.JobSubmissionFailed.ToMarkdown()}
                    ".Dedent(),
            Examples    = new[]
            {
                @"
                            Submit a Q# operation defined as `operation MyOperation(a : Int, b : Int) : Result`
                            for execution on the active target in the current Azure Quantum workspace:
                            ```
                            In []: %azure.submit MyOperation a=5 b=10
                            Out[]: Submitting MyOperation to target provider.qpu...
                                   Job successfully submitted for 500 shots.
                                      Job name: MyOperation
                                      Job ID: <Azure Quantum job ID>
                                   <detailed properties of submitted job>
                            ```
                        ".Dedent(),
                @"
                            Submit a Q# operation defined as `operation MyOperation(a : Int, b : Int) : Result`
                            for execution on the active target in the current Azure Quantum workspace,
                            specifying a custom job name, number of shots, and provider-specific job parameters:
                            ```
                            In []: %azure.submit MyOperation a=5 b=10 jobName=""My job"" shots=100 jobParams={""Key1"":""Val1"",""Key2"":""Val2""}
                            Out[]: Submitting MyOperation to target provider.qpu...
                                   Job successfully submitted for 100 shots.
                                      Job name: My job
                                      Job ID: <Azure Quantum job ID>
                                   <detailed properties of submitted job>
                            ```
                        ".Dedent(),
            },
        },
                logger)
        {
        }
		private static IAzureProductProvider CreateProvider(IAzureClient client, IConverter<string, Product> stringConverter = null)
		{
			return CreateProvider(new AzureOptions(), client, stringConverter: stringConverter);
		}
Exemple #32
0
        public ConnectMagic(IAzureClient azureClient, ILogger <ConnectMagic> logger)
            : base(
                azureClient,
                "azure.connect",
                new Microsoft.Jupyter.Core.Documentation
        {
            Summary     = "Connects to an Azure Quantum workspace or displays current connection status.",
            Description = $@"
                        This magic command allows for connecting to an Azure Quantum workspace
                        as specified by the resource ID of the workspace or by a combination of
                        subscription ID, resource group name, and workspace name.

                        If the connection is successful, a list of the available Q# execution targets
                        in the Azure Quantum workspace will be displayed.

                        #### Required parameters

                        The Azure Quantum workspace can be identified by resource ID:

                        - `{ParameterNameResourceId}=<string>`: The resource ID of the Azure Quantum workspace.
                        This can be obtained from the workspace page in the Azure portal. The `{ParameterNameResourceId}=` prefix
                        is optional for this parameter, as long as the resource ID is valid.

                        Alternatively, it can be identified by subscription ID, resource group name, and workspace name:
                        
                        - `{ParameterNameSubscriptionId}=<string>`: The Azure subscription ID for the Azure Quantum workspace.
                        - `{ParameterNameResourceGroupName}=<string>`: The Azure resource group name for the Azure Quantum workspace.
                        - `{ParameterNameWorkspaceName}=<string>`: The name of the Azure Quantum workspace.
                        
                        #### Optional parameters

                        - `{ParameterNameRefresh}`: Bypasses any saved or cached credentials when connecting to Azure.
                        - `{ParameterNameStorageAccountConnectionString}=<string>`: The connection string to the Azure storage
                        account. Required if the specified Azure Quantum workspace was not linked to a storage
                        account at workspace creation time.
                        - `{ParameterNameLocation}=<string>`: The Azure region where the Azure Quantum workspace is provisioned.
                        This may be specified as a region name such as `""East US""` or a location name such as `""eastus""`.
                        If no valid value is specified, defaults to `""westus""`.
                        
                        #### Possible errors

                        - {AzureClientError.WorkspaceNotFound.ToMarkdown()}
                        - {AzureClientError.AuthenticationFailed.ToMarkdown()}
                    ".Dedent(),
            Examples    = new[]
            {
                $@"
                            Connect to an Azure Quantum workspace using its resource ID:
                            ```
                            In []: %azure.connect ""/subscriptions/.../Microsoft.Quantum/Workspaces/WORKSPACE_NAME""
                            Out[]: Connected to Azure Quantum workspace WORKSPACE_NAME in location westus.
                                    <list of Q# execution targets available in the Azure Quantum workspace>
                            ```
                        ".Dedent(),

                $@"
                            Connect to an Azure Quantum workspace using its resource ID, a storage account connection string, and a location:
                            ```
                            In []: %azure.connect {ParameterNameResourceId}=""/subscriptions/.../Microsoft.Quantum/Workspaces/WORKSPACE_NAME""
                                                  {ParameterNameStorageAccountConnectionString}=""STORAGE_ACCOUNT_CONNECTION_STRING""
                                                  {ParameterNameLocation}=""East US""
                            Out[]: Connected to Azure Quantum workspace WORKSPACE_NAME in location eastus.
                                    <list of Q# execution targets available in the Azure Quantum workspace>
                            ```
                        ".Dedent(),

                $@"
                            Connect to an Azure Quantum workspace using individual subscription ID, resource group name, and workspace name parameters:
                            ```
                            In []: %azure.connect {ParameterNameSubscriptionId}=""SUBSCRIPTION_ID""
                                                  {ParameterNameResourceGroupName}=""RESOURCE_GROUP_NAME""
                                                  {ParameterNameWorkspaceName}=""WORKSPACE_NAME""
                                                  {ParameterNameStorageAccountConnectionString}=""STORAGE_ACCOUNT_CONNECTION_STRING""
                            Out[]: Connected to Azure Quantum workspace WORKSPACE_NAME in location westus.
                                    <list of Q# execution targets available in the Azure Quantum workspace>
                            ```
                        ".Dedent(),

                $@"
                            Connect to an Azure Quantum workspace and force a credential prompt using
                            the `{ParameterNameRefresh}` option:
                            ```
                            In []: %azure.connect {ParameterNameRefresh} ""/subscriptions/.../Microsoft.Quantum/Workspaces/WORKSPACE_NAME""
                            Out[]: To sign in, use a web browser to open the page https://microsoft.com/devicelogin
                                    and enter the code [login code] to authenticate.
                                    Connected to Azure Quantum workspace WORKSPACE_NAME in location westus.
                                    <list of Q# execution targets available in the Azure Quantum workspace>
                            ```
                        ".Dedent(),

                @"
                            Print information about the currently-connected Azure Quantum workspace:
                            ```
                            In []: %azure.connect
                            Out[]: Connected to Azure Quantum workspace WORKSPACE_NAME in location westus.
                                    <list of Q# execution targets available in the Azure Quantum workspace>
                            ```
                        ".Dedent(),
            },
        },
                logger)
        {
        }
 public BeersViewModel()
 {
     checkInStore = ServiceLocator.Instance.Resolve<ICheckInStore>();
     azure = ServiceLocator.Instance.Resolve<IAzureClient>();
 }
Exemple #34
0
 public BarcodeService()
 {
     azure = ServiceLocator.Instance.Resolve <IAzureClient>();
 }