Exemple #1
0
        public virtual string GetCode(ProxyGeneratorContext context)
        {
            return string.Format(@"declare module {0} {{
    interface {1}{2} {{
{3}
    }}
}}", Name.Ns, Name.Name, GetExtensionText(), FormatProperties());
        }
        public virtual string GetCode(ProxyGeneratorContext context)
        {
            return(string.Format(@"declare module {0} {{
    interface {1}{2} {{
{3}
    }}
}}", Name.Ns, Name.Name, GetExtensionText(), FormatProperties()));
        }
Exemple #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);
        }
Exemple #4
0
 public override string GetCode(ProxyGeneratorContext context)
 {
     return(_code);
 }
Exemple #5
0
 public override string GetCode(ProxyGeneratorContext context)
 {
     return _code;
 }