Esempio n. 1
0
 /// <summary>
 /// Checks if the current chain is the child of another chain.
 /// For example, if chain1 were for "Parent.Child" and chain2 were for "Parent.Child.GrandChild" then
 /// chain2.IsChildChainOf(chain1) would be true.
 /// </summary>
 /// <param name="parentChain">The parent chain to compare</param>
 /// <returns>True if the current chain is the child of the other chain, otherwise false</returns>
 public bool IsChildChainOf(PropertyChain parentChain)
 {
     return ToString().StartsWith(parentChain.ToString());
 }
Esempio n. 2
0
 /// <summary>
 /// Builds a property path.
 /// </summary>
 public string BuildPropertyName(string propertyName)
 {
     var chain = new PropertyChain(this);
     chain.Add(propertyName);
     return chain.ToString();
 }