#!ipy

"""
Global parameters:
  CSharp Type     Name
  ===========     ====
  IList           ParameterFilePathList
  IDictionary     ParameterConditionsHash
  IDictionary     ParameterVariablesHash
  IDictionary     ParameterParagraphStylesHash
  IDictionary     ParameterCharacterStylesHash
  IDictionary     ParameterTableStylesHash
  IDictionary     ParameterMarkerTypesHash
  IDictionary     ParameterGraphicStylesHash
  IDictionary     ParameterPageStylesHash
  IList           ParameterXrefsList
"""

from System.IO import Path

# local imports
import sys
sys.path.insert(0, Path.GetDirectoryName(globals()['__file__']))
from router import Router
import utils

env = {
    'filePathList': globals()['ParameterFilePathList'],
    'conditions': globals()['ParameterConditionsHash'],
    'variables': globals()['ParameterVariablesHash'],
    'paras': globals()['ParameterParagraphStylesHash'],
    'charas': globals()['ParameterCharacterStylesHash'],
    'tables': globals()['ParameterTableStylesHash'],
    'markers': globals()['ParameterMarkerTypesHash'],
    'graphics': globals()['ParameterGraphicStylesHash'],
    'pages': globals()['ParameterPageStylesHash'],
    'xrefs': globals()['ParameterXrefsList']
}

env['source'] = globals()['ParameterFilePathList'][0]
env['method'] = 'scan_doc'

Router(utils.DictAsObject(env))

