Exemplo n.º 1
0
 public FakeOrganzationService ExpectDelete(DeleteDelegate action)
 {
     _operations.Add(new OrganizationServiceStep()
     {
         Delete = action
     });
     return(this);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Attach default methods to the delegates. If there isn't specified concrete methods the default
        /// are executed. There is no difference in the parameter order.
        /// </summary>
        /// <param name="delegates">
        /// A <see cref="System.Delegate"/>
        /// Methods to handle the cache system functionality.
        /// </param>
        public CacheManager(params Delegate[] delegates)
        {
            this.storage = new Dictionary <TKey, CacheItem>();

            foreach (Delegate d in delegates)
            {
                if (d is InitDelegate)
                {
                    this.initDelegate = (InitDelegate)d;
                }
                else if (d is TouchDelegate)
                {
                    this.touchDelegate = (TouchDelegate)d;
                }
                else if (d is ValidateDelegate)
                {
                    this.validateDelegate = (ValidateDelegate)d;
                }
                else if (d is CalculateDelegate)
                {
                    this.calculateDelegate = (CalculateDelegate)d;
                }
                else if (d is UpdateDelegate)
                {
                    this.updateDelegate = (UpdateDelegate)d;
                }
                else if (d is DeleteDelegate)
                {
                    this.deleteDelegate = (DeleteDelegate)d;
                }
            }

            if (this.initDelegate == null)
            {
                this.initDelegate = DefaultInitDelegate;
            }
            if (this.touchDelegate == null)
            {
                this.touchDelegate = DefaultTouchDelegate;
            }
            if (this.validateDelegate == null)
            {
                this.validateDelegate = DefaultValidateDelegate;
            }
            if (this.calculateDelegate == null)
            {
                this.calculateDelegate = DefaultCalculateDelegate;
            }
            if (this.updateDelegate == null)
            {
                this.updateDelegate = DefaultUpdateDelegate;
            }
            if (this.deleteDelegate == null)
            {
                this.deleteDelegate = DefaultDeleteDelegate;
            }
        }
Exemplo n.º 3
0
 static CallbackHandler()
 {
     readCB   = new ReadDelegate(read);
     writeCB  = new ReadDelegate(write);
     seekCB   = new SeekDelegate(seek);
     closeCB  = new CloseDelegate(close);
     tellCB   = new TellDelegate(tell);
     eofCB    = new EofDelegate(eof);
     deleteCB = new DeleteDelegate(deleted);
 }
Exemplo n.º 4
0
        public void Inicializar(TablaBase objetoDTO, CreateDelegate create, ReadDelegate read, UpdateDelegate update, DeleteDelegate delete, params ABMControl[] controls)
        {
            ObjetoDTO = objetoDTO;

            this.create     = create;
            this.ReadMethod = read;
            this.update     = update;
            this.delete     = delete;

            BuildControls(controls);
        }
Exemplo n.º 5
0
        public void Inicializar(BusinessMapper.eEntities entidad)
        {
            ObjetoDTO = DTOHelper.InstanciarObjetoPorNombreDeTabla(entidad.ToString());
            Entidad   = entidad;
            dao       = BusinessMapper.GetDaoByEntity(entidad);

            this.create     = Create;
            this.update     = Update;
            this.ReadMethod = Read;
            this.delete     = Delete;

            List <ABMControl> controls = GetControlsByEntity(entidad);

            BuildControls(controls.ToArray());
        }
        public PlaylistNodeViewModel(IPlaylist item, IDataSource dataSource, IContextMenuStrategy menu, DeleteDelegate delete, bool isLargeItems)
            : base(dataSource, menu, isLargeItems)
        {
            _delete        = delete;
            _deleteCommand = new RelayCommand(Delete);

            _id = item.Id;
            if (item.Snippet != null)
            {
                Title       = item.Snippet.Title;
                ImagePath   = item.Snippet.Thumbnails.GetThumbnailUrl();
                PublishedAt = item.Snippet.PublishedAt;
            }
            if (item.ContentDetails == null)
            {
                return;
            }

            ItemsCount = item.ContentDetails.ItemCount;
        }
Exemplo n.º 7
0
 public DeleteRestaurant()
 {
     InitializeComponent();
     deleteDel = LoadRestaurant;
     deleteDel.Invoke();
 }
Exemplo n.º 8
0
 void RemoveIconClicked(object sender, EventArgs e)
 {
     DeleteDelegate?.Invoke(this.indexText);
 }
Exemplo n.º 9
0
        private static extern IntPtr ManagedStream_create(ReadDelegate readCB, ReadDelegate writeCB, SeekDelegate seekCB, CloseDelegate closeCB, TellDelegate tellCB, EofDelegate eofCB, DeleteDelegate deleteCB
#if FULL_AOT_COMPILE
                                                          , IntPtr instanceHandle
#endif
                                                          );
Exemplo n.º 10
0
        public void Inicializar(TablaBase objetoDTO, CreateDelegate create, ReadDelegate read, UpdateDelegate update, DeleteDelegate delete, params ABMControl[] controls)
        {
            ObjetoDTO = objetoDTO;

            this.create     = create;
            this.ReadMethod = read;
            this.update     = update;
            this.delete     = delete;

            BuildControls(controls);
        }
Exemplo n.º 11
0
        public void Inicializar(BusinessMapper.eEntities entidad)
        {
            ObjetoDTO       = DTOHelper.InstanciarObjetoPorNombreDeTabla(entidad.ToString());
            Entidad         = entidad;
            dao             = BusinessMapper.GetDaoByEntity(entidad);

            this.create     = Create;
            this.update     = Update;
            this.ReadMethod = Read;
            this.delete     = Delete;

            List<ABMControl> controls = GetControlsByEntity(entidad);
            BuildControls(controls.ToArray());
        }