public System.Threading.Tasks.Task <GetVersionResponse> GetVersionAsync(skidata.com.tdi.common.v1.data.AuthenticationHeader AuthenticationHeader) { GetVersionRequest inValue = new GetVersionRequest(); inValue.AuthenticationHeader = AuthenticationHeader; return(((CarAccessTransactionEventInterface)(this)).GetVersionAsync(inValue)); }
public async stt::Task GetVersionRequestObjectAsync() { moq::Mock <Versions.VersionsClient> mockGrpcClient = new moq::Mock <Versions.VersionsClient>(moq::MockBehavior.Strict); GetVersionRequest request = new GetVersionRequest { VersionName = VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"), }; Version expectedResponse = new Version { VersionName = VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"), Description = "description2cf9da67", VersionNumber = -1567505473, CreateTime = new wkt::Timestamp(), Status = Version.Types.VersionStatus.Ready, }; mockGrpcClient.Setup(x => x.GetVersionAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <Version>(stt::Task.FromResult(expectedResponse), null, null, null, null)); VersionsClient client = new VersionsClientImpl(mockGrpcClient.Object, null); Version responseCallSettings = await client.GetVersionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); xunit::Assert.Same(expectedResponse, responseCallSettings); Version responseCancellationToken = await client.GetVersionAsync(request, st::CancellationToken.None); xunit::Assert.Same(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }
public async Task <GetVersionResponse> GetAll(GetVersionRequest request) { var versions = _unitOfWork.GetRepository <CS.EF.Models.Version>().GetAll(); if (!string.IsNullOrEmpty(request.ApplicationName)) { versions = versions.Where(x => x.ApplicationName.ToLower().Contains(request.ApplicationName.ToLower())); } var total = await versions.CountAsync(); var result = await versions.Skip(request.Skip).Take(request.Take).OrderByDescending(x => x.UpdatedDate).ToListAsync(); var versionViews = new List <VersionViewModel>(); foreach (var item in result) { var version = _mapper.Map <VersionViewModel>(item); version.Bundles = item.Bundles.Select(x => _mapper.Map <BundleViewModel>(x)); versionViews.Add(version); } return(new GetVersionResponse { Data = versionViews, Total = total }); }
public async Task ShouldSetStatusToPublishing() { var tester = await setup(); var hubApi = tester.Services.GetService <HubAppApi>(); var version = await hubApi.AppRegistration.NewVersion.Invoke(new NewVersionRequest { AppKey = HubInfo.AppKey, VersionType = AppVersionType.Values.Patch }); var adminUser = await tester.AdminUser(); var versionKey = AppVersionKey.Parse(version.VersionKey); var request = new GetVersionRequest { AppKey = HubInfo.AppKey, VersionKey = versionKey }; await tester.Execute(request, adminUser); version = await hubApi.AppRegistration.GetVersion.Invoke(new GetVersionRequest { AppKey = HubInfo.AppKey, VersionKey = versionKey }); Assert.That(version.Status, Is.EqualTo(AppVersionStatus.Values.Publishing)); }
public async stt::Task GetVersionRequestObjectAsync() { moq::Mock <Versions.VersionsClient> mockGrpcClient = new moq::Mock <Versions.VersionsClient>(moq::MockBehavior.Strict); mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object); GetVersionRequest request = new GetVersionRequest { VersionName = VersionName.FromProjectLocationAgentFlowVersion("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]"), }; Version expectedResponse = new Version { VersionName = VersionName.FromProjectLocationAgentFlowVersion("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]"), DisplayName = "display_name137f65c2", Description = "description2cf9da67", NluSettings = new NluSettings(), CreateTime = new wkt::Timestamp(), State = Version.Types.State.Succeeded, }; mockGrpcClient.Setup(x => x.GetVersionAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <Version>(stt::Task.FromResult(expectedResponse), null, null, null, null)); VersionsClient client = new VersionsClientImpl(mockGrpcClient.Object, null); Version responseCallSettings = await client.GetVersionAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); xunit::Assert.Same(expectedResponse, responseCallSettings); Version responseCancellationToken = await client.GetVersionAsync(request, st::CancellationToken.None); xunit::Assert.Same(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }
public void GetVersion() { moq::Mock <Versions.VersionsClient> mockGrpcClient = new moq::Mock <Versions.VersionsClient>(moq::MockBehavior.Strict); mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object); GetVersionRequest request = new GetVersionRequest { VersionName = VersionName.FromProjectLocationAgentFlowVersion("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]"), }; Version expectedResponse = new Version { VersionName = VersionName.FromProjectLocationAgentFlowVersion("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]"), DisplayName = "display_name137f65c2", Description = "description2cf9da67", NluSettings = new NluSettings(), CreateTime = new wkt::Timestamp(), State = Version.Types.State.Succeeded, }; mockGrpcClient.Setup(x => x.GetVersion(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); VersionsClient client = new VersionsClientImpl(mockGrpcClient.Object, null); Version response = client.GetVersion(request.Name); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public skidata.com.tdi.ca.v1.data.SystemVersion GetVersion(skidata.com.tdi.common.v1.data.AuthenticationHeader AuthenticationHeader) { GetVersionRequest inValue = new GetVersionRequest(); inValue.AuthenticationHeader = AuthenticationHeader; GetVersionResponse retVal = ((CarAccessTransactionEventInterface)(this)).GetVersion(inValue); return(retVal.SystemVersion); }
public GetVersionResponse Get(GetVersionRequest request = null) { return(new GetVersionResponse { Data = new VersionModel { Version = configuration.Version } }); }
public GetVersionResponse Get(GetVersionRequest request = null) { return new GetVersionResponse { Data = new VersionModel { Version = configuration.Version } }; }
/// <summary>Snippet for GetVersion</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetVersionRequestObject() { // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) GetVersionRequest request = new GetVersionRequest { Name = "", View = VersionView.Basic, }; // Make the request Version response = versionsClient.GetVersion(request); }
/// <summary> /// Gets the actual version of the server. /// </summary> public GetVersionResponse GetVersion2(GetVersionRequest request) { var response = new GetVersionResponse { Component = ProductInformation.Component, Edition = ProductInformation.Edition, VersionMajor = ProductInformation.Version.Major, VersionMinor = ProductInformation.Version.Minor, VersionBuild = ProductInformation.Version.Build, VersionRevision = ProductInformation.Version.Revision }; return response; }
/// <summary>Snippet for GetVersion</summary> public void GetVersionRequestObject() { // Snippet: GetVersion(GetVersionRequest, CallSettings) // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) GetVersionRequest request = new GetVersionRequest { VersionName = VersionName.FromProjectLocationAgentFlowVersion("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]"), }; // Make the request gcdcv::Version response = versionsClient.GetVersion(request); // End snippet }
/// <summary>Snippet for GetVersionAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task GetVersionRequestObjectAsync() { // Create client VersionsClient versionsClient = await VersionsClient.CreateAsync(); // Initialize request argument(s) GetVersionRequest request = new GetVersionRequest { Name = "", View = VersionView.Basic, }; // Make the request Version response = await versionsClient.GetVersionAsync(request); }
/// <summary> /// Legacy version service method, which now returns the compatibility version of the server. /// </summary> public GetVersionResponse GetVersion(GetVersionRequest request) { var version = LegacyServiceSettings.Default.GetCompatibilityVersion(); var response = new GetVersionResponse { Component = ProductInformation.Component, Edition = LegacyServiceSettings.Default.CompatibilityEdition, VersionMajor = version.Major, VersionMinor = version.Minor, VersionBuild = version.Build, VersionRevision = version.Revision }; return response; }
public GetVersionResponse GetVersion(GetVersionRequest request) { var response = new GetVersionResponse() { Component = ProductInformation.Component, Edition = ProductInformation.Edition, VersionMajor = ProductInformation.Version.Major, VersionMinor = ProductInformation.Version.Minor, VersionBuild = ProductInformation.Version.Build, VersionRevision = ProductInformation.Version.Revision }; return(response); }
/// <summary>Snippet for GetVersion</summary> public void GetVersionRequestObject() { // Snippet: GetVersion(GetVersionRequest, CallSettings) // Create client VersionsClient versionsClient = VersionsClient.Create(); // Initialize request argument(s) GetVersionRequest request = new GetVersionRequest { Name = "", View = VersionView.Basic, }; // Make the request gcav::Version response = versionsClient.GetVersion(request); // End snippet }
/// <summary> /// Legacy version service method, which now returns the compatibility version of the server. /// </summary> public GetVersionResponse GetVersion(GetVersionRequest request) { var version = LegacyServiceSettings.Default.GetCompatibilityVersion(); var response = new GetVersionResponse { Component = ProductInformation.Component, Edition = LegacyServiceSettings.Default.CompatibilityEdition, VersionMajor = version.Major, VersionMinor = version.Minor, VersionBuild = version.Build, VersionRevision = version.Revision }; return(response); }
/// <summary>Snippet for GetVersionAsync</summary> public async Task GetVersionRequestObjectAsync() { // Snippet: GetVersionAsync(GetVersionRequest, CallSettings) // Additional: GetVersionAsync(GetVersionRequest, CancellationToken) // Create client VersionsClient versionsClient = await VersionsClient.CreateAsync(); // Initialize request argument(s) GetVersionRequest request = new GetVersionRequest { VersionName = VersionName.FromProjectLocationAgentFlowVersion("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]"), }; // Make the request gcdcv::Version response = await versionsClient.GetVersionAsync(request); // End snippet }
/// <summary>Snippet for GetVersionAsync</summary> public async Task GetVersionRequestObjectAsync() { // Snippet: GetVersionAsync(GetVersionRequest, CallSettings) // Additional: GetVersionAsync(GetVersionRequest, CancellationToken) // Create client VersionsClient versionsClient = await VersionsClient.CreateAsync(); // Initialize request argument(s) GetVersionRequest request = new GetVersionRequest { Name = "", View = VersionView.Basic, }; // Make the request gcav::Version response = await versionsClient.GetVersionAsync(request); // End snippet }
public IObservable <Version> GetVersion() { return(Observable.Create <Version>(observer => { var request = new GetVersionRequest(); var getVersionResponse = _infoServiceClient.GetVersion(request); var infoResult = getVersionResponse.InfoResult; if (infoResult.Result == InfoResult.Types.Result.Success) { observer.OnNext(getVersionResponse.Version); } else { observer.OnError(new InfoException(infoResult.Result, infoResult.ResultStr)); } observer.OnCompleted(); return Task.FromResult(Disposable.Empty); })); }
public async Task <GetVersionAPIResult> GetVersion(int apiVersion, string appName, string appVersion) { var request = new GetVersionRequest() { ApiVersion = apiVersion, AppName = appName, Appversion = appVersion }; var result = await GetVersionAsync(request); var ret = new GetVersionAPIResult() { ApiVersion = result.ApiVersion, NodeVersion = result.NodeVersion, ResultCode = result.ResultCode, MustUpgradeToConnect = result.MustUpgradeToConnect, UpgradeNeeded = result.UpgradeNeeded }; return(ret); }
public async Task ShouldSetStatusToCurrent_WhenPublished() { var tester = await setup(); var hubApi = tester.Services.GetService <HubAppApi>(); var newVersion = await hubApi.AppRegistration.NewVersion.Invoke(new NewVersionRequest { AppKey = HubInfo.AppKey, VersionType = AppVersionType.Values.Patch }); var request = new GetVersionRequest { AppKey = HubInfo.AppKey, VersionKey = AppVersionKey.Parse(newVersion.VersionKey) }; var adminUser = await tester.AdminUser(); var version = await tester.Execute(request, adminUser); Assert.That(version.Status, Is.EqualTo(AppVersionStatus.Values.Current), "Should set status to current when published"); }
public int Run() { try { NetTcpBinding binding = new NetTcpBinding(SecurityMode.Transport); binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None; // see Enterprise.Common.ServiceConfiguration.Client.NetTcpConfiguration binding.MaxBufferSize = Int32.MaxValue; binding.MaxReceivedMessageSize = Int32.MaxValue; string uri = string.Format("net.tcp://{0}:{1}/ClearCanvas.Enterprise.Common.ServerVersion.IVersionService", Host, Port); EndpointAddress address = new EndpointAddress(new Uri(uri), EndpointIdentity.CreateDnsIdentity(ServiceIdentity)); VersionServiceClient client = new VersionServiceClient(binding, address); // don't authenticate server's certificate client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; client.ClientCredentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck; //ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(RemoteCertificateValidationCallback); GetVersionRequest request = new GetVersionRequest(); GetVersionResponse response = client.GetVersion(request); String version = String.Format("{0}.{1}.{2}.{3}", response.VersionMajor, response.VersionMinor, response.VersionBuild, response.VersionRevision); Console.WriteLine(version); return 0; // return 0 per requirement } catch (Exception ex) { Console.WriteLine("Error :{0}", ex.Message); return -1; // return -1 per requirement } }
public void GetVersion() { moq::Mock <Versions.VersionsClient> mockGrpcClient = new moq::Mock <Versions.VersionsClient>(moq::MockBehavior.Strict); GetVersionRequest request = new GetVersionRequest { VersionName = VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"), }; Version expectedResponse = new Version { VersionName = VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"), Description = "description2cf9da67", VersionNumber = -1567505473, CreateTime = new wkt::Timestamp(), Status = Version.Types.VersionStatus.Ready, }; mockGrpcClient.Setup(x => x.GetVersion(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); VersionsClient client = new VersionsClientImpl(mockGrpcClient.Object, null); Version response = client.GetVersion(request.Name); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public int Run() { try { NetTcpBinding binding = new NetTcpBinding(SecurityMode.Transport); binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None; // see Enterprise.Common.ServiceConfiguration.Client.NetTcpConfiguration binding.MaxBufferSize = Int32.MaxValue; binding.MaxReceivedMessageSize = Int32.MaxValue; string uri = string.Format("net.tcp://{0}:{1}/ClearCanvas.Enterprise.Common.ServerVersion.IVersionService", Host, Port); EndpointAddress address = new EndpointAddress(new Uri(uri), EndpointIdentity.CreateDnsIdentity(ServiceIdentity)); VersionServiceClient client = new VersionServiceClient(binding, address); // don't authenticate server's certificate client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; client.ClientCredentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck; //ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(RemoteCertificateValidationCallback); GetVersionRequest request = new GetVersionRequest(); GetVersionResponse response = client.GetVersion(request); String version = String.Format("{0}.{1}.{2}.{3}", response.VersionMajor, response.VersionMinor, response.VersionBuild, response.VersionRevision); Console.WriteLine(version); return(0); // return 0 per requirement } catch (Exception ex) { Console.WriteLine("Error :{0}", ex.Message); return(-1); // return -1 per requirement } }
public async Task <IActionResult> GetAll([FromQuery] GetVersionRequest request) { var response = await _versionService.GetAll(request); return(Ok(new ApiOkResponse(response))); }
/// <remarks/> public void getVersionAsync(GetVersionRequest getVersionRequest, object userState) { if ((this.getVersionOperationCompleted == null)) { this.getVersionOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetVersionOperationCompleted); } this.InvokeAsync("getVersion", new object[] { getVersionRequest}, this.getVersionOperationCompleted, userState); }
/// <remarks/> public void getVersionAsync(GetVersionRequest getVersionRequest) { this.getVersionAsync(getVersionRequest, null); }
GetVersionResponse CarAccessTransactionEventInterface.GetVersion(GetVersionRequest request) { return(base.Channel.GetVersion(request)); }
public Task <ResultContainer <AppVersionModel> > GetVersion([FromBody] GetVersionRequest model) { return(api.Group("AppRegistration").Action <GetVersionRequest, AppVersionModel>("GetVersion").Execute(model)); }
/// <summary> /// 获取版本详情 /// </summary> /// <param name="request">请求参数信息</param> /// <returns>请求结果信息</returns> public GetVersionResponse GetVersion(GetVersionRequest request) { return(new GetVersionExecutor().Client(this).Execute <GetVersionResponse, GetVersionResult, GetVersionRequest>(request)); }
System.Threading.Tasks.Task <GetVersionResponse> CarAccessTransactionEventInterface.GetVersionAsync(GetVersionRequest request) { return(base.Channel.GetVersionAsync(request)); }
public void GetVersionRequestObject() { moq::Mock <Versions.VersionsClient> mockGrpcClient = new moq::Mock <Versions.VersionsClient>(moq::MockBehavior.Strict); mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock <lro::Operations.OperationsClient>().Object); GetVersionRequest request = new GetVersionRequest { Name = "name1c9368b0", View = VersionView.Full, }; Version expectedResponse = new Version { Name = "name1c9368b0", Id = "id74b70bb8", AutomaticScaling = new AutomaticScaling(), BasicScaling = new BasicScaling(), ManualScaling = new ManualScaling(), InboundServices = { InboundServiceType.InboundServiceXmppPresence, }, InstanceClass = "instance_classa6d8797a", Network = new Network(), Resources = new Resources(), Runtime = "runtime2519a6b4", Threadsafe = false, Vm = true, BetaSettings = { { "key8a0b6e3c", "value60c16320" }, }, Env = "env1d5a03ff", ServingStatus = ServingStatus.Serving, CreatedBy = "created_by206bd4da", CreateTime = new wkt::Timestamp(), DiskUsageBytes = 5116400935481479133L, RuntimeApiVersion = "runtime_api_version143ef8d8", RuntimeMainExecutablePath = "runtime_main_executable_path2a08cfa6", Handlers = { new UrlMap(), }, ErrorHandlers = { new ErrorHandler(), }, Libraries = { new Library(), }, ApiConfig = new ApiConfigHandler(), EnvVariables = { { "key8a0b6e3c", "value60c16320" }, }, DefaultExpiration = new wkt::Duration(), HealthCheck = new HealthCheck(), NobuildFilesRegex = "nobuild_files_regex78af70e8", Deployment = new Deployment(), VersionUrl = "version_url9e0b67c2", EndpointsApiService = new EndpointsApiService(), ReadinessCheck = new ReadinessCheck(), LivenessCheck = new LivenessCheck(), RuntimeChannel = "runtime_channel010a83ee", Zones = { "zones3641f926", }, VpcAccessConnector = new VpcAccessConnector(), Entrypoint = new Entrypoint(), }; mockGrpcClient.Setup(x => x.GetVersion(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); VersionsClient client = new VersionsClientImpl(mockGrpcClient.Object, null); Version response = client.GetVersion(request); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary> /// 获取版本详情 /// </summary> /// <param name="request">请求参数信息</param> /// <returns>请求结果信息</returns> public async Task <GetVersionResponse> GetVersion(GetVersionRequest request) { return(await new GetVersionExecutor().Client(this).Execute <GetVersionResponse, GetVersionResult, GetVersionRequest>(request).ConfigureAwait(false)); }