IMemberSerializer Content(IAlteration <object> alteration, IMember profile, IMemberAccess access) { var body = _content.Get(profile); var start = new Identity <object>(profile).Adapt(); var writer = Wrap(alteration, access, new Enclosure(start, body)); var result = new MemberSerializer(profile, access, body, writer); return(result); }
public ContentModel.ISerializer Get(IMember parameter) { var serializer = _contents.Get(parameter); var result = _registrations.IsSatisfiedBy(parameter.Metadata) ? new Serializer(_registrations.Get(parameter.Metadata), serializer) : serializer; return(result); }
IMemberSerializer Content(IMember profile, IMemberAccess access) { var identity = new Identity <object>(profile); var composite = IsMember(profile) ? (IWriter <object>) new MemberPropertyWriter(identity) : identity; var start = composite.Adapt(); var body = _content.Get(profile); var writer = new MemberWriter(access, new Enclosure(start, body)); var result = new MemberSerializer(profile, access, body, writer); return(result); }
IMemberSerializer Content(IMember profile, IMemberAccess access) { var identity = new Identity <object>(profile); var composite = CollectionItemTypeLocator.Default.Get(profile.MemberType) ?.Name == profile.Name ? (IWriter <object>) new MemberPropertyWriter(identity) : identity; var start = composite.Adapt(); var body = _content.Get(profile); var writer = new MemberWriter(access, new Enclosure(start, body)); var result = new MemberSerializer(profile, access, body, writer); return(result); }