Beispiel #1
0
        public override ODataEntry CreateEntry(SelectExpandNode selectExpandNode, EntityInstanceContext entityInstanceContext)
        {
            Contract.Assume(entityInstanceContext != null);

            var entry   = base.CreateEntry(selectExpandNode, entityInstanceContext);
            var context = new ODataSerializationFeatureContext(entityInstanceContext.EntityType, entityInstanceContext.SerializerContext, ComplexTypeSerializer)
            {
                Instance = entityInstanceContext.TryGetEntityInstance(),
                EntityInstanceContext = entityInstanceContext,
                SelectExpandNode      = selectExpandNode
            };

            foreach (var feature in SerializationFeatures)
            {
                feature.Apply(entry, context);
            }

            return(entry);
        }