/// <summary> /// Initializes a new instance of the PropertySegment class /// </summary> /// <param name="property">The property this segment corresponds to</param> internal PropertySegment(MemberProperty property) : base() { this.Property = property; if (property.PropertyType is ComplexDataType) { this.segmentType = ODataUriSegmentType.ComplexProperty; } else if (property.PropertyType is CollectionDataType) { this.segmentType = ODataUriSegmentType.MultiValueProperty; } else { this.segmentType = ODataUriSegmentType.PrimitiveProperty; } }
/// <summary> /// Initializes a new instance of the PropertySegment class /// </summary> /// <param name="property">The property this segment corresponds to</param> internal PropertySegment(MemberProperty property) : base() { this.Property = property; if (property.PropertyType is ComplexDataType) { this.segmentType = ODataUriSegmentType.ComplexProperty; } else if (property.PropertyType is CollectionDataType) { this.segmentType = ODataUriSegmentType.MultiValueProperty; } else { this.segmentType = ODataUriSegmentType.PrimitiveProperty; } }
/// <summary> /// Initializes a new instance of the SystemSegment class. /// Constructor is private to prevent duplicate instances. /// </summary> /// <param name="type">The type for the segment</param> /// <param name="endpoint">The endpoint for the segment</param> private SystemSegment(ODataUriSegmentType type, string endpoint) { this.segmentType = type; this.Endpoint = endpoint; }
/// <summary> /// Initializes a new instance of the SystemSegment class. /// Constructor is private to prevent duplicate instances. /// </summary> /// <param name="type">The type for the segment</param> /// <param name="endpoint">The endpoint for the segment</param> private SystemSegment(ODataUriSegmentType type, string endpoint) { this.segmentType = type; this.Endpoint = endpoint; }