protected void RegisterPropertyDependency(string propertyName, string dependencyPropertyName) { if (_propertyDependencyMap == null) { _propertyDependencyMap = new DependencyMap(); } _propertyDependencyMap.RegisterPropertyDependency(propertyName, dependencyPropertyName); }
public static void FillDependencyMap(Type type, DependencyMap map) { type.AssertNotNull(nameof(type)); map.AssertNotNull(nameof(map)); foreach (var propertyInfo in type.GetProperties()) { var att = GetAttribute(propertyInfo); if (att != null && att.Dependencies != null) { foreach (var dependencyName in att.Dependencies) { map.RegisterPropertyDependency(propertyInfo.Name, dependencyName); } } } }