Antaris/RazorEngine — pull request #51 by Jbaltika (2012-05-22 14:42:57+00:00)
Title: 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().Where(m => m.Name.Equals("Execute")).Single();
to
var executeMethod = type.Members.OfType().Single(m => m.Name.Equals("Execute"));

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

private static void GenerateConstructors(IEnumerable 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()
.Where(t => t.Name.Equals(name, StringComparison.OrdinalIgnoreCase))
.SingleOrDefault();
to
var serviceConfig = config.TemplateServices
.OfType()
.SingleOrDefault(t => t.Name.Equals(name, StringComparison.OrdinalIgnoreCase));

public static IEnumerable ParseMany(string razorTemplate, IEnumerable 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 razorTemplateList = Enumerable.Repeat(razorTemplate, models.Count()).ToList();
List