Esempio n. 1
0
        new public void GetWithFilter(string project, string app, string resource, string format, int start, int limit, string indexStyle, Stream stream)
        {
            try
            {
                format = "jsonld";

                bool fullIndex = false;

                if (indexStyle != null && indexStyle.ToUpper() == "FULL")
                {
                    fullIndex = true;
                }

                if (IsAsync())
                {
                    DataFilter filter    = _abstractPrivder.FormatIncomingMessage <DataFilter>(stream, format, true);
                    string     statusUrl = _abstractPrivder.AsyncGetWithFilter(project, app, resource, format,
                                                                               start, limit, fullIndex, filter);
                    WebOperationContext.Current.OutgoingResponse.StatusCode          = HttpStatusCode.Accepted;
                    WebOperationContext.Current.OutgoingResponse.Headers["location"] = statusUrl;
                }
                else
                {
                    DataFilter filter    = _abstractPrivder.FormatIncomingMessage <DataFilter>(stream, format, true);
                    XDocument  xDocument = null;

                    xDocument = _abstractPrivder.GetWithFilter(project, app, resource, filter, ref format, start, limit, fullIndex);

                    _abstractPrivder.FormatOutgoingMessage(xDocument.Root, format);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }