Example #1
0
 /// <summary>
 /// Creates a structurally equivalent member path segment from a given segment.
 /// </summary>
 /// <param name="segment">The segment to copy the structure from.</param>
 /// <returns>A structurally equivalent copy of the given segment.</returns>
 public static IStonMemberPathSegment Copy(IStonMemberPathSegment segment)
 {
     if (segment == null)
     {
         throw new ArgumentNullException("segment");
     }
     return(new StonMemberPathSegment(segment));
 }
Example #2
0
 // writes a named member access path segment or an indexed member access path segment
 private void WritePathSegment(StonTokenWriter writer, IStonMemberPathSegment segment)
 {
     if (segment.BindingKey is IStonBindingName)
     {
         writer.Write('.');
     }
     WriteBindingKey(writer, segment.BindingKey);
 }
Example #3
0
 /// <summary>
 /// Creates a structurally equivalent member path segment from a given segment.
 /// </summary>
 /// <param name="segment">The segment to copy the structure from.</param>
 public StonMemberPathSegment(IStonMemberPathSegment segment)
     : this(segment.BindingKey)
 {
 }