예제 #1
0
 public UriMtHelper(HttpRequestMessage req, PropertyTypeContextSurface propertyContext)
     : this(req) {
     assoc      = propertyContext.Property;
     spec       = propertyContext.OwningSpecification;
     cachedId   = "";
     cachedType = spec.DomainTypeName();
 }
예제 #2
0
 public UriMtHelper(HttpRequestMessage req, INakedObjectSurface nakedObject) : this(req) {
     this.nakedObject = nakedObject;
     spec = nakedObject.Specification;
     LinkObjectId oid = OidStrategyHolder.OidStrategy.GetOid(nakedObject);
     cachedId = oid.InstanceId;
     cachedType = oid.DomainType;
 }
예제 #3
0
 public UriMtHelper(HttpRequestMessage req, ActionTypeContextSurface actionTypeContext)
     : this(req) {
     action     = actionTypeContext.ActionContext.Action;
     spec       = actionTypeContext.OwningSpecification;
     cachedId   = "";
     cachedType = spec.DomainTypeName();
 }
예제 #4
0
 public UriMtHelper(HttpRequestMessage req, PropertyTypeContextSurface propertyContext)
     : this(req) {
     assoc = propertyContext.Property;
     spec = propertyContext.OwningSpecification;
     cachedId = "";
     cachedType = spec.DomainTypeName();
 }
예제 #5
0
 public UriMtHelper(HttpRequestMessage req, ActionTypeContextSurface actionTypeContext)
     : this(req) {
     action = actionTypeContext.ActionContext.Action;
     spec = actionTypeContext.OwningSpecification;
     cachedId = "";
     cachedType = spec.DomainTypeName();
 }
예제 #6
0
 public UriMtHelper(HttpRequestMessage req, INakedObjectSurface nakedObject) : this(req) {
     this.nakedObject = nakedObject;
     spec             = nakedObject.Specification;
     LinkObjectId oid = OidStrategyHolder.OidStrategy.GetOid(nakedObject);
     cachedId   = oid.InstanceId;
     cachedType = oid.DomainType;
 }
예제 #7
0
        public static Tuple <string, string> SpecToTypeAndFormatString(INakedObjectSpecificationSurface spec)
        {
            PredefinedType?pdt = SpecToPredefinedType(spec);

            if (pdt.HasValue)
            {
                switch (pdt.Value)
                {
                case PredefinedType.Number:
                    return(new Tuple <string, string>(pdt.Value.ToRoString(), PredefinedType.Decimal.ToRoString()));

                case PredefinedType.Integer:
                    return(new Tuple <string, string>(PredefinedType.Number.ToRoString(), pdt.Value.ToRoString()));

                case PredefinedType.Boolean:
                    return(new Tuple <string, string>(pdt.Value.ToRoString(), null));

                case PredefinedType.List:
                    return(new Tuple <string, string>(PredefinedType.List.ToRoString(), null));

                case PredefinedType.Set:
                    return(new Tuple <string, string>(PredefinedType.Set.ToRoString(), null));

                case PredefinedType.String:
                    return(new Tuple <string, string>(pdt.Value.ToRoString(), pdt.Value.ToRoString()));

                case PredefinedType.Void:
                    return(new Tuple <string, string>(null, null));

                default:
                    return(new Tuple <string, string>(PredefinedType.String.ToRoString(), pdt.Value.ToRoString()));
                }
            }
            return(new Tuple <string, string>(spec.DomainTypeName(), null));
        }
예제 #8
0
 private void SetScalars(INakedObjectSpecificationSurface spec) {
     Name = spec.FullName();
     DomainType = spec.DomainTypeName();
     FriendlyName = spec.SingularName();
     PluralName = spec.PluralName();
     Description = spec.Description();
     IsService = spec.IsService();
 }
예제 #9
0
 private ListRepresentation(INakedObjectSpecificationSurface[] specs, HttpRequestMessage req, RestControlFlags flags)
     : base(flags) {
     Value = specs.Select(s => CreateDomainLink(req, s)).ToArray();
     SelfRelType = new TypesRelType(RelValues.Self, new UriMtHelper(req));
     SetLinks(req);
     SetExtensions();
     SetHeader(true);
 }
예제 #10
0
 public UriMtHelper(HttpRequestMessage req, ActionContextSurface actionContext) : this(req) {
     action = actionContext.Action;
     nakedObject = actionContext.Target;
     spec = nakedObject.Specification;
     LinkObjectId oid = OidStrategyHolder.OidStrategy.GetOid(nakedObject);
     cachedId = oid.InstanceId;
     cachedType = oid.DomainType;
 }
예제 #11
0
        public void AddListRepresentationParameter(MediaTypeHeaderValue mediaType, RestControlFlags flags)
        {
            INakedObjectSpecificationSurface specToUse = param == null ? spec : param.Specification;
            string typeName       = specToUse == null ? typeof(object).FullName : specToUse.DomainTypeName();
            string parameterValue = GetParameterValue(flags, typeName);

            mediaType.Parameters.Add(new NameValueHeaderValue(RestControlFlags.ElementTypeReserved, string.Format("\"{0}\"", parameterValue)));
        }
예제 #12
0
 public UriMtHelper(HttpRequestMessage req, ParameterTypeContextSurface parameterTypeContext)
     : this(req) {
     action     = parameterTypeContext.Action;
     spec       = parameterTypeContext.OwningSpecification;
     param      = parameterTypeContext.Parameter;
     cachedId   = "";
     cachedType = spec.DomainTypeName();
 }
예제 #13
0
 public UriMtHelper(HttpRequestMessage req, ActionContextSurface actionContext) : this(req) {
     action      = actionContext.Action;
     nakedObject = actionContext.Target;
     spec        = nakedObject.Specification;
     LinkObjectId oid = OidStrategyHolder.OidStrategy.GetOid(nakedObject);
     cachedId   = oid.InstanceId;
     cachedType = oid.DomainType;
 }
예제 #14
0
        private void SetLinks(HttpRequestMessage req, INakedObjectSpecificationSurface spec) {
            var tempLinks = new List<LinkRepresentation>();

            if (Flags.FormalDomainModel) {
                tempLinks.Add(LinkRepresentation.Create(new DomainTypeRelType(RelValues.ElementType, new UriMtHelper(req, spec)), Flags));
            }

            Links = tempLinks.ToArray();
        }
예제 #15
0
 private void SetTypeActions(INakedObjectSpecificationSurface spec, HttpRequestMessage req) {
     TypeActions = new[] {
         LinkRepresentation.Create(new TypeActionRelType(new UriMtHelper(req, spec), WellKnownIds.IsSubtypeOf), Flags,
                                   new OptionalProperty(JsonPropertyNames.Id, WellKnownIds.IsSubtypeOf),
                                   new OptionalProperty(JsonPropertyNames.Arguments, MapRepresentation.Create(new OptionalProperty(JsonPropertyNames.SubType, MapRepresentation.Create(new OptionalProperty(JsonPropertyNames.Href, null, typeof (object))))))),
         LinkRepresentation.Create(new TypeActionRelType(new UriMtHelper(req, spec), WellKnownIds.IsSupertypeOf), Flags,
                                   new OptionalProperty(JsonPropertyNames.Id, WellKnownIds.IsSupertypeOf),
                                   new OptionalProperty(JsonPropertyNames.Arguments, MapRepresentation.Create(new OptionalProperty(JsonPropertyNames.SuperType, MapRepresentation.Create(new OptionalProperty(JsonPropertyNames.Href, null, typeof (object)))))))
     };
 }
예제 #16
0
 protected DomainTypeRepresentation(HttpRequestMessage req, INakedObjectSpecificationSurface spec, RestControlFlags flags) : base(flags) {
     var helper = new UriMtHelper(req, spec);
     SelfRelType = new DomainTypeRelType(RelValues.Self, helper);
     SetScalars(spec);
     SetLinks(helper);
     SetMembers(spec, req);
     SetTypeActions(spec, req);
     SetExtensions();
     SetHeader();
 }
예제 #17
0
 public static bool IsBlobOrClob(INakedObjectSpecificationSurface spec)
 {
     if (spec.IsParseable() || spec.IsCollection())
     {
         Type           underlyingType = spec.GetUnderlyingType();
         PredefinedType pdt            = TypeToPredefinedType(underlyingType);
         return(pdt == PredefinedType.Blob || pdt == PredefinedType.Clob);
     }
     return(false);
 }
        private void SetLinks(HttpRequestMessage req, INakedObjectSpecificationSurface spec)
        {
            var tempLinks = new List <LinkRepresentation>();

            if (Flags.FormalDomainModel)
            {
                tempLinks.Add(LinkRepresentation.Create(new DomainTypeRelType(RelValues.ElementType, new UriMtHelper(req, spec)), Flags));
            }

            Links = tempLinks.ToArray();
        }
예제 #19
0
 private string GetParameterValue(RestControlFlags flags, INakedObjectSpecificationSurface parameterValueSpec)
 {
     if (flags.SimpleDomainModel)
     {
         return(RestUtils.SpecToTypeAndFormatString(parameterValueSpec).Item1);
     }
     if (flags.FormalDomainModel)
     {
         return(BuildDomainTypeUri(RestUtils.SpecToPredefinedTypeString(parameterValueSpec)).ToString());
     }
     return(null);
 }
예제 #20
0
        public void AddActionResultRepresentationParameter(MediaTypeHeaderValue mediaType, RestControlFlags flags)
        {
            INakedObjectSpecificationSurface resultSpec = action.ReturnType;
            bool isCollection = resultSpec.IsCollection() && !resultSpec.IsParseable();
            INakedObjectSpecificationSurface parameterValueSpec = isCollection ? action.ElementType : resultSpec;
            string parameterValue = GetParameterValue(flags, parameterValueSpec);

            if (parameterValue != null)
            {
                string parameterType = isCollection ? RestControlFlags.ElementTypeReserved : RestControlFlags.DomainTypeReserved;
                mediaType.Parameters.Add(new NameValueHeaderValue(parameterType, string.Format("\"{0}\"", parameterValue)));
            }
        }
예제 #21
0
        public static PredefinedType?SpecToPredefinedType(INakedObjectSpecificationSurface spec)
        {
            if (spec.IsFileAttachment() || spec.IsImage())
            {
                return(PredefinedType.Blob);
            }

            if (spec.IsParseable() || spec.IsCollection() || spec.IsVoid())
            {
                Type underlyingType = spec.GetUnderlyingType();
                return(TypeToPredefinedType(underlyingType));
            }
            return(null);
        }
예제 #22
0
        protected static void AddStringProperties(INakedObjectSpecificationSurface spec, int?maxLength, string pattern, Dictionary <string, object> exts)
        {
            if (spec.IsParseable())
            {
                if (maxLength != null)
                {
                    exts.Add(JsonPropertyNames.MaxLength, maxLength);
                }

                if (!string.IsNullOrEmpty(pattern))
                {
                    exts.Add(JsonPropertyNames.Pattern, pattern);
                }

                if (spec.IsDateTime())
                {
                    exts.Add(JsonPropertyNames.Format, PredefinedType.Date_time.ToRoString());
                }
            }
        }
예제 #23
0
 public ChoiceContextSurface(string id, INakedObjectSpecificationSurface spec)
 {
     this.id   = id;
     this.spec = spec;
 }
예제 #24
0
 public string GetLinkDomainTypeBySpecification(INakedObjectSpecificationSurface spec)
 {
     return(GetCode(spec));
 }
예제 #25
0
 private string GetCode(INakedObjectSpecificationSurface spec)
 {
     return(GetCode(TypeUtils.GetType(spec.FullName())));
 }
예제 #26
0
 public UriMtHelper(HttpRequestMessage req, INakedObjectSpecificationSurface spec)
     : this(req) {
     this.spec = spec;
     cachedId = "";
     cachedType = RestUtils.SpecToPredefinedTypeString(spec);
 }
예제 #27
0
        public static MapRepresentation GetExtensions(string friendlyname,
                                                      string description,
                                                      string pluralName,
                                                      string domainType,
                                                      bool? isService,
                                                      bool? hasParams,
                                                      bool? optional,
                                                      int? maxLength,
                                                      string pattern,
                                                      int? memberOrder,
                                                      IDictionary<string, object> customExtensions,
                                                      INakedObjectSpecificationSurface returnType) {
            var exts = new Dictionary<string, object> {
                {JsonPropertyNames.FriendlyName, friendlyname},
                {JsonPropertyNames.Description, description}
            };

            if (pluralName != null) {
                exts.Add(JsonPropertyNames.PluralName, pluralName);
            }

            if (domainType != null) {
                exts.Add(JsonPropertyNames.DomainType, domainType);
            }

            if (hasParams != null) {
                exts.Add(JsonPropertyNames.HasParams, hasParams);
            }

            if (isService != null) {
                exts.Add(JsonPropertyNames.IsService, isService);
            }

            if (optional != null) {
                exts.Add(JsonPropertyNames.Optional, optional);
            }

            if (memberOrder != null) {
                exts.Add(JsonPropertyNames.MemberOrder, memberOrder);
            }

            if (returnType != null && !returnType.IsVoid()) {
                Tuple<string, string> jsonDataType = SpecToTypeAndFormatString(returnType);
                exts.Add(JsonPropertyNames.ReturnType, jsonDataType.Item1);

                // blob and clobs are arrays so do this check first so they are not caught be the collection test after. 
                if (jsonDataType.Item1 == PredefinedType.Number.ToRoString()) {
                    exts.Add(JsonPropertyNames.Format, jsonDataType.Item2);
                }
                else if (jsonDataType.Item1 == PredefinedType.String.ToRoString()) {
                    exts.Add(JsonPropertyNames.Format, jsonDataType.Item2);
                    exts.Add(JsonPropertyNames.MaxLength, maxLength ?? 0);
                    exts.Add(JsonPropertyNames.Pattern, pattern ?? "");
                }
                else if (returnType.IsCollection()) {
                    exts.Add(JsonPropertyNames.ElementType, SpecToTypeAndFormatString(returnType.ElementType).Item1);
                    exts.Add(JsonPropertyNames.PluralName, returnType.ElementType.PluralName());
                }
            }

            if (customExtensions != null) {
                foreach (var kvp in customExtensions) {
                    exts.Add(kvp.Key, kvp.Value);
                }
            }

            return CreateMap(exts);
        }
예제 #28
0
 public static bool IsBlobOrClob(INakedObjectSpecificationSurface spec) {
     if (spec.IsParseable() || spec.IsCollection()) {
         Type underlyingType = spec.GetUnderlyingType();
         PredefinedType pdt = TypeToPredefinedType(underlyingType);
         return pdt == PredefinedType.Blob || pdt == PredefinedType.Clob;
     }
     return false;
 }
예제 #29
0
 public static bool IsPredefined(INakedObjectSpecificationSurface spec) {
     PredefinedType? pdt = SpecToPredefinedType(spec);
     return pdt.HasValue;
 }
예제 #30
0
 internal static Representation Create(INakedObjectSpecificationSurface[] specs, HttpRequestMessage req, RestControlFlags flags) {
     // filter out System types
     specs = specs.Where(s => !s.FullName().StartsWith("System.") && !s.FullName().StartsWith("Microsoft.")).ToArray();
     // filter out predefined types
     specs = specs.Where(s => !RestUtils.IsPredefined(s)).ToArray();
     return new ListRepresentation(specs, req, flags);
 }
예제 #31
0
 public static bool IsFileAttachment(this INakedObjectSpecificationSurface nakedObjectSpecificationSurface)
 {
     return(nakedObjectSpecificationSurface.GetScalarProperty <bool>(ScalarProperty.IsFileAttachment));
 }
예제 #32
0
 public static string Description(this INakedObjectSpecificationSurface nakedObjectSpecificationSurface)
 {
     return(nakedObjectSpecificationSurface.GetScalarProperty <string>(ScalarProperty.Description));
 }
예제 #33
0
 public string GetLinkDomainTypeBySpecification(INakedObjectSpecificationSurface spec) {
     return GetCode(spec);
 }
예제 #34
0
        private void SetMembers(INakedObjectSpecificationSurface spec, HttpRequestMessage req) {
            INakedObjectAssociationSurface[] properties = spec.Properties.Where(p => !p.IsCollection()).ToArray();
            INakedObjectAssociationSurface[] collections = spec.Properties.Where(p => p.IsCollection()).ToArray();
            INakedObjectActionSurface[] actions = spec.GetActionLeafNodes();

            IEnumerable<LinkRepresentation> propertyMembers = properties.Select(p => LinkRepresentation.Create(new TypeMemberRelType(RelValues.Property, new UriMtHelper(req, new PropertyTypeContextSurface {Property = p, OwningSpecification = spec})), Flags));
            IEnumerable<LinkRepresentation> collectionMembers = collections.Select(c => LinkRepresentation.Create(new TypeMemberRelType(RelValues.Collection, new UriMtHelper(req, new PropertyTypeContextSurface {Property = c, OwningSpecification = spec})), Flags));
            IEnumerable<LinkRepresentation> actionMembers = actions.Select(a => LinkRepresentation.Create(new TypeMemberRelType(RelValues.Action, new UriMtHelper(req, new ActionTypeContextSurface {ActionContext = new ActionContextSurface {Action = a}, OwningSpecification = spec})), Flags));

            Members = propertyMembers.Union(collectionMembers).Union(actionMembers).ToArray();
        }
예제 #35
0
 public UriMtHelper(HttpRequestMessage req, ParameterTypeContextSurface parameterTypeContext)
     : this(req) {
     action = parameterTypeContext.Action;
     spec = parameterTypeContext.OwningSpecification;
     param = parameterTypeContext.Parameter;
     cachedId = "";
     cachedType = spec.DomainTypeName();
 }
예제 #36
0
 public static DomainTypeRepresentation Create(HttpRequestMessage req, INakedObjectSpecificationSurface spec, RestControlFlags flags) {
     return new DomainTypeRepresentation(req, spec, flags);
 }
예제 #37
0
        public static PredefinedType? SpecToPredefinedType(INakedObjectSpecificationSurface spec) {
            if (spec.IsFileAttachment() || spec.IsImage()) {
                return PredefinedType.Blob;
            }

            if (spec.IsParseable() || spec.IsCollection() || spec.IsVoid()) {
                Type underlyingType = spec.GetUnderlyingType();
                return TypeToPredefinedType(underlyingType);
            }
            return null;
        }
예제 #38
0
 public static string SpecToPredefinedTypeString(INakedObjectSpecificationSurface spec) {
     PredefinedType? pdt = SpecToPredefinedType(spec);
     return pdt.HasValue ? pdt.Value.ToRoString() : spec.DomainTypeName();
 }
예제 #39
0
 public ChoiceContextSurface(string id, INakedObjectSpecificationSurface spec) {
     this.id = id;
     this.spec = spec;
 }
예제 #40
0
        public static Tuple<string, string> SpecToTypeAndFormatString(INakedObjectSpecificationSurface spec) {
            PredefinedType? pdt = SpecToPredefinedType(spec);

            if (pdt.HasValue) {
                switch (pdt.Value) {
                    case PredefinedType.Number:
                        return new Tuple<string, string>(pdt.Value.ToRoString(), PredefinedType.Decimal.ToRoString());
                    case PredefinedType.Integer:
                        return new Tuple<string, string>(PredefinedType.Number.ToRoString(), pdt.Value.ToRoString());
                    case PredefinedType.Boolean:
                        return new Tuple<string, string>(pdt.Value.ToRoString(), null);
                    case PredefinedType.List:
                        return new Tuple<string, string>(PredefinedType.List.ToRoString(), null);
                    case PredefinedType.Set:
                        return new Tuple<string, string>(PredefinedType.Set.ToRoString(), null);
                    case PredefinedType.String:
                        return new Tuple<string, string>(pdt.Value.ToRoString(), pdt.Value.ToRoString());
                    case PredefinedType.Void:
                        return new Tuple<string, string>(null, null);
                    default:
                        return new Tuple<string, string>(PredefinedType.String.ToRoString(), pdt.Value.ToRoString());
                }
            }
            return new Tuple<string, string>(spec.DomainTypeName(), null);
        }
예제 #41
0
        public RestSnapshot(INakedObjectSpecificationSurface[] specs, HttpRequestMessage req, RestControlFlags flags)
            : this(req, true) {
            logger.DebugFormat("RestSnapshot:TypeList");


            populator = () => {
                representation = ListRepresentation.Create(specs, req, flags);
                SetHeaders();
            };
        }
예제 #42
0
 public static bool IsAttachment(INakedObjectSpecificationSurface spec) {
     return (spec.IsImage() || spec.IsFileAttachment());
 }
예제 #43
0
        public RestSnapshot(INakedObjectSpecificationSurface spec, HttpRequestMessage req, RestControlFlags flags)
            : this(req, true) {
            logger.DebugFormat("RestSnapshot:DomainType");


            populator = () => {
                representation = DomainTypeRepresentation.Create(req, spec, flags);
                SetHeaders();
            };
        }
예제 #44
0
 public static string PluralName(this INakedObjectSpecificationSurface nakedObjectSpecificationSurface)
 {
     return(nakedObjectSpecificationSurface.GetScalarProperty <string>(ScalarProperty.PluralName));
 }
예제 #45
0
 private string GetParameterValue(RestControlFlags flags, INakedObjectSpecificationSurface parameterValueSpec) {
     if (flags.SimpleDomainModel) {
         return RestUtils.SpecToTypeAndFormatString(parameterValueSpec).Item1;
     }
     if (flags.FormalDomainModel) {
         return BuildDomainTypeUri(RestUtils.SpecToPredefinedTypeString(parameterValueSpec)).ToString();
     }
     return null;
 }
예제 #46
0
 public static bool IsImage(this INakedObjectSpecificationSurface nakedObjectSpecificationSurface)
 {
     return(nakedObjectSpecificationSurface.GetScalarProperty <bool>(ScalarProperty.IsImage));
 }
예제 #47
0
 public static bool IsAttachment(INakedObjectSpecificationSurface spec)
 {
     return(spec.IsImage() || spec.IsFileAttachment());
 }
예제 #48
0
 public static IDictionary <string, object> ExtensionData(this INakedObjectSpecificationSurface nakedObjectSpecificationSurface)
 {
     return(nakedObjectSpecificationSurface.GetScalarProperty <IDictionary <string, object> >(ScalarProperty.ExtensionData));
 }
예제 #49
0
        public static MapRepresentation GetExtensions(string friendlyname,
                                                      string description,
                                                      string pluralName,
                                                      string domainType,
                                                      bool?isService,
                                                      bool?hasParams,
                                                      bool?optional,
                                                      int?maxLength,
                                                      string pattern,
                                                      int?memberOrder,
                                                      IDictionary <string, object> customExtensions,
                                                      INakedObjectSpecificationSurface returnType,
                                                      INakedObjectSpecificationSurface elementType)
        {
            var exts = new Dictionary <string, object> {
                { JsonPropertyNames.FriendlyName, friendlyname },
                { JsonPropertyNames.Description, description }
            };

            if (pluralName != null)
            {
                exts.Add(JsonPropertyNames.PluralName, pluralName);
            }

            if (domainType != null)
            {
                exts.Add(JsonPropertyNames.DomainType, domainType);
            }

            if (hasParams != null)
            {
                exts.Add(JsonPropertyNames.HasParams, hasParams);
            }

            if (isService != null)
            {
                exts.Add(JsonPropertyNames.IsService, isService);
            }

            if (optional != null)
            {
                exts.Add(JsonPropertyNames.Optional, optional);
            }

            if (memberOrder != null)
            {
                exts.Add(JsonPropertyNames.MemberOrder, memberOrder);
            }

            if (returnType != null && !returnType.IsVoid())
            {
                Tuple <string, string> jsonDataType = SpecToTypeAndFormatString(returnType);
                exts.Add(JsonPropertyNames.ReturnType, jsonDataType.Item1);

                // blob and clobs are arrays so do this check first so they are not caught be the collection test after.
                if (jsonDataType.Item1 == PredefinedType.Number.ToRoString())
                {
                    exts.Add(JsonPropertyNames.Format, jsonDataType.Item2);
                }
                else if (jsonDataType.Item1 == PredefinedType.String.ToRoString())
                {
                    exts.Add(JsonPropertyNames.Format, jsonDataType.Item2);
                    exts.Add(JsonPropertyNames.MaxLength, maxLength ?? 0);
                    exts.Add(JsonPropertyNames.Pattern, pattern ?? "");
                }
                else if (returnType.IsCollection())
                {
                    exts.Add(JsonPropertyNames.ElementType, SpecToTypeAndFormatString(elementType).Item1);
                    exts.Add(JsonPropertyNames.PluralName, elementType.PluralName());
                }
            }

            if (customExtensions != null)
            {
                foreach (var kvp in customExtensions)
                {
                    exts.Add(kvp.Key, kvp.Value);
                }
            }

            return(CreateMap(exts));
        }
 private LinkRepresentation CreateDomainLink(HttpRequestMessage req, INakedObjectSpecificationSurface spec)
 {
     return(LinkRepresentation.Create(new DomainTypeRelType(new UriMtHelper(req, spec)), Flags));
 }
예제 #51
0
 public bool IsOfType(INakedObjectSpecificationSurface otherSpec) {
     return spec.IsOfType(((NakedObjectSpecificationWrapper) otherSpec).spec);
 }
예제 #52
0
 private LinkRepresentation CreateDomainLink(HttpRequestMessage req, INakedObjectSpecificationSurface spec) {
     return LinkRepresentation.Create(new DomainTypeRelType(new UriMtHelper(req, spec)), Flags);
 }
예제 #53
0
 private static string GetCode(INakedObjectSpecificationSurface spec) {
     return GetCode(TypeUtils.GetType(spec.FullName()));
 }