Esempio n. 1
0
        private static ODataMessageWriterSettings CreateMessageWriterSettings(Uri serviceUri, DataServiceProviderWrapper provider, Version responseVersion, bool disableDisposeStream, ODataFormat format)
        {
            ODataMessageWriterSettings settings = new ODataMessageWriterSettings {
                BaseUri         = serviceUri,
                Version         = new ODataVersion?(CommonUtil.ConvertToODataVersion(responseVersion)),
                Indent          = false,
                CheckCharacters = false,
                DisableMessageStreamDisposal = disableDisposeStream
            };

            settings.EnableWcfDataServicesServerBehavior(provider.IsV1Provider);
            settings.SetContentType(format);
            return(settings);
        }