Alba.Jaml.XamlGeneration.XamlGenerator.GetObjectImplicitKeyPropName C# (CSharp) Method

GetObjectImplicitKeyPropName() private static method

Get implicit key property name: TargetType for Style, DataType for DataTemplate etc.
private static GetObjectImplicitKeyPropName ( TokenTypeInfo objInfo ) : string
objInfo TokenTypeInfo
return string
        private static string GetObjectImplicitKeyPropName (TokenTypeInfo objInfo)
        {
            if (DictionaryKeyProps.ContainsKey(objInfo.Type))
                return DictionaryKeyProps[objInfo.Type];
            else {
                var attrDictKey = objInfo.Type.GetCustomAttributes<DictionaryKeyPropertyAttribute>().FirstOrDefault();
                if (attrDictKey != null)
                    return attrDictKey.Name;
            }
            return null;
        }