Ejemplo n.º 1
0
        protected sealed override ConstantValue MakeConstantValue(HashSet <SourceFieldSymbolWithSyntaxReference> dependencies, bool earlyDecodingWellKnownAttributes, DiagnosticBag diagnostics)
        {
            if (!this.IsConst || VariableDeclarationNode.Initializer == null)
            {
                return(null);
            }

            return(ConstantValueUtils.EvaluateFieldConstant(this, (EqualsValueClauseSyntax)VariableDeclarationNode.Initializer, dependencies, earlyDecodingWellKnownAttributes, diagnostics));
        }
Ejemplo n.º 2
0
 protected override ConstantValue MakeConstantValue(HashSet <SourceFieldSymbolWithSyntaxReference> dependencies, bool earlyDecodingWellKnownAttributes, DiagnosticBag diagnostics)
 {
     return(ConstantValueUtils.EvaluateFieldConstant(this, (EqualsValueClauseSyntax)_equalsValueNodeRef.GetSyntax(), dependencies, earlyDecodingWellKnownAttributes, diagnostics));
 }