コード例 #1
0
        public ProfileElement FindProfileElementByName(string name)
        {
            ProfileElement element = null;

            if (!string.IsNullOrEmpty(name) && (profileMap != null))
            {
                foreach (ProfileElementTypes type in profileMap.Keys)
                {
                    List <ProfileElement> list = profileMap[type];
                    foreach (ProfileElement elem in list)
                    {
                        if (name.Equals(elem.Name))
                        {
                            element = elem;
                            break;
                        }
                    }
                    if (element != null)
                    {
                        break;
                    }
                }
            }
            return(element);
        }
コード例 #2
0
        public ProfileElement FindProfileElementByShortUri(string shortUri)
        {
            ProfileElement element = null;

            if (!string.IsNullOrEmpty(shortUri) && (profileMap != null))
            {
                foreach (ProfileElementTypes type in profileMap.Keys)
                {
                    List <ProfileElement> list = profileMap[type];
                    foreach (ProfileElement elem in list)
                    {
                        if (shortUri.Equals(elem.UniqueName))
                        {
                            element = elem;
                            break;
                        }
                    }
                    if (element != null)
                    {
                        break;
                    }
                }
            }
            return(element);
        }
コード例 #3
0
        public override bool Equals(object obj)
        {
            bool eq = false;

            if (obj != null)
            {
                if (obj.GetType().Equals(this.GetType()))
                {
                    ProfileElement pelObj = (ProfileElement)obj;
                    if ((pelObj.URI != null) && (this.URI != null))
                    {
                        eq = this.URI.Equals(pelObj.URI);
                    }
                }
            }
            return(eq);
        }
コード例 #4
0
 /// <summary>
 /// Method resets the validation informations for this object.
 /// </summary>
 public void ClearValidationInformations()
 {
     isInstanceOfType   = null;
     validationStatus   = 0;
     validationMessages = null;
 }