Esempio n. 1
0
        private SerializableOptionSet(
            ImmutableHashSet <string> languages,
            WorkspaceOptionSet workspaceOptionSet,
            ImmutableHashSet <IOption> serializableOptions,
            ImmutableDictionary <OptionKey, object?> values,
            ImmutableHashSet <OptionKey> changedOptionKeysSerializable,
            ImmutableHashSet <OptionKey> changedOptionKeysNonSerializable
            )
        {
            Debug.Assert(languages.All(RemoteSupportedLanguages.IsSupported));

            _languages                        = languages;
            _workspaceOptionSet               = workspaceOptionSet;
            _serializableOptions              = serializableOptions;
            _serializableOptionValues         = values;
            _changedOptionKeysSerializable    = changedOptionKeysSerializable;
            _changedOptionKeysNonSerializable = changedOptionKeysNonSerializable;

            Debug.Assert(values.Keys.All(ShouldSerialize));
            Debug.Assert(
                changedOptionKeysSerializable.All(optionKey => ShouldSerialize(optionKey))
                );
            Debug.Assert(
                changedOptionKeysNonSerializable.All(optionKey => !ShouldSerialize(optionKey))
                );
        }
        private SerializableOptionSet(
            ImmutableHashSet <string> languages,
            WorkspaceOptionSet workspaceOptionSet,
            ImmutableHashSet <IOption> serializableOptions,
            ImmutableDictionary <OptionKey, object?> values,
            ImmutableHashSet <OptionKey> changedOptionKeys)
        {
            _languages                = languages;
            _workspaceOptionSet       = workspaceOptionSet;
            _serializableOptions      = serializableOptions;
            _serializableOptionValues = values;
            _changedOptionKeys        = changedOptionKeys;

            Debug.Assert(values.Keys.All(ShouldSerialize));
        }
Esempio n. 3
0
        private SerializableOptionSet(
            WorkspaceOptionSet workspaceOptionSet,
            ImmutableDictionary <OptionKey, object?> values,
            ImmutableHashSet <OptionKey> changedOptionKeysSerializable,
            ImmutableHashSet <OptionKey> changedOptionKeysNonSerializable)
        {
            _workspaceOptionSet               = workspaceOptionSet;
            _serializableOptionValues         = values;
            _changedOptionKeysSerializable    = changedOptionKeysSerializable;
            _changedOptionKeysNonSerializable = changedOptionKeysNonSerializable;

            Debug.Assert(values.Keys.All(ShouldSerialize));
            Debug.Assert(changedOptionKeysSerializable.All(optionKey => ShouldSerialize(optionKey)));
            Debug.Assert(changedOptionKeysNonSerializable.All(optionKey => !ShouldSerialize(optionKey)));

            _languages = new Lazy <ImmutableHashSet <string> >(() => this.GetLanguagesAndValuesToSerialize(includeValues: false).languages);
        }