private void CreateProfile(DWSettings settings)
 {
     // On crée le profil via l'intent CREATE_PROFILE
     // NB : on peut envoyer cet intent sans soucis même si le profil existe déjà
     // On perdrait plus de temps si on recherchait si le profil existe avant de lancer la création
     SendDataWedgeIntentWithExtraRequestResult(DataWedgeConstants.ACTION_DATAWEDGE_FROM_6_2,
                                               DataWedgeConstants.EXTRA_CREATE_PROFILE,
                                               settings.ProfileName);
 }
        public new void Execute(DWSettings settings, Action <CommandBaseResults> callback)
        {
            /*
             * Call base class Execute to register command result
             * broadcast receiver and launch timeout mechanism
             */
            base.Execute(settings, callback);

            /*
             * Create the profile
             */
            CreateProfile(settings);
        }
        protected virtual void Execute(DWSettings settings)
        {
            Settings = settings;

            if (mTimeOutAction == null)
            {
                mTimeOutAction = new Action(() =>
                {
                    OnError("TimeOut Reached");
                });
            }
            else
            {
                mTimeOutHandler.RemoveCallbacks(mTimeOutAction);
            }

            /*
             * Start time out mechanism
             */
            mTimeOutHandler.PostDelayed(mTimeOutAction, Settings.TimeOut);
        }
        protected virtual void Execute(DWSettings settings, Action <CommandBaseResults> callback)
        {
            /*
             * Launch timeout mechanism
             */
            base.Execute(settings);

            /*
             * Setup callback
             */
            mCommandBaseCallback = callback;

            IntentFilter intentFilter = new IntentFilter();

            intentFilter.AddAction(DataWedgeConstants.ACTION_RESULT_DATAWEDGE_FROM_6_2);
            intentFilter.AddCategory(Intent.CategoryDefault);

            /*
             * Register receiver for resutls
             */
            mContext.ApplicationContext.RegisterReceiver(mBroadcastReceiver, intentFilter);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="callback">
        ///     string: profileName -> the processed profile name
        ///     bool: exists -> true if the profile exists
        ///     string: error -> not null and not empty if an error occurred
        /// </param>
        public void Execute(DWSettings settings, Action <ActionResult> callback)
        {
            mProfileExistsCallback = callback;

            IntentFilter intentFilter = new IntentFilter();

            intentFilter.AddAction(DataWedgeConstants.ACTION_RESULT_DATAWEDGE_FROM_6_2);
            intentFilter.AddCategory(Intent.CategoryDefault);

            /*
             * Register receiver for resutls
             */
            mContext.ApplicationContext.RegisterReceiver(mBroadcastReceiver, intentFilter);

            /*
             * Ask for DataWedge profile list
             */
            SendDataWedgeIntentWithExtra(DataWedgeConstants.ACTION_DATAWEDGE_FROM_6_2, DataWedgeConstants.EXTRA_GET_PROFILES_LIST, DataWedgeConstants.EXTRA_EMPTY);

            /*
             * Launch timeout mechanism
             */
            base.Execute(settings);
        }