Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ContentsClient{TEntity, TData}"/> class
        /// with the name of the schema, the options from the <see cref="SquidexClientManager"/> and the HTTP client.
        /// </summary>
        /// <param name="options">The options from the <see cref="SquidexClientManager"/>. Cannot be null.</param>
        /// <param name="schemaName">Name of the schema. Cannot be null or empty.</param>
        /// <param name="httpClient">The HTTP client. Cannot be null.</param>
        /// <exception cref="ArgumentNullException"><paramref name="options"/> is null.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="schemaName"/> is null.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="httpClient"/> is null.</exception>
        /// <exception cref="ArgumentException"><paramref name="schemaName"/> is empty.</exception>
        public ContentsClient(SquidexOptions options, string schemaName, HttpClient httpClient)
            : base(options, httpClient)
        {
            Guard.NotNullOrEmpty(schemaName, nameof(schemaName));

            SchemaName = schemaName;
        }
        public SquidexClientManager(SquidexOptions options)
        {
            Guard.NotNull(options, nameof(options));

            options.CheckAndFreeze();

            Options = options;
        }
Exemplo n.º 3
0
        public static SquidexClientManager FromOption(SquidexOptions options)
        {
            Guard.NotNull(options, nameof(options));

            return new SquidexClientManager(
                options.Url,
                options.AppName,
                options.ClientId,
                options.ClientSecret);
        }
Exemplo n.º 4
0
 public ExtendableRulesClient(SquidexOptions options, HttpClient httpClient)
     : base(options, httpClient)
 {
 }
Exemplo n.º 5
0
        public static SquidexClientManager FromOption(SquidexOptions options)
        {
            Guard.NotNull(options, nameof(options));

            return(new SquidexClientManager(options));
        }
 public SquidexAssetClient(SquidexOptions options, HttpClient httpClient)
     : base(options, httpClient)
 {
 }