src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Properties/RuleExtensions.cs
/// <summary>
/// Gets the rule from the specified catalog, if such a catalog and rule exist.
/// </summary>
/// <param name="snapshot">The snapshot to read from.</param>
/// <param name="catalogName">The name of the catalog.</param>
/// <param name="ruleName">The name of the rule.</param>
/// <returns>The rule, if found; otherwise <c>null</c>.</returns>
Gets the rule from the specified catalog, if such a catalog and rule exist.
Gets the rule from the specified catalog if such a catalog and rule exist .
internal static Rule GetSchema(this IProjectCatalogSnapshot snapshot, string catalogName, string ruleName)
        {
            Requires.NotNull(snapshot, nameof(snapshot));
            Requires.NotNull(catalogName, nameof(catalogName));
            Requires.NotNullOrEmpty(ruleName, nameof(ruleName));
            if (snapshot.NamedCatalogs.TryGetValue(catalogName, out IPropertyPagesCatalog catalog))
            {
                return catalog.GetSchema(ruleName);
            }
            else
            {
                return null;
            }
        }
internal static Rule GetSchema ( this IProjectCatalogSnapshot snapshot , string catalogName , string ruleName ) { Requires . NotNull ( snapshot , nameof ( snapshot ) ) ; Requires . NotNull ( catalogName , nameof ( catalogName ) ) ; Requires . NotNullOrEmpty ( ruleName , nameof ( ruleName ) ) ; if ( snapshot . NamedCatalogs . TryGetValue ( catalogName , out IPropertyPagesCatalog catalog ) ) { return catalog . GetSchema ( ruleName ) ; } else { return null ; } }
Gets the rule from the specified catalog, if such a catalog and rule exist.
Gets the rule from the specified catalog if such a catalog and rule exist .
The rule, if found; otherwise null
The rule if found ; otherwise null
IProjectCatalogSnapshot
this
catalogName
string
The name of the catalog.
The name of the catalog .
ruleName
string
The name of the rule.
The name of the rule .
snapshot
The snapshot to read from.
The snapshot to read from .