Pchp.CodeAnalysis.Emit.PEModuleBuilder.ValidateReferencedAssembly C# (CSharp) Méthode

ValidateReferencedAssembly() private méthode

private ValidateReferencedAssembly ( AssemblySymbol assembly, AssemblyReference asmRef, DiagnosticBag diagnostics ) : void
assembly Pchp.CodeAnalysis.Symbols.AssemblySymbol
asmRef AssemblyReference
diagnostics DiagnosticBag
Résultat void
        private void ValidateReferencedAssembly(AssemblySymbol assembly, AssemblyReference asmRef, DiagnosticBag diagnostics)
        {
            //AssemblyIdentity asmIdentity = SourceModule.ContainingAssembly.Identity;
            //AssemblyIdentity refIdentity = asmRef.MetadataIdentity;

            //if (asmIdentity.IsStrongName && !refIdentity.IsStrongName &&
            //    ((Cci.IAssemblyReference)asmRef).ContentType != System.Reflection.AssemblyContentType.WindowsRuntime)
            //{
            //    // Dev12 reported error, we have changed it to a warning to allow referencing libraries 
            //    // built for platforms that don't support strong names.
            //    diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_ReferencedAssemblyDoesNotHaveStrongName, assembly), NoLocation.Singleton);
            //}

            //if (OutputKind != OutputKind.NetModule &&
            //   !string.IsNullOrEmpty(refIdentity.CultureName) &&
            //   !string.Equals(refIdentity.CultureName, asmIdentity.CultureName, StringComparison.OrdinalIgnoreCase))
            //{
            //    diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_RefCultureMismatch, assembly, refIdentity.CultureName), NoLocation.Singleton);
            //}

            //var refMachine = assembly.Machine;
            //// If other assembly is agnostic this is always safe
            //// Also, if no mscorlib was specified for back compat we add a reference to mscorlib
            //// that resolves to the current framework directory. If the compiler is 64-bit
            //// this is a 64-bit mscorlib, which will produce a warning if /platform:x86 is
            //// specified. A reference to the default mscorlib should always succeed without
            //// warning so we ignore it here.
            //if ((object)assembly != (object)assembly.CorLibrary &&
            //    !(refMachine == Machine.I386 && !assembly.Bit32Required))
            //{
            //    var machine = SourceModule.Machine;

            //    if (!(machine == Machine.I386 && !SourceModule.Bit32Required) &&
            //        machine != refMachine)
            //    {
            //        // Different machine types, and neither is agnostic
            //        diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_ConflictingMachineAssembly, assembly), NoLocation.Singleton);
            //    }
            //}

            //if (_embeddedTypesManagerOpt != null && _embeddedTypesManagerOpt.IsFrozen)
            //{
            //    _embeddedTypesManagerOpt.ReportIndirectReferencesToLinkedAssemblies(assembly, diagnostics);
            //}
        }