Ejemplo n.º 1
0
//        public Object servers { get; set; } // currently noe supported

        public void Accept(string path, IReferenceCollector collector)
        {
            if (Parameters != null)
            {
                foreach (var parameter in Parameters)
                {
                    collector.Visit($"{path}/parameters/{parameter.GetName()}", parameter);
                    parameter.GetObject()?.Accept($"{path}/parameters/{parameter.GetName()}", collector);
                }
            }

            Get?.Accept($"{path}/get", collector);
            Put?.Accept($"{path}/put", collector);
            Post?.Accept($"{path}/post", collector);
            Delete?.Accept($"{path}/delete", collector);
            Options?.Accept($"{path}/options", collector);
            Head?.Accept($"{path}/head", collector);
            Patch?.Accept($"{path}/patch", collector);
            Trace?.Accept($"{path}/trace", collector);
        }