/// <summary> /// Saves the property values to the specified capabilities dictionary. /// </summary> /// <param name="capabilities">The capabilities dictionary to save values to.</param> public void SaveTo(IDataValueDictionary capabilities) { if (capabilities == null) { return; } SaveToDictionary(); foreach (var kvp in Dictionary) { capabilities.SetValue(kvp.Key, kvp.Value.Item); } }
/// <summary> /// Initializes a new <see cref="EtpCapabilities"/> instance. /// </summary> /// <param name="version">The ETP version the capabilities are for.</param> /// <param name="capabilities">The capabilities to initialize this from.</param> protected EtpCapabilities(EtpVersion version, IReadOnlyDataValueDictionary capabilities) { Dictionary = EtpFactory.CreateDataValueDictionary(version); LoadFrom(capabilities); }
/// <summary> /// Initializes a new <see cref="EtpCapabilities"/> instance. /// </summary> /// <param name="capabilities">The capabilities to initialize this from.</param> protected EtpCapabilities(IReadOnlyCapabilities capabilities) { Dictionary = capabilities.CloneCapabilities(); LoadFromDictionary(); }
/// <summary> /// Initializes a new <see cref="EtpCapabilities"/> instance. /// </summary> /// <param name="version">The ETP version the capabilities are for.</param> protected EtpCapabilities(EtpVersion version) { Dictionary = EtpFactory.CreateDataValueDictionary(version); InitializeFromDefaults(); }