Exemple #1
0
        public Task <EntityOutput <TEntity> > LoadEntities <TEntity>(string connString, EntityLoaderArguments args, CancellationToken cancellation = default) where TEntity : Entity
        {
            EntityArgs = args;
            var fakeResult = new EntityOutput <TEntity>(null, 0);

            return(Task.FromResult(fakeResult));
        }
        public List <EntityOutput> Execute(Operation operation, Entity enteredEntity)
        {
            List <EntityOutput> results = new List <EntityOutput>();

            for (int i = 0; i < entities.Count; i++)
            {
                EntityOutput entityOutput = new EntityOutput();
                entityOutput.Name  = entities[i].Name;
                entityOutput.Value = operation(enteredEntity, entities[i]);
                results.Add(entityOutput);
            }

            return(results);
        }
Exemple #3
0
        EntityOutput DefineClassMax(List <EntityOutput> values)
        {
            EntityOutput maxEntity = new EntityOutput();

            maxEntity.Value = Double.MinValue;
            foreach (EntityOutput entity in values)
            {
                if (maxEntity.Value < entity.Value)
                {
                    maxEntity = entity;
                }
            }
            return(maxEntity);
        }
Exemple #4
0
        EntityOutput DefineClassMin(List <EntityOutput> values)
        {
            EntityOutput minEntity = new EntityOutput();

            minEntity.Value = Double.MaxValue;
            foreach (EntityOutput entity in values)
            {
                if (minEntity.Value > entity.Value)
                {
                    minEntity = entity;
                }
            }
            return(minEntity);
        }
Exemple #5
0
 /**
  * Add an entity output hook on a single entity instance
  *
  * @param entity        The entity on which to add a hook.
  * @param output        The output name to hook.
  * @param callback      An EntityOutput function pointer.
  * @param once          Only fire this hook once and then remove itself.
  * @error               Entity Outputs disabled or Invalid Entity index.
  */
 public static void HookSingleEntityOutput(int entity, string output, EntityOutput callback, bool once = false)
 {
     throw new NotImplementedException();
 }
Exemple #6
0
 /**
  * Remove an entity output hook.
  * @param classname     The classname to hook.
  * @param output        The output name to hook.
  * @param callback      An EntityOutput function pointer.
  * @return              True on success, false if no valid hook was found.
  * @error               Entity Outputs disabled.
  */
 public static bool UnhookEntityOutput(string classname, string output, EntityOutput callback)
 {
     throw new NotImplementedException();
 }
Exemple #7
0
 /**
  * Remove a single entity output hook.
  *
  * @param entity        The entity on which to remove the hook.
  * @param output        The output name to hook.
  * @param callback      An EntityOutput function pointer.
  * @return              True on success, false if no valid hook was found.
  * @error               Entity Outputs disabled or Invalid Entity index.
  */
 public static bool UnhookSingleEntityOutput(int entity, string output, EntityOutput callback)
 {
     throw new NotImplementedException();
 }