/// <summary>
        /// Initializes a new instance of the DataSource class with required arguments.
        /// </summary>
        /// <param name="name">The name of the datasource.</param>
        /// <param name="type">The data type of the datasource.</param>
        /// <param name="credentials">Credentials to connect to the datasource.</param>
        /// <param name="container">Information about the entity (such as Azure SQL table or
        /// DocumentDb collection) that will be indexed.</param>
        public DataSource(
            string name, 
            DataSourceType type, 
            DataSourceCredentials credentials,
            DataContainer container)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            if (type == null)
            {
                throw new ArgumentNullException("type");
            }

            if (credentials == null)
            {
                throw new ArgumentNullException("credentials");
            }

            if (container == null)
            {
                throw new ArgumentNullException("container");
            }

            Name = name;
            Type = type;
            Credentials = credentials;
            Container = container;
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the DataSource class.
 /// </summary>
 public DataSource(string name, DataSourceType type, DataSourceCredentials credentials, DataContainer container, string description = default(string), DataChangeDetectionPolicy dataChangeDetectionPolicy = default(DataChangeDetectionPolicy), DataDeletionDetectionPolicy dataDeletionDetectionPolicy = default(DataDeletionDetectionPolicy), string eTag = default(string))
 {
     Name        = name;
     Description = description;
     Type        = type;
     Credentials = credentials;
     Container   = container;
     DataChangeDetectionPolicy   = dataChangeDetectionPolicy;
     DataDeletionDetectionPolicy = dataDeletionDetectionPolicy;
     ETag = eTag;
 }