示例#1
0
        public virtual string GetCode(ProxyGeneratorContext context)
        {
            return string.Format(@"declare module {0} {{
    interface {1}{2} {{
{3}
    }}
}}", Name.Ns, Name.Name, GetExtensionText(), FormatProperties());
        }
示例#2
0
        public virtual string GetCode(ProxyGeneratorContext context)
        {
            return(string.Format(@"declare module {0} {{
    interface {1}{2} {{
{3}
    }}
}}", Name.Ns, Name.Name, GetExtensionText(), FormatProperties()));
        }
示例#3
0
        IEnumerable<ProxyGenerationResult> GetProxyGenerationResults()
        {
            var commandTypes = _sourceDlls
                .Select(LoadAssembly)
                .SelectMany(GetTypes)
                .Where(ProxyGeneratorContext.IsCommand)
                .ToList();

            _writer.Print("Found {0} command types", commandTypes.Count);

            var commandsFileName = string.Format("commands.ts");
            var commandProcessorFileName = string.Format("commandProcessor.ts");

            var context = new ProxyGeneratorContext(commandTypes);
            var code = context.GetCommandDefinitations();

            yield return new ProxyGenerationResult(commandsFileName, _writer, code);

            var moreCode = context.GetCommandProcessorDefinitation();

            yield return new ProxyGenerationResult(commandProcessorFileName, _writer, moreCode);
        }
示例#4
0
 public override string GetCode(ProxyGeneratorContext context)
 {
     return(_code);
 }
示例#5
0
 public override string GetCode(ProxyGeneratorContext context)
 {
     return _code;
 }