Esempio n. 1
0
        // Todo:
        // - Could also supply modified/created dates if needed from the FnL...

        /// <summary>
        /// Initializes a new instance of FormAndListDataSource class
        /// </summary>
        public DnnFormAndList()
        {
            Out.Add(Constants.DefaultStreamName, new DataStream(this, Constants.DefaultStreamName, GetEntities, GetList));
            Configuration.Add(ModuleIdKey, FnLModuleIdDefaultToken);
            Configuration.Add(TitleFieldKey, EntityTitleDefaultKeyToken);
            Configuration.Add(ContentTypeKey, ContentTypeDefaultToken);
        }
Esempio n. 2
0
        public ModuleDataSource()
        {
            Out.Add("Default", new DataStream(this, "Default", GetContent));
            Out.Add("ListContent", new DataStream(this, "Default", GetListContent));

            Configuration.Add("ModuleId", "[Module:ModuleID||[Module:ModuleId]]");              // Look for ModuleID and ModuleId
        }
Esempio n. 3
0
        public void LinkTo(Neuron TargetNeuron, ArgumentValue Value)
        {
            var connection = new NeuronConnection(this, TargetNeuron, Value);

            Out.Add(connection);
            TargetNeuron.In.Add(connection);
        }
Esempio n. 4
0
 public DnnUserProfileDataSource()
 {
     Out.Add(Constants.DefaultStreamName, new DataStream(this, Constants.DefaultStreamName, GetList));
     Configuration.Add(UserIdsKey, UserIdsDefaultKeyToken);
     Configuration.Add(PropertiesKey, PropertiesDefaultKeyToken);
     Configuration.Add(ContentTypeKey, ContentTypeDefaultToken);
     Configuration.Add(TitleFieldKey, EntityTitleDefaultKeyToken);
 }
Esempio n. 5
0
        /// <summary>
        /// Flushes the inflow to the outflow and sorts the queue.
        /// </summary>
        public void Flush()
        {
            Agent a;

            while (In.Count > 0)
            {
                a = In[0];
                In.Remove(a);
                Out.Add(a);
            }
            Out.Sort();
        }
        /// <summary>Creates an this <see cref="ITag"/> that suits the given information</summary>
        /// <param name="Name">The name of the Tag</param>
        /// <param name="Value">The value of the receiving tag</param>
        /// <returns>Creates an this <see cref="ITag"/> that suits the given information</returns>
        public static ITag Create(String Name, List <Boolean> Value)
        {
            (ITag Out, Type TagType) = NBTTagFactory.CreateList(Name, NBTTagType.Byte);
            Int32 Count = Value.Count;
            ITag  SubTag;

            for (Int32 I = 0; I < Count; I++)
            {
                SubTag = (ITag)Activator.CreateInstance(TagType);
                SubTag.SetValue((Byte)(Value[I] ? 1 : 0));
                Out.Add(SubTag);
            }
            return(Out);
        }
Esempio n. 7
0
        public EntryExitBlock(IExecutionBlock entry, IExecutionBlock exit, IExecutionContext context) : base(context)
        {
            Entry = entry;
            Exit  = exit;

            foreach (var param in entry.Out)
            {
                In.Add(param);
            }

            foreach (var param in exit.In)
            {
                Out.Add(param);
            }
        }
Esempio n. 8
0
        /// <summary>
        /// Flushes the external inflow to the outflow and inflow to the external outflow, then sorts the both queues.
        /// </summary>
        public new void Flush()
        {
            Agent a;

            while (In.Count > 0)
            {
                a = In[0];
                In.Remove(a);
                ExternalOut.Add(a);
            }
            ExternalOut.Sort();

            while (ExternalIn.Count > 0)
            {
                a = ExternalIn[0];
                ExternalIn.Remove(a);
                Out.Add(a);
            }
            Out.Sort();
        }
Esempio n. 9
0
 public void ConnectTo(Neuron other)
 {
     Out.Add(other);
     other.In.Add(this);
 }