protected override void RenderOperations(HtmlTextWriter writer, IHttpRequest httpReq, ServiceMetadata metadata)
		{
			var defaultPage = new OperationsControl {
				Title = EndpointHost.Config.ServiceName,
                OperationNames = metadata.GetOperationNamesForMetadata(httpReq, Format),
				MetadataOperationPageBodyHtml = EndpointHost.Config.MetadataOperationPageBodyHtml,
			};

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

			defaultPage.RenderControl(writer);
		}
Example #3
0
        public MetadataPagesConfig(
            ServiceMetadata metadata,
            ServiceEndpointsMetadataConfig metadataConfig,
            HashSet<string> ignoredFormats,
            List<string> contentTypeFormats)
        {
            this.ignoredFormats = ignoredFormats;
            this.metadata = metadata;

            metadataConfigMap = new Dictionary<string, MetadataConfig> {
                {"xml", metadataConfig.Xml},
                {"json", metadataConfig.Json},
                {"jsv", metadataConfig.Jsv},
#if !NETSTANDARD1_6
                {"soap11", metadataConfig.Soap11},
                {"soap12", metadataConfig.Soap12},
#endif
            };

            AvailableFormatConfigs = new List<MetadataConfig>();

            var config = GetMetadataConfig("xml");
            if (config != null) AvailableFormatConfigs.Add(config);
            config = GetMetadataConfig("json");
            if (config != null) AvailableFormatConfigs.Add(config);
            config = GetMetadataConfig("jsv");
            if (config != null) AvailableFormatConfigs.Add(config);

            foreach (var format in contentTypeFormats)
            {
                metadataConfigMap[format] = metadataConfig.Custom.Create(format);

                config = GetMetadataConfig(format);
                if (config != null) AvailableFormatConfigs.Add(config);
            }

            config = GetMetadataConfig("soap11");
            if (config != null) AvailableFormatConfigs.Add(config);
            config = GetMetadataConfig("soap12");
            if (config != null) AvailableFormatConfigs.Add(config);
        }
 public XsdMetadata(ServiceMetadata metadata, bool flash = false)
 {
     Metadata = metadata;
     Flash = flash;
 }
 public MetadataTypesGenerator(ServiceMetadata meta, MetadataTypesConfig config)
 {
     this.meta = meta;
     this.config = config;
 }
 public NativeTypesMetadata(ServiceMetadata meta, MetadataTypesConfig defaults)
 {
     this.meta = meta;
     this.defaults = defaults;
 }
Example #7
0
 public XsdMetadata(ServiceMetadata metadata, bool flash = false)
 {
     Metadata = metadata;
     Flash    = flash;
 }
Example #8
0
        protected void RenderOperations(HtmlTextWriter writer, IRequest httpReq, ServiceMetadata metadata)
        {
            var defaultPage = new IndexOperationsControl
            {
                HttpRequest = httpReq,
                MetadataConfig = HostContext.MetadataPagesConfig,
                Title = HostContext.ServiceName,
                Xsds = XsdTypes.Xsds,
                XsdServiceTypesIndex = 1,
                OperationNames = metadata.GetOperationNamesForMetadata(httpReq),
            };

            var metadataFeature = HostContext.GetPlugin<MetadataFeature>();
            if (metadataFeature != null && metadataFeature.IndexPageFilter != null)
            {
                metadataFeature.IndexPageFilter(defaultPage);
            }

            defaultPage.RenderControl(writer);
        }
        protected void RenderOperations(HtmlTextWriter writer, IRequest httpReq, ServiceMetadata metadata)
        {
            var defaultPage = new IndexOperationsControl
            {
                HttpRequest = httpReq,
                MetadataConfig = HostContext.MetadataPagesConfig,
                Title = HostContext.ServiceName,
                Xsds = XsdTypes.Xsds,
                XsdServiceTypesIndex = 1,
                OperationNames = metadata.GetOperationNamesForMetadata(httpReq),
            };

            defaultPage.RenderControl(writer);
        }
 protected abstract void RenderOperations(HtmlTextWriter writer, IHttpRequest httpReq, ServiceMetadata metadata);