Catel.Fody.CatelPropertyWeaver.GetChangeNotificationHandlerConstructorName C# (CSharp) Метод

GetChangeNotificationHandlerConstructorName() приватный Метод

private GetChangeNotificationHandlerConstructorName ( Mono.Cecil.PropertyDefinition property ) : string
property Mono.Cecil.PropertyDefinition
Результат string
        private string GetChangeNotificationHandlerConstructorName(PropertyDefinition property)
        {
            string key = $"{property.DeclaringType.FullName}|{property.Name}";
            if (_cachedFieldInitializerNames.ContainsKey(key))
            {
                return _cachedFieldInitializerNames[key];
            }

            int counter = 0; // start at 0
            while (true)
            {
                string methodName = $"<.cctor>b__{counter}";
                if (GetMethodReference(property.DeclaringType, methodName, false) == null)
                {
                    _cachedFieldInitializerNames[key] = methodName;
                    return methodName;
                }

                counter++;
            }
        }