コード例 #1
0
        /// <summary>
        /// Checks whether assets have been deployed and, if not, delpoys them.
        /// </summary>
        private void CheckAssetDeployment()
        {
            string          hostname   = _webHelperService.MachineName();
            AssetDeployment deployment = _assetService.ReadDeployment(_authenticationService.TenantId, hostname);

            if (deployment == null)
            {
                _assetService.Deploy(_authenticationService.TenantId);
                _assetService.RegisterDeployment(_authenticationService.TenantId, hostname);
            }
        }
コード例 #2
0
 /// <summary>
 /// Constructs an attribute that identifies a class as a module
 /// </summary>
 /// <param name="moduleName">The name of the module. Must be unique accross the
 /// whole website</param>
 /// <param name="assetDeployment">Defines how this module is deployed</param>
 public IsModuleAttribute(string moduleName, AssetDeployment assetDeployment)
 {
     Name            = moduleName;
     AssetDeployment = assetDeployment;
 }
コード例 #3
0
 IRegionDefinition IRegionDefinition.AssetDeployment(AssetDeployment assetDeployment)
 {
     _region.AssetDeployment = assetDeployment;
     return(this);
 }
コード例 #4
0
 public IModuleDefinition AssetDeployment(AssetDeployment assetDeployment)
 {
     _module.AssetDeployment = assetDeployment;
     return(this);
 }
コード例 #5
0
 /// <summary>
 /// Constructs and initializes an attribute that defines how to deploy the
 /// assets that are generated by this element
 /// </summary>
 /// <param name="deployment">The deployment scheme for this element</param>
 /// <param name="moduleName">The name of the module that defines the deploymet scheme</param>
 public DeployedAsAttribute(AssetDeployment deployment, string moduleName)
 {
     Deployment = deployment;
     ModuleName = moduleName;
 }
コード例 #6
0
 /// <summary>
 /// Constructs and initializes an attribute that defines how to deploy the
 /// assets that are generated by this element
 /// </summary>
 /// <param name="deployment">The deployment scheme for this element</param>
 public DeployedAsAttribute(AssetDeployment deployment)
 {
     Deployment = deployment;
 }
コード例 #7
0
 public IServiceDefinition AssetDeployment(AssetDeployment assetDeployment)
 {
     throw new NotImplementedException();
 }
コード例 #8
0
 IPageDefinition IPageDefinition.AssetDeployment(AssetDeployment assetDeployment)
 {
     _page.AssetDeployment = assetDeployment;
     return(this);
 }
コード例 #9
0
 ILayoutDefinition ILayoutDefinition.AssetDeployment(AssetDeployment assetDeployment)
 {
     _layout.AssetDeployment = assetDeployment;
     return(this);
 }
コード例 #10
0
        public static async Task <AssetService> DeployContractAndGetServiceAsync(Nethereum.Web3.Web3 web3, AssetDeployment assetDeployment, CancellationTokenSource cancellationTokenSource = null)
        {
            var receipt = await DeployContractAndWaitForReceiptAsync(web3, assetDeployment, cancellationTokenSource);

            return(new AssetService(web3, receipt.ContractAddress));
        }
コード例 #11
0
 public static Task <string> DeployContractAsync(Nethereum.Web3.Web3 web3, AssetDeployment assetDeployment)
 {
     return(web3.Eth.GetContractDeploymentHandler <AssetDeployment>().SendRequestAsync(assetDeployment));
 }
コード例 #12
0
 public static Task <TransactionReceipt> DeployContractAndWaitForReceiptAsync(Nethereum.Web3.Web3 web3, AssetDeployment assetDeployment, CancellationTokenSource cancellationTokenSource = null)
 {
     return(web3.Eth.GetContractDeploymentHandler <AssetDeployment>().SendRequestAndWaitForReceiptAsync(assetDeployment, cancellationTokenSource));
 }