コード例 #1
0
        public MultiValuedProperty(Dictionary <string, object> table) : this(false, true, null, new T[0], null, null)
        {
            this.isChangesOnlyCopy = true;
            bool copyChangesOnly = base.CopyChangesOnly;

            base.CopyChangesOnly = true;
            foreach (string text in table.Keys)
            {
                object values = ValueConvertor.UnwrapPSObjectIfNeeded(table[text]);
                if (!this.TryAddValues(text, values) && !this.TryRemoveValues(text, values))
                {
                    throw new NotSupportedException(DataStrings.ErrorUnknownOperation(text, MultiValuedProperty <T> .ArrayToString(MultiValuedProperty <T> .AddKeys), MultiValuedProperty <T> .ArrayToString(MultiValuedProperty <T> .RemoveKeys)));
                }
            }
            base.CopyChangesOnly = copyChangesOnly;
            this.isReadOnly      = true;
        }