function()

in generators/CoreCLRStatelessService/index.js [152:195]


        function(err, data) {
          parser.parseString(data, function(err, result) {
            if (err) {
              return console.log(err);
            }
            result["ApplicationManifest"]["ServiceManifestImport"][
              result["ApplicationManifest"]["ServiceManifestImport"].length
            ] = {
              ServiceManifestRef: [
                {
                  $: {
                    ServiceManifestName: servicePackage,
                    ServiceManifestVersion: "1.0.0"
                  }
                }
              ]
            };
            result["ApplicationManifest"]["DefaultServices"][0]["Service"][
              result["ApplicationManifest"]["DefaultServices"][0][
                "Service"
              ].length
            ] = {
              $: { Name: serviceName },
              StatelessService: [
                {
                  $: { ServiceTypeName: serviceTypeName, InstanceCount: "1" },
                  SingletonPartition: [""]
                }
              ]
            };

            var builder = new xml2js.Builder();
            var xml = builder.buildObject(result);
            fs.writeFile(
              path.join(appPackage, appPackagePath, "ApplicationManifest.xml"),
              xml,
              function(err) {
                if (err) {
                  return console.log(err);
                }
              }
            );
          });
        }