TestSettings Class

Summary

Stores global settings that control behavior and execution.
Assembly
Wyam.Testing.dll
Namespace
Wyam.Testing.Configuration
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["ISettings"] click Interface0 "/api/Wyam.Common.Configuration/ISettings" Type-.->Interface1["IMetadataDictionary"] click Interface1 "/api/Wyam.Common.Meta/IMetadataDictionary" Type-.->Interface2["IDictionary<string, Object>"] Type-.->Interface3["IReadOnlySettings"] click Interface3 "/api/Wyam.Common.Configuration/IReadOnlySettings" Type-.->Interface4["IMetadata"] click Interface4 "/api/Wyam.Common.Meta/IMetadata" Type-.->Interface5["IReadOnlyDictionary<string, Object>"] Type["TestSettings"] class Type type-node

Syntax

public class TestSettings : ISettings, IMetadataDictionary, IDictionary<string, Object>, 
    IReadOnlySettings, IMetadata, IReadOnlyDictionary<string, Object>

Properties

Name Value Summary
Count int
The count of metadata.
IsReadOnly bool
Keys IEnumerable<string>
this[string] Object
Values IEnumerable<Object>

Methods

Name Value Summary
Add(KeyValuePair<string, Object>) void
Add(string, Object) void
Clear() void
Contains(KeyValuePair<string, Object>) bool
ContainsKey(string) bool
Whether or not the metadata contains the specified key.
CopyTo(KeyValuePair<string, Object>[], int) void
Get(string, Object) Object
Gets the value for the specified key. This method never throws an exception. It will return the specified default value or null if the key is not found.
Get<T>(string) T
Gets the value for the specified key converted to the specified type. This method never throws an exception. It will return default(T) if the key is not found or the value cannot be converted to T.
Get<T>(string, T) T
Gets the value for the specified key. This method never throws an exception. It will return the specified default value if the key is not found.
GetEnumerator() IEnumerator<KeyValuePair<string, Object>>
GetMetadata(string[]) IMetadata
Gets a new Wyam.Common.Meta.IMetadata containing only the specified keys and their values. If a key is not present in the current metadata, it will be ignored and will not be copied to the new metadata object.
GetRaw(string) Object
Gets the raw value for the specified key. This method will not materialize Wyam.Common.Meta.IMetadataValue values the way Wyam.Common.Meta.IMetadata.Get(System.String,System.Object) will. A System.Collections.Generic.KeyNotFoundException will be thrown for missing keys.
MetadataAs<T>() IMetadata<T>
Presents metadata values as a specific type (see Wyam.Common.Meta.IMetadata).
Remove(KeyValuePair<string, Object>) bool
Remove(string) bool
TryGetValue(string, Object) bool
Attempts to get a value from metadata.
TryGetValue<T>(string, T) bool
Tries to get the value for the specified key.
GitHub