public MetadataNamedArgument(ISymbolInternal entity, Cci.ITypeReference type, Cci.IMetadataExpression value) { // entity must be one of INamedEntity or IFieldDefinition or IPropertyDefinition _entity = entity; _type = type; _value = value; }
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; }
private MetadataCreateArray CreateMetadataArray(TypedConstant argument, Microsoft.CodeAnalysis.Emit.Context context) { Debug.Assert(!argument.Values.IsDefault); var values = argument.Values; var arrayType = Emit.PEModuleBuilder.Translate((ArrayTypeSymbol)argument.Type); if (values.Length == 0) { return(new MetadataCreateArray(arrayType, arrayType.GetElementType(context), ImmutableArray <Cci.IMetadataExpression> .Empty)); } var metadataExprs = new Cci.IMetadataExpression[values.Length]; for (int i = 0; i < values.Length; i++) { metadataExprs[i] = CreateMetadataExpression(values[i], context); } return(new MetadataCreateArray(arrayType, arrayType.GetElementType(context), metadataExprs.AsImmutableOrNull())); }
public HexPropertyMetadataNamedArgument(Cci.ITypeReference type, Cci.IMetadataExpression value) { this.type = type; this.value = value; }
private MetadataCreateArray CreateMetadataArray(TypedConstant argument, Microsoft.CodeAnalysis.Emit.Context context) { Debug.Assert(!argument.Values.IsDefault); var values = argument.Values; var arrayType = Emit.PEModuleBuilder.Translate((ArrayTypeSymbol)argument.Type); if (values.Length == 0) { return new MetadataCreateArray(arrayType, arrayType.GetElementType(context), ImmutableArray<Cci.IMetadataExpression>.Empty); } var metadataExprs = new Cci.IMetadataExpression[values.Length]; for (int i = 0; i < values.Length; i++) { metadataExprs[i] = CreateMetadataExpression(values[i], context); } return new MetadataCreateArray(arrayType, arrayType.GetElementType(context), metadataExprs.AsImmutableOrNull()); }