private Uri ByMemberType(Func <INakedObjectMemberSurface, string, Uri> getUri)
        {
            if (action != null)
            {
                return(getUri(action, SegmentValues.Actions));
            }

            if (assoc != null && assoc.IsCollection())
            {
                return(getUri(assoc, SegmentValues.Collections));
            }

            return(getUri(assoc, SegmentValues.Properties));
        }
 public UriMtHelper(HttpRequestMessage req, INakedObjectAssociationSurface assoc)
     : this(req) {
     cachedId = "";
     if (assoc.IsCollection())
     {
         cachedType = assoc.IsASet() ? PredefinedType.Set.ToRoString() : PredefinedType.List.ToRoString();
     }
     else
     {
         cachedType = assoc.Specification.DomainTypeName();
     }
 }
Example #3
0
 public UriMtHelper(HttpRequestMessage req, INakedObjectAssociationSurface assoc)
     : this(req) {
     cachedId = "";
     if (assoc.IsCollection()) {
         cachedType = assoc.IsASet() ? PredefinedType.Set.ToRoString() : PredefinedType.List.ToRoString();
     }
     else {
         cachedType = assoc.Specification.DomainTypeName();
     }
 }