public void setup() { config = new ServiceConfiguration(); }
/// <summary> /// Writes the configureation data stored in the wizard to a .cscsfg file (an xml file). /// </summary> public void WriteConfigurationFile() { ServiceConfiguration config = new ServiceConfiguration(InstanceCount,AppStorageAccountConnectionString, GetSTSThumbPrint(ChosenSID,ChosenCertificate),GetManagementThumbPrint(ChosenSID,ChosenCertificate),AppUrl,true, AppUrl.Split('.')[0], ChosenSID); XmlSerializerNamespaces nameSpaces = new XmlSerializerNamespaces(); nameSpaces.Add("", "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"); XmlSerializer serializer = new XmlSerializer(config.GetType()); MemoryStream xmlFile = new MemoryStream(); serializer.Serialize(xmlFile, config, nameSpaces); FileWriter writer = makeWriter(); // make desktop name creation into a function as it it used a lot writer.Write(makeDesktopFileName(AppUrl.Split('.')[0] + "Production.cscfg"), xmlFile.ToArray()); }