Beispiel #1
0
 internal static ApiVersion GetRemovedVersion(this ICommonModel model)
 {
     return(model.Attributes
            .OfType <RemovedAsOfApiVersionAttribute>()
            .Select(a => a.Version)
            .SingleOrDefault());
 }
Beispiel #2
0
 internal static ApiVersion GetIntroducedVersion(this ICommonModel model)
 {
     return(model.Attributes
            .OfType <IntroducedInApiVersionAttribute>()
            .Select(a => a.Version)
            .SingleOrDefault());
 }
        public CommonView(CommonModel model)
        {
            InitializeComponent();

            Model = model;
            var vm = new CommonViewModel(model);

            DataContext = vm;
        }
 private bool IsAllowAnonymousAction(ICommonModel action)
 {
     return(action.Attributes.Any(x => x.GetType() == typeof(AllowAnonymousAttribute)));
 }
Beispiel #5
0
 private static bool IsUmbracoApiController(ICommonModel controller)
 => controller.Attributes.OfType <UmbracoApiControllerAttribute>().Any();
 private static bool IsInternalController(ICommonModel controller)
 {
     return(controller.Attributes.OfType <InternalControllerAttribute>().Any());
 }