Exemple #1
0
        /// <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);
            }
        }
Exemple #2
0
 /// <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);
 }
Exemple #3
0
 /// <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();
 }
Exemple #4
0
 /// <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();
 }