Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EntityCollection{T}"/>
 /// class.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="path">The endpoint for this collection.</param>
 /// <param name="args">The variable argument list.</param>
 public EntityCollection(Service service, string path, Args args)
     : base(service, path, args, typeof(Entity))
 {
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EntityCollection{T}"/>
 /// class.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="path">The endpoint for this collection.</param>
 /// <param name="args">The variable argument list.</param>
 /// <param name="itemClass">The type of this entity.</param>
 public EntityCollection(
     Service service, string path, Args args, Type itemClass)
     : base(service, path, args, itemClass)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InputCollection"/>
 /// class.
 /// </summary>
 /// <param name="service">The connected service.</param>
 /// <param name="args">The parameters.</param>
 public InputCollection(Service service, Args args)
     : base(service, "data/inputs", args)
 {
 }
 /// <summary>
 /// Returns a scoped, namespace-constrained input from the current list
 /// of inputs.
 /// </summary>
 /// <param name="key">The name.</param>
 /// <param name="splunkNamespace">The namespace.</param>
 /// <returns>The input.</returns>
 public override Input Get(object key, Args splunkNamespace)
 {
     Util.EnsureNamespaceIsExact(splunkNamespace);
     return(this.RetrieveInput((string)key, splunkNamespace));
 }
 /// <summary>
 /// Not supported. A stub for create.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="args">The args.</param>
 /// <returns>Will not return, but throw an exception.</returns>
 public override Input Create(string name, Args args)
 {
     throw new Exception("can't create an input here");
 }
        /// <summary>
        /// Creates a new message.
        /// </summary>
        /// <param name="name">The key name.</param>
        /// <param name="value">The value.</param>
        /// <returns>The new message.</returns>
        public Message Create(string name, string value)
        {
            Args args = new Args("value", value);

            return(base.Create(name, args));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageCollection"/>
 /// class.
 /// </summary>
 /// <param name="service">The service</param>
 /// <param name="args">The optional arguments</param>
 public MessageCollection(Service service, Args args)
     : base(service, "messages", args, typeof(Message))
 {
 }