Converted from .NET 4.5 to 3.5