Fix #19
This commit is contained in:
parent
b6c387a1e4
commit
6d899096e4
@ -20,5 +20,13 @@ namespace MatFileHandler
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="variableName">Variable name.</param>
|
/// <param name="variableName">Variable name.</param>
|
||||||
IVariable this[string variableName] { get; set; }
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -34,5 +34,11 @@ namespace MatFileHandler
|
|||||||
get => _variables[variableName];
|
get => _variables[variableName];
|
||||||
set => _variables[variableName] = value;
|
set => _variables[variableName] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public bool TryGetVariable(string name, out IVariable value)
|
||||||
|
{
|
||||||
|
return _variables.TryGetValue(name, out value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user