コード例 #1
0
ファイル: TypeManager.cs プロジェクト: ChuangYang/corefx
        public TypeManager()
        {
            _predefTypes = null; // Initialized via the Init call.
            _BSymmgr = null; // Initialized via the Init call.
            _typeFactory = new TypeFactory();
            _typeTable = new TypeTable();

            // special types with their own symbol kind.
            _errorType = _typeFactory.CreateError(null, null, null, null, null);
            _voidType = _typeFactory.CreateVoid();
            _nullType = _typeFactory.CreateNull();
            _typeUnit = _typeFactory.CreateUnit();
            _typeAnonMeth = _typeFactory.CreateAnonMethod();
            _typeMethGrp = _typeFactory.CreateMethodGroup();
            _argListType = _typeFactory.CreateArgList();

            InitType(_errorType);
            _errorType.SetErrors(true);

            InitType(_voidType);
            InitType(_nullType);
            InitType(_typeUnit);
            InitType(_typeAnonMeth);
            InitType(_typeMethGrp);

            _stvcMethod = new StdTypeVarColl();
            _stvcClass = new StdTypeVarColl();
        }
コード例 #2
0
 public MethodGroupTemplateModel(ServiceClient serviceClient, string methodGroupName)
 {
     this.LoadFrom(serviceClient);
     MethodTemplateModels = new List <MethodTemplateModel>();
     // MethodGroup name and type are always the same but can be
     // changed in derived classes
     MethodGroupName = methodGroupName;
     MethodGroupType = methodGroupName.ToPascalCase();
     if (MethodGroupType != null && !MethodGroupType.EndsWith("Operations", StringComparison.Ordinal))
     {
         MethodGroupType += "Operations";
     }
     Methods.Where(m => m.Group == MethodGroupName)
     .ForEach(m => MethodTemplateModels.Add(new MethodTemplateModel(m, serviceClient)));
 }
コード例 #3
0
ファイル: TypeFactory.cs プロジェクト: Rayislandstyle/corefx
 public MethodGroupType CreateMethodGroup()
 {
     MethodGroupType type = new MethodGroupType();
     type.SetTypeKind(TypeKind.TK_MethodGroupType);
     return type;
 }