示例#1
0
 public RootModel(PublishFileHolder publishFile, ProjectFileHolder projectFile, SecretFileHolder rootSecretFile,
                  SecretFileHolder deploymentSecretFile)
 {
     PublishFile          = publishFile;
     ProjectFile          = projectFile;
     RootSecretFile       = rootSecretFile;
     DeploymentSecretFile = deploymentSecretFile;
 }
示例#2
0
        public async Task <RootModel> Create(IFile pubXmlFile)
        {
            var projectFile       = FindProjectFile(pubXmlFile);
            var projectFileHolder = new ProjectFileHolder(projectFile, await LoadXmlFile(projectFile));

            var secretFile = await FindSecretFile(projectFileHolder.UserSecretId, pubXmlFile.Directory);

            var publishFileHolder = new PublishFileHolder(pubXmlFile, await LoadXmlFile(pubXmlFile));
            var pubSecretFile     = await FindSecretFile(publishFileHolder.UserSecretId, pubXmlFile.Directory);

            return(new RootModel(
                       publishFileHolder,
                       projectFileHolder,
                       await ParseSecretFile(secretFile),
                       new SecretFileHolder(pubSecretFile, await JsonDocument.ParseAsync(await pubSecretFile.OpenRead()))));
        }