internal static DotvvmPropertyGroup Register(DotvvmPropertyGroup group) { var key = @group.DeclaringType.Name + "." + @group.Name; if (descriptorDictionary.ContainsKey(key)) { throw new InvalidOperationException($"The property group {key} is already registered!"); } descriptorDictionary[key] = group; return(group); }
protected override IPropertyDescriptor FindGlobalPropertyOrGroup(string name) { // try to find property var property = DotvvmProperty.ResolveProperty(name, caseSensitive: false); if (property != null) { return(property); } // try to find property group return(DotvvmPropertyGroup.ResolvePropertyGroup(name, caseSensitive: false)); }
protected override void LoadPropertyGroups(List <PropertyGroupMatcher> result) { result.AddRange(DotvvmPropertyGroup.GetPropertyGroups(Type) .SelectMany(g => g.Prefixes.Select(p => new PropertyGroupMatcher(p, g)))); result.Sort((a, b) => b.Prefix.Length.CompareTo(a.Prefix.Length)); }