Пример #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()));
 }