Exemplo n.º 1
0
 public static SourceEnumConstantSymbol CreateImplicitValuedConstant(
     SourceMemberContainerTypeSymbol containingEnum,
     EnumMemberDeclarationSyntax syntax,
     SourceEnumConstantSymbol otherConstant,
     int otherConstantOffset,
     BindingDiagnosticBag diagnostics
     )
 {
     if ((object)otherConstant == null)
     {
         Debug.Assert(otherConstantOffset == 0);
         return(new ZeroValuedEnumConstantSymbol(containingEnum, syntax, diagnostics));
     }
     else
     {
         Debug.Assert(otherConstantOffset > 0);
         return(new ImplicitValuedEnumConstantSymbol(
                    containingEnum,
                    syntax,
                    otherConstant,
                    (uint)otherConstantOffset,
                    diagnostics
                    ));
     }
 }
Exemplo n.º 2
0
            public ImplicitValuedEnumConstantSymbol(
                SourceMemberContainerTypeSymbol containingEnum,
                EnumMemberDeclarationSyntax syntax,
                SourceEnumConstantSymbol otherConstant,
                uint otherConstantOffset,
                BindingDiagnosticBag diagnostics
                ) : base(containingEnum, syntax, diagnostics)
            {
                Debug.Assert((object)otherConstant != null);
                Debug.Assert(otherConstantOffset > 0);

                _otherConstant       = otherConstant;
                _otherConstantOffset = otherConstantOffset;
            }
Exemplo n.º 3
0
 public static SourceEnumConstantSymbol CreateImplicitValuedConstant(
     SourceMemberContainerTypeSymbol containingEnum,
     EnumMemberDeclarationSyntax syntax,
     SourceEnumConstantSymbol otherConstant,
     int otherConstantOffset,
     DiagnosticBag diagnostics)
 {
     if ((object)otherConstant == null)
     {
         Debug.Assert(otherConstantOffset == 0);
         return new ZeroValuedEnumConstantSymbol(containingEnum, syntax, diagnostics);
     }
     else
     {
         Debug.Assert(otherConstantOffset > 0);
         return new ImplicitValuedEnumConstantSymbol(containingEnum, syntax, otherConstant, (uint)otherConstantOffset, diagnostics);
     }
 }
Exemplo n.º 4
0
            public ImplicitValuedEnumConstantSymbol(
                SourceMemberContainerTypeSymbol containingEnum,
                EnumMemberDeclarationSyntax syntax,
                SourceEnumConstantSymbol otherConstant,
                uint otherConstantOffset,
                DiagnosticBag diagnostics) :
                base(containingEnum, syntax, diagnostics)
            {
                Debug.Assert((object)otherConstant != null);
                Debug.Assert(otherConstantOffset > 0);

                this.otherConstant = otherConstant;
                this.otherConstantOffset = otherConstantOffset;
            }