本文整理汇总了C#中Microsoft.Cci类的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Cci类的具体用法?C# Microsoft.Cci怎么用?C# Microsoft.Cci使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Microsoft.Cci类属于命名空间,在下文中一共展示了Microsoft.Cci类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MetadataNamedArgument
public MetadataNamedArgument(ISymbol entity, Cci.ITypeReference type, Cci.IMetadataExpression value)
{
// entity must be one of INamedEntity or IFieldDefinition or IPropertyDefinition
this.entity = entity;
this.type = type;
this.value = value;
}
示例2: MethodBody
public MethodBody(
byte[] ilBits,
ushort maxStack,
Cci.IMethodDefinition parent,
ImmutableArray<LocalDefinition> locals,
SequencePointList sequencePoints,
DebugDocumentProvider debugDocumentProvider,
ImmutableArray<Cci.ExceptionHandlerRegion> exceptionHandlers,
ImmutableArray<LocalScope> localScopes,
Cci.CustomDebugInfoKind customDebugInfoKind,
bool hasDynamicLocalVariables,
ImmutableArray<NamespaceScope> namespaceScopes = default(ImmutableArray<NamespaceScope>),
string iteratorClassName = null,
ImmutableArray<LocalScope> iteratorScopes = default(ImmutableArray<LocalScope>),
Cci.AsyncMethodBodyDebugInfo asyncMethodDebugInfo = null)
{
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<NamespaceScope>.Empty : namespaceScopes;
this.iteratorClassName = iteratorClassName;
this.iteratorScopes = iteratorScopes.IsDefault ? ImmutableArray<LocalScope>.Empty : iteratorScopes;
}
示例3:
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 (object.ReferenceEquals(this.ContainingModule, moduleBeingBuilt.SourceModule))
{
Debug.Assert(((Cci.IMethodReference)this).GetResolvedMethod(visitor.Context) != null);
visitor.Visit((Cci.IMethodDefinition)this);
}
else
{
visitor.Visit((Cci.IMethodReference)this);
}
}
}
示例4: PermissionSetAttributeWithFileReference
public PermissionSetAttributeWithFileReference(Cci.ICustomAttribute sourceAttribute, string resolvedPermissionSetFilePath)
{
Debug.Assert(!String.IsNullOrEmpty(resolvedPermissionSetFilePath));
Debug.Assert(PathUtilities.IsAbsolute(resolvedPermissionSetFilePath));
this.sourceAttribute = sourceAttribute;
this.resolvedPermissionSetFilePath = resolvedPermissionSetFilePath;
}
示例5: ExpandedVarargsMethodReference
public ExpandedVarargsMethodReference(Cci.IMethodReference underlyingMethod, ImmutableArray<Cci.IParameterTypeInformation> argListParams)
{
Debug.Assert(underlyingMethod.AcceptsExtraArguments);
Debug.Assert(!argListParams.IsEmpty);
this.underlyingMethod = underlyingMethod;
this.argListParams = argListParams;
}
示例6: SetDllImport
// used by DllImportAttribute
public void SetDllImport(int attributeIndex, string moduleName, string entryPointName, Cci.PInvokeAttributes flags, bool preserveSig)
{
VerifySealed(expected: false);
Debug.Assert(attributeIndex >= 0);
platformInvokeInfo = new DllImportData(moduleName, entryPointName, flags);
this.dllImportIndex = attributeIndex;
this.dllImportPreserveSig = preserveSig;
SetDataStored();
}
示例7: LocalScope
internal LocalScope(uint begin, uint end, Cci.IMethodDefinition parent, IEnumerable<Cci.ILocalDefinition> constantSymbols, IEnumerable<Cci.ILocalDefinition> localSymbols)
{
//we should not create 0-length scopes as they are useless.
//however we will allow the case of "begin == end" as that is how edge inclusive scopes of length 1 are represented.
System.Diagnostics.Debug.Assert(begin <= end);
this.offset = begin;
this.length = end - begin;
this.parent = parent;
this.constantSymbols = constantSymbols;
this.localSymbols = localSymbols;
}
示例8: PEAssemblyBuilder
public PEAssemblyBuilder(
SourceAssemblySymbol sourceAssembly,
Cci.ModulePropertiesForSerialization serializationProperties,
IEnumerable<ResourceDescription> manifestResources,
OutputKind outputKind,
EmitOptions emitOptions)
:base(sourceAssembly.DeclaringCompilation, (SourceModuleSymbol)sourceAssembly.Modules[0], serializationProperties, manifestResources, outputKind, emitOptions)
{
_sourceAssembly = sourceAssembly;
_metadataName = (emitOptions.OutputNameOverride == null) ? sourceAssembly.MetadataName : FileNameUtilities.ChangeExtension(emitOptions.OutputNameOverride, extension: null);
AssemblyOrModuleSymbolToModuleRefMap.Add(sourceAssembly, this);
}
示例9: PEModuleBuilder
protected PEModuleBuilder(
PhpCompilation compilation,
SourceModuleSymbol sourceModule,
Cci.ModulePropertiesForSerialization serializationProperties,
IEnumerable<ResourceDescription> manifestResources,
OutputKind outputKind,
EmitOptions emitOptions)
{
Debug.Assert(sourceModule != null);
Debug.Assert(serializationProperties != null);
_compilation = compilation;
_sourceModule = sourceModule;
_serializationProperties = serializationProperties;
this.ManifestResources = manifestResources;
_outputKind = outputKind;
_emitOptions = emitOptions;
this.CompilationState = new CommonModuleCompilationState();
_debugDocuments = new ConcurrentDictionary<string, Cci.DebugSourceDocument>(compilation.IsCaseSensitive ? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase);
_synthesized = new SynthesizedManager(this);
AssemblyOrModuleSymbolToModuleRefMap.Add(sourceModule, this);
}
示例10:
void Cci.IMetadataExpression.Dispatch(Cci.MetadataVisitor visitor)
{
visitor.Visit(this);
}
示例11: HexPropertyMetadataNamedArgument
public HexPropertyMetadataNamedArgument(Cci.ITypeReference type, Cci.IMetadataExpression value)
{
this.type = type;
this.value = value;
}
示例12:
void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
{
visitor.Visit(this);
}
示例13: if
void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
{
if (((Cci.IMethodReference)this).AsGenericMethodInstanceReference != null)
{
visitor.Visit((Cci.IGenericMethodInstanceReference)this);
}
else if (((Cci.IMethodReference)this).AsSpecializedMethodReference != null)
{
visitor.Visit((Cci.ISpecializedMethodReference)this);
}
else
{
visitor.Visit((Cci.IMethodReference)this);
}
}
示例14: Applicand
public CCI.TypeNode BaseDefn(CCI.TypeNode typeDefn)
{
if (typeDefn.BaseType == null)
return null;
else
return Applicand(typeDefn.BaseType);
}
示例15: TypeArity
public int TypeArity(CCI.Method methodDefn)
{
if (methodDefn.TemplateParameters != null)
return methodDefn.TemplateParameters.Count;
else
return 0;
}