Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #25 from brminnick/Nullable-Uri-in-CloudAdvocatePo…
Browse files Browse the repository at this point in the history
…werBIModel

Nullable URI in CloudAdvocatePowerBIModel
  • Loading branch information
brminnick authored Jan 19, 2021
2 parents 58ac1d5 + 2f923b7 commit eaefd5a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion AzureAdvocates.Functions/AzureAdvocates.Functions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitHubApiStatus.Extensions" Version="2.0.0-pre9" />
<PackageReference Include="GitHubApiStatus.Extensions" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.11" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.10" />
<PackageReference Include="YamlDotNet" Version="9.1.0" />
<PackageReference Include="YamlDotNet" Version="9.1.4" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="3.1.10" />
<PackageReference Include="Refit.HttpClientFactory" Version="5.2.4" />
<PackageReference Include="GitHubApiStatus.Extensions" Version="2.0.0-pre9" />
<PackageReference Include="GitHubApiStatus.Extensions" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Constants\" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public async IAsyncEnumerable<CloudAdvocatePowerBIModel> RunHttpTrigger([HttpTri
if (advocate is null)
continue;

var gitHubUri = advocate.Connect.SingleOrDefault(x => x.Title.Contains("GitHub", StringComparison.OrdinalIgnoreCase))?.Url ?? throw new Exception($"Missing GitHub Uri for {advocate.Name}");
var twitterUri = advocate.Connect.SingleOrDefault(x => x.Title.Contains("Twitter", StringComparison.OrdinalIgnoreCase))?.Url ?? throw new Exception($"Missing Twitter Uri for {advocate.Name}");
var linkedInUri = advocate.Connect.SingleOrDefault(x => x.Title.Contains("LinkedIn", StringComparison.OrdinalIgnoreCase))?.Url ?? throw new Exception($"Missing LinkedIn Uri for {advocate.Name}");
var gitHubUri = advocate.Connect.SingleOrDefault(x => x.Title.Contains("GitHub", StringComparison.OrdinalIgnoreCase))?.Url;
var twitterUri = advocate.Connect.SingleOrDefault(x => x.Title.Contains("Twitter", StringComparison.OrdinalIgnoreCase))?.Url;
var linkedInUri = advocate.Connect.SingleOrDefault(x => x.Title.Contains("LinkedIn", StringComparison.OrdinalIgnoreCase))?.Url;

yield return new CloudAdvocatePowerBIModel(advocate.Name, advocate.Metadata.Alias, gitHubUri, twitterUri, linkedInUri);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.11" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.3" />
<PackageReference Include="Azure.Storage.Queues" Version="12.5.0" />
<PackageReference Include="Azure.Storage.Queues" Version="12.6.0" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GitHubReadmeWebTrends.Functions
{
public class CloudAdvocatePowerBIModel
{
public CloudAdvocatePowerBIModel(string name, string alias, Uri gitHub, Uri twitter, Uri linkedIn)
public CloudAdvocatePowerBIModel(string name, string alias, Uri? gitHub, Uri? twitter, Uri? linkedIn)
{
Name = name;
Alias = alias;
Expand All @@ -15,8 +15,8 @@ public CloudAdvocatePowerBIModel(string name, string alias, Uri gitHub, Uri twit

public string Name { get; }
public string Alias { get; }
public Uri GitHub { get; }
public Uri Twitter { get; }
public Uri LinkedIn { get; }
public Uri? GitHub { get; }
public Uri? Twitter { get; }
public Uri? LinkedIn { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.3.0" />
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="1.3.0" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.4.1" />
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="1.4.1" />
</ItemGroup>
</Project>

0 comments on commit eaefd5a

Please sign in to comment.