当前位置: 首页>>代码示例>>C#>>正文


C# ICodeGenerator类代码示例

本文整理汇总了C#中ICodeGenerator的典型用法代码示例。如果您正苦于以下问题:C# ICodeGenerator类的具体用法?C# ICodeGenerator怎么用?C# ICodeGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ICodeGenerator类属于命名空间,在下文中一共展示了ICodeGenerator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TypescriptCodeProvider

 public TypescriptCodeProvider()
 {
     var unity = new UnityContainer();
     var startup = new Startup(unity);
     startup.Initialize();
     _codeGenerator = unity.Resolve<ICodeGenerator>();
 }
开发者ID:s2quake,项目名称:TypescriptCodeDom,代码行数:7,代码来源:TypescriptCodeProvider.cs

示例2: Generate

		public static void Generate (DataSet dataSet,
			CodeNamespace codeNamespace,
			ICodeGenerator codeGen)
		{
			CustomDataClassGenerator.CreateDataSetClasses (
				dataSet, codeNamespace, codeGen, null);
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:TypedDataSetGenerator.cs

示例3: MethodVirtualizer

 public MethodVirtualizer(IMethodVirtualizerInfoWrapper wrapper, ICodeGenerator codeGenerator)
 {
     ArgumentUtility.CheckNotNull ("wrapper", wrapper);
       ArgumentUtility.CheckNotNull ("codeGenerator", codeGenerator);
       _wrapper = wrapper;
       _codeGenerator = codeGenerator;
 }
开发者ID:rubicon-oss,项目名称:AssemblyTransformer,代码行数:7,代码来源:MethodVirtualizer.cs

示例4: Generate

        public static CodeGenFile[] Generate(ICodeGeneratorDataProvider provider, string directory, ICodeGenerator[] codeGenerators)
        {
            directory = GetSafeDir(directory);
            CleanDir(directory);

            var generatedFiles = new List<CodeGenFile>();

            foreach (var generator in codeGenerators.OfType<IPoolCodeGenerator>()) {
                var files = generator.Generate(provider.poolNames);
                generatedFiles.AddRange(files);
                writeFiles(directory, files);
            }

            foreach (var generator in codeGenerators.OfType<IComponentCodeGenerator>()) {
                var files = generator.Generate(provider.componentInfos);
                generatedFiles.AddRange(files);
                writeFiles(directory, files);
            }

            foreach (var generator in codeGenerators.OfType<IBlueprintsCodeGenerator>()) {
                var files = generator.Generate(provider.blueprintNames);
                generatedFiles.AddRange(files);
                writeFiles(directory, files);
            }

            return generatedFiles.ToArray();
        }
开发者ID:Cotoff,项目名称:Entitas-CSharp,代码行数:27,代码来源:CodeGenerator.cs

示例5: ToSpecifiedRegister

        public override void ToSpecifiedRegister(ICodeGenerator g, Register result)
        {
            string opCode;
              string shifter;
              int multiplier;
              switch(array.ExpressionType) {
            case ExpressionType.WordArray:
              opCode="LDR";
              shifter=",LSL 2";
              multiplier=4;
              break;

            case ExpressionType.ByteArray:
              opCode="LDRB";
              shifter="";
              multiplier=1;
              break;

            default:
              throw new Exception("Can't index an expression of type "+array.ExpressionType);
              }

              throw new NotImplementedException("NIY");
            //
            //      array.LoadToNewRegister(g, arrayRegister =>
            //        index.ToRegisterOrImmediate(g,
            //          indexRegister => g.Emit(OpCodes.TODO, opCode+" "+result+",["+arrayRegister+",+"+indexRegister+shifter+"]"),
            //          indexImmediate => g.Emit(OpCodes.TODO, opCode+" "+result+",["+arrayRegister+",+#"+indexImmediate*multiplier+"]")));
        }
开发者ID:brandongrossutti,项目名称:DotCopter,代码行数:29,代码来源:ByteArrayElement.cs

示例6: SchemaBrowserVM

 public SchemaBrowserVM(ISchemaBrowserModel iSchemaBrowserModel, ICodeGenerator iCodeGenerator, DbConnectionInfo dbConnectionInfo)
 {
     model = iSchemaBrowserModel;
     codeGenerator = iCodeGenerator;
     currentDb = dbConnectionInfo;
     GeneratCodeCommand = new DelegateCommand<object>(GeneratCode);
 }
开发者ID:zanadu777,项目名称:Schema,代码行数:7,代码来源:SchemaBrowserVM.cs

示例7: GenerateIdName

        // given a variable name, this method will check to see if the 
        // name is a valid identifier name. if this is not the case, then
        // at the moment will replace all the blank space with underscores.
        public static string GenerateIdName(string name, ICodeGenerator codeGen) {
            if (codeGen.IsValidIdentifier(name)) {
                return name;
            }

            string ret = name.Replace(' ', '_');
            if (! codeGen.IsValidIdentifier(ret)) {
                ret = "_" + ret;
                UnicodeCategory unc;
                for (int i = 1; i < ret.Length; i++) {
                    unc = Char.GetUnicodeCategory(ret[i]);
                    if (
                        UnicodeCategory.UppercaseLetter      != unc &&  
                        UnicodeCategory.LowercaseLetter      != unc &&  
                        UnicodeCategory.TitlecaseLetter      != unc &&
                        UnicodeCategory.ModifierLetter       != unc &&
                        UnicodeCategory.OtherLetter          != unc &&
                        UnicodeCategory.LetterNumber         != unc &&
                        UnicodeCategory.NonSpacingMark       != unc &&
                        UnicodeCategory.SpacingCombiningMark != unc &&
                        UnicodeCategory.DecimalDigitNumber   != unc &&
                        UnicodeCategory.ConnectorPunctuation != unc 
                    ) {
                        ret = ret.Replace(ret[i], '_');
                    } // if
                } // for
            }

            return ret;
        }
开发者ID:uQr,项目名称:referencesource,代码行数:33,代码来源:datacache.cs

示例8: CommandProxies

 public CommandProxies(ITypeDiscoverer typeDiscoverer, ITypeImporter typeImporter, ICodeGenerator codeGenerator, WebConfiguration configuration)
 {
     _typeDiscoverer = typeDiscoverer;
     _typeImporter = typeImporter;
     _codeGenerator = codeGenerator;
     
     _configuration = configuration;
 }
开发者ID:jarlef,项目名称:Bifrost,代码行数:8,代码来源:CommandProxies.cs

示例9: ReservationController

 public ReservationController(ITwilioMessageRepository repository, IMessageProvider<TwilioMessage> twilioMessageProvider,
                           IPersonRepository personRepository, ICodeGenerator codeGenerator)
 {
     _twilioRepository = repository;
       _personRepository = personRepository;
       _twilioMessageProvider = twilioMessageProvider;
       _codeGenerator = codeGenerator;
 }
开发者ID:cvillamor,项目名称:WeddingWebsite,代码行数:8,代码来源:ReservationController.cs

示例10: Initialize

        public virtual void Initialize()
        {
            DependenciesMock = new Mock<ICodeGeneratorDependencies>();

            ArgumentsMock = new Mock<ICodeGeneratorGenerateArguments>();

            CodeGenerator = new Logics.CodeGenerator(DependenciesMock.Object);
        }
开发者ID:MacShack,项目名称:NormalizedCodeGenerator,代码行数:8,代码来源:CodeGeneratorTests.cs

示例11: Phase2Parser

	public Phase2Parser( TokenizerBase tokenStream,
						 ICodeGenerator gen )
	 : base(tokenStream)
		{
		this.gen = gen;
		
		loops = new Stack();
		withs = new Stack();
		} // Phase2Parser constructor
开发者ID:emtees,项目名称:old-code,代码行数:9,代码来源:JParser2.cs

示例12: EntityFrameworkMappingGenerator

 public EntityFrameworkMappingGenerator(
     ICodeGenerator codeGenerator,
     IPluginsContainer<IConceptMapping> plugins,
     ILogProvider logProvider)
 {
     _plugins = plugins;
     _codeGenerator = codeGenerator;
     _performanceLogger = logProvider.GetLogger("Performance");
 }
开发者ID:davorpr1,项目名称:Rhetos,代码行数:9,代码来源:EntityFrameworkMappingGenerator.cs

示例13: TemplateParser

 // overcome bug in ANTLR 3.2
 public TemplateParser(ITokenStream input, RecognizerSharedState state, ICodeGenerator gen, TemplateName enclosingTemplateName)
     : base(null, null)
 {
     this.input = input;
     this.state = state;
     if (gen != null)
         this.gen = gen;
     this._enclosingTemplateName = enclosingTemplateName;
 }
开发者ID:bszafko,项目名称:antlrcs,代码行数:10,代码来源:TemplateParserHelper.cs

示例14: CaptchaMiddleware

 public CaptchaMiddleware(
     RequestDelegate next,
     ICodeGenerator codeGenerator,
     IGraphicGenerator graphicGenerator)
 {
     _next = next;
     _codeGenerator = codeGenerator;
     _graphicGenerator = graphicGenerator;
 }
开发者ID:ciker,项目名称:CaptchaMVC6,代码行数:9,代码来源:CaptchaMiddleware.cs

示例15: QueryProxies

 public QueryProxies(
     ITypeDiscoverer typeDiscoverer,
     ICodeGenerator codeGenerator,
     WebConfiguration configuration)
 {
     _typeDiscoverer = typeDiscoverer;
     _codeGenerator = codeGenerator;
     _configuration = configuration;
 }
开发者ID:ProCoSys,项目名称:Bifrost,代码行数:9,代码来源:QueryProxies.cs


注:本文中的ICodeGenerator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。