Example #1
0
        private bool AssemblyAllowed(Assembly ass)
        {
            string name         = ass.GetName().Name;
            int    assemblyHash = this.GetAssemblyHash(ass);
            bool   flag         = false;

            for (int index = 0; index < this.allowedAssemblies.Length; ++index)
            {
                InjectionDetector.AllowedAssembly allowedAssembly = this.allowedAssemblies[index];
                if (allowedAssembly.name == name && Array.IndexOf <int>(allowedAssembly.hashes, assemblyHash) != -1)
                {
                    flag = true;
                    break;
                }
            }
            return(flag);
        }
        private bool AssemblyAllowed(Assembly ass)
        {
            string name         = ass.GetName().Name;
            int    assemblyHash = this.GetAssemblyHash(ass);
            bool   result       = false;

            for (int i = 0; i < this.allowedAssemblies.Length; i++)
            {
                InjectionDetector.AllowedAssembly allowedAssembly = this.allowedAssemblies[i];
                if (allowedAssembly.name == name && Array.IndexOf <int>(allowedAssembly.hashes, assemblyHash) != -1)
                {
                    result = true;
                    break;
                }
            }
            return(result);
        }