public ServiceOperations(IList<Type> dtoTypes)
 {
     AllOperations = new Operations(dtoTypes);
     ReplyOperations = AllOperations.ReplyOperations;
     OneWayOperations = AllOperations.OneWayOperations;
     LoadOperationTypes(dtoTypes);
 }
        public void Sorts_operations_into_correct_operation_groups()
        {
            var groupedOperations = new Operations(base.AllOperations);

            Assert.That(groupedOperations.ReplyOperations.Names.Count, Is.EqualTo(base.ReplyOperations.Count));
            Assert.That(groupedOperations.OneWayOperations.Names.Count, Is.EqualTo(base.OneWayOperations.Count));
        }
        public Operations(IList<Type> types)
        {
            Types = types;
            var typeNames = types.Select(x => x.Name);
            Names = new List<string>();

            OneWayOperations = new Operations();
            ReplyOperations = new Operations();

            foreach (var type in types)
            {
                if (type.Name.EndsWith(ResponseSuffix)) continue;

                Names.Add(type.Name);

                var hasResponse = typeNames.Contains(type.Name + ResponseSuffix);
                if (hasResponse)
                {
                    ReplyOperations.Add(type);
                }
                else
                {
                    OneWayOperations.Add(type);
                }
            }
            Names.Sort();
        }
        protected override void RenderOperations(HtmlTextWriter writer, IHttpRequest httpReq, Operations allOperations)
        {
            var defaultPage = new OperationsControl {
                Title = EndpointHost.Config.ServiceName,
                OperationNames = allOperations.Names,
                MetadataOperationPageBodyHtml = EndpointHost.Config.MetadataOperationPageBodyHtml,
            };

            defaultPage.RenderControl(writer);
        }
        protected override void RenderOperations(HtmlTextWriter writer, Operations allOperations)
        {
            var defaultPage = new OperationsControl {
                Title = EndpointHost.Config.ServiceName,
                OperationNames = allOperations.Names,
                UsageExamplesBaseUri = EndpointHost.Config.UsageExamplesBaseUri,
            };

            defaultPage.RenderControl(writer);
        }
        protected override void RenderOperations(HtmlTextWriter writer, Operations allOperations)
        {
            var defaultPage = new IndexOperationsControl {
                MetadataConfig = EndpointHost.Config.ServiceEndpointsMetadataConfig,
                Title = EndpointHost.Config.ServiceName,
                Xsds = XsdTypes.Xsds,
                OperationNames = allOperations.Names,
                UsageExamplesBaseUri = EndpointHost.Config.UsageExamplesBaseUri,
            };

            defaultPage.RenderControl(writer);
        }
        protected override void RenderOperations(HtmlTextWriter writer, IHttpRequest httpReq, Operations allOperations)
        {
            var defaultPage = new IndexOperationsControl {
                HttpRequest = httpReq,
                MetadataConfig = EndpointHost.Config.ServiceEndpointsMetadataConfig,
                Title = EndpointHost.Config.ServiceName,
                Xsds = XsdTypes.Xsds,
                XsdServiceTypesIndex = 1,
                OperationNames = allOperations.Names,
                MetadataPageBodyHtml = EndpointHost.Config.MetadataPageBodyHtml,
            };

            defaultPage.RenderControl(writer);
        }
 protected abstract void RenderOperations(HtmlTextWriter writer, Operations allOperations);
 protected abstract void RenderOperations(HtmlTextWriter writer, IHttpRequest httpReq, Operations allOperations);
Esempio n. 10
0
 protected abstract void RenderOperations(HtmlTextWriter writer, IHttpRequest httpReq, Operations allOperations);
        protected override void RenderOperations(HtmlTextWriter writer, IHttpRequest httpReq, Operations allOperations)
        {
            var defaultPage = new OperationsControl
            {
                Title                = EndpointHost.Config.ServiceName,
                OperationNames       = allOperations.Names,
                UsageExamplesBaseUri = EndpointHost.Config.UsageExamplesBaseUri,
            };

            defaultPage.RenderControl(writer);
        }
Esempio n. 12
0
        protected override void RenderOperations(HtmlTextWriter writer, IHttpRequest httpReq, Operations allOperations)
        {
            var defaultPage = new OperationsControl
            {
                Title          = EndpointHost.Config.ServiceName,
                OperationNames = allOperations.Names,
                MetadataOperationPageBodyHtml = EndpointHost.Config.MetadataOperationPageBodyHtml,
            };

            defaultPage.RenderControl(writer);
        }