mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-10 01:10:27 +00:00
Initial commit
This commit is contained in:
commit
c7bef8e11b
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
*.pyc
|
||||||
|
*.egg-info
|
||||||
|
build
|
||||||
|
dist
|
||||||
|
wheelhouse
|
4
MANIFEST.in
Normal file
4
MANIFEST.in
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
recursive-include readthedocs_ext *.css
|
||||||
|
recursive-include readthedocs_ext *.js_t
|
||||||
|
recursive-include readthedocs_ext *.js
|
||||||
|
include *.rst
|
23
README.rst
Normal file
23
README.rst
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Sphinx Auto API
|
||||||
|
===============
|
||||||
|
|
||||||
|
A tool that generates a full API ref (Javadoc style) for your project.
|
||||||
|
It requires no RST and is fully automated,
|
||||||
|
while being integrated into Sphinx.
|
||||||
|
|
||||||
|
The first implementation is for Microsoft .Net.
|
||||||
|
Other implementations are encouraged for your language.
|
||||||
|
|
||||||
|
Design
|
||||||
|
------
|
||||||
|
|
||||||
|
Read more about the deisgn in our Design doc.
|
||||||
|
|
||||||
|
Future
|
||||||
|
------
|
||||||
|
Our goal is to support the following soon:
|
||||||
|
|
||||||
|
* Javascript
|
||||||
|
* PHP
|
||||||
|
* Python
|
||||||
|
* Go
|
0
autoapi/__init__.py
Normal file
0
autoapi/__init__.py
Normal file
126
autoapi/extension.py
Normal file
126
autoapi/extension.py
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
Sphinx Auto-API
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import yaml
|
||||||
|
from collections import defaultdict
|
||||||
|
|
||||||
|
from docutils import nodes
|
||||||
|
from docutils import utils
|
||||||
|
|
||||||
|
from sphinx.util.osutil import ensuredir
|
||||||
|
|
||||||
|
from jinja2 import Environment, FileSystemLoader
|
||||||
|
from .utils import TEMPLATE_DIR
|
||||||
|
|
||||||
|
env = Environment(loader=FileSystemLoader(TEMPLATE_DIR))
|
||||||
|
|
||||||
|
|
||||||
|
class DotNetMember(object):
|
||||||
|
|
||||||
|
def __init__(self, obj):
|
||||||
|
self.obj = obj
|
||||||
|
|
||||||
|
def render(self):
|
||||||
|
print "Unknown Type: %s (%s)" % (self.obj['type'], self.obj['name'])
|
||||||
|
self.obj['underline'] = len(self.obj['qualifiedName']['CSharp']) * "#"
|
||||||
|
self.obj['lower'] = self.obj['type'].lower()
|
||||||
|
template = env.get_template('member.rst')
|
||||||
|
return template.render(**self.obj)
|
||||||
|
|
||||||
|
|
||||||
|
class DotNetClass(object):
|
||||||
|
|
||||||
|
def __init__(self, obj):
|
||||||
|
self.obj = obj
|
||||||
|
self.item_map = defaultdict(list)
|
||||||
|
self.sort()
|
||||||
|
|
||||||
|
def sort(self):
|
||||||
|
for item in self.obj['items']:
|
||||||
|
if 'type' not in item:
|
||||||
|
print "Missing Type: %s" % item
|
||||||
|
continue
|
||||||
|
self.item_map[item['type']].append(item)
|
||||||
|
|
||||||
|
def render(self):
|
||||||
|
print "Rendering class %s" % self.obj['name']
|
||||||
|
self.obj['underline'] = len(self.obj['qualifiedName']['CSharp']) * "#"
|
||||||
|
template = env.get_template('class.rst')
|
||||||
|
|
||||||
|
ctx = self.obj
|
||||||
|
ctx.update(dict(
|
||||||
|
ctors=self.item_map['Constructor'],
|
||||||
|
methods=self.item_map['Method'],
|
||||||
|
attributes=self.item_map['Property'],
|
||||||
|
))
|
||||||
|
return template.render(**ctx)
|
||||||
|
|
||||||
|
|
||||||
|
def parse(obj):
|
||||||
|
if 'type' not in obj:
|
||||||
|
return ''
|
||||||
|
|
||||||
|
if obj['type'] == 'Class':
|
||||||
|
return DotNetClass(obj).render()
|
||||||
|
if obj['type'] == 'Namespace':
|
||||||
|
return '' #for now
|
||||||
|
else:
|
||||||
|
return DotNetMember(obj).render()
|
||||||
|
|
||||||
|
|
||||||
|
def load_yaml(app):
|
||||||
|
if not app.config.autoapi_dir:
|
||||||
|
return
|
||||||
|
app.env.autoapi_data = []
|
||||||
|
if app.config.autoapi_type == 'yaml':
|
||||||
|
for _file in os.listdir(app.env.config.autoapi_dir):
|
||||||
|
print "Loading Yaml from %s" % _file
|
||||||
|
to_open = os.path.join(app.env.config.autoapi_dir, _file)
|
||||||
|
app.env.autoapi_data.append(yaml.safe_load(open(to_open, 'r')))
|
||||||
|
app.env.autoapi_enabled = True
|
||||||
|
|
||||||
|
# Generate RST
|
||||||
|
for obj in app.env.autoapi_data:
|
||||||
|
print "Parsing %s" % obj['name']
|
||||||
|
rst = parse(obj)
|
||||||
|
if rst:
|
||||||
|
path = os.path.join(app.config.autoapi_root, '%s.rst' % obj['name']['CSharp'])
|
||||||
|
ensuredir(app.config.autoapi_root)
|
||||||
|
with open(path, 'w+') as fp:
|
||||||
|
fp.write(rst)
|
||||||
|
|
||||||
|
|
||||||
|
def doctree_read(app, doctree):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# para = nodes.paragraph('Test Para', 'Test Para')
|
||||||
|
# new_doc = utils.new_document(para)
|
||||||
|
|
||||||
|
|
||||||
|
def env_updated(app, env):
|
||||||
|
# env.found_docs.add(os.path.join(app.config.autoapi_root, 'test'))
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def collect_pages(app):
|
||||||
|
pass
|
||||||
|
|
||||||
|
context = {
|
||||||
|
'title': 'Test Title',
|
||||||
|
'body': 'Fak',
|
||||||
|
}
|
||||||
|
|
||||||
|
yield (os.path.join(app.config.autoapi_root, 'test_insert'), context, 'page.html')
|
||||||
|
|
||||||
|
|
||||||
|
def setup(app):
|
||||||
|
app.connect('doctree-read', doctree_read)
|
||||||
|
app.connect('builder-inited', load_yaml)
|
||||||
|
app.connect('env-updated', env_updated)
|
||||||
|
app.connect('html-collect-pages', collect_pages)
|
||||||
|
app.add_config_value('autoapi_type', 'yaml', 'html')
|
||||||
|
app.add_config_value('autoapi_root', 'autoapi', 'html')
|
||||||
|
app.add_config_value('autoapi_dir', '/Users/eric/projects/sphinx-dotnet-test/examples/yaml/', 'html')
|
64
autoapi/templates/class.rst
Normal file
64
autoapi/templates/class.rst
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{{ name.CSharp }}
|
||||||
|
{{ underline }}
|
||||||
|
|
||||||
|
{#
|
||||||
|
.. currentmodule:: {{ module }}
|
||||||
|
#}
|
||||||
|
|
||||||
|
Summary
|
||||||
|
-------
|
||||||
|
|
||||||
|
{{ summary }}
|
||||||
|
|
||||||
|
Inheritance Hierarchy
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
{% for item in inheritance %}
|
||||||
|
* {{ item.id }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
|
||||||
|
.. code-block:: csharp
|
||||||
|
|
||||||
|
{{ syntax.content.CSharp }}
|
||||||
|
|
||||||
|
Class Information
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. class:: {{ name.CSharp }}
|
||||||
|
|
||||||
|
{% if ctors %}
|
||||||
|
|
||||||
|
.. rubric:: Constructors
|
||||||
|
|
||||||
|
{% for item in ctors %}
|
||||||
|
{% include "member.rst" %}
|
||||||
|
{%- endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block methods %}
|
||||||
|
|
||||||
|
{% if methods %}
|
||||||
|
|
||||||
|
.. rubric:: Methods
|
||||||
|
|
||||||
|
{% for item in methods %}
|
||||||
|
{% include "member.rst" %}
|
||||||
|
{%- endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% block attributes %}
|
||||||
|
{% if attributes %}
|
||||||
|
|
||||||
|
.. rubric:: Attributes
|
||||||
|
|
||||||
|
{% for item in attributes %}
|
||||||
|
{% include "member.rst" %}
|
||||||
|
{%- endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
15
autoapi/templates/member.rst
Normal file
15
autoapi/templates/member.rst
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{# Identention in this file is important #}
|
||||||
|
|
||||||
|
.. {{ type.lower() }}:: {{ item.qualifiedName.CSharp }}
|
||||||
|
|
||||||
|
.. example-code::
|
||||||
|
|
||||||
|
.. code-block:: csharp
|
||||||
|
|
||||||
|
{{ item.syntax.content.CSharp }}
|
||||||
|
|
||||||
|
.. code-block:: cpp
|
||||||
|
|
||||||
|
This will be different
|
||||||
|
{{ item.syntax.content.CSharp }}
|
||||||
|
|
18
autoapi/templates/methods.rst
Normal file
18
autoapi/templates/methods.rst
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{# Identention in this file is important #}
|
||||||
|
{% block methods %}
|
||||||
|
|
||||||
|
{% if methods %}
|
||||||
|
|
||||||
|
.. rubric:: Methods
|
||||||
|
|
||||||
|
{% for item in methods %}
|
||||||
|
|
||||||
|
.. method:: {{ item.qualifiedName.CSharp }}
|
||||||
|
|
||||||
|
.. code-block:: csharp
|
||||||
|
|
||||||
|
{{ item.syntax.content.CSharp }}
|
||||||
|
|
||||||
|
{%- endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
6
autoapi/utils.py
Normal file
6
autoapi/utils.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import re
|
||||||
|
import os
|
||||||
|
|
||||||
|
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
|
TEMPLATE_DIR = os.path.join(SITE_ROOT, 'templates')
|
28
setup.py
Normal file
28
setup.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import codecs
|
||||||
|
try:
|
||||||
|
from setuptools import setup, find_packages
|
||||||
|
extra_setup = dict(
|
||||||
|
install_requires=['pyyaml'],
|
||||||
|
)
|
||||||
|
except ImportError:
|
||||||
|
from distutils.core import setup
|
||||||
|
extra_setup = {}
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='sphinx-autoapi',
|
||||||
|
version='0.1.0',
|
||||||
|
author='Eric Holscher',
|
||||||
|
author_email='eric@ericholscher.com',
|
||||||
|
url='http://github.com/ericholscher/sphinx-autoapi',
|
||||||
|
license='BSD',
|
||||||
|
description='',
|
||||||
|
package_dir={'': '.'},
|
||||||
|
packages=find_packages('.'),
|
||||||
|
long_description=codecs.open("README.rst", "r", "utf-8").read(),
|
||||||
|
# trying to add files...
|
||||||
|
include_package_data=True,
|
||||||
|
package_data={
|
||||||
|
'': ['_static/*.js', '_static/*.js_t', '_static/*.css'],
|
||||||
|
},
|
||||||
|
**extra_setup
|
||||||
|
)
|
499
tests/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
Normal file
499
tests/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
Normal file
@ -0,0 +1,499 @@
|
|||||||
|
id: Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: AdhocWorkspace
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
type: Class
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 16
|
||||||
|
summary: >+
|
||||||
|
A workspace that allows full manipulation of projects and documents,
|
||||||
|
|
||||||
|
but does not persist changes.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public sealed class AdhocWorkspace
|
||||||
|
inheritance:
|
||||||
|
- id: System.Object
|
||||||
|
name: System.Object
|
||||||
|
isExternal: true
|
||||||
|
- id: Microsoft.CodeAnalysis.Workspace
|
||||||
|
name: Workspace
|
||||||
|
href: api/Microsoft.CodeAnalysis.Workspace
|
||||||
|
items:
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.#ctor(Microsoft.CodeAnalysis.Host.HostServices,System.String)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: AdhocWorkspace(Microsoft.CodeAnalysis.Host.HostServices,System.String)
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.AdhocWorkspace(Microsoft.CodeAnalysis.Host.HostServices,System.String)
|
||||||
|
type: Constructor
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 18
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: 'public AdhocWorkspace(HostServices host, string workspaceKind = "Custom"): base (host, workspaceKind)'
|
||||||
|
parameters:
|
||||||
|
- id: host
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.Host.HostServices
|
||||||
|
name: HostServices
|
||||||
|
href: api/Microsoft.CodeAnalysis.Host.HostServices
|
||||||
|
- id: workspaceKind
|
||||||
|
type:
|
||||||
|
id: System.String
|
||||||
|
name: System.String
|
||||||
|
isExternal: true
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.#ctor
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: AdhocWorkspace
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.AdhocWorkspace
|
||||||
|
type: Constructor
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 23
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: 'public AdhocWorkspace(): this (Host.Mef.MefHostServices.DefaultHost)'
|
||||||
|
parameters: []
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.CanApplyChange(Microsoft.CodeAnalysis.ApplyChangesKind)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: CanApplyChange
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.CanApplyChange(Microsoft.CodeAnalysis.ApplyChangesKind)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 28
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public override bool CanApplyChange(ApplyChangesKind feature)
|
||||||
|
parameters:
|
||||||
|
- id: feature
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.ApplyChangesKind
|
||||||
|
name: ApplyChangesKind
|
||||||
|
href: api/Microsoft.CodeAnalysis.ApplyChangesKind
|
||||||
|
return:
|
||||||
|
id: Boolean
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.CanOpenDocuments
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: CanOpenDocuments
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.CanOpenDocuments
|
||||||
|
type: Property
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 34
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public override bool CanOpenDocuments
|
||||||
|
parameters:
|
||||||
|
- id: CanOpenDocuments
|
||||||
|
type:
|
||||||
|
id: System.Boolean
|
||||||
|
name: System.Boolean
|
||||||
|
isExternal: true
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.get_CanOpenDocuments
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: get_CanOpenDocuments
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.get_CanOpenDocuments
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 36
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.ClearSolution
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: ClearSolution
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.ClearSolution
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 46
|
||||||
|
summary: >+
|
||||||
|
Clears all projects and documents from the workspace.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public new void ClearSolution()
|
||||||
|
parameters: []
|
||||||
|
return:
|
||||||
|
id: Void
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.AddSolution(Microsoft.CodeAnalysis.SolutionInfo)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: AddSolution
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.AddSolution(Microsoft.CodeAnalysis.SolutionInfo)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 54
|
||||||
|
summary: >+
|
||||||
|
Adds an entire solution to the workspace, replacing any existing solution.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public Solution AddSolution(SolutionInfo solutionInfo)
|
||||||
|
parameters:
|
||||||
|
- id: solutionInfo
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.SolutionInfo
|
||||||
|
name: SolutionInfo
|
||||||
|
href: api/Microsoft.CodeAnalysis.SolutionInfo
|
||||||
|
return:
|
||||||
|
id: Solution
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.AddProject(System.String,System.String)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: AddProject
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.AddProject(System.String,System.String)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 69
|
||||||
|
summary: >+
|
||||||
|
Adds a project to the workspace. All previous projects remain intact.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public Project AddProject(string name, string language)
|
||||||
|
parameters:
|
||||||
|
- id: name
|
||||||
|
type:
|
||||||
|
id: System.String
|
||||||
|
name: System.String
|
||||||
|
isExternal: true
|
||||||
|
- id: language
|
||||||
|
type:
|
||||||
|
id: System.String
|
||||||
|
name: System.String
|
||||||
|
isExternal: true
|
||||||
|
return:
|
||||||
|
id: Project
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.AddProject(Microsoft.CodeAnalysis.ProjectInfo)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: AddProject
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.AddProject(Microsoft.CodeAnalysis.ProjectInfo)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 78
|
||||||
|
summary: >+
|
||||||
|
Adds a project to the workspace. All previous projects remain intact.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public Project AddProject(ProjectInfo projectInfo)
|
||||||
|
parameters:
|
||||||
|
- id: projectInfo
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.ProjectInfo
|
||||||
|
name: ProjectInfo
|
||||||
|
href: api/Microsoft.CodeAnalysis.ProjectInfo
|
||||||
|
return:
|
||||||
|
id: Project
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.AddProjects(System.Collections.Generic.IEnumerable{Microsoft.CodeAnalysis.ProjectInfo})
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: AddProjects
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.AddProjects(System.Collections.Generic.IEnumerable{Microsoft.CodeAnalysis.ProjectInfo})
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 94
|
||||||
|
summary: >+
|
||||||
|
Adds multiple projects to the workspace at once. All existing projects remain intact.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public void AddProjects(IEnumerable<ProjectInfo> projectInfos)
|
||||||
|
parameters:
|
||||||
|
- id: projectInfos
|
||||||
|
type:
|
||||||
|
id: System.Collections.Generic.IEnumerable{Microsoft.CodeAnalysis.ProjectInfo}
|
||||||
|
name: System.Collections.Generic.IEnumerable{Microsoft.CodeAnalysis.ProjectInfo}
|
||||||
|
isExternal: true
|
||||||
|
return:
|
||||||
|
id: Void
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.AddDocument(Microsoft.CodeAnalysis.ProjectId,System.String,Microsoft.CodeAnalysis.Text.SourceText)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: AddDocument
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.AddDocument(Microsoft.CodeAnalysis.ProjectId,System.String,Microsoft.CodeAnalysis.Text.SourceText)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 110
|
||||||
|
summary: >+
|
||||||
|
Adds a document to the workspace.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public Document AddDocument(ProjectId projectId, string name, SourceText text)
|
||||||
|
parameters:
|
||||||
|
- id: projectId
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.ProjectId
|
||||||
|
name: ProjectId
|
||||||
|
href: api/Microsoft.CodeAnalysis.ProjectId
|
||||||
|
- id: name
|
||||||
|
type:
|
||||||
|
id: System.String
|
||||||
|
name: System.String
|
||||||
|
isExternal: true
|
||||||
|
- id: text
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.Text.SourceText
|
||||||
|
name: SourceText
|
||||||
|
href: Microsoft.CodeAnalysis.Text.SourceText
|
||||||
|
return:
|
||||||
|
id: Document
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.AddDocument(Microsoft.CodeAnalysis.DocumentInfo)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: AddDocument
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.AddDocument(Microsoft.CodeAnalysis.DocumentInfo)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 136
|
||||||
|
summary: >+
|
||||||
|
Adds a document to the workspace.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public Document AddDocument(DocumentInfo documentInfo)
|
||||||
|
parameters:
|
||||||
|
- id: documentInfo
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.DocumentInfo
|
||||||
|
name: DocumentInfo
|
||||||
|
href: api/Microsoft.CodeAnalysis.DocumentInfo
|
||||||
|
return:
|
||||||
|
id: Document
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.OpenDocument(Microsoft.CodeAnalysis.DocumentId,System.Boolean)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: OpenDocument
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.OpenDocument(Microsoft.CodeAnalysis.DocumentId,System.Boolean)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 151
|
||||||
|
summary: >+
|
||||||
|
Puts the specified document into the open state.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public override void OpenDocument(DocumentId documentId, bool activate = true)
|
||||||
|
parameters:
|
||||||
|
- id: documentId
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.DocumentId
|
||||||
|
name: DocumentId
|
||||||
|
href: api/Microsoft.CodeAnalysis.DocumentId
|
||||||
|
- id: activate
|
||||||
|
type:
|
||||||
|
id: System.Boolean
|
||||||
|
name: System.Boolean
|
||||||
|
isExternal: true
|
||||||
|
return:
|
||||||
|
id: Void
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.CloseDocument(Microsoft.CodeAnalysis.DocumentId)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: CloseDocument
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.CloseDocument(Microsoft.CodeAnalysis.DocumentId)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 164
|
||||||
|
summary: >+
|
||||||
|
Puts the specified document into the closed state.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public override void CloseDocument(DocumentId documentId)
|
||||||
|
parameters:
|
||||||
|
- id: documentId
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.DocumentId
|
||||||
|
name: DocumentId
|
||||||
|
href: api/Microsoft.CodeAnalysis.DocumentId
|
||||||
|
return:
|
||||||
|
id: Void
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.OpenAdditionalDocument(Microsoft.CodeAnalysis.DocumentId,System.Boolean)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: OpenAdditionalDocument
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.OpenAdditionalDocument(Microsoft.CodeAnalysis.DocumentId,System.Boolean)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 179
|
||||||
|
summary: >+
|
||||||
|
Puts the specified additional document into the open state.
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public override void OpenAdditionalDocument(DocumentId documentId, bool activate = true)
|
||||||
|
parameters:
|
||||||
|
- id: documentId
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.DocumentId
|
||||||
|
name: DocumentId
|
||||||
|
href: api/Microsoft.CodeAnalysis.DocumentId
|
||||||
|
- id: activate
|
||||||
|
type:
|
||||||
|
id: System.Boolean
|
||||||
|
name: System.Boolean
|
||||||
|
isExternal: true
|
||||||
|
return:
|
||||||
|
id: Void
|
||||||
|
- id: Microsoft.CodeAnalysis.AdhocWorkspace.CloseAdditionalDocument(Microsoft.CodeAnalysis.DocumentId)
|
||||||
|
yaml: api/Microsoft.CodeAnalysis.AdhocWorkspace.yaml
|
||||||
|
href: api/Microsoft.CodeAnalysis.AdhocWorkspace
|
||||||
|
name:
|
||||||
|
CSharp: CloseAdditionalDocument
|
||||||
|
qualifiedName:
|
||||||
|
CSharp: Microsoft.CodeAnalysis.AdhocWorkspace.CloseAdditionalDocument(Microsoft.CodeAnalysis.DocumentId)
|
||||||
|
type: Method
|
||||||
|
source:
|
||||||
|
remote:
|
||||||
|
branch: master
|
||||||
|
repo: https://github.com/chenkennt/roslyn.git
|
||||||
|
local: C:/roslyn/
|
||||||
|
sha1: 8c49d3e937ebadb974cebab7db31e1800918265d
|
||||||
|
path: src/Workspaces/Core/Portable/Workspace/AdhocWorkspace.cs
|
||||||
|
startLine: 192
|
||||||
|
summary: >+
|
||||||
|
Puts the specified additional document into the closed state
|
||||||
|
|
||||||
|
syntax:
|
||||||
|
content:
|
||||||
|
CSharp: public override void CloseAdditionalDocument(DocumentId documentId)
|
||||||
|
parameters:
|
||||||
|
- id: documentId
|
||||||
|
type:
|
||||||
|
id: Microsoft.CodeAnalysis.DocumentId
|
||||||
|
name: DocumentId
|
||||||
|
href: api/Microsoft.CodeAnalysis.DocumentId
|
||||||
|
return:
|
||||||
|
id: Void
|
Loading…
Reference in New Issue
Block a user