Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="3.1.2" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="3.1.24" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<Import Project="..\DirectSend.Shared\DirectSend.Shared.projitems" Label="Shared" />
<ItemGroup>
<PackageReference Include="MailKit" Version="2.9.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.15.0" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.8" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118"/>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<ItemGroup>
<PackageReference Include="MailKit" Version="2.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Moq" Version="4.14.6" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.15.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.8" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.13.1" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="3.1.5" />
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.2.7" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Polly" Version="7.2.0" />
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.3.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="Polly.Extensions.Http" Version="3.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void WriteCustomEvent(string eventName, IDictionary<string, string> prope
/// <param name="expressionOfParameters">comma separated expressions of parameters Ex: () => ParameterVariable.</param>
public void WriteException(Exception exception, IDictionary<string, string> properties = null, IDictionary<string, double> metrics = null, string eventCode = null, params Expression<Func<object>>[] expressionOfParameters)
{
var methodParameters = this.GetParameters(expressionOfParameters);
var methodParameters = GetParameters(expressionOfParameters);
if (methodParameters != null && methodParameters.Count > 0)
{
if (properties == null)
Expand Down Expand Up @@ -366,7 +366,7 @@ private static IDictionary<string, string> UpdateEventCode(IDictionary<string, s
/// </summary>
/// <param name="expressionOfParameters">comma separated expressions of parameters Ex: () => ParameterVariable.</param>
/// <returns>dictionary of properties.</returns>
private Dictionary<string, string> GetParameters(params Expression<Func<object>>[] expressionOfParameters)
private static Dictionary<string, string> GetParameters(params Expression<Func<object>>[] expressionOfParameters)
{
var result = new Dictionary<string, string>();
MemberExpression memberExpression;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Core" Version="1.6.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.14.0" />
<PackageReference Include="Azure.Core" Version="1.28.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="4.4.0" />
<PackageReference Include="Microsoft.Azure.KeyVault.Cryptography" Version="3.0.5" />
<PackageReference Include="Microsoft.Azure.KeyVault.WebKey" Version="3.0.5" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.8" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.6.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.13.1" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.15.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.15.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.32.0" />
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
<PackageReference Include="Microsoft.Azure.Storage.Queue" Version="11.1.3" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PackageReference Include="Microsoft.Azure.Storage.Queue" Version="11.2.3" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ public async Task<EmailNotificationItemEntity> GetEmailNotificationItemEntity(st
throw new System.ArgumentNullException(nameof(notificationReportRequest));
}

Expression<Func<EmailNotificationItemCosmosDbEntity, bool>> filterExpression = this.GetMailFilterExpression(notificationReportRequest);
Expression<Func<EmailNotificationItemCosmosDbEntity, EmailNotificationItemCosmosDbEntity>> projectionExpression = this.GetEmailProjectionExpression();
Expression<Func<EmailNotificationItemCosmosDbEntity, DateTime>> orderExpression = this.GetEmailOrderExpression();
Expression<Func<EmailNotificationItemCosmosDbEntity, bool>> filterExpression = GetMailFilterExpression(notificationReportRequest);
Expression<Func<EmailNotificationItemCosmosDbEntity, EmailNotificationItemCosmosDbEntity>> projectionExpression = GetEmailProjectionExpression();
Expression<Func<EmailNotificationItemCosmosDbEntity, DateTime>> orderExpression = GetEmailOrderExpression();

int skip = notificationReportRequest.Skip;
int take = notificationReportRequest.Take > 0 ? notificationReportRequest.Take : 100;
Expand Down Expand Up @@ -293,8 +293,8 @@ public async Task<IList<EmailNotificationItemEntity>> GetPendingOrFailedEmailNot
filterExpression = filterExpression.And(notification => stringList.Contains(notification.Status));
}

Expression<Func<EmailNotificationItemCosmosDbEntity, EmailNotificationItemCosmosDbEntity>> projectionExpression = this.GetEmailProjectionExpression();
Expression<Func<EmailNotificationItemCosmosDbEntity, DateTime>> orderExpression = this.GetEmailOrderExpression();
Expression<Func<EmailNotificationItemCosmosDbEntity, EmailNotificationItemCosmosDbEntity>> projectionExpression = GetEmailProjectionExpression();
Expression<Func<EmailNotificationItemCosmosDbEntity, DateTime>> orderExpression = GetEmailOrderExpression();
if (projectionExpression == null)
{
throw new ArgumentNullException($"Select Expression Cannot be null");
Expand Down Expand Up @@ -331,7 +331,7 @@ public async Task<IList<EmailNotificationItemEntity>> GetPendingOrFailedEmailNot
return updatedNotificationEntities;
}

private Expression<Func<EmailNotificationItemCosmosDbEntity, bool>> GetMailFilterExpression(NotificationReportRequest notificationReportRequest)
private static Expression<Func<EmailNotificationItemCosmosDbEntity, bool>> GetMailFilterExpression(NotificationReportRequest notificationReportRequest)
{

Expression<Func<EmailNotificationItemCosmosDbEntity, bool>> filterExpression = notification => true;
Expand Down Expand Up @@ -401,13 +401,13 @@ private Expression<Func<EmailNotificationItemCosmosDbEntity, bool>> GetMailFilte
return filterExpression;
}

private Expression<Func<EmailNotificationItemCosmosDbEntity, DateTime>> GetEmailOrderExpression()
private static Expression<Func<EmailNotificationItemCosmosDbEntity, DateTime>> GetEmailOrderExpression()
{
Expression<Func<EmailNotificationItemCosmosDbEntity, DateTime>> orderBy = notification => notification.SendOnUtcDate;
return orderBy;
}

private Expression<Func<EmailNotificationItemCosmosDbEntity, EmailNotificationItemCosmosDbEntity>> GetEmailProjectionExpression()
private static Expression<Func<EmailNotificationItemCosmosDbEntity, EmailNotificationItemCosmosDbEntity>> GetEmailProjectionExpression()
{
Expression<Func<EmailNotificationItemCosmosDbEntity, EmailNotificationItemCosmosDbEntity>> selectExpression = n => new EmailNotificationItemCosmosDbEntity
{
Expand Down Expand Up @@ -571,9 +571,9 @@ public Task UpdateMeetingNotificationItemEntities(IList<MeetingNotificationItemE
{
throw new System.ArgumentNullException(nameof(meetingInviteReportRequest));
}
Expression<Func<MeetingNotificationItemCosmosDbEntity, bool>> filterExpression = this.GetMeetingFilterExpression(meetingInviteReportRequest);
Expression<Func<MeetingNotificationItemCosmosDbEntity, MeetingNotificationItemCosmosDbEntity>> projectionExpression = this.GetMeetingProjectionExpression();
Expression<Func<MeetingNotificationItemCosmosDbEntity, DateTime>> orderExpression = this.GetMeetingOrderExpression();
Expression<Func<MeetingNotificationItemCosmosDbEntity, bool>> filterExpression = GetMeetingFilterExpression(meetingInviteReportRequest);
Expression<Func<MeetingNotificationItemCosmosDbEntity, MeetingNotificationItemCosmosDbEntity>> projectionExpression = GetMeetingProjectionExpression();
Expression<Func<MeetingNotificationItemCosmosDbEntity, DateTime>> orderExpression = GetMeetingOrderExpression();
int skip = meetingInviteReportRequest.Skip;
int take = meetingInviteReportRequest.Take > 0 ? meetingInviteReportRequest.Take : 100;
if (filterExpression == null)
Expand Down Expand Up @@ -640,8 +640,8 @@ public async Task<IList<MeetingNotificationItemEntity>> GetPendingOrFailedMeetin
filterExpression = filterExpression.And(notification => stringList.Contains(notification.Status));
}

Expression<Func<MeetingNotificationItemCosmosDbEntity, MeetingNotificationItemCosmosDbEntity>> projectionExpression = this.GetMeetingProjectionExpression();
Expression<Func<MeetingNotificationItemCosmosDbEntity, DateTime>> orderExpression = this.GetMeetingOrderExpression();
Expression<Func<MeetingNotificationItemCosmosDbEntity, MeetingNotificationItemCosmosDbEntity>> projectionExpression = GetMeetingProjectionExpression();
Expression<Func<MeetingNotificationItemCosmosDbEntity, DateTime>> orderExpression = GetMeetingOrderExpression();
if (projectionExpression == null)
{
throw new ArgumentNullException($"Select Expression Cannot be null");
Expand Down Expand Up @@ -678,7 +678,7 @@ public async Task<IList<MeetingNotificationItemEntity>> GetPendingOrFailedMeetin
return updatedNotificationEntities;
}

private Expression<Func<MeetingNotificationItemCosmosDbEntity, MeetingNotificationItemCosmosDbEntity>> GetMeetingProjectionExpression()
private static Expression<Func<MeetingNotificationItemCosmosDbEntity, MeetingNotificationItemCosmosDbEntity>> GetMeetingProjectionExpression()
{
Expression<Func<MeetingNotificationItemCosmosDbEntity, MeetingNotificationItemCosmosDbEntity>> selectExpression = n => new MeetingNotificationItemCosmosDbEntity
{
Expand Down Expand Up @@ -727,13 +727,13 @@ private Expression<Func<MeetingNotificationItemCosmosDbEntity, MeetingNotificati
return selectExpression;
}

private Expression<Func<MeetingNotificationItemCosmosDbEntity, DateTime>> GetMeetingOrderExpression()
private static Expression<Func<MeetingNotificationItemCosmosDbEntity, DateTime>> GetMeetingOrderExpression()
{
Expression<Func<MeetingNotificationItemCosmosDbEntity, DateTime>> orderBy = notification => notification.SendOnUtcDate;
return orderBy;
}

private Expression<Func<MeetingNotificationItemCosmosDbEntity, bool>> GetMeetingFilterExpression(NotificationReportRequest notificationReportRequest)
private static Expression<Func<MeetingNotificationItemCosmosDbEntity, bool>> GetMeetingFilterExpression(NotificationReportRequest notificationReportRequest)
{

Expression<Func<MeetingNotificationItemCosmosDbEntity, bool>> filterExpression = notification => true;
Expand Down
Loading