VSSonarExtensionUi.Model.Configuration.RoslynManagerModel.GetRuleFromProfile C# (CSharp) Method

GetRuleFromProfile() private method

private GetRuleFromProfile ( string lang, string id ) : Rule
lang string
id string
return VSSonarPlugins.Types.Rule
        private Rule GetRuleFromProfile(string lang, string id)
        {
            if (this.Profile == null)
            {
                return null;
            }

            if (lang.Equals("C#"))
            {
                var profile = this.Profile["cs"];
                if (profile != null)
                {
                    return profile.GetRule("roslyn-cs:" + id);
                }
            }
            else
            {
                var profile = this.Profile["vbnet"];
                if (profile != null)
                {
                    return profile.GetRule("roslyn-cs:" + id);
                }
            }

            return null;
        }