Exemplo n.º 1
0
 /// <summary>
 /// Makes sure all of the collections are non-Null (but may be empty).
 /// </summary>
 public void EnsureNotNull()
 {
     if (Key == null)
     {
         Key = new RegistryKeyXml[] {}
     }
     ;
     if (Value == null)
     {
         Value = new RegistryValueXml[] {}
     }
     ;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a <see cref="RegistryXml"/> object and fills it with data.
        /// </summary>
        /// <param name="keys">Keys.</param>
        /// <param name="values">Values.</param>
        public RegistryXml([NotNull] ICollection <RegistryKeyXml> keys, [NotNull] ICollection <RegistryValueXml> values)
        {
            if (keys == null)
            {
                throw new ArgumentNullException("keys");
            }
            if (values == null)
            {
                throw new ArgumentNullException("values");
            }

            Key = new RegistryKeyXml[keys.Count];
            keys.CopyTo(Key, 0);
            Value = new RegistryValueXml[values.Count];
            values.CopyTo(Value, 0);
        }