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


C# Cci类代码示例

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


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

示例1: MethodBody

        public MethodBody(
            byte[] ilBits,
            ushort maxStack,
            Cci.IMethodDefinition parent,
            ImmutableArray<Cci.ILocalDefinition> locals,
            SequencePointList sequencePoints,
            DebugDocumentProvider debugDocumentProvider,
            ImmutableArray<Cci.ExceptionHandlerRegion> exceptionHandlers,
            ImmutableArray<Cci.LocalScope> localScopes,
            Cci.CustomDebugInfoKind customDebugInfoKind,
            bool hasDynamicLocalVariables,
            ImmutableArray<Cci.NamespaceScope> namespaceScopes = default(ImmutableArray<Cci.NamespaceScope>),
            string iteratorClassName = null,
            ImmutableArray<Cci.LocalScope> iteratorScopes = default(ImmutableArray<Cci.LocalScope>),
            Cci.AsyncMethodBodyDebugInfo asyncMethodDebugInfo = null)
        {
            Debug.Assert(!locals.IsDefault);
            Debug.Assert(!exceptionHandlers.IsDefault);
            Debug.Assert(!localScopes.IsDefault);

            this.ilBits = ilBits;
            this.asyncMethodDebugInfo = asyncMethodDebugInfo;
            this.maxStack = maxStack;
            this.parent = parent;
            this.locals = locals;
            this.sequencePoints = sequencePoints;
            this.debugDocumentProvider = debugDocumentProvider;
            this.exceptionHandlers = exceptionHandlers;
            this.localScopes = localScopes;
            this.customDebugInfoKind = customDebugInfoKind;
            this.hasDynamicLocalVariables = hasDynamicLocalVariables;
            this.namespaceScopes = namespaceScopes.IsDefault ? ImmutableArray<Cci.NamespaceScope>.Empty : namespaceScopes;
            this.iteratorClassName = iteratorClassName;
            this.iteratorScopes = iteratorScopes.IsDefault ? ImmutableArray<Cci.LocalScope>.Empty : iteratorScopes;
        }
开发者ID:modulexcite,项目名称:pattern-matching-csharp,代码行数:35,代码来源:MethodBody.cs

示例2: TryGetPreviousHoistedLocalSlotIndex

 /// <summary>
 /// Returns an index of a slot that stores specified hoisted local variable in the previous generation.
 /// </summary>
 public abstract bool TryGetPreviousHoistedLocalSlotIndex(
     SyntaxNode currentDeclarator,
     Cci.ITypeReference currentType,
     SynthesizedLocalKind synthesizedKind,
     LocalDebugId currentId,
     DiagnosticBag diagnostics,
     out int slotIndex);
开发者ID:Rickinio,项目名称:roslyn,代码行数:10,代码来源:VariableSlotAllocator.cs

示例3: PrivateImplementationDetails

        internal PrivateImplementationDetails(
            Cci.IModule module,
            int submissionSlotIndex,
            Cci.ITypeReference systemObject,
            Cci.ITypeReference systemValueType,
            Cci.ITypeReference systemInt8Type,
            Cci.ITypeReference systemInt16Type,
            Cci.ITypeReference systemInt32Type,
            Cci.ITypeReference systemInt64Type,
            Cci.ICustomAttribute compilerGeneratedAttribute)
        {
            Debug.Assert(module != null);
            Debug.Assert(systemObject != null);
            Debug.Assert(systemValueType != null);

            this.module = module;
            this.systemObject = systemObject;
            this.systemValueType = systemValueType;

            this.systemInt8Type = systemInt8Type;
            this.systemInt16Type = systemInt16Type;
            this.systemInt32Type = systemInt32Type;
            this.systemInt64Type = systemInt64Type;

            this.compilerGeneratedAttribute = compilerGeneratedAttribute;
            this.name = GetClassName(submissionSlotIndex);
        }
开发者ID:pheede,项目名称:roslyn,代码行数:27,代码来源:PrivateImplementationDetails.cs

示例4: PermissionSetAttributeWithFileReference

        public PermissionSetAttributeWithFileReference(Cci.ICustomAttribute sourceAttribute, string resolvedPermissionSetFilePath)
        {
            Debug.Assert(resolvedPermissionSetFilePath != null);

            _sourceAttribute = sourceAttribute;
            _resolvedPermissionSetFilePath = resolvedPermissionSetFilePath;
        }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:7,代码来源:PermissionSetAttribute.cs

示例5:

        void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
        {
            Debug.Assert(this.IsDefinitionOrDistinct());

            if (!this.IsDefinition)
            {
                if (this.IsGenericMethod)
                {
                    Debug.Assert(((Cci.IMethodReference)this).AsGenericMethodInstanceReference != null);
                    visitor.Visit((Cci.IGenericMethodInstanceReference)this);
                }
                else
                {
                    Debug.Assert(((Cci.IMethodReference)this).AsSpecializedMethodReference != null);
                    visitor.Visit((Cci.ISpecializedMethodReference)this);
                }
            }
            else
            {
                PEModuleBuilder moduleBeingBuilt = (PEModuleBuilder)visitor.Context.Module;
                if (this.ContainingModule == moduleBeingBuilt.SourceModule)
                {
                    Debug.Assert(((Cci.IMethodReference)this).GetResolvedMethod(visitor.Context) != null);
                    visitor.Visit((Cci.IMethodDefinition)this);
                }
                else
                {
                    visitor.Visit((Cci.IMethodReference)this);
                }
            }
        }
开发者ID:ehsansajjad465,项目名称:roslyn,代码行数:31,代码来源:MethodSymbolAdapter.cs

示例6: SignatureOnlyMethodSymbol

 public SignatureOnlyMethodSymbol(
     string name,
     TypeSymbol containingType,
     MethodKind methodKind,
     Cci.CallingConvention callingConvention,
     ImmutableArray<TypeParameterSymbol> typeParameters,
     ImmutableArray<ParameterSymbol> parameters,
     RefKind refKind,
     TypeSymbol returnType,
     ImmutableArray<CustomModifier> returnTypeCustomModifiers,
     ushort countOfCustomModifiersPrecedingByRef,
     ImmutableArray<MethodSymbol> explicitInterfaceImplementations)
 {
     _callingConvention = callingConvention;
     _typeParameters = typeParameters;
     _refKind = refKind;
     _returnType = returnType;
     _returnTypeCustomModifiers = returnTypeCustomModifiers;
     _countOfCustomModifiersPrecedingByRef = countOfCustomModifiersPrecedingByRef;
     _parameters = parameters;
     _explicitInterfaceImplementations = explicitInterfaceImplementations.NullToEmpty();
     _containingType = containingType;
     _methodKind = methodKind;
     _name = name;
 }
开发者ID:otawfik-ms,项目名称:roslyn,代码行数:25,代码来源:SignatureOnlyMethodSymbol.cs

示例7: PrivateImplementationDetails

        internal PrivateImplementationDetails(
            Cci.IModule moduleBuilder,
            string moduleName,
            int submissionSlotIndex,
            Cci.ITypeReference systemObject,
            Cci.ITypeReference systemValueType,
            Cci.ITypeReference systemInt8Type,
            Cci.ITypeReference systemInt16Type,
            Cci.ITypeReference systemInt32Type,
            Cci.ITypeReference systemInt64Type,
            Cci.ICustomAttribute compilerGeneratedAttribute)
        {
            Debug.Assert(systemObject != null);
            Debug.Assert(systemValueType != null);

            _moduleBuilder = moduleBuilder;
            _systemObject = systemObject;
            _systemValueType = systemValueType;

            _systemInt8Type = systemInt8Type;
            _systemInt16Type = systemInt16Type;
            _systemInt32Type = systemInt32Type;
            _systemInt64Type = systemInt64Type;

            _compilerGeneratedAttribute = compilerGeneratedAttribute;

            var isNetModule = moduleBuilder.AsAssembly == null;
            _name = GetClassName(moduleName, submissionSlotIndex, isNetModule);
        }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:29,代码来源:PrivateImplementationDetails.cs

示例8: MetadataConstant

        public MetadataConstant(Cci.ITypeReference type, object value)
        {
            Debug.Assert(type != null);
            AssertValidConstant(value);

            this.type = type;
            this.value = value;
        }
开发者ID:EkardNT,项目名称:Roslyn,代码行数:8,代码来源:MetadataConstant.cs

示例9: PermissionSetAttributeWithFileReference

        public PermissionSetAttributeWithFileReference(Cci.ICustomAttribute sourceAttribute, string resolvedPermissionSetFilePath)
        {
            Debug.Assert(!String.IsNullOrEmpty(resolvedPermissionSetFilePath));
            Debug.Assert(PathUtilities.IsAbsolute(resolvedPermissionSetFilePath));

            this.sourceAttribute = sourceAttribute;
            this.resolvedPermissionSetFilePath = resolvedPermissionSetFilePath;
        }
开发者ID:pheede,项目名称:roslyn,代码行数:8,代码来源:PermissionSetAttribute.cs

示例10: ExpandedVarargsMethodReference

        public ExpandedVarargsMethodReference(Cci.IMethodReference underlyingMethod, ImmutableArray<Cci.IParameterTypeInformation> argListParams)
        {
            Debug.Assert(underlyingMethod.AcceptsExtraArguments);
            Debug.Assert(!argListParams.IsEmpty);

            _underlyingMethod = underlyingMethod;
            _argListParams = argListParams;
        }
开发者ID:GuilhermeSa,项目名称:roslyn,代码行数:8,代码来源:ExpandedVarargsMethodReference.cs

示例11: PENetModuleBuilder

 internal PENetModuleBuilder(
     SourceModuleSymbol sourceModule,
     EmitOptions emitOptions,
     Cci.ModulePropertiesForSerialization serializationProperties,
     IEnumerable<ResourceDescription> manifestResources)
     : base(sourceModule, emitOptions, OutputKind.NetModule, serializationProperties, manifestResources)
 {
 }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:8,代码来源:PENetModuleBuilder.cs

示例12: EmitContext

        public EmitContext(Cci.IModule module, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics)
        {
            Debug.Assert(module != null);
            Debug.Assert(diagnostics != null);

            this.Module = module;
            this.SyntaxNodeOpt = syntaxNodeOpt;
            this.Diagnostics = diagnostics;
        }
开发者ID:EkardNT,项目名称:Roslyn,代码行数:9,代码来源:Context.cs

示例13: EmitToken

 internal void EmitToken(Cci.IReference value, SyntaxNode syntaxNode, DiagnosticBag diagnostics, bool encodeAsRawToken = false)
 {
     uint token = module?.GetFakeSymbolTokenForIL(value, syntaxNode, diagnostics) ?? 0xFFFF;
     // Setting the high bit indicates that the token value is to be interpreted literally rather than as a handle.
     if (encodeAsRawToken)
     {
         token |= Cci.MetadataWriter.LiteralMethodDefinitionToken;
     }
     this.GetCurrentWriter().WriteUInt32(token);
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:10,代码来源:ILBuilderEmit.cs

示例14: EncHoistedLocalMetadata

        public EncHoistedLocalMetadata(string name, Cci.ITypeReference type, SynthesizedLocalKind synthesizedKind)
        {
            Debug.Assert(name != null);
            Debug.Assert(type != null);
            Debug.Assert(synthesizedKind.IsLongLived());

            this.Name = name;
            this.Type = type;
            this.SynthesizedKind = synthesizedKind;
        }
开发者ID:Rickinio,项目名称:roslyn,代码行数:10,代码来源:EncHoistedLocalMetadata.cs

示例15: GetPreviousLocal

 public abstract LocalDefinition GetPreviousLocal(
     Cci.ITypeReference type,
     ILocalSymbolInternal symbol,
     string nameOpt,
     SynthesizedLocalKind kind,
     LocalDebugId id,
     LocalVariableAttributes pdbAttributes,
     LocalSlotConstraints constraints,
     bool isDynamic,
     ImmutableArray<TypedConstant> dynamicTransformFlags);
开发者ID:Rickinio,项目名称:roslyn,代码行数:10,代码来源:VariableSlotAllocator.cs


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