Exemplo n.º 1
0
 internal static bool IsSymbolAccessibleConditional(
     Symbol symbol,
     AssemblySymbol within,
     ref HashSet <DiagnosticInfo> useSiteDiagnostics)
 {
     return(AccessCheck.IsSymbolAccessible(symbol, within, ref useSiteDiagnostics));
 }
Exemplo n.º 2
0
 internal bool IsSymbolAccessibleConditional(
     Symbol symbol,
     NamedTypeSymbol within,
     ref HashSet <DiagnosticInfo> useSiteDiagnostics,
     TypeSymbol throughTypeOpt = null)
 {
     return(this.Flags.Includes(BinderFlags.IgnoreAccessibility) || AccessCheck.IsSymbolAccessible(symbol, within, ref useSiteDiagnostics, throughTypeOpt));
 }
Exemplo n.º 3
0
        internal bool IsSymbolAccessibleConditional(
            Symbol symbol,
            NamedTypeSymbol within,
            TypeSymbol throughTypeOpt,
            out bool failedThroughTypeCheck,
            ref HashSet <DiagnosticInfo> useSiteDiagnostics,
            ConsList <TypeSymbol> basesBeingResolved = null)
        {
            if (this.Flags.Includes(BinderFlags.IgnoreAccessibility))
            {
                failedThroughTypeCheck = false;
                return(true);
            }

            return(AccessCheck.IsSymbolAccessible(symbol, within, throughTypeOpt, out failedThroughTypeCheck, ref useSiteDiagnostics, basesBeingResolved));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Checks if 'symbol' is accessible from within assembly 'within'.
        /// </summary>
        public static bool IsSymbolAccessible(
            Symbol symbol,
            AssemblySymbol within)
        {
            if ((object)symbol == null)
            {
                throw new ArgumentNullException(nameof(symbol));
            }

            if ((object)within == null)
            {
                throw new ArgumentNullException(nameof(within));
            }

            HashSet <DiagnosticInfo> useSiteDiagnostics = null;

            return(AccessCheck.IsSymbolAccessible(symbol, within, ref useSiteDiagnostics));
        }