Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 1984dbf

Browse files
idwilliams-2joelst
authored andcommitted
Minor updates (#74)
* Addressed build warnings with the PowerShell project. * Addressing build warnings with the Partner Center project. * Performed minor code cleanup * Performed minor code cleanup and updated the documentation
1 parent 082de99 commit 1984dbf

73 files changed

Lines changed: 244 additions & 238 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/help/Connect-PartnerCenter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ The environment use for authentication.
136136
```yaml
137137
Type: EnvironmentName
138138
Parameter Sets: (All)
139-
Aliases:
139+
Aliases: EnvironmentName
140140
Accepted values: GlobalCloud, ChinaCloud, GermanCloud, USGovernment
141141

142142
Required: False

docs/help/Get-PartnerCustomerServiceCostsSummary.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
content_git_url: https://github.com/Microsoft/Partner-Center-PowerShell/blob/master/docs/help/Get-PartnerCustomerServiceCostsSummary.md
33
external help file: Microsoft.Store.PartnerCenter.PowerShell.dll-Help.xml
44
Module Name: PartnerCenter
5-
online version:
5+
online version: https://go.microsoft.com/fwlink/?linkid=2072712
66
original_content_git_url: https://github.com/Microsoft/Partner-Center-PowerShell/blob/master/docs/help/Get-PartnerCustomerServiceCostsSummary.md
77
schema: 2.0.0
88
---
@@ -14,7 +14,7 @@ Gets a customer's service costs for the specified billing period.
1414

1515
## SYNTAX
1616

17-
```
17+
```powershell
1818
Get-PartnerCustomerServiceCostsSummary -BillingPeriod <ServiceCostsBillingPeriod> -CustomerId <String>
1919
[<CommonParameters>]
2020
```
@@ -40,7 +40,7 @@ An indicator that represents the billing period.
4040
Type: ServiceCostsBillingPeriod
4141
Parameter Sets: (All)
4242
Aliases:
43-
Accepted values: Current, MostRecent
43+
Accepted values: MostRecent
4444

4545
Required: True
4646
Position: Named

src/PartnerCenter.TestFramework/PartnerCenter.TestFramework.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616
<NeutralLanguage>en-US</NeutralLanguage>
1717
</PropertyGroup>
1818

19+
<ItemGroup>
20+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.3">
21+
<PrivateAssets>all</PrivateAssets>
22+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
23+
</PackageReference>
24+
</ItemGroup>
25+
1926
<ItemGroup>
2027
<ProjectReference Include="..\PartnerCenter\PartnerCenter.csproj" />
2128
</ItemGroup>

src/PartnerCenter/Carts/CartOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal class CartOperations : BasePartnerComponent<Tuple<string, string>>, ICa
2121
/// <summary>
2222
/// Content used when checking out a cart.
2323
/// </summary>
24-
private const string Success = "success";
24+
private const string Success = "success";
2525

2626
/// <summary>
2727
/// Initializes a new instance of the <see cref="CartOperations" /> class.

src/PartnerCenter/IPartner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ namespace Microsoft.Store.PartnerCenter
99
using Agreements;
1010
using Analytics;
1111
using Auditing;
12-
using CountryValidationRules;
1312
using Customers;
1413
using Domains;
1514
using Enumerators;
1615
using Extensions;
1716
using GenericOperations;
17+
using Incidents;
1818
using Invoices;
1919
using Network;
2020
using Offers;
@@ -23,9 +23,9 @@ namespace Microsoft.Store.PartnerCenter
2323
using RateCards;
2424
using Relationships;
2525
using RequestContext;
26-
using ServiceIncidents;
2726
using ServiceRequests;
2827
using Usage;
28+
using ValidationRules;
2929
using Validations;
3030

3131
/// <summary>

src/PartnerCenter/ServiceIncidents/IServiceIncidentCollection.cs renamed to src/PartnerCenter/Incidents/IServiceIncidentCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
// </copyright>
55
// -----------------------------------------------------------------------
66

7-
namespace Microsoft.Store.PartnerCenter.ServiceIncidents
7+
namespace Microsoft.Store.PartnerCenter.Incidents
88
{
99
using System.Threading;
1010
using System.Threading.Tasks;
1111
using GenericOperations;
1212
using Models;
1313
using Models.Query;
14-
using Models.ServiceIncidents;
14+
using Models.Incidents;
1515

1616
/// <summary>
1717
/// Defines the operations available on service incidents.

src/PartnerCenter/ServiceIncidents/ServiceIncidentCollectionOperations.cs renamed to src/PartnerCenter/Incidents/ServiceIncidentCollectionOperations.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// </copyright>
55
// -----------------------------------------------------------------------
66

7-
namespace Microsoft.Store.PartnerCenter.ServiceIncidents
7+
namespace Microsoft.Store.PartnerCenter.Incidents
88
{
99
using System;
1010
using System.Collections.Generic;
@@ -13,7 +13,7 @@ namespace Microsoft.Store.PartnerCenter.ServiceIncidents
1313
using Models;
1414
using Models.JsonConverters;
1515
using Models.Query;
16-
using Models.ServiceIncidents;
16+
using Models.Incidents;
1717

1818
/// <summary>
1919
/// Service incident collection operations implementation class.

src/PartnerCenter/Models/Authentication/DeviceCodeResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// -----------------------------------------------------------------------
2-
// <copyright file="DeviceCodeResult.cs" company="Microsoft">
2+
// <copyright file="DeviceCodeResponse.cs" company="Microsoft">
33
// Copyright (c) Microsoft Corporation. All rights reserved.
44
// </copyright>
55
// -----------------------------------------------------------------------
@@ -62,7 +62,7 @@ internal sealed class DeviceCodeResponse
6262
/// Verification URL where the user must navigate to authenticate using the device code and credentials.
6363
/// </summary>
6464
[DataMember(IsRequired = false, Name = "verification_url")]
65-
public string VerificationUrl { get; internal set; }
65+
public Uri VerificationUrl { get; internal set; }
6666

6767
/// <summary>
6868
/// Get an instance of the <see cref="DeviceCodeResult" /> class based on this instnace of <see cref="DeviceCodeResponse" />.

src/PartnerCenter/Models/Authentication/DeviceCodeResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ internal DeviceCodeResult()
5858
/// <summary>
5959
/// Verification URL where the user must navigate to authenticate using the device code and credentials.
6060
/// </summary>
61-
public string VerificationUrl { get; internal set; }
61+
public Uri VerificationUrl { get; internal set; }
6262
}
6363
}

src/PartnerCenter/Models/Carts/CartLineItem.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ namespace Microsoft.Store.PartnerCenter.Models.Carts
1414
/// </summary>
1515
public sealed class CartLineItem
1616
{
17+
/// <summary>
18+
/// Initializes a new instance of the <see cref="CartLineItem" />
19+
/// </summary>
20+
public CartLineItem()
21+
{
22+
ProvisioningContext = new Dictionary<string, string>();
23+
}
24+
1725
/// <summary>
1826
/// Gets or sets a list of items that depend on this one, so they have to be purchased subsequently.
1927
/// </summary>
@@ -58,11 +66,11 @@ public sealed class CartLineItem
5866
/// Gets or sets a collection of participants on this purchase.
5967
/// </summary>
6068
public IEnumerable<KeyValuePair<ParticipantType, string>> Participants { get; set; }
61-
69+
6270
/// <summary>
63-
/// Gets or sets a context that will be used for provisioning of the catalog item.
71+
/// Gets a context that will be used for provisioning of the catalog item.
6472
/// </summary>
65-
public Dictionary<string, string> ProvisioningContext { get; set; }
73+
public Dictionary<string, string> ProvisioningContext { get; }
6674

6775
/// <summary>
6876
/// Gets or sets the product quantity.

0 commit comments

Comments
 (0)