Exemplo n.º 1
0
 public EndemeValue GetValue(EndemeTermKey profile)
 {
     if (Regex.IsMatch(profile.ToString(), "[*!]"))
     {
         return(RegField.Educe(profile, true).Item);
     }
     else
     {
         return(ListField.Educe(profile, true).Item);
     }
 }
Exemplo n.º 2
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));
     }
 }
Exemplo n.º 3
0
        // ----------------------------------------------------------------------------------------
        /// <!-- Educe -->
        /// <summary>
        ///
        /// </summary>
        /// <param name="enTK"></param>
        /// <returns></returns>
        public EndemeItem Educe(EndemeTermKey enTK, bool rawSource)
        {
            EndemeItem item = this[enTK];

            if (item == null)
            {
                this.Add("", Endeme.Part(0, enTK), Endeme.Part(1, enTK), null, rawSource);
                item = this[enTK];
            }
            return(item);
        }
Exemplo n.º 4
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;
     }
 }
Exemplo n.º 5
0
        // ----------------------------------------------------------------------------------------
        /// <!-- Educe -->
        /// <summary>
        ///
        /// </summary>
        /// <param name="profile"></param>
        /// <returns></returns>
        public EndemeObject Educe(EndemeTermKey profile, bool rawSource)
        {
            EndemeProfile enProfile = new EndemeProfile(profile, _enRef);

            for (int i = 0; i < enProfile.Count; ++i)
            {
                _enRef.Educe(enProfile[i].ItemEndeme);
            }
            EndemeObject enObject = this[enProfile];

            if (enObject == null)
            {
                enObject = this.Add(enProfile, null, rawSource);
            }
            return(enObject);
        }
Exemplo n.º 6
0
 public EndemeItem this[EndemeTermKey enTerm]
 {
     get { EndemeItem item = GetExactField(enTerm); if (item == null)
           {
               item = SetFieldExactly(enTerm, new EndemeValue(null));
           }
           return(item); }
     set { EndemeItem item = GetExactField(enTerm); if (item == null)
           {
               item = SetFieldExactly(enTerm, value);
           }
           else
           {
               item.Item = value.Item;
           } }
 }
Exemplo n.º 7
0
 public EndemeProfile(EndemeTermKey profile, EndemeReference enRef)
 {
     Init(); FillSegments(profile, enRef, true); FillOperators(profile.ToString());
 }
Exemplo n.º 8
0
 // ----------------------------------------------------------------------------------------
 //  Accessors
 // ----------------------------------------------------------------------------------------
 public EndemeValue this[EndemeTermKey profile] {
     get { return(GetValue(profile)); } set { SetValue(profile, value, true); }
 }