Get() public static method

public static Get ( string name ) : Color?
name string
return Color?
Ejemplo n.º 1
0
        public IconId GetImageId(IDeclaredElement declaredElement, PsiLanguageType languageType, out bool canApplyExtensions)
        {
            canApplyExtensions = false;

            var typeMember = declaredElement as ITypeMember;

            if (typeMember == null)
            {
                return(null);
            }

            if (!UnityColorTypes.IsColorProperty(typeMember))
            {
                return(null);
            }

            var color = UnityNamedColors.Get(typeMember.ShortName);

            if (color == null)
            {
                return(null);
            }

            return(new ColorIconId(color.Value));
        }
Ejemplo n.º 2
0
        public static bool IsColorProperty(ITypeMember typeMember)
        {
            if (typeMember is IProperty && typeMember.IsStatic)
            {
                var unityColorTypes = GetInstance(typeMember.Module);
                return(unityColorTypes.IsUnityColorTypeSupportingProperties(typeMember.GetContainingType()) &&
                       UnityNamedColors.Get(typeMember.ShortName).HasValue);
            }

            return(false);
        }