public string GetSampleEntityPayload(object entity, IEnumerable<string> projectedProperties)
        {
            var message = new SimpleResponseMessage(this.StatusCode, this.ContentType);
            using (var writer = new ODataMessageWriter(message, Settings))
            {
                WriteEntry(writer.CreateODataEntryWriter(), entity, projectedProperties);
            }

            return message.GetMessageString();
        }
        public string GetSamplePropertyPayload(string propertyName, object propertyValue)
        {
            var message = new SimpleResponseMessage(this.StatusCode, this.ContentType);
            using (var writer = new ODataMessageWriter(message, Settings))
            {
                WriteProperty(writer, propertyName, propertyValue);
            }

            return message.GetMessageString();
        }
        public string GetSampleEntityPayload(object entity, IEnumerable <string> projectedProperties)
        {
            var message = new SimpleResponseMessage(this.StatusCode, this.ContentType);

            using (var writer = new ODataMessageWriter(message, Settings))
            {
                WriteEntry(writer.CreateODataEntryWriter(), entity, projectedProperties);
            }

            return(message.GetMessageString());
        }
        public string GetSamplePropertyPayload(string propertyName, object propertyValue)
        {
            var message = new SimpleResponseMessage(this.StatusCode, this.ContentType);

            using (var writer = new ODataMessageWriter(message, Settings))
            {
                WriteProperty(writer, propertyName, propertyValue);
            }

            return(message.GetMessageString());
        }
        public string GetSampleFeedPayload(IEnumerable entities, IEnumerable<string> projectedProperties)
        {
            var message = new SimpleResponseMessage(this.StatusCode, this.ContentType);
            using (var writer = new ODataMessageWriter(message, Settings))
            {
                var feedWriter = writer.CreateODataFeedWriter();
                feedWriter.WriteStart(new ODataFeed() { Id = new Uri("http://temp.org/feed"), SerializationInfo = MySerializationInfo });
                foreach (var entity in entities)
                {
                    WriteEntry(feedWriter, entity, projectedProperties);
                }

                feedWriter.WriteEnd();
            }

            return message.GetMessageString();
        }
        public string GetSampleFeedPayload(IEnumerable entities, IEnumerable <string> projectedProperties)
        {
            var message = new SimpleResponseMessage(this.StatusCode, this.ContentType);

            using (var writer = new ODataMessageWriter(message, Settings))
            {
                var feedWriter = writer.CreateODataFeedWriter();
                feedWriter.WriteStart(new ODataFeed()
                {
                    Id = new Uri("http://temp.org/feed"), SerializationInfo = MySerializationInfo
                });
                foreach (var entity in entities)
                {
                    WriteEntry(feedWriter, entity, projectedProperties);
                }

                feedWriter.WriteEnd();
            }

            return(message.GetMessageString());
        }