当前位置: 首页>>代码示例>>C#>>正文


C# SiteController.GetAttributesOn方法代码示例

本文整理汇总了C#中AllReady.Areas.Admin.Controllers.SiteController.GetAttributesOn方法的典型用法代码示例。如果您正苦于以下问题:C# SiteController.GetAttributesOn方法的具体用法?C# SiteController.GetAttributesOn怎么用?C# SiteController.GetAttributesOn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AllReady.Areas.Admin.Controllers.SiteController的用法示例。


在下文中一共展示了SiteController.GetAttributesOn方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RevokeOrganizationAdminHasHttpGetAttribute

 public void RevokeOrganizationAdminHasHttpGetAttribute()
 {
     var controller = new SiteController(null, null,null);
     var attribute = controller.GetAttributesOn(x => x.RevokeOrganizationAdmin(It.IsAny<string>())).OfType<HttpGetAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:6,代码来源:SiteAdminControllerShould.cs

示例2: DeleteUserHasHttpGetAttribute

 public void DeleteUserHasHttpGetAttribute()
 {
     var controller = new SiteController(null, null, null);
     var attribute = controller.GetAttributesOn(x => x.DeleteUser(It.IsAny<string>())).OfType<HttpGetAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:6,代码来源:SiteAdminControllerShould.cs

示例3: AssignOrganizationAdminPostHasValidateAntiForgeryTokenAttribute

 public void AssignOrganizationAdminPostHasValidateAntiForgeryTokenAttribute()
 {
     var controller = new SiteController(null, null, null);
     var attribute = controller.GetAttributesOn(x => x.AssignOrganizationAdmin(It.IsAny<AssignOrganizationAdminModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:6,代码来源:SiteAdminControllerShould.cs

示例4: AssignOrganizationAdminPostHasHttpPostAttribute

        public void AssignOrganizationAdminPostHasHttpPostAttribute()
        {
            var mediator = new Mock<IMediator>();
            var controller = new SiteController(null, null, mediator.Object);

            var model = new AssignOrganizationAdminModel { UserId = It.IsAny<string>(), OrganizationId = It.IsAny<int>() };

            var attribute = controller.GetAttributesOn(x => x.AssignOrganizationAdmin(model)).OfType<HttpPostAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
        }
开发者ID:yobenzima,项目名称:allReady,代码行数:11,代码来源:SiteAdminControllerShould.cs

示例5: EditUserPostHasValidateAntiForgeryTokenAttribute

 public void EditUserPostHasValidateAntiForgeryTokenAttribute()
 {
     var controller = new SiteController(null, null, null);
     var attribute = controller.GetAttributesOn(x => x.EditUser(It.IsAny<EditUserModel>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
开发者ID:yobenzima,项目名称:allReady,代码行数:6,代码来源:SiteAdminControllerShould.cs

示例6: ConfirmDeletUserHasValidateAntiForgeryTokenAttribute

        public void ConfirmDeletUserHasValidateAntiForgeryTokenAttribute()
        {            
            var controller = new SiteController(null, null, null);
            var attribute = controller.GetAttributesOn(x => x.ConfirmDeleteUser(It.IsAny<string>())).OfType<ValidateAntiForgeryTokenAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
        }
开发者ID:yobenzima,项目名称:allReady,代码行数:7,代码来源:SiteAdminControllerShould.cs

示例7: EditUserPostHasHttpPostAttribute

 public void EditUserPostHasHttpPostAttribute()
 {
     var controller = new SiteController(null, null, null);
     var attribute = controller.GetAttributesOn(x => x.EditUser(It.IsAny<EditUserViewModel>())).OfType<HttpPostAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
 }
开发者ID:mheggeseth,项目名称:allReady,代码行数:6,代码来源:SiteAdminControllerShould.cs


注:本文中的AllReady.Areas.Admin.Controllers.SiteController.GetAttributesOn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。