Apply VS' FormatDocument and RemoveAndSort to all *.cs files
- #EngineeringDay - VS does not yet format auto-properties nicely; reverted what it did Also revert changes under - test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles
This commit is contained in:
parent
eedb08d75d
commit
315908af5f
|
|
@ -5,7 +5,7 @@ using Microsoft.AspNet.Mvc;
|
|||
|
||||
namespace MvcSample.Web.Components
|
||||
{
|
||||
[ViewComponent(Name="Tags")]
|
||||
[ViewComponent(Name = "Tags")]
|
||||
public class TagCloud : ViewComponent
|
||||
{
|
||||
private readonly string[] Tags =
|
||||
|
|
@ -13,7 +13,7 @@ namespace MvcSample.Web.Components
|
|||
"Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure " +
|
||||
"dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat" +
|
||||
"non proident, sunt in culpa qui officia deserunt mollit anim id est laborum")
|
||||
.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.OrderBy(s => Guid.NewGuid().ToString())
|
||||
.ToArray();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.AspNet.Mvc;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace MvcSample.Web.ApiExplorerSamples
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MvcSample.Web.ApiExplorerSamples
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace MvcSample.Web.Filters
|
|||
{
|
||||
if (age is int)
|
||||
{
|
||||
var intAge = (int) age;
|
||||
var intAge = (int)age;
|
||||
|
||||
if (intAge < 21)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace MvcSample.Web.Filters
|
|||
user.Identity == null ||
|
||||
!user.Identity.IsAuthenticated;
|
||||
|
||||
if(userIsAnonymous)
|
||||
if (userIsAnonymous)
|
||||
{
|
||||
base.Fail(context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Filters;
|
||||
|
||||
namespace MvcSample.Web
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace MvcSample.Web
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Filters;
|
||||
|
||||
namespace MvcSample.Web
|
||||
{
|
||||
public class PassThroughAttribute : AuthorizationFilterAttribute
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
#pragma warning disable 1998
|
||||
public override async Task OnAuthorizationAsync(AuthorizationContext context)
|
||||
{
|
||||
}
|
||||
#pragma warning restore 1998
|
||||
#pragma warning restore 1998
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace MvcSample.Web.Filters
|
||||
{
|
||||
public class UserNameService
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
|
||||
namespace MvcSample.Web
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
|
||||
namespace MvcSample.Web.ApiExplorerSamples
|
||||
namespace MvcSample.Web.ApiExplorerSamples
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
|
||||
namespace MvcSample.Web.ApiExplorerSamples
|
||||
namespace MvcSample.Web.ApiExplorerSamples
|
||||
{
|
||||
public class ProductOrderConfirmation
|
||||
{
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace MvcSample.Web
|
|||
_instances.Clear();
|
||||
_registrations.Clear();
|
||||
|
||||
// return count;
|
||||
// return count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,17 +5,17 @@ using System;
|
|||
|
||||
namespace MvcSample.Web.Services
|
||||
{
|
||||
public interface ITestService
|
||||
{
|
||||
string GetFoo();
|
||||
}
|
||||
public interface ITestService
|
||||
{
|
||||
string GetFoo();
|
||||
}
|
||||
|
||||
|
||||
public class TestService : ITestService
|
||||
{
|
||||
public string GetFoo()
|
||||
{
|
||||
return "Hello world " + DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
public class TestService : ITestService
|
||||
{
|
||||
public string GetFoo()
|
||||
{
|
||||
return "Hello world " + DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if ASPNET50
|
||||
using System.Net;
|
||||
#endif
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,12 +4,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Microsoft.Framework.OptionsModel;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -2,16 +2,18 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
#if ASPNET50
|
||||
using System.Runtime.Serialization;
|
||||
#endif
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
/// <summary>
|
||||
/// An exception which indicates multiple matches in action selection.
|
||||
/// </summary>
|
||||
#if ASPNET50
|
||||
#if ASPNET50
|
||||
[Serializable]
|
||||
#endif
|
||||
#endif
|
||||
public class AmbiguousActionException : InvalidOperationException
|
||||
{
|
||||
public AmbiguousActionException(string message)
|
||||
|
|
@ -19,11 +21,11 @@ namespace Microsoft.AspNet.Mvc
|
|||
{
|
||||
}
|
||||
|
||||
#if ASPNET50
|
||||
#if ASPNET50
|
||||
protected AmbiguousActionException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.AspNet.Security.DataProtection;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Microsoft.Framework.OptionsModel;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
@ -80,7 +79,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
/// <param name="context">The HTTP context associated with the current call.</param>
|
||||
public async Task ValidateAsync([NotNull] HttpContext context)
|
||||
{
|
||||
await _worker.ValidateAsync(context);
|
||||
await _worker.ValidateAsync(context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
|
|
|||
|
|
@ -158,11 +158,11 @@ namespace Microsoft.AspNet.Mvc
|
|||
oldCookieToken);
|
||||
|
||||
return new AntiForgeryTokenSetInternal()
|
||||
{
|
||||
// Note : The new cookie would be null if the old cookie is valid.
|
||||
CookieToken = newCookieToken,
|
||||
FormToken = formToken
|
||||
};
|
||||
{
|
||||
// Note : The new cookie would be null if the old cookie is valid.
|
||||
CookieToken = newCookieToken,
|
||||
FormToken = formToken
|
||||
};
|
||||
}
|
||||
|
||||
private string Serialize(AntiForgeryToken token)
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@
|
|||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Microsoft.AspNet.Security.DataProtection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Security.Claims;
|
||||
using System.Security.Principal;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Security.Claims;
|
||||
using System.Security.Principal;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Security.Claims;
|
||||
using System.Security.Principal;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.AspNet.Routing;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Microsoft.AspNet.Mvc.Filters;
|
||||
using Microsoft.AspNet.Mvc.ApplicationModels;
|
||||
using Microsoft.AspNet.Mvc.Filters;
|
||||
using Microsoft.Framework.OptionsModel;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
@ -103,9 +102,9 @@ namespace Microsoft.AspNet.Mvc
|
|||
}
|
||||
|
||||
return new ObjectResult(actionReturnValue)
|
||||
{
|
||||
DeclaredType = actualReturnType
|
||||
};
|
||||
{
|
||||
DeclaredType = actualReturnType
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
{
|
||||
public static class DefaultOrder
|
||||
{
|
||||
/// <summary>
|
||||
/// The default order for sorting is -1000. Other framework code
|
||||
/// the depends on order should be ordered between -1 to -1999.
|
||||
/// User code should order at bigger than 0 or smaller than -2000.
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// The default order for sorting is -1000. Other framework code
|
||||
/// the depends on order should be ordered between -1 to -1999.
|
||||
/// User code should order at bigger than 0 or smaller than -2000.
|
||||
/// </summary>
|
||||
public static readonly int DefaultFrameworkSortOrder = -1000;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ namespace Microsoft.AspNet.Mvc.Description
|
|||
templateParameter,
|
||||
parameterDescriptor);
|
||||
}
|
||||
else if(templateParameter == null && parameterDescriptor != null)
|
||||
else if (templateParameter == null && parameterDescriptor != null)
|
||||
{
|
||||
// The parameter is part of the ActionDescriptor but is not part of the route template.
|
||||
parameterDescription = CreateParameterFromParameterDescriptor(parameterDescriptor);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ using System.Linq;
|
|||
using System.Runtime.ExceptionServices;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc.Filters;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ namespace Microsoft.AspNet.Mvc
|
|||
{
|
||||
public int Order { get; set; }
|
||||
|
||||
#pragma warning disable 1998
|
||||
#pragma warning disable 1998
|
||||
public virtual async Task OnAuthorizationAsync([NotNull] AuthorizationContext context)
|
||||
{
|
||||
OnAuthorization(context);
|
||||
}
|
||||
#pragma warning restore 1998
|
||||
#pragma warning restore 1998
|
||||
|
||||
public virtual void OnAuthorization([NotNull] AuthorizationContext context)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@ namespace Microsoft.AspNet.Mvc
|
|||
user.Identity == null ||
|
||||
!user.Identity.IsAuthenticated;
|
||||
|
||||
if (userIsAnonymous && !HasAllowAnonymous(context))
|
||||
{
|
||||
Fail(context);
|
||||
}
|
||||
if (userIsAnonymous && !HasAllowAnonymous(context))
|
||||
{
|
||||
Fail(context);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Microsoft.Framework.OptionsModel;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ namespace Microsoft.AspNet.Mvc
|
|||
{
|
||||
public int Order { get; set; }
|
||||
|
||||
#pragma warning disable 1998
|
||||
#pragma warning disable 1998
|
||||
public virtual async Task OnExceptionAsync([NotNull] ExceptionContext context)
|
||||
{
|
||||
OnException(context);
|
||||
}
|
||||
#pragma warning restore 1998
|
||||
#pragma warning restore 1998
|
||||
|
||||
public virtual void OnException([NotNull] ExceptionContext context)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Microsoft.Framework.OptionsModel;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if ASPNET50
|
||||
using System;
|
||||
#endif
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if ASPNET50
|
||||
using System.Runtime.Serialization;
|
||||
#endif
|
||||
using System.Xml;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
// ignore the contentType and just look at the content.
|
||||
// This formatter will be selected if the content is null.
|
||||
// We check for Task as a user can directly create an ObjectContentResult with the unwrapped type.
|
||||
if(context.DeclaredType == typeof(void) || context.DeclaredType == typeof(Task))
|
||||
if (context.DeclaredType == typeof(void) || context.DeclaredType == typeof(Task))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,12 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Internal
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.OptionDescriptors
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
using Microsoft.AspNet.Mvc.OptionDescriptors;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
|
|
|
|||
|
|
@ -851,58 +851,58 @@ namespace Microsoft.AspNet.Mvc.Rendering
|
|||
var usedModelState = false;
|
||||
switch (inputType)
|
||||
{
|
||||
case InputType.CheckBox:
|
||||
var modelStateWasChecked = GetModelStateValue(viewContext, fullName, typeof(bool)) as bool?;
|
||||
if (modelStateWasChecked.HasValue)
|
||||
{
|
||||
isChecked = modelStateWasChecked.Value;
|
||||
usedModelState = true;
|
||||
}
|
||||
|
||||
goto case InputType.Radio;
|
||||
|
||||
case InputType.Radio:
|
||||
if (!usedModelState)
|
||||
{
|
||||
var modelStateValue = GetModelStateValue(viewContext, fullName, typeof(string)) as string;
|
||||
if (modelStateValue != null)
|
||||
case InputType.CheckBox:
|
||||
var modelStateWasChecked = GetModelStateValue(viewContext, fullName, typeof(bool)) as bool?;
|
||||
if (modelStateWasChecked.HasValue)
|
||||
{
|
||||
isChecked = string.Equals(modelStateValue, valueParameter, StringComparison.Ordinal);
|
||||
isChecked = modelStateWasChecked.Value;
|
||||
usedModelState = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!usedModelState && useViewData)
|
||||
{
|
||||
isChecked = EvalBoolean(viewContext, fullName);
|
||||
}
|
||||
goto case InputType.Radio;
|
||||
|
||||
if (isChecked)
|
||||
{
|
||||
tagBuilder.MergeAttribute("checked", "checked");
|
||||
}
|
||||
case InputType.Radio:
|
||||
if (!usedModelState)
|
||||
{
|
||||
var modelStateValue = GetModelStateValue(viewContext, fullName, typeof(string)) as string;
|
||||
if (modelStateValue != null)
|
||||
{
|
||||
isChecked = string.Equals(modelStateValue, valueParameter, StringComparison.Ordinal);
|
||||
usedModelState = true;
|
||||
}
|
||||
}
|
||||
|
||||
tagBuilder.MergeAttribute("value", valueParameter, isExplicitValue);
|
||||
break;
|
||||
if (!usedModelState && useViewData)
|
||||
{
|
||||
isChecked = EvalBoolean(viewContext, fullName);
|
||||
}
|
||||
|
||||
if (isChecked)
|
||||
{
|
||||
tagBuilder.MergeAttribute("checked", "checked");
|
||||
}
|
||||
|
||||
case InputType.Password:
|
||||
if (value != null)
|
||||
{
|
||||
tagBuilder.MergeAttribute("value", valueParameter, isExplicitValue);
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
case InputType.Password:
|
||||
if (value != null)
|
||||
{
|
||||
tagBuilder.MergeAttribute("value", valueParameter, isExplicitValue);
|
||||
}
|
||||
|
||||
case InputType.Text:
|
||||
default:
|
||||
var attributeValue = (string)GetModelStateValue(viewContext, fullName, typeof(string));
|
||||
if (attributeValue == null)
|
||||
{
|
||||
attributeValue = useViewData ? EvalString(viewContext, fullName, format) : valueParameter;
|
||||
}
|
||||
break;
|
||||
|
||||
tagBuilder.MergeAttribute("value", attributeValue, replaceExisting: isExplicitValue);
|
||||
break;
|
||||
case InputType.Text:
|
||||
default:
|
||||
var attributeValue = (string)GetModelStateValue(viewContext, fullName, typeof(string));
|
||||
if (attributeValue == null)
|
||||
{
|
||||
attributeValue = useViewData ? EvalString(viewContext, fullName, format) : valueParameter;
|
||||
}
|
||||
|
||||
tagBuilder.MergeAttribute("value", attributeValue, replaceExisting: isExplicitValue);
|
||||
break;
|
||||
}
|
||||
|
||||
if (setId)
|
||||
|
|
@ -993,18 +993,18 @@ namespace Microsoft.AspNet.Mvc.Rendering
|
|||
{
|
||||
switch (inputType)
|
||||
{
|
||||
case InputType.CheckBox:
|
||||
return "checkbox";
|
||||
case InputType.Hidden:
|
||||
return "hidden";
|
||||
case InputType.Password:
|
||||
return "password";
|
||||
case InputType.Radio:
|
||||
return "radio";
|
||||
case InputType.Text:
|
||||
return "text";
|
||||
default:
|
||||
return "text";
|
||||
case InputType.CheckBox:
|
||||
return "checkbox";
|
||||
case InputType.Hidden:
|
||||
return "hidden";
|
||||
case InputType.Password:
|
||||
return "password";
|
||||
case InputType.Radio:
|
||||
return "radio";
|
||||
case InputType.Text:
|
||||
return "text";
|
||||
default:
|
||||
return "text";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -234,15 +234,15 @@ namespace Microsoft.AspNet.Mvc.Rendering
|
|||
{
|
||||
switch (testChar)
|
||||
{
|
||||
case '-':
|
||||
case '_':
|
||||
case ':':
|
||||
// Note '.' is valid according to the HTML 4.01 specification. Disallowed here to avoid confusion
|
||||
// with CSS class selectors or when using jQuery.
|
||||
return true;
|
||||
case '-':
|
||||
case '_':
|
||||
case ':':
|
||||
// Note '.' is valid according to the HTML 4.01 specification. Disallowed here to avoid confusion
|
||||
// with CSS class selectors or when using jQuery.
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc.ApplicationModels;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
using Microsoft.AspNet.Mvc.OptionDescriptors;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if ASPNET50
|
||||
using System.ComponentModel;
|
||||
#endif
|
||||
using System.Diagnostics;
|
||||
using Microsoft.AspNet.Mvc.Internal.DecisionTree;
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ namespace Microsoft.AspNet.Mvc.Routing
|
|||
}
|
||||
}
|
||||
|
||||
if (_logger.IsEnabled(LogLevel.Verbose))
|
||||
if (_logger.IsEnabled(LogLevel.Verbose))
|
||||
{
|
||||
_logger.WriteValues(new AttributeRouteRouteAsyncValues()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Routing.Template;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Routing
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Routing;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
@ -22,11 +20,11 @@ namespace Microsoft.AspNet.Mvc
|
|||
formatter.WriteObject(context.Writer, Data);
|
||||
}
|
||||
|
||||
#pragma warning disable 1998
|
||||
#pragma warning disable 1998
|
||||
public async Task ExecuteAsync([NotNull] ViewComponentContext context)
|
||||
{
|
||||
Execute(context);
|
||||
}
|
||||
#pragma warning restore 1998
|
||||
#pragma warning restore 1998
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc.Core;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc
|
||||
|
|
|
|||
|
|
@ -36,14 +36,14 @@ namespace Microsoft.AspNet.Mvc.HeaderValueAbstractions
|
|||
}
|
||||
|
||||
headerValue = new MediaTypeWithQualityHeaderValue()
|
||||
{
|
||||
MediaType = mediaTypeHeaderValue.MediaType,
|
||||
MediaSubType = mediaTypeHeaderValue.MediaSubType,
|
||||
MediaTypeRange = mediaTypeHeaderValue.MediaTypeRange,
|
||||
Charset = mediaTypeHeaderValue.Charset,
|
||||
Parameters = mediaTypeHeaderValue.Parameters,
|
||||
Quality = quality,
|
||||
};
|
||||
{
|
||||
MediaType = mediaTypeHeaderValue.MediaType,
|
||||
MediaSubType = mediaTypeHeaderValue.MediaSubType,
|
||||
MediaTypeRange = mediaTypeHeaderValue.MediaTypeRange,
|
||||
Charset = mediaTypeHeaderValue.Charset,
|
||||
Parameters = mediaTypeHeaderValue.Parameters,
|
||||
Quality = quality,
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace Microsoft.AspNet.Mvc.HeaderValueAbstractions
|
|||
public static StringWithQualityHeaderValue Parse(string input)
|
||||
{
|
||||
StringWithQualityHeaderValue headerValue;
|
||||
if(!TryParse(input, out headerValue))
|
||||
if (!TryParse(input, out headerValue))
|
||||
{
|
||||
throw new ArgumentException(Resources.FormatInvalidAcceptCharset(input));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.ModelBinding
|
||||
{
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
|
||||
return new ParameterInformation
|
||||
{
|
||||
Prototype = metadataProtoType
|
||||
Prototype = metadataProtoType
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.ModelBinding
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.ModelBinding
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.ModelBinding
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.Razor.Generator.Compiler;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Razor.Directives
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Razor
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains information for the <see cref="ITagHelper"/> attribute code generation process.
|
||||
/// Contains information for the <see cref="Microsoft.AspNet.Razor.Runtime.TagHelpers.ITagHelper"/> attribute code
|
||||
/// generation process.
|
||||
/// </summary>
|
||||
public class GeneratedTagHelperAttributeContext
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Microsoft.AspNet.Razor.Generator;
|
||||
using Microsoft.AspNet.Razor.Generator.Compiler.CSharp;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.FileSystems;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Razor
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,6 +65,6 @@ namespace Microsoft.AspNet.Mvc.Razor
|
|||
/// <summary>
|
||||
/// Gets a flag that indicates if the file is precompiled.
|
||||
/// </summary>
|
||||
public bool IsPreCompiled { get { return Hash != null; } }
|
||||
public bool IsPreCompiled { get { return Hash != null; } }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ using System.Diagnostics;
|
|||
using System.Globalization;
|
||||
using Microsoft.AspNet.Mvc.Razor.OptionDescriptors;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.Razor
|
||||
{
|
||||
|
|
|
|||
|
|
@ -161,36 +161,36 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
|
|||
TagBuilder tagBuilder;
|
||||
switch (inputType)
|
||||
{
|
||||
case "checkbox":
|
||||
GenerateCheckBox(metadata, output);
|
||||
return;
|
||||
case "checkbox":
|
||||
GenerateCheckBox(metadata, output);
|
||||
return;
|
||||
|
||||
case "hidden":
|
||||
tagBuilder = Generator.GenerateHidden(
|
||||
ViewContext,
|
||||
metadata,
|
||||
For.Name,
|
||||
value: metadata.Model,
|
||||
useViewData: false,
|
||||
htmlAttributes: null);
|
||||
break;
|
||||
case "hidden":
|
||||
tagBuilder = Generator.GenerateHidden(
|
||||
ViewContext,
|
||||
metadata,
|
||||
For.Name,
|
||||
value: metadata.Model,
|
||||
useViewData: false,
|
||||
htmlAttributes: null);
|
||||
break;
|
||||
|
||||
case "password":
|
||||
tagBuilder = Generator.GeneratePassword(
|
||||
ViewContext,
|
||||
metadata,
|
||||
For.Name,
|
||||
value: null,
|
||||
htmlAttributes: null);
|
||||
break;
|
||||
case "password":
|
||||
tagBuilder = Generator.GeneratePassword(
|
||||
ViewContext,
|
||||
metadata,
|
||||
For.Name,
|
||||
value: null,
|
||||
htmlAttributes: null);
|
||||
break;
|
||||
|
||||
case "radio":
|
||||
tagBuilder = GenerateRadio(metadata);
|
||||
break;
|
||||
case "radio":
|
||||
tagBuilder = GenerateRadio(metadata);
|
||||
break;
|
||||
|
||||
default:
|
||||
tagBuilder = GenerateTextBox(metadata, inputTypeHint, inputType);
|
||||
break;
|
||||
default:
|
||||
tagBuilder = GenerateTextBox(metadata, inputTypeHint, inputType);
|
||||
break;
|
||||
}
|
||||
|
||||
if (tagBuilder != null)
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.AspNet.Razor.TagHelpers;
|
||||
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
|
||||
using Microsoft.AspNet.Razor.TagHelpers;
|
||||
|
||||
namespace Microsoft.AspNet.Mvc.TagHelpers
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
|
||||
namespace System.Web.Http
|
||||
{
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue