2 // Copyright (c) Microsoft Corporation. All rights reserved.
5 namespace System.Activities.Presentation
7 using System.Activities.Presentation.Validation;
8 using System.Collections.Generic;
11 internal abstract class ValidationErrorSourceLocatorFeature : Feature
13 protected abstract IValidationErrorSourceLocator ValidationErrorSourceLocator
18 public override void Initialize(EditingContext context, Type modelType)
20 Fx.Assert(context != null, "Context should not be null.");
21 Fx.Assert(modelType != null, "modelType should not be null.");
22 ValidationService validationService = context.Services.GetRequiredService<ValidationService>();
23 validationService.RegisterValidationErrorSourceLocator(modelType, this.ValidationErrorSourceLocator);