Exemplo n.º 1
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);

                _otherConstant       = otherConstant;
                _otherConstantOffset = otherConstantOffset;
            }
Exemplo n.º 2
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));
     }
 }