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>() ) {}
public static ICommand <ModelEntity, DeleteEntity> ToOnDeleteEntityHandler <T>(this ICommand <T, DeleteEntity> cmd) where T : ModelEntity { return(cmd.Adapt((ModelEntity entity) => entity.TryCast <T>())); }
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>())); }
public static ICommand <ModelEntity, EntityModified> ToEntityCreatedHandler <T>(this ICommand <T, EntityModified> cmd) where T : ModelEntity { return(cmd.Adapt((ModelEntity entity) => entity.TryCast <T>())); }