Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ModifiedQueue" /> class.
        /// Initializes a new instance of the <see cref="ModifiedQueue" />class.
        /// </summary>
        /// <param name="ACL">ACL.</param>
        /// <param name="Type">Type (default to &quot;queue&quot;).</param>
        /// <param name="Expires">Expires.</param>
        /// <param name="QueueType">QueueType (default to &quot;pull&quot;).</param>
        /// <param name="Retry">Retry.</param>
        /// <param name="Name">Name.</param>
        /// <param name="Subscribers">Subscribers.</param>
        /// <param name="IsModified">IsModified (default to true).</param>
        /// <param name="ModifiedColumns">ModifiedColumns.</param>
        /// <param name="Messages">Messages.</param>

        public ModifiedQueue(ACL ACL = null, string Type = null, DateTime?Expires = null, string QueueType = null, string Retry = null, string Name = null, List <string> Subscribers = null, bool?IsModified = null, List <string> ModifiedColumns = null, List <QueueMessage> Messages = null)
        {
            this.ACL = ACL;
            // use default value if no "Type" provided
            if (Type == null)
            {
                this.Type = "queue";
            }
            else
            {
                this.Type = Type;
            }
            this.Expires = Expires;
            // use default value if no "QueueType" provided
            if (QueueType == null)
            {
                this.QueueType = "pull";
            }
            else
            {
                this.QueueType = QueueType;
            }
            this.Retry       = Retry;
            this.Name        = Name;
            this.Subscribers = Subscribers;
            // use default value if no "IsModified" provided
            if (IsModified == null)
            {
                this.IsModified = true;
            }
            else
            {
                this.IsModified = IsModified;
            }
            this.ModifiedColumns = ModifiedColumns;
            this.Messages        = Messages;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QueueMessage" /> class.
        /// Initializes a new instance of the <see cref="QueueMessage" />class.
        /// </summary>
        /// <param name="ACL">ACL.</param>
        /// <param name="Type">Type (default to &quot;queue-message&quot;).</param>
        /// <param name="Expires">Expires.</param>
        /// <param name="Id">Id.</param>
        /// <param name="Delay">Delay.</param>
        /// <param name="Timeout">Timeout (default to 1800).</param>
        /// <param name="ModifiedColumns">ModifiedColumns.</param>
        /// <param name="IsModified">IsModified (default to true).</param>
        /// <param name="Message">Message.</param>

        public QueueMessage(ACL ACL = null, string Type = null, DateTime?Expires = null, string Id = null, DateTime?Delay = null, long?Timeout = null, List <string> ModifiedColumns = null, bool?IsModified = null, string Message = null)
        {
            this.ACL = ACL;
            // use default value if no "Type" provided
            if (Type == null)
            {
                this.Type = "queue-message";
            }
            else
            {
                this.Type = Type;
            }
            this.Expires = Expires;
            this.Id      = Id;
            this.Delay   = Delay;
            // use default value if no "Timeout" provided
            if (Timeout == null)
            {
                this.Timeout = 1800;
            }
            else
            {
                this.Timeout = Timeout;
            }
            this.ModifiedColumns = ModifiedColumns;
            // use default value if no "IsModified" provided
            if (IsModified == null)
            {
                this.IsModified = true;
            }
            else
            {
                this.IsModified = IsModified;
            }
            this.Message = Message;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Queue" /> class.
        /// Initializes a new instance of the <see cref="Queue" />class.
        /// </summary>
        /// <param name="Id">Id.</param>
        /// <param name="TableName">TableName (default to &quot;_Queue&quot;).</param>
        /// <param name="CreatedAt">CreatedAt.</param>
        /// <param name="UpdatedAt">UpdatedAt.</param>
        /// <param name="ACL">ACL.</param>
        /// <param name="Type">Type (default to &quot;queue&quot;).</param>
        /// <param name="Expires">Expires.</param>
        /// <param name="QueueType">QueueType (default to &quot;pull&quot;).</param>
        /// <param name="Retry">Retry.</param>
        /// <param name="Name">Name.</param>
        /// <param name="Subscribers">Subscribers.</param>
        /// <param name="Messages">Messages.</param>

        public Queue(string Id = null, string TableName = null, DateTime?CreatedAt = null, DateTime?UpdatedAt = null, ACL ACL = null, string Type = null, DateTime?Expires = null, string QueueType = null, string Retry = null, string Name = null, List <string> Subscribers = null, List <QueueMessage> Messages = null)
        {
            this.Id = Id;
            // use default value if no "TableName" provided
            if (TableName == null)
            {
                this.TableName = "_Queue";
            }
            else
            {
                this.TableName = TableName;
            }
            this.CreatedAt = CreatedAt;
            this.UpdatedAt = UpdatedAt;
            this.ACL       = ACL;
            // use default value if no "Type" provided
            if (Type == null)
            {
                this.Type = "queue";
            }
            else
            {
                this.Type = Type;
            }
            this.Expires = Expires;
            // use default value if no "QueueType" provided
            if (QueueType == null)
            {
                this.QueueType = "pull";
            }
            else
            {
                this.QueueType = QueueType;
            }
            this.Retry       = Retry;
            this.Name        = Name;
            this.Subscribers = Subscribers;
            this.Messages    = Messages;
        }