/// <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)); }
// 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); }
/// <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) { }