-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from microsoft/users/annautiy/PreDownloadV2
Added support for PreDownload
- Loading branch information
Showing
18 changed files
with
207 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 19 additions & 1 deletion
20
src/PackageUploader.Application/Config/UploadXvcPackageOperationConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using PackageUploader.ClientApi.Models; | ||
|
||
namespace PackageUploader.Application.Config; | ||
|
||
internal class UploadXvcPackageOperationConfig : UploadPackageOperationConfig | ||
internal class UploadXvcPackageOperationConfig : UploadPackageOperationConfig, IXvcGameConfiguration | ||
{ | ||
internal override string GetOperationName() => "UploadXvcPackage"; | ||
|
||
[Required] | ||
public GameAssets GameAssets { get; set; } | ||
|
||
public bool DeltaUpload { get; set; } = false; | ||
|
||
public GamePackageDate PreDownloadDate { get; set; } | ||
|
||
protected override void Validate(IList<ValidationResult> validationResults) | ||
{ | ||
base.Validate(validationResults); | ||
|
||
if (PreDownloadDate?.IsEnabled == true && (AvailabilityDate?.IsEnabled != true)) | ||
{ | ||
validationResults.Add(new ValidationResult($"{nameof(PreDownloadDate)} needs {nameof(AvailabilityDate)}.", new[] { nameof(PreDownloadDate), nameof(AvailabilityDate) })); | ||
} | ||
|
||
if (PreDownloadDate?.IsEnabled == true && AvailabilityDate?.IsEnabled == true && PreDownloadDate.EffectiveDate > AvailabilityDate.EffectiveDate) | ||
{ | ||
validationResults.Add(new ValidationResult($"{nameof(PreDownloadDate)} needs to be before {nameof(AvailabilityDate)}.", new[] { nameof(PreDownloadDate), nameof(AvailabilityDate) })); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/PackageUploader.ClientApi/Client/Ingestion/Models/GameMarketGroupPackageMetadata.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
|
||
namespace PackageUploader.ClientApi.Client.Ingestion.Models; | ||
|
||
public class GameMarketGroupPackageMetadata | ||
{ | ||
public DateTime? PreDownloadDate { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ploader.ClientApi/Client/Ingestion/Models/Internal/IngestionMarketGroupPackageMetadata.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
|
||
namespace PackageUploader.ClientApi.Client.Ingestion.Models.Internal; | ||
|
||
internal class IngestionMarketGroupPackageMetadata | ||
{ | ||
public DateTime? PreDownloadDate { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/PackageUploader.ClientApi/Models/IUwpGameConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using PackageUploader.ClientApi.Client.Ingestion.Models; | ||
|
||
namespace PackageUploader.ClientApi.Models; | ||
|
||
public interface IUwpGameConfiguration | ||
{ | ||
GamePackageDate AvailabilityDate { get; set; } | ||
GamePackageDate MandatoryDate { get; set; } | ||
GameGradualRolloutInfo GradualRollout { get; set; } | ||
} |
10 changes: 10 additions & 0 deletions
10
src/PackageUploader.ClientApi/Models/IXvcGameConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
namespace PackageUploader.ClientApi.Models; | ||
|
||
public interface IXvcGameConfiguration | ||
{ | ||
GamePackageDate AvailabilityDate { get; set; } | ||
GamePackageDate PreDownloadDate { get; set; } | ||
} |
Oops, something went wrong.