Beispiel #1
0
        private EntityCommand(string commandName, string description, EntityCommandKind kind)
        {
            CommandName = commandName;
            Description = description;
            Kind        = kind;
            AccessType  = Kind.GetAuthorizationAccessType();
            switch (Kind)
            {
            case EntityCommandKind.SelectAll:
            case EntityCommandKind.SelectAllPaged:
            case EntityCommandKind.SelectByKey:
            case EntityCommandKind.SelectByKeyManyToMany:
            case EntityCommandKind.SelectByKeyArray:
                Flags |= EntityCommandFlags.IsQuery;
                break;

            case EntityCommandKind.CustomSelect:
                Flags |= EntityCommandFlags.IsQuery | EntityCommandFlags.IsCustom;
                break;

            case EntityCommandKind.CustomInsert:
            case EntityCommandKind.CustomUpdate:
            case EntityCommandKind.CustomDelete:
                Flags |= EntityCommandFlags.IsCustom;
                break;
            }
        }
Beispiel #2
0
 private EntityCommand(string commandName, string description, EntityCommandKind kind)
 {
     CommandName = commandName;
       Description = description;
       Kind = kind;
       AccessType = Kind.GetAuthorizationAccessType();
       switch (Kind) {
     case EntityCommandKind.SelectAll: case EntityCommandKind.SelectAllPaged:
     case EntityCommandKind.SelectByKey:   case EntityCommandKind.SelectByKeyManyToMany:
     case EntityCommandKind.SelectByKeyArray:
       Flags |= EntityCommandFlags.IsQuery;
       break;
     case EntityCommandKind.CustomSelect:
       Flags |= EntityCommandFlags.IsQuery | EntityCommandFlags.IsCustom;
       break;
     case EntityCommandKind.CustomInsert: case EntityCommandKind.CustomUpdate: case EntityCommandKind.CustomDelete:
       Flags |= EntityCommandFlags.IsCustom;
       break;
       }
 }
 public static bool IsSet(this EntityCommandFlags flags, EntityCommandFlags flag)
 {
     return (flags & flag) != 0;
 }
 public static bool IsSet(this EntityCommandFlags flags, EntityCommandFlags flag)
 {
     return((flags & flag) != 0);
 }