public static IEnumerable <IApplicationCommand> OnBeforeShow(DataMap dataMap, ApplicationSchemaDefinition application) { var context = new OnBeforeShowContext(application, MetadataRepository, User.Current); var behavior = GetBehavior(context.Application); behavior.OnBeforeShow(context, dataMap); return(context.Commands); }
/// <summary> /// Invoked just before a data map is binded and displayed by /// an UI. This method can be used to evaluate which commands /// are available or perform any related tasks. /// </summary> /// <param name="context">The operation context.</param> /// <param name="dataMap">The data map that is about to be displayed by the UI.</param> public virtual void OnBeforeShow(OnBeforeShowContext context, DataMap dataMap) { // Let's iterate through the list of all commands // giving them opportunity to indicate they are // available to be interacted with by the user. foreach (var command in _commands) { command.Register(context, dataMap); } }