Release 3.0 Style cop 4.7.17 compliance and trivial changes

There is a list all trivial of changes:

CompilerServiceBase.cs
var executeMethod = type.Members.OfType<CodeMemberMethod>().Where(m => m.Name.Equals("Execute")).Single();
to
var executeMethod = type.Members.OfType<CodeMemberMethod>().Single(m => m.Name.Equals("Execute"));

CompilerServiceBase.cs   Possible multiple enumeration of IEnumerable warning
 private static void GenerateConstructors(IEnumerable<ConstructorInfo> constructors, CodeTypeDeclaration codeType)
        {
            if (constructors == null || !constructors.Any())
                return;

        private static void GenerateConstructors(IEnumerable<ConstructorInfo> constructors, CodeTypeDeclaration codeType)
        {
            if (constructors == null)
            {
                return;
            }

            var constructorcollection = constructors.ToArray();

            if (constructorcollection.Length == 0)
            {
                return;
            }

RazorDynamicObject.cs       
       public override bool TryGetMember(GetMemberBinder binder, out object result)
            object value = prop.GetValue(this.Model, null);
            if (value == null)
            {
                result = value;
                return true;
            }
to
          object value = prop.GetValue(this.Model, null);
            if (value == null)
            {
                result = null;
                return true;
            }

XmlTemplateServiceConfiguration.cs        private void InitialiseConfiguration(string name)
            var serviceConfig = config.TemplateServices
                .OfType<TemplateServiceConfigurationElement>()
                .Where(t => t.Name.Equals(name, StringComparison.OrdinalIgnoreCase))
                .SingleOrDefault();
to
            var serviceConfig = config.TemplateServices
                .OfType<TemplateServiceConfigurationElement>()
                .SingleOrDefault(t => t.Name.Equals(name, StringComparison.OrdinalIgnoreCase));


        public static IEnumerable<string> ParseMany<T>(string razorTemplate, IEnumerable<T> models, bool parallel = false)
        {
            if (models == null)
            {
                throw new ArgumentException("Expected models list (this parameter may not be NULL).");
            }

            if (models.Count() == 0)
            {
                throw new ArgumentException("Expected at least one entry in models list.");
            }

            List<string> razorTemplateList = Enumerable.Repeat(razorTemplate, models.Count()).ToList();
            List<object> modelList = (from m in models select (object)m).ToList();
            return TemplateService.ParseMany(razorTemplateList, modelList, null, null, parallel);
        }

to

        public static IEnumerable<string> ParseMany<T>(string razorTemplate, IEnumerable<T> models, bool parallel = false)
        {
            if (models == null)
            {
                throw new ArgumentException("Expected models list (this parameter may not be NULL).");
            }

            var collection = models.ToArray();

            if (collection.Length == 0)
            {
                throw new ArgumentException("Expected at least one entry in models list.");
            }

            List<string> razorTemplateList = Enumerable.Repeat(razorTemplate, collection.Length).ToList();
            List<object> modelList = (from m in collection select (object)m).ToList();
            return TemplateService.ParseMany(razorTemplateList, modelList, null, null, parallel);
        }

        public static IEnumerable<Type> CreateTemplateTypes(IEnumerable<string> razorTemplates, Type modelType, bool parallel = false)
        {
            IEnumerable<Type> modelTypes = Enumerable.Repeat<Type>(modelType, razorTemplates.Count());
            return TemplateService.CreateTemplateTypes(razorTemplates, modelTypes, parallel);
        }
to
        public static IEnumerable<Type> CreateTemplateTypes(IEnumerable<string> razorTemplates, Type modelType, bool parallel = false)
        {
            var collection = razorTemplates.ToArray();
            IEnumerable<Type> modelTypes = Enumerable.Repeat(modelType, collection.Length);
            return TemplateService.CreateTemplateTypes(collection, modelTypes, parallel);
        }


        private Assembly ResolveAssembly(string name)
        {
            return _assemblies
                .Where(a => a.FullName.Equals(name))
                .FirstOrDefault();
        }
to
        private Assembly ResolveAssembly(string name)
        {
            return this._assemblies.FirstOrDefault(a => a.FullName.Equals(name));
        }


Redgate Perfomance profiler red flag (one of many, but trivial to fix)
        public static string GenerateClassName()
        {
            Guid guid = Guid.NewGuid();
            return Regex.Replace(guid.ToString("N"), @"[^A-Za-z]*", string.Empty);
        }

to C# class cannot start with digit so meanfull prefix added
        public static string GenerateClassName()
        {
            return "RazorEngineAuto" + Guid.NewGuid().ToString("N");
        }