Esempio n. 1
0
        public UserSettings()
        {
            ShowSelfProperty          = new SettingProperty <bool>(this, null);
            ShowSelfProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(ShowSelf)}: {ShowSelf}");

            UsernameProperty          = new SettingProperty <string>(this);
            UsernameProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(Username)}: {Username}");

            UserImageUrlProperty          = new SettingProperty <string>(this);
            UserImageUrlProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(UserImageUrl)}: {UserImageUrl}");

            UserCodeDisplayProperty          = new SettingProperty <UserDisplaySetting>(this);
            UserCodeDisplayProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(UserCodeDisplay)}: {UserCodeDisplay}");

            UserTabDisplayProperty          = new SettingProperty <UserDisplaySetting>(this);
            UserTabDisplayProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(UserTabDisplay)}: {UserTabDisplay}");

            ShowAllBranchesProperty          = new SettingProperty <bool>(this, null);
            ShowAllBranchesProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(ShowAllBranches)}: {ShowAllBranches}");
        }
Esempio n. 2
0
        public SharedSettings()
        {
            FileBasedPersisterPathProperty          = new SettingProperty <string>(this, SharedFolderLocalModelPersister.FolderPathIsValid);
            FileBasedPersisterPathProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(FileBasedPersisterPath)}: {FileBasedPersisterPath}");

            RedisServerProperty          = new SettingProperty <string>(this, RedisWrapper.GetServerStringErrorTextAsync);
            RedisServerProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(RedisServer)}: {RedisServer}");

            SlackTokenProperty          = new SettingProperty <string>(this, SlackWrapper.SlackTokenIsValid);
            SlackTokenProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(SlackToken)}: {SlackToken}");

            SlackChannelProperty          = new SettingProperty <string>(this, SlackWrapper.SlackChannelIsValid);
            SlackChannelProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(SlackChannel)}: {SlackChannel}");

            SqlServerConnectionStringProperty          = new SettingProperty <string>(this, SqlConnectionWrapper.GetConnectionStringErrorTextAsync);
            SqlServerConnectionStringProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(SqlServerConnectionString)}: {SqlServerConnectionString}");

            WinServiceIPAddressProperty          = new SettingProperty <string>(this, WinServiceClient.GetIPSettingErrorText);
            WinServiceIPAddressProperty.Changed += (s, e) => TeamCodingPackage.Current.Logger.WriteInformation($"Changing setting {nameof(WinServiceIPAddress)}: {WinServiceIPAddress}");
        }