Пример #1
0
 // ----------------------------------------------------------------------------------------
 /// <!-- For -->
 /// <summary>
 ///
 /// </summary>
 /// <param name="profile"></param>
 /// <returns></returns>
 public IAmAnEndemeItem For(EndemeTermKey profile, bool rawSource)
 {
     if (Regex.IsMatch(profile.ToString(), "[*!]"))
     {
         return(RegField.Educe(profile, rawSource));
     }
     else
     {
         return(ListField.Educe(profile, rawSource));
     }
 }
Пример #2
0
 public EndemeValue GetValue(EndemeTermKey profile)
 {
     if (Regex.IsMatch(profile.ToString(), "[*!]"))
     {
         return(RegField.Educe(profile, true).Item);
     }
     else
     {
         return(ListField.Educe(profile, true).Item);
     }
 }
Пример #3
0
 public EndemeValue GetValue(string profile)
 {
     if (Regex.IsMatch(profile, "[*!]"))
     {
         return(RegField.Educe(profile).Item);
     }
     else
     {
         return(ListField.Educe(profile).Item);
     }
 }
Пример #4
0
 // ----------------------------------------------------------------------------------------
 /// <!-- For -->
 /// <summary>
 ///
 /// </summary>
 /// <param name="profile"></param>
 /// <returns></returns>
 public IEndemeItem For(string profile)
 {
     if (Regex.IsMatch(profile, "[*!]"))
     {
         return(RegField.Educe(profile));
     }
     else
     {
         return(ListField.Educe(profile));
     }
 }
Пример #5
0
 public void SetValue(EndemeTermKey profile, EndemeValue value, bool rawSource)
 {
     if (Regex.IsMatch(profile.ToString(), "[*!]"))
     {
         EndemeObject enObj = RegField.Educe(profile, rawSource);
         enObj.Item = value;
     }
     else
     {
         ListField.Educe(profile, rawSource).Item = value;
     }
 }
Пример #6
0
 public void SetValue(string profile, EndemeValue value)
 {
     if (Regex.IsMatch(profile, "[*!]"))
     {
         EndemeObject enObj = RegField.Educe(profile);
         enObj.Item = value;
     }
     else
     {
         ListField.Educe(profile).Item = value;
     }
 }
Пример #7
0
 public void Add(IAmAnEndemeItem item)
 {
     if (item == null)
     {
         return;
     }
     if (item.GetType() == typeof(EndemeItem))
     {
         ListField.Add((EndemeItem)item);
     }
     else
     {
         RegField.Add((EndemeObject)item);
     }
 }
Пример #8
0
        // ----------------------------------------------------------------------------------------
        /// <!-- GetMatchList -->
        /// <summary>
        ///      Orders the list by the sort profile
        /// </summary>
        /// <param name="sortProfile"></param>
        /// <returns></returns>
        public List <IAmAnEndemeItem> GetMatchList(string sortProfile, bool rawSource)
        {
            List <IAmAnEndemeItem> list = new List <IAmAnEndemeItem>();

            if (Regex.IsMatch(sortProfile, "[*!]"))
            {
                EndemeDefinition part = RegField.PartNotHaving(RegField.EnRef["DSVQAHMU"]);
                list = part.OrderBy(new EndemeProfile(sortProfile, RegField.EnRef)).ToList();
            }
            else
            {
                EndemeItem item = EndemeProfile.BuildSegment(sortProfile, ListField.EnRef, rawSource);
                list = ListField.OrderBy(item.ItemEndeme).ToList();
            }
            return(list);
        }
Пример #9
0
 internal void Add(EndemeProfile profile, EndemeValue value)
 {
     RegField.Add(new EndemeObject(value.Label, profile, value));
 }