Beispiel #1
0
        /// <summary>
        /// Specifies TS interfaces to be generated from the assembly by regex of a type's full name
        /// </summary>
        /// <param name="typeNameRegex"></param>
        /// <param name="outputDir"></param>
        /// <returns></returns>
        public AssemblySpecBuilder AddInterfaces(string typeNameRegex, string outputDir = null)
        {
            _activeFeature = ActiveFeature.InterfaceRegexExport;
            _activeRegex   = typeNameRegex;

            _spec.AddInterfaceRegexExportRule(typeNameRegex, new ExportTsInterfaceAttribute {
                OutputDir = outputDir
            });

            return(this);
        }
Beispiel #2
0
        /// <summary>
        /// Specifies TS enums to be generated from the assembly by regex of a type's full name
        /// </summary>
        /// <param name="typeNameRegex"></param>
        /// <param name="outputDir"></param>
        /// <param name="isConst"></param>
        /// <returns></returns>
        public AssemblySpecBuilder AddEnums(string typeNameRegex, string outputDir = null, bool isConst = false)
        {
            _activeFeature = ActiveFeature.EnumRegexExport;
            _activeRegex   = typeNameRegex;

            _spec.AddEnumRegexExportRule(typeNameRegex, new ExportTsEnumAttribute {
                OutputDir = outputDir, IsConst = isConst
            });

            return(this);
        }
Beispiel #3
0
        protected BaseItem CreateItem(ItemType type, XmlDocument document, string logTime)
        {
            BaseItem item = null;

            switch (type)
            {
            case ItemType.Unknown:
                item = new Unknown(document, logTime);
                break;

            case ItemType.DocumentCollection:
                item = new DocumentCollection(document, logTime);
                break;

            case ItemType.Rendition:
                item = new Rendition(document, logTime);
                break;

            case ItemType.LinkItem:
                item = new LinkItem(document, logTime);
                break;

            case ItemType.Folder:
                item = new Folder(document, logTime);
                break;

            case ItemType.DocumentSet:
                item = new DocumentSet(document, logTime);
                break;

            case ItemType.List:
                item = new List(document, logTime);
                break;

            case ItemType.Web:
                item = new Web(document, logTime);
                break;

            case ItemType.WebContentType:
                item = new WebContentType(document, logTime);
                break;

            case ItemType.Report:
                item = new Report(document, logTime);
                break;

            case ItemType.ImportAction:
                item = new ImportAction(document, logTime);
                break;

            case ItemType.ActiveFeature:
                item = new ActiveFeature(document, logTime);
                break;

            case ItemType.Others:
                item = new Others(document, logTime);
                break;

            default:
                item = null;
                break;
            }
            return(item);
        }