public void Initialize(string name, string storageaccountname, string storageaccountkey, AzureInstanceType instanceType, int count, IDeploymentTemplate template) { _template = template; _name = name; _storageAccountName = storageaccountname; _storageAccountKey = storageaccountkey; _deploymentBlobName = name + ".cspkg"; _instanceType = instanceType; _instanceCount = count; }
/************************************** Customize *************************************/ public void Customize(string deploymentName, string storageAccountname, string storageAccountKey, AzureInstanceType instanceType, int instanceCount) { checkPaths(); SetXmlAttribute(_serviceDefinitionFile, ServiceDefinitionNamespaceUri, VmSizeXmlPath, VmSizeXmlAttributeName, instanceType.Name); SetXmlAttribute(_serviceConfigurationFile, ServiceConfigurationNamespaceUri, InstanceCountXmlPath, InstanceCountXmlAttributeName, instanceCount.ToString()); SetXmlAttribute(_serviceConfigurationFile, ServiceConfigurationNamespaceUri, DeploymentNameXmlPath, DeploymnetNameXmlAttributeName, deploymentName); // storage acccount SetXmlAttribute(_serviceConfigurationFile, ServiceConfigurationNamespaceUri, StorageAccountNameXmlPath, StorageAccountNameXmlAttributeName, storageAccountname); SetXmlAttribute(_serviceConfigurationFile, ServiceConfigurationNamespaceUri, StorageAccountKeyXmlPath, StorageAccountKeyXmlAttributeName, storageAccountKey); }