Example #1
0
 public static ICommand <Option <ModelEntity>, object> ToMenuHandler <T, R>(this ICommand <T, R> cmd)
     where T : ModelEntity
     where R : class
 {
     return(cmd.Adapt((Option <ModelEntity> ci) => from e in ci
                      from t in e.TryCast <T>()
                      select t));
 }
		protected CommandAttributeBase( ICommand command ) : this( command.Adapt<AutoData>() ) {}
Example #3
0
 public static ICommand <ModelEntity, DeleteEntity> ToOnDeleteEntityHandler <T>(this ICommand <T, DeleteEntity> cmd)
     where T : ModelEntity
 {
     return(cmd.Adapt((ModelEntity entity) => entity.TryCast <T>()));
 }
Example #4
0
 public static ICommand <ModelEntity, object> ToEntityModifiedHandler <T, R>(this ICommand <T, R> cmd)
     where T : ModelEntity
     where R : class
 {
     return(cmd.Adapt((ModelEntity entity) => entity.TryCast <T>()));
 }
Example #5
0
 public static ICommand <ModelEntity, EntityModified> ToEntityCreatedHandler <T>(this ICommand <T, EntityModified> cmd)
     where T : ModelEntity
 {
     return(cmd.Adapt((ModelEntity entity) => entity.TryCast <T>()));
 }