Exemple #1
0
        ///// <summary>
        ///// Property Specific property.
        ///// <para>If this property is expected to contain inner(local) instance(s) of "Range" class.</para>
        ///// </summary>
        //public bool IsExpectedToContainLocalClass
        //{
        //    get
        //    {
        //        return isExpectedToContainLocalClass;
        //    }
        //    set
        //    {
        //        isExpectedToContainLocalClass = value;
        //    }
        //}



        #endregion get and set

        #region stereotype

        public void AddStereotype(string fullStereotypeString)
        {
            if (!string.IsNullOrEmpty(fullStereotypeString))
            {
                ProfileElementStereotype stereotype = Profile.FindOrCreateStereotypeForName(fullStereotypeString);

                if (stereotype != null)
                {
                    if (stereotypes == null)
                    {
                        stereotypes = new List <ProfileElementStereotype>();
                    }

                    if (!stereotypes.Contains(stereotype))
                    {
                        stereotypes.Add(stereotype);
                        stereotypes.Sort(CIMComparer.ProfileElementStereotypeComparer);
                    }

                    if (ProfileElementStereotype.StereotypeEnumeration.Equals(stereotype.Name))
                    {
                        isEnumeration = true;
                    }

                    if (ProfileElementStereotype.StereotypeAggregateOf.Equals(stereotype.Name))
                    {
                        isAggregate = true;
                    }
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Method checks whether or not given stereotype exist is inside of stereotypes list.
        /// </summary>
        /// <param fullName="stereotype">search for this stereotype</param>
        /// <returns><c>true</c> if stereotype was founded, <c>false</c> otherwise</returns>
        ///

        public bool HasStereotype(ProfileElementStereotype stereotype)
        {
            bool hasStereotype = false;

            if (stereotypes != null)
            {
                hasStereotype = stereotypes.Contains(stereotype);
            }
            return(hasStereotype);
        }