Skip to content

Commit 59f9306

Browse files
committed
fixed warnings
1 parent 852e76f commit 59f9306

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

examples/DancingGoat/Components/Sections/ZoneRestrictions.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
using System.Collections.Generic;
2-
using System.Linq;
3-
4-
using Kentico.PageBuilder.Web.Mvc;
1+

52

63
using DancingGoat.Widgets;
74

5+
using Kentico.Builder.Web.Mvc;
6+
7+
using WidgetDefinition = Kentico.PageBuilder.Web.Mvc.WidgetDefinition;
8+
89
namespace DancingGoat.Sections
910
{
1011
/// <summary>
@@ -51,11 +52,8 @@ public static IEnumerable<string> GetWideZoneRestrictions()
5152
}
5253

5354

54-
private static IEnumerable<string> GetWidgetsIdentifiers()
55-
{
56-
return new ComponentDefinitionProvider<WidgetDefinition>()
55+
private static IEnumerable<string> GetWidgetsIdentifiers() => new ComponentDefinitionProvider<WidgetDefinition>()
5756
.GetAll()
5857
.Select(definition => definition.Identifier);
59-
}
6058
}
6159
}

examples/DancingGoat/DataProtectionSamples/DancingGoatSamplesModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ internal void RegisterSamples()
107107
accountContactInfoProvider, accountInfoProvider, bizFormInfoProvider));
108108
PersonalDataCollectorRegister.Instance.Add(new SampleMemberDataCollector());
109109

110-
PersonalDataEraserRegister.Instance.Add(new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider));
110+
PersonalDataEraserRegister.Instance.Add(new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider, activityInfoProvider));
111111
PersonalDataEraserRegister.Instance.Add(new SampleMemberPersonalDataEraser(memberInfoProvider));
112112

113113
RegisterConsentRevokeHandler();
@@ -121,7 +121,7 @@ internal void DeleteContactActivities(ContactInfo contact)
121121
{ "deleteActivities", true }
122122
};
123123

124-
new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider)
124+
new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider, activityInfoProvider)
125125
.Erase(new[] { contact }, configuration);
126126
}
127127

examples/DancingGoat/DataProtectionSamples/PersonalDataErasers/SampleContactPersonalDataEraser.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ internal class SampleContactPersonalDataEraser : IPersonalDataEraser
3939
private readonly IInfoProvider<BizFormInfo> bizFormInfoProvider;
4040
private readonly IInfoProvider<AccountContactInfo> accountContactInfoProvider;
4141
private readonly IInfoProvider<ContactInfo> contactInfoProvider;
42+
private readonly IInfoProvider<ActivityInfo> activityInfoProvider;
4243

4344

4445
/// <summary>
@@ -48,16 +49,19 @@ internal class SampleContactPersonalDataEraser : IPersonalDataEraser
4849
/// <param name="bizFormInfoProvider">BizForm info provider.</param>
4950
/// <param name="accountContactInfoProvider">Account contact info provider.</param>
5051
/// <param name="contactInfoProvider">Contact info provider.</param>
52+
/// <param name="activityInfoProvider">Activity info provider.</param>
5153
public SampleContactPersonalDataEraser(
5254
IInfoProvider<ConsentAgreementInfo> consentAgreementInfoProvider,
5355
IInfoProvider<BizFormInfo> bizFormInfoProvider,
5456
IInfoProvider<AccountContactInfo> accountContactInfoProvider,
55-
IInfoProvider<ContactInfo> contactInfoProvider)
57+
IInfoProvider<ContactInfo> contactInfoProvider,
58+
IInfoProvider<ActivityInfo> activityInfoProvider)
5659
{
5760
this.consentAgreementInfoProvider = consentAgreementInfoProvider;
5861
this.bizFormInfoProvider = bizFormInfoProvider;
5962
this.accountContactInfoProvider = accountContactInfoProvider;
6063
this.contactInfoProvider = contactInfoProvider;
64+
this.activityInfoProvider = activityInfoProvider;
6165
}
6266

6367

@@ -119,7 +123,7 @@ private void DeleteSubmittedFormsActivities(ICollection<int> contactIds, IDictio
119123
if (configuration.TryGetValue("DeleteSubmittedFormsActivities", out object deleteSubmittedFormsActivities)
120124
&& ValidationHelper.GetBoolean(deleteSubmittedFormsActivities, false))
121125
{
122-
ActivityInfoProvider.ProviderObject.BulkDelete(new WhereCondition().WhereEquals("ActivityType", PredefinedActivityType.BIZFORM_SUBMIT)
126+
activityInfoProvider.BulkDelete(new WhereCondition().WhereEquals("ActivityType", PredefinedActivityType.BIZFORM_SUBMIT)
123127
.WhereIn("ActivityContactID", contactIds));
124128
}
125129
}
@@ -173,7 +177,7 @@ private void DeleteActivities(List<int> contactIds, IDictionary<string, object>
173177
if (configuration.TryGetValue("deleteActivities", out object deleteActivities)
174178
&& ValidationHelper.GetBoolean(deleteActivities, false))
175179
{
176-
ActivityInfoProvider.ProviderObject.BulkDelete(new WhereCondition().WhereIn("ActivityContactID", contactIds));
180+
activityInfoProvider.BulkDelete(new WhereCondition().WhereIn("ActivityContactID", contactIds));
177181
}
178182
}
179183

examples/DancingGoat/Helpers/AreaRestrictionHelper.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
using System.Collections.Generic;
33
using System.Linq;
44

5-
using Kentico.PageBuilder.Web.Mvc;
5+
using Kentico.Builder.Web.Mvc;
6+
7+
using WidgetDefinition = Kentico.PageBuilder.Web.Mvc.WidgetDefinition;
8+
69

710
namespace DancingGoat.Helpers
811
{
@@ -24,11 +27,8 @@ public static string[] GetLandingPageRestrictions()
2427
}
2528

2629

27-
private static IEnumerable<string> GetWidgetsIdentifiers()
28-
{
29-
return new ComponentDefinitionProvider<WidgetDefinition>()
30+
private static IEnumerable<string> GetWidgetsIdentifiers() => new ComponentDefinitionProvider<WidgetDefinition>()
3031
.GetAll()
3132
.Select(definition => definition.Identifier);
32-
}
3333
}
3434
}

0 commit comments

Comments
 (0)