示例#1
0
        public virtual void RemoveCallback(Net.Vpc.Upa.Callback callback)
        {
            Net.Vpc.Upa.Impl.Config.Callback.DefaultCallback        dcallback = (Net.Vpc.Upa.Impl.Config.Callback.DefaultCallback)callback;
            System.Collections.Generic.IDictionary <string, object> conf      = dcallback.GetConfiguration();
            //        if (conf == null) {
            //            conf = new HashMap<String, Object>();
            //        }
            bool   fireBefore         = true;
            bool   fireAfter          = true;
            bool   trackSystemObjects = true;
            string nameFilter         = null;

            if (conf != null)
            {
                if (conf.ContainsKey("before"))
                {
                    fireBefore = ((bool?)Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <string, object>(conf, "before")).Value;
                }
                if (conf.ContainsKey("after"))
                {
                    fireBefore = ((bool?)Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <string, object>(conf, "after")).Value;
                }
                if (conf.ContainsKey("trackSystemObjects"))
                {
                    trackSystemObjects = ((bool?)Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <string, object>(conf, "trackSystemObjects")).Value;
                }
                nameFilter = (string)Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <string, object>(conf, "nameFilter");
            }
            if (Net.Vpc.Upa.Impl.Util.StringUtils.IsNullOrEmpty(nameFilter))
            {
                nameFilter = null;
            }
            Net.Vpc.Upa.Impl.Util.CallbackInvokerKey k = new Net.Vpc.Upa.Impl.Util.CallbackInvokerKey(callback.GetCallbackType(), callback.GetObjectType(), nameFilter, trackSystemObjects);
            System.Collections.Generic.IList <Net.Vpc.Upa.Callback> ss = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <Net.Vpc.Upa.Impl.Util.CallbackInvokerKey, System.Collections.Generic.IList <Net.Vpc.Upa.Callback> >(before, k);
            if (ss != null)
            {
                ss.Remove(callback);
            }
            ss = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <Net.Vpc.Upa.Impl.Util.CallbackInvokerKey, System.Collections.Generic.IList <Net.Vpc.Upa.Callback> >(after, k);
            if (ss != null)
            {
                ss.Remove(callback);
            }
            if (callback is Net.Vpc.Upa.PreparedCallback)
            {
                System.Collections.Generic.IList <Net.Vpc.Upa.PreparedCallback> sss = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <Net.Vpc.Upa.Impl.Util.CallbackInvokerKey, System.Collections.Generic.IList <Net.Vpc.Upa.PreparedCallback> >(preparedAfter, k);
                if (sss != null)
                {
                    sss.Remove((Net.Vpc.Upa.PreparedCallback)callback);
                }
            }
        }
示例#2
0
 public static void ListRemoveRange <E>(System.Collections.Generic.IList <E> list, System.Collections.Generic.IList <E> items)
 {
     foreach (E i in items)
     {
         list.Remove(i);
     }
 }
示例#3
0
 public virtual void RemoveCloseListener(Net.Vpc.Upa.CloseListener closeListener)
 {
     if (closeListeners != null)
     {
         closeListeners.Remove(closeListener);
     }
 }
示例#4
0
 public virtual void Remove(bool system, string n, T t)
 {
     if (system)
     {
         if (n == null)
         {
             allSystem.Remove(t);
         }
         else
         {
             System.Collections.Generic.IList <T> v = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <string, System.Collections.Generic.IList <T> >(someSystem, n);
             if (v != null)
             {
                 v.Remove(t);
             }
         }
     }
     else
     {
         if (n == null)
         {
             allCommun.Remove(t);
         }
         else
         {
             System.Collections.Generic.IList <T> v = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <string, System.Collections.Generic.IList <T> >(someCommun, n);
             if (v != null)
             {
                 v.Remove(t);
             }
         }
     }
 }
 protected internal virtual void OnSessionClosed(Net.Vpc.Upa.Session session)
 {
     lock (sessions) {
         sessions.Remove(session);
         GetSessionContextProvider().SetSession(this, null);
     }
 }
示例#6
0
 protected internal virtual Net.Vpc.Upa.Expressions.QueryStatement CreateViewQuery() /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     Net.Vpc.Upa.Extensions.UnionEntityExtensionDefinition entityExtension = (Net.Vpc.Upa.Extensions.UnionEntityExtensionDefinition)GetDefinition();
     Net.Vpc.Upa.Extensions.UnionQueryInfo queryInfo = entityExtension.GetQueryInfo(GetEntity());
     updatableTables = new System.Collections.Generic.List <Net.Vpc.Upa.Entity>((queryInfo.GetEntities()).Count);
     foreach (string table in queryInfo.GetEntities())
     {
         updatableTables.Add(GetPersistenceUnit().GetEntity(table));
     }
     this.discriminator = queryInfo.GetDiscriminator();
     string[] tabNames = new string[(updatableTables).Count];
     for (int i = 0; i < tabNames.Length; i++)
     {
         tabNames[i] = updatableTables[i].GetName();
     }
     viewFields = GetEntity().GetFieldNames(Net.Vpc.Upa.Impl.Util.Filters.Fields2.READ);
     viewFields.Remove(discriminator);
     fieldsMapping = (string[][])Net.Vpc.Upa.Impl.FwkConvertUtils.CreateMultiArray(typeof(string), (queryInfo.GetEntities()).Count, (viewFields).Count);
     for (int i = 0; i < tabNames.Length; i++)
     {
         for (int j = 0; j < (viewFields).Count; j++)
         {
             fieldsMapping[i][i] = queryInfo.GetFieldName(tabNames[i], viewFields[j], i, j);
         }
     }
     return(CreateViewQuery(GetEntity().GetName(), tabNames, discriminator, viewFields, fieldsMapping));
 }
示例#7
0
 public virtual void RemoveVeto(Net.Vpc.Upa.VetoableOperation operation, Net.Vpc.Upa.EntityShieldVeto veto)
 {
     System.Collections.Generic.IList <Net.Vpc.Upa.EntityShieldVeto> vetoList = GetVetoList(operation, false);
     if (vetoList != null)
     {
         vetoList.Remove(veto);
     }
 }
示例#8
0
        public virtual void UnregisterIndex(Net.Vpc.Upa.Index item)
        {
            string s = item.GetName();

            indexes.Remove(s);
            System.Collections.Generic.IList <Net.Vpc.Upa.Index> indexesByEnt = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <string, System.Collections.Generic.IList <Net.Vpc.Upa.Index> >(indexesByEntity, item.GetEntity().GetName());
            indexesByEnt.Remove(item);
        }
示例#9
0
 public virtual void RemoveObjectListener(Net.Vpc.Upa.UPAObjectListener listener)
 {
     if (listener != null)
     {
         if (objectListeners != null)
         {
             objectListeners.Remove(listener);
         }
     }
 }
示例#10
0
 /// <summary> <p/>Removes field with the specified name from the document.
 /// If multiple fields exist with this name, this method removes the first field that has been added.
 /// If there is no field with the specified name, the document remains unchanged.<p/>
 /// <p/> Note that the removeField(s) methods like the add method only make sense
 /// prior to adding a document to an index. These methods cannot
 /// be used to change the content of an existing index! In order to achieve this,
 /// a document has to be deleted from an index and a new changed version of that
 /// document has to be added.<p/>
 /// </summary>
 public void  RemoveField(System.String name)
 {
     System.Collections.Generic.IEnumerator <IFieldable> it = fields.GetEnumerator();
     while (it.MoveNext())
     {
         IFieldable field = it.Current;
         if (field.Name.Equals(name))
         {
             fields.Remove(field);
             return;
         }
     }
 }
示例#11
0
        static void Main(string[] args)
        {
            List <double> lst = new List <double>();


            System.Collections.Generic.IList <double> ilst = lst;

            Console.WriteLine(ilst.Remove(2));
            ilst.RemoveAt(0);


            ilst.Add(1);

            Console.WriteLine(ilst.Remove(1));
            Console.WriteLine(ilst.Remove(3));
            ilst.RemoveAt(0);
            ilst.RemoveAt(2);


            ilst.Clear();



            ilst.Add(1);
            ilst.Add(2);
            ilst.Add(3);

            Console.WriteLine(ilst.Remove(1));
            Console.WriteLine(ilst.Remove(3));
            ilst.RemoveAt(0);
            ilst.RemoveAt(2);

            ilst.RemoveAt(0);



            Console.ReadLine();
        }
示例#12
0
 public virtual void Uninstall(Net.Vpc.Upa.Entity e)
 {
     foreach (Net.Vpc.Upa.Callbacks.Trigger t in new System.Collections.Generic.List <Net.Vpc.Upa.Callbacks.Trigger>(addedTriggers))
     {
         foreach (Net.Vpc.Upa.Callbacks.Trigger t2 in new System.Collections.Generic.List <Net.Vpc.Upa.Callbacks.Trigger>(e.GetTriggers()))
         {
             if (t.Equals(t2))
             {
                 e.RemoveTrigger(t.GetName());
                 addedTriggers.Remove(t);
                 break;
             }
         }
     }
 }
示例#13
0
        public System.Collections.Generic.IList <LinkUAv1GenNHibernate.EN.LinkUAv1.ComentarioEN> Por_publicacion(int p_publicacion)
        {
            /*PROTECTED REGION ID(LinkUAv1GenNHibernate.CEN.LinkUAv1_Comentario_por_publicacion) ENABLED START*/

            // Write here your custom code...

            System.Collections.Generic.IList <ComentarioEN> lista  = get_IComentarioCAD().Listar(0, int.MaxValue);
            System.Collections.Generic.IList <ComentarioEN> lista2 = get_IComentarioCAD().Listar(0, int.MaxValue);

            foreach (ComentarioEN c in lista2)
            {
                if (c.Publicacion_3.Id != p_publicacion)
                {
                    lista.Remove(c);
                }
            }

            return(lista);
            /*PROTECTED REGION END*/
        }
示例#14
0
        public System.Collections.Generic.IList <LinkUAv1GenNHibernate.EN.LinkUAv1.PublicacionEN> Por_usuario(string p_usuario)
        {
            /*PROTECTED REGION ID(LinkUAv1GenNHibernate.CEN.LinkUAv1_Publicacion_por_usuario) ENABLED START*/

            // Write here your custom code...

            System.Collections.Generic.IList <PublicacionEN> lista  = get_IPublicacionCAD().Listar(0, int.MaxValue);
            System.Collections.Generic.IList <PublicacionEN> lista2 = get_IPublicacionCAD().Listar(0, int.MaxValue);

            foreach (PublicacionEN p in lista2)
            {
                if (p.Usuario_1.Email != p_usuario)
                {
                    lista.Remove(p);      //Puede que de una excepcion, en tal caso arreglar el c?digo
                }
            }

            return(lista);

            /*PROTECTED REGION END*/
        }
示例#15
0
        public System.Collections.Generic.IList <LinkUAv1GenNHibernate.EN.LinkUAv1.AsignaturaEN> Por_titulacion(int p_titulacion)
        {
            /*PROTECTED REGION ID(LinkUAv1GenNHibernate.CEN.LinkUAv1_Asignatura_por_titulacion) ENABLED START*/

            // Write here your custom code...

            System.Collections.Generic.IList <AsignaturaEN> lista  = get_IAsignaturaCAD().Listar(0, int.MaxValue);
            System.Collections.Generic.IList <AsignaturaEN> lista2 = get_IAsignaturaCAD().Listar(0, int.MaxValue);

            foreach (AsignaturaEN a in lista2)
            {
                if (a.Titulacion_2.Id != p_titulacion)
                {
                    lista.Remove(a);
                }
            }

            return(lista);

            /*PROTECTED REGION END*/
        }
示例#16
0
 public virtual void RemoveContextAnnotationStrategyFilter(Net.Vpc.Upa.Config.ScanFilter filter)
 {
     filters.Remove(filter);
 }
示例#17
0
 public virtual Net.Vpc.Upa.Types.DataType RemoveValueValidator(Net.Vpc.Upa.Types.TypeValueValidator validator)
 {
     valueValidators.Remove(validator);
     return(this);
 }
示例#18
0
 public virtual void RemoveSessionListener(Net.Vpc.Upa.Callbacks.SessionListener sessionListener)
 {
     sessionListeners.Remove(sessionListener);
 }
示例#19
0
 public virtual Net.Vpc.Upa.Types.DataType RemoveValueReWriter(Net.Vpc.Upa.Types.TypeValueRewriter rewriter)
 {
     valueRewriters.Remove(rewriter);
     return(this);
 }
 public virtual void RemovePersistenceGroupDefinitionListener(Net.Vpc.Upa.Callbacks.PersistenceGroupDefinitionListener persistenceGroupDefinitionListener) /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     persistenceGroupDefinitionListeners.Remove(persistenceGroupDefinitionListener);
 }
示例#21
0
 public virtual Net.Vpc.Upa.Types.ConstraintsEvent Remove(Net.Vpc.Upa.Types.ConstraintsException e)
 {
     errors.Remove(e);
     return(this);
 }
示例#22
0
 public void ObjectJumpedOff(GameObject obj)
 {
     objectsStandingOn.Remove(obj);
 }
示例#23
0
 public virtual void RemoveTransactionListener(Net.Vpc.Upa.TransactionListener transactionListener)
 {
     listeners.Remove(transactionListener);
 }
示例#24
0
 public virtual void Remove(object key)
 {
     elements.Remove(key);
 }
示例#25
0
 public virtual bool Remove(ENTITY value)
 {
     return(_selectedList.Remove(value));
 }