Issues/19 and 20 #21

Merged
mahalex merged 4 commits from issues/19-and-20 into master 2021-07-10 10:13:51 +00:00
2 changed files with 14 additions and 0 deletions
Showing only changes of commit 6d899096e4 - Show all commits

View File

@ -20,5 +20,13 @@ namespace MatFileHandler
/// </summary>
/// <param name="variableName">Variable name.</param>
IVariable this[string variableName] { get; set; }
/// <summary>
/// Gets the variable with the specified name.
/// </summary>
/// <param name="name">The name of the variable to get.</param>
/// <param name="variable">When this method returns, contains the variable with the specified name, if it is found; otherwise, null.</param>
/// <returns>True if the file contains a variable with the specified name; otherwise, false.</returns>
public bool TryGetVariable(string name, out IVariable? variable);
}
}

View File

@ -34,5 +34,11 @@ namespace MatFileHandler
get => _variables[variableName];
set => _variables[variableName] = value;
}
/// <inheritdoc />
public bool TryGetVariable(string name, out IVariable value)
{
return _variables.TryGetValue(name, out value);
}
}
}