/// <summary> /// Restore settings from JSON string. /// </summary> public static GblSettings FromJson ( [NotNull] string text ) { Sure.NotNullNorEmpty(text, nameof(text)); GblSettings result = JsonConvert .DeserializeObject <GblSettings>(text); return(result); }
public static GblSettings ForSearchExpression ( [NotNull] IrbisConnection connection, [NotNull] string searchExpression, [NotNull] IEnumerable <GblStatement> statements ) { Sure.NotNull(connection, nameof(connection)); Sure.NotNullNorEmpty(searchExpression, nameof(searchExpression)); Sure.NotNull(statements, nameof(statements)); GblSettings result = new GblSettings(connection, statements) { SearchExpression = searchExpression }; return(result); }
public static GblSettings ForList ( [NotNull] IrbisConnection connection, [NotNull] IEnumerable <int> mfnList, [NotNull] IEnumerable <GblStatement> statements ) { Sure.NotNull(connection, nameof(connection)); Sure.NotNull(mfnList, nameof(mfnList)); Sure.NotNull(statements, nameof(statements)); GblSettings result = new GblSettings(connection, statements) { MfnList = mfnList.ToArray() }; return(result); }
public static GblSettings ForList ( [NotNull] IrbisConnection connection, [NotNull] string database, [NotNull] IEnumerable <int> mfnList ) { Sure.NotNull(connection, nameof(connection)); Sure.NotNullNorEmpty(database, nameof(database)); Sure.NotNull(mfnList, nameof(mfnList)); GblSettings result = new GblSettings(connection) { Database = database, MfnList = mfnList.ToArray() }; return(result); }
public static GblSettings ForInterval ( [NotNull] IrbisConnection connection, int minMfn, int maxMfn, [NotNull] IEnumerable <GblStatement> statements ) { Sure.NotNull(connection, nameof(connection)); Sure.NotNull(statements, nameof(statements)); GblSettings result = new GblSettings(connection, statements) { MinMfn = minMfn, MaxMfn = maxMfn }; return(result); }