/// <summary> /// Creates new <see cref="SettingsBag"/> object (for Global settings only). /// </summary> /// <param name="type"><see cref="SettingsBag"/> type.</param> /// <exception cref="ArgumentException"><paramref name="type" /> not equals to <see cref="SettingsBagType"/>.Global.</exception> public SettingsBag(SettingsBagType type) : this(type, 0) { // Exceptions if (type != SettingsBagType.Global && type != SettingsBagType.NetSuite && type != SettingsBagType.Elasticsearch) { throw new ArgumentException("Only SettingsBagType.Global or SettingsBagType.NetSuite or SettingsBagType.Elasticsearch type can be used without providing objectId.", "type"); } }
/// <summary> /// Creates new <see cref="SettingsBag"/> object. /// </summary> /// <param name="type"><see cref="SettingsBag"/> type.</param> /// <param name="objectId">ID of an object which hostes settings.</param> public SettingsBag(SettingsBagType type, int objectId) { this.type = type; this.objectId = objectId; }